#[non_exhaustive]pub enum Event {
Show 14 variants
RunStarted {
run_id: String,
resumed: bool,
},
NodeStarted {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
kind: Arc<str>,
title: Arc<str>,
attempt: u32,
},
NodeChunk {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
field: Arc<str>,
chunk: String,
},
NodeProgress {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
name: String,
data: Value,
},
NodeRetry {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
attempt: u32,
error: String,
delay_ms: u64,
},
NodeSucceeded {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
outputs: Variables,
branch: Option<String>,
usage: Option<Usage>,
metadata: IndexMap<String, Value>,
elapsed_ms: u64,
},
NodeFailed {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
error: String,
error_type: String,
handled: bool,
outputs: Variables,
elapsed_ms: u64,
},
NodeSkipped {
frame: FrameId,
node_id: Arc<str>,
},
NodePaused {
frame: FrameId,
node_id: Arc<str>,
exec_id: Arc<str>,
reason: PauseReason,
},
VariableUpdated {
frame: FrameId,
node_id: Arc<str>,
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
Fields
NodeChunk
Incremental output, e.g. LLM tokens for output field.
Fields
§
field: Arc<str>Output field the chunk belongs to. Shared: nodes that stream many
chunks reuse one allocation (see crate::NodeContext::chunk_shared).
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 Eventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Vec<Value>> is !null: Freeze,
PhantomData<ArcInner<Vec<Value>>>: Freeze,
*const ArcInner<IndexMap<String, Value>> is !null: Freeze,
PhantomData<ArcInner<IndexMap<String, Value>>>: Freeze,
*const ArcInner<File> is !null: Freeze,
PhantomData<ArcInner<File>>: Freeze,
*const ArcInner<SmallVec<[(VarName, Value); 4]>> is !null: Freeze,
PhantomData<ArcInner<SmallVec<[(VarName, Value); 4]>>>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
*const ArcInner<[Arc<str>]> is !null: Freeze,
PhantomData<ArcInner<[Arc<str>]>>: Freeze,
PhantomData<PauseReason>: Freeze,
*const Snapshot is !null: Freeze,
PhantomData<Snapshot>: Freeze,
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Eventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Vec<Value>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<Value>>>: UnsafeUnpin,
*const ArcInner<IndexMap<String, Value>> is !null: UnsafeUnpin,
PhantomData<ArcInner<IndexMap<String, Value>>>: UnsafeUnpin,
*const ArcInner<File> is !null: UnsafeUnpin,
PhantomData<ArcInner<File>>: UnsafeUnpin,
*const ArcInner<SmallVec<[(VarName, Value); 4]>> is !null: UnsafeUnpin,
PhantomData<ArcInner<SmallVec<[(VarName, Value); 4]>>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const ArcInner<[Arc<str>]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[Arc<str>]>>: UnsafeUnpin,
PhantomData<PauseReason>: UnsafeUnpin,
*const Snapshot is !null: UnsafeUnpin,
PhantomData<Snapshot>: UnsafeUnpin,
impl UnwindSafe for Eventwhere
RawVecInner: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<Vec<Value>>: UnwindSafe,
Arc<IndexMap<String, Value>>: UnwindSafe,
Arc<File>: UnwindSafe,
Arc<SmallVec<[(VarName, Value); 4]>>: UnwindSafe,
NonNull<u8>: UnwindSafe,
Arc<[Arc<str>]>: UnwindSafe,
BoxRaw<Snapshot>: UnwindSafe,
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