pub struct RecallCoordinator { /* private fields */ }Expand description
Deterministic recall coordinator (§9). Cheap to clone; per-session state is shared across clones on purpose (budgets are per session, not per clone).
Implementations§
Source§impl RecallCoordinator
impl RecallCoordinator
pub fn new( provider: Arc<dyn AgentMemoryProvider>, config: AgentMemoryConfig, ) -> Self
Sourcepub fn with_selector(self, selector: Option<Arc<SelectorRuntime>>) -> Self
pub fn with_selector(self, selector: Option<Arc<SelectorRuntime>>) -> Self
Explicit selector injection for embedders and tests; the process-wide
install (memory::selector::install) is what new snapshots.
Sourcepub fn with_operator_resolver(
self,
resolver: Option<Arc<dyn OperatorResolver>>,
) -> Self
pub fn with_operator_resolver( self, resolver: Option<Arc<dyn OperatorResolver>>, ) -> Self
Install the §7.2 provisional operator resolver. Effective only when
the config also opts in (operator_scope = "provisional"); either
half alone leaves composition unchanged.
Sourcepub fn with_mob_resolver(
self,
resolver: Option<Arc<dyn MobScopeResolver>>,
) -> Self
pub fn with_mob_resolver( self, resolver: Option<Arc<dyn MobScopeResolver>>, ) -> Self
Install the §7.2 identity→mob binding resolver so mob scope joins read composition (build index, selector manifest, full sweep). No resolver — or a resolver yielding no mobs — leaves composition unchanged.
Sourcepub fn on_session_compacted(&self, session_key: &str)
pub fn on_session_compacted(&self, session_key: &str)
§9.1 “index-only until compaction”: clear this session’s cross-turn
injection accounting — the dedup set, the cumulative session byte
counter, and any cached sweep-escalation result — so post-compaction
turns may re-inject records whose bodies compacted out of context.
The per-assembly cap is untouched. Wired from the member
CompactionCompleted event by the hosting runtime.
pub fn provider(&self) -> Arc<dyn AgentMemoryProvider> ⓘ
pub fn config(&self) -> AgentMemoryConfig
Sourcepub async fn inject_for_turn(
&self,
identity: &AgentIdentity,
session_key: Option<&str>,
content: &ContentInput,
) -> Result<Vec<ContentInput>, AgentMemoryError>
pub async fn inject_for_turn( &self, identity: &AgentIdentity, session_key: Option<&str>, content: &ContentInput, ) -> Result<Vec<ContentInput>, AgentMemoryError>
Ambient per-turn injection. session_key scopes the cross-turn dedup
and cumulative byte budget; without it only the per-assembly cap holds.
Assemble the ambient per-turn memory recall as a SEPARATE typed
injected-context body (meerkat 0.7.12 ask 1): the return is the
injected_context vector to attach alongside the user’s message, NOT
fused into its text. An empty vector means “inject nothing” (off,
empty query, exhausted budget, or no records) — the caller then
delivers the user content unchanged. Delivering as the typed class is
what makes injection echo-safe (excluded from compaction indexing) and
authenticated (a channel, not a text pattern) rather than the old
fused-into-user-text behavior.
Sourcepub async fn assemble_build_injection(
&self,
identity: &AgentIdentity,
query_text: Option<String>,
query_terms: Vec<String>,
) -> Result<Option<String>, AgentMemoryError>
pub async fn assemble_build_injection( &self, identity: &AgentIdentity, query_text: Option<String>, query_terms: Vec<String>, ) -> Result<Option<String>, AgentMemoryError>
Assemble the build-time injection for customize_build: behavioral
protocol + composed index (manifest-capable providers) + selected
bodies within the P0.1 ladder. Providers without manifest support
(the markdown store) get exactly the pre-coordinator customizer
output — bodies only — so markdown deployments see no behavior
change beyond the envelope nonce.
Sourcepub fn defang_inbound(
&self,
identity: &AgentIdentity,
content: &ContentInput,
) -> ContentInput
pub fn defang_inbound( &self, identity: &AgentIdentity, content: &ContentInput, ) -> ContentInput
Neutralize reserved envelope markers in inbound content before
delivery. Applies to every non-Steer identity-first send (the Steer
exemption is the caller’s), including injection-Off deployments —
forgery is an inbound threat regardless of whether we inject.
agent_memory.defang_inbound = false is the kill switch.
Trait Implementations§
Source§impl Clone for RecallCoordinator
impl Clone for RecallCoordinator
Source§fn clone(&self) -> RecallCoordinator
fn clone(&self) -> RecallCoordinator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RecallCoordinator
impl !UnwindSafe for RecallCoordinator
impl Freeze for RecallCoordinator
impl Send for RecallCoordinator
impl Sync for RecallCoordinator
impl Unpin for RecallCoordinator
impl UnsafeUnpin for RecallCoordinator
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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