MCPcopy Create free account
hub / github.com/PawanOsman/OpenCursor / allowedNamesFor

Function allowedNamesFor

src/agent/loop.ts:192–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190 // Tools the current mode is permitted to invoke (ask/plan = read-only,
191 // plan additionally gets write_plan, agent gets everything).
192 const allowedNamesFor = () =>
193 new Set(
194 toolsForMode(mode)
195 .map((t) => t.schema.function.name)
196 .filter((n) => !disabledToolNames.has(n)),
197 );
198
199 history.push({ kind: "user", text: prompt, attachments: attachments && attachments.length ? attachments : undefined });
200 emit({ type: "run-status", status: "running" });

Callers 1

execFunction · 0.85

Calls 2

toolsForModeFunction · 0.90
hasMethod · 0.80

Tested by

no test coverage detected