@anh3d0nic/qwen-code-termux-ice 21.0.1 → 21.2.0
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/bin/qwen-ice +127 -331
- package/core/ice-core.js +101 -0
- package/core-dist/index.d.ts +6 -0
- package/core-dist/index.js +7 -0
- package/core-dist/index.js.map +1 -0
- package/core-dist/src/__mocks__/fs/promises.d.ts +11 -0
- package/core-dist/src/__mocks__/fs/promises.js +17 -0
- package/core-dist/src/__mocks__/fs/promises.js.map +1 -0
- package/core-dist/src/config/config.d.ts +648 -0
- package/core-dist/src/config/config.js +1374 -0
- package/core-dist/src/config/config.js.map +1 -0
- package/core-dist/src/config/config.test.d.ts +6 -0
- package/core-dist/src/config/config.test.js +1116 -0
- package/core-dist/src/config/config.test.js.map +1 -0
- package/core-dist/src/config/constants.d.ts +11 -0
- package/core-dist/src/config/constants.js +16 -0
- package/core-dist/src/config/constants.js.map +1 -0
- package/core-dist/src/config/models.d.ts +9 -0
- package/core-dist/src/config/models.js +10 -0
- package/core-dist/src/config/models.js.map +1 -0
- package/core-dist/src/config/storage.d.ts +38 -0
- package/core-dist/src/config/storage.js +114 -0
- package/core-dist/src/config/storage.js.map +1 -0
- package/core-dist/src/config/storage.test.d.ts +6 -0
- package/core-dist/src/config/storage.test.js +36 -0
- package/core-dist/src/config/storage.test.js.map +1 -0
- package/core-dist/src/confirmation-bus/message-bus.d.ts +22 -0
- package/core-dist/src/confirmation-bus/message-bus.js +98 -0
- package/core-dist/src/confirmation-bus/message-bus.js.map +1 -0
- package/core-dist/src/confirmation-bus/types.d.ts +104 -0
- package/core-dist/src/confirmation-bus/types.js +16 -0
- package/core-dist/src/confirmation-bus/types.js.map +1 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.d.ts +6 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.js +298 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.js.map +1 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.d.ts +64 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.js +122 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.d.ts +28 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.js +349 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.js +396 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.d.ts +48 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.js +449 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.d.ts +6 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.js +843 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/index.d.ts +9 -0
- package/core-dist/src/core/anthropicContentGenerator/index.js +11 -0
- package/core-dist/src/core/anthropicContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/baseLlmClient.d.ts +48 -0
- package/core-dist/src/core/baseLlmClient.js +98 -0
- package/core-dist/src/core/baseLlmClient.js.map +1 -0
- package/core-dist/src/core/baseLlmClient.test.d.ts +6 -0
- package/core-dist/src/core/baseLlmClient.test.js +319 -0
- package/core-dist/src/core/baseLlmClient.test.js.map +1 -0
- package/core-dist/src/core/client.d.ts +48 -0
- package/core-dist/src/core/client.js +547 -0
- package/core-dist/src/core/client.js.map +1 -0
- package/core-dist/src/core/client.test.d.ts +6 -0
- package/core-dist/src/core/client.test.js +1885 -0
- package/core-dist/src/core/client.test.js.map +1 -0
- package/core-dist/src/core/contentGenerator.d.ts +100 -0
- package/core-dist/src/core/contentGenerator.js +162 -0
- package/core-dist/src/core/contentGenerator.js.map +1 -0
- package/core-dist/src/core/contentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/contentGenerator.test.js +95 -0
- package/core-dist/src/core/contentGenerator.test.js.map +1 -0
- package/core-dist/src/core/coreToolScheduler.d.ts +142 -0
- package/core-dist/src/core/coreToolScheduler.js +872 -0
- package/core-dist/src/core/coreToolScheduler.js.map +1 -0
- package/core-dist/src/core/coreToolScheduler.test.d.ts +6 -0
- package/core-dist/src/core/coreToolScheduler.test.js +2221 -0
- package/core-dist/src/core/coreToolScheduler.test.js.map +1 -0
- package/core-dist/src/core/geminiChat.d.ts +122 -0
- package/core-dist/src/core/geminiChat.js +571 -0
- package/core-dist/src/core/geminiChat.js.map +1 -0
- package/core-dist/src/core/geminiChat.test.d.ts +6 -0
- package/core-dist/src/core/geminiChat.test.js +1276 -0
- package/core-dist/src/core/geminiChat.test.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.d.ts +38 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.js +193 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.js +304 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/index.d.ts +12 -0
- package/core-dist/src/core/geminiContentGenerator/index.js +36 -0
- package/core-dist/src/core/geminiContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.d.ts +6 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.js +34 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.js.map +1 -0
- package/core-dist/src/core/geminiRequest.d.ts +13 -0
- package/core-dist/src/core/geminiRequest.js +11 -0
- package/core-dist/src/core/geminiRequest.js.map +1 -0
- package/core-dist/src/core/geminiRequest.test.d.ts +6 -0
- package/core-dist/src/core/geminiRequest.test.js +73 -0
- package/core-dist/src/core/geminiRequest.test.js.map +1 -0
- package/core-dist/src/core/logger.d.ts +68 -0
- package/core-dist/src/core/logger.js +364 -0
- package/core-dist/src/core/logger.js.map +1 -0
- package/core-dist/src/core/logger.test.d.ts +6 -0
- package/core-dist/src/core/logger.test.js +520 -0
- package/core-dist/src/core/logger.test.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/index.d.ts +6 -0
- package/core-dist/src/core/loggingContentGenerator/index.js +7 -0
- package/core-dist/src/core/loggingContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.d.ts +36 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.js +321 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.js +287 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/modalityDefaults.d.ts +14 -0
- package/core-dist/src/core/modalityDefaults.js +81 -0
- package/core-dist/src/core/modalityDefaults.js.map +1 -0
- package/core-dist/src/core/modalityDefaults.test.d.ts +6 -0
- package/core-dist/src/core/modalityDefaults.test.js +181 -0
- package/core-dist/src/core/modalityDefaults.test.js.map +1 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.d.ts +16 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.js +30 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.js +296 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/constants.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/constants.js +7 -0
- package/core-dist/src/core/openaiContentGenerator/constants.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/converter.d.ts +133 -0
- package/core-dist/src/core/openaiContentGenerator/converter.js +1020 -0
- package/core-dist/src/core/openaiContentGenerator/converter.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.js +1966 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.d.ts +27 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.js +84 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.js +267 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/index.d.ts +21 -0
- package/core-dist/src/core/openaiContentGenerator/index.js +43 -0
- package/core-dist/src/core/openaiContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.d.ts +22 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.js +117 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.js +298 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.d.ts +74 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.js +327 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.js +1143 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/README.md +61 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.d.ts +70 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.js +258 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.js +781 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.d.ts +14 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.js +21 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.js +51 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.d.ts +17 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.js +52 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.js +227 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.js +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.d.ts +17 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.js +25 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.js +66 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.d.ts +8 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.js +21 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.js +152 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.d.ts +26 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.js +2 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.d.ts +157 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.js +390 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.js +585 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.js.map +1 -0
- package/core-dist/src/core/prompts.d.ts +81 -0
- package/core-dist/src/core/prompts.js +996 -0
- package/core-dist/src/core/prompts.js.map +1 -0
- package/core-dist/src/core/prompts.test.d.ts +6 -0
- package/core-dist/src/core/prompts.test.js +485 -0
- package/core-dist/src/core/prompts.test.js.map +1 -0
- package/core-dist/src/core/tokenLimits.d.ts +29 -0
- package/core-dist/src/core/tokenLimits.js +171 -0
- package/core-dist/src/core/tokenLimits.js.map +1 -0
- package/core-dist/src/core/tokenLimits.test.d.ts +1 -0
- package/core-dist/src/core/tokenLimits.test.js +270 -0
- package/core-dist/src/core/tokenLimits.test.js.map +1 -0
- package/core-dist/src/core/turn.d.ts +161 -0
- package/core-dist/src/core/turn.js +197 -0
- package/core-dist/src/core/turn.js.map +1 -0
- package/core-dist/src/core/turn.test.d.ts +6 -0
- package/core-dist/src/core/turn.test.js +817 -0
- package/core-dist/src/core/turn.test.js.map +1 -0
- package/core-dist/src/extension/claude-converter.d.ts +121 -0
- package/core-dist/src/extension/claude-converter.js +572 -0
- package/core-dist/src/extension/claude-converter.js.map +1 -0
- package/core-dist/src/extension/claude-converter.test.d.ts +6 -0
- package/core-dist/src/extension/claude-converter.test.js +305 -0
- package/core-dist/src/extension/claude-converter.test.js.map +1 -0
- package/core-dist/src/extension/extensionManager.d.ts +159 -0
- package/core-dist/src/extension/extensionManager.js +829 -0
- package/core-dist/src/extension/extensionManager.js.map +1 -0
- package/core-dist/src/extension/extensionManager.test.d.ts +6 -0
- package/core-dist/src/extension/extensionManager.test.js +598 -0
- package/core-dist/src/extension/extensionManager.test.js.map +1 -0
- package/core-dist/src/extension/extensionSettings.d.ts +33 -0
- package/core-dist/src/extension/extensionSettings.js +186 -0
- package/core-dist/src/extension/extensionSettings.js.map +1 -0
- package/core-dist/src/extension/extensionSettings.test.d.ts +1 -0
- package/core-dist/src/extension/extensionSettings.test.js +488 -0
- package/core-dist/src/extension/extensionSettings.test.js.map +1 -0
- package/core-dist/src/extension/gemini-converter.d.ts +47 -0
- package/core-dist/src/extension/gemini-converter.js +185 -0
- package/core-dist/src/extension/gemini-converter.js.map +1 -0
- package/core-dist/src/extension/gemini-converter.test.d.ts +6 -0
- package/core-dist/src/extension/gemini-converter.test.js +128 -0
- package/core-dist/src/extension/gemini-converter.test.js.map +1 -0
- package/core-dist/src/extension/github.d.ts +30 -0
- package/core-dist/src/extension/github.js +330 -0
- package/core-dist/src/extension/github.js.map +1 -0
- package/core-dist/src/extension/github.test.d.ts +6 -0
- package/core-dist/src/extension/github.test.js +376 -0
- package/core-dist/src/extension/github.test.js.map +1 -0
- package/core-dist/src/extension/index.d.ts +6 -0
- package/core-dist/src/extension/index.js +7 -0
- package/core-dist/src/extension/index.js.map +1 -0
- package/core-dist/src/extension/marketplace.d.ts +19 -0
- package/core-dist/src/extension/marketplace.js +222 -0
- package/core-dist/src/extension/marketplace.js.map +1 -0
- package/core-dist/src/extension/marketplace.test.d.ts +6 -0
- package/core-dist/src/extension/marketplace.test.js +215 -0
- package/core-dist/src/extension/marketplace.test.js.map +1 -0
- package/core-dist/src/extension/override.d.ts +25 -0
- package/core-dist/src/extension/override.js +82 -0
- package/core-dist/src/extension/override.js.map +1 -0
- package/core-dist/src/extension/override.test.d.ts +6 -0
- package/core-dist/src/extension/override.test.js +94 -0
- package/core-dist/src/extension/override.test.js.map +1 -0
- package/core-dist/src/extension/settings.d.ts +39 -0
- package/core-dist/src/extension/settings.js +116 -0
- package/core-dist/src/extension/settings.js.map +1 -0
- package/core-dist/src/extension/settings.test.d.ts +6 -0
- package/core-dist/src/extension/settings.test.js +125 -0
- package/core-dist/src/extension/settings.test.js.map +1 -0
- package/core-dist/src/extension/storage.d.ts +9 -0
- package/core-dist/src/extension/storage.js +38 -0
- package/core-dist/src/extension/storage.js.map +1 -0
- package/core-dist/src/extension/storage.test.d.ts +6 -0
- package/core-dist/src/extension/storage.test.js +64 -0
- package/core-dist/src/extension/storage.test.js.map +1 -0
- package/core-dist/src/extension/variableSchema.d.ts +40 -0
- package/core-dist/src/extension/variableSchema.js +26 -0
- package/core-dist/src/extension/variableSchema.js.map +1 -0
- package/core-dist/src/extension/variables.d.ts +21 -0
- package/core-dist/src/extension/variables.js +46 -0
- package/core-dist/src/extension/variables.js.map +1 -0
- package/core-dist/src/extension/variables.test.d.ts +6 -0
- package/core-dist/src/extension/variables.test.js +17 -0
- package/core-dist/src/extension/variables.test.js.map +1 -0
- package/core-dist/src/hooks/hookAggregator.d.ts +66 -0
- package/core-dist/src/hooks/hookAggregator.js +280 -0
- package/core-dist/src/hooks/hookAggregator.js.map +1 -0
- package/core-dist/src/hooks/hookAggregator.test.d.ts +6 -0
- package/core-dist/src/hooks/hookAggregator.test.js +449 -0
- package/core-dist/src/hooks/hookAggregator.test.js.map +1 -0
- package/core-dist/src/hooks/hookEventHandler.d.ts +42 -0
- package/core-dist/src/hooks/hookEventHandler.js +127 -0
- package/core-dist/src/hooks/hookEventHandler.js.map +1 -0
- package/core-dist/src/hooks/hookEventHandler.test.d.ts +6 -0
- package/core-dist/src/hooks/hookEventHandler.test.js +183 -0
- package/core-dist/src/hooks/hookEventHandler.test.js.map +1 -0
- package/core-dist/src/hooks/hookPlanner.d.ts +42 -0
- package/core-dist/src/hooks/hookPlanner.js +101 -0
- package/core-dist/src/hooks/hookPlanner.js.map +1 -0
- package/core-dist/src/hooks/hookPlanner.test.d.ts +6 -0
- package/core-dist/src/hooks/hookPlanner.test.js +303 -0
- package/core-dist/src/hooks/hookPlanner.test.js.map +1 -0
- package/core-dist/src/hooks/hookRegistry.d.ts +106 -0
- package/core-dist/src/hooks/hookRegistry.js +225 -0
- package/core-dist/src/hooks/hookRegistry.js.map +1 -0
- package/core-dist/src/hooks/hookRegistry.test.d.ts +6 -0
- package/core-dist/src/hooks/hookRegistry.test.js +539 -0
- package/core-dist/src/hooks/hookRegistry.test.js.map +1 -0
- package/core-dist/src/hooks/hookRunner.d.ts +40 -0
- package/core-dist/src/hooks/hookRunner.js +318 -0
- package/core-dist/src/hooks/hookRunner.js.map +1 -0
- package/core-dist/src/hooks/hookRunner.test.d.ts +6 -0
- package/core-dist/src/hooks/hookRunner.test.js +466 -0
- package/core-dist/src/hooks/hookRunner.test.js.map +1 -0
- package/core-dist/src/hooks/hookSystem.d.ts +43 -0
- package/core-dist/src/hooks/hookSystem.js +75 -0
- package/core-dist/src/hooks/hookSystem.js.map +1 -0
- package/core-dist/src/hooks/hookSystem.test.d.ts +6 -0
- package/core-dist/src/hooks/hookSystem.test.js +237 -0
- package/core-dist/src/hooks/hookSystem.test.js.map +1 -0
- package/core-dist/src/hooks/index.d.ts +16 -0
- package/core-dist/src/hooks/index.js +16 -0
- package/core-dist/src/hooks/index.js.map +1 -0
- package/core-dist/src/hooks/trustedHooks.d.ts +28 -0
- package/core-dist/src/hooks/trustedHooks.js +91 -0
- package/core-dist/src/hooks/trustedHooks.js.map +1 -0
- package/core-dist/src/hooks/types.d.ts +498 -0
- package/core-dist/src/hooks/types.js +292 -0
- package/core-dist/src/hooks/types.js.map +1 -0
- package/core-dist/src/ide/constants.d.ts +9 -0
- package/core-dist/src/ide/constants.js +10 -0
- package/core-dist/src/ide/constants.js.map +1 -0
- package/core-dist/src/ide/detect-ide.d.ts +56 -0
- package/core-dist/src/ide/detect-ide.js +68 -0
- package/core-dist/src/ide/detect-ide.js.map +1 -0
- package/core-dist/src/ide/detect-ide.test.d.ts +6 -0
- package/core-dist/src/ide/detect-ide.test.js +113 -0
- package/core-dist/src/ide/detect-ide.test.js.map +1 -0
- package/core-dist/src/ide/ide-client.d.ts +132 -0
- package/core-dist/src/ide/ide-client.js +750 -0
- package/core-dist/src/ide/ide-client.js.map +1 -0
- package/core-dist/src/ide/ide-client.test.d.ts +6 -0
- package/core-dist/src/ide/ide-client.test.js +463 -0
- package/core-dist/src/ide/ide-client.test.js.map +1 -0
- package/core-dist/src/ide/ide-installer.d.ts +14 -0
- package/core-dist/src/ide/ide-installer.js +112 -0
- package/core-dist/src/ide/ide-installer.js.map +1 -0
- package/core-dist/src/ide/ide-installer.test.d.ts +6 -0
- package/core-dist/src/ide/ide-installer.test.js +134 -0
- package/core-dist/src/ide/ide-installer.test.js.map +1 -0
- package/core-dist/src/ide/ideContext.d.ts +44 -0
- package/core-dist/src/ide/ideContext.js +101 -0
- package/core-dist/src/ide/ideContext.js.map +1 -0
- package/core-dist/src/ide/ideContext.test.d.ts +6 -0
- package/core-dist/src/ide/ideContext.test.js +393 -0
- package/core-dist/src/ide/ideContext.test.js.map +1 -0
- package/core-dist/src/ide/process-utils.d.ts +21 -0
- package/core-dist/src/ide/process-utils.js +170 -0
- package/core-dist/src/ide/process-utils.js.map +1 -0
- package/core-dist/src/ide/process-utils.test.d.ts +6 -0
- package/core-dist/src/ide/process-utils.test.js +130 -0
- package/core-dist/src/ide/process-utils.test.js.map +1 -0
- package/core-dist/src/ide/types.d.ts +486 -0
- package/core-dist/src/ide/types.js +138 -0
- package/core-dist/src/ide/types.js.map +1 -0
- package/core-dist/src/index.d.ts +179 -0
- package/core-dist/src/index.js +225 -0
- package/core-dist/src/index.js.map +1 -0
- package/core-dist/src/index.test.d.ts +6 -0
- package/core-dist/src/index.test.js +12 -0
- package/core-dist/src/index.test.js.map +1 -0
- package/core-dist/src/lsp/LspConfigLoader.d.ts +46 -0
- package/core-dist/src/lsp/LspConfigLoader.js +381 -0
- package/core-dist/src/lsp/LspConfigLoader.js.map +1 -0
- package/core-dist/src/lsp/LspConfigLoader.test.d.ts +6 -0
- package/core-dist/src/lsp/LspConfigLoader.test.js +80 -0
- package/core-dist/src/lsp/LspConfigLoader.test.js.map +1 -0
- package/core-dist/src/lsp/LspConnectionFactory.d.ts +62 -0
- package/core-dist/src/lsp/LspConnectionFactory.js +305 -0
- package/core-dist/src/lsp/LspConnectionFactory.js.map +1 -0
- package/core-dist/src/lsp/LspLanguageDetector.d.ts +39 -0
- package/core-dist/src/lsp/LspLanguageDetector.js +199 -0
- package/core-dist/src/lsp/LspLanguageDetector.js.map +1 -0
- package/core-dist/src/lsp/LspResponseNormalizer.d.ts +122 -0
- package/core-dist/src/lsp/LspResponseNormalizer.js +710 -0
- package/core-dist/src/lsp/LspResponseNormalizer.js.map +1 -0
- package/core-dist/src/lsp/LspServerManager.d.ts +87 -0
- package/core-dist/src/lsp/LspServerManager.js +563 -0
- package/core-dist/src/lsp/LspServerManager.js.map +1 -0
- package/core-dist/src/lsp/NativeLspClient.d.ts +149 -0
- package/core-dist/src/lsp/NativeLspClient.js +169 -0
- package/core-dist/src/lsp/NativeLspClient.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.d.ts +106 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.d.ts +6 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.js +663 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.js +623 -0
- package/core-dist/src/lsp/NativeLspService.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.test.d.ts +6 -0
- package/core-dist/src/lsp/NativeLspService.test.js +99 -0
- package/core-dist/src/lsp/NativeLspService.test.js.map +1 -0
- package/core-dist/src/lsp/constants.d.ts +35 -0
- package/core-dist/src/lsp/constants.js +86 -0
- package/core-dist/src/lsp/constants.js.map +1 -0
- package/core-dist/src/lsp/types.d.ts +409 -0
- package/core-dist/src/lsp/types.js +7 -0
- package/core-dist/src/lsp/types.js.map +1 -0
- package/core-dist/src/mcp/constants.d.ts +22 -0
- package/core-dist/src/mcp/constants.js +23 -0
- package/core-dist/src/mcp/constants.js.map +1 -0
- package/core-dist/src/mcp/google-auth-provider.d.ts +23 -0
- package/core-dist/src/mcp/google-auth-provider.js +75 -0
- package/core-dist/src/mcp/google-auth-provider.js.map +1 -0
- package/core-dist/src/mcp/google-auth-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/google-auth-provider.test.js +89 -0
- package/core-dist/src/mcp/google-auth-provider.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-provider.d.ts +150 -0
- package/core-dist/src/mcp/oauth-provider.js +617 -0
- package/core-dist/src/mcp/oauth-provider.js.map +1 -0
- package/core-dist/src/mcp/oauth-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-provider.test.js +917 -0
- package/core-dist/src/mcp/oauth-provider.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-token-storage.d.ts +65 -0
- package/core-dist/src/mcp/oauth-token-storage.js +182 -0
- package/core-dist/src/mcp/oauth-token-storage.js.map +1 -0
- package/core-dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-token-storage.test.js +307 -0
- package/core-dist/src/mcp/oauth-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-utils.d.ts +124 -0
- package/core-dist/src/mcp/oauth-utils.js +252 -0
- package/core-dist/src/mcp/oauth-utils.js.map +1 -0
- package/core-dist/src/mcp/oauth-utils.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-utils.test.js +220 -0
- package/core-dist/src/mcp/oauth-utils.test.js.map +1 -0
- package/core-dist/src/mcp/sa-impersonation-provider.d.ts +33 -0
- package/core-dist/src/mcp/sa-impersonation-provider.js +133 -0
- package/core-dist/src/mcp/sa-impersonation-provider.js.map +1 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.js +117 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.d.ts +19 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.js +36 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.js +160 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.d.ts +24 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.js +144 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.js +235 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.d.ts +23 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.js +78 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.js +193 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/index.d.ts +11 -0
- package/core-dist/src/mcp/token-storage/index.js +12 -0
- package/core-dist/src/mcp/token-storage/index.js.map +1 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.d.ts +35 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.js +248 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.js +254 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/types.d.ts +38 -0
- package/core-dist/src/mcp/token-storage/types.js +11 -0
- package/core-dist/src/mcp/token-storage/types.js.map +1 -0
- package/core-dist/src/mocks/msw.d.ts +6 -0
- package/core-dist/src/mocks/msw.js +8 -0
- package/core-dist/src/mocks/msw.js.map +1 -0
- package/core-dist/src/models/constants.d.ts +71 -0
- package/core-dist/src/models/constants.js +92 -0
- package/core-dist/src/models/constants.js.map +1 -0
- package/core-dist/src/models/index.d.ts +10 -0
- package/core-dist/src/models/index.js +12 -0
- package/core-dist/src/models/index.js.map +1 -0
- package/core-dist/src/models/modelConfigErrors.d.ts +46 -0
- package/core-dist/src/models/modelConfigErrors.js +87 -0
- package/core-dist/src/models/modelConfigErrors.js.map +1 -0
- package/core-dist/src/models/modelConfigResolver.d.ts +84 -0
- package/core-dist/src/models/modelConfigResolver.js +204 -0
- package/core-dist/src/models/modelConfigResolver.js.map +1 -0
- package/core-dist/src/models/modelConfigResolver.test.d.ts +6 -0
- package/core-dist/src/models/modelConfigResolver.test.js +302 -0
- package/core-dist/src/models/modelConfigResolver.test.js.map +1 -0
- package/core-dist/src/models/modelRegistry.d.ts +55 -0
- package/core-dist/src/models/modelRegistry.js +182 -0
- package/core-dist/src/models/modelRegistry.js.map +1 -0
- package/core-dist/src/models/modelRegistry.test.d.ts +6 -0
- package/core-dist/src/models/modelRegistry.test.js +408 -0
- package/core-dist/src/models/modelRegistry.test.js.map +1 -0
- package/core-dist/src/models/modelsConfig.d.ts +343 -0
- package/core-dist/src/models/modelsConfig.js +957 -0
- package/core-dist/src/models/modelsConfig.js.map +1 -0
- package/core-dist/src/models/modelsConfig.test.d.ts +6 -0
- package/core-dist/src/models/modelsConfig.test.js +1242 -0
- package/core-dist/src/models/modelsConfig.test.js.map +1 -0
- package/core-dist/src/models/types.d.ts +114 -0
- package/core-dist/src/models/types.js +7 -0
- package/core-dist/src/models/types.js.map +1 -0
- package/core-dist/src/output/json-formatter.d.ts +11 -0
- package/core-dist/src/output/json-formatter.js +30 -0
- package/core-dist/src/output/json-formatter.js.map +1 -0
- package/core-dist/src/output/json-formatter.test.d.ts +6 -0
- package/core-dist/src/output/json-formatter.test.js +266 -0
- package/core-dist/src/output/json-formatter.test.js.map +1 -0
- package/core-dist/src/output/types.d.ts +25 -0
- package/core-dist/src/output/types.js +17 -0
- package/core-dist/src/output/types.js.map +1 -0
- package/core-dist/src/prompts/mcp-prompts.d.ts +8 -0
- package/core-dist/src/prompts/mcp-prompts.js +13 -0
- package/core-dist/src/prompts/mcp-prompts.js.map +1 -0
- package/core-dist/src/prompts/prompt-registry.d.ts +34 -0
- package/core-dist/src/prompts/prompt-registry.js +65 -0
- package/core-dist/src/prompts/prompt-registry.js.map +1 -0
- package/core-dist/src/qwen/qwenContentGenerator.d.ts +71 -0
- package/core-dist/src/qwen/qwenContentGenerator.js +182 -0
- package/core-dist/src/qwen/qwenContentGenerator.js.map +1 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.d.ts +6 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.js +1175 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.js.map +1 -0
- package/core-dist/src/qwen/qwenOAuth2.d.ts +195 -0
- package/core-dist/src/qwen/qwenOAuth2.js +677 -0
- package/core-dist/src/qwen/qwenOAuth2.js.map +1 -0
- package/core-dist/src/qwen/qwenOAuth2.test.d.ts +6 -0
- package/core-dist/src/qwen/qwenOAuth2.test.js +1621 -0
- package/core-dist/src/qwen/qwenOAuth2.test.js.map +1 -0
- package/core-dist/src/qwen/sharedTokenManager.d.ts +196 -0
- package/core-dist/src/qwen/sharedTokenManager.js +649 -0
- package/core-dist/src/qwen/sharedTokenManager.js.map +1 -0
- package/core-dist/src/qwen/sharedTokenManager.test.d.ts +7 -0
- package/core-dist/src/qwen/sharedTokenManager.test.js +662 -0
- package/core-dist/src/qwen/sharedTokenManager.test.js.map +1 -0
- package/core-dist/src/services/chatCompressionService.d.ts +32 -0
- package/core-dist/src/services/chatCompressionService.js +213 -0
- package/core-dist/src/services/chatCompressionService.js.map +1 -0
- package/core-dist/src/services/chatCompressionService.test.d.ts +6 -0
- package/core-dist/src/services/chatCompressionService.test.js +343 -0
- package/core-dist/src/services/chatCompressionService.test.js.map +1 -0
- package/core-dist/src/services/chatRecordingService.d.ts +215 -0
- package/core-dist/src/services/chatRecordingService.js +285 -0
- package/core-dist/src/services/chatRecordingService.js.map +1 -0
- package/core-dist/src/services/chatRecordingService.test.d.ts +6 -0
- package/core-dist/src/services/chatRecordingService.test.js +299 -0
- package/core-dist/src/services/chatRecordingService.test.js.map +1 -0
- package/core-dist/src/services/fileDiscoveryService.d.ts +45 -0
- package/core-dist/src/services/fileDiscoveryService.js +104 -0
- package/core-dist/src/services/fileDiscoveryService.js.map +1 -0
- package/core-dist/src/services/fileDiscoveryService.test.d.ts +6 -0
- package/core-dist/src/services/fileDiscoveryService.test.js +143 -0
- package/core-dist/src/services/fileDiscoveryService.test.js.map +1 -0
- package/core-dist/src/services/fileSystemService.d.ts +88 -0
- package/core-dist/src/services/fileSystemService.js +131 -0
- package/core-dist/src/services/fileSystemService.js.map +1 -0
- package/core-dist/src/services/fileSystemService.test.d.ts +6 -0
- package/core-dist/src/services/fileSystemService.test.js +216 -0
- package/core-dist/src/services/fileSystemService.test.js.map +1 -0
- package/core-dist/src/services/gitService.d.ts +22 -0
- package/core-dist/src/services/gitService.js +98 -0
- package/core-dist/src/services/gitService.js.map +1 -0
- package/core-dist/src/services/gitService.test.d.ts +6 -0
- package/core-dist/src/services/gitService.test.js +187 -0
- package/core-dist/src/services/gitService.test.js.map +1 -0
- package/core-dist/src/services/loopDetectionService.d.ts +86 -0
- package/core-dist/src/services/loopDetectionService.js +239 -0
- package/core-dist/src/services/loopDetectionService.js.map +1 -0
- package/core-dist/src/services/loopDetectionService.test.d.ts +6 -0
- package/core-dist/src/services/loopDetectionService.test.js +478 -0
- package/core-dist/src/services/loopDetectionService.test.js.map +1 -0
- package/core-dist/src/services/sessionService.d.ts +200 -0
- package/core-dist/src/services/sessionService.js +527 -0
- package/core-dist/src/services/sessionService.js.map +1 -0
- package/core-dist/src/services/sessionService.test.d.ts +6 -0
- package/core-dist/src/services/sessionService.test.js +576 -0
- package/core-dist/src/services/sessionService.test.js.map +1 -0
- package/core-dist/src/services/shellExecutionService.d.ts +104 -0
- package/core-dist/src/services/shellExecutionService.js +626 -0
- package/core-dist/src/services/shellExecutionService.js.map +1 -0
- package/core-dist/src/services/shellExecutionService.test.d.ts +6 -0
- package/core-dist/src/services/shellExecutionService.test.js +684 -0
- package/core-dist/src/services/shellExecutionService.test.js.map +1 -0
- package/core-dist/src/skills/index.d.ts +19 -0
- package/core-dist/src/skills/index.js +9 -0
- package/core-dist/src/skills/index.js.map +1 -0
- package/core-dist/src/skills/skill-load.d.ts +4 -0
- package/core-dist/src/skills/skill-load.js +137 -0
- package/core-dist/src/skills/skill-load.js.map +1 -0
- package/core-dist/src/skills/skill-load.test.d.ts +6 -0
- package/core-dist/src/skills/skill-load.test.js +237 -0
- package/core-dist/src/skills/skill-load.test.js.map +1 -0
- package/core-dist/src/skills/skill-manager.d.ts +134 -0
- package/core-dist/src/skills/skill-manager.js +505 -0
- package/core-dist/src/skills/skill-manager.js.map +1 -0
- package/core-dist/src/skills/skill-manager.test.d.ts +6 -0
- package/core-dist/src/skills/skill-manager.test.js +527 -0
- package/core-dist/src/skills/skill-manager.test.js.map +1 -0
- package/core-dist/src/skills/types.d.ts +88 -0
- package/core-dist/src/skills/types.js +29 -0
- package/core-dist/src/skills/types.js.map +1 -0
- package/core-dist/src/subagents/builtin-agents.d.ts +35 -0
- package/core-dist/src/subagents/builtin-agents.js +85 -0
- package/core-dist/src/subagents/builtin-agents.js.map +1 -0
- package/core-dist/src/subagents/builtin-agents.test.d.ts +6 -0
- package/core-dist/src/subagents/builtin-agents.test.js +78 -0
- package/core-dist/src/subagents/builtin-agents.test.js.map +1 -0
- package/core-dist/src/subagents/index.d.ts +29 -0
- package/core-dist/src/subagents/index.js +15 -0
- package/core-dist/src/subagents/index.js.map +1 -0
- package/core-dist/src/subagents/subagent-events.d.ts +105 -0
- package/core-dist/src/subagents/subagent-events.js +32 -0
- package/core-dist/src/subagents/subagent-events.js.map +1 -0
- package/core-dist/src/subagents/subagent-hooks.d.ts +29 -0
- package/core-dist/src/subagents/subagent-hooks.js +7 -0
- package/core-dist/src/subagents/subagent-hooks.js.map +1 -0
- package/core-dist/src/subagents/subagent-manager.d.ts +178 -0
- package/core-dist/src/subagents/subagent-manager.js +711 -0
- package/core-dist/src/subagents/subagent-manager.js.map +1 -0
- package/core-dist/src/subagents/subagent-manager.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent-manager.test.js +829 -0
- package/core-dist/src/subagents/subagent-manager.test.js.map +1 -0
- package/core-dist/src/subagents/subagent-statistics.d.ts +50 -0
- package/core-dist/src/subagents/subagent-statistics.js +210 -0
- package/core-dist/src/subagents/subagent-statistics.js.map +1 -0
- package/core-dist/src/subagents/subagent-statistics.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent-statistics.test.js +238 -0
- package/core-dist/src/subagents/subagent-statistics.test.js.map +1 -0
- package/core-dist/src/subagents/subagent.d.ts +167 -0
- package/core-dist/src/subagents/subagent.js +758 -0
- package/core-dist/src/subagents/subagent.js.map +1 -0
- package/core-dist/src/subagents/subagent.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent.test.js +819 -0
- package/core-dist/src/subagents/subagent.test.js.map +1 -0
- package/core-dist/src/subagents/types.d.ts +224 -0
- package/core-dist/src/subagents/types.js +58 -0
- package/core-dist/src/subagents/types.js.map +1 -0
- package/core-dist/src/subagents/types.test.d.ts +6 -0
- package/core-dist/src/subagents/types.test.js +31 -0
- package/core-dist/src/subagents/types.test.js.map +1 -0
- package/core-dist/src/subagents/validation.d.ts +63 -0
- package/core-dist/src/subagents/validation.js +293 -0
- package/core-dist/src/subagents/validation.js.map +1 -0
- package/core-dist/src/subagents/validation.test.d.ts +6 -0
- package/core-dist/src/subagents/validation.test.js +330 -0
- package/core-dist/src/subagents/validation.test.js.map +1 -0
- package/core-dist/src/telemetry/config.d.ts +31 -0
- package/core-dist/src/telemetry/config.js +74 -0
- package/core-dist/src/telemetry/config.js.map +1 -0
- package/core-dist/src/telemetry/config.test.d.ts +6 -0
- package/core-dist/src/telemetry/config.test.js +124 -0
- package/core-dist/src/telemetry/config.test.js.map +1 -0
- package/core-dist/src/telemetry/constants.d.ts +39 -0
- package/core-dist/src/telemetry/constants.js +41 -0
- package/core-dist/src/telemetry/constants.js.map +1 -0
- package/core-dist/src/telemetry/file-exporters.d.ts +29 -0
- package/core-dist/src/telemetry/file-exporters.js +62 -0
- package/core-dist/src/telemetry/file-exporters.js.map +1 -0
- package/core-dist/src/telemetry/index.d.ts +25 -0
- package/core-dist/src/telemetry/index.js +31 -0
- package/core-dist/src/telemetry/index.js.map +1 -0
- package/core-dist/src/telemetry/integration.test.circular.d.ts +6 -0
- package/core-dist/src/telemetry/integration.test.circular.js +95 -0
- package/core-dist/src/telemetry/integration.test.circular.js.map +1 -0
- package/core-dist/src/telemetry/loggers.d.ts +40 -0
- package/core-dist/src/telemetry/loggers.js +712 -0
- package/core-dist/src/telemetry/loggers.js.map +1 -0
- package/core-dist/src/telemetry/loggers.test.circular.d.ts +6 -0
- package/core-dist/src/telemetry/loggers.test.circular.js +107 -0
- package/core-dist/src/telemetry/loggers.test.circular.js.map +1 -0
- package/core-dist/src/telemetry/loggers.test.d.ts +6 -0
- package/core-dist/src/telemetry/loggers.test.js +961 -0
- package/core-dist/src/telemetry/loggers.test.js.map +1 -0
- package/core-dist/src/telemetry/metrics.d.ts +320 -0
- package/core-dist/src/telemetry/metrics.js +532 -0
- package/core-dist/src/telemetry/metrics.js.map +1 -0
- package/core-dist/src/telemetry/metrics.test.d.ts +6 -0
- package/core-dist/src/telemetry/metrics.test.js +746 -0
- package/core-dist/src/telemetry/metrics.test.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.d.ts +89 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.js +2 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.d.ts +102 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.js +739 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.d.ts +6 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.js +380 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.js.map +1 -0
- package/core-dist/src/telemetry/sdk.d.ts +9 -0
- package/core-dist/src/telemetry/sdk.js +163 -0
- package/core-dist/src/telemetry/sdk.js.map +1 -0
- package/core-dist/src/telemetry/sdk.test.d.ts +6 -0
- package/core-dist/src/telemetry/sdk.test.js +116 -0
- package/core-dist/src/telemetry/sdk.test.js.map +1 -0
- package/core-dist/src/telemetry/telemetry-utils.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry-utils.js +14 -0
- package/core-dist/src/telemetry/telemetry-utils.js.map +1 -0
- package/core-dist/src/telemetry/telemetry-utils.test.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry-utils.test.js +40 -0
- package/core-dist/src/telemetry/telemetry-utils.test.js.map +1 -0
- package/core-dist/src/telemetry/telemetry.test.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry.test.js +49 -0
- package/core-dist/src/telemetry/telemetry.test.js.map +1 -0
- package/core-dist/src/telemetry/tool-call-decision.d.ts +13 -0
- package/core-dist/src/telemetry/tool-call-decision.js +29 -0
- package/core-dist/src/telemetry/tool-call-decision.js.map +1 -0
- package/core-dist/src/telemetry/types.d.ts +363 -0
- package/core-dist/src/telemetry/types.js +635 -0
- package/core-dist/src/telemetry/types.js.map +1 -0
- package/core-dist/src/telemetry/uiTelemetry.d.ts +80 -0
- package/core-dist/src/telemetry/uiTelemetry.js +164 -0
- package/core-dist/src/telemetry/uiTelemetry.js.map +1 -0
- package/core-dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
- package/core-dist/src/telemetry/uiTelemetry.test.js +625 -0
- package/core-dist/src/telemetry/uiTelemetry.test.js.map +1 -0
- package/core-dist/src/test-utils/config.d.ts +17 -0
- package/core-dist/src/test-utils/config.js +31 -0
- package/core-dist/src/test-utils/config.js.map +1 -0
- package/core-dist/src/test-utils/index.d.ts +6 -0
- package/core-dist/src/test-utils/index.js +7 -0
- package/core-dist/src/test-utils/index.js.map +1 -0
- package/core-dist/src/test-utils/mock-tool.d.ts +66 -0
- package/core-dist/src/test-utils/mock-tool.js +121 -0
- package/core-dist/src/test-utils/mock-tool.js.map +1 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.js +24 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
- package/core-dist/src/tools/askUserQuestion.d.ts +41 -0
- package/core-dist/src/tools/askUserQuestion.js +247 -0
- package/core-dist/src/tools/askUserQuestion.js.map +1 -0
- package/core-dist/src/tools/askUserQuestion.test.d.ts +6 -0
- package/core-dist/src/tools/askUserQuestion.test.js +218 -0
- package/core-dist/src/tools/askUserQuestion.test.js.map +1 -0
- package/core-dist/src/tools/diffOptions.d.ts +9 -0
- package/core-dist/src/tools/diffOptions.js +46 -0
- package/core-dist/src/tools/diffOptions.js.map +1 -0
- package/core-dist/src/tools/diffOptions.test.d.ts +6 -0
- package/core-dist/src/tools/diffOptions.test.js +155 -0
- package/core-dist/src/tools/diffOptions.test.js.map +1 -0
- package/core-dist/src/tools/edit.d.ts +55 -0
- package/core-dist/src/tools/edit.js +446 -0
- package/core-dist/src/tools/edit.js.map +1 -0
- package/core-dist/src/tools/edit.test.d.ts +6 -0
- package/core-dist/src/tools/edit.test.js +742 -0
- package/core-dist/src/tools/edit.test.js.map +1 -0
- package/core-dist/src/tools/exitPlanMode.d.ts +28 -0
- package/core-dist/src/tools/exitPlanMode.js +144 -0
- package/core-dist/src/tools/exitPlanMode.js.map +1 -0
- package/core-dist/src/tools/exitPlanMode.test.d.ts +6 -0
- package/core-dist/src/tools/exitPlanMode.test.js +178 -0
- package/core-dist/src/tools/exitPlanMode.test.js.map +1 -0
- package/core-dist/src/tools/glob.d.ts +44 -0
- package/core-dist/src/tools/glob.js +195 -0
- package/core-dist/src/tools/glob.js.map +1 -0
- package/core-dist/src/tools/glob.test.d.ts +6 -0
- package/core-dist/src/tools/glob.test.js +481 -0
- package/core-dist/src/tools/glob.test.js.map +1 -0
- package/core-dist/src/tools/grep.d.ts +44 -0
- package/core-dist/src/tools/grep.js +427 -0
- package/core-dist/src/tools/grep.js.map +1 -0
- package/core-dist/src/tools/grep.test.d.ts +6 -0
- package/core-dist/src/tools/grep.test.js +360 -0
- package/core-dist/src/tools/grep.test.js.map +1 -0
- package/core-dist/src/tools/ls.d.ts +68 -0
- package/core-dist/src/tools/ls.js +221 -0
- package/core-dist/src/tools/ls.js.map +1 -0
- package/core-dist/src/tools/ls.test.d.ts +6 -0
- package/core-dist/src/tools/ls.test.js +246 -0
- package/core-dist/src/tools/ls.test.js.map +1 -0
- package/core-dist/src/tools/lsp.d.ts +66 -0
- package/core-dist/src/tools/lsp.js +894 -0
- package/core-dist/src/tools/lsp.js.map +1 -0
- package/core-dist/src/tools/lsp.test.d.ts +6 -0
- package/core-dist/src/tools/lsp.test.js +960 -0
- package/core-dist/src/tools/lsp.test.js.map +1 -0
- package/core-dist/src/tools/mcp-client-manager.d.ts +110 -0
- package/core-dist/src/tools/mcp-client-manager.js +381 -0
- package/core-dist/src/tools/mcp-client-manager.js.map +1 -0
- package/core-dist/src/tools/mcp-client-manager.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-client-manager.test.js +207 -0
- package/core-dist/src/tools/mcp-client-manager.test.js.map +1 -0
- package/core-dist/src/tools/mcp-client.d.ts +199 -0
- package/core-dist/src/tools/mcp-client.js +1001 -0
- package/core-dist/src/tools/mcp-client.js.map +1 -0
- package/core-dist/src/tools/mcp-client.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-client.test.js +307 -0
- package/core-dist/src/tools/mcp-client.test.js.map +1 -0
- package/core-dist/src/tools/mcp-tool.d.ts +69 -0
- package/core-dist/src/tools/mcp-tool.js +365 -0
- package/core-dist/src/tools/mcp-tool.js.map +1 -0
- package/core-dist/src/tools/mcp-tool.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-tool.test.js +827 -0
- package/core-dist/src/tools/mcp-tool.test.js.map +1 -0
- package/core-dist/src/tools/memoryTool.d.ts +42 -0
- package/core-dist/src/tools/memoryTool.js +403 -0
- package/core-dist/src/tools/memoryTool.js.map +1 -0
- package/core-dist/src/tools/memoryTool.test.d.ts +6 -0
- package/core-dist/src/tools/memoryTool.test.js +416 -0
- package/core-dist/src/tools/memoryTool.test.js.map +1 -0
- package/core-dist/src/tools/modifiable-tool.d.ts +32 -0
- package/core-dist/src/tools/modifiable-tool.js +90 -0
- package/core-dist/src/tools/modifiable-tool.js.map +1 -0
- package/core-dist/src/tools/modifiable-tool.test.d.ts +6 -0
- package/core-dist/src/tools/modifiable-tool.test.js +188 -0
- package/core-dist/src/tools/modifiable-tool.test.js.map +1 -0
- package/core-dist/src/tools/read-file.d.ts +35 -0
- package/core-dist/src/tools/read-file.js +141 -0
- package/core-dist/src/tools/read-file.js.map +1 -0
- package/core-dist/src/tools/read-file.test.d.ts +6 -0
- package/core-dist/src/tools/read-file.test.js +333 -0
- package/core-dist/src/tools/read-file.test.js.map +1 -0
- package/core-dist/src/tools/ripGrep.d.ts +44 -0
- package/core-dist/src/tools/ripGrep.js +235 -0
- package/core-dist/src/tools/ripGrep.js.map +1 -0
- package/core-dist/src/tools/ripGrep.test.d.ts +6 -0
- package/core-dist/src/tools/ripGrep.test.js +529 -0
- package/core-dist/src/tools/ripGrep.test.js.map +1 -0
- package/core-dist/src/tools/sdk-control-client-transport.d.ts +67 -0
- package/core-dist/src/tools/sdk-control-client-transport.js +93 -0
- package/core-dist/src/tools/sdk-control-client-transport.js.map +1 -0
- package/core-dist/src/tools/shell.d.ts +34 -0
- package/core-dist/src/tools/shell.js +509 -0
- package/core-dist/src/tools/shell.js.map +1 -0
- package/core-dist/src/tools/shell.test.d.ts +6 -0
- package/core-dist/src/tools/shell.test.js +880 -0
- package/core-dist/src/tools/shell.test.js.map +1 -0
- package/core-dist/src/tools/skill.d.ts +45 -0
- package/core-dist/src/tools/skill.js +214 -0
- package/core-dist/src/tools/skill.js.map +1 -0
- package/core-dist/src/tools/skill.test.d.ts +6 -0
- package/core-dist/src/tools/skill.test.js +280 -0
- package/core-dist/src/tools/skill.test.js.map +1 -0
- package/core-dist/src/tools/task.d.ts +60 -0
- package/core-dist/src/tools/task.js +417 -0
- package/core-dist/src/tools/task.js.map +1 -0
- package/core-dist/src/tools/task.test.d.ts +6 -0
- package/core-dist/src/tools/task.test.js +367 -0
- package/core-dist/src/tools/task.test.js.map +1 -0
- package/core-dist/src/tools/todoWrite.d.ts +42 -0
- package/core-dist/src/tools/todoWrite.js +409 -0
- package/core-dist/src/tools/todoWrite.js.map +1 -0
- package/core-dist/src/tools/todoWrite.test.d.ts +6 -0
- package/core-dist/src/tools/todoWrite.test.js +234 -0
- package/core-dist/src/tools/todoWrite.test.js.map +1 -0
- package/core-dist/src/tools/tool-error.d.ts +45 -0
- package/core-dist/src/tools/tool-error.js +61 -0
- package/core-dist/src/tools/tool-error.js.map +1 -0
- package/core-dist/src/tools/tool-names.d.ts +60 -0
- package/core-dist/src/tools/tool-names.js +66 -0
- package/core-dist/src/tools/tool-names.js.map +1 -0
- package/core-dist/src/tools/tool-registry.d.ts +103 -0
- package/core-dist/src/tools/tool-registry.js +404 -0
- package/core-dist/src/tools/tool-registry.js.map +1 -0
- package/core-dist/src/tools/tool-registry.test.d.ts +6 -0
- package/core-dist/src/tools/tool-registry.test.js +331 -0
- package/core-dist/src/tools/tool-registry.test.js.map +1 -0
- package/core-dist/src/tools/tools.d.ts +364 -0
- package/core-dist/src/tools/tools.js +263 -0
- package/core-dist/src/tools/tools.js.map +1 -0
- package/core-dist/src/tools/tools.test.d.ts +6 -0
- package/core-dist/src/tools/tools.test.js +205 -0
- package/core-dist/src/tools/tools.test.js.map +1 -0
- package/core-dist/src/tools/web-fetch.d.ts +31 -0
- package/core-dist/src/tools/web-fetch.js +168 -0
- package/core-dist/src/tools/web-fetch.js.map +1 -0
- package/core-dist/src/tools/web-fetch.test.d.ts +6 -0
- package/core-dist/src/tools/web-fetch.test.js +134 -0
- package/core-dist/src/tools/web-fetch.test.js.map +1 -0
- package/core-dist/src/tools/web-search/base-provider.d.ts +31 -0
- package/core-dist/src/tools/web-search/base-provider.js +34 -0
- package/core-dist/src/tools/web-search/base-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/index.d.ts +24 -0
- package/core-dist/src/tools/web-search/index.js +249 -0
- package/core-dist/src/tools/web-search/index.js.map +1 -0
- package/core-dist/src/tools/web-search/index.test.d.ts +6 -0
- package/core-dist/src/tools/web-search/index.test.js +237 -0
- package/core-dist/src/tools/web-search/index.test.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.d.ts +23 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.js +120 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/google-provider.d.ts +17 -0
- package/core-dist/src/tools/web-search/providers/google-provider.js +55 -0
- package/core-dist/src/tools/web-search/providers/google-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.d.ts +17 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.js +54 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/types.d.ts +138 -0
- package/core-dist/src/tools/web-search/types.js +7 -0
- package/core-dist/src/tools/web-search/types.js.map +1 -0
- package/core-dist/src/tools/web-search/utils.d.ts +28 -0
- package/core-dist/src/tools/web-search/utils.js +35 -0
- package/core-dist/src/tools/web-search/utils.js.map +1 -0
- package/core-dist/src/tools/write-file.d.ts +52 -0
- package/core-dist/src/tools/write-file.js +316 -0
- package/core-dist/src/tools/write-file.js.map +1 -0
- package/core-dist/src/tools/write-file.test.d.ts +6 -0
- package/core-dist/src/tools/write-file.test.js +613 -0
- package/core-dist/src/tools/write-file.test.js.map +1 -0
- package/core-dist/src/utils/LruCache.d.ts +13 -0
- package/core-dist/src/utils/LruCache.js +38 -0
- package/core-dist/src/utils/LruCache.js.map +1 -0
- package/core-dist/src/utils/browser.d.ts +13 -0
- package/core-dist/src/utils/browser.js +50 -0
- package/core-dist/src/utils/browser.js.map +1 -0
- package/core-dist/src/utils/configResolver.d.ts +120 -0
- package/core-dist/src/utils/configResolver.js +125 -0
- package/core-dist/src/utils/configResolver.js.map +1 -0
- package/core-dist/src/utils/configResolver.test.d.ts +6 -0
- package/core-dist/src/utils/configResolver.test.js +99 -0
- package/core-dist/src/utils/configResolver.test.js.map +1 -0
- package/core-dist/src/utils/debugLogger.d.ts +46 -0
- package/core-dist/src/utils/debugLogger.js +159 -0
- package/core-dist/src/utils/debugLogger.js.map +1 -0
- package/core-dist/src/utils/debugLogger.test.d.ts +6 -0
- package/core-dist/src/utils/debugLogger.test.js +188 -0
- package/core-dist/src/utils/debugLogger.test.js.map +1 -0
- package/core-dist/src/utils/editHelper.d.ts +58 -0
- package/core-dist/src/utils/editHelper.js +342 -0
- package/core-dist/src/utils/editHelper.js.map +1 -0
- package/core-dist/src/utils/editHelper.test.d.ts +6 -0
- package/core-dist/src/utils/editHelper.test.js +127 -0
- package/core-dist/src/utils/editHelper.test.js.map +1 -0
- package/core-dist/src/utils/editor.d.ts +37 -0
- package/core-dist/src/utils/editor.js +179 -0
- package/core-dist/src/utils/editor.js.map +1 -0
- package/core-dist/src/utils/editor.test.d.ts +6 -0
- package/core-dist/src/utils/editor.test.js +434 -0
- package/core-dist/src/utils/editor.test.js.map +1 -0
- package/core-dist/src/utils/envVarResolver.d.ts +39 -0
- package/core-dist/src/utils/envVarResolver.js +100 -0
- package/core-dist/src/utils/envVarResolver.js.map +1 -0
- package/core-dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/core-dist/src/utils/envVarResolver.test.js +221 -0
- package/core-dist/src/utils/envVarResolver.test.js.map +1 -0
- package/core-dist/src/utils/environmentContext.d.ts +21 -0
- package/core-dist/src/utils/environmentContext.js +73 -0
- package/core-dist/src/utils/environmentContext.js.map +1 -0
- package/core-dist/src/utils/environmentContext.test.d.ts +6 -0
- package/core-dist/src/utils/environmentContext.test.js +151 -0
- package/core-dist/src/utils/environmentContext.test.js.map +1 -0
- package/core-dist/src/utils/errorParsing.d.ts +7 -0
- package/core-dist/src/utils/errorParsing.js +72 -0
- package/core-dist/src/utils/errorParsing.js.map +1 -0
- package/core-dist/src/utils/errorParsing.test.d.ts +6 -0
- package/core-dist/src/utils/errorParsing.test.js +87 -0
- package/core-dist/src/utils/errorParsing.test.js.map +1 -0
- package/core-dist/src/utils/errorReporting.d.ts +14 -0
- package/core-dist/src/utils/errorReporting.js +56 -0
- package/core-dist/src/utils/errorReporting.js.map +1 -0
- package/core-dist/src/utils/errorReporting.test.d.ts +6 -0
- package/core-dist/src/utils/errorReporting.test.js +84 -0
- package/core-dist/src/utils/errorReporting.test.js.map +1 -0
- package/core-dist/src/utils/errors.d.ts +44 -0
- package/core-dist/src/utils/errors.js +114 -0
- package/core-dist/src/utils/errors.js.map +1 -0
- package/core-dist/src/utils/errors.test.d.ts +6 -0
- package/core-dist/src/utils/errors.test.js +70 -0
- package/core-dist/src/utils/errors.test.js.map +1 -0
- package/core-dist/src/utils/fetch.d.ts +14 -0
- package/core-dist/src/utils/fetch.js +152 -0
- package/core-dist/src/utils/fetch.js.map +1 -0
- package/core-dist/src/utils/fetch.test.d.ts +6 -0
- package/core-dist/src/utils/fetch.test.js +40 -0
- package/core-dist/src/utils/fetch.test.js.map +1 -0
- package/core-dist/src/utils/fileUtils.d.ts +102 -0
- package/core-dist/src/utils/fileUtils.js +584 -0
- package/core-dist/src/utils/fileUtils.js.map +1 -0
- package/core-dist/src/utils/fileUtils.test.d.ts +6 -0
- package/core-dist/src/utils/fileUtils.test.js +808 -0
- package/core-dist/src/utils/fileUtils.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawlCache.d.ts +25 -0
- package/core-dist/src/utils/filesearch/crawlCache.js +57 -0
- package/core-dist/src/utils/filesearch/crawlCache.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.js +103 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawler.d.ts +15 -0
- package/core-dist/src/utils/filesearch/crawler.js +50 -0
- package/core-dist/src/utils/filesearch/crawler.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawler.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/crawler.test.js +468 -0
- package/core-dist/src/utils/filesearch/crawler.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/fileSearch.d.ts +38 -0
- package/core-dist/src/utils/filesearch/fileSearch.js +194 -0
- package/core-dist/src/utils/filesearch/fileSearch.js.map +1 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.js +642 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/ignore.d.ts +42 -0
- package/core-dist/src/utils/filesearch/ignore.js +106 -0
- package/core-dist/src/utils/filesearch/ignore.js.map +1 -0
- package/core-dist/src/utils/filesearch/ignore.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/ignore.test.js +144 -0
- package/core-dist/src/utils/filesearch/ignore.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/result-cache.d.ts +33 -0
- package/core-dist/src/utils/filesearch/result-cache.js +59 -0
- package/core-dist/src/utils/filesearch/result-cache.js.map +1 -0
- package/core-dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/result-cache.test.js +46 -0
- package/core-dist/src/utils/filesearch/result-cache.test.js.map +1 -0
- package/core-dist/src/utils/formatters.d.ts +6 -0
- package/core-dist/src/utils/formatters.js +16 -0
- package/core-dist/src/utils/formatters.js.map +1 -0
- package/core-dist/src/utils/generateContentResponseUtilities.d.ts +13 -0
- package/core-dist/src/utils/generateContentResponseUtilities.js +95 -0
- package/core-dist/src/utils/generateContentResponseUtilities.js.map +1 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.js +235 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
- package/core-dist/src/utils/getFolderStructure.d.ts +31 -0
- package/core-dist/src/utils/getFolderStructure.js +233 -0
- package/core-dist/src/utils/getFolderStructure.js.map +1 -0
- package/core-dist/src/utils/getFolderStructure.test.d.ts +6 -0
- package/core-dist/src/utils/getFolderStructure.test.js +282 -0
- package/core-dist/src/utils/getFolderStructure.test.js.map +1 -0
- package/core-dist/src/utils/getPty.d.ts +7 -0
- package/core-dist/src/utils/getPty.js +7 -0
- package/core-dist/src/utils/getPty.js.map +1 -0
- package/core-dist/src/utils/gitIgnoreParser.d.ts +16 -0
- package/core-dist/src/utils/gitIgnoreParser.js +152 -0
- package/core-dist/src/utils/gitIgnoreParser.js.map +1 -0
- package/core-dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
- package/core-dist/src/utils/gitIgnoreParser.test.js +185 -0
- package/core-dist/src/utils/gitIgnoreParser.test.js.map +1 -0
- package/core-dist/src/utils/gitUtils.d.ts +21 -0
- package/core-dist/src/utils/gitUtils.js +78 -0
- package/core-dist/src/utils/gitUtils.js.map +1 -0
- package/core-dist/src/utils/iconvHelper.d.ts +33 -0
- package/core-dist/src/utils/iconvHelper.js +48 -0
- package/core-dist/src/utils/iconvHelper.js.map +1 -0
- package/core-dist/src/utils/ignorePatterns.d.ts +103 -0
- package/core-dist/src/utils/ignorePatterns.js +222 -0
- package/core-dist/src/utils/ignorePatterns.js.map +1 -0
- package/core-dist/src/utils/ignorePatterns.test.d.ts +6 -0
- package/core-dist/src/utils/ignorePatterns.test.js +255 -0
- package/core-dist/src/utils/ignorePatterns.test.js.map +1 -0
- package/core-dist/src/utils/installationManager.d.ts +16 -0
- package/core-dist/src/utils/installationManager.js +52 -0
- package/core-dist/src/utils/installationManager.js.map +1 -0
- package/core-dist/src/utils/installationManager.test.d.ts +6 -0
- package/core-dist/src/utils/installationManager.test.js +79 -0
- package/core-dist/src/utils/installationManager.test.js.map +1 -0
- package/core-dist/src/utils/jsonl-utils.d.ts +38 -0
- package/core-dist/src/utils/jsonl-utils.js +176 -0
- package/core-dist/src/utils/jsonl-utils.js.map +1 -0
- package/core-dist/src/utils/language-detection.d.ts +6 -0
- package/core-dist/src/utils/language-detection.js +101 -0
- package/core-dist/src/utils/language-detection.js.map +1 -0
- package/core-dist/src/utils/memoryDiscovery.d.ts +15 -0
- package/core-dist/src/utils/memoryDiscovery.js +238 -0
- package/core-dist/src/utils/memoryDiscovery.js.map +1 -0
- package/core-dist/src/utils/memoryDiscovery.test.d.ts +6 -0
- package/core-dist/src/utils/memoryDiscovery.test.js +212 -0
- package/core-dist/src/utils/memoryDiscovery.test.js.map +1 -0
- package/core-dist/src/utils/memoryImportProcessor.d.ts +41 -0
- package/core-dist/src/utils/memoryImportProcessor.js +296 -0
- package/core-dist/src/utils/memoryImportProcessor.js.map +1 -0
- package/core-dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
- package/core-dist/src/utils/memoryImportProcessor.test.js +631 -0
- package/core-dist/src/utils/memoryImportProcessor.test.js.map +1 -0
- package/core-dist/src/utils/messageInspectors.d.ts +8 -0
- package/core-dist/src/utils/messageInspectors.js +16 -0
- package/core-dist/src/utils/messageInspectors.js.map +1 -0
- package/core-dist/src/utils/nextSpeakerChecker.d.ts +12 -0
- package/core-dist/src/utils/nextSpeakerChecker.js +99 -0
- package/core-dist/src/utils/nextSpeakerChecker.js.map +1 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.js +183 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
- package/core-dist/src/utils/openaiLogger.d.ts +42 -0
- package/core-dist/src/utils/openaiLogger.js +140 -0
- package/core-dist/src/utils/openaiLogger.js.map +1 -0
- package/core-dist/src/utils/openaiLogger.test.d.ts +6 -0
- package/core-dist/src/utils/openaiLogger.test.js +314 -0
- package/core-dist/src/utils/openaiLogger.test.js.map +1 -0
- package/core-dist/src/utils/partUtils.d.ts +35 -0
- package/core-dist/src/utils/partUtils.js +133 -0
- package/core-dist/src/utils/partUtils.js.map +1 -0
- package/core-dist/src/utils/partUtils.test.d.ts +6 -0
- package/core-dist/src/utils/partUtils.test.js +241 -0
- package/core-dist/src/utils/partUtils.test.js.map +1 -0
- package/core-dist/src/utils/pathReader.d.ts +17 -0
- package/core-dist/src/utils/pathReader.js +92 -0
- package/core-dist/src/utils/pathReader.js.map +1 -0
- package/core-dist/src/utils/pathReader.test.d.ts +6 -0
- package/core-dist/src/utils/pathReader.test.js +367 -0
- package/core-dist/src/utils/pathReader.test.js.map +1 -0
- package/core-dist/src/utils/paths.d.ts +110 -0
- package/core-dist/src/utils/paths.js +269 -0
- package/core-dist/src/utils/paths.js.map +1 -0
- package/core-dist/src/utils/paths.test.d.ts +6 -0
- package/core-dist/src/utils/paths.test.js +633 -0
- package/core-dist/src/utils/paths.test.js.map +1 -0
- package/core-dist/src/utils/projectSummary.d.ts +22 -0
- package/core-dist/src/utils/projectSummary.js +86 -0
- package/core-dist/src/utils/projectSummary.js.map +1 -0
- package/core-dist/src/utils/promptIdContext.d.ts +7 -0
- package/core-dist/src/utils/promptIdContext.js +8 -0
- package/core-dist/src/utils/promptIdContext.js.map +1 -0
- package/core-dist/src/utils/quotaErrorDetection.d.ts +19 -0
- package/core-dist/src/utils/quotaErrorDetection.js +84 -0
- package/core-dist/src/utils/quotaErrorDetection.js.map +1 -0
- package/core-dist/src/utils/quotaErrorDetection.test.d.ts +6 -0
- package/core-dist/src/utils/quotaErrorDetection.test.js +104 -0
- package/core-dist/src/utils/quotaErrorDetection.test.js.map +1 -0
- package/core-dist/src/utils/qwenIgnoreParser.d.ts +18 -0
- package/core-dist/src/utils/qwenIgnoreParser.js +61 -0
- package/core-dist/src/utils/qwenIgnoreParser.js.map +1 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.d.ts +6 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.js +50 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.js.map +1 -0
- package/core-dist/src/utils/rateLimit.d.ts +23 -0
- package/core-dist/src/utils/rateLimit.js +69 -0
- package/core-dist/src/utils/rateLimit.js.map +1 -0
- package/core-dist/src/utils/rateLimit.test.d.ts +6 -0
- package/core-dist/src/utils/rateLimit.test.js +72 -0
- package/core-dist/src/utils/rateLimit.test.js.map +1 -0
- package/core-dist/src/utils/readManyFiles.d.ts +67 -0
- package/core-dist/src/utils/readManyFiles.js +133 -0
- package/core-dist/src/utils/readManyFiles.js.map +1 -0
- package/core-dist/src/utils/readManyFiles.test.d.ts +6 -0
- package/core-dist/src/utils/readManyFiles.test.js +230 -0
- package/core-dist/src/utils/readManyFiles.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.d.ts +112 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.js +403 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.js +114 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/index.d.ts +9 -0
- package/core-dist/src/utils/request-tokenizer/index.js +9 -0
- package/core-dist/src/utils/request-tokenizer/index.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.d.ts +52 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.js +252 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.js +227 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.d.ts +30 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.js +41 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.d.ts +32 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.js +54 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.js +237 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/types.d.ts +34 -0
- package/core-dist/src/utils/request-tokenizer/types.js +7 -0
- package/core-dist/src/utils/request-tokenizer/types.js.map +1 -0
- package/core-dist/src/utils/retry.d.ts +38 -0
- package/core-dist/src/utils/retry.js +180 -0
- package/core-dist/src/utils/retry.js.map +1 -0
- package/core-dist/src/utils/retry.test.d.ts +6 -0
- package/core-dist/src/utils/retry.test.js +402 -0
- package/core-dist/src/utils/retry.test.js.map +1 -0
- package/core-dist/src/utils/ripgrepUtils.d.ts +61 -0
- package/core-dist/src/utils/ripgrepUtils.js +227 -0
- package/core-dist/src/utils/ripgrepUtils.js.map +1 -0
- package/core-dist/src/utils/ripgrepUtils.test.d.ts +6 -0
- package/core-dist/src/utils/ripgrepUtils.test.js +101 -0
- package/core-dist/src/utils/ripgrepUtils.test.js.map +1 -0
- package/core-dist/src/utils/runtimeFetchOptions.d.ts +44 -0
- package/core-dist/src/utils/runtimeFetchOptions.js +92 -0
- package/core-dist/src/utils/runtimeFetchOptions.js.map +1 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.d.ts +6 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.js +70 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.js.map +1 -0
- package/core-dist/src/utils/safeJsonParse.d.ts +15 -0
- package/core-dist/src/utils/safeJsonParse.js +43 -0
- package/core-dist/src/utils/safeJsonParse.js.map +1 -0
- package/core-dist/src/utils/safeJsonParse.test.d.ts +6 -0
- package/core-dist/src/utils/safeJsonParse.test.js +112 -0
- package/core-dist/src/utils/safeJsonParse.test.js.map +1 -0
- package/core-dist/src/utils/safeJsonStringify.d.ts +13 -0
- package/core-dist/src/utils/safeJsonStringify.js +25 -0
- package/core-dist/src/utils/safeJsonStringify.js.map +1 -0
- package/core-dist/src/utils/safeJsonStringify.test.d.ts +6 -0
- package/core-dist/src/utils/safeJsonStringify.test.js +61 -0
- package/core-dist/src/utils/safeJsonStringify.test.js.map +1 -0
- package/core-dist/src/utils/schemaConverter.d.ts +15 -0
- package/core-dist/src/utils/schemaConverter.js +109 -0
- package/core-dist/src/utils/schemaConverter.js.map +1 -0
- package/core-dist/src/utils/schemaConverter.test.d.ts +6 -0
- package/core-dist/src/utils/schemaConverter.test.js +106 -0
- package/core-dist/src/utils/schemaConverter.test.js.map +1 -0
- package/core-dist/src/utils/schemaValidator.d.ts +16 -0
- package/core-dist/src/utils/schemaValidator.js +123 -0
- package/core-dist/src/utils/schemaValidator.js.map +1 -0
- package/core-dist/src/utils/schemaValidator.test.d.ts +6 -0
- package/core-dist/src/utils/schemaValidator.test.js +266 -0
- package/core-dist/src/utils/schemaValidator.test.js.map +1 -0
- package/core-dist/src/utils/secure-browser-launcher.d.ts +23 -0
- package/core-dist/src/utils/secure-browser-launcher.js +165 -0
- package/core-dist/src/utils/secure-browser-launcher.js.map +1 -0
- package/core-dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
- package/core-dist/src/utils/secure-browser-launcher.test.js +149 -0
- package/core-dist/src/utils/secure-browser-launcher.test.js.map +1 -0
- package/core-dist/src/utils/shell-utils.d.ts +158 -0
- package/core-dist/src/utils/shell-utils.js +739 -0
- package/core-dist/src/utils/shell-utils.js.map +1 -0
- package/core-dist/src/utils/shell-utils.test.d.ts +6 -0
- package/core-dist/src/utils/shell-utils.test.js +466 -0
- package/core-dist/src/utils/shell-utils.test.js.map +1 -0
- package/core-dist/src/utils/shellReadOnlyChecker.d.ts +6 -0
- package/core-dist/src/utils/shellReadOnlyChecker.js +290 -0
- package/core-dist/src/utils/shellReadOnlyChecker.js.map +1 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.d.ts +6 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.js +157 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.js.map +1 -0
- package/core-dist/src/utils/subagentGenerator.d.ts +20 -0
- package/core-dist/src/utils/subagentGenerator.js +120 -0
- package/core-dist/src/utils/subagentGenerator.js.map +1 -0
- package/core-dist/src/utils/subagentGenerator.test.d.ts +6 -0
- package/core-dist/src/utils/subagentGenerator.test.js +135 -0
- package/core-dist/src/utils/subagentGenerator.test.js.map +1 -0
- package/core-dist/src/utils/summarizer.d.ts +25 -0
- package/core-dist/src/utils/summarizer.js +53 -0
- package/core-dist/src/utils/summarizer.js.map +1 -0
- package/core-dist/src/utils/summarizer.test.d.ts +6 -0
- package/core-dist/src/utils/summarizer.test.js +128 -0
- package/core-dist/src/utils/summarizer.test.js.map +1 -0
- package/core-dist/src/utils/symlink.d.ts +26 -0
- package/core-dist/src/utils/symlink.js +43 -0
- package/core-dist/src/utils/symlink.js.map +1 -0
- package/core-dist/src/utils/systemEncoding.d.ts +40 -0
- package/core-dist/src/utils/systemEncoding.js +160 -0
- package/core-dist/src/utils/systemEncoding.js.map +1 -0
- package/core-dist/src/utils/systemEncoding.test.d.ts +6 -0
- package/core-dist/src/utils/systemEncoding.test.js +367 -0
- package/core-dist/src/utils/systemEncoding.test.js.map +1 -0
- package/core-dist/src/utils/terminalSerializer.d.ts +25 -0
- package/core-dist/src/utils/terminalSerializer.js +432 -0
- package/core-dist/src/utils/terminalSerializer.js.map +1 -0
- package/core-dist/src/utils/terminalSerializer.test.d.ts +6 -0
- package/core-dist/src/utils/terminalSerializer.test.js +176 -0
- package/core-dist/src/utils/terminalSerializer.test.js.map +1 -0
- package/core-dist/src/utils/testUtils.d.ts +29 -0
- package/core-dist/src/utils/testUtils.js +70 -0
- package/core-dist/src/utils/testUtils.js.map +1 -0
- package/core-dist/src/utils/textUtils.d.ts +29 -0
- package/core-dist/src/utils/textUtils.js +59 -0
- package/core-dist/src/utils/textUtils.js.map +1 -0
- package/core-dist/src/utils/textUtils.test.d.ts +6 -0
- package/core-dist/src/utils/textUtils.test.js +91 -0
- package/core-dist/src/utils/textUtils.test.js.map +1 -0
- package/core-dist/src/utils/thoughtUtils.d.ts +23 -0
- package/core-dist/src/utils/thoughtUtils.js +53 -0
- package/core-dist/src/utils/thoughtUtils.js.map +1 -0
- package/core-dist/src/utils/thoughtUtils.test.d.ts +6 -0
- package/core-dist/src/utils/thoughtUtils.test.js +78 -0
- package/core-dist/src/utils/thoughtUtils.test.js.map +1 -0
- package/core-dist/src/utils/toml-to-markdown-converter.d.ts +22 -0
- package/core-dist/src/utils/toml-to-markdown-converter.js +61 -0
- package/core-dist/src/utils/toml-to-markdown-converter.js.map +1 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.d.ts +6 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.js +73 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.js.map +1 -0
- package/core-dist/src/utils/tool-utils.d.ts +22 -0
- package/core-dist/src/utils/tool-utils.js +121 -0
- package/core-dist/src/utils/tool-utils.js.map +1 -0
- package/core-dist/src/utils/tool-utils.test.d.ts +6 -0
- package/core-dist/src/utils/tool-utils.test.js +100 -0
- package/core-dist/src/utils/tool-utils.test.js.map +1 -0
- package/core-dist/src/utils/workspaceContext.d.ts +66 -0
- package/core-dist/src/utils/workspaceContext.js +173 -0
- package/core-dist/src/utils/workspaceContext.js.map +1 -0
- package/core-dist/src/utils/workspaceContext.test.d.ts +6 -0
- package/core-dist/src/utils/workspaceContext.test.js +313 -0
- package/core-dist/src/utils/workspaceContext.test.js.map +1 -0
- package/core-dist/src/utils/yaml-parser.d.ts +29 -0
- package/core-dist/src/utils/yaml-parser.js +172 -0
- package/core-dist/src/utils/yaml-parser.js.map +1 -0
- package/core-dist/src/utils/yaml-parser.test.d.ts +6 -0
- package/core-dist/src/utils/yaml-parser.test.js +170 -0
- package/core-dist/src/utils/yaml-parser.test.js.map +1 -0
- package/core-dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -1
- package/scripts/postinstall.cjs +102 -203
|
@@ -0,0 +1,1374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import * as path from 'node:path';
|
|
7
|
+
import process from 'node:process';
|
|
8
|
+
// External dependencies
|
|
9
|
+
import { ProxyAgent, setGlobalDispatcher } from 'undici';
|
|
10
|
+
// Core
|
|
11
|
+
import { BaseLlmClient } from '../core/baseLlmClient.js';
|
|
12
|
+
import { GeminiClient } from '../core/client.js';
|
|
13
|
+
import { AuthType, createContentGenerator, resolveContentGeneratorConfigWithSources, } from '../core/contentGenerator.js';
|
|
14
|
+
// Services
|
|
15
|
+
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
|
16
|
+
import { StandardFileSystemService, FileEncoding, } from '../services/fileSystemService.js';
|
|
17
|
+
import { GitService } from '../services/gitService.js';
|
|
18
|
+
// Tools
|
|
19
|
+
import { AskUserQuestionTool } from '../tools/askUserQuestion.js';
|
|
20
|
+
import { EditTool } from '../tools/edit.js';
|
|
21
|
+
import { ExitPlanModeTool } from '../tools/exitPlanMode.js';
|
|
22
|
+
import { GlobTool } from '../tools/glob.js';
|
|
23
|
+
import { GrepTool } from '../tools/grep.js';
|
|
24
|
+
import { LSTool } from '../tools/ls.js';
|
|
25
|
+
import { MemoryTool, setGeminiMdFilename } from '../tools/memoryTool.js';
|
|
26
|
+
import { ReadFileTool } from '../tools/read-file.js';
|
|
27
|
+
import { canUseRipgrep } from '../utils/ripgrepUtils.js';
|
|
28
|
+
import { RipGrepTool } from '../tools/ripGrep.js';
|
|
29
|
+
import { ShellTool } from '../tools/shell.js';
|
|
30
|
+
import { SkillTool } from '../tools/skill.js';
|
|
31
|
+
import { TaskTool } from '../tools/task.js';
|
|
32
|
+
import { TodoWriteTool } from '../tools/todoWrite.js';
|
|
33
|
+
import { ToolRegistry } from '../tools/tool-registry.js';
|
|
34
|
+
import { WebFetchTool } from '../tools/web-fetch.js';
|
|
35
|
+
import { WebSearchTool } from '../tools/web-search/index.js';
|
|
36
|
+
import { WriteFileTool } from '../tools/write-file.js';
|
|
37
|
+
import { LspTool } from '../tools/lsp.js';
|
|
38
|
+
// Other modules
|
|
39
|
+
import { ideContextStore } from '../ide/ideContext.js';
|
|
40
|
+
import { InputFormat, OutputFormat } from '../output/types.js';
|
|
41
|
+
import { PromptRegistry } from '../prompts/prompt-registry.js';
|
|
42
|
+
import { SkillManager } from '../skills/skill-manager.js';
|
|
43
|
+
import { SubagentManager } from '../subagents/subagent-manager.js';
|
|
44
|
+
import { DEFAULT_OTLP_ENDPOINT, DEFAULT_TELEMETRY_TARGET, initializeTelemetry, logStartSession, logRipgrepFallback, RipgrepFallbackEvent, StartSessionEvent, } from '../telemetry/index.js';
|
|
45
|
+
import { ExtensionManager, } from '../extension/extensionManager.js';
|
|
46
|
+
import { HookSystem } from '../hooks/index.js';
|
|
47
|
+
import { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
48
|
+
import { MessageBusType, } from '../confirmation-bus/types.js';
|
|
49
|
+
// Utils
|
|
50
|
+
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
|
51
|
+
import { FileExclusions } from '../utils/ignorePatterns.js';
|
|
52
|
+
import { WorkspaceContext } from '../utils/workspaceContext.js';
|
|
53
|
+
import { isToolEnabled } from '../utils/tool-utils.js';
|
|
54
|
+
import { getErrorMessage } from '../utils/errors.js';
|
|
55
|
+
import { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, } from './constants.js';
|
|
56
|
+
import { DEFAULT_QWEN_EMBEDDING_MODEL } from './models.js';
|
|
57
|
+
import { Storage } from './storage.js';
|
|
58
|
+
import { ChatRecordingService } from '../services/chatRecordingService.js';
|
|
59
|
+
import { SessionService, } from '../services/sessionService.js';
|
|
60
|
+
import { randomUUID } from 'node:crypto';
|
|
61
|
+
import { loadServerHierarchicalMemory } from '../utils/memoryDiscovery.js';
|
|
62
|
+
import { createDebugLogger, setDebugLogSession, } from '../utils/debugLogger.js';
|
|
63
|
+
import { ModelsConfig, } from '../models/index.js';
|
|
64
|
+
export { DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, };
|
|
65
|
+
export var ApprovalMode;
|
|
66
|
+
(function (ApprovalMode) {
|
|
67
|
+
ApprovalMode["PLAN"] = "plan";
|
|
68
|
+
ApprovalMode["DEFAULT"] = "default";
|
|
69
|
+
ApprovalMode["AUTO_EDIT"] = "auto-edit";
|
|
70
|
+
ApprovalMode["YOLO"] = "yolo";
|
|
71
|
+
})(ApprovalMode || (ApprovalMode = {}));
|
|
72
|
+
export const APPROVAL_MODES = Object.values(ApprovalMode);
|
|
73
|
+
/**
|
|
74
|
+
* Detailed information about each approval mode.
|
|
75
|
+
* Used for UI display and protocol responses.
|
|
76
|
+
*/
|
|
77
|
+
export const APPROVAL_MODE_INFO = {
|
|
78
|
+
[ApprovalMode.PLAN]: {
|
|
79
|
+
id: ApprovalMode.PLAN,
|
|
80
|
+
name: 'Plan',
|
|
81
|
+
description: 'Analyze only, do not modify files or execute commands',
|
|
82
|
+
},
|
|
83
|
+
[ApprovalMode.DEFAULT]: {
|
|
84
|
+
id: ApprovalMode.DEFAULT,
|
|
85
|
+
name: 'Default',
|
|
86
|
+
description: 'Require approval for file edits or shell commands',
|
|
87
|
+
},
|
|
88
|
+
[ApprovalMode.AUTO_EDIT]: {
|
|
89
|
+
id: ApprovalMode.AUTO_EDIT,
|
|
90
|
+
name: 'Auto Edit',
|
|
91
|
+
description: 'Automatically approve file edits',
|
|
92
|
+
},
|
|
93
|
+
[ApprovalMode.YOLO]: {
|
|
94
|
+
id: ApprovalMode.YOLO,
|
|
95
|
+
name: 'YOLO',
|
|
96
|
+
description: 'Automatically approve all tools',
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 25_000;
|
|
100
|
+
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1000;
|
|
101
|
+
export class MCPServerConfig {
|
|
102
|
+
command;
|
|
103
|
+
args;
|
|
104
|
+
env;
|
|
105
|
+
cwd;
|
|
106
|
+
url;
|
|
107
|
+
httpUrl;
|
|
108
|
+
headers;
|
|
109
|
+
tcp;
|
|
110
|
+
timeout;
|
|
111
|
+
trust;
|
|
112
|
+
description;
|
|
113
|
+
includeTools;
|
|
114
|
+
excludeTools;
|
|
115
|
+
extensionName;
|
|
116
|
+
oauth;
|
|
117
|
+
authProviderType;
|
|
118
|
+
targetAudience;
|
|
119
|
+
targetServiceAccount;
|
|
120
|
+
type;
|
|
121
|
+
constructor(
|
|
122
|
+
// For stdio transport
|
|
123
|
+
command, args, env, cwd,
|
|
124
|
+
// For sse transport
|
|
125
|
+
url,
|
|
126
|
+
// For streamable http transport
|
|
127
|
+
httpUrl, headers,
|
|
128
|
+
// For websocket transport
|
|
129
|
+
tcp,
|
|
130
|
+
// Common
|
|
131
|
+
timeout, trust,
|
|
132
|
+
// Metadata
|
|
133
|
+
description, includeTools, excludeTools, extensionName,
|
|
134
|
+
// OAuth configuration
|
|
135
|
+
oauth, authProviderType,
|
|
136
|
+
// Service Account Configuration
|
|
137
|
+
/* targetAudience format: CLIENT_ID.apps.googleusercontent.com */
|
|
138
|
+
targetAudience,
|
|
139
|
+
/* targetServiceAccount format: <service-account-name>@<project-num>.iam.gserviceaccount.com */
|
|
140
|
+
targetServiceAccount,
|
|
141
|
+
// SDK MCP server type - 'sdk' indicates server runs in SDK process
|
|
142
|
+
type) {
|
|
143
|
+
this.command = command;
|
|
144
|
+
this.args = args;
|
|
145
|
+
this.env = env;
|
|
146
|
+
this.cwd = cwd;
|
|
147
|
+
this.url = url;
|
|
148
|
+
this.httpUrl = httpUrl;
|
|
149
|
+
this.headers = headers;
|
|
150
|
+
this.tcp = tcp;
|
|
151
|
+
this.timeout = timeout;
|
|
152
|
+
this.trust = trust;
|
|
153
|
+
this.description = description;
|
|
154
|
+
this.includeTools = includeTools;
|
|
155
|
+
this.excludeTools = excludeTools;
|
|
156
|
+
this.extensionName = extensionName;
|
|
157
|
+
this.oauth = oauth;
|
|
158
|
+
this.authProviderType = authProviderType;
|
|
159
|
+
this.targetAudience = targetAudience;
|
|
160
|
+
this.targetServiceAccount = targetServiceAccount;
|
|
161
|
+
this.type = type;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Check if an MCP server config represents an SDK server
|
|
166
|
+
*/
|
|
167
|
+
export function isSdkMcpServerConfig(config) {
|
|
168
|
+
return config.type === 'sdk';
|
|
169
|
+
}
|
|
170
|
+
export var AuthProviderType;
|
|
171
|
+
(function (AuthProviderType) {
|
|
172
|
+
AuthProviderType["DYNAMIC_DISCOVERY"] = "dynamic_discovery";
|
|
173
|
+
AuthProviderType["GOOGLE_CREDENTIALS"] = "google_credentials";
|
|
174
|
+
AuthProviderType["SERVICE_ACCOUNT_IMPERSONATION"] = "service_account_impersonation";
|
|
175
|
+
})(AuthProviderType || (AuthProviderType = {}));
|
|
176
|
+
function normalizeConfigOutputFormat(format) {
|
|
177
|
+
if (!format) {
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
switch (format) {
|
|
181
|
+
case 'stream-json':
|
|
182
|
+
return OutputFormat.STREAM_JSON;
|
|
183
|
+
case 'json':
|
|
184
|
+
case OutputFormat.JSON:
|
|
185
|
+
return OutputFormat.JSON;
|
|
186
|
+
case 'text':
|
|
187
|
+
case OutputFormat.TEXT:
|
|
188
|
+
default:
|
|
189
|
+
return OutputFormat.TEXT;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
export class Config {
|
|
193
|
+
sessionId;
|
|
194
|
+
sessionData;
|
|
195
|
+
debugLogger;
|
|
196
|
+
toolRegistry;
|
|
197
|
+
promptRegistry;
|
|
198
|
+
subagentManager;
|
|
199
|
+
extensionManager;
|
|
200
|
+
skillManager = null;
|
|
201
|
+
fileSystemService;
|
|
202
|
+
contentGeneratorConfig;
|
|
203
|
+
contentGeneratorConfigSources = {};
|
|
204
|
+
contentGenerator;
|
|
205
|
+
embeddingModel;
|
|
206
|
+
modelsConfig;
|
|
207
|
+
modelProvidersConfig;
|
|
208
|
+
sandbox;
|
|
209
|
+
targetDir;
|
|
210
|
+
workspaceContext;
|
|
211
|
+
debugMode;
|
|
212
|
+
inputFormat;
|
|
213
|
+
outputFormat;
|
|
214
|
+
includePartialMessages;
|
|
215
|
+
question;
|
|
216
|
+
coreTools;
|
|
217
|
+
allowedTools;
|
|
218
|
+
excludeTools;
|
|
219
|
+
toolDiscoveryCommand;
|
|
220
|
+
toolCallCommand;
|
|
221
|
+
mcpServerCommand;
|
|
222
|
+
mcpServers;
|
|
223
|
+
lspEnabled;
|
|
224
|
+
lspClient;
|
|
225
|
+
allowedMcpServers;
|
|
226
|
+
excludedMcpServers;
|
|
227
|
+
sessionSubagents;
|
|
228
|
+
userMemory;
|
|
229
|
+
sdkMode;
|
|
230
|
+
geminiMdFileCount;
|
|
231
|
+
approvalMode;
|
|
232
|
+
accessibility;
|
|
233
|
+
telemetrySettings;
|
|
234
|
+
gitCoAuthor;
|
|
235
|
+
usageStatisticsEnabled;
|
|
236
|
+
geminiClient;
|
|
237
|
+
baseLlmClient;
|
|
238
|
+
fileFiltering;
|
|
239
|
+
fileDiscoveryService = null;
|
|
240
|
+
gitService = undefined;
|
|
241
|
+
sessionService = undefined;
|
|
242
|
+
chatRecordingService = undefined;
|
|
243
|
+
checkpointing;
|
|
244
|
+
proxy;
|
|
245
|
+
cwd;
|
|
246
|
+
bugCommand;
|
|
247
|
+
outputLanguageFilePath;
|
|
248
|
+
noBrowser;
|
|
249
|
+
folderTrustFeature;
|
|
250
|
+
folderTrust;
|
|
251
|
+
ideMode;
|
|
252
|
+
maxSessionTurns;
|
|
253
|
+
sessionTokenLimit;
|
|
254
|
+
listExtensions;
|
|
255
|
+
overrideExtensions;
|
|
256
|
+
summarizeToolOutput;
|
|
257
|
+
cliVersion;
|
|
258
|
+
experimentalZedIntegration = false;
|
|
259
|
+
chatRecordingEnabled;
|
|
260
|
+
loadMemoryFromIncludeDirectories = false;
|
|
261
|
+
importFormat;
|
|
262
|
+
webSearch;
|
|
263
|
+
chatCompression;
|
|
264
|
+
interactive;
|
|
265
|
+
trustedFolder;
|
|
266
|
+
useRipgrep;
|
|
267
|
+
useBuiltinRipgrep;
|
|
268
|
+
shouldUseNodePtyShell;
|
|
269
|
+
skipNextSpeakerCheck;
|
|
270
|
+
shellExecutionConfig;
|
|
271
|
+
skipLoopDetection;
|
|
272
|
+
skipStartupContext;
|
|
273
|
+
warnings;
|
|
274
|
+
initialized = false;
|
|
275
|
+
storage;
|
|
276
|
+
fileExclusions;
|
|
277
|
+
truncateToolOutputThreshold;
|
|
278
|
+
truncateToolOutputLines;
|
|
279
|
+
enableToolOutputTruncation;
|
|
280
|
+
eventEmitter;
|
|
281
|
+
channel;
|
|
282
|
+
defaultFileEncoding;
|
|
283
|
+
enableHooks;
|
|
284
|
+
hooks;
|
|
285
|
+
hooksConfig;
|
|
286
|
+
hookSystem;
|
|
287
|
+
messageBus;
|
|
288
|
+
constructor(params) {
|
|
289
|
+
this.sessionId = params.sessionId ?? randomUUID();
|
|
290
|
+
this.sessionData = params.sessionData;
|
|
291
|
+
setDebugLogSession(this);
|
|
292
|
+
this.debugLogger = createDebugLogger();
|
|
293
|
+
this.embeddingModel = params.embeddingModel ?? DEFAULT_QWEN_EMBEDDING_MODEL;
|
|
294
|
+
this.fileSystemService = new StandardFileSystemService();
|
|
295
|
+
this.sandbox = params.sandbox;
|
|
296
|
+
this.targetDir = path.resolve(params.targetDir);
|
|
297
|
+
this.workspaceContext = new WorkspaceContext(this.targetDir, params.includeDirectories ?? []);
|
|
298
|
+
this.debugMode = params.debugMode;
|
|
299
|
+
this.inputFormat = params.inputFormat ?? InputFormat.TEXT;
|
|
300
|
+
const normalizedOutputFormat = normalizeConfigOutputFormat(params.outputFormat ?? params.output?.format);
|
|
301
|
+
this.outputFormat = normalizedOutputFormat ?? OutputFormat.TEXT;
|
|
302
|
+
this.includePartialMessages = params.includePartialMessages ?? false;
|
|
303
|
+
this.question = params.question;
|
|
304
|
+
this.coreTools = params.coreTools;
|
|
305
|
+
this.allowedTools = params.allowedTools;
|
|
306
|
+
this.excludeTools = params.excludeTools;
|
|
307
|
+
this.toolDiscoveryCommand = params.toolDiscoveryCommand;
|
|
308
|
+
this.toolCallCommand = params.toolCallCommand;
|
|
309
|
+
this.mcpServerCommand = params.mcpServerCommand;
|
|
310
|
+
this.mcpServers = params.mcpServers;
|
|
311
|
+
this.lspEnabled = params.lsp?.enabled ?? false;
|
|
312
|
+
this.lspClient = params.lspClient;
|
|
313
|
+
this.allowedMcpServers = params.allowedMcpServers;
|
|
314
|
+
this.excludedMcpServers = params.excludedMcpServers;
|
|
315
|
+
this.sessionSubagents = params.sessionSubagents ?? [];
|
|
316
|
+
this.sdkMode = params.sdkMode ?? false;
|
|
317
|
+
this.userMemory = params.userMemory ?? '';
|
|
318
|
+
this.geminiMdFileCount = params.geminiMdFileCount ?? 0;
|
|
319
|
+
this.approvalMode = params.approvalMode ?? ApprovalMode.DEFAULT;
|
|
320
|
+
this.accessibility = params.accessibility ?? {};
|
|
321
|
+
this.telemetrySettings = {
|
|
322
|
+
enabled: params.telemetry?.enabled ?? false,
|
|
323
|
+
target: params.telemetry?.target ?? DEFAULT_TELEMETRY_TARGET,
|
|
324
|
+
otlpEndpoint: params.telemetry?.otlpEndpoint ?? DEFAULT_OTLP_ENDPOINT,
|
|
325
|
+
otlpProtocol: params.telemetry?.otlpProtocol,
|
|
326
|
+
logPrompts: params.telemetry?.logPrompts ?? true,
|
|
327
|
+
outfile: params.telemetry?.outfile,
|
|
328
|
+
useCollector: params.telemetry?.useCollector,
|
|
329
|
+
};
|
|
330
|
+
this.gitCoAuthor = {
|
|
331
|
+
enabled: params.gitCoAuthor ?? true,
|
|
332
|
+
name: 'Qwen-Coder',
|
|
333
|
+
email: 'qwen-coder@alibabacloud.com',
|
|
334
|
+
};
|
|
335
|
+
this.usageStatisticsEnabled = params.usageStatisticsEnabled ?? true;
|
|
336
|
+
this.outputLanguageFilePath = params.outputLanguageFilePath;
|
|
337
|
+
this.fileFiltering = {
|
|
338
|
+
respectGitIgnore: params.fileFiltering?.respectGitIgnore ?? true,
|
|
339
|
+
respectQwenIgnore: params.fileFiltering?.respectQwenIgnore ?? true,
|
|
340
|
+
enableRecursiveFileSearch: params.fileFiltering?.enableRecursiveFileSearch ?? true,
|
|
341
|
+
enableFuzzySearch: params.fileFiltering?.enableFuzzySearch ?? true,
|
|
342
|
+
};
|
|
343
|
+
this.checkpointing = params.checkpointing ?? false;
|
|
344
|
+
this.proxy = params.proxy;
|
|
345
|
+
this.cwd = params.cwd ?? process.cwd();
|
|
346
|
+
this.fileDiscoveryService = params.fileDiscoveryService ?? null;
|
|
347
|
+
this.bugCommand = params.bugCommand;
|
|
348
|
+
this.maxSessionTurns = params.maxSessionTurns ?? -1;
|
|
349
|
+
this.sessionTokenLimit = params.sessionTokenLimit ?? -1;
|
|
350
|
+
this.experimentalZedIntegration =
|
|
351
|
+
params.experimentalZedIntegration ?? false;
|
|
352
|
+
this.listExtensions = params.listExtensions ?? false;
|
|
353
|
+
this.overrideExtensions = params.overrideExtensions;
|
|
354
|
+
this.noBrowser = params.noBrowser ?? false;
|
|
355
|
+
this.summarizeToolOutput = params.summarizeToolOutput;
|
|
356
|
+
this.folderTrustFeature = params.folderTrustFeature ?? false;
|
|
357
|
+
this.folderTrust = params.folderTrust ?? false;
|
|
358
|
+
this.ideMode = params.ideMode ?? false;
|
|
359
|
+
this.modelProvidersConfig = params.modelProvidersConfig;
|
|
360
|
+
this.cliVersion = params.cliVersion;
|
|
361
|
+
this.chatRecordingEnabled = params.chatRecording ?? true;
|
|
362
|
+
this.loadMemoryFromIncludeDirectories =
|
|
363
|
+
params.loadMemoryFromIncludeDirectories ?? false;
|
|
364
|
+
this.importFormat = params.importFormat ?? 'tree';
|
|
365
|
+
this.chatCompression = params.chatCompression;
|
|
366
|
+
this.interactive = params.interactive ?? false;
|
|
367
|
+
this.trustedFolder = params.trustedFolder;
|
|
368
|
+
this.skipLoopDetection = params.skipLoopDetection ?? false;
|
|
369
|
+
this.skipStartupContext = params.skipStartupContext ?? false;
|
|
370
|
+
this.warnings = params.warnings ?? [];
|
|
371
|
+
// Web search
|
|
372
|
+
this.webSearch = params.webSearch;
|
|
373
|
+
this.useRipgrep = params.useRipgrep ?? true;
|
|
374
|
+
this.useBuiltinRipgrep = params.useBuiltinRipgrep ?? true;
|
|
375
|
+
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? true;
|
|
376
|
+
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? true;
|
|
377
|
+
this.shellExecutionConfig = {
|
|
378
|
+
terminalWidth: params.shellExecutionConfig?.terminalWidth ?? 80,
|
|
379
|
+
terminalHeight: params.shellExecutionConfig?.terminalHeight ?? 24,
|
|
380
|
+
showColor: params.shellExecutionConfig?.showColor ?? false,
|
|
381
|
+
pager: params.shellExecutionConfig?.pager ?? 'cat',
|
|
382
|
+
};
|
|
383
|
+
this.truncateToolOutputThreshold =
|
|
384
|
+
params.truncateToolOutputThreshold ??
|
|
385
|
+
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD;
|
|
386
|
+
this.truncateToolOutputLines =
|
|
387
|
+
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
|
|
388
|
+
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
|
389
|
+
this.channel = params.channel;
|
|
390
|
+
this.defaultFileEncoding = params.defaultFileEncoding ?? FileEncoding.UTF8;
|
|
391
|
+
this.storage = new Storage(this.targetDir);
|
|
392
|
+
this.inputFormat = params.inputFormat ?? InputFormat.TEXT;
|
|
393
|
+
this.fileExclusions = new FileExclusions(this);
|
|
394
|
+
this.eventEmitter = params.eventEmitter;
|
|
395
|
+
if (params.contextFileName) {
|
|
396
|
+
setGeminiMdFilename(params.contextFileName);
|
|
397
|
+
}
|
|
398
|
+
// Create ModelsConfig for centralized model management
|
|
399
|
+
// Prefer params.authType over generationConfig.authType because:
|
|
400
|
+
// - params.authType preserves undefined (user hasn't selected yet)
|
|
401
|
+
// - generationConfig.authType may have a default value from resolvers
|
|
402
|
+
this.modelsConfig = new ModelsConfig({
|
|
403
|
+
initialAuthType: params.authType ?? params.generationConfig?.authType,
|
|
404
|
+
modelProvidersConfig: this.modelProvidersConfig,
|
|
405
|
+
generationConfig: {
|
|
406
|
+
model: params.model,
|
|
407
|
+
...(params.generationConfig || {}),
|
|
408
|
+
baseUrl: params.generationConfig?.baseUrl,
|
|
409
|
+
},
|
|
410
|
+
generationConfigSources: params.generationConfigSources,
|
|
411
|
+
onModelChange: this.handleModelChange.bind(this),
|
|
412
|
+
});
|
|
413
|
+
if (this.telemetrySettings.enabled) {
|
|
414
|
+
initializeTelemetry(this);
|
|
415
|
+
}
|
|
416
|
+
if (this.getProxy()) {
|
|
417
|
+
setGlobalDispatcher(new ProxyAgent(this.getProxy()));
|
|
418
|
+
}
|
|
419
|
+
this.geminiClient = new GeminiClient(this);
|
|
420
|
+
this.chatRecordingService = this.chatRecordingEnabled
|
|
421
|
+
? new ChatRecordingService(this)
|
|
422
|
+
: undefined;
|
|
423
|
+
this.extensionManager = new ExtensionManager({
|
|
424
|
+
workspaceDir: this.targetDir,
|
|
425
|
+
enabledExtensionOverrides: this.overrideExtensions,
|
|
426
|
+
isWorkspaceTrusted: this.isTrustedFolder(),
|
|
427
|
+
});
|
|
428
|
+
this.enableHooks = params.enableHooks ?? false;
|
|
429
|
+
this.hooks = params.hooks;
|
|
430
|
+
this.hooksConfig = params.hooksConfig;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Must only be called once, throws if called again.
|
|
434
|
+
* @param options Optional initialization options including sendSdkMcpMessage callback
|
|
435
|
+
*/
|
|
436
|
+
async initialize(options) {
|
|
437
|
+
if (this.initialized) {
|
|
438
|
+
throw Error('Config was already initialized');
|
|
439
|
+
}
|
|
440
|
+
this.initialized = true;
|
|
441
|
+
this.debugLogger.info('Config initialization started');
|
|
442
|
+
// Initialize centralized FileDiscoveryService
|
|
443
|
+
this.getFileService();
|
|
444
|
+
if (this.getCheckpointingEnabled()) {
|
|
445
|
+
await this.getGitService();
|
|
446
|
+
}
|
|
447
|
+
this.promptRegistry = new PromptRegistry();
|
|
448
|
+
this.extensionManager.setConfig(this);
|
|
449
|
+
await this.extensionManager.refreshCache();
|
|
450
|
+
this.debugLogger.debug('Extension manager initialized');
|
|
451
|
+
// Initialize hook system if enabled
|
|
452
|
+
if (this.enableHooks) {
|
|
453
|
+
this.hookSystem = new HookSystem(this);
|
|
454
|
+
await this.hookSystem.initialize();
|
|
455
|
+
this.debugLogger.debug('Hook system initialized');
|
|
456
|
+
// Initialize MessageBus for hook execution
|
|
457
|
+
this.messageBus = new MessageBus();
|
|
458
|
+
// Subscribe to HOOK_EXECUTION_REQUEST to execute hooks
|
|
459
|
+
this.messageBus.subscribe(MessageBusType.HOOK_EXECUTION_REQUEST, async (request) => {
|
|
460
|
+
try {
|
|
461
|
+
const hookSystem = this.hookSystem;
|
|
462
|
+
if (!hookSystem) {
|
|
463
|
+
this.messageBus?.publish({
|
|
464
|
+
type: MessageBusType.HOOK_EXECUTION_RESPONSE,
|
|
465
|
+
correlationId: request.correlationId,
|
|
466
|
+
success: false,
|
|
467
|
+
error: new Error('Hook system not initialized'),
|
|
468
|
+
});
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
// Execute the appropriate hook based on eventName
|
|
472
|
+
let result;
|
|
473
|
+
const input = request.input || {};
|
|
474
|
+
switch (request.eventName) {
|
|
475
|
+
case 'UserPromptSubmit':
|
|
476
|
+
result = await hookSystem.fireUserPromptSubmitEvent(input['prompt'] || '');
|
|
477
|
+
break;
|
|
478
|
+
case 'Stop':
|
|
479
|
+
result = await hookSystem.fireStopEvent(input['stop_hook_active'] || false, input['last_assistant_message'] || '');
|
|
480
|
+
break;
|
|
481
|
+
default:
|
|
482
|
+
this.debugLogger.warn(`Unknown hook event: ${request.eventName}`);
|
|
483
|
+
result = undefined;
|
|
484
|
+
}
|
|
485
|
+
// Send response
|
|
486
|
+
this.messageBus?.publish({
|
|
487
|
+
type: MessageBusType.HOOK_EXECUTION_RESPONSE,
|
|
488
|
+
correlationId: request.correlationId,
|
|
489
|
+
success: true,
|
|
490
|
+
output: result,
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
catch (error) {
|
|
494
|
+
this.debugLogger.warn(`Hook execution failed: ${error}`);
|
|
495
|
+
this.messageBus?.publish({
|
|
496
|
+
type: MessageBusType.HOOK_EXECUTION_RESPONSE,
|
|
497
|
+
correlationId: request.correlationId,
|
|
498
|
+
success: false,
|
|
499
|
+
error: error instanceof Error ? error : new Error(String(error)),
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
this.debugLogger.debug('MessageBus initialized with hook subscription');
|
|
504
|
+
}
|
|
505
|
+
this.subagentManager = new SubagentManager(this);
|
|
506
|
+
this.skillManager = new SkillManager(this);
|
|
507
|
+
await this.skillManager.startWatching();
|
|
508
|
+
this.debugLogger.debug('Skill manager initialized');
|
|
509
|
+
// Load session subagents if they were provided before initialization
|
|
510
|
+
if (this.sessionSubagents.length > 0) {
|
|
511
|
+
this.subagentManager.loadSessionSubagents(this.sessionSubagents);
|
|
512
|
+
}
|
|
513
|
+
await this.extensionManager.refreshCache();
|
|
514
|
+
await this.refreshHierarchicalMemory();
|
|
515
|
+
this.debugLogger.debug('Hierarchical memory loaded');
|
|
516
|
+
this.toolRegistry = await this.createToolRegistry(options?.sendSdkMcpMessage);
|
|
517
|
+
this.debugLogger.info(`Tool registry initialized with ${this.toolRegistry.getAllToolNames().length} tools`);
|
|
518
|
+
await this.geminiClient.initialize();
|
|
519
|
+
this.debugLogger.info('Gemini client initialized');
|
|
520
|
+
// Detect and capture runtime model snapshot (from CLI/ENV/credentials)
|
|
521
|
+
this.modelsConfig.detectAndCaptureRuntimeModel();
|
|
522
|
+
logStartSession(this, new StartSessionEvent(this));
|
|
523
|
+
this.debugLogger.info('Config initialization completed');
|
|
524
|
+
}
|
|
525
|
+
async refreshHierarchicalMemory() {
|
|
526
|
+
const { memoryContent, fileCount } = await loadServerHierarchicalMemory(this.getWorkingDir(), this.shouldLoadMemoryFromIncludeDirectories()
|
|
527
|
+
? this.getWorkspaceContext().getDirectories()
|
|
528
|
+
: [], this.getFileService(), this.getExtensionContextFilePaths(), this.isTrustedFolder(), this.getImportFormat());
|
|
529
|
+
this.setUserMemory(memoryContent);
|
|
530
|
+
this.setGeminiMdFileCount(fileCount);
|
|
531
|
+
}
|
|
532
|
+
getContentGenerator() {
|
|
533
|
+
return this.contentGenerator;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Get the ModelsConfig instance for model-related operations.
|
|
537
|
+
* External code (e.g., CLI) can use this to access model configuration.
|
|
538
|
+
*/
|
|
539
|
+
getModelsConfig() {
|
|
540
|
+
return this.modelsConfig;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Updates the credentials in the generation config.
|
|
544
|
+
* Exclusive for `OpenAIKeyPrompt` to update credentials via `/auth`
|
|
545
|
+
* Delegates to ModelsConfig.
|
|
546
|
+
*/
|
|
547
|
+
updateCredentials(credentials, settingsGenerationConfig) {
|
|
548
|
+
this.modelsConfig.updateCredentials(credentials, settingsGenerationConfig);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Reload model providers configuration at runtime.
|
|
552
|
+
* This enables hot-reloading of modelProviders settings without restarting the CLI.
|
|
553
|
+
* Should be called before refreshAuth when settings.json has been updated.
|
|
554
|
+
*
|
|
555
|
+
* @param modelProvidersConfig - The updated model providers configuration
|
|
556
|
+
*/
|
|
557
|
+
reloadModelProvidersConfig(modelProvidersConfig) {
|
|
558
|
+
this.modelsConfig.reloadModelProvidersConfig(modelProvidersConfig);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Refresh authentication and rebuild ContentGenerator.
|
|
562
|
+
*/
|
|
563
|
+
async refreshAuth(authMethod, isInitialAuth) {
|
|
564
|
+
// Sync modelsConfig state for this auth refresh
|
|
565
|
+
const modelId = this.modelsConfig.getModel();
|
|
566
|
+
this.modelsConfig.syncAfterAuthRefresh(authMethod, modelId);
|
|
567
|
+
// Check and consume cached credentials flag
|
|
568
|
+
const requireCached = this.modelsConfig.consumeRequireCachedCredentialsFlag();
|
|
569
|
+
const { config, sources } = resolveContentGeneratorConfigWithSources(this, authMethod, this.modelsConfig.getGenerationConfig(), this.modelsConfig.getGenerationConfigSources(), {
|
|
570
|
+
strictModelProvider: this.modelsConfig.isStrictModelProviderSelection(),
|
|
571
|
+
});
|
|
572
|
+
const newContentGeneratorConfig = config;
|
|
573
|
+
this.contentGenerator = await createContentGenerator(newContentGeneratorConfig, this, requireCached ? true : isInitialAuth);
|
|
574
|
+
// Only assign to instance properties after successful initialization
|
|
575
|
+
this.contentGeneratorConfig = newContentGeneratorConfig;
|
|
576
|
+
this.contentGeneratorConfigSources = sources;
|
|
577
|
+
// Initialize BaseLlmClient now that the ContentGenerator is available
|
|
578
|
+
this.baseLlmClient = new BaseLlmClient(this.contentGenerator, this);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Provides access to the BaseLlmClient for stateless LLM operations.
|
|
582
|
+
*/
|
|
583
|
+
getBaseLlmClient() {
|
|
584
|
+
if (!this.baseLlmClient) {
|
|
585
|
+
// Handle cases where initialization might be deferred or authentication failed
|
|
586
|
+
if (this.contentGenerator) {
|
|
587
|
+
this.baseLlmClient = new BaseLlmClient(this.getContentGenerator(), this);
|
|
588
|
+
}
|
|
589
|
+
else {
|
|
590
|
+
throw new Error('BaseLlmClient not initialized. Ensure authentication has occurred and ContentGenerator is ready.');
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return this.baseLlmClient;
|
|
594
|
+
}
|
|
595
|
+
getSessionId() {
|
|
596
|
+
return this.sessionId;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Returns warnings generated during configuration resolution.
|
|
600
|
+
* These warnings are collected from model configuration resolution
|
|
601
|
+
* and should be displayed to the user during startup.
|
|
602
|
+
*/
|
|
603
|
+
getWarnings() {
|
|
604
|
+
return this.warnings;
|
|
605
|
+
}
|
|
606
|
+
getDebugLogger() {
|
|
607
|
+
return this.debugLogger;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Starts a new session and resets session-scoped services.
|
|
611
|
+
*/
|
|
612
|
+
startNewSession(sessionId, sessionData) {
|
|
613
|
+
this.sessionId = sessionId ?? randomUUID();
|
|
614
|
+
this.sessionData = sessionData;
|
|
615
|
+
setDebugLogSession(this);
|
|
616
|
+
this.debugLogger = createDebugLogger();
|
|
617
|
+
this.chatRecordingService = this.chatRecordingEnabled
|
|
618
|
+
? new ChatRecordingService(this)
|
|
619
|
+
: undefined;
|
|
620
|
+
if (this.initialized) {
|
|
621
|
+
logStartSession(this, new StartSessionEvent(this));
|
|
622
|
+
}
|
|
623
|
+
return this.sessionId;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Returns the resumed session data if this session was resumed from a previous one.
|
|
627
|
+
*/
|
|
628
|
+
getResumedSessionData() {
|
|
629
|
+
return this.sessionData;
|
|
630
|
+
}
|
|
631
|
+
shouldLoadMemoryFromIncludeDirectories() {
|
|
632
|
+
return this.loadMemoryFromIncludeDirectories;
|
|
633
|
+
}
|
|
634
|
+
getImportFormat() {
|
|
635
|
+
return this.importFormat;
|
|
636
|
+
}
|
|
637
|
+
getContentGeneratorConfig() {
|
|
638
|
+
return this.contentGeneratorConfig;
|
|
639
|
+
}
|
|
640
|
+
getContentGeneratorConfigSources() {
|
|
641
|
+
// If contentGeneratorConfigSources is empty (before initializeAuth),
|
|
642
|
+
// get sources from ModelsConfig
|
|
643
|
+
if (Object.keys(this.contentGeneratorConfigSources).length === 0 &&
|
|
644
|
+
this.modelsConfig) {
|
|
645
|
+
return this.modelsConfig.getGenerationConfigSources();
|
|
646
|
+
}
|
|
647
|
+
return this.contentGeneratorConfigSources;
|
|
648
|
+
}
|
|
649
|
+
getModel() {
|
|
650
|
+
return this.contentGeneratorConfig?.model || this.modelsConfig.getModel();
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Set model programmatically (e.g., VLM auto-switch, fallback).
|
|
654
|
+
* Delegates to ModelsConfig.
|
|
655
|
+
*/
|
|
656
|
+
async setModel(newModel, metadata) {
|
|
657
|
+
await this.modelsConfig.setModel(newModel, metadata);
|
|
658
|
+
// Also update contentGeneratorConfig for hot-update compatibility
|
|
659
|
+
if (this.contentGeneratorConfig) {
|
|
660
|
+
this.contentGeneratorConfig.model = newModel;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Handle model change from ModelsConfig.
|
|
665
|
+
* This updates the content generator config with the new model settings.
|
|
666
|
+
*/
|
|
667
|
+
async handleModelChange(authType, requiresRefresh) {
|
|
668
|
+
if (!this.contentGeneratorConfig) {
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
// Hot update path: only supported for qwen-oauth.
|
|
672
|
+
// For other auth types we always refresh to recreate the ContentGenerator.
|
|
673
|
+
//
|
|
674
|
+
// Rationale:
|
|
675
|
+
// - Non-qwen providers may need to re-validate credentials / baseUrl / envKey.
|
|
676
|
+
// - ModelsConfig.applyResolvedModelDefaults can clear or change credentials sources.
|
|
677
|
+
// - Refresh keeps runtime behavior consistent and centralized.
|
|
678
|
+
if (authType === AuthType.QWEN_OAUTH && !requiresRefresh) {
|
|
679
|
+
const { config, sources } = resolveContentGeneratorConfigWithSources(this, authType, this.modelsConfig.getGenerationConfig(), this.modelsConfig.getGenerationConfigSources(), {
|
|
680
|
+
strictModelProvider: this.modelsConfig.isStrictModelProviderSelection(),
|
|
681
|
+
});
|
|
682
|
+
// Hot-update fields (qwen-oauth models share the same auth + client).
|
|
683
|
+
this.contentGeneratorConfig.model = config.model;
|
|
684
|
+
this.contentGeneratorConfig.samplingParams = config.samplingParams;
|
|
685
|
+
this.contentGeneratorConfig.contextWindowSize = config.contextWindowSize;
|
|
686
|
+
this.contentGeneratorConfig.enableCacheControl =
|
|
687
|
+
config.enableCacheControl;
|
|
688
|
+
if ('model' in sources) {
|
|
689
|
+
this.contentGeneratorConfigSources['model'] = sources['model'];
|
|
690
|
+
}
|
|
691
|
+
if ('samplingParams' in sources) {
|
|
692
|
+
this.contentGeneratorConfigSources['samplingParams'] =
|
|
693
|
+
sources['samplingParams'];
|
|
694
|
+
}
|
|
695
|
+
if ('enableCacheControl' in sources) {
|
|
696
|
+
this.contentGeneratorConfigSources['enableCacheControl'] =
|
|
697
|
+
sources['enableCacheControl'];
|
|
698
|
+
}
|
|
699
|
+
if ('contextWindowSize' in sources) {
|
|
700
|
+
this.contentGeneratorConfigSources['contextWindowSize'] =
|
|
701
|
+
sources['contextWindowSize'];
|
|
702
|
+
}
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
// Full refresh path
|
|
706
|
+
await this.refreshAuth(authType);
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Get available models for the current authType.
|
|
710
|
+
* Delegates to ModelsConfig.
|
|
711
|
+
*/
|
|
712
|
+
getAvailableModels() {
|
|
713
|
+
return this.modelsConfig.getAvailableModels();
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Get available models for a specific authType.
|
|
717
|
+
* Delegates to ModelsConfig.
|
|
718
|
+
*/
|
|
719
|
+
getAvailableModelsForAuthType(authType) {
|
|
720
|
+
return this.modelsConfig.getAvailableModelsForAuthType(authType);
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Get all configured models across authTypes.
|
|
724
|
+
* Delegates to ModelsConfig.
|
|
725
|
+
*/
|
|
726
|
+
getAllConfiguredModels(authTypes) {
|
|
727
|
+
return this.modelsConfig.getAllConfiguredModels(authTypes);
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Get the currently active runtime model snapshot.
|
|
731
|
+
* Delegates to ModelsConfig.
|
|
732
|
+
*/
|
|
733
|
+
getActiveRuntimeModelSnapshot() {
|
|
734
|
+
return this.modelsConfig.getActiveRuntimeModelSnapshot();
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Switch authType+model.
|
|
738
|
+
* Supports both registry-backed models and runtime model snapshots.
|
|
739
|
+
*
|
|
740
|
+
* For runtime models, the modelId should be in format `$runtime|${authType}|${modelId}`.
|
|
741
|
+
* This triggers a refresh of the ContentGenerator when required (always on authType changes).
|
|
742
|
+
* For qwen-oauth model switches that are hot-update safe, this may update in place.
|
|
743
|
+
*
|
|
744
|
+
* @param authType - Target authentication type
|
|
745
|
+
* @param modelId - Target model ID (or `$runtime|${authType}|${modelId}` for runtime models)
|
|
746
|
+
* @param options - Additional options like requireCachedCredentials
|
|
747
|
+
*/
|
|
748
|
+
async switchModel(authType, modelId, options) {
|
|
749
|
+
await this.modelsConfig.switchModel(authType, modelId, options);
|
|
750
|
+
}
|
|
751
|
+
getMaxSessionTurns() {
|
|
752
|
+
return this.maxSessionTurns;
|
|
753
|
+
}
|
|
754
|
+
getSessionTokenLimit() {
|
|
755
|
+
return this.sessionTokenLimit;
|
|
756
|
+
}
|
|
757
|
+
getEmbeddingModel() {
|
|
758
|
+
return this.embeddingModel;
|
|
759
|
+
}
|
|
760
|
+
getSandbox() {
|
|
761
|
+
return this.sandbox;
|
|
762
|
+
}
|
|
763
|
+
isRestrictiveSandbox() {
|
|
764
|
+
const sandboxConfig = this.getSandbox();
|
|
765
|
+
const seatbeltProfile = process.env['SEATBELT_PROFILE'];
|
|
766
|
+
return (!!sandboxConfig &&
|
|
767
|
+
sandboxConfig.command === 'sandbox-exec' &&
|
|
768
|
+
!!seatbeltProfile &&
|
|
769
|
+
seatbeltProfile.startsWith('restrictive-'));
|
|
770
|
+
}
|
|
771
|
+
getTargetDir() {
|
|
772
|
+
return this.targetDir;
|
|
773
|
+
}
|
|
774
|
+
getProjectRoot() {
|
|
775
|
+
return this.targetDir;
|
|
776
|
+
}
|
|
777
|
+
getWorkspaceContext() {
|
|
778
|
+
return this.workspaceContext;
|
|
779
|
+
}
|
|
780
|
+
getToolRegistry() {
|
|
781
|
+
return this.toolRegistry;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Shuts down the Config and releases all resources.
|
|
785
|
+
* This method is idempotent and safe to call multiple times.
|
|
786
|
+
* It handles the case where initialization was not completed.
|
|
787
|
+
*/
|
|
788
|
+
async shutdown() {
|
|
789
|
+
if (!this.initialized) {
|
|
790
|
+
// Nothing to clean up if not initialized
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
try {
|
|
794
|
+
this.skillManager?.stopWatching();
|
|
795
|
+
if (this.toolRegistry) {
|
|
796
|
+
await this.toolRegistry.stop();
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
catch (error) {
|
|
800
|
+
// Log but don't throw - cleanup should be best-effort
|
|
801
|
+
this.debugLogger.error('Error during Config shutdown:', error);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
getPromptRegistry() {
|
|
805
|
+
return this.promptRegistry;
|
|
806
|
+
}
|
|
807
|
+
getDebugMode() {
|
|
808
|
+
return this.debugMode;
|
|
809
|
+
}
|
|
810
|
+
getQuestion() {
|
|
811
|
+
return this.question;
|
|
812
|
+
}
|
|
813
|
+
getCoreTools() {
|
|
814
|
+
return this.coreTools;
|
|
815
|
+
}
|
|
816
|
+
getAllowedTools() {
|
|
817
|
+
return this.allowedTools;
|
|
818
|
+
}
|
|
819
|
+
getExcludeTools() {
|
|
820
|
+
return this.excludeTools;
|
|
821
|
+
}
|
|
822
|
+
getToolDiscoveryCommand() {
|
|
823
|
+
return this.toolDiscoveryCommand;
|
|
824
|
+
}
|
|
825
|
+
getToolCallCommand() {
|
|
826
|
+
return this.toolCallCommand;
|
|
827
|
+
}
|
|
828
|
+
getMcpServerCommand() {
|
|
829
|
+
return this.mcpServerCommand;
|
|
830
|
+
}
|
|
831
|
+
getMcpServers() {
|
|
832
|
+
let mcpServers = { ...(this.mcpServers || {}) };
|
|
833
|
+
const extensions = this.getActiveExtensions();
|
|
834
|
+
for (const extension of extensions) {
|
|
835
|
+
Object.entries(extension.config.mcpServers || {}).forEach(([key, server]) => {
|
|
836
|
+
if (mcpServers[key])
|
|
837
|
+
return;
|
|
838
|
+
mcpServers[key] = {
|
|
839
|
+
...server,
|
|
840
|
+
extensionName: extension.config.name,
|
|
841
|
+
};
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
if (this.allowedMcpServers) {
|
|
845
|
+
mcpServers = Object.fromEntries(Object.entries(mcpServers).filter(([key]) => this.allowedMcpServers?.includes(key)));
|
|
846
|
+
}
|
|
847
|
+
// Note: We no longer filter out excluded servers here.
|
|
848
|
+
// The UI layer should check isMcpServerDisabled() to determine
|
|
849
|
+
// whether to show a server as disabled.
|
|
850
|
+
return mcpServers;
|
|
851
|
+
}
|
|
852
|
+
getExcludedMcpServers() {
|
|
853
|
+
return this.excludedMcpServers;
|
|
854
|
+
}
|
|
855
|
+
setExcludedMcpServers(excluded) {
|
|
856
|
+
this.excludedMcpServers = excluded;
|
|
857
|
+
}
|
|
858
|
+
isMcpServerDisabled(serverName) {
|
|
859
|
+
return this.excludedMcpServers?.includes(serverName) ?? false;
|
|
860
|
+
}
|
|
861
|
+
addMcpServers(servers) {
|
|
862
|
+
if (this.initialized) {
|
|
863
|
+
throw new Error('Cannot modify mcpServers after initialization');
|
|
864
|
+
}
|
|
865
|
+
this.mcpServers = { ...this.mcpServers, ...servers };
|
|
866
|
+
}
|
|
867
|
+
isLspEnabled() {
|
|
868
|
+
return this.lspEnabled;
|
|
869
|
+
}
|
|
870
|
+
getLspClient() {
|
|
871
|
+
return this.lspClient;
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Allows wiring an LSP client after Config construction but before initialize().
|
|
875
|
+
*/
|
|
876
|
+
setLspClient(client) {
|
|
877
|
+
if (this.initialized) {
|
|
878
|
+
throw new Error('Cannot set LSP client after initialization');
|
|
879
|
+
}
|
|
880
|
+
this.lspClient = client;
|
|
881
|
+
}
|
|
882
|
+
getSessionSubagents() {
|
|
883
|
+
return this.sessionSubagents;
|
|
884
|
+
}
|
|
885
|
+
setSessionSubagents(subagents) {
|
|
886
|
+
if (this.initialized) {
|
|
887
|
+
throw new Error('Cannot modify sessionSubagents after initialization');
|
|
888
|
+
}
|
|
889
|
+
this.sessionSubagents = subagents;
|
|
890
|
+
}
|
|
891
|
+
getSdkMode() {
|
|
892
|
+
return this.sdkMode;
|
|
893
|
+
}
|
|
894
|
+
setSdkMode(value) {
|
|
895
|
+
this.sdkMode = value;
|
|
896
|
+
}
|
|
897
|
+
getUserMemory() {
|
|
898
|
+
return this.userMemory;
|
|
899
|
+
}
|
|
900
|
+
setUserMemory(newUserMemory) {
|
|
901
|
+
this.userMemory = newUserMemory;
|
|
902
|
+
}
|
|
903
|
+
getGeminiMdFileCount() {
|
|
904
|
+
return this.geminiMdFileCount;
|
|
905
|
+
}
|
|
906
|
+
setGeminiMdFileCount(count) {
|
|
907
|
+
this.geminiMdFileCount = count;
|
|
908
|
+
}
|
|
909
|
+
getApprovalMode() {
|
|
910
|
+
return this.approvalMode;
|
|
911
|
+
}
|
|
912
|
+
setApprovalMode(mode) {
|
|
913
|
+
if (!this.isTrustedFolder() &&
|
|
914
|
+
mode !== ApprovalMode.DEFAULT &&
|
|
915
|
+
mode !== ApprovalMode.PLAN) {
|
|
916
|
+
throw new Error('Cannot enable privileged approval modes in an untrusted folder.');
|
|
917
|
+
}
|
|
918
|
+
this.approvalMode = mode;
|
|
919
|
+
}
|
|
920
|
+
getInputFormat() {
|
|
921
|
+
return this.inputFormat;
|
|
922
|
+
}
|
|
923
|
+
getIncludePartialMessages() {
|
|
924
|
+
return this.includePartialMessages;
|
|
925
|
+
}
|
|
926
|
+
getAccessibility() {
|
|
927
|
+
return this.accessibility;
|
|
928
|
+
}
|
|
929
|
+
getTelemetryEnabled() {
|
|
930
|
+
return this.telemetrySettings.enabled ?? false;
|
|
931
|
+
}
|
|
932
|
+
getTelemetryLogPromptsEnabled() {
|
|
933
|
+
return this.telemetrySettings.logPrompts ?? true;
|
|
934
|
+
}
|
|
935
|
+
getTelemetryOtlpEndpoint() {
|
|
936
|
+
return this.telemetrySettings.otlpEndpoint ?? DEFAULT_OTLP_ENDPOINT;
|
|
937
|
+
}
|
|
938
|
+
getTelemetryOtlpProtocol() {
|
|
939
|
+
return this.telemetrySettings.otlpProtocol ?? 'grpc';
|
|
940
|
+
}
|
|
941
|
+
getTelemetryTarget() {
|
|
942
|
+
return this.telemetrySettings.target ?? DEFAULT_TELEMETRY_TARGET;
|
|
943
|
+
}
|
|
944
|
+
getTelemetryOutfile() {
|
|
945
|
+
return this.telemetrySettings.outfile;
|
|
946
|
+
}
|
|
947
|
+
getGitCoAuthor() {
|
|
948
|
+
return this.gitCoAuthor;
|
|
949
|
+
}
|
|
950
|
+
getTelemetryUseCollector() {
|
|
951
|
+
return this.telemetrySettings.useCollector ?? false;
|
|
952
|
+
}
|
|
953
|
+
getGeminiClient() {
|
|
954
|
+
return this.geminiClient;
|
|
955
|
+
}
|
|
956
|
+
getEnableRecursiveFileSearch() {
|
|
957
|
+
return this.fileFiltering.enableRecursiveFileSearch;
|
|
958
|
+
}
|
|
959
|
+
getFileFilteringEnableFuzzySearch() {
|
|
960
|
+
return this.fileFiltering.enableFuzzySearch;
|
|
961
|
+
}
|
|
962
|
+
getFileFilteringRespectGitIgnore() {
|
|
963
|
+
return this.fileFiltering.respectGitIgnore;
|
|
964
|
+
}
|
|
965
|
+
getFileFilteringRespectQwenIgnore() {
|
|
966
|
+
return this.fileFiltering.respectQwenIgnore;
|
|
967
|
+
}
|
|
968
|
+
getFileFilteringOptions() {
|
|
969
|
+
return {
|
|
970
|
+
respectGitIgnore: this.fileFiltering.respectGitIgnore,
|
|
971
|
+
respectQwenIgnore: this.fileFiltering.respectQwenIgnore,
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Gets custom file exclusion patterns from configuration.
|
|
976
|
+
* TODO: This is a placeholder implementation. In the future, this could
|
|
977
|
+
* read from settings files, CLI arguments, or environment variables.
|
|
978
|
+
*/
|
|
979
|
+
getCustomExcludes() {
|
|
980
|
+
// Placeholder implementation - returns empty array for now
|
|
981
|
+
// Future implementation could read from:
|
|
982
|
+
// - User settings file
|
|
983
|
+
// - Project-specific configuration
|
|
984
|
+
// - Environment variables
|
|
985
|
+
// - CLI arguments
|
|
986
|
+
return [];
|
|
987
|
+
}
|
|
988
|
+
getCheckpointingEnabled() {
|
|
989
|
+
return this.checkpointing;
|
|
990
|
+
}
|
|
991
|
+
getProxy() {
|
|
992
|
+
return this.proxy;
|
|
993
|
+
}
|
|
994
|
+
getWorkingDir() {
|
|
995
|
+
return this.cwd;
|
|
996
|
+
}
|
|
997
|
+
getBugCommand() {
|
|
998
|
+
return this.bugCommand;
|
|
999
|
+
}
|
|
1000
|
+
getFileService() {
|
|
1001
|
+
if (!this.fileDiscoveryService) {
|
|
1002
|
+
this.fileDiscoveryService = new FileDiscoveryService(this.targetDir);
|
|
1003
|
+
}
|
|
1004
|
+
return this.fileDiscoveryService;
|
|
1005
|
+
}
|
|
1006
|
+
getUsageStatisticsEnabled() {
|
|
1007
|
+
return this.usageStatisticsEnabled;
|
|
1008
|
+
}
|
|
1009
|
+
getExtensionContextFilePaths() {
|
|
1010
|
+
const extensionContextFilePaths = this.getActiveExtensions().flatMap((e) => e.contextFiles);
|
|
1011
|
+
return [
|
|
1012
|
+
...extensionContextFilePaths,
|
|
1013
|
+
...(this.outputLanguageFilePath ? [this.outputLanguageFilePath] : []),
|
|
1014
|
+
];
|
|
1015
|
+
}
|
|
1016
|
+
getExperimentalZedIntegration() {
|
|
1017
|
+
return this.experimentalZedIntegration;
|
|
1018
|
+
}
|
|
1019
|
+
getListExtensions() {
|
|
1020
|
+
return this.listExtensions;
|
|
1021
|
+
}
|
|
1022
|
+
getExtensionManager() {
|
|
1023
|
+
return this.extensionManager;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Get the hook system instance if hooks are enabled.
|
|
1027
|
+
* Returns undefined if hooks are not enabled.
|
|
1028
|
+
*/
|
|
1029
|
+
getHookSystem() {
|
|
1030
|
+
return this.hookSystem;
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Check if hooks are enabled.
|
|
1034
|
+
*/
|
|
1035
|
+
getEnableHooks() {
|
|
1036
|
+
return this.enableHooks;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Get the message bus instance.
|
|
1040
|
+
* Returns undefined if not set.
|
|
1041
|
+
*/
|
|
1042
|
+
getMessageBus() {
|
|
1043
|
+
return this.messageBus;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Set the message bus instance.
|
|
1047
|
+
* This is called by the CLI layer to inject the MessageBus.
|
|
1048
|
+
*/
|
|
1049
|
+
setMessageBus(messageBus) {
|
|
1050
|
+
this.messageBus = messageBus;
|
|
1051
|
+
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Get the list of disabled hook names.
|
|
1054
|
+
* This is used by the HookRegistry to filter out disabled hooks.
|
|
1055
|
+
*/
|
|
1056
|
+
getDisabledHooks() {
|
|
1057
|
+
const hooksConfig = this.hooksConfig;
|
|
1058
|
+
if (!hooksConfig)
|
|
1059
|
+
return [];
|
|
1060
|
+
const disabled = hooksConfig['disabled'];
|
|
1061
|
+
return Array.isArray(disabled) ? disabled : [];
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* Get project-level hooks configuration.
|
|
1065
|
+
* This is used by the HookRegistry to load project-specific hooks.
|
|
1066
|
+
*/
|
|
1067
|
+
getProjectHooks() {
|
|
1068
|
+
// This will be populated from settings by the CLI layer
|
|
1069
|
+
// The core Config doesn't have direct access to settings
|
|
1070
|
+
return undefined;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Get all hooks configuration (merged from all sources).
|
|
1074
|
+
* This is used by the HookRegistry to load hooks.
|
|
1075
|
+
*/
|
|
1076
|
+
getHooks() {
|
|
1077
|
+
return this.hooks;
|
|
1078
|
+
}
|
|
1079
|
+
getExtensions() {
|
|
1080
|
+
const extensions = this.extensionManager.getLoadedExtensions();
|
|
1081
|
+
if (this.overrideExtensions) {
|
|
1082
|
+
return extensions.filter((e) => this.overrideExtensions?.includes(e.name));
|
|
1083
|
+
}
|
|
1084
|
+
else {
|
|
1085
|
+
return extensions;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
getActiveExtensions() {
|
|
1089
|
+
return this.getExtensions().filter((e) => e.isActive);
|
|
1090
|
+
}
|
|
1091
|
+
getBlockedMcpServers() {
|
|
1092
|
+
const mcpServers = { ...(this.mcpServers || {}) };
|
|
1093
|
+
const extensions = this.getActiveExtensions();
|
|
1094
|
+
for (const extension of extensions) {
|
|
1095
|
+
Object.entries(extension.config.mcpServers || {}).forEach(([key, server]) => {
|
|
1096
|
+
if (mcpServers[key])
|
|
1097
|
+
return;
|
|
1098
|
+
mcpServers[key] = {
|
|
1099
|
+
...server,
|
|
1100
|
+
extensionName: extension.config.name,
|
|
1101
|
+
};
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
const blockedMcpServers = [];
|
|
1105
|
+
if (this.allowedMcpServers) {
|
|
1106
|
+
Object.entries(mcpServers).forEach(([key, server]) => {
|
|
1107
|
+
const isAllowed = this.allowedMcpServers?.includes(key);
|
|
1108
|
+
if (!isAllowed) {
|
|
1109
|
+
blockedMcpServers.push({
|
|
1110
|
+
name: key,
|
|
1111
|
+
extensionName: server.extensionName || '',
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
return blockedMcpServers;
|
|
1117
|
+
}
|
|
1118
|
+
getNoBrowser() {
|
|
1119
|
+
return this.noBrowser;
|
|
1120
|
+
}
|
|
1121
|
+
isBrowserLaunchSuppressed() {
|
|
1122
|
+
return this.getNoBrowser() || !shouldAttemptBrowserLaunch();
|
|
1123
|
+
}
|
|
1124
|
+
getSummarizeToolOutputConfig() {
|
|
1125
|
+
return this.summarizeToolOutput;
|
|
1126
|
+
}
|
|
1127
|
+
// Web search provider configuration
|
|
1128
|
+
getWebSearchConfig() {
|
|
1129
|
+
return this.webSearch;
|
|
1130
|
+
}
|
|
1131
|
+
getIdeMode() {
|
|
1132
|
+
return this.ideMode;
|
|
1133
|
+
}
|
|
1134
|
+
getFolderTrustFeature() {
|
|
1135
|
+
return this.folderTrustFeature;
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* Returns 'true' if the workspace is considered "trusted".
|
|
1139
|
+
* 'false' for untrusted.
|
|
1140
|
+
*/
|
|
1141
|
+
getFolderTrust() {
|
|
1142
|
+
return this.folderTrust;
|
|
1143
|
+
}
|
|
1144
|
+
isTrustedFolder() {
|
|
1145
|
+
// isWorkspaceTrusted in cli/src/config/trustedFolder.js returns undefined
|
|
1146
|
+
// when the file based trust value is unavailable, since it is mainly used
|
|
1147
|
+
// in the initialization for trust dialogs, etc. Here we return true since
|
|
1148
|
+
// config.isTrustedFolder() is used for the main business logic of blocking
|
|
1149
|
+
// tool calls etc in the rest of the application.
|
|
1150
|
+
//
|
|
1151
|
+
// Default value is true since we load with trusted settings to avoid
|
|
1152
|
+
// restarts in the more common path. If the user chooses to mark the folder
|
|
1153
|
+
// as untrusted, the CLI will restart and we will have the trust value
|
|
1154
|
+
// reloaded.
|
|
1155
|
+
const context = ideContextStore.get();
|
|
1156
|
+
if (context?.workspaceState?.isTrusted !== undefined) {
|
|
1157
|
+
return context.workspaceState.isTrusted;
|
|
1158
|
+
}
|
|
1159
|
+
return this.trustedFolder ?? true;
|
|
1160
|
+
}
|
|
1161
|
+
setIdeMode(value) {
|
|
1162
|
+
this.ideMode = value;
|
|
1163
|
+
}
|
|
1164
|
+
getAuthType() {
|
|
1165
|
+
return this.contentGeneratorConfig?.authType;
|
|
1166
|
+
}
|
|
1167
|
+
getCliVersion() {
|
|
1168
|
+
return this.cliVersion;
|
|
1169
|
+
}
|
|
1170
|
+
getChannel() {
|
|
1171
|
+
return this.channel;
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Get the default file encoding for new files.
|
|
1175
|
+
* @returns FileEncodingType
|
|
1176
|
+
*/
|
|
1177
|
+
getDefaultFileEncoding() {
|
|
1178
|
+
return this.defaultFileEncoding;
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Get the current FileSystemService
|
|
1182
|
+
*/
|
|
1183
|
+
getFileSystemService() {
|
|
1184
|
+
return this.fileSystemService;
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Set a custom FileSystemService
|
|
1188
|
+
*/
|
|
1189
|
+
setFileSystemService(fileSystemService) {
|
|
1190
|
+
this.fileSystemService = fileSystemService;
|
|
1191
|
+
}
|
|
1192
|
+
getChatCompression() {
|
|
1193
|
+
return this.chatCompression;
|
|
1194
|
+
}
|
|
1195
|
+
isInteractive() {
|
|
1196
|
+
return this.interactive;
|
|
1197
|
+
}
|
|
1198
|
+
getUseRipgrep() {
|
|
1199
|
+
return this.useRipgrep;
|
|
1200
|
+
}
|
|
1201
|
+
getUseBuiltinRipgrep() {
|
|
1202
|
+
return this.useBuiltinRipgrep;
|
|
1203
|
+
}
|
|
1204
|
+
getShouldUseNodePtyShell() {
|
|
1205
|
+
return this.shouldUseNodePtyShell;
|
|
1206
|
+
}
|
|
1207
|
+
getSkipNextSpeakerCheck() {
|
|
1208
|
+
return this.skipNextSpeakerCheck;
|
|
1209
|
+
}
|
|
1210
|
+
getShellExecutionConfig() {
|
|
1211
|
+
return this.shellExecutionConfig;
|
|
1212
|
+
}
|
|
1213
|
+
setShellExecutionConfig(config) {
|
|
1214
|
+
this.shellExecutionConfig = {
|
|
1215
|
+
terminalWidth: config.terminalWidth ?? this.shellExecutionConfig.terminalWidth,
|
|
1216
|
+
terminalHeight: config.terminalHeight ?? this.shellExecutionConfig.terminalHeight,
|
|
1217
|
+
showColor: config.showColor ?? this.shellExecutionConfig.showColor,
|
|
1218
|
+
pager: config.pager ?? this.shellExecutionConfig.pager,
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
getScreenReader() {
|
|
1222
|
+
return this.accessibility.screenReader ?? false;
|
|
1223
|
+
}
|
|
1224
|
+
getSkipLoopDetection() {
|
|
1225
|
+
return this.skipLoopDetection;
|
|
1226
|
+
}
|
|
1227
|
+
getSkipStartupContext() {
|
|
1228
|
+
return this.skipStartupContext;
|
|
1229
|
+
}
|
|
1230
|
+
getEnableToolOutputTruncation() {
|
|
1231
|
+
return this.enableToolOutputTruncation;
|
|
1232
|
+
}
|
|
1233
|
+
getTruncateToolOutputThreshold() {
|
|
1234
|
+
if (!this.enableToolOutputTruncation ||
|
|
1235
|
+
this.truncateToolOutputThreshold <= 0) {
|
|
1236
|
+
return Number.POSITIVE_INFINITY;
|
|
1237
|
+
}
|
|
1238
|
+
return this.truncateToolOutputThreshold;
|
|
1239
|
+
}
|
|
1240
|
+
getTruncateToolOutputLines() {
|
|
1241
|
+
if (!this.enableToolOutputTruncation || this.truncateToolOutputLines <= 0) {
|
|
1242
|
+
return Number.POSITIVE_INFINITY;
|
|
1243
|
+
}
|
|
1244
|
+
return this.truncateToolOutputLines;
|
|
1245
|
+
}
|
|
1246
|
+
getOutputFormat() {
|
|
1247
|
+
return this.outputFormat;
|
|
1248
|
+
}
|
|
1249
|
+
async getGitService() {
|
|
1250
|
+
if (!this.gitService) {
|
|
1251
|
+
this.gitService = new GitService(this.targetDir, this.storage);
|
|
1252
|
+
await this.gitService.initialize();
|
|
1253
|
+
}
|
|
1254
|
+
return this.gitService;
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Returns the chat recording service.
|
|
1258
|
+
*/
|
|
1259
|
+
getChatRecordingService() {
|
|
1260
|
+
if (!this.chatRecordingEnabled) {
|
|
1261
|
+
return undefined;
|
|
1262
|
+
}
|
|
1263
|
+
if (!this.chatRecordingService) {
|
|
1264
|
+
this.chatRecordingService = new ChatRecordingService(this);
|
|
1265
|
+
}
|
|
1266
|
+
return this.chatRecordingService;
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Returns the transcript file path for the current session.
|
|
1270
|
+
* This is the path to the JSONL file where the conversation is recorded.
|
|
1271
|
+
* Returns empty string if chat recording is disabled.
|
|
1272
|
+
*/
|
|
1273
|
+
getTranscriptPath() {
|
|
1274
|
+
if (!this.chatRecordingEnabled) {
|
|
1275
|
+
return '';
|
|
1276
|
+
}
|
|
1277
|
+
const projectDir = this.storage.getProjectDir();
|
|
1278
|
+
const sessionId = this.getSessionId();
|
|
1279
|
+
const safeFilename = `${sessionId}.jsonl`;
|
|
1280
|
+
return path.join(projectDir, 'chats', safeFilename);
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* Gets or creates a SessionService for managing chat sessions.
|
|
1284
|
+
*/
|
|
1285
|
+
getSessionService() {
|
|
1286
|
+
if (!this.sessionService) {
|
|
1287
|
+
this.sessionService = new SessionService(this.targetDir);
|
|
1288
|
+
}
|
|
1289
|
+
return this.sessionService;
|
|
1290
|
+
}
|
|
1291
|
+
getFileExclusions() {
|
|
1292
|
+
return this.fileExclusions;
|
|
1293
|
+
}
|
|
1294
|
+
getSubagentManager() {
|
|
1295
|
+
return this.subagentManager;
|
|
1296
|
+
}
|
|
1297
|
+
getSkillManager() {
|
|
1298
|
+
return this.skillManager;
|
|
1299
|
+
}
|
|
1300
|
+
async createToolRegistry(sendSdkMcpMessage) {
|
|
1301
|
+
const registry = new ToolRegistry(this, this.eventEmitter, sendSdkMcpMessage);
|
|
1302
|
+
const coreToolsConfig = this.getCoreTools();
|
|
1303
|
+
const excludeToolsConfig = this.getExcludeTools();
|
|
1304
|
+
// Helper to create & register core tools that are enabled
|
|
1305
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1306
|
+
const registerCoreTool = (ToolClass, ...args) => {
|
|
1307
|
+
const toolName = ToolClass?.Name;
|
|
1308
|
+
const className = ToolClass?.name ?? 'UnknownTool';
|
|
1309
|
+
if (!toolName) {
|
|
1310
|
+
// Log warning and skip this tool instead of crashing
|
|
1311
|
+
this.debugLogger.warn(`Skipping tool registration: ${className} is missing static Name property. ` +
|
|
1312
|
+
`Tools must define a static Name property to be registered.`);
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
if (isToolEnabled(toolName, coreToolsConfig, excludeToolsConfig)) {
|
|
1316
|
+
try {
|
|
1317
|
+
registry.registerTool(new ToolClass(...args));
|
|
1318
|
+
}
|
|
1319
|
+
catch (error) {
|
|
1320
|
+
this.debugLogger.error(`Failed to register tool ${className} (${toolName}):`, error);
|
|
1321
|
+
throw error; // Re-throw after logging context
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
registerCoreTool(TaskTool, this);
|
|
1326
|
+
registerCoreTool(SkillTool, this);
|
|
1327
|
+
registerCoreTool(LSTool, this);
|
|
1328
|
+
registerCoreTool(ReadFileTool, this);
|
|
1329
|
+
if (this.getUseRipgrep()) {
|
|
1330
|
+
let useRipgrep = false;
|
|
1331
|
+
let errorString = undefined;
|
|
1332
|
+
try {
|
|
1333
|
+
useRipgrep = await canUseRipgrep(this.getUseBuiltinRipgrep());
|
|
1334
|
+
}
|
|
1335
|
+
catch (error) {
|
|
1336
|
+
errorString = getErrorMessage(error);
|
|
1337
|
+
}
|
|
1338
|
+
if (useRipgrep) {
|
|
1339
|
+
registerCoreTool(RipGrepTool, this);
|
|
1340
|
+
}
|
|
1341
|
+
else {
|
|
1342
|
+
// Log for telemetry
|
|
1343
|
+
logRipgrepFallback(this, new RipgrepFallbackEvent(this.getUseRipgrep(), this.getUseBuiltinRipgrep(), errorString || 'ripgrep is not available'));
|
|
1344
|
+
registerCoreTool(GrepTool, this);
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
else {
|
|
1348
|
+
registerCoreTool(GrepTool, this);
|
|
1349
|
+
}
|
|
1350
|
+
registerCoreTool(GlobTool, this);
|
|
1351
|
+
registerCoreTool(EditTool, this);
|
|
1352
|
+
registerCoreTool(WriteFileTool, this);
|
|
1353
|
+
registerCoreTool(ShellTool, this);
|
|
1354
|
+
registerCoreTool(MemoryTool);
|
|
1355
|
+
registerCoreTool(TodoWriteTool, this);
|
|
1356
|
+
registerCoreTool(AskUserQuestionTool, this);
|
|
1357
|
+
!this.sdkMode && registerCoreTool(ExitPlanModeTool, this);
|
|
1358
|
+
registerCoreTool(WebFetchTool, this);
|
|
1359
|
+
// Conditionally register web search tool if web search provider is configured
|
|
1360
|
+
// buildWebSearchConfig ensures qwen-oauth users get dashscope provider, so
|
|
1361
|
+
// if tool is registered, config must exist
|
|
1362
|
+
if (this.getWebSearchConfig()) {
|
|
1363
|
+
registerCoreTool(WebSearchTool, this);
|
|
1364
|
+
}
|
|
1365
|
+
if (this.isLspEnabled() && this.getLspClient()) {
|
|
1366
|
+
// Register the unified LSP tool
|
|
1367
|
+
registerCoreTool(LspTool, this);
|
|
1368
|
+
}
|
|
1369
|
+
await registry.discoverAllTools();
|
|
1370
|
+
this.debugLogger.debug(`ToolRegistry created: ${JSON.stringify(registry.getAllToolNames())} (${registry.getAllToolNames().length} tools)`);
|
|
1371
|
+
return registry;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
//# sourceMappingURL=config.js.map
|