trace-diff 0.1.0

Diff two agent traces semantically: align by event type + key, ignore timestamps and ids, return added/removed/changed steps. Zero deps beyond serde_json.
Documentation
  • Coverage
  • 100%
    10 out of 10 items documented1 out of 4 items with examples
  • Size
  • Source code size: 22.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 401.2 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 34s Average build duration of successful builds.
  • all releases: 34s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • MukundaKatta/trace-diff
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MukundaKatta

trace-diff

crates.io

Diff two agent traces semantically. Align by (kind, key), ignore timestamps and ids, emit Added/Removed/Changed entries.

use trace_diff::{diff, Step};
use serde_json::json;
let base = vec![Step { kind: "tool_call".into(), key: "read".into(), payload: json!({"path": "a"}) }];
let new  = vec![Step { kind: "tool_call".into(), key: "read".into(), payload: json!({"path": "b"}) }];
let changes = diff(&base, &new);

MIT or Apache-2.0.