refactor: rename platform abstraction to backend
test / run tests/run_tests.py (pull_request) Successful in 21s
test / run tests/run_tests.py (pull_request) Successful in 21s
Across the package: - claude_bottle/platform/ -> claude_bottle/backend/ - platform/docker/platform.py -> backend/docker/backend.py - class BottlePlatform -> BottleBackend - class DockerBottlePlatform -> DockerBottleBackend - get_bottle_platform() -> get_bottle_backend() - env var CLAUDE_BOTTLE_PLATFORM -> CLAUDE_BOTTLE_BACKEND - dict _PLATFORMS -> _BACKENDS "Backend" is shorter and more established as the term for a pluggable strategy-pattern implementation. "Platform" was vague (could mean OS, hardware, cloud) and mildly redundant — Docker is itself a platform. The previous PRD section claiming "the Backend protocol was rejected" referred to a low-level run/exec/cp/network_connect protocol; the name was never the reason. The PRD is updated to describe that rejected design by shape rather than by name. The bottle/agent concepts and the manifest schema are unchanged.
This commit is contained in:
@@ -11,7 +11,7 @@ import sys
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from ..platform import BottleSpec, get_bottle_platform
|
||||
from ..backend import BottleSpec, get_bottle_backend
|
||||
from ..log import info
|
||||
from ..manifest import Manifest
|
||||
from ._common import PROG, USER_CWD, read_tty_line
|
||||
@@ -38,8 +38,8 @@ def cmd_start(argv: list[str]) -> int:
|
||||
|
||||
stage_dir = Path(tempfile.mkdtemp(prefix="claude-bottle-stage."))
|
||||
try:
|
||||
platform = get_bottle_platform()
|
||||
plan = platform.prepare(spec, stage_dir=stage_dir)
|
||||
backend = get_bottle_backend()
|
||||
plan = backend.prepare(spec, stage_dir=stage_dir)
|
||||
plan.print(remote_control=args.remote_control)
|
||||
|
||||
if dry_run:
|
||||
@@ -53,7 +53,7 @@ def cmd_start(argv: list[str]) -> int:
|
||||
info("aborted by user")
|
||||
return 0
|
||||
|
||||
with platform.launch(plan) as bottle:
|
||||
with backend.launch(plan) as bottle:
|
||||
info(
|
||||
"attaching interactive claude session "
|
||||
"(Ctrl-D or 'exit' to leave; container will be removed)"
|
||||
|
||||
Reference in New Issue
Block a user