pub struct MnemoEngine {Show 14 fields
pub storage: Arc<dyn StorageBackend>,
pub index: Arc<dyn VectorIndex>,
pub embedding: Arc<dyn EmbeddingProvider>,
pub full_text: Option<Arc<dyn FullTextIndex>>,
pub default_agent_id: String,
pub default_org_id: Option<String>,
pub encryption: Option<Arc<ContentEncryption>>,
pub cold_storage: Option<Arc<dyn ColdStorage>>,
pub cache: Option<Arc<MemoryCache>>,
pub embed_events: bool,
pub ttl_working_seconds: u64,
pub procedural_importance_floor: f32,
pub poisoning_policy: PoisoningPolicy,
pub provenance_signer: Option<Arc<ProvenanceSigner>>,
}Fields§
§storage: Arc<dyn StorageBackend>§index: Arc<dyn VectorIndex>§embedding: Arc<dyn EmbeddingProvider>§full_text: Option<Arc<dyn FullTextIndex>>§default_agent_id: String§default_org_id: Option<String>§encryption: Option<Arc<ContentEncryption>>§cold_storage: Option<Arc<dyn ColdStorage>>§cache: Option<Arc<MemoryCache>>§embed_events: bool§ttl_working_seconds: u64Default TTL applied to Working-tier memories whose remember
request does not supply an explicit ttl_seconds. Defaults to 1 hour.
procedural_importance_floor: f32Importance floor enforced on write for Procedural-tier memories.
Defaults to 0.8.
poisoning_policy: PoisoningPolicyPoisoning policy read by check_for_anomaly. Defaults to the v0.3.2
behaviour (no z-score outlier gate). Override with
MnemoEngine::with_poisoning_policy.
provenance_signer: Option<Arc<ProvenanceSigner>>v0.4.0-rc3 (Task B1) — when set, every
recall(req) with req.with_provenance == Some(true) returns
an HMAC-signed ReadProvenance
receipt. None keeps the recall hot-path overhead at zero.
Attach via MnemoEngine::with_provenance_signer.
Implementations§
Source§impl MnemoEngine
impl MnemoEngine
pub fn new( storage: Arc<dyn StorageBackend>, index: Arc<dyn VectorIndex>, embedding: Arc<dyn EmbeddingProvider>, default_agent_id: String, default_org_id: Option<String>, ) -> Self
Sourcepub fn with_provenance_signer(self, signer: Arc<ProvenanceSigner>) -> Self
pub fn with_provenance_signer(self, signer: Arc<ProvenanceSigner>) -> Self
Attach a provenance::ProvenanceSigner
(Task B1) so callers can request signed read-receipts via
RecallRequest.with_provenance = Some(true).
Sourcepub fn with_poisoning_policy(self, policy: PoisoningPolicy) -> Self
pub fn with_poisoning_policy(self, policy: PoisoningPolicy) -> Self
Attach a poisoning::PoisoningPolicy to the engine. See
poisoning::PoisoningPolicy::with_outlier_threshold for the
v0.3.3 z-score outlier gate.
Sourcepub fn with_ttl_working_seconds(self, seconds: u64) -> Self
pub fn with_ttl_working_seconds(self, seconds: u64) -> Self
Override the default 1-hour TTL applied to Working-tier memories
when a caller does not supply an explicit ttl_seconds.
Sourcepub fn with_procedural_importance_floor(self, floor: f32) -> Self
pub fn with_procedural_importance_floor(self, floor: f32) -> Self
Override the default 0.8 importance floor applied to Procedural memories on write.
pub fn with_full_text(self, ft: Arc<dyn FullTextIndex>) -> Self
pub fn with_encryption(self, enc: Arc<ContentEncryption>) -> Self
pub fn with_cold_storage(self, cs: Arc<dyn ColdStorage>) -> Self
pub fn with_cache(self, c: Arc<MemoryCache>) -> Self
pub fn with_event_embeddings(self) -> Self
pub async fn remember( &self, request: RememberRequest, ) -> Result<RememberResponse>
pub async fn recall(&self, request: RecallRequest) -> Result<RecallResponse>
pub async fn forget(&self, request: ForgetRequest) -> Result<ForgetResponse>
Sourcepub async fn forget_subject(
&self,
request: ForgetSubjectRequest,
) -> Result<ForgetSubjectResponse>
pub async fn forget_subject( &self, request: ForgetSubjectRequest, ) -> Result<ForgetSubjectResponse>
Subject-scoped erasure for GDPR / DPDPA compliance.
See forget::forget_subject for strategy semantics.
Sourcepub async fn run_ttl_sweep(&self) -> Result<TtlReport>
pub async fn run_ttl_sweep(&self) -> Result<TtlReport>
Hard-delete every memory whose expires_at is in the past and emit
one MemoryExpired audit event per deletion.
Sourcepub async fn run_reflection_pass(
&self,
agent_id: Option<String>,
) -> Result<ReflectionReport>
pub async fn run_reflection_pass( &self, agent_id: Option<String>, ) -> Result<ReflectionReport>
Auto-Dream-compatible reflection pass: date absolutization, external
rewrite acceptance, semantic dedup, low-importance conflict
resolution, and stale archival. See reflection::run_reflection_pass.
Sourcepub async fn run_reflection_pass_with_mode(
&self,
agent_id: Option<String>,
mode: ReflectionMode,
force: bool,
) -> Result<ReflectionReport>
pub async fn run_reflection_pass_with_mode( &self, agent_id: Option<String>, mode: ReflectionMode, force: bool, ) -> Result<ReflectionReport>
Reflection pass that honours the new ReflectionMode gate (v0.3.1).
Use Coordinated to avoid double-work when Auto Dream is also running.
Sourcepub async fn replay_quarantine(
&self,
agent_id: Option<String>,
since: Option<&str>,
) -> Result<Vec<QuarantineReplayEntry>>
pub async fn replay_quarantine( &self, agent_id: Option<String>, since: Option<&str>, ) -> Result<Vec<QuarantineReplayEntry>>
List quarantined memories for operator review. See
poisoning::replay_quarantine.
pub async fn checkpoint( &self, request: CheckpointRequest, ) -> Result<CheckpointResponse>
pub async fn branch(&self, request: BranchRequest) -> Result<BranchResponse>
pub async fn merge(&self, request: MergeRequest) -> Result<MergeResponse>
pub async fn replay(&self, request: ReplayRequest) -> Result<ReplayResponse>
pub async fn run_decay_pass( &self, agent_id: Option<String>, archive_threshold: f32, forget_threshold: f32, ) -> Result<DecayPassResult>
pub async fn run_consolidation( &self, agent_id: Option<String>, min_cluster_size: usize, ) -> Result<ConsolidationResult>
pub async fn verify_integrity( &self, agent_id: Option<String>, thread_id: Option<&str>, ) -> Result<ChainVerificationResult>
pub async fn trace_causality( &self, event_id: Uuid, max_depth: usize, ) -> Result<CausalChain>
pub async fn trace_causality_with_options( &self, event_id: Uuid, max_depth: usize, direction: TraceDirection, event_type_filter: Option<EventType>, ) -> Result<CausalChain>
pub async fn verify_event_integrity( &self, agent_id: Option<String>, thread_id: Option<&str>, ) -> Result<ChainVerificationResult>
pub async fn detect_conflicts( &self, agent_id: Option<String>, threshold: f32, ) -> Result<ConflictDetectionResult>
pub async fn resolve_conflict( &self, conflict_pair: &ConflictPair, strategy: ResolutionStrategy, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for MnemoEngine
impl !RefUnwindSafe for MnemoEngine
impl Send for MnemoEngine
impl Sync for MnemoEngine
impl Unpin for MnemoEngine
impl UnsafeUnpin for MnemoEngine
impl !UnwindSafe for MnemoEngine
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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