Skip to main content

RecallCoordinator

Struct RecallCoordinator 

Source
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

Source

pub fn new( provider: Arc<dyn AgentMemoryProvider>, config: AgentMemoryConfig, ) -> Self

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn provider(&self) -> Arc<dyn AgentMemoryProvider>

Source

pub fn config(&self) -> AgentMemoryConfig

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> RecallCoordinator

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more