Sandbox¶
sandbox
¶
Extended sandbox lifecycle — creation, agent execution, listing, and cleanup.
PreflightError
¶
generate_run_id
¶
Generate a run ID: YYYYMMDD-XXXX (e.g. 20260315-a3f2).
create_sandbox
¶
Create ~/.crux/sandbox/<run-id>/ with scoped .mcp.json and workspace.
Source code in src/crux_cli/sandbox.py
write_run_meta
¶
Write initial run-meta.json.
Source code in src/crux_cli/sandbox.py
update_run_meta
¶
Merge kwargs into the existing run-meta.json.
Source code in src/crux_cli/sandbox.py
run_agent
¶
Invoke claude --print <task> --mcp-config <path> as a subprocess.
Source code in src/crux_cli/sandbox.py
list_runs
¶
Return list of run metadata dicts, sorted by start time (newest first).
Source code in src/crux_cli/sandbox.py
clean_runs
¶
Remove completed sandboxes.
Source code in src/crux_cli/sandbox.py
load_run_manifest
¶
Load and validate a run manifest JSON file.