docs: refer to session store

This commit is contained in:
Peter Steinberger
2025-12-14 00:50:12 +00:00
parent a80cd26341
commit 128df57005
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ Context: web chat currently lives in a WKWebView that loads the pi-web bundle. S
## Target state
- Gateway WS adds methods:
- `chat.history { sessionKey }``{ sessionKey, messages[], thinkingLevel }` (reads the existing JSONL + sessions.json).
- `chat.history { sessionKey }``{ sessionKey, messages[], thinkingLevel }` (reads the existing JSONL + session store).
- `chat.send { sessionKey, message, attachments?, thinking?, deliver?, timeoutMs<=30000, idempotencyKey }``res { runId, status:"accepted" }` or `res ok:false` on validation/timeout.
- Gateway WS emits `chat` events `{ runId, sessionKey, seq, state:"delta"|"final"|"error", message?, errorMessage?, usage?, stopReason? }`. Streaming is optional; minimum is a single `state:"final"` per send.
- Client consumes only WS: bootstrap via `chat.history`, send via `chat.send`, live updates via `chat` events. No file watchers.