Commit Graph
6 Commits
Author SHA1 Message Date
dckc f50c871521 feat: mute the TV while the box listens, if the brain turns that on
check / check (push) Waiting to run
whisper hears people better without the show behind them. The brain
sets a mute code (and an unmute code, if not the same) with
mute_while_listening on its ir capability, or turns it off; ir-server
keeps the setting in its state directory.

Mute is often a toggle, and the camera can't reliably tell whether the
sound is off, so the box senses nothing: the setting is the brain's
to turn on or off.

The button service holds a connection to ir-server's conversation
socket for each conversation: ir-server mutes when it opens and
unmutes, with the same codes, when it closes. The socket's group is
the button's alone, and the button still can't send any code.

Generated-by: Claude Opus 5.5
2026-12-03 16:49:58 -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
dckc 2e7156dc36 feat(speech): the speech capability over Cap'n Web, behind a gate
check / check (push) Canceled after 0s
The agent's ears and voice: a server on the home server transcribes
a clip (sox, whisper.cpp) and speaks text (piper), one job at a time.
A gate hands the capability to whoever presents its key; the key comes
from systemd's credentials, not argv.

make test runs the unit tests in Nix's sandbox; make smoke starts a
real server on localhost, speaks a phrase, and hears it back.

Generated-by: Claude Opus 5.5
2026-12-02 15:52:55 -06:00
dckc 4a42c896db ci: nix flake check on every push
Every check in flake.nix, starting with ir-pico's doctests, in the
nixos/nix image, pinned by digest. The checkout is plain git, since
actions/checkout needs node and the image has none.

Generated-by: Claude Opus 5.5
2026-12-02 15:52:55 -06:00
dckc 147bfdc55e feat(ir-pico): learn and send IR codes from a Pico on USB
CircuitPython on a Pico H drives an IR transceiver: it prints the code
for any remote button it hears, and sends a code it's given, NEC,
Samsung, or raw pulses for the rest. pico_tty.py drives it over USB
serial. wiring.md says how to put it together.

The flake starts here: a dev shell (nix develop --command make test)
and a check that runs the doctests.

Tested: make install, then make send turned on a Vizio TV.

Generated-by: Claude Opus 5.5
2026-12-02 15:01:57 -06:00