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

Function hasBashPermission

src/components/TrustDialog/utils.ts:48–55  ·  view source on GitHub ↗
(rules: PermissionRule[])

Source from the content-addressed store, hash-verified

46}
47
48function hasBashPermission(rules: PermissionRule[]): boolean {
49 return rules.some(
50 rule =>
51 rule.ruleBehavior === 'allow' &&
52 (rule.ruleValue.toolName === BASH_TOOL_NAME ||
53 rule.ruleValue.toolName.startsWith(BASH_TOOL_NAME + '(')),
54 )
55}
56
57/**
58 * Get which setting sources have bash allow rules.

Callers 1

getBashPermissionSourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected