MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / deriveAutoDisabledTools

Function deriveAutoDisabledTools

src/agent/tool-profile.ts:120–132  ·  view source on GitHub ↗
(
  infra: InfraSignals,
  prompt: string,
  allNames: string[],
)

Source from the content-addressed store, hash-verified

118 * if EITHER its infrastructure exists OR the prompt mentions it.
119 */
120export function deriveAutoDisabledTools(
121 infra: InfraSignals,
122 prompt: string,
123 allNames: string[],
124): string[] {
125 const out = new Set<string>();
126 for (const g of GROUPS) {
127 if (g.keepIfInfra(infra)) continue;
128 if (g.keepIfPrompt.test(prompt)) continue;
129 for (const n of allNames) if (g.members(n)) out.add(n);
130 }
131 return [...out].sort();
132}
133
134/**
135 * Session ratchet: given the previously auto-disabled set and a NEW prompt,

Callers 2

runMethod · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected