( context: ToolPermissionContext, agentToolName: string, agentType: string, )
| 310 | * For example, Agent(Explore) would deny the Explore agent. |
| 311 | */ |
| 312 | export function getDenyRuleForAgent( |
| 313 | context: ToolPermissionContext, |
| 314 | agentToolName: string, |
| 315 | agentType: string, |
| 316 | ): PermissionRule | null { |
| 317 | return ( |
| 318 | getDenyRules(context).find( |
| 319 | rule => |
| 320 | rule.ruleValue.toolName === agentToolName && |
| 321 | rule.ruleValue.ruleContent === agentType, |
| 322 | ) || null |
| 323 | ) |
| 324 | } |
| 325 | |
| 326 | /** |
| 327 | * Filter agents to exclude those that are denied via Agent(agentType) syntax. |
nothing calls this directly
no test coverage detected