MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getAllowRules

Function getAllowRules

src/utils/permissions/permissions.ts:122–132  ·  view source on GitHub ↗
(
  context: ToolPermissionContext,
)

Source from the content-addressed store, hash-verified

120}
121
122export function getAllowRules(
123 context: ToolPermissionContext,
124): PermissionRule[] {
125 return PERMISSION_RULE_SOURCES.flatMap(source =>
126 (context.alwaysAllowRules[source] || []).map(ruleString => ({
127 source,
128 ruleBehavior: 'allow',
129 ruleValue: permissionRuleValueFromString(ruleString),
130 })),
131 )
132}
133
134/**
135 * Creates a permission request message that explain the permission request

Callers 4

PermissionRuleListFunction · 0.85
toolAlwaysAllowedRuleFunction · 0.85
detectUnreachableRulesFunction · 0.85

Calls 1

Tested by

no test coverage detected