cyberine
UsageRun recipes

TUI/chat — local notifications (T534)

A shared notify channel (src/tui/notify.ts) fires a local notification — never a network call, never OAuth — from three triggers:

TriggerWhere
a tracked run reaches a terminal state (done / error / cancelled)fleet TUI (cyberine agents / npm run tui)
the planner is waiting on ask_user or a present_plan approvalchat (cyberine chat)
a planner turn finishes and took >= 15s (a "long turn")chat (cyberine chat)

Mechanism is selected by notifications (env CYBERINE_NOTIFICATIONS): bell (default — terminal BEL, works in any POSIX terminal), system (OS notification: macOS osascript Notification Center, Linux notify-send; no-op elsewhere), both, or off.

Two built-in guards keep it from becoming a storm: notifications from any trigger are coalesced within a 2s window (a burst collapses to one actual bell/notification), and any recent keystroke suppresses notifications for ~1.5s (the user is already looking at the screen).

Legacy env vars from before this mode knob still work as narrower overrides layered on top: CYBERINE_NOTIFY=0 disables everything (both mechanisms, all triggers — useful on CI or a remote session without a desktop); CYBERINE_BELL=0 strips just the bell mechanism out of whatever mode is active (bell -> off, both -> system).