pub struct PreparedContinuation {
pub mode: ContinuationPreparationMode,
pub snapshot: SessionResumeSnapshot,
}Expand description
Side-effect-free continuation package shared by every product host.
This package deliberately contains durable evidence only. Approved tools are executed later by
the agent layer, after the host has atomically admitted a waiting-run replacement and moved its
claim to Started.
Fields§
§mode: ContinuationPreparationModePreparation mode used to validate the evidence.
snapshot: SessionResumeSnapshotCanonical durable snapshot. Waiting checkpoint state is normalized to Waiting in-memory.
Implementations§
Source§impl PreparedContinuation
impl PreparedContinuation
Sourcepub fn ordinary(
snapshot: SessionResumeSnapshot,
) -> Result<Self, ContinuationPreparationError>
pub fn ordinary( snapshot: SessionResumeSnapshot, ) -> Result<Self, ContinuationPreparationError>
Prepare an ordinary context continuation.
§Errors
Returns an error when the snapshot contains inconsistent session/run identities.
Sourcepub fn waiting_hitl(
snapshot: SessionResumeSnapshot,
) -> Result<Self, ContinuationPreparationError>
pub fn waiting_hitl( snapshot: SessionResumeSnapshot, ) -> Result<Self, ContinuationPreparationError>
Prepare a waiting HITL continuation without executing hooks or tools.
§Errors
Returns an error when the source is not waiting, has no checkpoint, or its pending HITL items do not have one matching terminal durable decision/result.
Sourcepub fn waiting_state(&self) -> Option<&AgentRunState>
pub fn waiting_state(&self) -> Option<&AgentRunState>
Return the normalized checkpoint state for a waiting HITL continuation.
Sourcepub fn into_snapshot(self) -> SessionResumeSnapshot
pub fn into_snapshot(self) -> SessionResumeSnapshot
Consume the package and return its canonical snapshot.
Trait Implementations§
Source§impl Clone for PreparedContinuation
impl Clone for PreparedContinuation
Source§fn clone(&self) -> PreparedContinuation
fn clone(&self) -> PreparedContinuation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more