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.
StepStart
Emitted exactly once per step at its start boundary.
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
StepComplete
Emitted exactly once per step at its end boundary.
Fields
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).
FlowComplete
Terminator — success path. Receiver MUST close the stream.
Fields
FlowError
Terminator — failure path. Receiver MUST close the stream.
Implementations§
Source§impl FlowExecutionEvent
impl FlowExecutionEvent
Sourcepub fn is_terminator(&self) -> bool
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.
Sourcepub fn is_step_scoped(&self) -> bool
pub fn is_step_scoped(&self) -> bool
Closed predicate: is this event step-scoped (carries
step_name)?
Trait Implementations§
Source§impl Clone for FlowExecutionEvent
impl Clone for FlowExecutionEvent
Source§fn clone(&self) -> FlowExecutionEvent
fn clone(&self) -> FlowExecutionEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlowExecutionEvent
impl Debug for FlowExecutionEvent
Source§impl<'de> Deserialize<'de> for FlowExecutionEvent
impl<'de> Deserialize<'de> for FlowExecutionEvent
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>,
Source§impl PartialEq for FlowExecutionEvent
impl PartialEq for FlowExecutionEvent
Source§fn eq(&self, other: &FlowExecutionEvent) -> bool
fn eq(&self, other: &FlowExecutionEvent) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for FlowExecutionEvent
impl Serialize for FlowExecutionEvent
impl StructuralPartialEq for FlowExecutionEvent
Auto Trait Implementations§
impl Freeze for FlowExecutionEvent
impl RefUnwindSafe for FlowExecutionEvent
impl Send for FlowExecutionEvent
impl Sync for FlowExecutionEvent
impl Unpin for FlowExecutionEvent
impl UnsafeUnpin for FlowExecutionEvent
impl UnwindSafe for FlowExecutionEvent
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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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