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<CodingCliEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodingCliEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CodingCliEvent
impl Serialize for CodingCliEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.