pub struct RunEvidence {
pub status: RunStatus,
pub tool_calls: Vec<ToolCallRecord>,
pub final_state: Value,
pub latency_ms: u64,
pub cost_usd: f64,
pub total_tokens: u64,
}Expand description
The distilled evidence of one run.
Fields§
§status: RunStatusHow the run terminated.
tool_calls: Vec<ToolCallRecord>The ordered tool-call trajectory (journal tool_call events in
sequence order).
final_state: ValueThe run’s final (or suspension-point) state as JSON. Null for
failed runs.
latency_ms: u64Wall latency of the whole run in milliseconds, measured by the
experiment runner around Executor::run.
cost_usd: f64Total journaled cost in USD: the sum of cost_usd over every event
in the journal (model calls carry cost too, not only tool calls).
Events without cost contribute zero.
total_tokens: u64Total tokens reported by model calls in the run.
Implementations§
Source§impl RunEvidence
impl RunEvidence
Sourcepub fn from_journal(
journal: &Journal,
status: RunStatus,
final_state: Value,
latency_ms: u64,
) -> Self
pub fn from_journal( journal: &Journal, status: RunStatus, final_state: Value, latency_ms: u64, ) -> Self
Distill a journal plus run outcome into evidence.
Tool calls are read from tool_call journal events in seq order.
The canonical payload shape is {"tool": name, "arguments": {...}}
(what the runtime’s recording wrappers journal); events whose payload
lacks a tool field fall back to the recording node’s id, then to
"unknown" — every journaled call stays visible in the trajectory.
Sourcepub fn tool_names(&self) -> Vec<&str>
pub fn tool_names(&self) -> Vec<&str>
The trajectory as bare tool names, in order.