MCPcopy Index your code
hub / github.com/anus-dev/ANUS / extractCommands

Function extractCommands

packages/core/src/utils/shell-utils.ts:333–341  ·  view source on GitHub ↗
(tools: string[])

Source from the content-addressed store, hash-verified

331 };
332
333 const extractCommands = (tools: string[]): string[] =>
334 tools.flatMap((tool) => {
335 for (const toolName of SHELL_TOOL_NAMES) {
336 if (tool.startsWith(`${toolName}(`) && tool.endsWith(')')) {
337 return [normalize(tool.slice(toolName.length + 1, -1))];
338 }
339 }
340 return [];
341 });
342
343 const coreTools = config.getCoreTools() || [];
344 const excludeTools = config.getExcludeTools() || [];

Callers 1

checkCommandPermissionsFunction · 0.85

Calls 1

normalizeFunction · 0.85

Tested by

no test coverage detected