#[non_exhaustive]pub struct TraceItem {
pub duration_ns: i64,
pub ended_at: String,
pub main_usage: MainUsage,
pub response_preview: String,
pub source: String,
pub span_count: i32,
pub started_at: String,
pub status: String,
pub synthetic: String,
pub trace_id: String,
pub usage: TraceUsage,
pub user_prompt: String,
}Expand description
One user-visible turn’s header. session_id / harness ids are not duplicated here — they belong to the session.
Models the contract’s TraceItem schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.duration_ns: i64The contract’s duration_ns.
ended_at: StringThe contract’s ended_at, an RFC 3339 timestamp.
main_usage: MainUsageThe contract’s main_usage.
response_preview: StringThe derive-time fold of the closing conversation- spine llm call’s text output — the answer line for collapsed turn cards, so summary consumers never need spans.
source: StringThe capture origin of the turn’s rows (“wire” | “transcript”), promoted from raw_turns.source.
span_count: i32The contract’s span_count.
started_at: StringThe contract’s started_at, an RFC 3339 timestamp.
status: StringThe contract’s status.
synthetic: StringA typed deriver signal (“post-compaction” for a compaction continuation, “shadow-opener” for a shadow-only opener), promoted out of the old metadata grab-bag.
trace_id: StringThe contract’s trace_id.
usage: TraceUsageThe contract’s usage.
user_prompt: StringServed explicitly (not omitempty): a synthetic opener has an empty
prompt, and dropping the key turns the empty string into undefined
on the wire, which breaks consumers that expect a string (e.g.