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
NodeStarted
ModelCall
ToolCall
AgentCall
ApprovalRequested
The compiler inserted an approval gate; this is the runtime asking.
ApprovalDecided
StateWritten
Verified
Checkpoint
BranchTaken
LoopIteration
MapIteration
Emitted
RunFinished
RunFailed
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.