Compare commits

..
4 Commits
Author SHA1 Message Date
dckc f3f2c8966e feat: install on any Linux with Nix and systemd
check / check (push) Canceled after 0s
Not just the first household's machines: a home server of your own
runs speech, the status page, and the brain, and a household flake of
your own makes the box, from a few names.

- speech: sudo make install: the server, its models, its key, and its
  systemd unit, answering only the private network
- box: make keys, from the home server: each connection's key piped
  to both its ends, never on disk but where it's used
- docs/setup.md: the setup guide, from the household repository to
  teaching it the remotes
- README: the home server; Make your own

Generated-by: Claude Opus 5.5
2026-12-02 18:57:21 -06:00
dckc 9b85deca8f feat(status): a status page, for the phone of whoever looks after the box
Is the box up, and speech, and the brain; how many conversations,
turns, IR presses, and looks, today and all time. Counts and times
only: no transcripts.

- status/status.js: what the events and checks add up to, and the page
- status/status-server.js: the page, the box's events and heartbeat,
  and a TCP check of each part every 30 s; events kept in a file
- status/pdtv26-status.service and Makefile: sudo make install on the
  home server, answering only the private network
- checks: status (its tests)

Generated-by: Claude Opus 5.5
2026-12-02 18:57:08 -06:00
dckc 5cbea49349 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
2026-12-02 18:57:08 -06:00
dckc 190600a696 feat(box): the box's NixOS system as a module, and lib.mkBox from a few names
The box within reach of the couch: a Raspberry Pi 3B with the AIY Voice
HAT, from the first household's configuration, made generic.

- box/body: the button service, in Python: press and talk, turns by
  voice, a press interrupts; the look signal
- box/*.js: the ir and look capabilities, behind gates, for the brain;
  the ask client, the box's side of a conversation
- box/module.nix: the services, each confined to the devices and
  addresses it needs; the private network as an option (a tailnet by
  default); the Pico found by its USB IDs, as /dev/pdtv26-ir
- box/voicehat.nix: the Voice HAT's device tree overlay and ALSA setup
- lib.mkBox: a box's whole system from its name, the home server's,
  the Wi-Fi network's, and who looks after it
- checks: box-js, box-py (doctests and pyflakes), and box-system (an
  example box's system evaluates)

Generated-by: Claude Opus 5.5
2026-12-02 18:57:03 -06:00
2 changed files with 5 additions and 3 deletions

No files matched your search

+4 -2
View File
@@ -26,6 +26,8 @@ SECS = 6
BRAIN_KEYS = $(HOME)/.config/pdtv26-brain
CAMERA_URL = $(HOME)/.config/pdtv26-camera/rtsp-url
SPEECH_KEY = /etc/pdtv26-speech/speech-key
# The speech server's host, if it's not this one: its key comes over ssh.
SPEECH =
ON_BOX = ssh $(ADMIN)@$(HOST)
.PHONY: help test card flash wifi-secret say volume record keys speech-key ask-key ir-key look-key rtsp-url
@@ -68,9 +70,9 @@ record:
## every key, at both ends of its connection, by pipe: never on disk but where it's used
keys: speech-key ask-key ir-key look-key rtsp-url
## speech's key, from here to the box's /etc/pdtv26/speech-key (root's alone)
## speech's key, from here (or SPEECH) to the box's /etc/pdtv26/speech-key (root's alone)
speech-key:
sudo cat $(SPEECH_KEY) | $(ON_BOX) 'sudo install -D -m 600 /dev/stdin /etc/pdtv26/speech-key && sudo wc -c /etc/pdtv26/speech-key'
$(if $(SPEECH),ssh $(SPEECH) )sudo cat $(SPEECH_KEY) | $(ON_BOX) 'sudo install -D -m 600 /dev/stdin /etc/pdtv26/speech-key && sudo wc -c /etc/pdtv26/speech-key'
## the brain's ask key (made by ../brain if there's none), from here to the box's /etc/pdtv26/ask-key
ask-key:
+1 -1
View File
@@ -57,7 +57,7 @@ On the box and the home server: `tailscale up`, or whatever private network you
On the home server, as the user the brain will run as, in pdtv26's `box/`:
1. `make keys BOX=pimote ADMIN=pat`: one key per connection, piped to both its ends; the box's ir and look keys come back for the brain. Put the camera's RTSP URL in `~/.config/pdtv26-camera/rtsp-url` first, or skip `rtsp-url`.
1. `make keys BOX=pimote ADMIN=pat`: one key per connection, piped to both its ends; the box's ir and look keys come back for the brain. Put the camera's RTSP URL in `~/.config/pdtv26-camera/rtsp-url` first, or skip `rtsp-url`. If speech runs on another host, add `SPEECH=` that host: its key comes over ssh.
2. Make a fine-grained GitHub token for one repository, Issues read/write only, for problem reports, and save it as `~/.config/pdtv26-brain/report-token`.
3. `make -C ../brain install BOX=pimote REPO=you/your-repo ASSIGNEE=you`, then `make -C ../brain attach` once: log in, trust the folder, and approve the box's channel.