pub struct DistillerEngine { /* private fields */ }Implementations§
Source§impl DistillerEngine
impl DistillerEngine
pub fn new( profile: DistillerProfile, config: DistillerConfig, handle: Arc<dyn DistillerClientHandle>, provider: Arc<dyn AgentMemoryProvider>, tombstones: Arc<dyn TombstoneSource>, transcripts: Arc<dyn TranscriptSource>, compaction: Option<Arc<dyn CompactionDiscardSource>>, tracker: Option<SessionTaintTracker>, realm: impl Into<String>, ) -> Self
Sourcepub fn set_event_sink(&self, sink: Arc<dyn MemoryEventSink>)
pub fn set_event_sink(&self, sink: Arc<dyn MemoryEventSink>)
Wire the §9.3 timeline sink (skipped pre-rotation distillations, budget denials). Also threads it into the engine’s budget guard.
pub fn pre_rotation_timeout(&self) -> Duration
Sourcepub fn set_compaction_follow_up(&self, hook: CompactionFollowUp)
pub fn set_compaction_follow_up(&self, hook: CompactionFollowUp)
Wire the §8.6 post-compaction follow-up (the Hygienist). Invoked after every compaction-cause distillation attempt with its outcome.
Sourcepub fn set_compaction_observed(&self, hook: CompactionObserved)
pub fn set_compaction_observed(&self, hook: CompactionObserved)
Wire the synchronous compaction-observation hook (see
CompactionObserved).
Sourcepub fn distilled_cursor(&self, identity: &str, session_key: &str) -> u64
pub fn distilled_cursor(&self, identity: &str, session_key: &str) -> u64
Transcript index up to which interaction/rotation distillation has
run for (identity, session_key) (§8.4 window cursor). 0 when the
window was never distilled. Read-only: never creates window state.
Sourcepub fn note_session_generation(
&self,
identity: &str,
session_key: &str,
generation: u64,
)
pub fn note_session_generation( &self, identity: &str, session_key: &str, generation: u64, )
Session-context hint from the identity runtime (delivery and
lifecycle paths): binds the continuity generation the session’s
EvidenceRefs carry. Sessions only ever observed (never delivered
to through the runtime) keep generation 0 — documented coarseness,
resolved when an upstream generation fact exists on the stream.
Sourcepub async fn distill_now(
self: &Arc<Self>,
identity: &str,
session_key: &str,
cause: DistillCause,
) -> DistillOutcome
pub async fn distill_now( self: &Arc<Self>, identity: &str, session_key: &str, cause: DistillCause, ) -> DistillOutcome
One extraction run over the window [cursor, end) of
session_key’s transcript (or the compaction-discard harvest for
DistillCause::Compaction). Budget-gated, mutually exclusive with
Recorder writes, evidence-taint-aware through the store’s write gate.
Sourcepub async fn distill_before_rotation(
self: &Arc<Self>,
identity: &str,
session_key: &str,
cause: DistillCause,
)
pub async fn distill_before_rotation( self: &Arc<Self>, identity: &str, session_key: &str, cause: DistillCause, )
Pre-rotation hook body (respawn/retire/delete): bounded, best-effort — rotation proceeds on timeout with a loud skip.
Sourcepub async fn drop_orphaned_session_scope(
self: &Arc<Self>,
session_key: &str,
cause: DistillCause,
)
pub async fn drop_orphaned_session_scope( self: &Arc<Self>, session_key: &str, cause: DistillCause, )
Ask 2 GC: reclaim a permanently-orphaned session’s semantic-memory
rows after its knowledge has been distilled. Best-effort and bounded —
a rotation must never fail on cleanup. Caller MUST have already run
distill_before_rotation for this session and MUST only invoke this
for causes that permanently abandon the session id (respawn/reset mint
a fresh id; delete discards it) — never for resumable retires.
Sourcepub fn spawn_detached(
self: &Arc<Self>,
identity: &str,
session_key: &str,
cause: DistillCause,
)
pub fn spawn_detached( self: &Arc<Self>, identity: &str, session_key: &str, cause: DistillCause, )
Detached distillation (reset / resume-fallback / compaction): never on any critical path. The session store outlives the session, so the read stays valid after teardown.
Trait Implementations§
Source§impl DistillationGate for DistillerEngine
impl DistillationGate for DistillerEngine
Auto Trait Implementations§
impl !Freeze for DistillerEngine
impl !RefUnwindSafe for DistillerEngine
impl !UnwindSafe for DistillerEngine
impl Send for DistillerEngine
impl Sync for DistillerEngine
impl Unpin for DistillerEngine
impl UnsafeUnpin for DistillerEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CoreExecutorTurnFinalizationGuard for Twhere
T: Send,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more