pub struct ExecutionGraph {
pub prompt_hash: String,
pub run_started_at: DateTime<Utc>,
pub steps: Vec<StepNode>,
pub tool_sequence: Vec<String>,
}Expand description
Full execution trace for one TaskAgent run.
Contains one StepNode per provider call and a flat ordered
tool_sequence for easy comparison
against expected sequences in behavioral tests (Phase 2 recorder).
Fields§
§prompt_hash: StringSHA-256 of (system prompt bytes + sorted tool name bytes), hex-encoded. Changes whenever the prompt or tool registry changes.
run_started_at: DateTime<Utc>When the run started.
steps: Vec<StepNode>One StepNode per provider call iteration.
tool_sequence: Vec<String>Flat ordered list of tool names across all steps (Phase 2 recorder).
Implementations§
Source§impl ExecutionGraph
impl ExecutionGraph
Sourcepub fn new(prompt_hash: String, run_started_at: DateTime<Utc>) -> Self
pub fn new(prompt_hash: String, run_started_at: DateTime<Utc>) -> Self
Create a new, empty graph with the given prompt hash and start time.
Sourcepub fn push_step(&mut self, iteration: u32, started_at: DateTime<Utc>) -> usize
pub fn push_step(&mut self, iteration: u32, started_at: DateTime<Utc>) -> usize
Start a new step; returns its index for later finalization.
Sourcepub fn finalize_step(
&mut self,
step_idx: usize,
ended_at: DateTime<Utc>,
prompt_tokens: u32,
completion_tokens: u32,
finish_reason: Option<String>,
)
pub fn finalize_step( &mut self, step_idx: usize, ended_at: DateTime<Utc>, prompt_tokens: u32, completion_tokens: u32, finish_reason: Option<String>, )
Fill in token counts and finish_reason after the provider call returns.
Sourcepub fn record_tool_call(&mut self, step_idx: usize, record: ToolCallRecord)
pub fn record_tool_call(&mut self, step_idx: usize, record: ToolCallRecord)
Record a tool call and append its name to the flat sequence.
Trait Implementations§
Source§impl Clone for ExecutionGraph
impl Clone for ExecutionGraph
Source§fn clone(&self) -> ExecutionGraph
fn clone(&self) -> ExecutionGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionGraph
impl Debug for ExecutionGraph
Source§impl<'de> Deserialize<'de> for ExecutionGraph
impl<'de> Deserialize<'de> for ExecutionGraph
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionGraph
impl RefUnwindSafe for ExecutionGraph
impl Send for ExecutionGraph
impl Sync for ExecutionGraph
impl Unpin for ExecutionGraph
impl UnsafeUnpin for ExecutionGraph
impl UnwindSafe for ExecutionGraph
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
Mutably borrows from an owned value. Read more