chore: sync workspace changes

This commit is contained in:
Nathan Flurry 2026-01-26 22:29:10 -08:00
parent 4b5b390b7f
commit 4083baa1c1
55 changed files with 2431 additions and 840 deletions

View file

@ -19,8 +19,9 @@ description: "Supported agents, install methods, and streaming formats."
## Capability notes
- **Questions / permissions**: OpenCode natively supports these workflows. Claude plan approval is normalized into a question event.
- **Streaming**: all agents stream events; OpenCode uses SSE, Codex uses JSON-RPC over stdio, others use JSONL.
- **Questions / permissions**: OpenCode natively supports these workflows. Claude plan approval is normalized into a question event (tests do not currently exercise Claude question/permission flows).
- **Streaming**: all agents stream events; OpenCode uses SSE, Codex uses JSON-RPC over stdio, others use JSONL. Codex is currently normalized to thread/turn starts plus user/assistant completed items (deltas and tool/reasoning items are not emitted yet).
- **User messages**: Claude CLI output does not include explicit user-message events in our snapshots, so only assistant messages are surfaced for Claude today.
- **Files and images**: normalized via `UniversalMessagePart` with `File` and `Image` parts.
See [Universal API](/universal-api) for feature coverage details.

View file

@ -3,12 +3,12 @@ title: "CLI"
description: "CLI reference and server flags."
---
The `sandbox-agent` CLI mirrors the HTTP API so you can script everything without writing client code.
The `sandbox-daemon` CLI mirrors the HTTP API so you can script everything without writing client code.
## Server flags
```bash
sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
sandbox-daemon server --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
```
- `--token`: global token for all requests.
@ -22,7 +22,7 @@ sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
<summary><strong>agents list</strong></summary>
```bash
sandbox-agent agents list --endpoint http://127.0.0.1:2468
sandbox-daemon agents list --endpoint http://127.0.0.1:2468
```
</details>
@ -30,7 +30,7 @@ sandbox-agent agents list --endpoint http://127.0.0.1:2468
<summary><strong>agents install</strong></summary>
```bash
sandbox-agent agents install claude --reinstall --endpoint http://127.0.0.1:2468
sandbox-daemon agents install claude --reinstall --endpoint http://127.0.0.1:2468
```
</details>
@ -38,7 +38,7 @@ sandbox-agent agents install claude --reinstall --endpoint http://127.0.0.1:2468
<summary><strong>agents modes</strong></summary>
```bash
sandbox-agent agents modes claude --endpoint http://127.0.0.1:2468
sandbox-daemon agents modes claude --endpoint http://127.0.0.1:2468
```
</details>
@ -48,7 +48,7 @@ sandbox-agent agents modes claude --endpoint http://127.0.0.1:2468
<summary><strong>sessions create</strong></summary>
```bash
sandbox-agent sessions create my-session \
sandbox-daemon sessions create my-session \
--agent claude \
--agent-mode build \
--permission-mode default \
@ -60,7 +60,7 @@ sandbox-agent sessions create my-session \
<summary><strong>sessions send-message</strong></summary>
```bash
sandbox-agent sessions send-message my-session \
sandbox-daemon sessions send-message my-session \
--message "Summarize the repository" \
--endpoint http://127.0.0.1:2468
```
@ -70,7 +70,7 @@ sandbox-agent sessions send-message my-session \
<summary><strong>sessions events</strong></summary>
```bash
sandbox-agent sessions events my-session --offset 0 --limit 50 --endpoint http://127.0.0.1:2468
sandbox-daemon sessions events my-session --offset 0 --limit 50 --endpoint http://127.0.0.1:2468
```
</details>
@ -78,7 +78,7 @@ sandbox-agent sessions events my-session --offset 0 --limit 50 --endpoint http:/
<summary><strong>sessions events-sse</strong></summary>
```bash
sandbox-agent sessions events-sse my-session --offset 0 --endpoint http://127.0.0.1:2468
sandbox-daemon sessions events-sse my-session --offset 0 --endpoint http://127.0.0.1:2468
```
</details>
@ -86,7 +86,7 @@ sandbox-agent sessions events-sse my-session --offset 0 --endpoint http://127.0.
<summary><strong>sessions reply-question</strong></summary>
```bash
sandbox-agent sessions reply-question my-session QUESTION_ID \
sandbox-daemon sessions reply-question my-session QUESTION_ID \
--answers "yes" \
--endpoint http://127.0.0.1:2468
```
@ -96,7 +96,7 @@ sandbox-agent sessions reply-question my-session QUESTION_ID \
<summary><strong>sessions reject-question</strong></summary>
```bash
sandbox-agent sessions reject-question my-session QUESTION_ID --endpoint http://127.0.0.1:2468
sandbox-daemon sessions reject-question my-session QUESTION_ID --endpoint http://127.0.0.1:2468
```
</details>
@ -104,7 +104,7 @@ sandbox-agent sessions reject-question my-session QUESTION_ID --endpoint http://
<summary><strong>sessions reply-permission</strong></summary>
```bash
sandbox-agent sessions reply-permission my-session PERMISSION_ID \
sandbox-daemon sessions reply-permission my-session PERMISSION_ID \
--reply once \
--endpoint http://127.0.0.1:2468
```

View file

@ -12,7 +12,7 @@ description: "Deploy the daemon in Cloudflare Sandboxes."
```bash
export SANDBOX_TOKEN="..."
cargo run -p sandbox-agent -- \
cargo run -p sandbox-agent -- server \
--token "$SANDBOX_TOKEN" \
--host 0.0.0.0 \
--port 2468

