Skip to main content

Module trace

Module trace 

Source
Expand description

Traces, steps and citations.

Every search, fetch, tool call, approval and notice in a task becomes a TraceStep. Answers cite sources with Citations that name the steps behind them; validate_citations rejects any cited URL that no listed fetch step retrieved, and retain_valid drops such citations before display.

Structs§

Citation
A footnote [n] in an answer.
StepId
Index of a step in its trace, starting at 1 (as shown in footnotes).
Trace
The ordered record of one task.
TraceStep
TraceSummary

Enums§

ApprovalOutcome
How an approval was resolved.
CitationError
CitationTarget
SessionMark
Which browsing session a step used.
StepKind

Functions§

retain_valid
Keeps only valid citations: a citation with no backing step is never shown.
validate_citations
Checks that every citation maps to steps in trace: each cited URL must be fetched by one of its listed steps, and each cited tool result must come from one of its listed (successful) tool steps.