Skip to main content

Capability

Trait Capability 

Source
pub trait Capability: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn risk_level(&self) -> RiskLevel;
    fn parameters_schema(&self) -> Value;
    fn source(&self) -> CapabilitySource;
    fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: Value,
        ctx: &'life1 ToolContext,
    ) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn paired_skill(&self) -> Option<&str> { ... }
}
Expand description

Executable capability surface (tool) visible to policy and the LLM catalog.

Required Methods§

Source

fn name(&self) -> &str

Source

fn description(&self) -> &str

Source

fn risk_level(&self) -> RiskLevel

Source

fn parameters_schema(&self) -> Value

Source

fn source(&self) -> CapabilitySource

Source

fn execute<'life0, 'life1, 'async_trait>( &'life0 self, params: Value, ctx: &'life1 ToolContext, ) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn paired_skill(&self) -> Option<&str>

Optional companion skill id/path for capability discovery (e.g. plugin paired_skill).

Implementors§