Add heartbeat: reminders and delivered files reach Bolt Assistant
The client never called /desk/report_status, so Bolt's reminders and any files he delivered to this session sat in the server's outbox forever - the same dead-air failure the pet client showed when its heartbeat stopped. Now a heartbeat thread (HEARTBEAT_SECONDS, default 60; 0 disables) reports in, speaks announcements through the assistant's queue when the mic is idle, and downloads the outbox to BOLT_DOWNLOAD_DIR (default ~/Downloads/Bolt) via .part-then-rename, never overwriting. A startup health probe warns loudly when the server refuses the DESK_API_KEY. Also: add the .env.example the README's setup step references (it was missing, so `cp .env.example .env` failed for everyone), and gitignore .claude/ so Claude Code's worktree directory stays out of the repo. Tests: tests/test_heartbeat.py (12) plus announcement tests in tests/test_assistant.py (6); full suite 135 passed. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
a8c7db9520
commit
751d1c8b69
@@ -45,6 +45,11 @@ other than the system default. `run.bat --type` lets you type instead of speak,
|
||||
without needing the wake phrase again.
|
||||
4. **While Bolt speaks, the mic is ignored**, so his own voice through the speakers (which often
|
||||
says "Bolt") can't wake him.
|
||||
5. **Reminders and delivered files ride a heartbeat.** Every `HEARTBEAT_SECONDS` (default 60) the
|
||||
assistant reports in to `/desk/report_status`, which is how Bolt's reminders and any files he
|
||||
sends to this client arrive — the same channel Bolt-Pet uses. Announcements are spoken when the
|
||||
mic is idle, and files download to `BOLT_DOWNLOAD_DIR` (default `~/Downloads/Bolt`), never
|
||||
overwriting what's already there. Set `HEARTBEAT_SECONDS=0` to turn it off.
|
||||
|
||||
## Cost and privacy
|
||||
|
||||
@@ -85,6 +90,9 @@ See `.env.example`. The ones you're most likely to change:
|
||||
(default `assistant`: "what's the weather, assistant?"). Blank to turn off.
|
||||
- `COMMAND_WAIT_SEC`, `FOLLOW_UP_SEC`: how long it waits after "Hey Bolt", or after asking you
|
||||
something.
|
||||
- `HEARTBEAT_SECONDS`: how often it checks in for reminders and delivered files (default 60;
|
||||
`0` turns the heartbeat off).
|
||||
- `BOLT_DOWNLOAD_DIR`: where delivered files land (default `~/Downloads/Bolt`).
|
||||
|
||||
It has its own conversation on the server (`pet-assistant-<computer>`), which shows up in Bolt
|
||||
Console's Chats list.
|
||||
|
||||
Reference in New Issue
Block a user