Skip to main content

FactStore

Trait FactStore 

Source
pub trait FactStore: Send + Sync {
Show 38 methods // Required methods fn upsert_fact_with_provenance<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, category: &'life1 str, key: &'life2 str, value: &'life3 str, source: &'life4 str, channel_id: Option<&'life5 str>, privacy: FactPrivacy, first_seen_at: Option<DateTime<Utc>>, source_excerpt: Option<&'life6 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait; fn get_facts<'life0, 'life1, 'async_trait>( &'life0 self, category: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn reconcile_personal_memory<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _write: &'life1 PersonalMemoryWrite, _source: &'life2 str, _source_excerpt: Option<&'life3 str>, _channel_id: Option<&'life4 str>, _privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<PersonalMemoryWriteResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn get_canonical_memory_facts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn record_memory_recall<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _fact_ids: &'life1 [i64], _episode_ids: &'life2 [i64], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn fold_restated_facts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn resolve_numeric_fact_conflicts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn archive_unused_automated_facts<'life0, 'async_trait>( &'life0 self, _now: DateTime<Utc>, _min_idle_days: i64, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fold_fact_into<'life0, 'async_trait>( &'life0 self, _folded_id: i64, _kept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn owner_fold_fact_into<'life0, 'async_trait>( &'life0 self, _folded_id: i64, _kept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn confirm_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn unfold_fact<'life0, 'async_trait>( &'life0 self, _folded_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn refine_automated_fact_value<'life0, 'life1, 'async_trait>( &'life0 self, _fact_id: i64, _new_value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn record_overlap_review<'life0, 'life1, 'async_trait>( &'life0 self, _fact_a_id: i64, _fact_b_id: i64, _verdict: OverlapReviewVerdict, _reviewer: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn has_valid_overlap_review<'life0, 'async_trait>( &'life0 self, _fact_a_id: i64, _fact_b_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<OverlapReviewVerdict>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fact_exists<'life0, 'async_trait>( &'life0 self, fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_fact_by_id<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn job_last_run_at<'life0, 'life1, 'async_trait>( &'life0 self, _job_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn record_job_run_at<'life0, 'life1, 'async_trait>( &'life0 self, _job_name: &'life1 str, _at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn upsert_fact<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, category: &'life1 str, key: &'life2 str, value: &'life3 str, source: &'life4 str, channel_id: Option<&'life5 str>, privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait { ... } fn get_relevant_facts<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 str, max: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_relevant_facts_for_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, query: &'life1 str, max: usize, _channel_id: Option<&'life2 str>, _visibility: ChannelVisibility, _requester_is_owner: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn update_fact_privacy<'life0, 'async_trait>( &'life0 self, _fact_id: i64, _privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn stamp_fact_provenance<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, _source: &'life3 str, _first_seen_at: Option<DateTime<Utc>>, _source_excerpt: Option<&'life4 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn delete_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn delete_fact_by_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn update_fact_value<'life0, 'life1, 'async_trait>( &'life0 self, _fact_id: i64, _value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn archive_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn restore_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_archived_facts<'life0, 'async_trait>( &'life0 self, _limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn archive_expired_facts<'life0, 'async_trait>( &'life0 self, _now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn detect_fact_overlaps<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<i64, i64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_all_facts_with_provenance<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn search_facts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _query: &'life1 str, _limit: usize, _config: &'life2 FactSearchConfig, ) -> Pin<Box<dyn Future<Output = Result<FactSearchReport>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn project_extracted_fact_graph<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, _source_excerpt: &'life3 str, _graph: &'life4 ExtractedMemoryGraph, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn refresh_fact_memory<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn memory_health_report<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MemoryHealthReport>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn repair_memory_projections<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MemoryHealthReport>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Layer-2 facts storage and retrieval (including privacy + channel provenance).

Required Methods§

Source

fn upsert_fact_with_provenance<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, category: &'life1 str, key: &'life2 str, value: &'life3 str, source: &'life4 str, channel_id: Option<&'life5 str>, privacy: FactPrivacy, first_seen_at: Option<DateTime<Utc>>, source_excerpt: Option<&'life6 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

Upsert a fact with full provenance data.

Source

fn get_facts<'life0, 'life1, 'async_trait>( &'life0 self, category: Option<&'life1 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all facts, optionally filtered by category.

Provided Methods§

Source

fn reconcile_personal_memory<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _write: &'life1 PersonalMemoryWrite, _source: &'life2 str, _source_excerpt: Option<&'life3 str>, _channel_id: Option<&'life4 str>, _privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<PersonalMemoryWriteResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Reconcile an entity-aware personal-memory write atomically.

Source

fn get_canonical_memory_facts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Compatibility projection of active canonical facts and relationships.

Source

fn record_memory_recall<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _fact_ids: &'life1 [i64], _episode_ids: &'life2 [i64], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Record that these facts and episodes were shown to a model. Recall counts drive Core Profile salience and decay, so only content that actually reached a prompt or a tool result may count; fetching a candidate that was then cut by a budget is not a recall.

Source

fn fold_restated_facts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Supersede active automated facts that restate another active fact in the same category, keeping the most authoritative copy. Returns how many rows were folded. Soft: superseded rows remain as history.

Source

fn resolve_numeric_fact_conflicts<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retire automated facts that hold an older or farther-sourced value of the attribute another active fact holds (numbers differ, whole facts nearly identical, one visibility class): see crate::sqlite::plan_numeric_conflicts. Owner-stated facts are never retired by an automated one, and two owner-stated values are left for the owner. Returns how many rows were retired.

Source

fn archive_unused_automated_facts<'life0, 'async_trait>( &'life0 self, _now: DateTime<Utc>, _min_idle_days: i64, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reversibly archive background-extracted facts nobody has used: never recalled, not updated for min_idle_days, outside the identity categories. Owner-stated and quoted facts are never touched. min_idle_days <= 0 archives nothing. Returns how many were archived.

Source

fn fold_fact_into<'life0, 'async_trait>( &'life0 self, _folded_id: i64, _kept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fold one active automated fact into another active fact that keeps its knowledge (a reviewed duplicate). Refuses an owner-stated folded_id, a kept_id from a farther source, and a fold that would hide the knowledge from an audience that could see it. Returns whether the fold happened; FactStore::unfold_fact reverses it.

Source

fn owner_fold_fact_into<'life0, 'async_trait>( &'life0 self, _folded_id: i64, _kept_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fold one active flat fact into another active flat fact on an explicit owner action (e.g. tapping Merge in the Memory UI). Allows merging any two active positive flat facts the owner selected, while preserving recall counts, fold tombstones, overlap cleanup, and live projections.

Source

fn confirm_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Promote an active flat fact to owner-confirmed (user_stated) without changing its value, so inferred/derived memories leave “Needs review” in one tap. Returns the updated fact if found.

Source

fn unfold_fact<'life0, 'async_trait>( &'life0 self, _folded_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Bring a folded fact back as active, when no active fact holds its key.

Source

fn refine_automated_fact_value<'life0, 'life1, 'async_trait>( &'life0 self, _fact_id: i64, _new_value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Replace an automated fact’s value (a merged wording of duplicates). Refuses owner-stated facts: their words are the owner’s.

Source

fn record_overlap_review<'life0, 'life1, 'async_trait>( &'life0 self, _fact_a_id: i64, _fact_b_id: i64, _verdict: OverlapReviewVerdict, _reviewer: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record a verdict on two overlapping facts, bound to their current contents.

Source

fn has_valid_overlap_review<'life0, 'async_trait>( &'life0 self, _fact_a_id: i64, _fact_b_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<OverlapReviewVerdict>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The verdict on this pair, if one was given and neither fact has changed since.

Source

fn fact_exists<'life0, 'async_trait>( &'life0 self, fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Whether a fact with this id exists and is not retired (it may be archived).

Source

fn get_fact_by_id<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The fact with this id, if it is not retired (it may be archived).

Source

fn job_last_run_at<'life0, 'life1, 'async_trait>( &'life0 self, _job_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

When the named background memory job last ran.

Source

fn record_job_run_at<'life0, 'life1, 'async_trait>( &'life0 self, _job_name: &'life1 str, _at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record that the named background memory job ran at at.

Source

fn upsert_fact<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, category: &'life1 str, key: &'life2 str, value: &'life3 str, source: &'life4 str, channel_id: Option<&'life5 str>, privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Upsert a fact with channel provenance and privacy level.

Source

fn get_relevant_facts<'life0, 'life1, 'async_trait>( &'life0 self, _query: &'life1 str, max: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get facts semantically relevant to a query, falling back to get_facts on error.

Source

fn get_relevant_facts_for_channel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, query: &'life1 str, max: usize, _channel_id: Option<&'life2 str>, _visibility: ChannelVisibility, _requester_is_owner: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get facts for a specific channel context, respecting privacy levels.

requester_is_owner controls the DM short-circuit: only the owner sees the full unfiltered graph (incl. Private + other-channel facts) in a 1:1 DM. A non-owner (an allowlisted Guest) gets the same privacy filtering as a group channel — Global + same-channel facts only, never Private or other-channel — so owner secrets can’t leak into a guest’s prompt context.

Source

fn update_fact_privacy<'life0, 'async_trait>( &'life0 self, _fact_id: i64, _privacy: FactPrivacy, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update a fact’s privacy level (e.g., channel → global after approval).

Source

fn stamp_fact_provenance<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, _source: &'life3 str, _first_seen_at: Option<DateTime<Utc>>, _source_excerpt: Option<&'life4 str>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Record where the active fact at this key came from.

Source

fn delete_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Soft-delete a fact by superseding it.

Source

fn delete_fact_by_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Soft-delete a fact by category and key. Returns true if a fact was found and deleted.

Source

fn update_fact_value<'life0, 'life1, 'async_trait>( &'life0 self, _fact_id: i64, _value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Edit an active fact’s value in place as an explicit owner update. Supports both positive flat fact ids and negative canonical ids where editable (owner facts and aliases). Returns the updated fact if found.

Source

fn archive_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reversibly archive an active fact so it leaves passive recall without permanent deletion. Returns true if an active fact was archived.

Source

fn restore_fact<'life0, 'async_trait>( &'life0 self, _fact_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Restore a previously archived fact back to active memory.

Source

fn get_archived_facts<'life0, 'async_trait>( &'life0 self, _limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Archived facts available for restore, newest first.

Source

fn archive_expired_facts<'life0, 'async_trait>( &'life0 self, _now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Automatically archive active facts whose typed expires_at has passed.

Source

fn detect_fact_overlaps<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<HashMap<i64, i64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Map of active fact id -> another active fact id that looks like a conceptual duplicate/overlap (for UI review hints).

Source

fn get_all_facts_with_provenance<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Fact>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all active facts with provenance info for memory management display.

Source

fn search_facts<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _query: &'life1 str, _limit: usize, _config: &'life2 FactSearchConfig, ) -> Pin<Box<dyn Future<Output = Result<FactSearchReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Explicit fact search: one ranked list plus query-relevant related facts. Ranking lives in crate::search; a store only gathers facts and scores. The default returns an empty report so stores without search keep compiling.

Source

fn project_extracted_fact_graph<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, _source_excerpt: &'life3 str, _graph: &'life4 ExtractedMemoryGraph, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Persist a model-extracted semantic graph for an already-written fact. Implementations must validate the graph and retain claim provenance.

Source

fn refresh_fact_memory<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _category: &'life1 str, _key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Refresh canonical claim/vector projections for the active fact at this key.

Source

fn memory_health_report<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MemoryHealthReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn repair_memory_projections<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<MemoryHealthReport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§