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

Function extractMutationPaths

src/agent/read-ledger.ts:49–57  ·  view source on GitHub ↗
(toolName: string, args: unknown)

Source from the content-addressed store, hash-verified

47
48/** Pure: pull the file paths a mutating tool intends to touch. [] for non-gated tools. */
49export function extractMutationPaths(toolName: string, args: unknown): string[] {
50 const fn = MUTATION_PATH_EXTRACTORS[toolName];
51 if (!fn) return [];
52 try {
53 return fn(args);
54 } catch {
55 return [];
56 }
57}
58
59/** Pure: pull the path a read tool just consumed. null for non-read tools. */
60export function extractReadPath(toolName: string, args: unknown): string | null {

Callers 2

executeToolCallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected