Skip to main content

ApprovalHook

Type Alias ApprovalHook 

Source
pub type ApprovalHook = Arc<dyn Fn(&str, &Value) -> Pin<Box<dyn Future<Output = Result<ApprovalDecision, Error>> + Send>> + Send + Sync>;
Expand description

Async hook invoked before tool execution to check approval.

Receives the tool name and parsed arguments. Returns an ApprovalDecision. When None is returned (no hook registered), all tools are allowed.

Aliased Typeยง

pub struct ApprovalHook { /* private fields */ }