MCPcopy
hub / github.com/codeaashu/claude-code / getDenyRuleForAgent

Function getDenyRuleForAgent

src/utils/permissions/permissions.ts:308–320  ·  view source on GitHub ↗
(
  context: ToolPermissionContext,
  agentToolName: string,
  agentType: string,
)

Source from the content-addressed store, hash-verified

306 * For example, Agent(Explore) would deny the Explore agent.
307 */
308export function getDenyRuleForAgent(
309 context: ToolPermissionContext,
310 agentToolName: string,
311 agentType: string,
312): PermissionRule | null {
313 return (
314 getDenyRules(context).find(
315 rule =>
316 rule.ruleValue.toolName === agentToolName &&
317 rule.ruleValue.ruleContent === agentType,
318 ) || null
319 )
320}
321
322/**
323 * Filter agents to exclude those that are denied via Agent(agentType) syntax.

Callers 1

callFunction · 0.85

Calls 1

getDenyRulesFunction · 0.85

Tested by

no test coverage detected