Skip to main content

CommandApprover

Trait CommandApprover 

Source
pub trait CommandApprover:
    Send
    + Sync
    + 'static {
    // Required method
    fn approve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
        params: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn approve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tool_name: &'life1 str, params: &'life2 str, ) -> Pin<Box<dyn Future<Output = ApprovalDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Called by ToolRegistry::dispatch() for every destructive tool before execute(). tool_name is the registered tool name; params is the JSON-serialised parameter object passed by the model.

Implementors§