feat: the brain can change the box's speaker volume

"Speak up" and "too loud" now work: the reply tool takes louder, in
percentage points, and the button service nudges the speaker's softvol
before it speaks that reply, so the person hears the change at once.
The box keeps the level between 10% and 80% (body/mixer.py).

No new port or key: the volume changes only with a reply, in a
conversation someone is listening to.

Generated-by: Claude Opus 5.5
This commit is contained in:
dckc committed 2026-12-03 16:44:54 -06:00
1 parent cf503ac247
commit 5191ee9931
11 files changed
+146 -21

No files matched your search

+3 -1
View File
@@ -3,6 +3,7 @@
* @file ask-client: the box's side of a conversation with the brain, through its ask capability.
* usage: ask-client.js URL CONVERSATION < question.txt
* prints JSON lines: {"say": "..."} for each thing the brain says meanwhile,
* then, if the brain changed the volume, {"louder": N} (percentage points; negative is softer),
* then {"reply": "...", "end": false}; end is true when the brain ends the conversation.
* usage: ask-client.js URL CONVERSATION end
* tells the brain the conversation is over.
@@ -45,7 +46,8 @@ const main = async ({
}
const question = (await text(stdin)).trim();
// Cap'n Web passes the function by reference: the brain calls it back over this session.
const { text: reply, end } = await asker.ask(question, conversation, (/** @type {string} */ said) => { line({ say: said }); });
const { text: reply, end, louder } = await asker.ask(question, conversation, (/** @type {string} */ said) => { line({ say: said }); });
if (louder) line({ louder });
line({ reply, end });
} finally {
gate[Symbol.dispose]();