pub struct FoldedRun {
pub identity: RunIdentity,
pub meta: RunMeta,
pub context: ContextSnapshot,
pub messages: Vec<MessageRecord>,
pub inference_count: usize,
pub inference_usage: Vec<InferenceUsageRecord>,
pub tool_call_count: usize,
pub pending_batch: Option<PendingToolBatch>,
}Expand description
The state reconstructed from a run journal - enough to resume or inspect the run at its latest recorded point.
Fields§
§identity: RunIdentityThe run’s current owner/identity.
meta: RunMetaThe latest run metadata.
context: ContextSnapshotThe reconstructed current context window.
messages: Vec<MessageRecord>The recorded inbound messages, in order.
inference_count: usizeNumber of inferences recorded.
inference_usage: Vec<InferenceUsageRecord>Per-call usage, in the order the calls landed.
The point of keeping every entry rather than a running sum: a sum is
already available from RunMeta, and what it cannot answer is whether
any single call exceeded the window, or which kind of call the spend went
to.
tool_call_count: usizeNumber of tool calls recorded.
pending_batch: Option<PendingToolBatch>A dispatched tool batch whose results never made it into the context
window (the run crashed mid-batch). None when the run has no batch in
flight or the batch’s turn already landed in context.