Skip to content

Commit 2072fde

Browse files
adrienlacombeclaude
andcommitted
docs: fix inaccuracies found auditing docs against the code
Audited all repository docs against the v1.3.0 source and corrected claims that no longer match the code: - MISSION_API: command_source/trigger JSON shapes are internally tagged ({"type": ...}); inline uses `content` not `command`; remove the non-existent GET /api/control/tree row; SSE status uses `waiting_for_tool`; AutomationExecution exposes `variables_used`/`error` (not `started_at`/`result_message`). - WORKSPACE_API/WORKSPACES: drop the non-existent `tools` field and `stdin` exec input; init log is /var/log/sandboxed-init.log; helper scripts are sandboxed-network-up / sandboxed-tailscale-up. - BACKEND_API: update-config response message no longer mentions a restart. - install-docker: compose service is `sandboxed-sh`, volume `sandboxed-data`; list all five MCP binaries; desktop stack is Wayland (Sway), not X11. - install-native: remove the non-existent in-repo residential.json template path; fix helper script names; dev server runs on :3001. - DESKTOP_SETUP: env var is DESKTOP_DISPLAY (not DESKTOP_DISPLAY_START). - dashboard README: JWT stored in localStorage; `bun dev` already serves :3001. - android README: minSdk is 33 (Android 13). - PROVIDER_HEALTH_CHECK: Z.AI health model is glm-4.7-flash. - STREAMING/HERMES/mobile-app-reliability: src/api/control.rs is now src/api/control/mod.rs. - ASK_ASSISTANT_DESIGN: ask tool loop cap is 10 iterations. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e996629 commit 2072fde

15 files changed

Lines changed: 54 additions & 60 deletions

ASK_ASSISTANT_DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Store: `src/api/ask/store.rs` (`AskStore`). Global singleton via tokio
8686
`MetadataLlmConfig`; forwards `reasoning_effort` so reasoning models return
8787
visible content).
8888
- `mod.rs``run_ask_turn`: persist user msg → seed system prompt (recent
89-
events + summary) → tool loop (≤6 iterations) → persist assistant answer.
89+
events + summary) → tool loop (≤10 iterations) → persist assistant answer.
9090
- `http.rs` — handlers.
9191

9292
Tools (read-on-demand so the 128K context ceiling never bites):

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ systemd-nspawn container isolation.
3030
| **Platform** | Any OS with Docker | Ubuntu 24.04 LTS |
3131
| **Setup time** | ~5 minutes | ~30 minutes |
3232
| **Container workspaces** | Yes (with `privileged: true`) | Yes (native systemd-nspawn) |
33-
| **Desktop automation** | Yes (headless Xvfb) | Yes (native X11 or Xvfb) |
33+
| **Desktop automation** | Yes (headless Wayland/Sway) | Yes (native X11 or Xvfb) |
3434
| **Performance** | Good (slight overhead on macOS) | Best (native Linux) |
3535
| **Updates** | `docker compose build && up -d` | Git pull + cargo build, or one-click from dashboard |

PROVIDER_HEALTH_CHECK.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ curl -X POST https://YOUR-BACKEND/api/ai/providers/cerebras/health
5959

6060
The health check performs actual API validation for:
6161
- **Cerebras** - Tests with `llama-3.1-8b` model
62-
- **Z.AI** - Tests with `glm-4-flash` model
62+
- **Z.AI** - Tests with `glm-4.7-flash` model
6363
- **DeepInfra** - Tests with `Meta-Llama-3.1-8B-Instruct` model
6464

6565
For OAuth-based providers (Anthropic, OpenAI, Google), it verifies credentials exist without making test API calls.

android_dashboard/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Android app is published on Zapstore:
88

99
https://zapstore.dev/apps/sh.sandboxed.dashboard
1010

11-
## What's in v0.2.0
11+
## What's in the app
1212

1313
### Bottom-tab screens
1414

