add sandbox runtime control endpoints
This commit is contained in:
parent
0ca0bac9bf
commit
1b38bcfeab
17 changed files with 1408 additions and 119 deletions
20
docs/009-sandbox-http-control-and-runtime-params.md
Normal file
20
docs/009-sandbox-http-control-and-runtime-params.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 009 Sandbox HTTP control and runtime params
|
||||
|
||||
## Context
|
||||
- Sandbox API must support explicit delete and richer create params
|
||||
- Clients need an internal Docker-network endpoint for agent traffic
|
||||
- MVP accepts trusted internal callers and does not enforce auth yet
|
||||
|
||||
## Decision
|
||||
- `POST /api/v1/create` accepts `chat_id`, `agent_id`, and absolute `volume_host_path`
|
||||
- `AGENT_ID` is passed to the sandbox container environment
|
||||
- The request volume is bind-mounted read-write at configured `volume_mount_path`
|
||||
- Sandbox containers join configured Docker network `network_name`
|
||||
- Create returns endpoint `ip:agent_service_port` from that Docker network
|
||||
- Reuse is allowed only when `agent_id` and `volume_host_path` match
|
||||
- Mismatch returns sandbox conflict without starting a new container
|
||||
- `DELETE /api/v1/sandboxes/{chat_id}` deletes the active sandbox without auth
|
||||
|
||||
## Consequences
|
||||
- Absolute host path is accepted as an MVP risk
|
||||
- External clients must run in or join the configured Docker network
|
||||
Loading…
Add table
Add a link
Reference in a new issue