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

Function getRuleByContentsForTool

src/utils/permissions/permissions.ts:353–363  ·  view source on GitHub ↗
(
  context: ToolPermissionContext,
  tool: Tool,
  behavior: PermissionBehavior,
)

Source from the content-addressed store, hash-verified

351 * e.g. the string key is "prefix:*" from "Bash(prefix:*)" for BashTool
352 */
353export function getRuleByContentsForTool(
354 context: ToolPermissionContext,
355 tool: Tool,
356 behavior: PermissionBehavior,
357): Map<string, PermissionRule> {
358 return getRuleByContentsForToolName(
359 context,
360 getToolNameForPermissionCheck(tool),
361 behavior,
362 )
363}
364
365// Used to break circular dependency where a Tool calls this function
366export function getRuleByContentsForToolName(

Callers 3

checkPermissionsFunction · 0.85
matchingRulesForInputFunction · 0.85
checkPermissionsFunction · 0.85

Calls 2

Tested by

no test coverage detected