Skip to main content

EventMsg

Enum EventMsg 

Source
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

§thread_id: ThreadId
§session_id: SessionId
§provider: String
§omitted_tool_names: Vec<String>
§omitted_tool_count: u64
§

RequestImageWindow

Fields

§thread_id: ThreadId
§session_id: SessionId
§provider: String
§model: String
§total: u64
§elided: u64
§cap: u64
§cap_source: String
§message: String
§

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).

Fields

§thread_id: ThreadId
§session_id: SessionId
§workspace: String
§reason: String
§

MessageStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§index: u64
§

ResponseDelta

Incremental content delta on the text (message) or reasoning (thinking) channel.

Fields

§thread_id: ThreadId
§session_id: SessionId
§index: u64
§delta: String
§

MessageComplete

Fields

§thread_id: ThreadId
§session_id: SessionId
§index: u64
§

ThinkingStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§index: u64
§

ThinkingComplete

Fields

§thread_id: ThreadId
§session_id: SessionId
§index: u64
§

ToolCallStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§tool_call_id: String
§tool_name: String
§input: Value
§

ToolCallHeartbeat

Liveness pulse while a tool future remains pending. Carries no output.

Fields

§thread_id: ThreadId
§session_id: SessionId
§

ToolExecutionStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§tool_call_id: String
§

ToolResultContent

Fields

§thread_id: ThreadId
§session_id: SessionId
§tool_call_id: String
§blocks: Value
§

ToolCallComplete

Fields

§thread_id: ThreadId
§session_id: SessionId
§tool_call_id: String
§tool_name: String
§

OperationActivityStarted

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

§thread_id: ThreadId
§session_id: SessionId
§span_id: String
§activity_kind: OwnerActivityKind
§action_id: Option<String>
§

OperationActivityCompleted

Fields

§thread_id: ThreadId
§session_id: SessionId
§span_id: String
§activity_kind: OwnerActivityKind
§action_id: Option<String>
§

TurnStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§turn_id: String
§created_at: DateTime<Utc>
§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).

Fields

§thread_id: ThreadId
§session_id: SessionId
§snapshot: Value
§

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).

Fields

§thread_id: ThreadId
§session_id: SessionId
§snapshot: Value
§

RouteDispatched

Immutable billing route captured at application admission.

Fields

§thread_id: ThreadId
§session_id: SessionId
§turn_id: String
§

TurnComplete

Fields

§thread_id: ThreadId
§session_id: SessionId
§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.

§parent_route_usage: Option<TokenUsage>

Parent-route subset; absent in legacy events, whose split is unknown.

§routed_usage_dropped_records: u64
§tool_catalog: Option<Vec<Value>>

Tool catalog sent with this turn’s model request (Tool serialized).

§base_url: Option<String>
§

ProviderRequestReceipt

Fields

§thread_id: ThreadId
§session_id: SessionId
§receipt: Value
§

TurnUsage

Usage for one model call within the turn.

Fields

§max_output_tokens: Option<u32>
§thread_id: ThreadId
§session_id: SessionId
§duration_ms: u64
§first_token_ms: Option<u64>
§request_ms: Option<u64>
§

RoutedTurnUsage

Child-call telemetry; cost belongs to its own routed receipt.

Fields

§thread_id: ThreadId
§session_id: SessionId
§duration_ms: u64
§first_token_ms: Option<u64>
§request_ms: Option<u64>
§

GoalUpdated

Runtime goal state changed (GoalSnapshot serialized).

Fields

§thread_id: ThreadId
§session_id: SessionId
§snapshot: Value
§

GoalContinuationWaiting

Fields

§thread_id: ThreadId
§session_id: SessionId
§delay_seconds: u64
§

GoalContinuationWaitEnded

Fields

§thread_id: ThreadId
§session_id: SessionId
§interrupted: bool
§

CompactionStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§auto: bool
§message: String
§

CompactionCompleted

Fields

§thread_id: ThreadId
§session_id: SessionId
§auto: bool
§message: String
§messages_before: Option<u64>
§messages_after: Option<u64>
§summary_prompt: Option<String>
§post_input_tokens: Option<u64>
§

CompactionCancelled

Fields

§thread_id: ThreadId
§session_id: SessionId
§auto: bool
§message: String
§

CompactionFailed

Fields

§thread_id: ThreadId
§session_id: SessionId
§auto: bool
§message: String
§

PurgeStarted

