Skip to main content

HistorySearchStore

Trait HistorySearchStore 

Source
pub trait HistorySearchStore: Send + Sync {
    // Required methods
    fn history_snapshot_max_event_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<i64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn history_coverage<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HistoryCoverage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn repair_history_projection<'life0, 'async_trait>(
        &'life0 self,
        max_batches: usize,
    ) -> Pin<Box<dyn Future<Output = Result<ProjectionStats>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn search_history<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        scope: &'life2 HistoryScope,
        limit: usize,
        semantic_sessions: &'life3 HashSet<String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn history_context<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event_id: i64,
        radius: usize,
        scope: &'life1 HistoryScope,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn history_event_for_message_id<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        message_id: &'life1 str,
        scope: &'life2 HistoryScope,
    ) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn history_turn<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        turn_id: &'life1 str,
        scope: &'life2 HistoryScope,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn history_turn_tool_activity<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        turn_id: &'life1 str,
        scope: &'life2 HistoryScope,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryToolActivity>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn history_recent_tool_turns<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        turns: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<RecentToolTurn>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn history_page<'life0, 'life1, 'async_trait>(
        &'life0 self,
        anchor: i64,
        older: bool,
        scope: &'life1 HistoryScope,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn history_task_bookends<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        task_id: Option<&'life1 str>,
        session_id: &'life2 str,
        scope: &'life3 HistoryScope,
    ) -> Pin<Box<dyn Future<Output = Result<TaskBookends>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

Exact-history operations exposed to the search tool through a domain port.

Required Methods§

Source

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

Source

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

Source

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

Source

fn search_history<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, query: &'life1 str, scope: &'life2 HistoryScope, limit: usize, semantic_sessions: &'life3 HashSet<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn history_context<'life0, 'life1, 'async_trait>( &'life0 self, event_id: i64, radius: usize, scope: &'life1 HistoryScope, ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn history_event_for_message_id<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message_id: &'life1 str, scope: &'life2 HistoryScope, ) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn history_turn<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, turn_id: &'life1 str, scope: &'life2 HistoryScope, ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn history_turn_tool_activity<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, turn_id: &'life1 str, scope: &'life2 HistoryScope, ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryToolActivity>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

The tool calls of a turn the scope may read; empty when it may not.

Source

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

Which of the session’s last turns prior user turns ran tools, oldest first. Carries no message or tool content.

Source

fn history_page<'life0, 'life1, 'async_trait>( &'life0 self, anchor: i64, older: bool, scope: &'life1 HistoryScope, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<HistoryMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn history_task_bookends<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, task_id: Option<&'life1 str>, session_id: &'life2 str, scope: &'life3 HistoryScope, ) -> Pin<Box<dyn Future<Output = Result<TaskBookends>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§