(toolName: string, args: unknown)
| 47 | |
| 48 | /** Pure: pull the file paths a mutating tool intends to touch. [] for non-gated tools. */ |
| 49 | export 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. */ |
| 60 | export function extractReadPath(toolName: string, args: unknown): string | null { |
no outgoing calls
no test coverage detected