Fields

§thread_id: ThreadId
§session_id: SessionId
§message: String
§

PurgeCompleted

Fields

§thread_id: ThreadId
§session_id: SessionId
§messages_before: u64
§messages_after: u64
§removed_count: u64
§replaced_count: u64
§message: String
§

PurgeFailed

Fields

§thread_id: ThreadId
§session_id: SessionId
§message: String
§

AgentSpawned

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_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>

The name the agent goes by (workflow task label, dispatch name, or role). Absent from older producers; never the raw id.

§

AgentProgress

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_id: String
§status: String
§parent_run_id: Option<String>
§spawn_depth: u32
§

AgentComplete

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_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

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_id: String
§agent_id: String
§

AgentList

Sub-agent listing. agents are SubAgentResults and coordination is the CoordinationDetailProjection, both serialized.

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_id: String
§agents: Vec<Value>
§coordination: Value
§queued_follow_ups: BTreeMap<String, u64>

agent_id -> queued follow-up count; only non-zero entries.

§

SubAgentMailbox

Structured sub-agent mailbox envelope (MailboxMessage serialized). Deduplicate on (turn_id, seq), never seq alone.

Fields

§thread_id: ThreadId
§session_id: SessionId
§owner_session_id: String
§turn_id: String
§seq: u64
§message: Value
§

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

§thread_id: ThreadId
§session_id: SessionId
§owner_session_id: String
§run_id: String
§ui_event: Value
§

Error

Fields

§thread_id: ThreadId
§session_id: SessionId
§category: String

ErrorCategory in snake_case.

§severity: String

ErrorSeverity in snake_case.

§recoverable: bool
§code: String
§message: String
§

Status

Fields

§thread_id: ThreadId
§session_id: SessionId
§message: String
§

McpSessionBoot

Fields

§thread_id: ThreadId
§session_id: SessionId
§generation: u64
§connecting: Vec<String>
§finished: bool
§

RequestManifestReady

Rendered /preview-request manifest.

Fields

§thread_id: ThreadId
§session_id: SessionId
§rendered: String
§

PauseEvents

Pause terminal input events for an interactive subprocess. The engine’s in-process acknowledgement handle does not cross the wire.

Fields

§thread_id: ThreadId
§session_id: SessionId
§

ResumeEvents

Fields

§thread_id: ThreadId
§session_id: SessionId
§

ApprovalRequired

Fields

§thread_id: ThreadId
§session_id: SessionId
§tool_name: String
§description: String
§input: Value
§approval_key: String
§approval_grouping_key: String
§intent_summary: Option<String>
§approval_force_prompt: bool
§

ApprovalWithdrawn

Fields

§thread_id: ThreadId
§session_id: SessionId
§

UserInputRequired

Fields

§thread_id: ThreadId
§session_id: SessionId
§

UserInputClosed

Fields

§thread_id: ThreadId
§session_id: SessionId
§

SessionUpdated

Authoritative API conversation state (Messages / SystemPrompt serialized).

Fields

§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

Fields

§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

Fields

§thread_id: ThreadId
§session_id: SessionId
§diagnostics_found: u64
§files: u64
§injected: bool
§

ToolGateDecision

Fields

§thread_id: ThreadId
§session_id: SessionId
§agent_id: Option<String>
§tool_id: String
§tool_name: String
§reviewer_model: Option<String>
§reason: String
§receipt_id: Option<String>
§call_digest: Option<String>
§action_summary: Option<String>
§

AutoReviewPaused

Fields

§thread_id: ThreadId
§session_id: SessionId
§reason: String
§approval_mode: String
§

AdvisoryNote

Fields

§thread_id: ThreadId
§session_id: SessionId
§turn_id: String
§note: String
§tool_call_count: u32
§

PrefixCacheChange

Fields

§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

Fields

§thread_id: ThreadId
§session_id: SessionId
§title: String
§

ContentFilterRefusal

Fields

§thread_id: ThreadId
§session_id: SessionId
§reason: String
§refusal: Option<String>
§

PluginChanged

Fields

§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>

Implementations§

Source§

impl EventMsg

Source

pub fn kind_str(&self) -> &'static str

Source

pub fn thread_id(&self) -> &ThreadId

Source

pub fn session_id(&self) -> &SessionId

Trait Implementations§

Source§

impl Clone for EventMsg

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EventMsg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EventMsg

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EventMsg

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for EventMsg

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EventMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.