Skip to main content

diff_tool_calls

Function diff_tool_calls 

Source
pub fn diff_tool_calls(
    run_id_a: &str,
    events_a: &[RunEvent],
    run_id_b: &str,
    events_b: &[RunEvent],
) -> DiffSummary
Expand description

Diff the tool-call sequences of two runs.

§Algorithm

  1. Extract tool calls (kind=“tool_called”) from both event sequences
  2. Compute LCS alignment on tool names
  3. For each index:
    • Not in LCS → Added or Removed
    • In LCS with seq mismatch → Reordered
    • In LCS with payload difference → ParamDelta

Returns a DiffSummary with all changes and an identical flag.