pub struct RuntimeOpsLifecycleRegistry { /* private fields */ }Expand description
Per-runtime shared registry for async operation lifecycle truth.
All canonical lifecycle state mutations are delegated to
[OpsLifecycleAuthority]. This shell manages I/O concerns: watcher
channels, timestamps, peer handles, and snapshot assembly.
Implementations§
Source§impl RuntimeOpsLifecycleRegistry
impl RuntimeOpsLifecycleRegistry
pub fn new() -> Self
pub fn with_config(config: OpsLifecycleConfig) -> Self
Sourcepub fn set_persistence_channel(
&self,
tx: Sender<PersistedOpsSnapshot>,
epoch_id: RuntimeEpochId,
cursor_state: Arc<EpochCursorState>,
)
pub fn set_persistence_channel( &self, tx: Sender<PersistedOpsSnapshot>, epoch_id: RuntimeEpochId, cursor_state: Arc<EpochCursorState>, )
Wire a persistence channel for durable snapshot writes.
After this call, terminal transitions (complete/fail/cancel/abort) capture a snapshot and queue it to the channel. A dedicated persistence task should drain the channel and write to the store.
Sourcepub fn set_detached_wake(&self, wake: Arc<DetachedWakeState>)
pub fn set_detached_wake(&self, wake: Arc<DetachedWakeState>)
Wire the detached-wake state so that execute_effects arms pending
and fires the Notify when a BackgroundToolOp reaches terminal.
Sourcepub fn from_recovered(snapshot: PersistedOpsSnapshot) -> Self
pub fn from_recovered(snapshot: PersistedOpsSnapshot) -> Self
Recover from a persisted snapshot.
Rebuilds the authority (stripping non-terminal ops), creates fresh shell records from specs, and seeds the feed buffer with persisted completion entries.
Sourcepub fn capture_persistence_snapshot(
&self,
epoch_id: RuntimeEpochId,
cursor_state: &EpochCursorState,
) -> PersistedOpsSnapshot
pub fn capture_persistence_snapshot( &self, epoch_id: RuntimeEpochId, cursor_state: &EpochCursorState, ) -> PersistedOpsSnapshot
Capture a serializable snapshot of the current state for persistence.
Includes authority state, operation specs, completion entries, and cursor values. Cursor values may be stale relative to the agent’s true position (monotonic staleness, not atomicity).
Sourcepub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed>
pub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed>
Return a read handle to the completion feed.