( context: ToolPermissionContext, tool: Pick<Tool, 'name' | 'mcpInfo'>, )
| 273 | * For example, this finds "Bash" but not "Bash(prefix:*)" for BashTool |
| 274 | */ |
| 275 | export function toolAlwaysAllowedRule( |
| 276 | context: ToolPermissionContext, |
| 277 | tool: Pick<Tool, 'name' | 'mcpInfo'>, |
| 278 | ): PermissionRule | null { |
| 279 | return ( |
| 280 | getAllowRules(context).find(rule => toolMatchesRule(tool, rule)) || null |
| 281 | ) |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * Check if the tool is listed in the always deny rules |
no test coverage detected