Skip to main content

Resumption

Struct Resumption 

Source
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: String

SHA-256 of the artifact’s canonical JSON, sha256:….

§label: String

The label of the checkpoint the run stopped at.

§stopped_at: String

The checkpoint node itself, which the runStopped event names.

§resume_at: String

The 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: u32

How 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: u32

How many tool calls it made, for the same reason.

Implementations§

Source§

impl Resumption

Source

pub fn load(path: &Path) -> Result<Resumption, SnapshotError>

Read one, and refuse anything that is not one.

Source

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.

Source

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

Source§

fn clone(&self) -> Resumption

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Resumption

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Resumption

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Resumption

Source§

fn eq(&self, other: &Resumption) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Resumption

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Resumption

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.