pub enum EventMsg {
Show 60 variants
ToolProjectionWarning {
thread_id: ThreadId,
session_id: SessionId,
provider: String,
omitted_tool_names: Vec<String>,
omitted_tool_count: u64,
},
RequestImageWindow {
thread_id: ThreadId,
session_id: SessionId,
provider: String,
model: String,
total: u64,
elided: u64,
cap: u64,
cap_source: String,
message: String,
},
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,
},
ToolExecutionStarted {
thread_id: ThreadId,
session_id: SessionId,
tool_call_id: String,
},
ToolResultContent {
thread_id: ThreadId,
session_id: SessionId,
tool_call_id: String,
blocks: Value,
},
ToolCallComplete {
thread_id: ThreadId,
session_id: SessionId,
tool_call_id: String,
tool_name: String,
result: ToolCallOutcome,
},
OperationActivityStarted {
thread_id: ThreadId,
session_id: SessionId,
span_id: String,
activity_kind: OwnerActivityKind,
action_id: Option<String>,
},
OperationActivityCompleted {
thread_id: ThreadId,
session_id: SessionId,
span_id: String,
activity_kind: OwnerActivityKind,
outcome: OwnerOperationOutcome,
action_id: Option<String>,
},
TurnStarted {
thread_id: ThreadId,
session_id: SessionId,
turn_id: String,
created_at: DateTime<Utc>,
route: Option<TurnRoute>,
submission_id: Option<String>,
},
ToolRequestSnapshot {
thread_id: ThreadId,
session_id: SessionId,
snapshot: Value,
},
WorkspaceSnapshotTaken {
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>,
submission_id: Option<String>,
compaction_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>,
},
ProviderRequestReceipt {
thread_id: ThreadId,
session_id: SessionId,
receipt: Value,
},
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>,
display_name: 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>,
display_name: Option<String>,
},
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,
},
ApprovalWithdrawn {
thread_id: ThreadId,
session_id: SessionId,
id: String,
},
UserInputRequired {
thread_id: ThreadId,
session_id: SessionId,
id: String,
request: UserInputRequest,
},
UserInputClosed {
thread_id: ThreadId,
session_id: SessionId,
id: String,
outcome: UserInputClosedOutcome,
},
SessionUpdated {
thread_id: ThreadId,
session_id: SessionId,
engine_session_id: String,
messages: Vec<Value>,
system_prompt: Option<Value>,
instruction_assembly: 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 {Show 14 fields
thread_id: ThreadId,
session_id: SessionId,
agent_id: Option<String>,
tool_id: String,
tool_name: String,
gate: ToolGate,
decision: ToolGateVerdict,
risk: Option<String>,
reviewer_model: Option<String>,
reason: String,
rule: Option<String>,
receipt_id: Option<String>,
call_digest: Option<String>,
action_summary: Option<String>,
},
AutoReviewPaused {
thread_id: ThreadId,
session_id: SessionId,
reason: String,
approval_mode: 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,
},
ConversationTitle {
thread_id: ThreadId,
session_id: SessionId,
title: String,
},
ContentFilterRefusal {
thread_id: ThreadId,
session_id: SessionId,
reason: String,
refusal: Option<String>,
},
PluginChanged {
thread_id: ThreadId,
session_id: SessionId,
plugin: String,
action: String,
content_hash: Option<String>,
decided_by: Option<String>,
services: Vec<String>,
tools_added: Vec<String>,
tools_removed: Vec<String>,
},
}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
RequestImageWindow
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.
ToolExecutionStarted
ToolResultContent
ToolCallComplete
Fields
result: ToolCallOutcomeOperationActivityStarted
Trusted Engine-owned activity for an operation that passed dispatch and authority checks. No arguments, command, or result is included in the pet-facing activity contract.
Fields
activity_kind: OwnerActivityKindOperationActivityCompleted
TurnStarted
Fields
submission_id: Option<String>Host submission correlation echo: the token an in-process host
stamped on its SendMessage/EditLastTurn op, echoed verbatim by
that turn’s start; None for every engine self-started turn.
Additive and default-absent on the wire. Only in-process engine
handles can stamp a token — the wire Op carries no correlation
field — so wire submitters only ever observe None here.
ToolRequestSnapshot
Bounded tool-field projection from a prepared model-client request
(ToolInspectionSnapshot serialized).
WorkspaceSnapshotTaken
A workspace snapshot the engine took for the running turn
(WorkspaceSnapshotRef serialized: kind, snapshot_id, tree_id,
session_id, optional tool_call_id, write_paths and
changed_paths).
RouteDispatched
Immutable billing route captured at application admission.
TurnComplete
Fields
turn_id: Option<String>Actual started turn; absent when a submitted operation fails before starting.
submission_id: Option<String>Host submission correlation, including preflight rejection. Runtime self-starts do not carry a host token. Older producers default to absent.
compaction_id: Option<String>Manual compaction operation identity, never the surrounding host submission.
status: TurnOutcomeStatususage: TokenUsageparent_route_usage: Option<TokenUsage>Parent-route subset; absent in legacy events, whose split is unknown.
ProviderRequestReceipt
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
ApprovalWithdrawn
UserInputRequired
UserInputClosed
SessionUpdated
Authoritative API conversation state (Messages / SystemPrompt
serialized).
Fields
ElevationRequired
Fields
LspRepairUpdate
ToolGateDecision
Fields
decision: ToolGateVerdict