@@ -43,7 +43,7 @@ https://zapstore.dev/apps/sh.sandboxed.dashboard
4343
| --- | --- |
4444
| Language | Kotlin 2.0.21 |
4545
| Build | AGP 8.9.1, Gradle 8.11.1 |
46-
| SDK | `compileSdk` 36, `targetSdk` 36, `minSdk` 26 (Android 8.0) |
46+
| SDK | `compileSdk` 36, `targetSdk` 36, `minSdk` 33 (Android 13) |
4747
| UI | Jetpack Compose (BOM 2024.12.01), Material 3 with `material-icons-extended` |
4848
| Navigation | `androidx.navigation:navigation-compose` 2.9.8 |
4949
| State | ViewModel + StateFlow, Compose `collectAsState` |

backend/STREAMING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,4 @@ canonical row rather than the op log.
203203
reference implementation of the continuation rule.
204204
- `src/api/control_metrics.rs` records p50/p99 SSE chunk sizes so we
205205
can spot regressions in the streaming contract.
206-
- `src/api/control.rs::stream()` is the server-side mission filter.
206+
- `src/api/control/mod.rs::stream()` is the server-side mission filter.

dashboard/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ Developer-focused UI for monitoring and controlling the Sandboxed.sh backend.
1111
cd dashboard
1212
bun install
1313

14-
# If the backend is on :3000, run the dashboard on :3001 to avoid port conflicts.
15-
PORT=3001 bun dev
14+
# The dev server runs on :3001 (backend stays on :3000, so no port conflict).
15+
bun dev
1616
```
1717

1818
Configure the backend URL via:
1919
- `NEXT_PUBLIC_API_URL` (defaults to `http://127.0.0.1:3000`)
2020

2121
## Auth
2222

23-
If the backend reports `auth_required=true` from `GET /api/health`, the dashboard will prompt for credentials and store a JWT in `sessionStorage`. In multi-user mode (`auth_mode=multi_user`), it asks for username + password.
23+
If the backend reports `auth_required=true` from `GET /api/health`, the dashboard will prompt for credentials and store a JWT in `localStorage`. In multi-user mode (`auth_mode=multi_user`), it asks for username + password.

docs/BACKEND_API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ vault. Grok accepts `cli_path` to override the CLI binary path.
9191
```json
9292
{
9393
"ok": true,
94-
"message": "Backend configuration updated. Restart Sandboxed.sh to apply runtime changes."
94+
"message": "Backend configuration updated."
9595
}
9696
```

docs/DESKTOP_SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ DESKTOP_ENABLED=true
109109
# Xvfb resolution (width x height)
110110
DESKTOP_RESOLUTION=1920x1080
111111

