#[non_exhaustive]pub struct StepRow {Show 24 fields
pub cursor: Cursor,
pub harness: String,
pub source: StepSource,
pub step_ref: String,
pub session: String,
pub run_id: Option<String>,
pub occurred_at_ms: u64,
pub provider: Option<String>,
pub model: Option<String>,
pub input: Option<u64>,
pub cache_read: Option<u64>,
pub cache_write: Option<u64>,
pub cache_write_5m: Option<u64>,
pub cache_write_1h: Option<u64>,
pub output: Option<u64>,
pub reasoning: Option<u64>,
pub finish: Option<String>,
pub context_limit: Option<u64>,
pub request_body_len: Option<u64>,
pub prompt: u64,
pub retention: Option<f64>,
pub verdict: Verdict,
pub prompt_dropped: bool,
pub request_size: Option<RequestSize>,
}Expand description
One step in the feed. Rows carry no content: never prompt text, tool names or error text.
A row’s identity is harness plus step_ref. When any field of a step
changes, the provider sends the whole row again at a new cursor; the last
row for an identity wins, and a reader replaces, never appends (see
crate::LatestRows).
Optional members are omitted when unknown and are never zero for unknown.
output includes reasoning: reasoning is a breakdown of output, never
an addition to it, so reasoning <= output whenever both are present (see
StepRow::check_counts). cache_write is the sum of every cache
lifetime. Unknown members are
ignored when decoding; StepRow::check_closed names them for the
provider’s own tests.
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.cursor: CursorThis row’s feed position.
harness: StringThe producer: a coding harness or a runner’s module id. For a step a
runner announced, see live_row_identity.
source: StepSource§step_ref: StringThe producer’s own id for the step. For a step a runner announced, see
live_row_identity.
session: String§run_id: Option<String>Runner steps only.
occurred_at_ms: u64Unix milliseconds. Steps without a time are not in the feed.
provider: Option<String>§model: Option<String>§input: Option<u64>Uncached input tokens.
cache_read: Option<u64>§cache_write: Option<u64>The sum of every cache lifetime.
cache_write_5m: Option<u64>Present only when the source split cache writes by lifetime.
cache_write_1h: Option<u64>Present only when the source split cache writes by lifetime.
output: Option<u64>Output tokens, reasoning included. Charge it once; never add
reasoning on top.
reasoning: Option<u64>The part of output the provider reports as reasoning: a breakdown,
never an addition. Absent means not reported, not zero.
finish: Option<String>The producer’s finish or stop reason, as a classification string.
context_limit: Option<u64>§request_body_len: Option<u64>Request body length in bytes.
prompt: u64Input plus cache read plus cache write.
retention: Option<f64>This step’s cache read divided by the expected cache read: a non-negative number, never rounded or clamped, so it exceeds 1 when a step reads more than expected. Absent when there was nothing to compare with.
verdict: Verdict§prompt_dropped: bool§request_size: Option<RequestSize>On a prompt drop, present when both compared steps report body lengths.
Implementations§
Source§impl StepRow
impl StepRow
Sourcepub const REQUIRED_MEMBERS: &'static [&'static str]
pub const REQUIRED_MEMBERS: &'static [&'static str]
Members every row carries.
Sourcepub const OPTIONAL_MEMBERS: &'static [&'static str]
pub const OPTIONAL_MEMBERS: &'static [&'static str]
Members omitted when unknown.
Sourcepub fn new(
cursor: impl Into<Cursor>,
harness: impl Into<String>,
source: StepSource,
step_ref: impl Into<String>,
session: impl Into<String>,
occurred_at_ms: u64,
prompt: u64,
verdict: Verdict,
prompt_dropped: bool,
) -> Self
pub fn new( cursor: impl Into<Cursor>, harness: impl Into<String>, source: StepSource, step_ref: impl Into<String>, session: impl Into<String>, occurred_at_ms: u64, prompt: u64, verdict: Verdict, prompt_dropped: bool, ) -> Self
Builds a row from its required members; optional members start absent.
Sourcepub fn check_closed(value: &Value) -> Result<(), NotClosed>
pub fn check_closed(value: &Value) -> Result<(), NotClosed>
Reports a member outside the published v1 row list, by name. For the provider’s own tests: whatever it emits must stay within the published list until this crate updates it. Readers ignore unknown members instead, so decoding never calls this.
Sourcepub fn check_counts(&self) -> Result<(), BadCounts>
pub fn check_counts(&self) -> Result<(), BadCounts>
Reports a row whose reasoning exceeds its output, naming it by
identity. reasoning is a breakdown inside output, so a row with
both must have reasoning <= output. For the provider’s own tests,
like StepRow::check_closed; readers still decode such a row.