pub type PermissionHook = Arc<dyn Fn(&str, &Value) -> PermissionDecision + Send + Sync>;Expand description
Signature for a permission hook: Fn(&tool_name, &arguments) -> PermissionDecision.
The hook is invoked just before each tool execution. It can:
Allowthe call unchanged,Denyit with a reason (fed back as a tool error),Transformthe arguments before execution.
Hooks must be Send + Sync because the agent loop is Send.
Aliased Typeยง
pub struct PermissionHook { /* private fields */ }