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