#[non_exhaustive]pub struct SpanItem {Show 19 fields
pub call_kind: String,
pub duration_ns: i64,
pub input: Vec<Value>,
pub kind: String,
pub model: String,
pub name: String,
pub output: Vec<Value>,
pub parent_span_id: String,
pub payload: String,
pub raw_turn_id: i64,
pub seq: i64,
pub span_id: String,
pub started_at: String,
pub status: String,
pub stop_reason: String,
pub thread_id: String,
pub trace_id: String,
pub usage: Value,
pub verdict: Option<Value>,
}Expand description
One observed unit of work. Every field is a deriver output, formatting- only: the harness-taxonomy fields (call_kind, model, stop_reason, thread_id, verdict) are typed rather than bagged in a metadata map, and input/output are uniform content-block arrays for ALL kinds — the console owns per-kind rendering.
Models the contract’s SpanItem 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.call_kind: StringDeriver-written taxonomy, promoted from the old metadata grab-bag.
duration_ns: i64The contract’s duration_ns.
input: Vec<Value>Input/Output are content-block arrays (llm.ContentBlock), uniform for every kind (tool spans included — no unwrapping).
kind: StringThe contract’s kind.
model: StringThe contract’s model.
name: StringThe contract’s name.
output: Vec<Value>The contract’s output.
parent_span_id: StringThe contract’s parent_span_id.
payload: StringPayload marks a preview-truncated span so the console drills in for the full payload; absent in full mode.
raw_turn_id: i64The contract’s raw_turn_id.
seq: i64The span’s presentation ordinal within its trace; spans arrive sorted by it (started_at ties inside one llm call — parallel tool batches share an instant).
span_id: StringThe contract’s span_id.
started_at: StringThe contract’s started_at, an RFC 3339 timestamp.
status: StringThe contract’s status.
stop_reason: StringThe contract’s stop_reason.
thread_id: StringThe contract’s thread_id.
trace_id: StringThe contract’s trace_id.
usage: ValueUsage (was metrics) is an llm.Usage object on the wire — {}-pinned
for usage-less spans.
verdict: Option<Value>The typed security-monitor disposition (null off permission-check spans), deriver-written.