Docs / Notch integration
Notch integration
The notch companion gives your terminal sessions a place at the top of the screen. A local socket carries pane state to the companion and focus or launch commands back to the terminal. The companion is optional.
The state channel
A client thread connects to the notch agent's socket, sends a hello, and pushes coalesced mux_snapshot frames — the full pane tree across all spaces — whenever state changes, roughly once a second under load. The wire format is a 4-byte length prefix plus JSON, mirrored exactly on both sides (raven-proto is a shared crate). If no notch is listening the thread backs off and retries; the terminal runs exactly the same without it.
What streams up
- Working directory and title per pane
- Foreground process — including the detected agent and its idle, working, or waiting-for-you state
- Unseen-output flags,
OSC 9;4progress percentages, and bell events - Hook-reported metadata (custom statuses, display names) from
report-agent
What comes back down
focus_pane— the notch focuses the exact pane behind a notification; ⇧⌘J steps through the queuelaunch_window— the notch's + button spawns a new terminal sessionterm_command— run a command in a pane, e.g. from a planning flowping/request_snapshot— health checks and resyncs
Every command raises and activates the window, so answering a notification always lands your cursor in the right session. The round-trip is covered by tests on both ends.