aboutsummaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-10-16-text-daemon-design.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-16 13:31:42 +0200
committerDanilo M. <danix@danix.xyz>2026-10-16 13:31:42 +0200
commit460cd4456790092ea42a8848bb0ea517a1174fca (patch)
tree41d91debdce4ff52d1334f56091dfe812b009f85 /docs/superpowers/specs/2026-10-16-text-daemon-design.md
parent0185271050ff66d7ce14aa83a990035fc62e73e4 (diff)
downloaddesktop-assistant-460cd4456790092ea42a8848bb0ea517a1174fca.tar.gz
desktop-assistant-460cd4456790092ea42a8848bb0ea517a1174fca.zip
Final review: startup probe, error messages, refusal exit, docs
A startup probe that failed with anything but OSError (llama-server not in router mode, an empty model list) crashed the daemon at boot, against its own comment; it is caught like the per-request failures now. llama-server's reasons reach the client: an HTTP error carries its body and an error chunk mid-stream its message, where the client used to see 'choices'. A daemon that refuses to start, or fails before serving, exits 1 instead of 0. assistant.sh no longer mistakes a --test run for the daemon. AGENTS.md said every section from Hardware to Kokoro was voice-only, which included findings the daemon still applies; it now names the voice ones. It also claimed a stopped reply emits nothing after done, while a late ctx can. The spec lists every error message, the example config no longer shows a non-default temperature as the default, and the updates tool stops telling the model not to read lists aloud. The spec is marked implemented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/superpowers/specs/2026-10-16-text-daemon-design.md')
-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;