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

Function getRuleByContentsForTool

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

Source from the content-addressed store, hash-verified

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

Callers 3

checkPermissionsFunction · 0.85
matchingRulesForInputFunction · 0.85
checkPermissionsFunction · 0.85

Calls 2

Tested by

no test coverage detected