Add terminal-pet --oneline for a shell prompt !20

merged merged by cmc on 2026-09-04 16:31 UTC · krz/ambient-companions:feat/pet-oneline into main

cmc

Frames::snapshot reads the cached snapshot and returns without waiting out a timeout: one frame blocking, then drain to WouldBlock. Measured 2.7ms per call including process start, so a synchronous p10k segment is affordable.

--oneline prints the face and keystroke rate. No daemon means no output and exit 1, so the segment hides rather than printing a diagnostic into the prompt.

Also fixes a real bug the new tests surfaced: mood was computed from values regardless of staleness, so the cached keys_per_min left the pet looking busy indefinitely once sessions aged out of the active window and the collector stopped publishing.

Closes #13