@anh3d0nic/qwen-code-termux-ice 21.1.0 → 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/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 +2 -1
- package/scripts/postinstall.cjs +32 -6
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
7
|
+
import { GitService } from './gitService.js';
|
|
8
|
+
import { Storage } from '../config/storage.js';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import * as fs from 'node:fs/promises';
|
|
11
|
+
import * as os from 'node:os';
|
|
12
|
+
import { getProjectHash, QWEN_DIR } from '../utils/paths.js';
|
|
13
|
+
import { isCommandAvailable } from '../utils/shell-utils.js';
|
|
14
|
+
vi.mock('../utils/shell-utils.js', () => ({
|
|
15
|
+
isCommandAvailable: vi.fn(),
|
|
16
|
+
}));
|
|
17
|
+
const hoistedMockEnv = vi.hoisted(() => vi.fn());
|
|
18
|
+
const hoistedMockSimpleGit = vi.hoisted(() => vi.fn());
|
|
19
|
+
const hoistedMockCheckIsRepo = vi.hoisted(() => vi.fn());
|
|
20
|
+
const hoistedMockInit = vi.hoisted(() => vi.fn());
|
|
21
|
+
const hoistedMockRaw = vi.hoisted(() => vi.fn());
|
|
22
|
+
const hoistedMockAdd = vi.hoisted(() => vi.fn());
|
|
23
|
+
const hoistedMockCommit = vi.hoisted(() => vi.fn());
|
|
24
|
+
vi.mock('simple-git', () => ({
|
|
25
|
+
simpleGit: hoistedMockSimpleGit.mockImplementation(() => ({
|
|
26
|
+
checkIsRepo: hoistedMockCheckIsRepo,
|
|
27
|
+
init: hoistedMockInit,
|
|
28
|
+
raw: hoistedMockRaw,
|
|
29
|
+
add: hoistedMockAdd,
|
|
30
|
+
commit: hoistedMockCommit,
|
|
31
|
+
env: hoistedMockEnv,
|
|
32
|
+
})),
|
|
33
|
+
CheckRepoActions: { IS_REPO_ROOT: 'is-repo-root' },
|
|
34
|
+
}));
|
|
35
|
+
const hoistedIsGitRepositoryMock = vi.hoisted(() => vi.fn());
|
|
36
|
+
vi.mock('../utils/gitUtils.js', () => ({
|
|
37
|
+
isGitRepository: hoistedIsGitRepositoryMock,
|
|
38
|
+
}));
|
|
39
|
+
const hoistedMockHomedir = vi.hoisted(() => vi.fn());
|
|
40
|
+
vi.mock('os', async (importOriginal) => {
|
|
41
|
+
const actual = await importOriginal();
|
|
42
|
+
return {
|
|
43
|
+
...actual,
|
|
44
|
+
homedir: hoistedMockHomedir,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
describe('GitService', () => {
|
|
48
|
+
let testRootDir;
|
|
49
|
+
let projectRoot;
|
|
50
|
+
let homedir;
|
|
51
|
+
let hash;
|
|
52
|
+
let storage;
|
|
53
|
+
beforeEach(async () => {
|
|
54
|
+
testRootDir = await fs.mkdtemp(path.join(os.tmpdir(), 'git-service-test-'));
|
|
55
|
+
projectRoot = path.join(testRootDir, 'project');
|
|
56
|
+
homedir = path.join(testRootDir, 'home');
|
|
57
|
+
await fs.mkdir(projectRoot, { recursive: true });
|
|
58
|
+
await fs.mkdir(homedir, { recursive: true });
|
|
59
|
+
hash = getProjectHash(projectRoot);
|
|
60
|
+
vi.clearAllMocks();
|
|
61
|
+
hoistedIsGitRepositoryMock.mockReturnValue(true);
|
|
62
|
+
isCommandAvailable.mockReturnValue({ available: true });
|
|
63
|
+
hoistedMockHomedir.mockReturnValue(homedir);
|
|
64
|
+
hoistedMockEnv.mockImplementation(() => ({
|
|
65
|
+
checkIsRepo: hoistedMockCheckIsRepo,
|
|
66
|
+
init: hoistedMockInit,
|
|
67
|
+
raw: hoistedMockRaw,
|
|
68
|
+
add: hoistedMockAdd,
|
|
69
|
+
commit: hoistedMockCommit,
|
|
70
|
+
}));
|
|
71
|
+
hoistedMockSimpleGit.mockImplementation(() => ({
|
|
72
|
+
checkIsRepo: hoistedMockCheckIsRepo,
|
|
73
|
+
init: hoistedMockInit,
|
|
74
|
+
raw: hoistedMockRaw,
|
|
75
|
+
add: hoistedMockAdd,
|
|
76
|
+
commit: hoistedMockCommit,
|
|
77
|
+
env: hoistedMockEnv,
|
|
78
|
+
}));
|
|
79
|
+
hoistedMockCheckIsRepo.mockResolvedValue(false);
|
|
80
|
+
hoistedMockInit.mockResolvedValue(undefined);
|
|
81
|
+
hoistedMockRaw.mockResolvedValue('');
|
|
82
|
+
hoistedMockAdd.mockResolvedValue(undefined);
|
|
83
|
+
hoistedMockCommit.mockResolvedValue({
|
|
84
|
+
commit: 'initial',
|
|
85
|
+
});
|
|
86
|
+
storage = new Storage(projectRoot);
|
|
87
|
+
});
|
|
88
|
+
afterEach(async () => {
|
|
89
|
+
vi.restoreAllMocks();
|
|
90
|
+
await fs.rm(testRootDir, { recursive: true, force: true });
|
|
91
|
+
});
|
|
92
|
+
describe('constructor', () => {
|
|
93
|
+
it('should successfully create an instance', () => {
|
|
94
|
+
expect(() => new GitService(projectRoot, storage)).not.toThrow();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe('initialize', () => {
|
|
98
|
+
it('should throw an error if Git is not available', async () => {
|
|
99
|
+
isCommandAvailable.mockReturnValue({ available: false });
|
|
100
|
+
const service = new GitService(projectRoot, storage);
|
|
101
|
+
await expect(service.initialize()).rejects.toThrow('Checkpointing is enabled, but Git is not installed. Please install Git or disable checkpointing to continue.');
|
|
102
|
+
});
|
|
103
|
+
it('should call setupShadowGitRepository if Git is available', async () => {
|
|
104
|
+
const service = new GitService(projectRoot, storage);
|
|
105
|
+
const setupSpy = vi
|
|
106
|
+
.spyOn(service, 'setupShadowGitRepository')
|
|
107
|
+
.mockResolvedValue(undefined);
|
|
108
|
+
await service.initialize();
|
|
109
|
+
expect(setupSpy).toHaveBeenCalled();
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
describe('setupShadowGitRepository', () => {
|
|
113
|
+
let repoDir;
|
|
114
|
+
let gitConfigPath;
|
|
115
|
+
beforeEach(() => {
|
|
116
|
+
repoDir = path.join(homedir, QWEN_DIR, 'history', hash);
|
|
117
|
+
gitConfigPath = path.join(repoDir, '.gitconfig');
|
|
118
|
+
});
|
|
119
|
+
it('should create history and repository directories', async () => {
|
|
120
|
+
const service = new GitService(projectRoot, storage);
|
|
121
|
+
await service.setupShadowGitRepository();
|
|
122
|
+
const stats = await fs.stat(repoDir);
|
|
123
|
+
expect(stats.isDirectory()).toBe(true);
|
|
124
|
+
});
|
|
125
|
+
it('should create a .gitconfig file with the correct content', async () => {
|
|
126
|
+
const service = new GitService(projectRoot, storage);
|
|
127
|
+
await service.setupShadowGitRepository();
|
|
128
|
+
const expectedConfigContent = '[user]\n name = Qwen Code\n email = qwen-code@qwen.ai\n[commit]\n gpgsign = false\n';
|
|
129
|
+
const actualConfigContent = await fs.readFile(gitConfigPath, 'utf-8');
|
|
130
|
+
expect(actualConfigContent).toBe(expectedConfigContent);
|
|
131
|
+
});
|
|
132
|
+
it('should initialize git repo in historyDir if not already initialized', async () => {
|
|
133
|
+
hoistedMockCheckIsRepo.mockResolvedValue(false);
|
|
134
|
+
const service = new GitService(projectRoot, storage);
|
|
135
|
+
await service.setupShadowGitRepository();
|
|
136
|
+
expect(hoistedMockSimpleGit).toHaveBeenCalledWith(repoDir);
|
|
137
|
+
expect(hoistedMockInit).toHaveBeenCalled();
|
|
138
|
+
});
|
|
139
|
+
it('should not initialize git repo if already initialized', async () => {
|
|
140
|
+
hoistedMockCheckIsRepo.mockResolvedValue(true);
|
|
141
|
+
const service = new GitService(projectRoot, storage);
|
|
142
|
+
await service.setupShadowGitRepository();
|
|
143
|
+
expect(hoistedMockInit).not.toHaveBeenCalled();
|
|
144
|
+
});
|
|
145
|
+
it('should copy .gitignore from projectRoot if it exists', async () => {
|
|
146
|
+
const gitignoreContent = 'node_modules/\n.env';
|
|
147
|
+
const visibleGitIgnorePath = path.join(projectRoot, '.gitignore');
|
|
148
|
+
await fs.writeFile(visibleGitIgnorePath, gitignoreContent);
|
|
149
|
+
const service = new GitService(projectRoot, storage);
|
|
150
|
+
await service.setupShadowGitRepository();
|
|
151
|
+
const hiddenGitIgnorePath = path.join(repoDir, '.gitignore');
|
|
152
|
+
const copiedContent = await fs.readFile(hiddenGitIgnorePath, 'utf-8');
|
|
153
|
+
expect(copiedContent).toBe(gitignoreContent);
|
|
154
|
+
});
|
|
155
|
+
it('should not create a .gitignore in shadow repo if project .gitignore does not exist', async () => {
|
|
156
|
+
const service = new GitService(projectRoot, storage);
|
|
157
|
+
await service.setupShadowGitRepository();
|
|
158
|
+
const hiddenGitIgnorePath = path.join(repoDir, '.gitignore');
|
|
159
|
+
// An empty string is written if the file doesn't exist.
|
|
160
|
+
const content = await fs.readFile(hiddenGitIgnorePath, 'utf-8');
|
|
161
|
+
expect(content).toBe('');
|
|
162
|
+
});
|
|
163
|
+
it('should throw an error if reading projectRoot .gitignore fails with other errors', async () => {
|
|
164
|
+
const visibleGitIgnorePath = path.join(projectRoot, '.gitignore');
|
|
165
|
+
// Create a directory instead of a file to cause a read error
|
|
166
|
+
await fs.mkdir(visibleGitIgnorePath);
|
|
167
|
+
const service = new GitService(projectRoot, storage);
|
|
168
|
+
// EISDIR is the expected error code on Unix-like systems
|
|
169
|
+
await expect(service.setupShadowGitRepository()).rejects.toThrow(/EISDIR: illegal operation on a directory, read|EBUSY: resource busy or locked, read/);
|
|
170
|
+
});
|
|
171
|
+
it('should make an initial commit if no commits exist in history repo', async () => {
|
|
172
|
+
hoistedMockCheckIsRepo.mockResolvedValue(false);
|
|
173
|
+
const service = new GitService(projectRoot, storage);
|
|
174
|
+
await service.setupShadowGitRepository();
|
|
175
|
+
expect(hoistedMockCommit).toHaveBeenCalledWith('Initial commit', {
|
|
176
|
+
'--allow-empty': null,
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
it('should not make an initial commit if commits already exist', async () => {
|
|
180
|
+
hoistedMockCheckIsRepo.mockResolvedValue(true);
|
|
181
|
+
const service = new GitService(projectRoot, storage);
|
|
182
|
+
await service.setupShadowGitRepository();
|
|
183
|
+
expect(hoistedMockCommit).not.toHaveBeenCalled();
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
//# sourceMappingURL=gitService.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitService.test.js","sourceRoot":"","sources":["../../../src/services/gitService.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,QAAQ,EACR,EAAE,EACF,MAAM,EACN,EAAE,EACF,UAAU,EACV,SAAS,GAEV,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CA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ACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;YAC1E,sBAAsB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;YACrD,MAAM,OAAO,CAAC,wBAAwB,EAAE,CAAC;YACzC,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { ServerGeminiStreamEvent } from '../core/turn.js';
|
|
7
|
+
import type { Config } from '../config/config.js';
|
|
8
|
+
/**
|
|
9
|
+
* Service for detecting and preventing infinite loops in AI responses.
|
|
10
|
+
* Monitors tool call repetitions and content sentence repetitions.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LoopDetectionService {
|
|
13
|
+
private readonly config;
|
|
14
|
+
private promptId;
|
|
15
|
+
private lastToolCallKey;
|
|
16
|
+
private toolCallRepetitionCount;
|
|
17
|
+
private streamContentHistory;
|
|
18
|
+
private contentStats;
|
|
19
|
+
private lastContentIndex;
|
|
20
|
+
private loopDetected;
|
|
21
|
+
private inCodeBlock;
|
|
22
|
+
private disabledForSession;
|
|
23
|
+
constructor(config: Config);
|
|
24
|
+
/**
|
|
25
|
+
* Disables loop detection for the current session.
|
|
26
|
+
*/
|
|
27
|
+
disableForSession(): void;
|
|
28
|
+
private getToolCallKey;
|
|
29
|
+
/**
|
|
30
|
+
* Processes a stream event and checks for loop conditions.
|
|
31
|
+
* @param event - The stream event to process
|
|
32
|
+
* @returns true if a loop is detected, false otherwise
|
|
33
|
+
*/
|
|
34
|
+
addAndCheck(event: ServerGeminiStreamEvent): boolean;
|
|
35
|
+
private checkToolCallLoop;
|
|
36
|
+
/**
|
|
37
|
+
* Detects content loops by analyzing streaming text for repetitive patterns.
|
|
38
|
+
*
|
|
39
|
+
* The algorithm works by:
|
|
40
|
+
* 1. Appending new content to the streaming history
|
|
41
|
+
* 2. Truncating history if it exceeds the maximum length
|
|
42
|
+
* 3. Analyzing content chunks for repetitive patterns using hashing
|
|
43
|
+
* 4. Detecting loops when identical chunks appear frequently within a short distance
|
|
44
|
+
* 5. Disabling loop detection within code blocks to prevent false positives,
|
|
45
|
+
* as repetitive code structures are common and not necessarily loops.
|
|
46
|
+
*/
|
|
47
|
+
private checkContentLoop;
|
|
48
|
+
/**
|
|
49
|
+
* Truncates the content history to prevent unbounded memory growth.
|
|
50
|
+
* When truncating, adjusts all stored indices to maintain their relative positions.
|
|
51
|
+
*/
|
|
52
|
+
private truncateAndUpdate;
|
|
53
|
+
/**
|
|
54
|
+
* Analyzes content in fixed-size chunks to detect repetitive patterns.
|
|
55
|
+
*
|
|
56
|
+
* Uses a sliding window approach:
|
|
57
|
+
* 1. Extract chunks of fixed size (CONTENT_CHUNK_SIZE)
|
|
58
|
+
* 2. Hash each chunk for efficient comparison
|
|
59
|
+
* 3. Track positions where identical chunks appear
|
|
60
|
+
* 4. Detect loops when chunks repeat frequently within a short distance
|
|
61
|
+
*/
|
|
62
|
+
private analyzeContentChunksForLoop;
|
|
63
|
+
private hasMoreChunksToProcess;
|
|
64
|
+
/**
|
|
65
|
+
* Determines if a content chunk indicates a loop pattern.
|
|
66
|
+
*
|
|
67
|
+
* Loop detection logic:
|
|
68
|
+
* 1. Check if we've seen this hash before (new chunks are stored for future comparison)
|
|
69
|
+
* 2. Verify actual content matches to prevent hash collisions
|
|
70
|
+
* 3. Track all positions where this chunk appears
|
|
71
|
+
* 4. A loop is detected when the same chunk appears CONTENT_LOOP_THRESHOLD times
|
|
72
|
+
* within a small average distance (≤ 1.5 * chunk size)
|
|
73
|
+
*/
|
|
74
|
+
private isLoopDetectedForChunk;
|
|
75
|
+
/**
|
|
76
|
+
* Verifies that two chunks with the same hash actually contain identical content.
|
|
77
|
+
* This prevents false positives from hash collisions.
|
|
78
|
+
*/
|
|
79
|
+
private isActualContentMatch;
|
|
80
|
+
/**
|
|
81
|
+
* Resets all loop detection state.
|
|
82
|
+
*/
|
|
83
|
+
reset(promptId: string): void;
|
|
84
|
+
private resetToolCallCount;
|
|
85
|
+
private resetContentTracking;
|
|
86
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { createHash } from 'node:crypto';
|
|
7
|
+
import { GeminiEventType } from '../core/turn.js';
|
|
8
|
+
import { logLoopDetected, logLoopDetectionDisabled, } from '../telemetry/loggers.js';
|
|
9
|
+
import { LoopDetectedEvent, LoopDetectionDisabledEvent, LoopType, } from '../telemetry/types.js';
|
|
10
|
+
const TOOL_CALL_LOOP_THRESHOLD = 5;
|
|
11
|
+
const CONTENT_LOOP_THRESHOLD = 10;
|
|
12
|
+
const CONTENT_CHUNK_SIZE = 50;
|
|
13
|
+
const MAX_HISTORY_LENGTH = 1000;
|
|
14
|
+
/**
|
|
15
|
+
* Service for detecting and preventing infinite loops in AI responses.
|
|
16
|
+
* Monitors tool call repetitions and content sentence repetitions.
|
|
17
|
+
*/
|
|
18
|
+
export class LoopDetectionService {
|
|
19
|
+
config;
|
|
20
|
+
promptId = '';
|
|
21
|
+
// Tool call tracking
|
|
22
|
+
lastToolCallKey = null;
|
|
23
|
+
toolCallRepetitionCount = 0;
|
|
24
|
+
// Content streaming tracking
|
|
25
|
+
streamContentHistory = '';
|
|
26
|
+
contentStats = new Map();
|
|
27
|
+
lastContentIndex = 0;
|
|
28
|
+
loopDetected = false;
|
|
29
|
+
inCodeBlock = false;
|
|
30
|
+
// Session-level disable flag
|
|
31
|
+
disabledForSession = false;
|
|
32
|
+
constructor(config) {
|
|
33
|
+
this.config = config;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Disables loop detection for the current session.
|
|
37
|
+
*/
|
|
38
|
+
disableForSession() {
|
|
39
|
+
this.disabledForSession = true;
|
|
40
|
+
logLoopDetectionDisabled(this.config, new LoopDetectionDisabledEvent(this.promptId));
|
|
41
|
+
}
|
|
42
|
+
getToolCallKey(toolCall) {
|
|
43
|
+
const argsString = JSON.stringify(toolCall.args);
|
|
44
|
+
const keyString = `${toolCall.name}:${argsString}`;
|
|
45
|
+
return createHash('sha256').update(keyString).digest('hex');
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Processes a stream event and checks for loop conditions.
|
|
49
|
+
* @param event - The stream event to process
|
|
50
|
+
* @returns true if a loop is detected, false otherwise
|
|
51
|
+
*/
|
|
52
|
+
addAndCheck(event) {
|
|
53
|
+
if (this.loopDetected || this.disabledForSession) {
|
|
54
|
+
return this.loopDetected;
|
|
55
|
+
}
|
|
56
|
+
switch (event.type) {
|
|
57
|
+
case GeminiEventType.ToolCallRequest:
|
|
58
|
+
// content chanting only happens in one single stream, reset if there
|
|
59
|
+
// is a tool call in between
|
|
60
|
+
this.resetContentTracking();
|
|
61
|
+
this.loopDetected = this.checkToolCallLoop(event.value);
|
|
62
|
+
break;
|
|
63
|
+
case GeminiEventType.Content:
|
|
64
|
+
this.loopDetected = this.checkContentLoop(event.value);
|
|
65
|
+
break;
|
|
66
|
+
default:
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return this.loopDetected;
|
|
70
|
+
}
|
|
71
|
+
checkToolCallLoop(toolCall) {
|
|
72
|
+
const key = this.getToolCallKey(toolCall);
|
|
73
|
+
if (this.lastToolCallKey === key) {
|
|
74
|
+
this.toolCallRepetitionCount++;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.lastToolCallKey = key;
|
|
78
|
+
this.toolCallRepetitionCount = 1;
|
|
79
|
+
}
|
|
80
|
+
if (this.toolCallRepetitionCount >= TOOL_CALL_LOOP_THRESHOLD) {
|
|
81
|
+
logLoopDetected(this.config, new LoopDetectedEvent(LoopType.CONSECUTIVE_IDENTICAL_TOOL_CALLS, this.promptId));
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Detects content loops by analyzing streaming text for repetitive patterns.
|
|
88
|
+
*
|
|
89
|
+
* The algorithm works by:
|
|
90
|
+
* 1. Appending new content to the streaming history
|
|
91
|
+
* 2. Truncating history if it exceeds the maximum length
|
|
92
|
+
* 3. Analyzing content chunks for repetitive patterns using hashing
|
|
93
|
+
* 4. Detecting loops when identical chunks appear frequently within a short distance
|
|
94
|
+
* 5. Disabling loop detection within code blocks to prevent false positives,
|
|
95
|
+
* as repetitive code structures are common and not necessarily loops.
|
|
96
|
+
*/
|
|
97
|
+
checkContentLoop(content) {
|
|
98
|
+
// Different content elements can often contain repetitive syntax that is not indicative of a loop.
|
|
99
|
+
// To avoid false positives, we detect when we encounter different content types and
|
|
100
|
+
// reset tracking to avoid analyzing content that spans across different element boundaries.
|
|
101
|
+
const numFences = (content.match(/```/g) ?? []).length;
|
|
102
|
+
const hasTable = /(^|\n)\s*(\|.*\||[|+-]{3,})/.test(content);
|
|
103
|
+
const hasListItem = /(^|\n)\s*[*-+]\s/.test(content) || /(^|\n)\s*\d+\.\s/.test(content);
|
|
104
|
+
const hasHeading = /(^|\n)#+\s/.test(content);
|
|
105
|
+
const hasBlockquote = /(^|\n)>\s/.test(content);
|
|
106
|
+
const isDivider = /^[+-_=*\u2500-\u257F]+$/.test(content);
|
|
107
|
+
if (numFences ||
|
|
108
|
+
hasTable ||
|
|
109
|
+
hasListItem ||
|
|
110
|
+
hasHeading ||
|
|
111
|
+
hasBlockquote ||
|
|
112
|
+
isDivider) {
|
|
113
|
+
// Reset tracking when different content elements are detected to avoid analyzing content
|
|
114
|
+
// that spans across different element boundaries.
|
|
115
|
+
this.resetContentTracking();
|
|
116
|
+
}
|
|
117
|
+
const wasInCodeBlock = this.inCodeBlock;
|
|
118
|
+
this.inCodeBlock =
|
|
119
|
+
numFences % 2 === 0 ? this.inCodeBlock : !this.inCodeBlock;
|
|
120
|
+
if (wasInCodeBlock || this.inCodeBlock || isDivider) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
this.streamContentHistory += content;
|
|
124
|
+
this.truncateAndUpdate();
|
|
125
|
+
return this.analyzeContentChunksForLoop();
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Truncates the content history to prevent unbounded memory growth.
|
|
129
|
+
* When truncating, adjusts all stored indices to maintain their relative positions.
|
|
130
|
+
*/
|
|
131
|
+
truncateAndUpdate() {
|
|
132
|
+
if (this.streamContentHistory.length <= MAX_HISTORY_LENGTH) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
// Calculate how much content to remove from the beginning
|
|
136
|
+
const truncationAmount = this.streamContentHistory.length - MAX_HISTORY_LENGTH;
|
|
137
|
+
this.streamContentHistory =
|
|
138
|
+
this.streamContentHistory.slice(truncationAmount);
|
|
139
|
+
this.lastContentIndex = Math.max(0, this.lastContentIndex - truncationAmount);
|
|
140
|
+
// Update all stored chunk indices to account for the truncation
|
|
141
|
+
for (const [hash, oldIndices] of this.contentStats.entries()) {
|
|
142
|
+
const adjustedIndices = oldIndices
|
|
143
|
+
.map((index) => index - truncationAmount)
|
|
144
|
+
.filter((index) => index >= 0);
|
|
145
|
+
if (adjustedIndices.length > 0) {
|
|
146
|
+
this.contentStats.set(hash, adjustedIndices);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
this.contentStats.delete(hash);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Analyzes content in fixed-size chunks to detect repetitive patterns.
|
|
155
|
+
*
|
|
156
|
+
* Uses a sliding window approach:
|
|
157
|
+
* 1. Extract chunks of fixed size (CONTENT_CHUNK_SIZE)
|
|
158
|
+
* 2. Hash each chunk for efficient comparison
|
|
159
|
+
* 3. Track positions where identical chunks appear
|
|
160
|
+
* 4. Detect loops when chunks repeat frequently within a short distance
|
|
161
|
+
*/
|
|
162
|
+
analyzeContentChunksForLoop() {
|
|
163
|
+
while (this.hasMoreChunksToProcess()) {
|
|
164
|
+
// Extract current chunk of text
|
|
165
|
+
const currentChunk = this.streamContentHistory.substring(this.lastContentIndex, this.lastContentIndex + CONTENT_CHUNK_SIZE);
|
|
166
|
+
const chunkHash = createHash('sha256').update(currentChunk).digest('hex');
|
|
167
|
+
if (this.isLoopDetectedForChunk(currentChunk, chunkHash)) {
|
|
168
|
+
logLoopDetected(this.config, new LoopDetectedEvent(LoopType.CHANTING_IDENTICAL_SENTENCES, this.promptId));
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
// Move to next position in the sliding window
|
|
172
|
+
this.lastContentIndex++;
|
|
173
|
+
}
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
hasMoreChunksToProcess() {
|
|
177
|
+
return (this.lastContentIndex + CONTENT_CHUNK_SIZE <=
|
|
178
|
+
this.streamContentHistory.length);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Determines if a content chunk indicates a loop pattern.
|
|
182
|
+
*
|
|
183
|
+
* Loop detection logic:
|
|
184
|
+
* 1. Check if we've seen this hash before (new chunks are stored for future comparison)
|
|
185
|
+
* 2. Verify actual content matches to prevent hash collisions
|
|
186
|
+
* 3. Track all positions where this chunk appears
|
|
187
|
+
* 4. A loop is detected when the same chunk appears CONTENT_LOOP_THRESHOLD times
|
|
188
|
+
* within a small average distance (≤ 1.5 * chunk size)
|
|
189
|
+
*/
|
|
190
|
+
isLoopDetectedForChunk(chunk, hash) {
|
|
191
|
+
const existingIndices = this.contentStats.get(hash);
|
|
192
|
+
if (!existingIndices) {
|
|
193
|
+
this.contentStats.set(hash, [this.lastContentIndex]);
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
if (!this.isActualContentMatch(chunk, existingIndices[0])) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
existingIndices.push(this.lastContentIndex);
|
|
200
|
+
if (existingIndices.length < CONTENT_LOOP_THRESHOLD) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
// Analyze the most recent occurrences to see if they're clustered closely together
|
|
204
|
+
const recentIndices = existingIndices.slice(-CONTENT_LOOP_THRESHOLD);
|
|
205
|
+
const totalDistance = recentIndices[recentIndices.length - 1] - recentIndices[0];
|
|
206
|
+
const averageDistance = totalDistance / (CONTENT_LOOP_THRESHOLD - 1);
|
|
207
|
+
const maxAllowedDistance = CONTENT_CHUNK_SIZE * 1.5;
|
|
208
|
+
return averageDistance <= maxAllowedDistance;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Verifies that two chunks with the same hash actually contain identical content.
|
|
212
|
+
* This prevents false positives from hash collisions.
|
|
213
|
+
*/
|
|
214
|
+
isActualContentMatch(currentChunk, originalIndex) {
|
|
215
|
+
const originalChunk = this.streamContentHistory.substring(originalIndex, originalIndex + CONTENT_CHUNK_SIZE);
|
|
216
|
+
return originalChunk === currentChunk;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Resets all loop detection state.
|
|
220
|
+
*/
|
|
221
|
+
reset(promptId) {
|
|
222
|
+
this.promptId = promptId;
|
|
223
|
+
this.resetToolCallCount();
|
|
224
|
+
this.resetContentTracking();
|
|
225
|
+
this.loopDetected = false;
|
|
226
|
+
}
|
|
227
|
+
resetToolCallCount() {
|
|
228
|
+
this.lastToolCallKey = null;
|
|
229
|
+
this.toolCallRepetitionCount = 0;
|
|
230
|
+
}
|
|
231
|
+
resetContentTracking(resetHistory = true) {
|
|
232
|
+
if (resetHistory) {
|
|
233
|
+
this.streamContentHistory = '';
|
|
234
|
+
}
|
|
235
|
+
this.contentStats.clear();
|
|
236
|
+
this.lastContentIndex = 0;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=loopDetectionService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loopDetectionService.js","sourceRoot":"","sources":["../../../src/services/loopDetectionService.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,eAAe,EACf,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,0BAA0B,EAC1B,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAG/B,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACd,MAAM,CAAS;IACxB,QAAQ,GAAG,EAAE,CAAC;IAEtB,qBAAqB;IACb,eAAe,GAAkB,IAAI,CAAC;IACtC,uBAAuB,GAAW,CAAC,CAAC;IAE5C,6BAA6B;IACrB,oBAAoB,GAAG,EAAE,CAAC;IAC1B,YAAY,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC3C,gBAAgB,GAAG,CAAC,CAAC;IACrB,YAAY,GAAG,KAAK,CAAC;IACrB,WAAW,GAAG,KAAK,CAAC;IAE5B,6BAA6B;IACrB,kBAAkB,GAAG,KAAK,CAAC;IAEnC,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,wBAAwB,CACtB,IAAI,C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