Compare commits

..
8 Commits
Author SHA1 Message Date
dckc 7957d88ff9 fixup! feat(status): a status page, for the phone of whoever looks after the box
check / check (push) Canceled after 0s
install the app in /usr/local/lib/pdtv26-status, not in the state
directory: with DynamicUser, systemd makes /var/lib/pdtv26-status its
own symlink to /var/lib/private, and the service failed at
STATE_DIRECTORY ("File exists"). The package's check now catches a unit
that runs a program from its own StateDirectory.

Generated-by: Claude Opus 5.5
2026-12-02 18:38:37 -06:00
dckc f35da9b883 fixup! feat(status): a status page, for the phone of whoever looks after the box
check / check (push) Canceled after 0s
booting: a ready counts unless it's from before the latest outage
the server saw. The box's services restart together, so the button's
ready can come before the next check sees the IR port up; comparing
ready with when the port came up read that as booting, until the next
ready. A server restarted while the box stayed up did the same.

Generated-by: Claude Opus 5.5
2026-12-02 18:23:54 -06:00
dckc c335935e2d fixup! feat: install on any Linux with Nix and systemd 2026-12-02 17:41:19 -06:00
dckc db174fc610 fixup! feat(box): the box's NixOS system as a module, and lib.mkBox from a few names 2026-12-02 17:41:19 -06:00
dckc 4dfff77b95 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 17:17:30 -06:00
dckc 469d642902 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 17:16:02 -06:00
dckc 84d2816f24 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 16:29:33 -06:00
dckc 521998b666 feat(box): the box's NixOS system as a module, and lib.mkBox from a few names
check / check (push) Canceled after 0s
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 16:18:17 -06:00
2 changed files with 3 additions and 5 deletions

No files matched your search

+2 -4
View File
@@ -26,8 +26,6 @@ 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
@@ -70,9 +68,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 (or SPEECH) to the box's /etc/pdtv26/speech-key (root's alone)
## speech's key, from here to the box's /etc/pdtv26/speech-key (root's alone)
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'
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`. If speech runs on another host, add `SPEECH=` that host: its key comes over ssh.
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`.
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.