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

Function ratchetAutoDisabled

src/agent/tool-profile.ts:139–147  ·  view source on GitHub ↗
(prevDisabled: string[], prompt: string)

Source from the content-addressed store, hash-verified

137 * are never added mid-session — the tool list only grows. Pure.
138 */
139export function ratchetAutoDisabled(prevDisabled: string[], prompt: string): string[] {
140 if (prevDisabled.length === 0) return prevDisabled;
141 const keep = new Set(prevDisabled);
142 for (const g of GROUPS) {
143 if (!g.keepIfPrompt.test(prompt)) continue;
144 for (const n of [...keep]) if (g.members(n)) keep.delete(n);
145 }
146 return [...keep].sort();
147}

Callers 2

runMethod · 0.85

Calls 1

deleteMethod · 0.80

Tested by

no test coverage detected