#[non_exhaustive]pub struct Capture {
pub run_id: RunId,
pub run_log: RunLog,
pub llm_io: Vec<LlmIo>,
pub model_version: Option<String>,
pub rng_seed: Option<u64>,
pub memory_ref: Option<String>,
pub captured_at: DateTime<Utc>,
}Expand description
A self-contained snapshot of one run’s replayable execution context. The
model_version, rng_seed, and memory_ref fields are Option so a
capture assembled before a provider records them deserializes unchanged once
they are present — older captures simply carry null.
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.run_id: RunIdEqual to run_log.run_id; the key under which a persisted capture is
looked up.
run_log: RunLogThe recorded step sequence replay walks; its outputs are what a
DivergenceReport compares against.
llm_io: Vec<LlmIo>Prompt/completion text the RunLog itself does not carry, ordered
parallel to the run_log’s LlmCall steps.
model_version: Option<String>Model that served the last LLM call in this run. In heterogeneous-model
runs this captures the most-recent model only. None for captures
assembled before model tracking was added (older captures carry null).
rng_seed: Option<u64>Seed that made the run’s LLM deterministic, when one was set — the signal that replay can expect byte-identical output rather than drift.
memory_ref: Option<String>Opaque handle to a memory snapshot; None when no snapshot was taken.
captured_at: DateTime<Utc>Capture-assembly time, distinct from the run’s own
started_at/finished_at.
Implementations§
Source§impl Capture
impl Capture
Sourcepub fn from_runlog(run_log: RunLog, llm_io: Vec<LlmIo>) -> Self
pub fn from_runlog(run_log: RunLog, llm_io: Vec<LlmIo>) -> Self
Stamps captured_at from the wall clock at call time — it is the
capture moment, not derived from the run’s own started_at/finished_at.
model_version is derived from the last LlmIo entry that carries a
model name; None when no entry recorded one.