()
| 210 | * NOTE: This MUST stay in sync with https://console.statsig.com/4aF3Ewatb6xPVpCwxb5nA3/dynamic_configs/claude_code_global_system_caching, in order to cache the system prompt across users. |
| 211 | */ |
| 212 | export function getAllBaseTools(): Tools { |
| 213 | if (allBaseToolsCache) { |
| 214 | return allBaseToolsCache |
| 215 | } |
| 216 | |
| 217 | allBaseToolsCache = [ |
| 218 | AgentTool, |
| 219 | TaskOutputTool, |
| 220 | // Ant-native builds have bfs/ugrep embedded in the bun binary (same ARGV0 |
| 221 | // trick as ripgrep). When available, find/grep in NCode's shell are aliased |
| 222 | // to these fast tools, so the dedicated Glob/Grep tools are unnecessary. |
| 223 | ...(hasEmbeddedSearchTools() ? [] : [GlobTool, GrepTool]), |
| 224 | FileReadTool, |
| 225 | BashTool, |
| 226 | ExitPlanModeV2Tool, |
| 227 | FileEditTool, |
| 228 | FileWriteTool, |
| 229 | NotebookEditTool, |
| 230 | WebFetchTool, |
| 231 | TodoWriteTool, |
| 232 | WebSearchTool, |
| 233 | TaskStopTool, |
| 234 | AskUserQuestionTool, |
| 235 | SkillTool, |
| 236 | EnterPlanModeTool, |
| 237 | ...(isInternalBuild() ? [ConfigTool] : []), |
| 238 | ...((process.env.NCODE_BUILD_MODE === 'noumena' || process.env.USER_TYPE === 'noumena') ? [TungstenTool] : []), |
| 239 | ...(SuggestBackgroundPRTool ? [SuggestBackgroundPRTool] : []), |
| 240 | ...(WebBrowserTool ? [WebBrowserTool] : []), |
| 241 | ...(isTodoV2Enabled() |
| 242 | ? [TaskCreateTool, TaskGetTool, TaskUpdateTool, TaskListTool] |
| 243 | : []), |
| 244 | ...(OverflowTestTool ? [OverflowTestTool] : []), |
| 245 | ...(CtxInspectTool ? [CtxInspectTool] : []), |
| 246 | ...(TerminalCaptureTool ? [TerminalCaptureTool] : []), |
| 247 | ...(isEnvTruthy(process.env.ENABLE_LSP_TOOL) ? [LSPTool] : []), |
| 248 | ...(isWorktreeModeEnabled() ? [EnterWorktreeTool, ExitWorktreeTool] : []), |
| 249 | getSendMessageTool(), |
| 250 | ...(ListPeersTool ? [ListPeersTool] : []), |
| 251 | ...(isAgentSwarmsEnabled() |
| 252 | ? [getTeamCreateTool(), getTeamDeleteTool()] |
| 253 | : []), |
| 254 | ...(VerifyPlanExecutionTool ? [VerifyPlanExecutionTool] : []), |
| 255 | ...(isReplModeEnabled() && REPLTool ? [REPLTool] : []), |
| 256 | ...(isJsReplEnabled() && JSReplTool ? [JSReplTool] : []), |
| 257 | ...(isJsReplEnabled() && JSReplResetTool ? [JSReplResetTool] : []), |
| 258 | ...(isPyReplEnabled() && PyReplTool ? [PyReplTool] : []), |
| 259 | ...(isPyReplEnabled() && PyReplResetTool ? [PyReplResetTool] : []), |
| 260 | ...(WorkflowTool ? [WorkflowTool] : []), |
| 261 | ...(SleepTool ? [SleepTool] : []), |
| 262 | ...cronTools, |
| 263 | ...(RemoteTriggerTool ? [RemoteTriggerTool] : []), |
| 264 | ...(MonitorTool ? [MonitorTool] : []), |
| 265 | BriefTool, |
| 266 | ...(SendUserFileTool ? [SendUserFileTool] : []), |
| 267 | ...(PushNotificationTool ? [PushNotificationTool] : []), |
| 268 | ...(SubscribePRTool ? [SubscribePRTool] : []), |
| 269 | ...(getPowerShellTool() ? [getPowerShellTool()] : []), |
no test coverage detected