pub struct Resumption {Show 16 fields
pub ingot_snapshot: String,
pub kind: String,
pub agent: String,
pub artifact: String,
pub label: String,
pub stopped_at: String,
pub resume_at: String,
pub inputs: BTreeMap<String, Value>,
pub bindings: BTreeMap<String, Value>,
pub state: BTreeMap<String, Value>,
pub outputs: BTreeMap<String, Artifact>,
pub steps: u32,
pub usage: Usage,
pub spend: Spend,
pub model_calls: u32,
pub tool_calls: u32,
}Fields§
§ingot_snapshot: String§kind: String§agent: String§artifact: StringSHA-256 of the artifact’s canonical JSON, sha256:….
label: StringThe label of the checkpoint the run stopped at.
stopped_at: StringThe checkpoint node itself, which the runStopped event names.
resume_at: StringThe node to continue from — the one after the checkpoint, so a resumed run does not re-emit the checkpoint’s event.
inputs: BTreeMap<String, Value>§bindings: BTreeMap<String, Value>§state: BTreeMap<String, Value>§outputs: BTreeMap<String, Artifact>§steps: u32§usage: Usage§spend: Spend§model_calls: u32How many model calls the first half made.
A cassette is matched by position, so a resumed run replaying one has to start where the first half stopped. Counted here rather than asked of the provider because it is a property of the run: a live run records the same number, and a resumed live run simply ignores it.
tool_calls: u32How many tool calls it made, for the same reason.
Implementations§
Source§impl Resumption
impl Resumption
Sourcepub fn load(path: &Path) -> Result<Resumption, SnapshotError>
pub fn load(path: &Path) -> Result<Resumption, SnapshotError>
Read one, and refuse anything that is not one.
Sourcepub fn save(&self, path: &Path) -> Result<(), SnapshotError>
pub fn save(&self, path: &Path) -> Result<(), SnapshotError>
Write it, with sorted keys and a trailing newline.
The same rule the IR follows: a file two identical runs produce differently is a file nobody can diff.
Sourcepub fn check(&self, ir: &AgentIr) -> Result<(), SnapshotError>
pub fn check(&self, ir: &AgentIr) -> Result<(), SnapshotError>
Whether this snapshot belongs to ir, and continues into a node it has.
There is no override. See Runtime 0.5 §2.4.
Trait Implementations§
Source§impl Clone for Resumption
impl Clone for Resumption
Source§fn clone(&self) -> Resumption
fn clone(&self) -> Resumption
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more