@google/gemini-cli-core 0.1.0-development.1
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/LICENSE +202 -0
- package/README.md +156 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/src/__mocks__/fs/promises.d.ts +11 -0
- package/dist/src/__mocks__/fs/promises.js +17 -0
- package/dist/src/__mocks__/fs/promises.js.map +1 -0
- package/dist/src/code_assist/codeAssist.d.ts +8 -0
- package/dist/src/code_assist/codeAssist.js +19 -0
- package/dist/src/code_assist/codeAssist.js.map +1 -0
- package/dist/src/code_assist/converter.d.ts +68 -0
- package/dist/src/code_assist/converter.js +125 -0
- package/dist/src/code_assist/converter.js.map +1 -0
- package/dist/src/code_assist/converter.test.d.ts +6 -0
- package/dist/src/code_assist/converter.test.js +229 -0
- package/dist/src/code_assist/converter.test.js.map +1 -0
- package/dist/src/code_assist/oauth2.d.ts +26 -0
- package/dist/src/code_assist/oauth2.js +277 -0
- package/dist/src/code_assist/oauth2.js.map +1 -0
- package/dist/src/code_assist/oauth2.test.d.ts +6 -0
- package/dist/src/code_assist/oauth2.test.js +195 -0
- package/dist/src/code_assist/oauth2.test.js.map +1 -0
- package/dist/src/code_assist/server.d.ts +35 -0
- package/dist/src/code_assist/server.js +123 -0
- package/dist/src/code_assist/server.js.map +1 -0
- package/dist/src/code_assist/server.test.d.ts +6 -0
- package/dist/src/code_assist/server.test.js +123 -0
- package/dist/src/code_assist/server.test.js.map +1 -0
- package/dist/src/code_assist/setup.d.ts +15 -0
- package/dist/src/code_assist/setup.js +67 -0
- package/dist/src/code_assist/setup.js.map +1 -0
- package/dist/src/code_assist/types.d.ts +148 -0
- package/dist/src/code_assist/types.js +46 -0
- package/dist/src/code_assist/types.js.map +1 -0
- package/dist/src/config/config.d.ts +175 -0
- package/dist/src/config/config.js +385 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/config.test.d.ts +6 -0
- package/dist/src/config/config.test.js +263 -0
- package/dist/src/config/config.test.js.map +1 -0
- package/dist/src/config/flashFallback.test.d.ts +6 -0
- package/dist/src/config/flashFallback.test.js +115 -0
- package/dist/src/config/flashFallback.test.js.map +1 -0
- package/dist/src/config/models.d.ts +8 -0
- package/dist/src/config/models.js +9 -0
- package/dist/src/config/models.js.map +1 -0
- package/dist/src/core/client.d.ts +39 -0
- package/dist/src/core/client.js +386 -0
- package/dist/src/core/client.js.map +1 -0
- package/dist/src/core/client.test.d.ts +6 -0
- package/dist/src/core/client.test.js +630 -0
- package/dist/src/core/client.test.js.map +1 -0
- package/dist/src/core/contentGenerator.d.ts +29 -0
- package/dist/src/core/contentGenerator.js +71 -0
- package/dist/src/core/contentGenerator.js.map +1 -0
- package/dist/src/core/contentGenerator.test.d.ts +6 -0
- package/dist/src/core/contentGenerator.test.js +45 -0
- package/dist/src/core/contentGenerator.test.js.map +1 -0
- package/dist/src/core/coreToolScheduler.d.ts +104 -0
- package/dist/src/core/coreToolScheduler.js +397 -0
- package/dist/src/core/coreToolScheduler.js.map +1 -0
- package/dist/src/core/coreToolScheduler.test.d.ts +6 -0
- package/dist/src/core/coreToolScheduler.test.js +318 -0
- package/dist/src/core/coreToolScheduler.test.js.map +1 -0
- package/dist/src/core/geminiChat.d.ts +116 -0
- package/dist/src/core/geminiChat.js +491 -0
- package/dist/src/core/geminiChat.js.map +1 -0
- package/dist/src/core/geminiChat.test.d.ts +6 -0
- package/dist/src/core/geminiChat.test.js +422 -0
- package/dist/src/core/geminiChat.test.js.map +1 -0
- package/dist/src/core/geminiRequest.d.ts +13 -0
- package/dist/src/core/geminiRequest.js +45 -0
- package/dist/src/core/geminiRequest.js.map +1 -0
- package/dist/src/core/geminiRequest.test.d.ts +6 -0
- package/dist/src/core/geminiRequest.test.js +72 -0
- package/dist/src/core/geminiRequest.test.js.map +1 -0
- package/dist/src/core/logger.d.ts +35 -0
- package/dist/src/core/logger.js +235 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/logger.test.d.ts +6 -0
- package/dist/src/core/logger.test.js +387 -0
- package/dist/src/core/logger.test.js.map +1 -0
- package/dist/src/core/modelCheck.d.ts +14 -0
- package/dist/src/core/modelCheck.js +55 -0
- package/dist/src/core/modelCheck.js.map +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.d.ts +12 -0
- package/dist/src/core/nonInteractiveToolExecutor.js +92 -0
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js +181 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
- package/dist/src/core/prompts.d.ts +12 -0
- package/dist/src/core/prompts.js +334 -0
- package/dist/src/core/prompts.js.map +1 -0
- package/dist/src/core/prompts.test.d.ts +6 -0
- package/dist/src/core/prompts.test.js +97 -0
- package/dist/src/core/prompts.test.js.map +1 -0
- package/dist/src/core/tokenLimits.d.ts +10 -0
- package/dist/src/core/tokenLimits.js +27 -0
- package/dist/src/core/tokenLimits.js.map +1 -0
- package/dist/src/core/turn.d.ts +96 -0
- package/dist/src/core/turn.js +125 -0
- package/dist/src/core/turn.js.map +1 -0
- package/dist/src/core/turn.test.d.ts +6 -0
- package/dist/src/core/turn.test.js +236 -0
- package/dist/src/core/turn.test.js.map +1 -0
- package/dist/src/index.d.ts +46 -0
- package/dist/src/index.js +54 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.test.d.ts +6 -0
- package/dist/src/index.test.js +12 -0
- package/dist/src/index.test.js.map +1 -0
- package/dist/src/services/fileDiscoveryService.d.ts +35 -0
- package/dist/src/services/fileDiscoveryService.js +91 -0
- package/dist/src/services/fileDiscoveryService.js.map +1 -0
- package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
- package/dist/src/services/fileDiscoveryService.test.js +102 -0
- package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
- package/dist/src/services/gitService.d.ts +21 -0
- package/dist/src/services/gitService.js +105 -0
- package/dist/src/services/gitService.js.map +1 -0
- package/dist/src/services/gitService.test.d.ts +6 -0
- package/dist/src/services/gitService.test.js +233 -0
- package/dist/src/services/gitService.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +33 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +364 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +43 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +109 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
- package/dist/src/telemetry/constants.d.ts +19 -0
- package/dist/src/telemetry/constants.js +20 -0
- package/dist/src/telemetry/constants.js.map +1 -0
- package/dist/src/telemetry/index.d.ts +18 -0
- package/dist/src/telemetry/index.js +20 -0
- package/dist/src/telemetry/index.js.map +1 -0
- package/dist/src/telemetry/loggers.d.ts +13 -0
- package/dist/src/telemetry/loggers.js +187 -0
- package/dist/src/telemetry/loggers.js.map +1 -0
- package/dist/src/telemetry/loggers.test.d.ts +6 -0
- package/dist/src/telemetry/loggers.test.js +525 -0
- package/dist/src/telemetry/loggers.test.js.map +1 -0
- package/dist/src/telemetry/metrics.d.ts +19 -0
- package/dist/src/telemetry/metrics.js +144 -0
- package/dist/src/telemetry/metrics.js.map +1 -0
- package/dist/src/telemetry/metrics.test.d.ts +6 -0
- package/dist/src/telemetry/metrics.test.js +162 -0
- package/dist/src/telemetry/metrics.test.js.map +1 -0
- package/dist/src/telemetry/sdk.d.ts +9 -0
- package/dist/src/telemetry/sdk.js +116 -0
- package/dist/src/telemetry/sdk.js.map +1 -0
- package/dist/src/telemetry/telemetry.test.d.ts +6 -0
- package/dist/src/telemetry/telemetry.test.js +50 -0
- package/dist/src/telemetry/telemetry.test.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +91 -0
- package/dist/src/telemetry/types.js +176 -0
- package/dist/src/telemetry/types.js.map +1 -0
- package/dist/src/telemetry/uiTelemetry.d.ts +67 -0
- package/dist/src/telemetry/uiTelemetry.js +131 -0
- package/dist/src/telemetry/uiTelemetry.js.map +1 -0
- package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
- package/dist/src/telemetry/uiTelemetry.test.js +411 -0
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
- package/dist/src/tools/diffOptions.d.ts +7 -0
- package/dist/src/tools/diffOptions.js +10 -0
- package/dist/src/tools/diffOptions.js.map +1 -0
- package/dist/src/tools/edit.d.ts +84 -0
- package/dist/src/tools/edit.js +359 -0
- package/dist/src/tools/edit.js.map +1 -0
- package/dist/src/tools/edit.test.d.ts +6 -0
- package/dist/src/tools/edit.test.js +500 -0
- package/dist/src/tools/edit.test.js.map +1 -0
- package/dist/src/tools/glob.d.ts +71 -0
- package/dist/src/tools/glob.js +215 -0
- package/dist/src/tools/glob.js.map +1 -0
- package/dist/src/tools/glob.test.d.ts +6 -0
- package/dist/src/tools/glob.test.js +293 -0
- package/dist/src/tools/glob.test.js.map +1 -0
- package/dist/src/tools/grep.d.ts +81 -0
- package/dist/src/tools/grep.js +427 -0
- package/dist/src/tools/grep.js.map +1 -0
- package/dist/src/tools/grep.test.d.ts +6 -0
- package/dist/src/tools/grep.test.js +185 -0
- package/dist/src/tools/grep.test.js.map +1 -0
- package/dist/src/tools/ls.d.ts +94 -0
- package/dist/src/tools/ls.js +215 -0
- package/dist/src/tools/ls.js.map +1 -0
- package/dist/src/tools/mcp-client.d.ts +56 -0
- package/dist/src/tools/mcp-client.js +302 -0
- package/dist/src/tools/mcp-client.js.map +1 -0
- package/dist/src/tools/mcp-client.test.d.ts +6 -0
- package/dist/src/tools/mcp-client.test.js +608 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -0
- package/dist/src/tools/mcp-tool.d.ts +23 -0
- package/dist/src/tools/mcp-tool.js +119 -0
- package/dist/src/tools/mcp-tool.js.map +1 -0
- package/dist/src/tools/mcp-tool.test.d.ts +6 -0
- package/dist/src/tools/mcp-tool.test.js +173 -0
- package/dist/src/tools/mcp-tool.test.js.map +1 -0
- package/dist/src/tools/memoryTool.d.ts +28 -0
- package/dist/src/tools/memoryTool.js +171 -0
- package/dist/src/tools/memoryTool.js.map +1 -0
- package/dist/src/tools/memoryTool.test.d.ts +6 -0
- package/dist/src/tools/memoryTool.test.js +181 -0
- package/dist/src/tools/memoryTool.test.js.map +1 -0
- package/dist/src/tools/modifiable-tool.d.ts +29 -0
- package/dist/src/tools/modifiable-tool.js +85 -0
- package/dist/src/tools/modifiable-tool.js.map +1 -0
- package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
- package/dist/src/tools/modifiable-tool.test.js +204 -0
- package/dist/src/tools/modifiable-tool.test.js.map +1 -0
- package/dist/src/tools/read-file.d.ts +36 -0
- package/dist/src/tools/read-file.js +103 -0
- package/dist/src/tools/read-file.js.map +1 -0
- package/dist/src/tools/read-file.test.d.ts +6 -0
- package/dist/src/tools/read-file.test.js +180 -0
- package/dist/src/tools/read-file.test.js.map +1 -0
- package/dist/src/tools/read-many-files.d.ts +65 -0
- package/dist/src/tools/read-many-files.js +344 -0
- package/dist/src/tools/read-many-files.js.map +1 -0
- package/dist/src/tools/read-many-files.test.d.ts +6 -0
- package/dist/src/tools/read-many-files.test.js +300 -0
- package/dist/src/tools/read-many-files.test.js.map +1 -0
- package/dist/src/tools/shell.d.ts +43 -0
- package/dist/src/tools/shell.js +421 -0
- package/dist/src/tools/shell.js.map +1 -0
- package/dist/src/tools/shell.test.d.ts +6 -0
- package/dist/src/tools/shell.test.js +321 -0
- package/dist/src/tools/shell.test.js.map +1 -0
- package/dist/src/tools/tool-registry.d.ts +67 -0
- package/dist/src/tools/tool-registry.js +326 -0
- package/dist/src/tools/tool-registry.js.map +1 -0
- package/dist/src/tools/tool-registry.test.d.ts +6 -0
- package/dist/src/tools/tool-registry.test.js +353 -0
- package/dist/src/tools/tool-registry.test.js.map +1 -0
- package/dist/src/tools/tools.d.ts +179 -0
- package/dist/src/tools/tools.js +88 -0
- package/dist/src/tools/tools.js.map +1 -0
- package/dist/src/tools/web-fetch.d.ts +29 -0
- package/dist/src/tools/web-fetch.js +240 -0
- package/dist/src/tools/web-fetch.js.map +1 -0
- package/dist/src/tools/web-fetch.test.d.ts +6 -0
- package/dist/src/tools/web-fetch.test.js +70 -0
- package/dist/src/tools/web-fetch.test.js.map +1 -0
- package/dist/src/tools/web-search.d.ts +49 -0
- package/dist/src/tools/web-search.js +119 -0
- package/dist/src/tools/web-search.js.map +1 -0
- package/dist/src/tools/write-file.d.ts +50 -0
- package/dist/src/tools/write-file.js +261 -0
- package/dist/src/tools/write-file.js.map +1 -0
- package/dist/src/tools/write-file.test.d.ts +6 -0
- package/dist/src/tools/write-file.test.js +413 -0
- package/dist/src/tools/write-file.test.js.map +1 -0
- package/dist/src/utils/LruCache.d.ts +13 -0
- package/dist/src/utils/LruCache.js +38 -0
- package/dist/src/utils/LruCache.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.d.ts +22 -0
- package/dist/src/utils/bfsFileSearch.js +62 -0
- package/dist/src/utils/bfsFileSearch.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
- package/dist/src/utils/bfsFileSearch.test.js +129 -0
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
- package/dist/src/utils/editCorrector.d.ts +53 -0
- package/dist/src/utils/editCorrector.js +546 -0
- package/dist/src/utils/editCorrector.js.map +1 -0
- package/dist/src/utils/editCorrector.test.d.ts +6 -0
- package/dist/src/utils/editCorrector.test.js +560 -0
- package/dist/src/utils/editCorrector.test.js.map +1 -0
- package/dist/src/utils/editor.d.ts +28 -0
- package/dist/src/utils/editor.js +163 -0
- package/dist/src/utils/editor.js.map +1 -0
- package/dist/src/utils/editor.test.d.ts +6 -0
- package/dist/src/utils/editor.test.js +293 -0
- package/dist/src/utils/editor.test.js.map +1 -0
- package/dist/src/utils/errorReporting.d.ts +14 -0
- package/dist/src/utils/errorReporting.js +88 -0
- package/dist/src/utils/errorReporting.js.map +1 -0
- package/dist/src/utils/errorReporting.test.d.ts +6 -0
- package/dist/src/utils/errorReporting.test.js +124 -0
- package/dist/src/utils/errorReporting.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +14 -0
- package/dist/src/utils/errors.js +54 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/fetch.d.ts +11 -0
- package/dist/src/utils/fetch.js +51 -0
- package/dist/src/utils/fetch.js.map +1 -0
- package/dist/src/utils/fileUtils.d.ts +49 -0
- package/dist/src/utils/fileUtils.js +284 -0
- package/dist/src/utils/fileUtils.js.map +1 -0
- package/dist/src/utils/fileUtils.test.d.ts +6 -0
- package/dist/src/utils/fileUtils.test.js +321 -0
- package/dist/src/utils/fileUtils.test.js.map +1 -0
- package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
- package/dist/src/utils/flashFallback.integration.test.js +112 -0
- package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
- package/dist/src/utils/generateContentResponseUtilities.d.ts +14 -0
- package/dist/src/utils/generateContentResponseUtilities.js +92 -0
- package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
- package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
- package/dist/src/utils/generateContentResponseUtilities.test.js +273 -0
- package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
- package/dist/src/utils/getFolderStructure.d.ts +30 -0
- package/dist/src/utils/getFolderStructure.js +247 -0
- package/dist/src/utils/getFolderStructure.js.map +1 -0
- package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
- package/dist/src/utils/getFolderStructure.test.js +300 -0
- package/dist/src/utils/getFolderStructure.test.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
- package/dist/src/utils/gitIgnoreParser.js +64 -0
- package/dist/src/utils/gitIgnoreParser.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
- package/dist/src/utils/gitIgnoreParser.test.js +145 -0
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +17 -0
- package/dist/src/utils/gitUtils.js +61 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.d.ts +14 -0
- package/dist/src/utils/memoryDiscovery.js +219 -0
- package/dist/src/utils/memoryDiscovery.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
- package/dist/src/utils/memoryDiscovery.test.js +432 -0
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
- package/dist/src/utils/memoryImportProcessor.d.ts +35 -0
- package/dist/src/utils/memoryImportProcessor.js +141 -0
- package/dist/src/utils/memoryImportProcessor.js.map +1 -0
- package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
- package/dist/src/utils/memoryImportProcessor.test.js +170 -0
- package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
- package/dist/src/utils/messageInspectors.d.ts +8 -0
- package/dist/src/utils/messageInspectors.js +16 -0
- package/dist/src/utils/messageInspectors.js.map +1 -0
- package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
- package/dist/src/utils/nextSpeakerChecker.js +111 -0
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
- package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
- package/dist/src/utils/nextSpeakerChecker.test.js +152 -0
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
- package/dist/src/utils/paths.d.ts +47 -0
- package/dist/src/utils/paths.js +136 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/retry.d.ts +21 -0
- package/dist/src/utils/retry.js +220 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/utils/retry.test.d.ts +6 -0
- package/dist/src/utils/retry.test.js +322 -0
- package/dist/src/utils/retry.test.js.map +1 -0
- package/dist/src/utils/schemaValidator.d.ts +17 -0
- package/dist/src/utils/schemaValidator.js +50 -0
- package/dist/src/utils/schemaValidator.js.map +1 -0
- package/dist/src/utils/session.d.ts +6 -0
- package/dist/src/utils/session.js +8 -0
- package/dist/src/utils/session.js.map +1 -0
- package/dist/src/utils/testUtils.d.ts +29 -0
- package/dist/src/utils/testUtils.js +70 -0
- package/dist/src/utils/testUtils.js.map +1 -0
- package/dist/src/utils/user_id.d.ts +17 -0
- package/dist/src/utils/user_id.js +70 -0
- package/dist/src/utils/user_id.js.map +1 -0
- package/dist/src/utils/user_id.test.d.ts +6 -0
- package/dist/src/utils/user_id.test.js +42 -0
- package/dist/src/utils/user_id.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'fs';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import os from 'os';
|
|
9
|
+
import crypto from 'crypto';
|
|
10
|
+
import { BaseTool, ToolConfirmationOutcome, } from './tools.js';
|
|
11
|
+
import { SchemaValidator } from '../utils/schemaValidator.js';
|
|
12
|
+
import { getErrorMessage } from '../utils/errors.js';
|
|
13
|
+
import stripAnsi from 'strip-ansi';
|
|
14
|
+
import { spawn } from 'child_process';
|
|
15
|
+
const OUTPUT_UPDATE_INTERVAL_MS = 1000;
|
|
16
|
+
export class ShellTool extends BaseTool {
|
|
17
|
+
config;
|
|
18
|
+
static Name = 'run_shell_command';
|
|
19
|
+
whitelist = new Set();
|
|
20
|
+
constructor(config) {
|
|
21
|
+
super(ShellTool.Name, 'Shell', `This tool executes a given shell command as \`bash -c <command>\`. Command can start background processes using \`&\`. Command is executed as a subprocess that leads its own process group. Command process group can be terminated as \`kill -- -PGID\` or signaled as \`kill -s SIGNAL -- -PGID\`.
|
|
22
|
+
|
|
23
|
+
The following information is returned:
|
|
24
|
+
|
|
25
|
+
Command: Executed command.
|
|
26
|
+
Directory: Directory (relative to project root) where command was executed, or \`(root)\`.
|
|
27
|
+
Stdout: Output on stdout stream. Can be \`(empty)\` or partial on error and for any unwaited background processes.
|
|
28
|
+
Stderr: Output on stderr stream. Can be \`(empty)\` or partial on error and for any unwaited background processes.
|
|
29
|
+
Error: Error or \`(none)\` if no error was reported for the subprocess.
|
|
30
|
+
Exit Code: Exit code or \`(none)\` if terminated by signal.
|
|
31
|
+
Signal: Signal number or \`(none)\` if no signal was received.
|
|
32
|
+
Background PIDs: List of background processes started or \`(none)\`.
|
|
33
|
+
Process Group PGID: Process group started or \`(none)\``, {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
command: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Exact bash command to execute as `bash -c <command>`',
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Brief description of the command for the user. Be specific and concise. Ideally a single sentence. Can be up to 3 sentences for clarity. No line breaks.',
|
|
43
|
+
},
|
|
44
|
+
directory: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: '(OPTIONAL) Directory to run the command in, if not the project root directory. Must be relative to the project root directory and must already exist.',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
required: ['command'],
|
|
50
|
+
}, false, // output is not markdown
|
|
51
|
+
true);
|
|
52
|
+
this.config = config;
|
|
53
|
+
}
|
|
54
|
+
getDescription(params) {
|
|
55
|
+
let description = `${params.command}`;
|
|
56
|
+
// append optional [in directory]
|
|
57
|
+
// note description is needed even if validation fails due to absolute path
|
|
58
|
+
if (params.directory) {
|
|
59
|
+
description += ` [in ${params.directory}]`;
|
|
60
|
+
}
|
|
61
|
+
// append optional (description), replacing any line breaks with spaces
|
|
62
|
+
if (params.description) {
|
|
63
|
+
description += ` (${params.description.replace(/\n/g, ' ')})`;
|
|
64
|
+
}
|
|
65
|
+
return description;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Extracts the root command from a given shell command string.
|
|
69
|
+
* This is used to identify the base command for permission checks.
|
|
70
|
+
*
|
|
71
|
+
* @param command The shell command string to parse
|
|
72
|
+
* @returns The root command name, or undefined if it cannot be determined
|
|
73
|
+
* @example getCommandRoot("ls -la /tmp") returns "ls"
|
|
74
|
+
* @example getCommandRoot("git status && npm test") returns "git"
|
|
75
|
+
*/
|
|
76
|
+
getCommandRoot(command) {
|
|
77
|
+
return command
|
|
78
|
+
.trim() // remove leading and trailing whitespace
|
|
79
|
+
.replace(/[{}()]/g, '') // remove all grouping operators
|
|
80
|
+
.split(/[\s;&|]+/)[0] // split on any whitespace or separator or chaining operators and take first part
|
|
81
|
+
?.split(/[/\\]/) // split on any path separators (or return undefined if previous line was undefined)
|
|
82
|
+
.pop(); // take last part and return command root (or undefined if previous line was empty)
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Determines whether a given shell command is allowed to execute based on
|
|
86
|
+
* the tool's configuration including allowlists and blocklists.
|
|
87
|
+
*
|
|
88
|
+
* @param command The shell command string to validate
|
|
89
|
+
* @returns An object with 'allowed' boolean and optional 'reason' string if not allowed
|
|
90
|
+
*/
|
|
91
|
+
isCommandAllowed(command) {
|
|
92
|
+
// 0. Disallow command substitution
|
|
93
|
+
if (command.includes('$(')) {
|
|
94
|
+
return {
|
|
95
|
+
allowed: false,
|
|
96
|
+
reason: 'Command substitution using $() is not allowed for security reasons',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
const SHELL_TOOL_NAMES = [ShellTool.name, ShellTool.Name];
|
|
100
|
+
const normalize = (cmd) => cmd.trim().replace(/\s+/g, ' ');
|
|
101
|
+
/**
|
|
102
|
+
* Checks if a command string starts with a given prefix, ensuring it's a
|
|
103
|
+
* whole word match (i.e., followed by a space or it's an exact match).
|
|
104
|
+
* e.g., `isPrefixedBy('npm install', 'npm')` -> true
|
|
105
|
+
* e.g., `isPrefixedBy('npm', 'npm')` -> true
|
|
106
|
+
* e.g., `isPrefixedBy('npminstall', 'npm')` -> false
|
|
107
|
+
*/
|
|
108
|
+
const isPrefixedBy = (cmd, prefix) => {
|
|
109
|
+
if (!cmd.startsWith(prefix)) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
return cmd.length === prefix.length || cmd[prefix.length] === ' ';
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Extracts and normalizes shell commands from a list of tool strings.
|
|
116
|
+
* e.g., 'ShellTool("ls -l")' becomes 'ls -l'
|
|
117
|
+
*/
|
|
118
|
+
const extractCommands = (tools) => tools.flatMap((tool) => {
|
|
119
|
+
for (const toolName of SHELL_TOOL_NAMES) {
|
|
120
|
+
if (tool.startsWith(`${toolName}(`) && tool.endsWith(')')) {
|
|
121
|
+
return [normalize(tool.slice(toolName.length + 1, -1))];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return [];
|
|
125
|
+
});
|
|
126
|
+
const coreTools = this.config.getCoreTools() || [];
|
|
127
|
+
const excludeTools = this.config.getExcludeTools() || [];
|
|
128
|
+
// 1. Check if the shell tool is globally disabled.
|
|
129
|
+
if (SHELL_TOOL_NAMES.some((name) => excludeTools.includes(name))) {
|
|
130
|
+
return {
|
|
131
|
+
allowed: false,
|
|
132
|
+
reason: 'Shell tool is globally disabled in configuration',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
const blockedCommands = new Set(extractCommands(excludeTools));
|
|
136
|
+
const allowedCommands = new Set(extractCommands(coreTools));
|
|
137
|
+
const hasSpecificAllowedCommands = allowedCommands.size > 0;
|
|
138
|
+
const isWildcardAllowed = SHELL_TOOL_NAMES.some((name) => coreTools.includes(name));
|
|
139
|
+
const commandsToValidate = command.split(/&&|\|\||\||;/).map(normalize);
|
|
140
|
+
const blockedCommandsArr = [...blockedCommands];
|
|
141
|
+
for (const cmd of commandsToValidate) {
|
|
142
|
+
// 2. Check if the command is on the blocklist.
|
|
143
|
+
const isBlocked = blockedCommandsArr.some((blocked) => isPrefixedBy(cmd, blocked));
|
|
144
|
+
if (isBlocked) {
|
|
145
|
+
return {
|
|
146
|
+
allowed: false,
|
|
147
|
+
reason: `Command '${cmd}' is blocked by configuration`,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// 3. If in strict allow-list mode, check if the command is permitted.
|
|
151
|
+
const isStrictAllowlist = hasSpecificAllowedCommands && !isWildcardAllowed;
|
|
152
|
+
const allowedCommandsArr = [...allowedCommands];
|
|
153
|
+
if (isStrictAllowlist) {
|
|
154
|
+
const isAllowed = allowedCommandsArr.some((allowed) => isPrefixedBy(cmd, allowed));
|
|
155
|
+
if (!isAllowed) {
|
|
156
|
+
return {
|
|
157
|
+
allowed: false,
|
|
158
|
+
reason: `Command '${cmd}' is not in the allowed commands list`,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
// 4. If all checks pass, the command is allowed.
|
|
164
|
+
return { allowed: true };
|
|
165
|
+
}
|
|
166
|
+
validateToolParams(params) {
|
|
167
|
+
const commandCheck = this.isCommandAllowed(params.command);
|
|
168
|
+
if (!commandCheck.allowed) {
|
|
169
|
+
if (!commandCheck.reason) {
|
|
170
|
+
console.error('Unexpected: isCommandAllowed returned false without a reason');
|
|
171
|
+
return `Command is not allowed: ${params.command}`;
|
|
172
|
+
}
|
|
173
|
+
return commandCheck.reason;
|
|
174
|
+
}
|
|
175
|
+
if (!SchemaValidator.validate(this.parameterSchema, params)) {
|
|
176
|
+
return `Parameters failed schema validation.`;
|
|
177
|
+
}
|
|
178
|
+
if (!params.command.trim()) {
|
|
179
|
+
return 'Command cannot be empty.';
|
|
180
|
+
}
|
|
181
|
+
if (!this.getCommandRoot(params.command)) {
|
|
182
|
+
return 'Could not identify command root to obtain permission from user.';
|
|
183
|
+
}
|
|
184
|
+
if (params.directory) {
|
|
185
|
+
if (path.isAbsolute(params.directory)) {
|
|
186
|
+
return 'Directory cannot be absolute. Must be relative to the project root directory.';
|
|
187
|
+
}
|
|
188
|
+
const directory = path.resolve(this.config.getTargetDir(), params.directory);
|
|
189
|
+
if (!fs.existsSync(directory)) {
|
|
190
|
+
return 'Directory must exist.';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
async shouldConfirmExecute(params, _abortSignal) {
|
|
196
|
+
if (this.validateToolParams(params)) {
|
|
197
|
+
return false; // skip confirmation, execute call will fail immediately
|
|
198
|
+
}
|
|
199
|
+
const rootCommand = this.getCommandRoot(params.command); // must be non-empty string post-validation
|
|
200
|
+
if (this.whitelist.has(rootCommand)) {
|
|
201
|
+
return false; // already approved and whitelisted
|
|
202
|
+
}
|
|
203
|
+
const confirmationDetails = {
|
|
204
|
+
type: 'exec',
|
|
205
|
+
title: 'Confirm Shell Command',
|
|
206
|
+
command: params.command,
|
|
207
|
+
rootCommand,
|
|
208
|
+
onConfirm: async (outcome) => {
|
|
209
|
+
if (outcome === ToolConfirmationOutcome.ProceedAlways) {
|
|
210
|
+
this.whitelist.add(rootCommand);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
return confirmationDetails;
|
|
215
|
+
}
|
|
216
|
+
async execute(params, abortSignal, updateOutput) {
|
|
217
|
+
const validationError = this.validateToolParams(params);
|
|
218
|
+
if (validationError) {
|
|
219
|
+
return {
|
|
220
|
+
llmContent: [
|
|
221
|
+
`Command rejected: ${params.command}`,
|
|
222
|
+
`Reason: ${validationError}`,
|
|
223
|
+
].join('\n'),
|
|
224
|
+
returnDisplay: `Error: ${validationError}`,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
if (abortSignal.aborted) {
|
|
228
|
+
return {
|
|
229
|
+
llmContent: 'Command was cancelled by user before it could start.',
|
|
230
|
+
returnDisplay: 'Command cancelled by user.',
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const isWindows = os.platform() === 'win32';
|
|
234
|
+
const tempFileName = `shell_pgrep_${crypto
|
|
235
|
+
.randomBytes(6)
|
|
236
|
+
.toString('hex')}.tmp`;
|
|
237
|
+
const tempFilePath = path.join(os.tmpdir(), tempFileName);
|
|
238
|
+
// pgrep is not available on Windows, so we can't get background PIDs
|
|
239
|
+
const command = isWindows
|
|
240
|
+
? params.command
|
|
241
|
+
: (() => {
|
|
242
|
+
// wrap command to append subprocess pids (via pgrep) to temporary file
|
|
243
|
+
let command = params.command.trim();
|
|
244
|
+
if (!command.endsWith('&'))
|
|
245
|
+
command += ';';
|
|
246
|
+
return `{ ${command} }; __code=$?; pgrep -g 0 >${tempFilePath} 2>&1; exit $__code;`;
|
|
247
|
+
})();
|
|
248
|
+
// spawn command in specified directory (or project root if not specified)
|
|
249
|
+
const shell = isWindows
|
|
250
|
+
? spawn('cmd.exe', ['/c', command], {
|
|
251
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
252
|
+
// detached: true, // ensure subprocess starts its own process group (esp. in Linux)
|
|
253
|
+
cwd: path.resolve(this.config.getTargetDir(), params.directory || ''),
|
|
254
|
+
})
|
|
255
|
+
: spawn('bash', ['-c', command], {
|
|
256
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
257
|
+
detached: true, // ensure subprocess starts its own process group (esp. in Linux)
|
|
258
|
+
cwd: path.resolve(this.config.getTargetDir(), params.directory || ''),
|
|
259
|
+
});
|
|
260
|
+
let exited = false;
|
|
261
|
+
let stdout = '';
|
|
262
|
+
let output = '';
|
|
263
|
+
let lastUpdateTime = Date.now();
|
|
264
|
+
const appendOutput = (str) => {
|
|
265
|
+
output += str;
|
|
266
|
+
if (updateOutput &&
|
|
267
|
+
Date.now() - lastUpdateTime > OUTPUT_UPDATE_INTERVAL_MS) {
|
|
268
|
+
updateOutput(output);
|
|
269
|
+
lastUpdateTime = Date.now();
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
shell.stdout.on('data', (data) => {
|
|
273
|
+
// continue to consume post-exit for background processes
|
|
274
|
+
// removing listeners can overflow OS buffer and block subprocesses
|
|
275
|
+
// destroying (e.g. shell.stdout.destroy()) can terminate subprocesses via SIGPIPE
|
|
276
|
+
if (!exited) {
|
|
277
|
+
const str = stripAnsi(data.toString());
|
|
278
|
+
stdout += str;
|
|
279
|
+
appendOutput(str);
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
let stderr = '';
|
|
283
|
+
shell.stderr.on('data', (data) => {
|
|
284
|
+
if (!exited) {
|
|
285
|
+
const str = stripAnsi(data.toString());
|
|
286
|
+
stderr += str;
|
|
287
|
+
appendOutput(str);
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
let error = null;
|
|
291
|
+
shell.on('error', (err) => {
|
|
292
|
+
error = err;
|
|
293
|
+
// remove wrapper from user's command in error message
|
|
294
|
+
error.message = error.message.replace(command, params.command);
|
|
295
|
+
});
|
|
296
|
+
let code = null;
|
|
297
|
+
let processSignal = null;
|
|
298
|
+
const exitHandler = (_code, _signal) => {
|
|
299
|
+
exited = true;
|
|
300
|
+
code = _code;
|
|
301
|
+
processSignal = _signal;
|
|
302
|
+
};
|
|
303
|
+
shell.on('exit', exitHandler);
|
|
304
|
+
const abortHandler = async () => {
|
|
305
|
+
if (shell.pid && !exited) {
|
|
306
|
+
if (os.platform() === 'win32') {
|
|
307
|
+
// For Windows, use taskkill to kill the process tree
|
|
308
|
+
spawn('taskkill', ['/pid', shell.pid.toString(), '/f', '/t']);
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
try {
|
|
312
|
+
// attempt to SIGTERM process group (negative PID)
|
|
313
|
+
// fall back to SIGKILL (to group) after 200ms
|
|
314
|
+
process.kill(-shell.pid, 'SIGTERM');
|
|
315
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
316
|
+
if (shell.pid && !exited) {
|
|
317
|
+
process.kill(-shell.pid, 'SIGKILL');
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
catch (_e) {
|
|
321
|
+
// if group kill fails, fall back to killing just the main process
|
|
322
|
+
try {
|
|
323
|
+
if (shell.pid) {
|
|
324
|
+
shell.kill('SIGKILL');
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
catch (_e) {
|
|
328
|
+
console.error(`failed to kill shell process ${shell.pid}: ${_e}`);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
abortSignal.addEventListener('abort', abortHandler);
|
|
335
|
+
// wait for the shell to exit
|
|
336
|
+
try {
|
|
337
|
+
await new Promise((resolve) => shell.on('exit', resolve));
|
|
338
|
+
}
|
|
339
|
+
finally {
|
|
340
|
+
abortSignal.removeEventListener('abort', abortHandler);
|
|
341
|
+
}
|
|
342
|
+
// parse pids (pgrep output) from temporary file and remove it
|
|
343
|
+
const backgroundPIDs = [];
|
|
344
|
+
if (os.platform() !== 'win32') {
|
|
345
|
+
if (fs.existsSync(tempFilePath)) {
|
|
346
|
+
const pgrepLines = fs
|
|
347
|
+
.readFileSync(tempFilePath, 'utf8')
|
|
348
|
+
.split('\n')
|
|
349
|
+
.filter(Boolean);
|
|
350
|
+
for (const line of pgrepLines) {
|
|
351
|
+
if (!/^\d+$/.test(line)) {
|
|
352
|
+
console.error(`pgrep: ${line}`);
|
|
353
|
+
}
|
|
354
|
+
const pid = Number(line);
|
|
355
|
+
// exclude the shell subprocess pid
|
|
356
|
+
if (pid !== shell.pid) {
|
|
357
|
+
backgroundPIDs.push(pid);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
fs.unlinkSync(tempFilePath);
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
if (!abortSignal.aborted) {
|
|
364
|
+
console.error('missing pgrep output');
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
let llmContent = '';
|
|
369
|
+
if (abortSignal.aborted) {
|
|
370
|
+
llmContent = 'Command was cancelled by user before it could complete.';
|
|
371
|
+
if (output.trim()) {
|
|
372
|
+
llmContent += ` Below is the output (on stdout and stderr) before it was cancelled:\n${output}`;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
llmContent += ' There was no output before it was cancelled.';
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
llmContent = [
|
|
380
|
+
`Command: ${params.command}`,
|
|
381
|
+
`Directory: ${params.directory || '(root)'}`,
|
|
382
|
+
`Stdout: ${stdout || '(empty)'}`,
|
|
383
|
+
`Stderr: ${stderr || '(empty)'}`,
|
|
384
|
+
`Error: ${error ?? '(none)'}`,
|
|
385
|
+
`Exit Code: ${code ?? '(none)'}`,
|
|
386
|
+
`Signal: ${processSignal ?? '(none)'}`,
|
|
387
|
+
`Background PIDs: ${backgroundPIDs.length ? backgroundPIDs.join(', ') : '(none)'}`,
|
|
388
|
+
`Process Group PGID: ${shell.pid ?? '(none)'}`,
|
|
389
|
+
].join('\n');
|
|
390
|
+
}
|
|
391
|
+
let returnDisplayMessage = '';
|
|
392
|
+
if (this.config.getDebugMode()) {
|
|
393
|
+
returnDisplayMessage = llmContent;
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
if (output.trim()) {
|
|
397
|
+
returnDisplayMessage = output;
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
// Output is empty, let's provide a reason if the command failed or was cancelled
|
|
401
|
+
if (abortSignal.aborted) {
|
|
402
|
+
returnDisplayMessage = 'Command cancelled by user.';
|
|
403
|
+
}
|
|
404
|
+
else if (processSignal) {
|
|
405
|
+
returnDisplayMessage = `Command terminated by signal: ${processSignal}`;
|
|
406
|
+
}
|
|
407
|
+
else if (error) {
|
|
408
|
+
// If error is not null, it's an Error object (or other truthy value)
|
|
409
|
+
returnDisplayMessage = `Command failed: ${getErrorMessage(error)}`;
|
|
410
|
+
}
|
|
411
|
+
else if (code !== null && code !== 0) {
|
|
412
|
+
returnDisplayMessage = `Command exited with code: ${code}`;
|
|
413
|
+
}
|
|
414
|
+
// If output is empty and command succeeded (code 0, no error/signal/abort),
|
|
415
|
+
// returnDisplayMessage will remain empty, which is fine.
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
return { llmContent, returnDisplay: returnDisplayMessage };
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.js","sourceRoot":"","sources":["../../../src/tools/shell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,QAAQ,EAIR,uBAAuB,GACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAEvC,MAAM,OAAO,SAAU,SAAQ,QAAqC;IAIrC;IAH7B,MAAM,CAAC,IAAI,GAAW,mBAAmB,CAAC;IAClC,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IAE3C,YAA6B,MAAc;QACzC,KAAK,CACH,SAAS,CAAC,IAAI,EACd,OAAO,EACP;;;;;;;;;;;;wDAYkD,EAClD;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sDAAsD;iBACpE;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,0JAA0J;iBAC7J;gBACD,SAAS,EAAE;oBACT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