#[non_exhaustive]pub enum Event {
Show 14 variants
RunStarted {
run_id: String,
resumed: bool,
},
NodeStarted {
frame: FrameId,
node_id: String,
exec_id: String,
kind: String,
title: String,
attempt: u32,
},
NodeChunk {
frame: FrameId,
node_id: String,
exec_id: String,
field: String,
chunk: String,
},
NodeProgress {
frame: FrameId,
node_id: String,
exec_id: String,
name: String,
data: Value,
},
NodeRetry {
frame: FrameId,
node_id: String,
exec_id: String,
attempt: u32,
error: String,
delay_ms: u64,
},
NodeSucceeded {
frame: FrameId,
node_id: String,
exec_id: String,
outputs: IndexMap<String, Value>,
branch: Option<String>,
usage: Option<Usage>,
metadata: IndexMap<String, Value>,
elapsed_ms: u64,
},
NodeFailed {
frame: FrameId,
node_id: String,
exec_id: String,
error: String,
error_type: String,
handled: bool,
outputs: IndexMap<String, Value>,
elapsed_ms: u64,
},
NodeSkipped {
frame: FrameId,
node_id: String,
},
NodePaused {
frame: FrameId,
node_id: String,
exec_id: String,
reason: PauseReason,
},
VariableUpdated {
frame: FrameId,
node_id: String,
selector: Selector,
value: Value,
},
RunSucceeded {
outputs: IndexMap<String, Value>,
usage: Usage,
handled_errors: u32,
elapsed_ms: u64,
},
RunFailed {
error: String,
error_type: String,
usage: Usage,
elapsed_ms: u64,
},
RunAborted {
reason: String,
elapsed_ms: u64,
},
RunPaused {
reasons: Vec<PauseReason>,
snapshot: Box<Snapshot>,
},
}Expand description
A run event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RunStarted
NodeStarted
NodeChunk
Incremental output, e.g. LLM tokens for output field.
NodeProgress
Structured progress emitted by a node (agent steps, tool calls, iteration progress…).
NodeRetry
NodeSucceeded
Fields
NodeFailed
A node failed. handled is true when its error strategy kept the run going.
Fields
NodeSkipped
The node will not run because every incoming path was skipped.
NodePaused
VariableUpdated
A node wrote a variable outside its own outputs (assigner, conversation variable…).
RunSucceeded
Fields
RunFailed
Fields
RunAborted
RunPaused
The run paused. Persist snapshot and pass it back to resume.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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