pub enum Evt {
Show 28 variants
SessionStart(Box<SessionInfo>),
SessionUpdated(Box<SessionInfo>),
ExtensionRefreshed(Box<ExtensionRefreshed>),
SessionEnd {
session_id: Id,
reason: SessionEndReason,
usage: Usage,
},
UserInput(String),
ShellOutput {
command: String,
stdout: String,
stderr: String,
exit_code: Option<i32>,
},
AgentMessage(String),
Thinking(String),
MessageDelta(String),
ThinkingDelta(String),
Info(String),
InfoBlockStart {
id: String,
header: String,
loading: bool,
},
InfoBlockAppend {
id: String,
detail: String,
},
Error(String),
ToolStart(ToolUse),
ToolUpdate(ToolUpdate),
ToolEnd(ToolEnd),
TaskEnd {
tool_use_id: String,
exit_code: Option<i32>,
},
CompactStart,
CompactEnd {
summary: Option<String>,
},
TurnStart {
turn_id: Id,
},
TurnPause {
turn_id: Id,
reason: TurnPauseReason,
},
TurnResume {
turn_id: Id,
},
TurnEnd {
turn_id: Id,
status: TurnEndStatus,
steps: usize,
},
UsageUpdate {
usage: Usage,
context: Option<ContextWindow>,
},
ContextReport(ContextBreakdown),
Ambient {
kind: AmbientKind,
req_id: u64,
text: String,
},
Goodbye,
}Variants§
SessionStart(Box<SessionInfo>)
SessionUpdated(Box<SessionInfo>)
ExtensionRefreshed(Box<ExtensionRefreshed>)
SessionEnd
The session span closed. Mirrors TurnEnd: carries the span’s
identity, why it ended, and its final usage accounting.
UserInput(String)
ShellOutput
AgentMessage(String)
Thinking(String)
MessageDelta(String)
ThinkingDelta(String)
Info(String)
InfoBlockStart
Open a grouped Info entry with header. Subsequent
InfoBlockAppend events with the same id are rendered as
tree-indented child lines under it. Use for multi-step background
notifications (e.g. MCP warm-up) that should visually cluster.
When loading is true the renderer appends an animated ./../...
suffix to the header until the first InfoBlockAppend arrives,
signalling that background work is still in flight.
InfoBlockAppend
Append a child detail line to the InfoBlockStart with the same id.
Drops silently if the matching block isn’t present.
Error(String)
ToolStart(ToolUse)
ToolUpdate(ToolUpdate)
ToolEnd(ToolEnd)
TaskEnd
Work a tool call handed off ended: a Bash job that outlived its wait
window. tool_use_id is the call whose ToolEnd reported the hand-off.
exit_code is the process exit code, 128 + signal for a signal
death, absent only when the exit could not be observed.
CompactStart
CompactEnd
Compaction finished. summary is the text that replaced the
compacted history and carries forward as the session’s context;
None when compaction failed (history unchanged) or produced no
displayable text.
TurnStart
TurnPause
TurnResume
The turn resumed after a TurnPause (e.g. the approval was answered
or a steer arrived). Closes the pause bracket so clients never have to
infer resumption from the next tool event.
TurnEnd
Fields
status: TurnEndStatusUsageUpdate
Fields
context: Option<ContextWindow>Context-window occupancy for the root session. None carries no
context update, including for subagent usage or an unverified model
limit. Clients retain the last snapshot until the session or model changes.
ContextReport(ContextBreakdown)
Answer to Op::ContextReport: a per-category breakdown of the
session’s context-window occupancy at the time of the request.
Ambient
An ephemeral ambient hint produced off the main conversation (a predicted
“thinking phrase” for the draft, or a suggested next prompt — see
AmbientKind). Never persisted to the event log. req_id lets clients
drop superseded results.