cli/notify.py merges the lab's notify-done, notify-ask and ask-form scripts
into one stdlib-only CLI shipped with this repo (the aliases stay as shims),
so a session on a remote worker has it too. Two transports: the hub directly
on the lab, or — on a worker — the sidecar's new /outbox, which the hub's
OutboxMirror polls every 2 s, creating the record through the same functions
/api/notify, /api/ask and /api/forms run and pushing the answer back. The
worker still never calls the hub.
The hub now owns what the CLI used to compute: the default conversation URL
(worker transcripts included), the `notified` meta stamp, and a `--final`
push marks the session finished. A push's --action-cmd button answers on
/api/notify/{id}/action like an ask (HA integration updated). Ids are minted
by the CLI (ntf_/ask_/frm_) so viewer, phone and worker agree. Dropped: the
direct-HA fallback, the DONE button, the Forge cost line, the dashboard
mirror. The viewer's widgets also parse the `notify send|ask|form|wait`
spelling; the worker installer links the skill into ~/.claude/skills.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ai-agent integrations
Out-of-container companions that connect the ai-agent notification hub to the
outside world. The backend itself only knows about generic webhooks
(Settings → Webhooks, GET/PUT /api/webhooks); each integration here is the
receiving end of one of those webhooks.
home-assistant/— a Home Assistant custom component (ai_agent) that renders the hub'snotify/askevents as mobile notifications (asks get their own channel + ". .. .._" vibration and their tapped answer is POSTed back to the backend).
How notifications flow
notify-done skill (notify.sh / ask.sh)
│ POST /api/notify | /api/ask
▼
ai-agent backend ──record──▶ /data/notifications.json (source of truth)
│ POST {event: notify|ask, …}
▼
configured webhooks (e.g. HA /api/webhook/ai_agent)
│ notify.mobile_app_pixel_9
▼
phone ──tap──▶ HA integration ──POST /api/ask/{id}/answer──▶ backend