fix: restore runtime workspace provisioning

This commit is contained in:
2026-06-09 02:43:37 +00:00
committed by didericis
parent f24e2857ab
commit dfd2d5f620
17 changed files with 201 additions and 108 deletions
@@ -27,7 +27,6 @@ from . import smolvm as _smolvm
from .bottle import SmolmachinesBottle
from .bottle_cleanup_plan import SmolmachinesBottleCleanupPlan
from .bottle_plan import SmolmachinesBottlePlan
# from .provision import workspace as _workspace
class SmolmachinesBottleBackend(
@@ -82,11 +81,6 @@ class SmolmachinesBottleBackend(
with _launch.launch(plan, provision=self.provision) as bottle:
yield bottle
# def provision_workspace(
# self, plan: SmolmachinesBottlePlan, bottle: Bottle
# ) -> None:
# _workspace.provision_workspace(plan, bottle)
def supervise_mcp_url(self, plan: SmolmachinesBottlePlan) -> str:
"""The smolmachines guest reaches the supervise sidecar via a
host-published random port the launch step pinned earlier
@@ -6,9 +6,7 @@ the `AgentProvider` plugin under `bot_bottle/contrib/`. CA and git
provisioning also moved to the AgentProvider ABC (with Debian/node
defaults); user plugins override them for non-standard images.
The module left in this subpackage handles the remaining backend-
specific step:
- workspace.py — copy the operator workspace into the guest
(currently commented out — workspace planning is disabled)
No modules remain in this subpackage. Workspace copying now runs
through `BottleBackend.provision_workspace` against the running
bottle for every backend.
"""
@@ -1,37 +0,0 @@
"""Copy the operator workspace into a smolmachines guest.
DISABLED — workspace planning is currently commented out at the
BottlePlan level. This module is kept as a placeholder for when
workspace support is re-enabled.
"""
# from __future__ import annotations
#
# import shlex
#
# from ....log import info
# from ... import Bottle
# from ..bottle_plan import SmolmachinesBottlePlan
#
#
# def provision_workspace(plan: SmolmachinesBottlePlan, bottle: Bottle) -> None:
# """Copy host cwd contents to the planned guest workspace."""
# workspace = plan.workspace_plan
# if not (workspace.enabled and workspace.copy_contents):
# return
#
# guest_parent = workspace.guest_path.rsplit("/", 1)[0] or "/"
# guest_path_q = shlex.quote(workspace.guest_path)
# guest_parent_q = shlex.quote(guest_parent)
# owner_q = shlex.quote(workspace.owner)
# mode_q = shlex.quote(workspace.mode)
# info(f"copying {workspace.host_path} -> {bottle.name}:{workspace.guest_path}")
# bottle.exec(
# f"rm -rf {guest_path_q} && mkdir -p {guest_parent_q}",
# user="root",
# )
# bottle.cp_in(str(workspace.host_path), workspace.guest_path)
# bottle.exec(
# f"chown -R {owner_q} {guest_path_q} && chmod {mode_q} {guest_path_q}",
# user="root",
# )
@@ -18,8 +18,6 @@ from ...agent_provider import AgentProvisionPlan
from ...egress import EgressPlan
from ...supervise import SupervisePlan
from ...git_gate import GitGatePlan
# from ...workspace import workspace_plan as resolve_workspace_plan
from .bottle_plan import SmolmachinesBottlePlan
from .util import smolmachines_bundle_subnet, smolmachines_preflight
@@ -79,5 +77,4 @@ def resolve_plan(
egress_plan=egress_plan,
supervise_plan=supervise_plan,
agent_provision=agent_provision_plan,
# workspace_plan=workspace_plan,
)