MCPcopy Create free account
hub / github.com/Noumena-Network/code / getDenyRuleForAgent

Function getDenyRuleForAgent

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

Source from the content-addressed store, hash-verified

310 * For example, Agent(Explore) would deny the Explore agent.
311 */
312export 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.

Callers

nothing calls this directly

Calls 1

getDenyRulesFunction · 0.85

Tested by

no test coverage detected