#[non_exhaustive]pub struct RunArtifacts {
pub tool_calls: Vec<ToolCall>,
pub final_text: Option<String>,
pub tokens: Option<u32>,
pub transcript: Vec<Value>,
pub error: Option<String>,
}Expand description
Everything a single run produced EXCEPT scoring. The Harness (or Agent) fills this in and
returns it; the generic runner copies it onto the case’s CaseOutcome
and also hands it to the Scorer so built-in assertions can inspect what the agent
did.
Every field is optional/empty by default, so a minimal harness can return RunArtifacts::default()
and a richer one can populate as much diagnostic detail as it has.
#[non_exhaustive]: new diagnostic fields can be added without a breaking change. Within eval-core
it is still constructed with struct literals / ..Default::default(); external crates build it via
the builder methods (e.g. RunArtifacts::new().with_final_text(...)).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tool_calls: Vec<ToolCall>The agent’s tool calls, each as a structured ToolCall (name + args). The runner derives the
report’s display strings from these via ToolCall::display.
final_text: Option<String>The agent’s final free-text reply (e.g. a summary line), if any.
tokens: Option<u32>The harness’s own completion-token count for this run, when it has one. The harness owns its
backend, so it reports this itself; the runner just forwards it. None means “not reported”
(distinct from a reported 0).
transcript: Vec<Value>The full per-run message log, if the harness captured one (rendered by the HTML report’s per-case expander). Opaque JSON so any transcript shape round-trips.
error: Option<String>A run-level error the harness captured WITHOUT failing the call (e.g. a recoverable backend
hiccup it logged). A hard failure should instead be returned as Err from Harness::run;
either way the case is marked failed. When both are present, the runner prefers the Err.
Implementations§
Source§impl RunArtifacts
impl RunArtifacts
Sourcepub fn with_tool_calls(self, tool_calls: Vec<ToolCall>) -> Self
pub fn with_tool_calls(self, tool_calls: Vec<ToolCall>) -> Self
Set the tool calls (chainable builder).
Sourcepub fn with_final_text(self, text: impl Into<String>) -> Self
pub fn with_final_text(self, text: impl Into<String>) -> Self
Set the final text (chainable builder).
Sourcepub fn with_tokens(self, tokens: u32) -> Self
pub fn with_tokens(self, tokens: u32) -> Self
Set the completion token count (chainable builder).
Sourcepub fn with_transcript(self, transcript: Vec<Value>) -> Self
pub fn with_transcript(self, transcript: Vec<Value>) -> Self
Set the transcript (chainable builder).
Sourcepub fn with_error(self, error: impl Into<String>) -> Self
pub fn with_error(self, error: impl Into<String>) -> Self
Set a run-level error (chainable builder).
Trait Implementations§
Source§impl Clone for RunArtifacts
impl Clone for RunArtifacts
Source§fn clone(&self) -> RunArtifacts
fn clone(&self) -> RunArtifacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more