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

Function getAllowRules

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

Source from the content-addressed store, hash-verified

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

Callers 5

PermissionRuleListFunction · 0.85
toolAlwaysAllowedRuleFunction · 0.85
detectUnreachableRulesFunction · 0.85

Calls 1

Tested by

no test coverage detected