pub trait ToolConfirmationHandler:
Debug
+ Send
+ Sync {
// Required method
fn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ToolConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ToolConfirmationDecision>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Asynchronous decision source for tool calls that require confirmation.
Front ends and protocol adapters can implement this trait to pause an invocation while a person or an external policy service reviews the exact tool call. When no handler is configured, agents preserve the existing behavior and emit an interrupted confirmation event for a later run.
Required Methods§
Sourcefn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ToolConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ToolConfirmationDecision>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn decide<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ToolConfirmationRequest,
) -> Pin<Box<dyn Future<Output = Result<ToolConfirmationDecision>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Approve or deny one pending tool call.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".