View file

@ -12,7 +12,7 @@ description: "Run the daemon in a Daytona workspace."
```bash
export SANDBOX_TOKEN="..."
cargo run -p sandbox-agent -- \
cargo run -p sandbox-agent -- server \
--token "$SANDBOX_TOKEN" \
--host 0.0.0.0 \
--port 2468

View file

@ -21,7 +21,7 @@ The binary will be written to `./artifacts/sandbox-agent-x86_64-unknown-linux-mu
docker run --rm -p 2468:2468 \
-v "$PWD/artifacts:/artifacts" \
debian:bookworm-slim \
/artifacts/sandbox-agent-x86_64-unknown-linux-musl --token "$SANDBOX_TOKEN" --host 0.0.0.0 --port 2468
/artifacts/sandbox-agent-x86_64-unknown-linux-musl server --token "$SANDBOX_TOKEN" --host 0.0.0.0 --port 2468
```
You can now access the API at `http://localhost:2468`.

View file

@ -16,7 +16,7 @@ export SANDBOX_TOKEN="..."
# Install sandbox-agent binary (or build from source)
# TODO: replace with release download once published
cargo run -p sandbox-agent -- \
cargo run -p sandbox-agent -- server \
--token "$SANDBOX_TOKEN" \
--host 0.0.0.0 \
--port 2468

View file

@ -12,7 +12,7 @@ description: "Run the daemon inside Vercel Sandboxes."
```bash
export SANDBOX_TOKEN="..."
cargo run -p sandbox-agent -- \
cargo run -p sandbox-agent -- server \
--token "$SANDBOX_TOKEN" \
--host 0.0.0.0 \
--port 2468

View file

@ -45,6 +45,10 @@
"http-api",
"typescript-sdk"
]
},
{
"group": "API",
"openapi": "openapi.json"
}
]
},

View file

@ -17,4 +17,6 @@ The UI expects:
- Endpoint (e.g. `http://127.0.0.1:2468`)
- Optional token
If you see CORS errors, enable CORS on the daemon with `--cors-allow-origin` and related flags.
When running the daemon, the inspector is also served automatically at `http://127.0.0.1:2468/ui`.
If you see CORS errors, enable CORS on the daemon with `sandbox-daemon server --cors-allow-origin` and related flags.

View file

@ -18,7 +18,7 @@ Sandbox Agent SDK is a universal API and daemon for running coding agents inside
Run the daemon locally:
```bash
sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
sandbox-daemon server --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
```
Send a message:

1536
docs/openapi.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -8,13 +8,19 @@ description: "Start the daemon and send your first message."
Use the installed binary, or `cargo run` in development.
```bash
sandbox-agent --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
sandbox-daemon server --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
```
If you want to run without auth (local dev only):
```bash
sandbox-agent --no-token --host 127.0.0.1 --port 2468
sandbox-daemon server --no-token --host 127.0.0.1 --port 2468
```
If you're running from source instead of the installed CLI:
```bash
cargo run -p sandbox-agent -- server --token "$SANDBOX_TOKEN" --host 127.0.0.1 --port 2468
```
### CORS (frontend usage)
@ -22,7 +28,7 @@ sandbox-agent --no-token --host 127.0.0.1 --port 2468
If you are calling the daemon from a browser, enable CORS explicitly:
```bash
sandbox-agent \
sandbox-daemon server \
--token "$SANDBOX_TOKEN" \
--cors-allow-origin "http://localhost:5173" \
--cors-allow-method "GET" \
@ -69,7 +75,7 @@ curl "http://127.0.0.1:2468/v1/sessions/my-session/events/sse?offset=0" \
The CLI mirrors the HTTP API:
```bash
sandbox-agent sessions create my-session --agent claude --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
sandbox-daemon sessions create my-session --agent claude --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
sandbox-agent sessions send-message my-session --message "Hello" --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
sandbox-daemon sessions send-message my-session --message "Hello" --endpoint http://127.0.0.1:2468 --token "$SANDBOX_TOKEN"
```

View file

@ -13,7 +13,7 @@ pnpm --filter sandbox-agent generate
This runs:
- `cargo run -p sandbox-agent-openapi-gen` to emit OpenAPI JSON
- `cargo run -p sandbox-agent-openapi-gen -- --out docs/openapi.json` to emit OpenAPI JSON
- `openapi-typescript` to generate types
## Usage