From 460cd4456790092ea42a8848bb0ea517a1174fca Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 13:31:42 +0200 Subject: 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 --- AGENTS.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 45d6e31..e25ec1e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,9 +10,14 @@ canvas (`desktop/assistant/` in the quickshell repo, SUPER+Home). Spec: `docs/superpowers/specs/2026-10-16-text-daemon-design.md`. The voice version is the tag `voice-v1`: push-to-talk on the mic's mute -button, whisper large-v3-turbo, Kokoro. The sections from "Hardware" -through "Kokoro-82M" describe that version and its measurements. They are -kept because a return to voice starts from them. +button, whisper large-v3-turbo, Kokoro. These sections describe only that +version, and are kept because a return to voice starts from them: +"Hardware", "whisper.cpp", and under Findings "Models", "STT backends", +"Live mic with whisper-stream", both "Push-to-talk" sections, +"large-v3-turbo", "The loop", "Overlay", "Barge-in", "Wake word trial", +"TTS" and "Kokoro-82M". The rest still describes the daemon: the tool, +context-size and tool-call-history findings are rules `assistant.py` +applies today. Tools (2026-09-26): read-only shell-command TOML files in `~/.config/desktop-assistant/tools/`; `config.toml` there overrides the @@ -35,7 +40,9 @@ socket (ask) ──> llama-server (LLM, tools) ──> socket (think, token, too - **Concurrency:** one reader thread per client, one reply thread per question. One lock guards the conversation, the turn counter and the database. `say()` checks the turn under it before each emit, and stop - bumps the turn under it, so a stopped reply cannot emit after its `done`. + bumps the turn under it, so a stopped reply cannot send a token or tool + event after its `done`. A late `ctx` can still arrive: `ask()` emits it + outside the lock, and its numbers are true regardless. - **One daemon:** `serve()` probe-connects first and refuses to start over a socket that answers; `main()` removes the socket only if it served it. - **Commands** are type-checked before they run (ids must be `int`: SQLite would match `"1"` to row 1 while the Python comparison with the current id would not) and run under a try, so a failing command answers `error` instead of killing the client's reader. - **Client sockets** have a 2 s timeout, not non-blocking mode: a large -- cgit v1.2.3