pub struct CanonicalKernelHost { /* private fields */ }Expand description
The typed prepare → append → commit host boundary for one operation.
Implementations§
Source§impl CanonicalKernelHost
impl CanonicalKernelHost
pub fn new( kernel: CanonicalKernel, journal: Arc<dyn KernelJournal>, operation_id: impl Into<String>, ) -> Result<Self>
pub fn operation_id(&self) -> &str
pub fn journal(&self) -> &Arc<dyn KernelJournal> ⓘ
pub fn lifecycle(&self) -> OperationLifecycle
pub fn pending_effects(&self) -> Vec<KernelEffect>
pub fn terminal(&self) -> Option<KernelTerminal>
pub fn attempt_id(&self, task_id: &str) -> Option<String>
pub fn turn(&self) -> u32
pub fn recovery_content_bytes(&self) -> Option<usize>
pub fn preserved_refs(&self) -> Vec<String>
pub fn count_tokens(&self, text: &str) -> Option<u32>
pub fn local_subagents_spawned(&self) -> usize
pub fn new_messages(&self) -> Vec<Message>
Sourcepub async fn transition(
&self,
envelope: WireEnvelope,
) -> Result<CanonicalTransition>
pub async fn transition( &self, envelope: WireEnvelope, ) -> Result<CanonicalTransition>
Stage the exact serialized typed envelope before attempting its durable append.
Sourcepub async fn drain_outbound_envelope(
&self,
) -> Result<Option<CanonicalTransition>>
pub async fn drain_outbound_envelope( &self, ) -> Result<Option<CanonicalTransition>>
Replays an append-window envelope byte-for-byte after a wake.
Sourcepub async fn restore(&self) -> Result<()>
pub async fn restore(&self) -> Result<()>
Restore the typed kernel solely from the durable journal.
Sourcepub async fn checkpoint(&self) -> Result<InstalledCheckpoint>
pub async fn checkpoint(&self) -> Result<InstalledCheckpoint>
Execute the install → acknowledge → reclaim checkpoint boundary.
pub fn next_observed_at_ms() -> u64
Sourcepub async fn transition_input(
&self,
input: Value,
) -> Result<CanonicalTransition>
pub async fn transition_input( &self, input: Value, ) -> Result<CanonicalTransition>
Build a typed envelope from a JSON wire input object (the five-class taxonomy).
Build a typed envelope with caller-owned identity and observation time.
Durable hosts use this entry point when the input already has a stable delivery identity. Retrying the same input must reuse both values so core can distinguish replay from conflict.
Auto Trait Implementations§
impl !Freeze for CanonicalKernelHost
impl !RefUnwindSafe for CanonicalKernelHost
impl !UnwindSafe for CanonicalKernelHost
impl Send for CanonicalKernelHost
impl Sync for CanonicalKernelHost
impl Unpin for CanonicalKernelHost
impl UnsafeUnpin for CanonicalKernelHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more