Skip to main content

RunEvent

Enum RunEvent 

Source
pub enum RunEvent {
Show 17 variants RunStarted { agent: String, provider: String, }, NodeStarted { node: String, kind: String, }, ModelCall { node: String, model: String, response_type: String, usage: Usage, }, ToolCall { node: String, tool: String, effects: Vec<String>, }, AgentCall { node: String, agent: String, }, ApprovalRequested { node: String, effects: Vec<String>, reason: String, }, ApprovalDecided { node: String, allowed: bool, }, StateWritten { node: String, field: String, }, Verified { node: String, verifier: String, outcome: VerifyOutcome, }, Checkpoint { node: String, label: String, }, BranchTaken { node: String, arm: String, }, LoopIteration { node: String, iteration: u32, }, MapIteration { node: String, index: usize, total: usize, }, Emitted { node: String, output: String, }, RunFinished { steps: u32, usage: Usage, }, RunFailed { reason: String, }, RunStopped { node: String, label: String, },
}
Expand description

One line of the run record.

rename_all_fields is load-bearing and easy to lose: on an enum, rename_all renames the variants, not their fields. Without the second attribute response_type serialised as response_type while every specification example and the second backend said responseType — a divergence no single-implementation test could see, and the first thing the conformance suite found.

Variants§

§

RunStarted

Fields

§agent: String
§provider: String
§

NodeStarted

Fields

§node: String
§kind: String
§

ModelCall

Fields

§node: String
§model: String
§response_type: String
§usage: Usage
§

ToolCall

Fields

§node: String
§tool: String
§effects: Vec<String>
§

AgentCall

Fields

§node: String
§agent: String
§

ApprovalRequested

The compiler inserted an approval gate; this is the runtime asking.

Fields

§node: String
§effects: Vec<String>
§reason: String
§

ApprovalDecided

Fields

§node: String
§allowed: bool
§

StateWritten

Fields

§node: String
§field: String
§

Verified

Fields

§node: String
§verifier: String
§

Checkpoint

Fields

§node: String
§label: String
§

BranchTaken

Fields

§node: String
§arm: String

then or else.

§

LoopIteration

Fields

§node: String
§iteration: u32
§

MapIteration

Fields

§node: String
§index: usize
§total: usize
§

Emitted

Fields

§node: String
§output: String
§

RunFinished

Fields

§steps: u32
§usage: Usage
§

RunFailed

Fields

§reason: String
§

RunStopped

The run stopped at a resumable checkpoint and can be continued.

Distinct from runFinished because without it a stopped run and a run that finished having produced nothing look identical in a record, and the check that every declared output was emitted would have to be skipped on a guess. This is that guess made explicit: it is the only thing that suppresses the check, and a reader can see it was suppressed.

Fields

§node: String
§label: String

Implementations§

Source§

impl RunEvent

Source

pub fn to_line(&self) -> String

One line, for a terminal.

Source

pub fn to_json_line(&self) -> String

One JSON object, for piping into another tool.

Trait Implementations§

Source§

impl Clone for RunEvent

Source§

fn clone(&self) -> RunEvent

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 RunEvent

Source§

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

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

impl<'de> Deserialize<'de> for RunEvent

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 RunEvent

Source§

fn eq(&self, other: &RunEvent) -> 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 RunEvent

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 RunEvent

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, 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> 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.