@machina.ai/cell-cli-core 1.8.2-rc1 → 1.11.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -3
- package/dist/src/agents/codebase-investigator.d.ts +36 -1
- package/dist/src/agents/codebase-investigator.js +93 -34
- package/dist/src/agents/codebase-investigator.js.map +1 -1
- package/dist/src/agents/executor.d.ts +15 -11
- package/dist/src/agents/executor.js +271 -115
- package/dist/src/agents/executor.js.map +1 -1
- package/dist/src/agents/executor.test.js +508 -242
- package/dist/src/agents/executor.test.js.map +1 -1
- package/dist/src/agents/invocation.d.ts +5 -2
- package/dist/src/agents/invocation.js +4 -2
- package/dist/src/agents/invocation.js.map +1 -1
- package/dist/src/agents/invocation.test.js +9 -0
- package/dist/src/agents/invocation.test.js.map +1 -1
- package/dist/src/agents/registry.d.ts +2 -1
- package/dist/src/agents/registry.js +28 -4
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/subagent-tool-wrapper.d.ts +3 -1
- package/dist/src/agents/subagent-tool-wrapper.js +4 -3
- package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
- package/dist/src/agents/subagent-tool-wrapper.test.js +8 -1
- package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
- package/dist/src/agents/types.d.ts +35 -6
- package/dist/src/agents/types.js +1 -0
- package/dist/src/agents/types.js.map +1 -1
- package/dist/src/code_assist/converter.d.ts +1 -0
- package/dist/src/code_assist/converter.js +1 -0
- package/dist/src/code_assist/converter.js.map +1 -1
- package/dist/src/code_assist/converter.test.js +19 -0
- package/dist/src/code_assist/converter.test.js.map +1 -1
- package/dist/src/code_assist/oauth-credential-storage.js +1 -1
- package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
- package/dist/src/code_assist/oauth-credential-storage.test.js +1 -1
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -1
- package/dist/src/code_assist/oauth2.js +13 -12
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +14 -13
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/setup.js +4 -2
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/config/config.d.ts +58 -18
- package/dist/src/config/config.js +125 -36
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +125 -18
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/storage.d.ts +0 -1
- package/dist/src/config/storage.js +2 -2
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +7 -6
- package/dist/src/config/storage.test.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.d.ts +2 -1
- package/dist/src/confirmation-bus/message-bus.js +7 -1
- package/dist/src/confirmation-bus/message-bus.js.map +1 -1
- package/dist/src/confirmation-bus/types.d.ts +12 -2
- package/dist/src/confirmation-bus/types.js +1 -0
- package/dist/src/confirmation-bus/types.js.map +1 -1
- package/dist/src/core/client.d.ts +3 -1
- package/dist/src/core/client.js +70 -19
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +199 -25
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.js +3 -1
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +7 -0
- package/dist/src/core/coreToolScheduler.js +58 -22
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +351 -3
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +7 -11
- package/dist/src/core/geminiChat.js +33 -70
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +93 -228
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/logger.js +11 -10
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/logger.test.js +2 -2
- package/dist/src/core/logger.test.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.d.ts +3 -2
- package/dist/src/core/nonInteractiveToolExecutor.js +2 -2
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +11 -8
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.d.ts +2 -1
- package/dist/src/core/prompts.js +58 -123
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +83 -29
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +16 -2
- package/dist/src/core/turn.js +15 -2
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/core/turn.test.js +62 -2
- package/dist/src/core/turn.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/ide/detect-ide.test.js +11 -0
- package/dist/src/ide/detect-ide.test.js.map +1 -1
- package/dist/src/ide/ide-client.js +5 -4
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-client.test.js +4 -4
- package/dist/src/ide/ide-installer.js +1 -1
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/ide-installer.test.js +13 -1
- package/dist/src/ide/ide-installer.test.js.map +1 -1
- package/dist/src/ide/process-utils.js +85 -75
- package/dist/src/ide/process-utils.js.map +1 -1
- package/dist/src/ide/process-utils.test.js +83 -90
- package/dist/src/ide/process-utils.test.js.map +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.js +21 -20
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-utils.js +9 -8
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/mcp/oauth-utils.test.js +13 -2
- package/dist/src/mcp/oauth-utils.test.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js +2 -1
- package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.test.js +4 -3
- package/dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -1
- package/dist/src/output/stream-json-formatter.d.ts +32 -0
- package/dist/src/output/stream-json-formatter.js +52 -0
- package/dist/src/output/stream-json-formatter.js.map +1 -0
- package/dist/src/output/stream-json-formatter.test.js +479 -0
- package/dist/src/output/stream-json-formatter.test.js.map +1 -0
- package/dist/src/output/types.d.ts +63 -1
- package/dist/src/output/types.js +11 -0
- package/dist/src/output/types.js.map +1 -1
- package/dist/src/prompts/prompt-registry.js +2 -1
- package/dist/src/prompts/prompt-registry.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.js +3 -2
- package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +2 -1
- package/dist/src/services/chatRecordingService.js +2 -1
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/loopDetectionService.js +3 -2
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +1 -0
- package/dist/src/services/shellExecutionService.js +177 -91
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +113 -12
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/telemetry/activity-monitor.d.ts +116 -0
- package/dist/src/telemetry/activity-monitor.js +209 -0
- package/dist/src/telemetry/activity-monitor.js.map +1 -0
- package/dist/src/telemetry/activity-monitor.test.d.ts +6 -0
- package/dist/src/telemetry/activity-monitor.test.js +248 -0
- package/dist/src/telemetry/activity-monitor.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +15 -2
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +154 -31
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +84 -15
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +16 -3
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +38 -5
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/constants.d.ts +0 -28
- package/dist/src/telemetry/constants.js +0 -29
- package/dist/src/telemetry/constants.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +6 -3
- package/dist/src/telemetry/index.js +12 -4
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +8 -2
- package/dist/src/telemetry/loggers.js +165 -299
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +213 -21
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/memory-monitor.d.ts +149 -0
- package/dist/src/telemetry/memory-monitor.js +335 -0
- package/dist/src/telemetry/memory-monitor.js.map +1 -0
- package/dist/src/telemetry/memory-monitor.test.d.ts +6 -0
- package/dist/src/telemetry/memory-monitor.test.js +472 -0
- package/dist/src/telemetry/memory-monitor.test.js.map +1 -0
- package/dist/src/telemetry/metrics.d.ts +131 -4
- package/dist/src/telemetry/metrics.js +182 -6
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +360 -1
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/sdk.js +3 -2
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/telemetryAttributes.d.ts +8 -0
- package/dist/src/telemetry/telemetryAttributes.js +18 -0
- package/dist/src/telemetry/telemetryAttributes.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +163 -7
- package/dist/src/telemetry/types.js +691 -38
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.d.ts +1 -1
- package/dist/src/telemetry/uiTelemetry.js +1 -1
- package/dist/src/telemetry/uiTelemetry.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
- package/dist/src/tools/edit.js +8 -7
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +0 -1
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.d.ts +3 -2
- package/dist/src/tools/glob.js +8 -7
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/grep.d.ts +3 -2
- package/dist/src/tools/grep.js +20 -14
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/ls.d.ts +3 -2
- package/dist/src/tools/ls.js +8 -7
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.d.ts +2 -9
- package/dist/src/tools/mcp-client-manager.js +6 -14
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +16 -6
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +3 -2
- package/dist/src/tools/mcp-client.js +49 -52
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +168 -5
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +2 -1
- package/dist/src/tools/mcp-tool.js +7 -3
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +2 -2
- package/dist/src/tools/memoryTool.js +4 -4
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +9 -8
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/message-bus-integration.test.js +14 -1
- package/dist/src/tools/message-bus-integration.test.js.map +1 -1
- package/dist/src/tools/read-file.d.ts +4 -3
- package/dist/src/tools/read-file.js +9 -8
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +4 -3
- package/dist/src/tools/read-many-files.js +11 -8
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +0 -1
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.d.ts +3 -2
- package/dist/src/tools/ripGrep.js +47 -17
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +106 -60
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +1 -1
- package/dist/src/tools/shell.js +31 -14
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +63 -9
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +1 -20
- package/dist/src/tools/smart-edit.js +64 -61
- package/dist/src/tools/smart-edit.js.map +1 -1
- package/dist/src/tools/smart-edit.test.js +70 -87
- package/dist/src/tools/smart-edit.test.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +21 -0
- package/dist/src/tools/tool-error.js +27 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tool-names.d.ts +17 -0
- package/dist/src/tools/tool-names.js +21 -0
- package/dist/src/tools/tool-names.js.map +1 -0
- package/dist/src/tools/tool-registry.js +4 -3
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tools.d.ts +17 -10
- package/dist/src/tools/tools.js +54 -39
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/web-fetch.d.ts +11 -3
- package/dist/src/tools/web-fetch.js +90 -32
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +388 -8
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +4 -3
- package/dist/src/tools/web-search.js +10 -7
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +1 -1
- package/dist/src/tools/write-file.js +3 -2
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +0 -1
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/tools/write-todos.d.ts +3 -8
- package/dist/src/tools/write-todos.js +14 -7
- package/dist/src/tools/write-todos.js.map +1 -1
- package/dist/src/tools/write-todos.test.js +2 -2
- package/dist/src/tools/write-todos.test.js.map +1 -1
- package/dist/src/utils/bfsFileSearch.js +3 -2
- package/dist/src/utils/bfsFileSearch.js.map +1 -1
- package/dist/src/utils/debugLogger.d.ts +25 -0
- package/dist/src/utils/debugLogger.js +33 -0
- package/dist/src/utils/debugLogger.js.map +1 -0
- package/dist/src/utils/debugLogger.test.d.ts +6 -0
- package/dist/src/utils/debugLogger.test.js +67 -0
- package/dist/src/utils/debugLogger.test.js.map +1 -0
- package/dist/src/utils/delay.d.ts +16 -0
- package/dist/src/utils/delay.js +43 -0
- package/dist/src/utils/delay.js.map +1 -0
- package/dist/src/utils/delay.test.d.ts +6 -0
- package/dist/src/utils/delay.test.js +88 -0
- package/dist/src/utils/delay.test.js.map +1 -0
- package/dist/src/utils/editCorrector.js +6 -10
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +3 -5
- package/dist/src/utils/editCorrector.test.js.map +1 -1
- package/dist/src/utils/editor.js +33 -37
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +1 -0
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/environmentContext.js +0 -33
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/environmentContext.test.js +0 -34
- package/dist/src/utils/environmentContext.test.js.map +1 -1
- package/dist/src/utils/fetch.d.ts +1 -0
- package/dist/src/utils/fetch.js +9 -0
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/fileUtils.d.ts +4 -0
- package/dist/src/utils/fileUtils.js +34 -2
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/fileUtils.test.js +12 -1
- package/dist/src/utils/fileUtils.test.js.map +1 -1
- package/dist/src/utils/formatters.d.ts +1 -0
- package/dist/src/utils/formatters.js +2 -1
- package/dist/src/utils/formatters.js.map +1 -1
- package/dist/src/utils/formatters.test.d.ts +6 -0
- package/dist/src/utils/formatters.test.js +26 -0
- package/dist/src/utils/formatters.test.js.map +1 -0
- package/dist/src/utils/getFolderStructure.js +2 -1
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/getFolderStructure.test.js +7 -6
- package/dist/src/utils/getFolderStructure.test.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.js +7 -6
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +30 -0
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/installationManager.test.js +2 -1
- package/dist/src/utils/installationManager.test.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.js +5 -4
- package/dist/src/utils/llm-edit-fixer.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.d.ts +3 -1
- package/dist/src/utils/memoryDiscovery.js +14 -12
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +136 -36
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.js +3 -2
- package/dist/src/utils/memoryImportProcessor.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.js +2 -1
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
- package/dist/src/utils/pathCorrector.d.ts +25 -0
- package/dist/src/utils/pathCorrector.js +33 -0
- package/dist/src/utils/pathCorrector.js.map +1 -0
- package/dist/src/utils/pathCorrector.test.d.ts +6 -0
- package/dist/src/utils/pathCorrector.test.js +83 -0
- package/dist/src/utils/pathCorrector.test.js.map +1 -0
- package/dist/src/utils/retry.d.ts +3 -1
- package/dist/src/utils/retry.js +44 -33
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +102 -40
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/src/utils/safeJsonStringify.d.ts +4 -4
- package/dist/src/utils/safeJsonStringify.js +31 -7
- package/dist/src/utils/safeJsonStringify.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +15 -2
- package/dist/src/utils/shell-utils.js +354 -137
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +154 -60
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/systemEncoding.js +5 -4
- package/dist/src/utils/systemEncoding.js.map +1 -1
- package/dist/src/utils/tool-utils.d.ts +2 -2
- package/dist/src/utils/tool-utils.js +15 -6
- package/dist/src/utils/tool-utils.js.map +1 -1
- package/dist/src/utils/tool-utils.test.js +8 -0
- package/dist/src/utils/tool-utils.test.js.map +1 -1
- package/dist/src/utils/userAccountManager.js +5 -4
- package/dist/src/utils/userAccountManager.js.map +1 -1
- package/dist/src/utils/userAccountManager.test.js +2 -1
- package/dist/src/utils/userAccountManager.test.js.map +1 -1
- package/dist/src/utils/workspaceContext.js +2 -1
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/dist/src/core/subagent.d.ts +0 -236
- package/dist/src/core/subagent.js +0 -482
- package/dist/src/core/subagent.js.map +0 -1
- package/dist/src/core/subagent.test.js +0 -530
- package/dist/src/core/subagent.test.js.map +0 -1
- /package/dist/src/{core/subagent.test.d.ts → output/stream-json-formatter.test.d.ts} +0 -0
|
@@ -29,6 +29,7 @@ import { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
|
29
29
|
import { PolicyEngine } from '../policy/policy-engine.js';
|
|
30
30
|
import type { PolicyEngineConfig } from '../policy/types.js';
|
|
31
31
|
import type { UserTierId } from '../code_assist/types.js';
|
|
32
|
+
import { AgentRegistry } from '../agents/registry.js';
|
|
32
33
|
export declare enum ApprovalMode {
|
|
33
34
|
DEFAULT = "default",
|
|
34
35
|
AUTO_EDIT = "autoEdit",
|
|
@@ -59,12 +60,29 @@ export interface TelemetrySettings {
|
|
|
59
60
|
export interface OutputSettings {
|
|
60
61
|
format?: OutputFormat;
|
|
61
62
|
}
|
|
63
|
+
export interface CodebaseInvestigatorSettings {
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
maxNumTurns?: number;
|
|
66
|
+
maxTimeMinutes?: number;
|
|
67
|
+
thinkingBudget?: number;
|
|
68
|
+
model?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* All information required in CLI to handle an extension. Defined in Core so
|
|
72
|
+
* that the collection of loaded, active, and inactive extensions can be passed
|
|
73
|
+
* around on the config object though Core does not use this information
|
|
74
|
+
* directly.
|
|
75
|
+
*/
|
|
62
76
|
export interface GeminiCLIExtension {
|
|
63
77
|
name: string;
|
|
64
78
|
version: string;
|
|
65
79
|
isActive: boolean;
|
|
66
80
|
path: string;
|
|
67
81
|
installMetadata?: ExtensionInstallMetadata;
|
|
82
|
+
mcpServers?: Record<string, MCPServerConfig>;
|
|
83
|
+
contextFiles: string[];
|
|
84
|
+
excludeTools?: string[];
|
|
85
|
+
id: string;
|
|
68
86
|
}
|
|
69
87
|
export interface ExtensionInstallMetadata {
|
|
70
88
|
source: string;
|
|
@@ -72,11 +90,12 @@ export interface ExtensionInstallMetadata {
|
|
|
72
90
|
releaseTag?: string;
|
|
73
91
|
ref?: string;
|
|
74
92
|
autoUpdate?: boolean;
|
|
93
|
+
allowPreRelease?: boolean;
|
|
75
94
|
}
|
|
76
95
|
import type { FileFilteringOptions } from './constants.js';
|
|
77
|
-
import {
|
|
96
|
+
import { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS } from './constants.js';
|
|
78
97
|
export type { FileFilteringOptions };
|
|
79
|
-
export {
|
|
98
|
+
export { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, };
|
|
80
99
|
export declare const DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4000000;
|
|
81
100
|
export declare const DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1000;
|
|
82
101
|
export declare class MCPServerConfig {
|
|
@@ -93,12 +112,12 @@ export declare class MCPServerConfig {
|
|
|
93
112
|
readonly description?: string | undefined;
|
|
94
113
|
readonly includeTools?: string[] | undefined;
|
|
95
114
|
readonly excludeTools?: string[] | undefined;
|
|
96
|
-
readonly
|
|
115
|
+
readonly extension?: GeminiCLIExtension | undefined;
|
|
97
116
|
readonly oauth?: MCPOAuthConfig | undefined;
|
|
98
117
|
readonly authProviderType?: AuthProviderType | undefined;
|
|
99
118
|
readonly targetAudience?: string | undefined;
|
|
100
119
|
readonly targetServiceAccount?: string | undefined;
|
|
101
|
-
constructor(command?: string | undefined, args?: string[] | undefined, env?: Record<string, string> | undefined, cwd?: string | undefined, url?: string | undefined, httpUrl?: string | undefined, headers?: Record<string, string> | undefined, tcp?: string | undefined, timeout?: number | undefined, trust?: boolean | undefined, description?: string | undefined, includeTools?: string[] | undefined, excludeTools?: string[] | undefined,
|
|
120
|
+
constructor(command?: string | undefined, args?: string[] | undefined, env?: Record<string, string> | undefined, cwd?: string | undefined, url?: string | undefined, httpUrl?: string | undefined, headers?: Record<string, string> | undefined, tcp?: string | undefined, timeout?: number | undefined, trust?: boolean | undefined, description?: string | undefined, includeTools?: string[] | undefined, excludeTools?: string[] | undefined, extension?: GeminiCLIExtension | undefined, oauth?: MCPOAuthConfig | undefined, authProviderType?: AuthProviderType | undefined, targetAudience?: string | undefined, targetServiceAccount?: string | undefined);
|
|
102
121
|
}
|
|
103
122
|
export declare enum AuthProviderType {
|
|
104
123
|
DYNAMIC_DISCOVERY = "dynamic_discovery",
|
|
@@ -116,7 +135,6 @@ export interface ConfigParameters {
|
|
|
116
135
|
targetDir: string;
|
|
117
136
|
debugMode: boolean;
|
|
118
137
|
question?: string;
|
|
119
|
-
fullContext?: boolean;
|
|
120
138
|
coreTools?: string[];
|
|
121
139
|
allowedTools?: string[];
|
|
122
140
|
excludeTools?: string[];
|
|
@@ -126,6 +144,7 @@ export interface ConfigParameters {
|
|
|
126
144
|
mcpServers?: Record<string, MCPServerConfig>;
|
|
127
145
|
userMemory?: string;
|
|
128
146
|
geminiMdFileCount?: number;
|
|
147
|
+
geminiMdFilePaths?: string[];
|
|
129
148
|
approvalMode?: ApprovalMode;
|
|
130
149
|
showMemoryUsage?: boolean;
|
|
131
150
|
contextFileName?: string | string[];
|
|
@@ -149,18 +168,17 @@ export interface ConfigParameters {
|
|
|
149
168
|
includeDirectories?: string[];
|
|
150
169
|
bugCommand?: BugCommandSettings;
|
|
151
170
|
model: string;
|
|
152
|
-
extensionContextFilePaths?: string[];
|
|
153
171
|
maxSessionTurns?: number;
|
|
154
172
|
experimentalZedIntegration?: boolean;
|
|
155
173
|
listExtensions?: boolean;
|
|
156
174
|
extensions?: GeminiCLIExtension[];
|
|
175
|
+
enabledExtensions?: string[];
|
|
157
176
|
blockedMcpServers?: Array<{
|
|
158
177
|
name: string;
|
|
159
178
|
extensionName: string;
|
|
160
179
|
}>;
|
|
161
180
|
noBrowser?: boolean;
|
|
162
181
|
summarizeToolOutput?: Record<string, SummarizeToolOutputSettings>;
|
|
163
|
-
folderTrustFeature?: boolean;
|
|
164
182
|
folderTrust?: boolean;
|
|
165
183
|
ideMode?: boolean;
|
|
166
184
|
loadMemoryFromIncludeDirectories?: boolean;
|
|
@@ -168,7 +186,7 @@ export interface ConfigParameters {
|
|
|
168
186
|
interactive?: boolean;
|
|
169
187
|
trustedFolder?: boolean;
|
|
170
188
|
useRipgrep?: boolean;
|
|
171
|
-
|
|
189
|
+
enableInteractiveShell?: boolean;
|
|
172
190
|
skipNextSpeakerCheck?: boolean;
|
|
173
191
|
shellExecutionConfig?: ShellExecutionConfig;
|
|
174
192
|
extensionManagement?: boolean;
|
|
@@ -183,10 +201,17 @@ export interface ConfigParameters {
|
|
|
183
201
|
output?: OutputSettings;
|
|
184
202
|
useModelRouter?: boolean;
|
|
185
203
|
enableMessageBusIntegration?: boolean;
|
|
204
|
+
disableModelRouterForAuth?: AuthType[];
|
|
205
|
+
codebaseInvestigatorSettings?: CodebaseInvestigatorSettings;
|
|
206
|
+
continueOnFailedApiCall?: boolean;
|
|
207
|
+
retryFetchErrors?: boolean;
|
|
208
|
+
enableShellOutputEfficiency?: boolean;
|
|
209
|
+
ptyInfo?: string;
|
|
186
210
|
}
|
|
187
211
|
export declare class Config {
|
|
188
212
|
private toolRegistry;
|
|
189
213
|
private promptRegistry;
|
|
214
|
+
private agentRegistry;
|
|
190
215
|
private readonly sessionId;
|
|
191
216
|
private fileSystemService;
|
|
192
217
|
private contentGeneratorConfig;
|
|
@@ -197,7 +222,6 @@ export declare class Config {
|
|
|
197
222
|
private workspaceContext;
|
|
198
223
|
private readonly debugMode;
|
|
199
224
|
private readonly question;
|
|
200
|
-
private readonly fullContext;
|
|
201
225
|
private readonly coreTools;
|
|
202
226
|
private readonly allowedTools;
|
|
203
227
|
private readonly excludeTools;
|
|
@@ -207,6 +231,7 @@ export declare class Config {
|
|
|
207
231
|
private readonly mcpServers;
|
|
208
232
|
private userMemory;
|
|
209
233
|
private geminiMdFileCount;
|
|
234
|
+
private geminiMdFilePaths;
|
|
210
235
|
private approvalMode;
|
|
211
236
|
private readonly showMemoryUsage;
|
|
212
237
|
private readonly accessibility;
|
|
@@ -227,15 +252,14 @@ export declare class Config {
|
|
|
227
252
|
private readonly cwd;
|
|
228
253
|
private readonly bugCommand;
|
|
229
254
|
private model;
|
|
230
|
-
private readonly extensionContextFilePaths;
|
|
231
255
|
private readonly noBrowser;
|
|
232
|
-
private readonly folderTrustFeature;
|
|
233
256
|
private readonly folderTrust;
|
|
234
257
|
private ideMode;
|
|
235
258
|
private inFallbackMode;
|
|
236
259
|
private readonly maxSessionTurns;
|
|
237
260
|
private readonly listExtensions;
|
|
238
261
|
private readonly _extensions;
|
|
262
|
+
private readonly _enabledExtensions;
|
|
239
263
|
private readonly _blockedMcpServers;
|
|
240
264
|
fallbackModelHandler?: FallbackModelHandler;
|
|
241
265
|
private quotaErrorOccurred;
|
|
@@ -244,9 +268,10 @@ export declare class Config {
|
|
|
244
268
|
private readonly loadMemoryFromIncludeDirectories;
|
|
245
269
|
private readonly chatCompression;
|
|
246
270
|
private readonly interactive;
|
|
271
|
+
private readonly ptyInfo;
|
|
247
272
|
private readonly trustedFolder;
|
|
248
273
|
private readonly useRipgrep;
|
|
249
|
-
private readonly
|
|
274
|
+
private readonly enableInteractiveShell;
|
|
250
275
|
private readonly skipNextSpeakerCheck;
|
|
251
276
|
private shellExecutionConfig;
|
|
252
277
|
private readonly extensionManagement;
|
|
@@ -263,8 +288,14 @@ export declare class Config {
|
|
|
263
288
|
private readonly messageBus;
|
|
264
289
|
private readonly policyEngine;
|
|
265
290
|
private readonly outputSettings;
|
|
266
|
-
private
|
|
291
|
+
private useModelRouter;
|
|
292
|
+
private readonly initialUseModelRouter;
|
|
293
|
+
private readonly disableModelRouterForAuth?;
|
|
267
294
|
private readonly enableMessageBusIntegration;
|
|
295
|
+
private readonly codebaseInvestigatorSettings;
|
|
296
|
+
private readonly continueOnFailedApiCall;
|
|
297
|
+
private readonly retryFetchErrors;
|
|
298
|
+
private readonly enableShellOutputEfficiency;
|
|
268
299
|
constructor(params: ConfigParameters);
|
|
269
300
|
/**
|
|
270
301
|
* Must only be called once, throws if called again.
|
|
@@ -294,11 +325,11 @@ export declare class Config {
|
|
|
294
325
|
getTargetDir(): string;
|
|
295
326
|
getProjectRoot(): string;
|
|
296
327
|
getWorkspaceContext(): WorkspaceContext;
|
|
328
|
+
getAgentRegistry(): AgentRegistry;
|
|
297
329
|
getToolRegistry(): ToolRegistry;
|
|
298
330
|
getPromptRegistry(): PromptRegistry;
|
|
299
331
|
getDebugMode(): boolean;
|
|
300
332
|
getQuestion(): string | undefined;
|
|
301
|
-
getFullContext(): boolean;
|
|
302
333
|
getCoreTools(): string[] | undefined;
|
|
303
334
|
getAllowedTools(): string[] | undefined;
|
|
304
335
|
getExcludeTools(): string[] | undefined;
|
|
@@ -310,6 +341,8 @@ export declare class Config {
|
|
|
310
341
|
setUserMemory(newUserMemory: string): void;
|
|
311
342
|
getGeminiMdFileCount(): number;
|
|
312
343
|
setGeminiMdFileCount(count: number): void;
|
|
344
|
+
getGeminiMdFilePaths(): string[];
|
|
345
|
+
setGeminiMdFilePaths(paths: string[]): void;
|
|
313
346
|
getApprovalMode(): ApprovalMode;
|
|
314
347
|
setApprovalMode(mode: ApprovalMode): void;
|
|
315
348
|
getShowMemoryUsage(): boolean;
|
|
@@ -344,11 +377,11 @@ export declare class Config {
|
|
|
344
377
|
getBugCommand(): BugCommandSettings | undefined;
|
|
345
378
|
getFileService(): FileDiscoveryService;
|
|
346
379
|
getUsageStatisticsEnabled(): boolean;
|
|
347
|
-
getExtensionContextFilePaths(): string[];
|
|
348
380
|
getExperimentalZedIntegration(): boolean;
|
|
349
381
|
getListExtensions(): boolean;
|
|
350
382
|
getExtensionManagement(): boolean;
|
|
351
383
|
getExtensions(): GeminiCLIExtension[];
|
|
384
|
+
getEnabledExtensions(): string[];
|
|
352
385
|
getBlockedMcpServers(): Array<{
|
|
353
386
|
name: string;
|
|
354
387
|
extensionName: string;
|
|
@@ -357,12 +390,14 @@ export declare class Config {
|
|
|
357
390
|
isBrowserLaunchSuppressed(): boolean;
|
|
358
391
|
getSummarizeToolOutputConfig(): Record<string, SummarizeToolOutputSettings> | undefined;
|
|
359
392
|
getIdeMode(): boolean;
|
|
360
|
-
|
|
393
|
+
/**
|
|
394
|
+
* Returns 'true' if the folder trust feature is enabled.
|
|
395
|
+
*/
|
|
396
|
+
getFolderTrust(): boolean;
|
|
361
397
|
/**
|
|
362
398
|
* Returns 'true' if the workspace is considered "trusted".
|
|
363
399
|
* 'false' for untrusted.
|
|
364
400
|
*/
|
|
365
|
-
getFolderTrust(): boolean;
|
|
366
401
|
isTrustedFolder(): boolean;
|
|
367
402
|
setIdeMode(value: boolean): void;
|
|
368
403
|
/**
|
|
@@ -374,10 +409,14 @@ export declare class Config {
|
|
|
374
409
|
*/
|
|
375
410
|
setFileSystemService(fileSystemService: FileSystemService): void;
|
|
376
411
|
getChatCompression(): ChatCompressionSettings | undefined;
|
|
412
|
+
isInteractiveShellEnabled(): boolean;
|
|
377
413
|
isInteractive(): boolean;
|
|
378
414
|
getUseRipgrep(): boolean;
|
|
379
|
-
|
|
415
|
+
getEnableInteractiveShell(): boolean;
|
|
380
416
|
getSkipNextSpeakerCheck(): boolean;
|
|
417
|
+
getContinueOnFailedApiCall(): boolean;
|
|
418
|
+
getRetryFetchErrors(): boolean;
|
|
419
|
+
getEnableShellOutputEfficiency(): boolean;
|
|
381
420
|
getShellExecutionConfig(): ShellExecutionConfig;
|
|
382
421
|
setShellExecutionConfig(config: ShellExecutionConfig): void;
|
|
383
422
|
getScreenReader(): boolean;
|
|
@@ -394,6 +433,7 @@ export declare class Config {
|
|
|
394
433
|
getMessageBus(): MessageBus;
|
|
395
434
|
getPolicyEngine(): PolicyEngine;
|
|
396
435
|
getEnableMessageBusIntegration(): boolean;
|
|
436
|
+
getCodebaseInvestigatorSettings(): CodebaseInvestigatorSettings;
|
|
397
437
|
createToolRegistry(): Promise<ToolRegistry>;
|
|
398
438
|
}
|
|
399
439
|
export { DEFAULT_GEMINI_FLASH_MODEL };
|
|
@@ -28,7 +28,7 @@ import { GitService } from '../services/gitService.js';
|
|
|
28
28
|
import { initializeTelemetry, DEFAULT_TELEMETRY_TARGET, DEFAULT_OTLP_ENDPOINT, uiTelemetryService, } from '../telemetry/index.js';
|
|
29
29
|
import { tokenLimit } from '../core/tokenLimits.js';
|
|
30
30
|
import { StartSessionEvent } from '../telemetry/index.js';
|
|
31
|
-
import { DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_GEMINI_FLASH_MODEL, } from './models.js';
|
|
31
|
+
import { DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_GEMINI_FLASH_MODEL, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_THINKING_MODE, } from './models.js';
|
|
32
32
|
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
|
33
33
|
import { ideContextStore } from '../ide/ideContext.js';
|
|
34
34
|
import { WriteTodosTool } from '../tools/write-todos.js';
|
|
@@ -42,15 +42,18 @@ import { Storage } from './storage.js';
|
|
|
42
42
|
import { FileExclusions } from '../utils/ignorePatterns.js';
|
|
43
43
|
import { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
44
44
|
import { PolicyEngine } from '../policy/policy-engine.js';
|
|
45
|
-
import {
|
|
45
|
+
import { AgentRegistry } from '../agents/registry.js';
|
|
46
|
+
import { setGlobalProxy } from '../utils/fetch.js';
|
|
47
|
+
import { SubagentToolWrapper } from '../agents/subagent-tool-wrapper.js';
|
|
46
48
|
export var ApprovalMode;
|
|
47
49
|
(function (ApprovalMode) {
|
|
48
50
|
ApprovalMode["DEFAULT"] = "default";
|
|
49
51
|
ApprovalMode["AUTO_EDIT"] = "autoEdit";
|
|
50
52
|
ApprovalMode["YOLO"] = "yolo";
|
|
51
53
|
})(ApprovalMode || (ApprovalMode = {}));
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
+
import { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, } from './constants.js';
|
|
55
|
+
import { debugLogger } from '../utils/debugLogger.js';
|
|
56
|
+
export { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, };
|
|
54
57
|
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4_000_000;
|
|
55
58
|
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1000;
|
|
56
59
|
export class MCPServerConfig {
|
|
@@ -67,7 +70,7 @@ export class MCPServerConfig {
|
|
|
67
70
|
description;
|
|
68
71
|
includeTools;
|
|
69
72
|
excludeTools;
|
|
70
|
-
|
|
73
|
+
extension;
|
|
71
74
|
oauth;
|
|
72
75
|
authProviderType;
|
|
73
76
|
targetAudience;
|
|
@@ -84,7 +87,7 @@ export class MCPServerConfig {
|
|
|
84
87
|
// Common
|
|
85
88
|
timeout, trust,
|
|
86
89
|
// Metadata
|
|
87
|
-
description, includeTools, excludeTools,
|
|
90
|
+
description, includeTools, excludeTools, extension,
|
|
88
91
|
// OAuth configuration
|
|
89
92
|
oauth, authProviderType,
|
|
90
93
|
// Service Account Configuration
|
|
@@ -105,7 +108,7 @@ export class MCPServerConfig {
|
|
|
105
108
|
this.description = description;
|
|
106
109
|
this.includeTools = includeTools;
|
|
107
110
|
this.excludeTools = excludeTools;
|
|
108
|
-
this.
|
|
111
|
+
this.extension = extension;
|
|
109
112
|
this.oauth = oauth;
|
|
110
113
|
this.authProviderType = authProviderType;
|
|
111
114
|
this.targetAudience = targetAudience;
|
|
@@ -121,6 +124,7 @@ export var AuthProviderType;
|
|
|
121
124
|
export class Config {
|
|
122
125
|
toolRegistry;
|
|
123
126
|
promptRegistry;
|
|
127
|
+
agentRegistry;
|
|
124
128
|
sessionId;
|
|
125
129
|
fileSystemService;
|
|
126
130
|
contentGeneratorConfig;
|
|
@@ -131,7 +135,6 @@ export class Config {
|
|
|
131
135
|
workspaceContext;
|
|
132
136
|
debugMode;
|
|
133
137
|
question;
|
|
134
|
-
fullContext;
|
|
135
138
|
coreTools;
|
|
136
139
|
allowedTools;
|
|
137
140
|
excludeTools;
|
|
@@ -141,6 +144,7 @@ export class Config {
|
|
|
141
144
|
mcpServers;
|
|
142
145
|
userMemory;
|
|
143
146
|
geminiMdFileCount;
|
|
147
|
+
geminiMdFilePaths;
|
|
144
148
|
approvalMode;
|
|
145
149
|
showMemoryUsage;
|
|
146
150
|
accessibility;
|
|
@@ -161,15 +165,14 @@ export class Config {
|
|
|
161
165
|
cwd;
|
|
162
166
|
bugCommand;
|
|
163
167
|
model;
|
|
164
|
-
extensionContextFilePaths;
|
|
165
168
|
noBrowser;
|
|
166
|
-
folderTrustFeature;
|
|
167
169
|
folderTrust;
|
|
168
170
|
ideMode;
|
|
169
171
|
inFallbackMode = false;
|
|
170
172
|
maxSessionTurns;
|
|
171
173
|
listExtensions;
|
|
172
174
|
_extensions;
|
|
175
|
+
_enabledExtensions;
|
|
173
176
|
_blockedMcpServers;
|
|
174
177
|
fallbackModelHandler;
|
|
175
178
|
quotaErrorOccurred = false;
|
|
@@ -178,9 +181,10 @@ export class Config {
|
|
|
178
181
|
loadMemoryFromIncludeDirectories = false;
|
|
179
182
|
chatCompression;
|
|
180
183
|
interactive;
|
|
184
|
+
ptyInfo;
|
|
181
185
|
trustedFolder;
|
|
182
186
|
useRipgrep;
|
|
183
|
-
|
|
187
|
+
enableInteractiveShell;
|
|
184
188
|
skipNextSpeakerCheck;
|
|
185
189
|
shellExecutionConfig;
|
|
186
190
|
extensionManagement = true;
|
|
@@ -198,7 +202,13 @@ export class Config {
|
|
|
198
202
|
policyEngine;
|
|
199
203
|
outputSettings;
|
|
200
204
|
useModelRouter;
|
|
205
|
+
initialUseModelRouter;
|
|
206
|
+
disableModelRouterForAuth;
|
|
201
207
|
enableMessageBusIntegration;
|
|
208
|
+
codebaseInvestigatorSettings;
|
|
209
|
+
continueOnFailedApiCall;
|
|
210
|
+
retryFetchErrors;
|
|
211
|
+
enableShellOutputEfficiency;
|
|
202
212
|
constructor(params) {
|
|
203
213
|
this.sessionId = params.sessionId;
|
|
204
214
|
this.embeddingModel =
|
|
@@ -209,7 +219,6 @@ export class Config {
|
|
|
209
219
|
this.workspaceContext = new WorkspaceContext(this.targetDir, params.includeDirectories ?? []);
|
|
210
220
|
this.debugMode = params.debugMode;
|
|
211
221
|
this.question = params.question;
|
|
212
|
-
this.fullContext = params.fullContext ?? false;
|
|
213
222
|
this.coreTools = params.coreTools;
|
|
214
223
|
this.allowedTools = params.allowedTools;
|
|
215
224
|
this.excludeTools = params.excludeTools;
|
|
@@ -219,6 +228,7 @@ export class Config {
|
|
|
219
228
|
this.mcpServers = params.mcpServers;
|
|
220
229
|
this.userMemory = params.userMemory ?? '';
|
|
221
230
|
this.geminiMdFileCount = params.geminiMdFileCount ?? 0;
|
|
231
|
+
this.geminiMdFilePaths = params.geminiMdFilePaths ?? [];
|
|
222
232
|
this.approvalMode = params.approvalMode ?? ApprovalMode.DEFAULT;
|
|
223
233
|
this.showMemoryUsage = params.showMemoryUsage ?? false;
|
|
224
234
|
this.accessibility = params.accessibility ?? {};
|
|
@@ -233,8 +243,10 @@ export class Config {
|
|
|
233
243
|
};
|
|
234
244
|
this.usageStatisticsEnabled = params.usageStatisticsEnabled ?? true;
|
|
235
245
|
this.fileFiltering = {
|
|
236
|
-
respectGitIgnore: params.fileFiltering?.respectGitIgnore ??
|
|
237
|
-
|
|
246
|
+
respectGitIgnore: params.fileFiltering?.respectGitIgnore ??
|
|
247
|
+
DEFAULT_FILE_FILTERING_OPTIONS.respectGitIgnore,
|
|
248
|
+
respectGeminiIgnore: params.fileFiltering?.respectGeminiIgnore ??
|
|
249
|
+
DEFAULT_FILE_FILTERING_OPTIONS.respectGeminiIgnore,
|
|
238
250
|
enableRecursiveFileSearch: params.fileFiltering?.enableRecursiveFileSearch ?? true,
|
|
239
251
|
disableFuzzySearch: params.fileFiltering?.disableFuzzySearch ?? false,
|
|
240
252
|
};
|
|
@@ -248,25 +260,25 @@ export class Config {
|
|
|
248
260
|
this.fileDiscoveryService = params.fileDiscoveryService ?? null;
|
|
249
261
|
this.bugCommand = params.bugCommand;
|
|
250
262
|
this.model = params.model;
|
|
251
|
-
this.extensionContextFilePaths = params.extensionContextFilePaths ?? [];
|
|
252
263
|
this.maxSessionTurns = params.maxSessionTurns ?? -1;
|
|
253
264
|
this.experimentalZedIntegration =
|
|
254
265
|
params.experimentalZedIntegration ?? false;
|
|
255
266
|
this.listExtensions = params.listExtensions ?? false;
|
|
256
267
|
this._extensions = params.extensions ?? [];
|
|
268
|
+
this._enabledExtensions = params.enabledExtensions ?? [];
|
|
257
269
|
this._blockedMcpServers = params.blockedMcpServers ?? [];
|
|
258
270
|
this.noBrowser = params.noBrowser ?? false;
|
|
259
271
|
this.summarizeToolOutput = params.summarizeToolOutput;
|
|
260
|
-
this.folderTrustFeature = params.folderTrustFeature ?? false;
|
|
261
272
|
this.folderTrust = params.folderTrust ?? false;
|
|
262
273
|
this.ideMode = params.ideMode ?? false;
|
|
263
274
|
this.loadMemoryFromIncludeDirectories =
|
|
264
275
|
params.loadMemoryFromIncludeDirectories ?? false;
|
|
265
276
|
this.chatCompression = params.chatCompression;
|
|
266
277
|
this.interactive = params.interactive ?? false;
|
|
278
|
+
this.ptyInfo = params.ptyInfo ?? 'child_process';
|
|
267
279
|
this.trustedFolder = params.trustedFolder;
|
|
268
280
|
this.useRipgrep = params.useRipgrep ?? true;
|
|
269
|
-
this.
|
|
281
|
+
this.enableInteractiveShell = params.enableInteractiveShell ?? false;
|
|
270
282
|
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? true;
|
|
271
283
|
this.shellExecutionConfig = {
|
|
272
284
|
terminalWidth: params.shellExecutionConfig?.terminalWidth ?? 80,
|
|
@@ -282,19 +294,35 @@ export class Config {
|
|
|
282
294
|
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
|
283
295
|
this.useSmartEdit = params.useSmartEdit ?? true;
|
|
284
296
|
this.useWriteTodos = params.useWriteTodos ?? false;
|
|
285
|
-
this.
|
|
297
|
+
this.initialUseModelRouter = params.useModelRouter ?? false;
|
|
298
|
+
this.useModelRouter = this.initialUseModelRouter;
|
|
299
|
+
this.disableModelRouterForAuth = params.disableModelRouterForAuth ?? [
|
|
300
|
+
AuthType.LOGIN_WITH_GOOGLE,
|
|
301
|
+
];
|
|
286
302
|
this.enableMessageBusIntegration =
|
|
287
303
|
params.enableMessageBusIntegration ?? false;
|
|
304
|
+
this.codebaseInvestigatorSettings = {
|
|
305
|
+
enabled: params.codebaseInvestigatorSettings?.enabled ?? false,
|
|
306
|
+
maxNumTurns: params.codebaseInvestigatorSettings?.maxNumTurns ?? 15,
|
|
307
|
+
maxTimeMinutes: params.codebaseInvestigatorSettings?.maxTimeMinutes ?? 5,
|
|
308
|
+
thinkingBudget: params.codebaseInvestigatorSettings?.thinkingBudget ??
|
|
309
|
+
DEFAULT_THINKING_MODE,
|
|
310
|
+
model: params.codebaseInvestigatorSettings?.model ?? DEFAULT_GEMINI_MODEL,
|
|
311
|
+
};
|
|
312
|
+
this.continueOnFailedApiCall = params.continueOnFailedApiCall ?? true;
|
|
313
|
+
this.enableShellOutputEfficiency =
|
|
314
|
+
params.enableShellOutputEfficiency ?? true;
|
|
288
315
|
this.extensionManagement = params.extensionManagement ?? true;
|
|
289
316
|
this.storage = new Storage(this.targetDir);
|
|
290
317
|
this.enablePromptCompletion = params.enablePromptCompletion ?? false;
|
|
291
318
|
this.fileExclusions = new FileExclusions(this);
|
|
292
319
|
this.eventEmitter = params.eventEmitter;
|
|
293
320
|
this.policyEngine = new PolicyEngine(params.policyEngineConfig);
|
|
294
|
-
this.messageBus = new MessageBus(this.policyEngine);
|
|
321
|
+
this.messageBus = new MessageBus(this.policyEngine, this.debugMode);
|
|
295
322
|
this.outputSettings = {
|
|
296
323
|
format: params.output?.format ?? OutputFormat.TEXT,
|
|
297
324
|
};
|
|
325
|
+
this.retryFetchErrors = params.retryFetchErrors ?? false;
|
|
298
326
|
if (params.contextFileName) {
|
|
299
327
|
setGeminiMdFilename(params.contextFileName);
|
|
300
328
|
}
|
|
@@ -302,7 +330,7 @@ export class Config {
|
|
|
302
330
|
initializeTelemetry(this);
|
|
303
331
|
}
|
|
304
332
|
if (this.getProxy()) {
|
|
305
|
-
|
|
333
|
+
setGlobalProxy(this.getProxy());
|
|
306
334
|
}
|
|
307
335
|
this.geminiClient = new GeminiClient(this);
|
|
308
336
|
this.modelRouterService = new ModelRouterService(this);
|
|
@@ -321,6 +349,8 @@ export class Config {
|
|
|
321
349
|
await this.getGitService();
|
|
322
350
|
}
|
|
323
351
|
this.promptRegistry = new PromptRegistry();
|
|
352
|
+
this.agentRegistry = new AgentRegistry(this);
|
|
353
|
+
await this.agentRegistry.initialize();
|
|
324
354
|
this.toolRegistry = await this.createToolRegistry();
|
|
325
355
|
await this.geminiClient.initialize();
|
|
326
356
|
}
|
|
@@ -328,8 +358,18 @@ export class Config {
|
|
|
328
358
|
return this.contentGenerator;
|
|
329
359
|
}
|
|
330
360
|
async refreshAuth(authMethod, displayMessage) {
|
|
361
|
+
this.useModelRouter = this.initialUseModelRouter;
|
|
362
|
+
if (this.disableModelRouterForAuth?.includes(authMethod)) {
|
|
363
|
+
this.useModelRouter = false;
|
|
364
|
+
if (this.model === DEFAULT_GEMINI_MODEL_AUTO) {
|
|
365
|
+
this.model = DEFAULT_GEMINI_MODEL;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else if (this.useModelRouter && this.model === DEFAULT_GEMINI_MODEL) {
|
|
369
|
+
this.model = DEFAULT_GEMINI_MODEL_AUTO;
|
|
370
|
+
}
|
|
331
371
|
// Vertex and Genai have incompatible encryption and sending history with
|
|
332
|
-
//
|
|
372
|
+
// thoughtSignature from Genai to Vertex will fail, we need to strip them
|
|
333
373
|
if (this.contentGeneratorConfig?.authType === AuthType.USE_GEMINI &&
|
|
334
374
|
authMethod === AuthType.LOGIN_WITH_GOOGLE) {
|
|
335
375
|
// Restore the conversation history to the new client
|
|
@@ -428,6 +468,9 @@ export class Config {
|
|
|
428
468
|
getWorkspaceContext() {
|
|
429
469
|
return this.workspaceContext;
|
|
430
470
|
}
|
|
471
|
+
getAgentRegistry() {
|
|
472
|
+
return this.agentRegistry;
|
|
473
|
+
}
|
|
431
474
|
getToolRegistry() {
|
|
432
475
|
return this.toolRegistry;
|
|
433
476
|
}
|
|
@@ -440,9 +483,6 @@ export class Config {
|
|
|
440
483
|
getQuestion() {
|
|
441
484
|
return this.question;
|
|
442
485
|
}
|
|
443
|
-
getFullContext() {
|
|
444
|
-
return this.fullContext;
|
|
445
|
-
}
|
|
446
486
|
getCoreTools() {
|
|
447
487
|
return this.coreTools;
|
|
448
488
|
}
|
|
@@ -476,6 +516,12 @@ export class Config {
|
|
|
476
516
|
setGeminiMdFileCount(count) {
|
|
477
517
|
this.geminiMdFileCount = count;
|
|
478
518
|
}
|
|
519
|
+
getGeminiMdFilePaths() {
|
|
520
|
+
return this.geminiMdFilePaths;
|
|
521
|
+
}
|
|
522
|
+
setGeminiMdFilePaths(paths) {
|
|
523
|
+
this.geminiMdFilePaths = paths;
|
|
524
|
+
}
|
|
479
525
|
getApprovalMode() {
|
|
480
526
|
return this.approvalMode;
|
|
481
527
|
}
|
|
@@ -583,9 +629,6 @@ export class Config {
|
|
|
583
629
|
getUsageStatisticsEnabled() {
|
|
584
630
|
return this.usageStatisticsEnabled;
|
|
585
631
|
}
|
|
586
|
-
getExtensionContextFilePaths() {
|
|
587
|
-
return this.extensionContextFilePaths;
|
|
588
|
-
}
|
|
589
632
|
getExperimentalZedIntegration() {
|
|
590
633
|
return this.experimentalZedIntegration;
|
|
591
634
|
}
|
|
@@ -598,6 +641,11 @@ export class Config {
|
|
|
598
641
|
getExtensions() {
|
|
599
642
|
return this._extensions;
|
|
600
643
|
}
|
|
644
|
+
// The list of explicitly enabled extensions, if any were given, may contain
|
|
645
|
+
// the string "none".
|
|
646
|
+
getEnabledExtensions() {
|
|
647
|
+
return this._enabledExtensions;
|
|
648
|
+
}
|
|
601
649
|
getBlockedMcpServers() {
|
|
602
650
|
return this._blockedMcpServers;
|
|
603
651
|
}
|
|
@@ -613,16 +661,16 @@ export class Config {
|
|
|
613
661
|
getIdeMode() {
|
|
614
662
|
return this.ideMode;
|
|
615
663
|
}
|
|
616
|
-
getFolderTrustFeature() {
|
|
617
|
-
return this.folderTrustFeature;
|
|
618
|
-
}
|
|
619
664
|
/**
|
|
620
|
-
* Returns 'true' if the
|
|
621
|
-
* 'false' for untrusted.
|
|
665
|
+
* Returns 'true' if the folder trust feature is enabled.
|
|
622
666
|
*/
|
|
623
667
|
getFolderTrust() {
|
|
624
668
|
return this.folderTrust;
|
|
625
669
|
}
|
|
670
|
+
/**
|
|
671
|
+
* Returns 'true' if the workspace is considered "trusted".
|
|
672
|
+
* 'false' for untrusted.
|
|
673
|
+
*/
|
|
626
674
|
isTrustedFolder() {
|
|
627
675
|
// isWorkspaceTrusted in cli/src/config/trustedFolder.js returns undefined
|
|
628
676
|
// when the file based trust value is unavailable, since it is mainly used
|
|
@@ -658,18 +706,32 @@ export class Config {
|
|
|
658
706
|
getChatCompression() {
|
|
659
707
|
return this.chatCompression;
|
|
660
708
|
}
|
|
709
|
+
isInteractiveShellEnabled() {
|
|
710
|
+
return (this.interactive &&
|
|
711
|
+
this.ptyInfo !== 'child_process' &&
|
|
712
|
+
this.enableInteractiveShell);
|
|
713
|
+
}
|
|
661
714
|
isInteractive() {
|
|
662
715
|
return this.interactive;
|
|
663
716
|
}
|
|
664
717
|
getUseRipgrep() {
|
|
665
718
|
return this.useRipgrep;
|
|
666
719
|
}
|
|
667
|
-
|
|
668
|
-
return this.
|
|
720
|
+
getEnableInteractiveShell() {
|
|
721
|
+
return this.enableInteractiveShell;
|
|
669
722
|
}
|
|
670
723
|
getSkipNextSpeakerCheck() {
|
|
671
724
|
return this.skipNextSpeakerCheck;
|
|
672
725
|
}
|
|
726
|
+
getContinueOnFailedApiCall() {
|
|
727
|
+
return this.continueOnFailedApiCall;
|
|
728
|
+
}
|
|
729
|
+
getRetryFetchErrors() {
|
|
730
|
+
return this.retryFetchErrors;
|
|
731
|
+
}
|
|
732
|
+
getEnableShellOutputEfficiency() {
|
|
733
|
+
return this.enableShellOutputEfficiency;
|
|
734
|
+
}
|
|
673
735
|
getShellExecutionConfig() {
|
|
674
736
|
return this.shellExecutionConfig;
|
|
675
737
|
}
|
|
@@ -732,6 +794,9 @@ export class Config {
|
|
|
732
794
|
getEnableMessageBusIntegration() {
|
|
733
795
|
return this.enableMessageBusIntegration;
|
|
734
796
|
}
|
|
797
|
+
getCodebaseInvestigatorSettings() {
|
|
798
|
+
return this.codebaseInvestigatorSettings;
|
|
799
|
+
}
|
|
735
800
|
async createToolRegistry() {
|
|
736
801
|
const registry = new ToolRegistry(this, this.eventEmitter);
|
|
737
802
|
// helper to create & register core tools that are enabled
|
|
@@ -760,13 +825,13 @@ export class Config {
|
|
|
760
825
|
// the tool registry.
|
|
761
826
|
const messageBusEnabled = this.getEnableMessageBusIntegration();
|
|
762
827
|
if (this.debugMode && messageBusEnabled) {
|
|
763
|
-
|
|
828
|
+
debugLogger.log(`[DEBUG] enableMessageBusIntegration setting: ${messageBusEnabled}`);
|
|
764
829
|
}
|
|
765
830
|
const toolArgs = messageBusEnabled
|
|
766
831
|
? [...args, this.getMessageBus()]
|
|
767
832
|
: args;
|
|
768
833
|
if (this.debugMode && messageBusEnabled) {
|
|
769
|
-
|
|
834
|
+
debugLogger.log(`[DEBUG] Registering ${className} with messageBus: ${messageBusEnabled ? 'YES' : 'NO'}`);
|
|
770
835
|
}
|
|
771
836
|
registry.registerTool(new ToolClass(...toolArgs));
|
|
772
837
|
}
|
|
@@ -809,6 +874,30 @@ export class Config {
|
|
|
809
874
|
if (this.getUseWriteTodos()) {
|
|
810
875
|
registerCoreTool(WriteTodosTool, this);
|
|
811
876
|
}
|
|
877
|
+
// Register Subagents as Tools
|
|
878
|
+
if (this.getCodebaseInvestigatorSettings().enabled) {
|
|
879
|
+
const definition = this.agentRegistry.getDefinition('codebase_investigator');
|
|
880
|
+
if (definition) {
|
|
881
|
+
// We must respect the main allowed/exclude lists for agents too.
|
|
882
|
+
const excludeTools = this.getExcludeTools() || [];
|
|
883
|
+
const allowedTools = this.getAllowedTools();
|
|
884
|
+
const isExcluded = excludeTools.includes(definition.name);
|
|
885
|
+
const isAllowed = !allowedTools || allowedTools.includes(definition.name);
|
|
886
|
+
if (isAllowed && !isExcluded) {
|
|
887
|
+
try {
|
|
888
|
+
const messageBusEnabled = this.getEnableMessageBusIntegration();
|
|
889
|
+
const wrapper = new SubagentToolWrapper(definition, this, messageBusEnabled ? this.getMessageBus() : undefined);
|
|
890
|
+
registry.registerTool(wrapper);
|
|
891
|
+
}
|
|
892
|
+
catch (error) {
|
|
893
|
+
console.error(`Failed to wrap agent '${definition.name}' as a tool:`, error);
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
else if (this.getDebugMode()) {
|
|
897
|
+
debugLogger.log(`[Config] Skipping registration of agent '${definition.name}' due to allow/exclude configuration.`);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
}
|
|
812
901
|
await registry.discoverAllTools();
|
|
813
902
|
return registry;
|
|
814
903
|
}
|