Skip to main content

MaintenanceManager

Trait MaintenanceManager 

Source
pub trait MaintenanceManager: Send + Sync {
    // Required methods
    fn check_health<'life0, 'async_trait>(
        &'life0 self,
        warn_mb: f64,
        critical_mb: f64,
        max_nodes: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn consolidate<'life0, 'async_trait>(
        &'life0 self,
        prune_days: i64,
        max_summaries: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn compact<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event_type: &'life1 str,
        similarity_threshold: f64,
        min_cluster_size: usize,
        dry_run: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn clear_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn auto_compact<'life0, 'async_trait>(
        &'life0 self,
        count_threshold: usize,
        dry_run: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Maintenance operations for memory store housekeeping.

Required Methods§

Source

fn check_health<'life0, 'async_trait>( &'life0 self, warn_mb: f64, critical_mb: f64, max_nodes: i64, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check database health: size, integrity, node count vs limits.

Source

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

Prune zero-access memories older than prune_days and cap session summaries.

Source

fn compact<'life0, 'life1, 'async_trait>( &'life0 self, event_type: &'life1 str, similarity_threshold: f64, min_cluster_size: usize, dry_run: bool, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Merge near-duplicate memories of a given event type using Jaccard similarity.

Source

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

Delete all memories (and their relationships) for a given session.

Source

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

Auto-compact: sweep all event types that have dedup thresholds, using embedding cosine similarity. Triggered when memory count exceeds count_threshold. Returns summary of compacted clusters.

Implementors§