Skip to main content

Module watch

Module watch 

Source
Expand description

Lane-watch events: what a session’s lane publishes to its watchers (the TUI, the RPC stream, herdr, the daemon’s lane replica), one JSON object per event tagged by type. The session worker writes them from this enum and every watcher reads them back through WatchEvent::decode, so a field is named in one place.

Field order is the order the worker writes. A field a watcher may not get from another producer (an older worker, a remote server) reads as its default.

Modules§

reducer
Port of packages/agent/src/harness/runtime/reducer.ts: folds one harness event into a lane snapshot, so a watcher keeps a replica of the lane (its open operation, running tools, transcript, queues and stats) from the event stream alone. Navigation completion cannot be folded: it asks for a fresh snapshot.
stream_fold
The streaming assistant message, folded from message_update frames (Rust-only). A message_update event carries the provider frame and the usage so far, not the message: sending the whole message with every delta made streaming quadratic in the answer’s length (serialized, sent and diffed once per token). A watcher starts from the message_start message and folds each frame into it, as the provider built its partial:

Structs§

Failure
Why something failed ({code?, message}).
QueueItem
One item of a WatchEvent::QueueUpdate: a queued message, or a host item shown as <customType>.

Enums§

Ended
How a run, a compaction or a navigation ended.
QueueKind
A queue a message can join while a run streams (steer, followUp, nextRun).
WatchEvent
One lane-watch event.