aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs
diff options
context:
space:
mode:
Diffstat (limited to 'docs/superpowers/specs')
-rw-r--r--docs/superpowers/specs/2026-10-16-text-daemon-design.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/superpowers/specs/2026-10-16-text-daemon-design.md b/docs/superpowers/specs/2026-10-16-text-daemon-design.md
index 40a73c8..58d0240 100644
--- a/docs/superpowers/specs/2026-10-16-text-daemon-design.md
+++ b/docs/superpowers/specs/2026-10-16-text-daemon-design.md
@@ -1,6 +1,6 @@
# Text assistant daemon: design
-Date: 2026-10-16. Status: approved in brainstorming, not implemented.
+Date: 2026-10-16. Status: implemented (2026-10-16), live-checked.
Supersedes `2026-09-26-overlay-design.md` (the voice overlay protocol).
## Goal
@@ -85,7 +85,7 @@ Inbound:
| `{"type":"search","q":"..."}` | answers `results` |
| `{"type":"delete","id":N}` | deletes N, answers `conversations`; deleting the current one acts as `new` |
-Ids in `open` and `delete` must be integers; a bad id, a non-string `text` or `q`, or a command that raises answers `error` (`bad id`, `bad text`, `bad query`, `<type> failed`) and leaves the conversation untouched.
+Ids in `open` and `delete` must be integers; a bad id, a non-string `text` or `q`, or a command that raises answers `error` (`bad id`, `bad text`, `bad query`, `<type> failed`) and leaves the conversation untouched. Other errors: `bad command` (not JSON or no `type`), `unknown command <type>`, `no such conversation`, `line too long` (over 1 MB without a newline), and llama-server's own message for an HTTP error or an error chunk. An `ask` with empty text is ignored.
An `ask` while a reply is streaming stops the old reply first. An unknown
or malformed line is logged and answered with `error`; it never closes the
@@ -141,7 +141,7 @@ delete trigger cleans the index.
question.
- One `turns` row is inserted per `done`, and `updated` is bumped. A crash
loses at most the reply in flight.
-- `open` loads the last 10 turns' `messages` as the model history and all
+- `open` loads every turn's `messages` as the model history (a reply sends the last 10) and all
turns' `user`, `reply`, `tools` for the canvas. Tool results come back as
the stored placeholder.
- `search` wraps the user's text as an FTS5 phrase (double quotes doubled inside) with a prefix star, so FTS syntax in the query cannot break or widen it and a half-typed word still matches. Snippets mark matches with `**`. Results are
@@ -161,7 +161,7 @@ tail, and exits 1 when the daemon is down.
`python3 assistant.py --test`, extended:
-- the existing socketpair check, now in both directions;
+- a real temporary Unix socket, in both directions;
- a fake LLM stream (a local HTTP server on an ephemeral port) that sends
reasoning, content and a tool call, checking the `think`, `token`,
`tool`, `done` order on the socket;