WIP: working-copies backend cleanup
- Remove clone_mode/branch from API responses and make DB columns nullable - Remove legacy clone-mode branches from create_tool_instance - Add WORKSPACE_PATH compose variable alongside REPO_PATH - Add workspace migration helpers in WorkspaceManager Remaining: POST /workspaces/:id/instances, frontend clone_mode cleanup, tests
This commit is contained in:
@@ -13,16 +13,24 @@ class CreateInstanceRequest(BaseModel):
|
||||
default=None, description="Optional display name for the instance"
|
||||
)
|
||||
workspace_id: str | None = Field(
|
||||
default=None, description="UUID of workspace to mount (replaces clone_mode)"
|
||||
default=None, description="UUID of workspace to mount"
|
||||
)
|
||||
clone_mode: str = Field(
|
||||
default="mount", description="Repository access mode: 'mount' or 'clone'"
|
||||
config_profile_id: str | None = Field(
|
||||
default=None, description="Optional config profile ID for launch"
|
||||
)
|
||||
branch: str | None = Field(
|
||||
default="main", description="Branch to clone (when clone_mode='clone')"
|
||||
ssh_key_ids: list[str] = Field(
|
||||
default_factory=list, description="SSH key IDs to mount into container ~/.ssh"
|
||||
)
|
||||
new_branch: str | None = Field(
|
||||
default=None, description="Create a new local branch after cloning"
|
||||
|
||||
|
||||
class CreateWorkspaceInstanceRequest(BaseModel):
|
||||
"""Request body for creating a tool instance directly on a workspace."""
|
||||
|
||||
model_config = {"extra": "ignore"}
|
||||
|
||||
tool_type_id: str = Field(description="UUID of the tool type to instantiate")
|
||||
display_name: str | None = Field(
|
||||
default=None, description="Optional display name for the instance"
|
||||
)
|
||||
config_profile_id: str | None = Field(
|
||||
default=None, description="Optional config profile ID for launch"
|
||||
|
||||
Reference in New Issue
Block a user