()
| 3685 | } |
| 3686 | |
| 3687 | function getReadOnlyToolNames(): string { |
| 3688 | // Ant-native builds alias find/grep to embedded bfs/ugrep and remove the |
| 3689 | // dedicated Glob/Grep tools from the registry, so point at find/grep via |
| 3690 | // Bash instead. |
| 3691 | const tools = hasEmbeddedSearchTools() |
| 3692 | ? [FILE_READ_TOOL_NAME, '`find`', '`grep`'] |
| 3693 | : [FILE_READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME] |
| 3694 | const { allowedTools } = getCurrentProjectConfig() |
| 3695 | // allowedTools is a tool-name allowlist. find/grep are shell commands, not |
| 3696 | // tool names, so the filter is only meaningful for the non-embedded branch. |
| 3697 | const filtered = |
| 3698 | allowedTools && allowedTools.length > 0 && !hasEmbeddedSearchTools() |
| 3699 | ? tools.filter(t => allowedTools.includes(t)) |
| 3700 | : tools |
| 3701 | return filtered.join(', ') |
| 3702 | } |
| 3703 | |
| 3704 | /** |
| 3705 | * Iterative interview-based plan mode workflow. |
no test coverage detected