Add persistent task workspace alpha
Start the first workspace milestone toward the task-oriented product without changing the existing one-shot vm_run/pyro run contract. Add a disk-backed task registry in the manager, auto-started task workspaces rooted at /workspace, repeated non-cleaning exec, and persisted command journals exposed through task create/exec/status/logs/delete across the CLI, Python SDK, and MCP server. Update the public contract, docs, examples, and version/catalog metadata for 2.1.0, and cover the new surface with manager, CLI, SDK, and MCP tests. Validation: UV_CACHE_DIR=.uv-cache make check and UV_CACHE_DIR=.uv-cache make dist-check.
This commit is contained in:
parent
6e16e74fd5
commit
58df176148
19 changed files with 1730 additions and 48 deletions
|
|
@ -7,7 +7,7 @@ CLI path in [install.md](install.md) or [first-run.md](first-run.md).
|
|||
|
||||
## Recommended Default
|
||||
|
||||
Use `vm_run` first.
|
||||
Use `vm_run` first for one-shot commands.
|
||||
|
||||
That keeps the model-facing contract small:
|
||||
|
||||
|
|
@ -16,7 +16,8 @@ That keeps the model-facing contract small:
|
|||
- one ephemeral VM
|
||||
- automatic cleanup
|
||||
|
||||
Only move to lifecycle tools when the agent truly needs VM state across multiple calls.
|
||||
Move to `task_*` only when the agent truly needs repeated commands in one workspace across
|
||||
multiple calls.
|
||||
|
||||
## OpenAI Responses API
|
||||
|
||||
|
|
@ -29,6 +30,7 @@ Best when:
|
|||
Recommended surface:
|
||||
|
||||
- `vm_run`
|
||||
- `task_create` + `task_exec` when the agent needs persistent workspace state
|
||||
|
||||
Canonical example:
|
||||
|
||||
|
|
@ -63,17 +65,20 @@ Best when:
|
|||
Recommended default:
|
||||
|
||||
- `Pyro.run_in_vm(...)`
|
||||
- `Pyro.create_task(...)` + `Pyro.exec_task(...)` when repeated workspace commands are required
|
||||
|
||||
Lifecycle note:
|
||||
|
||||
- `Pyro.exec_vm(...)` runs one command and auto-cleans the VM afterward
|
||||
- use `create_vm(...)` + `start_vm(...)` only when you need pre-exec inspection or status before
|
||||
that final exec
|
||||
- use `create_task(...)` when the agent needs repeated commands in one persistent `/workspace`
|
||||
|
||||
Examples:
|
||||
|
||||
- [examples/python_run.py](../examples/python_run.py)
|
||||
- [examples/python_lifecycle.py](../examples/python_lifecycle.py)
|
||||
- [examples/python_task.py](../examples/python_task.py)
|
||||
|
||||
## Agent Framework Wrappers
|
||||
|
||||
|
|
@ -91,8 +96,8 @@ Best when:
|
|||
Recommended pattern:
|
||||
|
||||
- keep the framework wrapper thin
|
||||
- map framework tool input directly onto `vm_run`
|
||||
- avoid exposing lifecycle tools unless the framework truly needs them
|
||||
- map one-shot framework tool input directly onto `vm_run`
|
||||
- expose `task_*` only when the framework truly needs repeated commands in one workspace
|
||||
|
||||
Concrete example:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue