feat: stream sessions and discover agent modes

This commit is contained in:
Nathan Flurry 2026-01-25 01:55:44 -08:00
parent e6b19ed2b6
commit 7b6d7ee917
8 changed files with 2763 additions and 218 deletions

View file

@ -1,3 +1,5 @@
# Open Questions
# Open Questions / Ambiguities
- None yet.
- OpenCode server HTTP paths and payloads may differ; current implementation assumes `POST /session`, `POST /session/{id}/prompt`, and `GET /event/subscribe` with JSON `data:` SSE frames.
- OpenCode question/permission reply endpoints are assumed as `POST /question/reply`, `/question/reject`, `/permission/reply` with `requestID` fields; confirm actual API shape.
- SSE events may not always include `sessionID`/`sessionId` fields; confirm if filtering should use a different field.

View file

@ -1,5 +1,7 @@
# Required Tests
- `test_agents_install_version_spawn` (installs, checks version, spawns prompt for Claude/Codex/OpenCode; Amp spawn runs only if `~/.amp/config.json` exists)
- daemon http api: smoke tests for each endpoint response shape/status
- cli: subcommands hit expected endpoints and handle error responses
- Session manager streams JSONL line-by-line for Claude/Codex/Amp and yields incremental events.
- `/sessions/{id}/messages` returns immediately while background ingestion populates `/events` and `/events/sse`.
- SSE subscription delivers live events after the initial offset batch.
- OpenCode server mode: create session, send prompt, and receive SSE events filtered to the session.
- OpenCode question/permission reply endpoints forward to server APIs.