pub enum EventMsg {
Show 47 variants
ToolProjectionWarning {
thread_id: ThreadId,
session_id: SessionId,
provider: String,
omitted_tool_names: Vec<String>,
omitted_tool_count: u64,
},
SnapshotsDisabled {
thread_id: ThreadId,
session_id: SessionId,
workspace: String,
reason: String,
},
MessageStarted {
thread_id: ThreadId,
session_id: SessionId,
index: u64,
},
ResponseDelta {
thread_id: ThreadId,
session_id: SessionId,
index: u64,
delta: String,
channel: ResponseChannel,
},
MessageComplete {
thread_id: ThreadId,
session_id: SessionId,
index: u64,
},
ThinkingStarted {
thread_id: ThreadId,
session_id: SessionId,
index: u64,
},
ThinkingComplete {
thread_id: ThreadId,
session_id: SessionId,
index: u64,
},
ToolCallStarted {
thread_id: ThreadId,
session_id: SessionId,
tool_call_id: String,
tool_name: String,
input: Value,
},
ToolCallHeartbeat {
thread_id: ThreadId,
session_id: SessionId,
},
ToolCallComplete {
thread_id: ThreadId,
session_id: SessionId,
tool_call_id: String,
tool_name: String,
result: ToolCallOutcome,
},
TurnStarted {
thread_id: ThreadId,
session_id: SessionId,
turn_id: String,
created_at: DateTime<Utc>,
route: Option<TurnRoute>,
},
ToolRequestSnapshot {
thread_id: ThreadId,
session_id: SessionId,
snapshot: Value,
},
RouteDispatched {
thread_id: ThreadId,
session_id: SessionId,
turn_id: String,
route: TurnRoute,
},
TurnComplete {
thread_id: ThreadId,
session_id: SessionId,
turn_id: Option<String>,
status: TurnOutcomeStatus,
error: Option<String>,
usage: TokenUsage,
parent_route_usage: Option<TokenUsage>,
routed_usage_dropped_records: u64,
tool_catalog: Option<Vec<Value>>,
base_url: Option<String>,
},
TurnUsage {
max_output_tokens: Option<u32>,
thread_id: ThreadId,
session_id: SessionId,
usage: TokenUsage,
duration_ms: u64,
first_token_ms: Option<u64>,
request_ms: Option<u64>,
},
RoutedTurnUsage {
thread_id: ThreadId,
session_id: SessionId,
usage: TokenUsage,
duration_ms: u64,
first_token_ms: Option<u64>,
request_ms: Option<u64>,
},
GoalUpdated {
thread_id: ThreadId,
session_id: SessionId,
snapshot: Value,
},
GoalContinuationWaiting {
thread_id: ThreadId,
session_id: SessionId,
delay_seconds: u64,
},
GoalContinuationWaitEnded {
thread_id: ThreadId,
session_id: SessionId,
interrupted: bool,
},
CompactionStarted {
thread_id: ThreadId,
session_id: SessionId,
id: String,
auto: bool,
message: String,
},
CompactionCompleted {
thread_id: ThreadId,
session_id: SessionId,
id: String,
auto: bool,
message: String,
messages_before: Option<u64>,
messages_after: Option<u64>,
summary_prompt: Option<String>,
post_input_tokens: Option<u64>,
},
CompactionCancelled {
thread_id: ThreadId,
session_id: SessionId,
id: String,
auto: bool,
message: String,
},
CompactionFailed {
thread_id: ThreadId,
session_id: SessionId,
id: String,
auto: bool,
message: String,
},
PurgeStarted {
thread_id: ThreadId,
session_id: SessionId,
message: String,
},
PurgeCompleted {
thread_id: ThreadId,
session_id: SessionId,
messages_before: u64,
messages_after: u64,
removed_count: u64,
replaced_count: u64,
message: String,
},
PurgeFailed {
thread_id: ThreadId,
session_id: SessionId,
message: String,
},
AgentSpawned {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
id: String,
prompt: String,
worker_status: Option<String>,
parent_run_id: Option<String>,
spawn_depth: u32,
model: String,
route_source: Option<String>,
},
AgentProgress {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
id: String,
status: String,
activity: AgentProgressActivity,
parent_run_id: Option<String>,
spawn_depth: u32,
},
AgentComplete {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
id: String,
result: String,
worker_status: Option<String>,
parent_run_id: Option<String>,
spawn_depth: Option<u32>,
continuable: Option<bool>,
},
SubAgentFollowUp {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
agent_id: String,
outcome: SubAgentFollowUpOutcome,
},
AgentList {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
agents: Vec<Value>,
coordination: Value,
queued_follow_ups: BTreeMap<String, u64>,
roster: Vec<AgentRosterRow>,
},
SubAgentMailbox {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
turn_id: String,
seq: u64,
message: Value,
},
WorkflowUi {
thread_id: ThreadId,
session_id: SessionId,
owner_session_id: String,
run_id: String,
ui_event: Value,
},
Error {
thread_id: ThreadId,
session_id: SessionId,
category: String,
severity: String,
recoverable: bool,
code: String,
message: String,
},
Status {
thread_id: ThreadId,
session_id: SessionId,
message: String,
},
McpSessionBoot {
thread_id: ThreadId,
session_id: SessionId,
generation: u64,
snapshot: McpManagerSnapshot,
connecting: Vec<String>,
finished: bool,
},
RequestManifestReady {
thread_id: ThreadId,
session_id: SessionId,
rendered: String,
},
PauseEvents {
thread_id: ThreadId,
session_id: SessionId,
},
ResumeEvents {
thread_id: ThreadId,
session_id: SessionId,
},
ApprovalRequired {
thread_id: ThreadId,
session_id: SessionId,
id: String,
tool_name: String,
description: String,
input: Value,
approval_key: String,
approval_grouping_key: String,
intent_summary: Option<String>,
approval_force_prompt: bool,
},
UserInputRequired {
thread_id: ThreadId,
session_id: SessionId,
id: String,
request: UserInputRequest,
},
SessionUpdated {
thread_id: ThreadId,
session_id: SessionId,
engine_session_id: String,
messages: Vec<Value>,
system_prompt: Option<Value>,
model: String,
workspace: PathBuf,
},
ElevationRequired {
thread_id: ThreadId,
session_id: SessionId,
tool_id: String,
tool_name: String,
command: Option<String>,
denial_reason: String,
blocked_network: bool,
blocked_write: bool,
},
LspRepairUpdate {
thread_id: ThreadId,
session_id: SessionId,
diagnostics_found: u64,
files: u64,
injected: bool,
},
ToolGateDecision {
thread_id: ThreadId,
session_id: SessionId,
agent_id: Option<String>,
tool_id: String,
tool_name: String,
gate: ToolGate,
decision: ToolGateVerdict,
risk: Option<String>,
reason: String,
},
AdvisoryNote {
thread_id: ThreadId,
session_id: SessionId,
turn_id: String,
note: String,
tool_call_count: u32,
},
PrefixCacheChange {
thread_id: ThreadId,
session_id: SessionId,
description: String,
system_prompt_changed: bool,
tools_changed: bool,
stability_pct: u32,
changed: bool,
pinned_combined_hash: String,
pin_reason: String,
last_miss_reason: String,
context_updates: u64,
},
}Expand description
One event emitted by the core engine to every consumer (TUI, CLI,
app-server, tests). This is the EventMsg-out half of the Op-in /
EventMsg-out contract: a projection of every internal engine Event
variant plus the thread/session ids that route it.
Variants§
ToolProjectionWarning
A route compatibility check omitted tools from the provider request.
Fields
SnapshotsDisabled
Workspace snapshots (undo) are off for this workspace. reason is one
rendered, localized line: the consequence, the gate that refused, and
the recovery that actually lifts that gate (the size cap’s config key
appears only for the size gate).
MessageStarted
ResponseDelta
Incremental content delta on the text (message) or reasoning
(thinking) channel.
MessageComplete
ThinkingStarted
ThinkingComplete
ToolCallStarted
Fields
ToolCallHeartbeat
Liveness pulse while a tool future remains pending. Carries no output.
ToolCallComplete
Fields
result: ToolCallOutcomeTurnStarted
Fields
ToolRequestSnapshot
Bounded tool-field projection from a prepared model-client request
(ToolInspectionSnapshot serialized).
RouteDispatched
Immutable billing route captured at application admission.
TurnComplete
Fields
turn_id: Option<String>The engine’s TurnComplete carries no turn id; the emitter fills
it from the envelope when it knows it.
status: TurnOutcomeStatususage: TokenUsageparent_route_usage: Option<TokenUsage>Parent-route subset; absent in legacy events, whose split is unknown.
TurnUsage
Usage for one model call within the turn.
Fields
usage: TokenUsageRoutedTurnUsage
Child-call telemetry; cost belongs to its own routed receipt.
Fields
usage: TokenUsageGoalUpdated
Runtime goal state changed (GoalSnapshot serialized).
GoalContinuationWaiting
GoalContinuationWaitEnded
CompactionStarted
CompactionCompleted
Fields
CompactionCancelled
CompactionFailed
PurgeStarted
PurgeCompleted
Fields
PurgeFailed
AgentSpawned
Fields
AgentProgress
Fields
activity: AgentProgressActivityAgentComplete
Fields
SubAgentFollowUp
Fields
outcome: SubAgentFollowUpOutcomeAgentList
Sub-agent listing. agents are SubAgentResults and coordination
is the CoordinationDetailProjection, both serialized.
Fields
roster: Vec<AgentRosterRow>SubAgentMailbox
Structured sub-agent mailbox envelope (MailboxMessage serialized).
Deduplicate on (turn_id, seq), never seq alone.
Fields
WorkflowUi
Live workflow UI event. ui_event is the flattened
{"type": ..., "at_ms": ..., ...} object (named event on the
engine side; renamed here because event is the wire tag).
Fields
Error
Fields
Status
McpSessionBoot
Fields
snapshot: McpManagerSnapshotRequestManifestReady
Rendered /preview-request manifest.
PauseEvents
Pause terminal input events for an interactive subprocess. The engine’s in-process acknowledgement handle does not cross the wire.
ResumeEvents
ApprovalRequired
Fields
UserInputRequired
SessionUpdated
Authoritative API conversation state (Messages / SystemPrompt
serialized).
Fields
ElevationRequired
Fields
LspRepairUpdate
ToolGateDecision
Fields
decision: ToolGateVerdict