Canonical trajectory model for amberfork — the frozen contract every crate reads.
A [Run] is one agent trajectory: an ordered list of [Step]s plus optional DAG
[Edge]s. This is the input seam — amberfork-ingest produces it from OTel/plain JSON,
and amberfork-align consumes it. It mirrors the public wire format documented in
docs/trace-format.md; once this crate exists, these types are the source of truth and
that document tracks them.
[DiffResult] is the matching output seam: what amberfork-align fills in and the CLI's
--json and the Leptos UI render.
Design rules baked into the types (see docs/design/design-run-diff-debugger.md):
outcomeis a run-level verdict supplied by the user, never inferred from span status.- Timing (
t_start/t_end) is display-only and is never an alignment signal, so it stays a raw string here rather than a parsed timestamp. inputs/outputsdistinguish text from structured payloads in the type itself, because the diff engine text-diffs strings but field-diffs objects.