pub enum TurnMarker {
Context {
messages: usize,
tools: usize,
estimated_tokens: u64,
},
Usage {
prompt_tokens: u64,
completion_tokens: u64,
total_tokens: u64,
cached_tokens: Option<u64>,
cost_usd: Option<f64>,
},
Finish {
reason: FinishReason,
},
Retry {
attempt: u32,
delay_ms: u64,
reason: String,
},
Aborted {
source: String,
messages: usize,
},
Effort {
from: Option<String>,
to: Option<String>,
},
Goal {
objective: String,
},
}Expand description
One bracketing marker. The marker tag is the record’s kind.
Variants§
Context
Opens a round-trip: the shape of the context the request was built over, captured BEFORE the request is issued (so it survives a request that never returns).
Fields
Usage
The round-trip’s provider-reported token accounting, plus its dollar
cost when the model is priceable (crate::pricing).
Fields
Finish
Closes a round-trip (or the loop).
Fields
reason: FinishReasonWhy it ended.
Retry
A transient provider failure was retried with backoff. Written from
the notices the transport’s own retry loop records, so a retried
request is visible in the log instead of being invisible the way the
ledger’s auto-retry-on-transient-provider-errors row described.
Fields
Aborted
The turn was interrupted (Ctrl-C / a cancelled send future). The
partial work already appended to the transcript stands; this marker
is what makes the interruption a FACT on reload rather than
something a reader has to infer from a dangling tool call.
Fields
Effort
Reasoning effort changed mid-session (/effort), the extended-
thinking analog of the model_change log.
Fields
Goal
The session’s persistent objective was set, changed, or cleared
(/goal). The goal itself lives in <session>.goal.json; this is
the audit trail of when it moved.
Trait Implementations§
Source§impl Clone for TurnMarker
impl Clone for TurnMarker
Source§fn clone(&self) -> TurnMarker
fn clone(&self) -> TurnMarker
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more