pub trait ApprovalGate: Send + Sync {
// Required method
fn approve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 dyn DynTool,
metadata: &'life2 ToolMetadata,
arguments: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<ApprovalDecision, MachiError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}Expand description
Host-supplied gate consulted before running tools that need confirmation.
Required Methods§
Sourcefn approve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 dyn DynTool,
metadata: &'life2 ToolMetadata,
arguments: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<ApprovalDecision, MachiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn approve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tool: &'life1 dyn DynTool,
metadata: &'life2 ToolMetadata,
arguments: &'life3 Value,
) -> Pin<Box<dyn Future<Output = Result<ApprovalDecision, MachiError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Decide whether tool may run with arguments.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".