112-
# Starting display number (will increment for concurrent sessions)
113-
DESKTOP_DISPLAY_START=99
112+
# X display to use for desktop automation
113+
DESKTOP_DISPLAY=:99
114114
```
115115

116116
## Manual Testing

docs/HERMES_ASSISTANT_MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ assistant stack:
1212
- `src/api/telegram.rs` owns Telegram webhook routing, trigger filtering,
1313
per-chat mission creation, file download, streaming edits, Paloma commands,
1414
proactive mission cards, scheduled messages, workflow relays, and memory.
15-
- `src/api/control.rs` exposes the Telegram CRUD endpoints and routes webhook
15+
- `src/api/control/mod.rs` exposes the Telegram CRUD endpoints and routes webhook
1616
updates into `ControlCommand::UserMessage`.
1717
- `dashboard/src/app/assistant/page.tsx` is the new top-level UI surface,
1818
while `dashboard/src/app/settings/telegram/page.tsx` redirects for

docs/MISSION_API.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ GET /api/control/stream
181181
Server-Sent Events stream for real-time updates. Events have `event:` and `data:` fields.
182182

183183
**Event types**:
184-
- `status` — control state changed (`idle`, `running`, `tool_waiting`)
184+
- `status` — control state changed (`idle`, `running`, `waiting_for_tool`)
185185
- `user_message` — user message received
186186
- `assistant_message` — agent response complete
187187
- `thinking` — agent reasoning (streaming)
@@ -208,7 +208,6 @@ data: {"id":"uuid","content":"Done!","success":true,"cost_cents":5,"model":"clau
208208
| `/api/control/missions/:id/tree` | GET | Get agent tree for mission |
209209
| `/api/control/missions/current` | GET | Get current active mission |
210210
| `/api/control/missions/:id/resume` | POST | Resume interrupted mission |
211-
| `/api/control/tree` | GET | Get live agent tree |
212211
| `/api/control/progress` | GET | Get execution progress |
213212

214213
## Automations
@@ -240,8 +239,8 @@ POST /api/control/missions/:id/automations
240239
**Body**:
241240
```json
242241
{
243-
"command_source": {"library": {"name": "my-command"}},
244-
"trigger": {"interval": {"seconds": 300}},
242+
"command_source": {"type": "library", "name": "my-command"},
243+
"trigger": {"type": "interval", "seconds": 300},
245244
"variables": {"key": "value"},
246245
"retry_config": {
247246
"max_retries": 3,
@@ -252,14 +251,19 @@ POST /api/control/missions/:id/automations
252251
}
253252
```
254253

254+
Both `command_source` and `trigger` are internally tagged: a `"type"`
255+
discriminator selects the variant and its fields sit alongside it.
256+
255257
**Trigger types**:
256-
- `{"interval": {"seconds": 300}}` — Run every N seconds
257-
- `{"webhook": {"config": {"webhook_id": "optional-uuid"}}}` — Trigger via webhook
258-
- `"agent_finished"` — Trigger after each agent turn completes
258+
- `{"type": "interval", "seconds": 300}` — Run every N seconds
259+
- `{"type": "cron", "expression": "0 8 * * *", "timezone": "Europe/Paris"}` — Cron schedule (timezone defaults to UTC)
260+
- `{"type": "webhook", "config": {"webhook_id": "optional-uuid"}}` — Trigger via webhook
261+
- `{"type": "agent_finished"}` — Trigger after each agent turn completes
259262

260263
**Command sources**:
261-
- `{"library": {"name": "command-name"}}` — Use a library command
262-
- `{"inline": {"command": "echo hello"}}` — Inline shell command
264+
- `{"type": "library", "name": "command-name"}` — Use a library command
265+
- `{"type": "local_file", "path": "scripts/run.sh"}` — Command from a file in the mission workspace
266+
- `{"type": "inline", "content": "echo hello"}` — Inline shell command
263267

264268
**Response**: `Automation` object.
265269

@@ -280,8 +284,8 @@ PATCH /api/control/automations/:id
280284
**Body** (all fields optional):
281285
```json
282286
{
283-
"command_source": {"library": {"name": "new-command"}},
284-
"trigger": {"interval": {"seconds": 600}},
287+
"command_source": {"type": "library", "name": "new-command"},
288+
"trigger": {"type": "interval", "seconds": 600},
285289
"variables": {"key": "new-value"},
286290
"retry_config": {"max_retries": 5},
287291
"active": false
@@ -320,8 +324,8 @@ GET /api/control/missions/:id/automation-executions
320324
{
321325
"id": "uuid",
322326
"mission_id": "uuid",
323-
"command_source": {"library": {"name": "my-command"}},
324-
"trigger": {"interval": {"seconds": 300}},
327+
"command_source": {"type": "library", "name": "my-command"},
328+
"trigger": {"type": "interval", "seconds": 300},
325329
"variables": {"key": "value"},
326330
"active": true,
327331
"created_at": "2025-01-13T10:00:00Z",
@@ -345,9 +349,9 @@ GET /api/control/missions/:id/automation-executions
345349
"trigger_source": "interval",
346350
"status": "success",
347351
"webhook_payload": null,
348-
"started_at": "2025-01-13T10:05:00Z",
352+
"variables_used": {"key": "value"},
349353
"completed_at": "2025-01-13T10:05:05Z",
350-
"result_message": "Command completed successfully",
354+
"error": null,
351355
"retry_count": 0
352356
}
353357
```

0 commit comments

Comments
 (0)