( context: ToolPermissionContext, tool: Tool, behavior: PermissionBehavior, )
| 347 | * e.g. the string key is "prefix:*" from "Bash(prefix:*)" for BashTool |
| 348 | */ |
| 349 | export function getRuleByContentsForTool( |
| 350 | context: ToolPermissionContext, |
| 351 | tool: Tool, |
| 352 | behavior: PermissionBehavior, |
| 353 | ): Map<string, PermissionRule> { |
| 354 | return getRuleByContentsForToolName( |
| 355 | context, |
| 356 | getToolNameForPermissionCheck(tool), |
| 357 | behavior, |
| 358 | ) |
| 359 | } |
| 360 | |
| 361 | // Used to break circular dependency where a Tool calls this function |
| 362 | export function getRuleByContentsForToolName( |
no test coverage detected