Skip to main content

FlowExecutionEvent

Enum FlowExecutionEvent 

Source
pub enum FlowExecutionEvent {
    FlowStart {
        flow_name: String,
        backend: String,
        timestamp_ms: u64,
    },
    StepStart {
        step_name: String,
        step_index: usize,
        step_type: String,
        timestamp_ms: u64,
    },
    StepToken {
        step_name: String,
        content: String,
        token_index: u64,
        timestamp_ms: u64,
    },
    StepComplete {
        step_name: String,
        step_index: usize,
        success: bool,
        full_output: String,
        tokens_input: u64,
        tokens_output: u64,
        timestamp_ms: u64,
    },
    ToolCall {
        step_name: String,
        tool_name: String,
        content: String,
        timestamp_ms: u64,
    },
    FlowComplete {
        flow_name: String,
        backend: String,
        success: bool,
        steps_executed: usize,
        tokens_input: u64,
        tokens_output: u64,
        latency_ms: u64,
        timestamp_ms: u64,
    },
    FlowError {
        flow_name: String,
        error: String,
        timestamp_ms: u64,
    },
}
Expand description

One observable moment in a flow’s execution. Closed catalog per D2.

Field naming + JSON serde-rename match the Python mirror (axon/runtime/flow_execution_event.py) byte-for-byte. The drift gate at tests/fixtures/fase33_flow_execution_event/corpus.json asserts both stacks produce byte-identical JSON for each variant.

Variants§

§

FlowStart

Emitted exactly once at the very start of execution.

Fields

§flow_name: String
§backend: String
§timestamp_ms: u64
§

StepStart

Emitted exactly once per step at its start boundary.

Fields

§step_name: String
§step_index: usize
§step_type: String
§timestamp_ms: u64
§

StepToken

Emitted per token / chunk produced by the step’s underlying backend. The granularity matches the backend’s chunk size (Anthropic SSE delta, OpenAI streaming chunk, etc.). For non-streaming backends, fires once per step with the full output (post-StepComplete in practice; the catalog allows it to fire either before or after but the convention is during execution).

Fields

§step_name: String
§content: String
§token_index: u64

Monotonic counter, per-flow. Restarts at 1 for each new FlowStart. Adopter clients use this to correlate Last-Event-ID resumes (W3C SSE spec).

§timestamp_ms: u64
§

StepComplete

Emitted exactly once per step at its end boundary.

Fields

§step_name: String
§step_index: usize
§success: bool
§full_output: String
§tokens_input: u64
§tokens_output: u64
§timestamp_ms: u64
§

ToolCall

§Fase 33.y.k — Tool invocation chunk. Emitted by per-step handlers when the upstream backend’s chunk stream signals FinishReason::ToolUse (provider invoked a tool mid-stream). Closed-catalog event variant; D4 byte-compat preserves adopter parsers — flows without declared apply: <tool> never emit this event.

content carries the tool-call’s structured payload as a canonical wire-stable string (provider-specific shape today; future Fase 33.y.k.2 standardizes per-provider extraction into a unified tool_call_id + arguments schema).

Fields

§step_name: String
§tool_name: String
§content: String
§timestamp_ms: u64
§

FlowComplete

Terminator — success path. Receiver MUST close the stream.

Fields

§flow_name: String
§backend: String
§success: bool
§steps_executed: usize
§tokens_input: u64
§tokens_output: u64
§latency_ms: u64
§timestamp_ms: u64
§

FlowError

Terminator — failure path. Receiver MUST close the stream.

Fields

§flow_name: String
§error: String
§timestamp_ms: u64

Implementations§

Source§

impl FlowExecutionEvent

Source

pub fn is_terminator(&self) -> bool

Closed predicate: is this the terminator of the stream? After emitting a terminator, the producer MUST drop the sender so the receiver’s recv() returns None.

Source

pub fn is_step_scoped(&self) -> bool

Closed predicate: is this event step-scoped (carries step_name)?

Source

pub fn kind(&self) -> &'static str

String kind for diagnostic / log lines. Matches the JSON kind discriminator field (snake_case per serde-rename).

Trait Implementations§

Source§

impl Clone for FlowExecutionEvent

Source§

fn clone(&self) -> FlowExecutionEvent

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 FlowExecutionEvent

Source§

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

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

impl<'de> Deserialize<'de> for FlowExecutionEvent

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 FlowExecutionEvent

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FlowExecutionEvent

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 FlowExecutionEvent

Auto Trait Implementations§

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> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more