Stream events
curl --request GET \ --url http://127.0.0.1:8004/api/events \ --header 'Authorization: Bearer <token>'Newline-delimited JSON, one event per line, until the client disconnects. The first is ready, with the sessions the events after it change; resync marks where events were lost. Empty lines keep the connection alive. Each event is {time, type, ...}, time in Unix milliseconds. Guest (sandboxed) credentials can’t use it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”A session ID or name: only that session’s events, ending once it closes.
Responses
Section titled “Responses”One event per line
One line of the stream.
object
First on every stream: the state the events after it change, and the
session session named, if any.
object
object
object
object
cwd is on another host.
object
Lifecycle states for an agent occupying a pane.
This intentionally follows Herdr’s small semantic vocabulary. Failure and permission details belong in the accompanying message/notification instead of multiplying lifecycle states.
Background work the agent’s screen shows, such as “2 shells, 1 monitor”.
Names the running agent instance, so a client can target it.
When the agent entered its current state, in Unix seconds.
A pane’s place in a git repo.
object
The repo’s common git dir, shared by all its worktrees.
None when HEAD is detached.
The repo’s main worktree rather than a linked one.
The native editor over a pane, the same in every tab.
object
Open files (absolute paths), in tab order.
object
object
object
The stream fell behind and events were lost. The events after it report the session, window, and pane changes since the last event before it, but not transitions that reversed in between, nor lost notifications, widgets, and popups.
object
object
The session’s name.
object
The session’s name.
object
The session’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
The session’s active window changed.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
The pane went to another window.
object
The session’s name.
The window’s name.
The window’s active pane changed.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
The pane’s agent changed state, or another agent took over.
object
The session’s name.
The window’s name.
Lifecycle states for an agent occupying a pane.
This intentionally follows Herdr’s small semantic vocabulary. Failure and permission details belong in the accompanying message/notification instead of multiplying lifecycle states.
object
Lifecycle states for an agent occupying a pane.
This intentionally follows Herdr’s small semantic vocabulary. Failure and permission details belong in the accompanying message/notification instead of multiplying lifecycle states.
Background work the agent’s screen shows, such as “2 shells, 1 monitor”.
An agent hook or btmux alert for a pane.
object
The session’s name.
The window’s name.
btmux send-notification or POST /api/notify.
object
A btmux pick, confirm, or input opened over the pane, or over
its popup popup_id.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
object
The session’s name.
The window’s name.
The config was reloaded or overridden; error if the file failed to load.
object
A server message for every tab, such as an upgrade starting.
object
Unix milliseconds.
Example
{ "type": "session_created"}A malformed query parameter
Missing or wrong access token
The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)
No such session