()
| 3332 | } |
| 3333 | |
| 3334 | function getReadOnlyToolNames(): string { |
| 3335 | // Ant-native builds alias find/grep to embedded bfs/ugrep and remove the |
| 3336 | // dedicated Glob/Grep tools from the registry, so point at find/grep via |
| 3337 | // Bash instead. |
| 3338 | const tools = hasEmbeddedSearchTools() |
| 3339 | ? [FILE_READ_TOOL_NAME, '`find`', '`grep`'] |
| 3340 | : [FILE_READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME] |
| 3341 | const { allowedTools } = getCurrentProjectConfig() |
| 3342 | // allowedTools is a tool-name allowlist. find/grep are shell commands, not |
| 3343 | // tool names, so the filter is only meaningful for the non-embedded branch. |
| 3344 | const filtered = |
| 3345 | allowedTools && allowedTools.length > 0 && !hasEmbeddedSearchTools() |
| 3346 | ? tools.filter(t => allowedTools.includes(t)) |
| 3347 | : tools |
| 3348 | return filtered.join(', ') |
| 3349 | } |
| 3350 | |
| 3351 | /** |
| 3352 | * Iterative interview-based plan mode workflow. |
no test coverage detected