pub trait CapabilityIndex: Send + Sync {
// Required methods
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
q: &'life1 str,
caps: &'life2 [String],
k: usize,
) -> Pin<Box<dyn Future<Output = Vec<ScoredTool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
t: &'life1 ToolDescriptor,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Semantic top-k search over the registered tools. The default scoring strategy combines verb match, capability overlap, and embedding similarity against the token’s surface form.
Required Methods§
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
q: &'life1 str,
caps: &'life2 [String],
k: usize,
) -> Pin<Box<dyn Future<Output = Vec<ScoredTool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upsert<'life0, 'life1, 'async_trait>(
&'life0 self,
t: &'life1 ToolDescriptor,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".