pub enum EngineEvent {
Show 15 variants
TextDelta(String),
ThinkingDelta(String),
ToolStart {
name: String,
summary: String,
},
ToolDone {
name: String,
ok: bool,
},
ToolDenied {
name: String,
},
ToolAutoAllowed {
name: String,
rule: String,
},
Retrying {
attempt: u32,
reason: String,
},
FallbackModel {
model: String,
},
PromptQueued,
Compacted {
degraded: bool,
},
Ask {
summary: String,
protected_why: Option<String>,
reply: Sender<AskReply>,
},
Question {
id: String,
question: Question,
reply: Sender<QuestionAnswer>,
},
TurnDone {
outcome: Outcome,
usage: TokenUsage,
},
TodosChanged {
items: Vec<Todo>,
},
LedgerReport(LedgerSummary),
}Expand description
Everything the surface renders. Ask carries the reply channel — the
surface (or an allow-rule upstream) is the human on the loop.
Variants§
TextDelta(String)
ThinkingDelta(String)
ToolStart
ToolDone
ToolDenied
ToolAutoAllowed
Retrying
FallbackModel
PromptQueued
Compacted
Context was compacted (digest + verbatim tail); degraded means the
summarize call failed and the floor placeholder was used.
Ask
Question
A structured ask_user question (tier-1 gap #4) — NOT a permission
gate: the reply is a plain-text tool result, never an authorization.
Committed durably (PendingQuestion) before this event is sent; a
dropped reply (headless/no-human) resolves to QuestionAnswer::NoHuman.
TurnDone
TodosChanged
The todo_write checklist changed (a full-state replace committed).
Ephemeral-context companion to the durable Todos entry: the surface
(console strip, hotl watch) renders progress from this, never from
parsing model text.
LedgerReport(LedgerSummary)
Loop-overhead instrument (§S1), flushed once when the turn task ends. UI/telemetry only — this NEVER becomes a session-log entry, so it cannot perturb golden-transcript normalization.