Expand description
Transport-agnostic session driver — the “only the transport differs” boundary.
A driver bundles the two things a TUI needs from its backend:
- a stream of normalized events (
DriverEvent/UiEvent), and - a command sink (
DriverCommand).
The remote client (RemoteDriver) implements this over TCP JSON-RPC. The
local interactive host drives the same rendering path via
map_agent_event (its own in-process AgentEvent stream → UiEvent).
Because both sides speak UiEvent, they render through the same
crate::transcript_view::TranscriptView.
Structs§
- Driver
Status - A snapshot of backend session state for the chrome (header / footer / retry).
- Local
Driver - A
SessionDriverbacked by an in-process harness lane: it turns the lane’sbroadcast::Receiver<AgentEvent>intoDriverEvents and mapsDriverCommands onto the lane. Additive — the interactive TUI can adopt it without changing the rich local operations it performs through the lane directly. - Remote
Driver - A
SessionDriverbacked by a remoterpi --serverover TCP JSON-RPC.
Enums§
- Driver
Command - A command the TUI sends to its backend.
- Driver
Event - An item pushed from a driver to the TUI.
Traits§
- Session
Driver - A backend the TUI can drive: it yields
DriverEvents and acceptsDriverCommands. Both the in-process host and the remote client implement it, so the transcript render layer above is transport-agnostic.
Functions§
- assistant_
blocks - Provider-free assistant block projection (text / thinking / decoded image), in document order.
- assistant_
tool_ calls - Finalized tool calls in an assistant message (placeholder calls with an empty name are skipped).
- map_
agent_ event - Project an in-process
AgentEventinto the sharedUiEvent. ReturnsNonefor events with no transcript effect. - map_
remote_ event - Project a wire
RemoteEventinto the sharedUiEvent.