pub fn is_tool_allowed(tool_name: &str, auto_approve: AutoApprove) -> boolExpand description
Return whether a tool may run under the selected auto-approve policy.
ยงExamples
use codetether_agent::a2a::worker::AutoApprove;
use codetether_agent::a2a::worker_tool_registry::is_tool_allowed;
assert!(is_tool_allowed("read", AutoApprove::Safe));
assert!(is_tool_allowed("todoread", AutoApprove::Safe));
assert!(!is_tool_allowed("write", AutoApprove::Safe));
assert!(is_tool_allowed("write", AutoApprove::All));