MCPcopy Create free account
hub / github.com/freecodexyz/free-code / suggestionForPrefix

Function suggestionForPrefix

src/utils/permissions/shellRuleMatching.ts:211–228  ·  view source on GitHub ↗
(
  toolName: string,
  prefix: string,
)

Source from the content-addressed store, hash-verified

209 * Generate permission update suggestion for a prefix match.
210 */
211export function suggestionForPrefix(
212 toolName: string,
213 prefix: string,
214): PermissionUpdate[] {
215 return [
216 {
217 type: 'addRules',
218 rules: [
219 {
220 toolName,
221 ruleContent: `${prefix}:*`,
222 },
223 ],
224 behavior: 'allow',
225 destination: 'localSettings',
226 },
227 ]
228}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected