feat(brain): a sandboxed language model session with an MCP channel to the box
The brain: a long-running Claude Code session, confined with bwrap to its workspace, that hears the box through a channel and works the TV with the box's ir and look capabilities. - brain/channel.js: MCP on stdio to the brain (reply, say, ir_listen, ir_send, look, report_problem), and the ask capability, behind a gate, to the box - brain/ask.js: the conversations between them; report.js: an issue on one repository, by a token that can do nothing else - brain/brain.service: the session in tmux, in bwrap: a read-only system, an empty home but for its workspace, keys, and claude - brain/instructions.md: how to work the TV; it imports household.md, who's who (an example, with no real people) - brain/Makefile: make install, attach, status - checks: brain-js (unit tests), brain (the package, put together) Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
521998b666
commit
84d2816f24
16 files changed
+927
-1
No files matched your search
@@ -40,9 +40,12 @@ The agent has two parts: the box within reach of the couch, with an IR emitter o
|
||||
|
||||
1. A press of the box's [button](box/body/box.py) starts a conversation, and a chime says it's your turn.
|
||||
2. The box records the clip and, with its [`speech` capability](#capabilities-and-confinement), has the speech server transcribe it (whisper.cpp).
|
||||
3. The box sends the text to the brain with its `ask` capability.
|
||||
3. The box sends the text with its `ask` capability: an [MCP channel](brain/channel.js) into the brain: a long-running, sandboxed language model session.
|
||||
4. To act, the brain uses its capabilities on the box: [`ir`](box/ir.js) (send a learned code through the Pico) or [`look`](box/look.js) (one still frame from a camera aimed at the TV; the box flashes its LED and taps a sound on every look, so there's no unannounced looking).
|
||||
5. With the same `speech` capability, the box has the speech server voice the brain's reply (piper), and plays the WAV.
|
||||
6. When the brain can't fix something, `report_problem` opens an issue on one repository, using a fine-grained token that can do nothing else, so the person who looks after the box gets mail.
|
||||
|
||||
The brain is Claude Code today, by way of its channels feature; the capabilities don't depend on it, and another harness that speaks MCP could take its place. Its [instructions](brain/instructions.md) say how to work the TV; a household file says who's who.
|
||||
|
||||
## Capabilities and confinement
|
||||
|
||||
|
||||
Reference in new issue
Block a user