pub enum CodingCliEvent {
RunStarted {
run_id: CliRunId,
vendor: CliVendorKind,
model: Option<String>,
session_id: Option<CliSessionId>,
},
SystemInit {
tools: Vec<ToolDescriptorInit>,
mcp_servers: Vec<McpServerInit>,
plugins: Vec<String>,
},
AssistantTextDelta {
text: String,
},
ToolCallStarted {
tool_call_id: String,
name: String,
input: Value,
},
ToolCallFinished {
tool_call_id: String,
output: Option<Value>,
error: Option<String>,
},
ApiRetry {
attempt: u32,
delay_ms: u64,
reason: String,
},
Usage {
input_tokens: u64,
output_tokens: u64,
cost_usd: Option<f64>,
},
RunFinished {
reason: FinishReason,
result_text: Option<String>,
},
RawVendorEvent {
vendor: CliVendorKind,
payload: Value,
},
Note {
message: String,
fields: BTreeMap<String, Value>,
},
}Expand description
Normalized lifecycle events. Tagged enum — serializes as
{"kind": "...", ...} so the web client can switch on kind.
Variants§
RunStarted
The harness has spawned the CLI process. Emitted before any vendor-side events.
SystemInit
The CLI’s system/init (or equivalent): tools loaded, MCP
servers connected, plugins resolved.
AssistantTextDelta
Streaming assistant text. Adapters emit one event per delta.
ToolCallStarted
CLI started a tool call.
ToolCallFinished
CLI’s tool call returned.
ApiRetry
Vendor reported a retryable API error.
Usage
Token / cost accounting.
RunFinished
Terminal event — process is done.
RawVendorEvent
Pass-through for vendor-specific events the normalizer doesn’t yet map. Always safe to ignore in the UI.
Note
Free-form diagnostic message (parser warnings, etc.).
Trait Implementations§
Source§impl Clone for CodingCliEvent
impl Clone for CodingCliEvent
Source§fn clone(&self) -> CodingCliEvent
fn clone(&self) -> CodingCliEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodingCliEvent
impl Debug for CodingCliEvent
Source§impl<'de> Deserialize<'de> for CodingCliEvent
impl<'de> Deserialize<'de> for CodingCliEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodingCliEvent
impl RefUnwindSafe for CodingCliEvent
impl Send for CodingCliEvent
impl Sync for CodingCliEvent
impl Unpin for CodingCliEvent
impl UnsafeUnpin for CodingCliEvent
impl UnwindSafe for CodingCliEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more