pub struct TurnReport { /* private fields */ }Expand description
What a completed turn hands the run loop. assistant and
wave_results are the window-folding material — the turn’s
exchange, compacted at the closing boundary of record. The records
are what the compaction works from: model_returned.data.content
keeps the reply whole, and each tool_result is the payload the
window text was printed from. runtime::fork rebuilds both from
those records through the same compaction at the same boundary, so a
rebuild and a live fold still share one source.
Implementations§
Source§impl TurnReport
impl TurnReport
Sourcepub fn usage(&self) -> Option<&ModelUsage>
pub fn usage(&self) -> Option<&ModelUsage>
What the provider counted for this call, when it said. The
context gauge reads input_tokens from here and nowhere else.
pub fn refs(&self) -> &[EventRef]
Sourcepub fn redacted(&self) -> u32
pub fn redacted(&self) -> u32
How many secret-shaped spans this turn replaced before its model and tool events reached the ledger. A diagnostic line can say this number without saying what was found.
Sourcepub fn model_returned(&self) -> &EventRef
pub fn model_returned(&self) -> &EventRef
The in-window evidence candidate for Completion::Done.
pub fn calls_made(&self) -> usize
pub fn assistant(&self) -> &[ContentBlock]
pub fn wave_results(&self) -> &[ContentBlock]
Sourcepub fn stop(&self) -> Option<StopReason>
pub fn stop(&self) -> Option<StopReason>
Why the provider stopped, when it said. A reply that stopped at the ceiling is a reply that was cut off, and the run loop reads that here rather than inferring it from what the reply contains.