Skip to main content

Event

Enum Event 

Source
#[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: String, 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: IndexMap<String, Value>, 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: IndexMap<String, Value>, 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

Fields

§run_id: String
§resumed: bool
§

NodeStarted

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§kind: Arc<str>
§title: Arc<str>
§attempt: u32
§

NodeChunk

Incremental output, e.g. LLM tokens for output field.

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§field: String
§chunk: String
§

NodeProgress

Structured progress emitted by a node (agent steps, tool calls, iteration progress…).

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§name: String
§data: Value
§

NodeRetry

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§attempt: u32
§error: String
§delay_ms: u64
§

NodeSucceeded

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§branch: Option<String>

Selected branch handle for branch nodes.

§usage: Option<Usage>
§metadata: IndexMap<String, Value>
§elapsed_ms: u64
§

NodeFailed

A node failed. handled is true when its error strategy kept the run going.

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§error: String
§error_type: String
§handled: bool
§elapsed_ms: u64
§

NodeSkipped

The node will not run because every incoming path was skipped.

Fields

§frame: FrameId
§node_id: Arc<str>
§

NodePaused

Fields

§frame: FrameId
§node_id: Arc<str>
§exec_id: Arc<str>
§

VariableUpdated

A node wrote a variable outside its own outputs (assigner, conversation variable…).

Fields

§frame: FrameId
§node_id: Arc<str>
§selector: Selector
§value: Value
§

RunSucceeded

Fields

§usage: Usage
§handled_errors: u32

Failures handled by an error strategy (non-zero = partial success).

§elapsed_ms: u64
§

RunFailed

Fields

§error: String
§error_type: String

Machine-readable category: invalid_input (bad run input or resume data), snapshot_mismatch, limit_exceeded (steps / duration / depth), internal, or the failing node’s own error type (e.g. timeout, http, model).

§usage: Usage
§elapsed_ms: u64
§

RunAborted

Fields

§reason: String
§elapsed_ms: u64
§

RunPaused

The run paused. Persist snapshot and pass it back to resume.

Fields

§reasons: Vec<PauseReason>
§snapshot: Box<Snapshot>

Implementations§

Source§

impl Event

Source

pub fn is_terminal(&self) -> bool

Whether this is the final event of a run.

Source

pub fn frame(&self) -> Option<&FrameId>

Frame of node-level events.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Event

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.