@office-ai/aioncli-core 0.1.18-beta.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/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 +9 -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 +70 -0
- package/dist/src/code_assist/converter.js +126 -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 +279 -0
- package/dist/src/code_assist/converter.test.js.map +1 -0
- package/dist/src/code_assist/oauth2.d.ts +20 -0
- package/dist/src/code_assist/oauth2.js +337 -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 +334 -0
- package/dist/src/code_assist/oauth2.test.js.map +1 -0
- package/dist/src/code_assist/server.d.ts +37 -0
- package/dist/src/code_assist/server.js +125 -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 +134 -0
- package/dist/src/code_assist/server.test.js.map +1 -0
- package/dist/src/code_assist/setup.d.ts +20 -0
- package/dist/src/code_assist/setup.js +70 -0
- package/dist/src/code_assist/setup.js.map +1 -0
- package/dist/src/code_assist/setup.test.d.ts +6 -0
- package/dist/src/code_assist/setup.test.js +65 -0
- package/dist/src/code_assist/setup.test.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 +272 -0
- package/dist/src/config/config.js +554 -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 +365 -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 +87 -0
- package/dist/src/config/flashFallback.test.js.map +1 -0
- package/dist/src/config/models.d.ts +9 -0
- package/dist/src/config/models.js +10 -0
- package/dist/src/config/models.js.map +1 -0
- package/dist/src/core/client.d.ts +61 -0
- package/dist/src/core/client.js +485 -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 +1008 -0
- package/dist/src/core/client.test.js.map +1 -0
- package/dist/src/core/contentGenerator.d.ts +45 -0
- package/dist/src/core/contentGenerator.js +81 -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 +100 -0
- package/dist/src/core/contentGenerator.test.js.map +1 -0
- package/dist/src/core/coreToolScheduler.d.ts +117 -0
- package/dist/src/core/coreToolScheduler.js +530 -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 +625 -0
- package/dist/src/core/coreToolScheduler.test.js.map +1 -0
- package/dist/src/core/geminiChat.d.ts +118 -0
- package/dist/src/core/geminiChat.js +509 -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 +424 -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 +10 -0
- package/dist/src/core/geminiRequest.js.map +1 -0
- package/dist/src/core/logger.d.ts +37 -0
- package/dist/src/core/logger.js +273 -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 +467 -0
- package/dist/src/core/logger.test.js.map +1 -0
- package/dist/src/core/loggingContentGenerator.d.ts +24 -0
- package/dist/src/core/loggingContentGenerator.js +89 -0
- package/dist/src/core/loggingContentGenerator.js.map +1 -0
- package/dist/src/core/modelCheck.d.ts +14 -0
- package/dist/src/core/modelCheck.js +62 -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 +124 -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 +165 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
- package/dist/src/core/openaiContentGenerator.d.ts +77 -0
- package/dist/src/core/openaiContentGenerator.js +1395 -0
- package/dist/src/core/openaiContentGenerator.js.map +1 -0
- package/dist/src/core/openaiContentGenerator.test.d.ts +6 -0
- package/dist/src/core/openaiContentGenerator.test.js +1904 -0
- package/dist/src/core/openaiContentGenerator.test.js.map +1 -0
- package/dist/src/core/prompts.d.ts +12 -0
- package/dist/src/core/prompts.js +359 -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 +214 -0
- package/dist/src/core/prompts.test.js.map +1 -0
- package/dist/src/core/subagent.d.ts +230 -0
- package/dist/src/core/subagent.js +447 -0
- package/dist/src/core/subagent.js.map +1 -0
- package/dist/src/core/subagent.test.d.ts +6 -0
- package/dist/src/core/subagent.test.js +515 -0
- package/dist/src/core/subagent.test.js.map +1 -0
- package/dist/src/core/tokenLimits.d.ts +10 -0
- package/dist/src/core/tokenLimits.js +28 -0
- package/dist/src/core/tokenLimits.js.map +1 -0
- package/dist/src/core/turn.d.ts +114 -0
- package/dist/src/core/turn.js +143 -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 +369 -0
- package/dist/src/core/turn.test.js.map +1 -0
- package/dist/src/ide/detect-ide.d.ts +10 -0
- package/dist/src/ide/detect-ide.js +27 -0
- package/dist/src/ide/detect-ide.js.map +1 -0
- package/dist/src/ide/ide-client.d.ts +56 -0
- package/dist/src/ide/ide-client.js +268 -0
- package/dist/src/ide/ide-client.js.map +1 -0
- package/dist/src/ide/ide-installer.d.ts +14 -0
- package/dist/src/ide/ide-installer.js +109 -0
- package/dist/src/ide/ide-installer.js.map +1 -0
- package/dist/src/ide/ide-installer.test.d.ts +6 -0
- package/dist/src/ide/ide-installer.test.js +55 -0
- package/dist/src/ide/ide-installer.test.js.map +1 -0
- package/dist/src/ide/ideContext.d.ts +374 -0
- package/dist/src/ide/ideContext.js +147 -0
- package/dist/src/ide/ideContext.js.map +1 -0
- package/dist/src/ide/ideContext.test.d.ts +6 -0
- package/dist/src/ide/ideContext.test.js +265 -0
- package/dist/src/ide/ideContext.test.js.map +1 -0
- package/dist/src/index.d.ts +68 -0
- package/dist/src/index.js +78 -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/mcp/google-auth-provider.d.ts +23 -0
- package/dist/src/mcp/google-auth-provider.js +63 -0
- package/dist/src/mcp/google-auth-provider.js.map +1 -0
- package/dist/src/mcp/google-auth-provider.test.d.ts +6 -0
- package/dist/src/mcp/google-auth-provider.test.js +54 -0
- package/dist/src/mcp/google-auth-provider.test.js.map +1 -0
- package/dist/src/mcp/oauth-provider.d.ts +147 -0
- package/dist/src/mcp/oauth-provider.js +484 -0
- package/dist/src/mcp/oauth-provider.js.map +1 -0
- package/dist/src/mcp/oauth-provider.test.d.ts +6 -0
- package/dist/src/mcp/oauth-provider.test.js +602 -0
- package/dist/src/mcp/oauth-provider.test.js.map +1 -0
- package/dist/src/mcp/oauth-token-storage.d.ts +83 -0
- package/dist/src/mcp/oauth-token-storage.js +151 -0
- package/dist/src/mcp/oauth-token-storage.js.map +1 -0
- package/dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/oauth-token-storage.test.js +205 -0
- package/dist/src/mcp/oauth-token-storage.test.js.map +1 -0
- package/dist/src/mcp/oauth-utils.d.ts +109 -0
- package/dist/src/mcp/oauth-utils.js +183 -0
- package/dist/src/mcp/oauth-utils.js.map +1 -0
- package/dist/src/mcp/oauth-utils.test.d.ts +6 -0
- package/dist/src/mcp/oauth-utils.test.js +144 -0
- package/dist/src/mcp/oauth-utils.test.js.map +1 -0
- package/dist/src/prompts/mcp-prompts.d.ts +8 -0
- package/dist/src/prompts/mcp-prompts.js +13 -0
- package/dist/src/prompts/mcp-prompts.js.map +1 -0
- package/dist/src/prompts/prompt-registry.d.ts +34 -0
- package/dist/src/prompts/prompt-registry.js +63 -0
- package/dist/src/prompts/prompt-registry.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 +143 -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 +101 -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 +209 -0
- package/dist/src/services/gitService.test.js.map +1 -0
- package/dist/src/services/loopDetectionService.d.ts +97 -0
- package/dist/src/services/loopDetectionService.js +340 -0
- package/dist/src/services/loopDetectionService.js.map +1 -0
- package/dist/src/services/loopDetectionService.test.d.ts +6 -0
- package/dist/src/services/loopDetectionService.test.js +484 -0
- package/dist/src/services/loopDetectionService.test.js.map +1 -0
- package/dist/src/services/shellExecutionService.d.ts +70 -0
- package/dist/src/services/shellExecutionService.js +175 -0
- package/dist/src/services/shellExecutionService.js.map +1 -0
- package/dist/src/services/shellExecutionService.test.d.ts +6 -0
- package/dist/src/services/shellExecutionService.test.js +272 -0
- package/dist/src/services/shellExecutionService.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +65 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +652 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +6 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +186 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +59 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +159 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
- package/dist/src/telemetry/constants.d.ts +23 -0
- package/dist/src/telemetry/constants.js +24 -0
- package/dist/src/telemetry/constants.js.map +1 -0
- package/dist/src/telemetry/file-exporters.d.ts +28 -0
- package/dist/src/telemetry/file-exporters.js +62 -0
- package/dist/src/telemetry/file-exporters.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/integration.test.circular.d.ts +6 -0
- package/dist/src/telemetry/integration.test.circular.js +53 -0
- package/dist/src/telemetry/integration.test.circular.js.map +1 -0
- package/dist/src/telemetry/loggers.d.ts +18 -0
- package/dist/src/telemetry/loggers.js +268 -0
- package/dist/src/telemetry/loggers.js.map +1 -0
- package/dist/src/telemetry/loggers.test.circular.d.ts +6 -0
- package/dist/src/telemetry/loggers.test.circular.js +107 -0
- package/dist/src/telemetry/loggers.test.circular.js.map +1 -0
- package/dist/src/telemetry/loggers.test.d.ts +6 -0
- package/dist/src/telemetry/loggers.test.js +568 -0
- package/dist/src/telemetry/loggers.test.js.map +1 -0
- package/dist/src/telemetry/metrics.d.ts +20 -0
- package/dist/src/telemetry/metrics.js +150 -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 +212 -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 +127 -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/tool-call-decision.d.ts +13 -0
- package/dist/src/telemetry/tool-call-decision.js +29 -0
- package/dist/src/telemetry/tool-call-decision.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +145 -0
- package/dist/src/telemetry/types.js +267 -0
- package/dist/src/telemetry/types.js.map +1 -0
- package/dist/src/telemetry/uiTelemetry.d.ts +71 -0
- package/dist/src/telemetry/uiTelemetry.js +140 -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 +518 -0
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
- package/dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
- package/dist/src/test-utils/mockWorkspaceContext.js +24 -0
- package/dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
- package/dist/src/test-utils/tools.d.ts +23 -0
- package/dist/src/test-utils/tools.js +41 -0
- package/dist/src/test-utils/tools.js.map +1 -0
- package/dist/src/tools/diffOptions.d.ts +9 -0
- package/dist/src/tools/diffOptions.js +38 -0
- package/dist/src/tools/diffOptions.js.map +1 -0
- package/dist/src/tools/diffOptions.test.d.ts +6 -0
- package/dist/src/tools/diffOptions.test.js +119 -0
- package/dist/src/tools/diffOptions.test.js.map +1 -0
- package/dist/src/tools/edit.d.ts +55 -0
- package/dist/src/tools/edit.js +398 -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 +681 -0
- package/dist/src/tools/edit.test.js.map +1 -0
- package/dist/src/tools/glob.d.ts +51 -0
- package/dist/src/tools/glob.js +226 -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 +330 -0
- package/dist/src/tools/glob.test.js.map +1 -0
- package/dist/src/tools/grep.d.ts +46 -0
- package/dist/src/tools/grep.js +503 -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 +272 -0
- package/dist/src/tools/grep.test.js.map +1 -0
- package/dist/src/tools/ls.d.ts +86 -0
- package/dist/src/tools/ls.js +224 -0
- package/dist/src/tools/ls.js.map +1 -0
- package/dist/src/tools/ls.test.d.ts +6 -0
- package/dist/src/tools/ls.test.js +356 -0
- package/dist/src/tools/ls.test.js.map +1 -0
- package/dist/src/tools/mcp-client.d.ts +149 -0
- package/dist/src/tools/mcp-client.js +844 -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 +643 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -0
- package/dist/src/tools/mcp-tool.d.ts +29 -0
- package/dist/src/tools/mcp-tool.js +202 -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 +501 -0
- package/dist/src/tools/mcp-tool.test.js.map +1 -0
- package/dist/src/tools/memoryTool.d.ts +43 -0
- package/dist/src/tools/memoryTool.js +290 -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 +266 -0
- package/dist/src/tools/memoryTool.test.js.map +1 -0
- package/dist/src/tools/modifiable-tool.d.ts +32 -0
- package/dist/src/tools/modifiable-tool.js +88 -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 +193 -0
- package/dist/src/tools/modifiable-tool.test.js.map +1 -0
- package/dist/src/tools/read-file.d.ts +34 -0
- package/dist/src/tools/read-file.js +152 -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 +300 -0
- package/dist/src/tools/read-file.test.js.map +1 -0
- package/dist/src/tools/read-many-files.d.ts +61 -0
- package/dist/src/tools/read-many-files.js +421 -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 +455 -0
- package/dist/src/tools/read-many-files.test.js.map +1 -0
- package/dist/src/tools/shell.d.ts +23 -0
- package/dist/src/tools/shell.js +313 -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-error.d.ts +26 -0
- package/dist/src/tools/tool-error.js +31 -0
- package/dist/src/tools/tool-error.js.map +1 -0
- package/dist/src/tools/tool-registry.d.ts +85 -0
- package/dist/src/tools/tool-registry.js +390 -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 +417 -0
- package/dist/src/tools/tool-registry.test.js.map +1 -0
- package/dist/src/tools/tools.d.ts +328 -0
- package/dist/src/tools/tools.js +281 -0
- package/dist/src/tools/tools.js.map +1 -0
- package/dist/src/tools/tools.test.d.ts +6 -0
- package/dist/src/tools/tools.test.js +117 -0
- package/dist/src/tools/tools.test.js.map +1 -0
- package/dist/src/tools/web-fetch.d.ts +29 -0
- package/dist/src/tools/web-fetch.js +246 -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 +71 -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 +120 -0
- package/dist/src/tools/web-search.js.map +1 -0
- package/dist/src/tools/write-file.d.ts +46 -0
- package/dist/src/tools/write-file.js +321 -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 +572 -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 +24 -0
- package/dist/src/utils/bfsFileSearch.js +89 -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 +163 -0
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
- package/dist/src/utils/browser.d.ts +13 -0
- package/dist/src/utils/browser.js +49 -0
- package/dist/src/utils/browser.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 +564 -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 +186 -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 +445 -0
- package/dist/src/utils/editor.test.js.map +1 -0
- package/dist/src/utils/environmentContext.d.ts +21 -0
- package/dist/src/utils/environmentContext.js +90 -0
- package/dist/src/utils/environmentContext.js.map +1 -0
- package/dist/src/utils/environmentContext.test.d.ts +6 -0
- package/dist/src/utils/environmentContext.test.js +139 -0
- package/dist/src/utils/environmentContext.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 +130 -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 +56 -0
- package/dist/src/utils/fileUtils.js +314 -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 +363 -0
- package/dist/src/utils/fileUtils.test.js.map +1 -0
- package/dist/src/utils/filesearch/crawlCache.d.ts +25 -0
- package/dist/src/utils/filesearch/crawlCache.js +57 -0
- package/dist/src/utils/filesearch/crawlCache.js.map +1 -0
- package/dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
- package/dist/src/utils/filesearch/crawlCache.test.js +103 -0
- package/dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
- package/dist/src/utils/filesearch/fileSearch.d.ts +81 -0
- package/dist/src/utils/filesearch/fileSearch.js +241 -0
- package/dist/src/utils/filesearch/fileSearch.js.map +1 -0
- package/dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
- package/dist/src/utils/filesearch/fileSearch.test.js +654 -0
- package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
- package/dist/src/utils/filesearch/ignore.d.ts +35 -0
- package/dist/src/utils/filesearch/ignore.js +81 -0
- package/dist/src/utils/filesearch/ignore.js.map +1 -0
- package/dist/src/utils/filesearch/ignore.test.d.ts +6 -0
- package/dist/src/utils/filesearch/ignore.test.js +57 -0
- package/dist/src/utils/filesearch/ignore.test.js.map +1 -0
- package/dist/src/utils/filesearch/result-cache.d.ts +34 -0
- package/dist/src/utils/filesearch/result-cache.js +61 -0
- package/dist/src/utils/filesearch/result-cache.js.map +1 -0
- package/dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
- package/dist/src/utils/filesearch/result-cache.test.js +47 -0
- package/dist/src/utils/filesearch/result-cache.test.js.map +1 -0
- package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
- package/dist/src/utils/flashFallback.integration.test.js +118 -0
- package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
- package/dist/src/utils/formatters.d.ts +6 -0
- package/dist/src/utils/formatters.js +16 -0
- package/dist/src/utils/formatters.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 +31 -0
- package/dist/src/utils/getFolderStructure.js +246 -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 +282 -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 +61 -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 +154 -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 +15 -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 +181 -0
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
- package/dist/src/utils/memoryImportProcessor.d.ts +42 -0
- package/dist/src/utils/memoryImportProcessor.js +300 -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 +715 -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 +92 -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 +168 -0
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
- package/dist/src/utils/openaiLogger.d.ts +42 -0
- package/dist/src/utils/openaiLogger.js +123 -0
- package/dist/src/utils/openaiLogger.js.map +1 -0
- package/dist/src/utils/partUtils.d.ts +14 -0
- package/dist/src/utils/partUtils.js +65 -0
- package/dist/src/utils/partUtils.js.map +1 -0
- package/dist/src/utils/partUtils.test.d.ts +6 -0
- package/dist/src/utils/partUtils.test.js +130 -0
- package/dist/src/utils/partUtils.test.js.map +1 -0
- package/dist/src/utils/paths.d.ts +68 -0
- package/dist/src/utils/paths.js +170 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/paths.test.d.ts +6 -0
- package/dist/src/utils/paths.test.js +153 -0
- package/dist/src/utils/paths.test.js.map +1 -0
- package/dist/src/utils/quotaErrorDetection.d.ts +22 -0
- package/dist/src/utils/quotaErrorDetection.js +65 -0
- package/dist/src/utils/quotaErrorDetection.js.map +1 -0
- package/dist/src/utils/retry.d.ts +30 -0
- package/dist/src/utils/retry.js +276 -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/safeJsonStringify.d.ts +13 -0
- package/dist/src/utils/safeJsonStringify.js +25 -0
- package/dist/src/utils/safeJsonStringify.js.map +1 -0
- package/dist/src/utils/safeJsonStringify.test.d.ts +6 -0
- package/dist/src/utils/safeJsonStringify.test.js +61 -0
- package/dist/src/utils/safeJsonStringify.test.js.map +1 -0
- package/dist/src/utils/schemaValidator.d.ts +22 -0
- package/dist/src/utils/schemaValidator.js +65 -0
- package/dist/src/utils/schemaValidator.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.d.ts +23 -0
- package/dist/src/utils/secure-browser-launcher.js +164 -0
- package/dist/src/utils/secure-browser-launcher.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
- package/dist/src/utils/secure-browser-launcher.test.js +149 -0
- package/dist/src/utils/secure-browser-launcher.test.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/shell-utils.d.ts +78 -0
- package/dist/src/utils/shell-utils.js +306 -0
- package/dist/src/utils/shell-utils.js.map +1 -0
- package/dist/src/utils/shell-utils.test.d.ts +6 -0
- package/dist/src/utils/shell-utils.test.js +200 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -0
- package/dist/src/utils/summarizer.d.ts +25 -0
- package/dist/src/utils/summarizer.js +51 -0
- package/dist/src/utils/summarizer.js.map +1 -0
- package/dist/src/utils/summarizer.test.d.ts +6 -0
- package/dist/src/utils/summarizer.test.js +131 -0
- package/dist/src/utils/summarizer.test.js.map +1 -0
- package/dist/src/utils/systemEncoding.d.ts +40 -0
- package/dist/src/utils/systemEncoding.js +149 -0
- package/dist/src/utils/systemEncoding.js.map +1 -0
- package/dist/src/utils/systemEncoding.test.d.ts +6 -0
- package/dist/src/utils/systemEncoding.test.js +368 -0
- package/dist/src/utils/systemEncoding.test.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/textUtils.d.ts +13 -0
- package/dist/src/utils/textUtils.js +28 -0
- package/dist/src/utils/textUtils.js.map +1 -0
- package/dist/src/utils/user_account.d.ts +9 -0
- package/dist/src/utils/user_account.js +99 -0
- package/dist/src/utils/user_account.js.map +1 -0
- package/dist/src/utils/user_account.test.d.ts +6 -0
- package/dist/src/utils/user_account.test.js +153 -0
- package/dist/src/utils/user_account.test.js.map +1 -0
- package/dist/src/utils/user_id.d.ts +11 -0
- package/dist/src/utils/user_id.js +49 -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 +21 -0
- package/dist/src/utils/user_id.test.js.map +1 -0
- package/dist/src/utils/workspaceContext.d.ts +51 -0
- package/dist/src/utils/workspaceContext.js +139 -0
- package/dist/src/utils/workspaceContext.js.map +1 -0
- package/dist/src/utils/workspaceContext.test.d.ts +6 -0
- package/dist/src/utils/workspaceContext.test.js +209 -0
- package/dist/src/utils/workspaceContext.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionDeclaration, PartListUnion, Schema } from '@google/genai';
|
|
7
|
+
import { ToolErrorType } from './tool-error.js';
|
|
8
|
+
import { DiffUpdateResult } from '../ide/ideContext.js';
|
|
9
|
+
/**
|
|
10
|
+
* Represents a validated and ready-to-execute tool call.
|
|
11
|
+
* An instance of this is created by a `ToolBuilder`.
|
|
12
|
+
*/
|
|
13
|
+
export interface ToolInvocation<TParams extends object, TResult extends ToolResult> {
|
|
14
|
+
/**
|
|
15
|
+
* The validated parameters for this specific invocation.
|
|
16
|
+
*/
|
|
17
|
+
params: TParams;
|
|
18
|
+
/**
|
|
19
|
+
* Gets a pre-execution description of the tool operation.
|
|
20
|
+
* @returns A markdown string describing what the tool will do.
|
|
21
|
+
*/
|
|
22
|
+
getDescription(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Determines what file system paths the tool will affect.
|
|
25
|
+
* @returns A list of such paths.
|
|
26
|
+
*/
|
|
27
|
+
toolLocations(): ToolLocation[];
|
|
28
|
+
/**
|
|
29
|
+
* Determines if the tool should prompt for confirmation before execution.
|
|
30
|
+
* @returns Confirmation details or false if no confirmation is needed.
|
|
31
|
+
*/
|
|
32
|
+
shouldConfirmExecute(abortSignal: AbortSignal): Promise<ToolCallConfirmationDetails | false>;
|
|
33
|
+
/**
|
|
34
|
+
* Executes the tool with the validated parameters.
|
|
35
|
+
* @param signal AbortSignal for tool cancellation.
|
|
36
|
+
* @param updateOutput Optional callback to stream output.
|
|
37
|
+
* @returns Result of the tool execution.
|
|
38
|
+
*/
|
|
39
|
+
execute(signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A convenience base class for ToolInvocation.
|
|
43
|
+
*/
|
|
44
|
+
export declare abstract class BaseToolInvocation<TParams extends object, TResult extends ToolResult> implements ToolInvocation<TParams, TResult> {
|
|
45
|
+
readonly params: TParams;
|
|
46
|
+
constructor(params: TParams);
|
|
47
|
+
abstract getDescription(): string;
|
|
48
|
+
toolLocations(): ToolLocation[];
|
|
49
|
+
shouldConfirmExecute(_abortSignal: AbortSignal): Promise<ToolCallConfirmationDetails | false>;
|
|
50
|
+
abstract execute(signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A type alias for a tool invocation where the specific parameter and result types are not known.
|
|
54
|
+
*/
|
|
55
|
+
export type AnyToolInvocation = ToolInvocation<object, ToolResult>;
|
|
56
|
+
/**
|
|
57
|
+
* An adapter that wraps the legacy `Tool` interface to make it compatible
|
|
58
|
+
* with the new `ToolInvocation` pattern.
|
|
59
|
+
*/
|
|
60
|
+
export declare class LegacyToolInvocation<TParams extends object, TResult extends ToolResult> implements ToolInvocation<TParams, TResult> {
|
|
61
|
+
private readonly legacyTool;
|
|
62
|
+
readonly params: TParams;
|
|
63
|
+
constructor(legacyTool: BaseTool<TParams, TResult>, params: TParams);
|
|
64
|
+
getDescription(): string;
|
|
65
|
+
toolLocations(): ToolLocation[];
|
|
66
|
+
shouldConfirmExecute(abortSignal: AbortSignal): Promise<ToolCallConfirmationDetails | false>;
|
|
67
|
+
execute(signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Interface for a tool builder that validates parameters and creates invocations.
|
|
71
|
+
*/
|
|
72
|
+
export interface ToolBuilder<TParams extends object, TResult extends ToolResult> {
|
|
73
|
+
/**
|
|
74
|
+
* The internal name of the tool (used for API calls).
|
|
75
|
+
*/
|
|
76
|
+
name: string;
|
|
77
|
+
/**
|
|
78
|
+
* The user-friendly display name of the tool.
|
|
79
|
+
*/
|
|
80
|
+
displayName: string;
|
|
81
|
+
/**
|
|
82
|
+
* Description of what the tool does.
|
|
83
|
+
*/
|
|
84
|
+
description: string;
|
|
85
|
+
/**
|
|
86
|
+
* The icon to display when interacting via ACP.
|
|
87
|
+
*/
|
|
88
|
+
icon: Icon;
|
|
89
|
+
/**
|
|
90
|
+
* Function declaration schema from @google/genai.
|
|
91
|
+
*/
|
|
92
|
+
schema: FunctionDeclaration;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the tool's output should be rendered as markdown.
|
|
95
|
+
*/
|
|
96
|
+
isOutputMarkdown: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether the tool supports live (streaming) output.
|
|
99
|
+
*/
|
|
100
|
+
canUpdateOutput: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Validates raw parameters and builds a ready-to-execute invocation.
|
|
103
|
+
* @param params The raw, untrusted parameters from the model.
|
|
104
|
+
* @returns A valid `ToolInvocation` if successful. Throws an error if validation fails.
|
|
105
|
+
*/
|
|
106
|
+
build(params: TParams): ToolInvocation<TParams, TResult>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* New base class for tools that separates validation from execution.
|
|
110
|
+
* New tools should extend this class.
|
|
111
|
+
*/
|
|
112
|
+
export declare abstract class DeclarativeTool<TParams extends object, TResult extends ToolResult> implements ToolBuilder<TParams, TResult> {
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly displayName: string;
|
|
115
|
+
readonly description: string;
|
|
116
|
+
readonly icon: Icon;
|
|
117
|
+
readonly parameterSchema: Schema;
|
|
118
|
+
readonly isOutputMarkdown: boolean;
|
|
119
|
+
readonly canUpdateOutput: boolean;
|
|
120
|
+
constructor(name: string, displayName: string, description: string, icon: Icon, parameterSchema: Schema, isOutputMarkdown?: boolean, canUpdateOutput?: boolean);
|
|
121
|
+
get schema(): FunctionDeclaration;
|
|
122
|
+
/**
|
|
123
|
+
* Validates the raw tool parameters.
|
|
124
|
+
* Subclasses should override this to add custom validation logic
|
|
125
|
+
* beyond the JSON schema check.
|
|
126
|
+
* @param params The raw parameters from the model.
|
|
127
|
+
* @returns An error message string if invalid, null otherwise.
|
|
128
|
+
*/
|
|
129
|
+
protected validateToolParams(_params: TParams): string | null;
|
|
130
|
+
/**
|
|
131
|
+
* The core of the new pattern. It validates parameters and, if successful,
|
|
132
|
+
* returns a `ToolInvocation` object that encapsulates the logic for the
|
|
133
|
+
* specific, validated call.
|
|
134
|
+
* @param params The raw, untrusted parameters from the model.
|
|
135
|
+
* @returns A `ToolInvocation` instance.
|
|
136
|
+
*/
|
|
137
|
+
abstract build(params: TParams): ToolInvocation<TParams, TResult>;
|
|
138
|
+
/**
|
|
139
|
+
* A convenience method that builds and executes the tool in one step.
|
|
140
|
+
* Throws an error if validation fails.
|
|
141
|
+
* @param params The raw, untrusted parameters from the model.
|
|
142
|
+
* @param signal AbortSignal for tool cancellation.
|
|
143
|
+
* @param updateOutput Optional callback to stream output.
|
|
144
|
+
* @returns The result of the tool execution.
|
|
145
|
+
*/
|
|
146
|
+
buildAndExecute(params: TParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* New base class for declarative tools that separates validation from execution.
|
|
150
|
+
* New tools should extend this class, which provides a `build` method that
|
|
151
|
+
* validates parameters before deferring to a `createInvocation` method for
|
|
152
|
+
* the final `ToolInvocation` object instantiation.
|
|
153
|
+
*/
|
|
154
|
+
export declare abstract class BaseDeclarativeTool<TParams extends object, TResult extends ToolResult> extends DeclarativeTool<TParams, TResult> {
|
|
155
|
+
build(params: TParams): ToolInvocation<TParams, TResult>;
|
|
156
|
+
protected abstract createInvocation(params: TParams): ToolInvocation<TParams, TResult>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* A type alias for a declarative tool where the specific parameter and result types are not known.
|
|
160
|
+
*/
|
|
161
|
+
export type AnyDeclarativeTool = DeclarativeTool<object, ToolResult>;
|
|
162
|
+
/**
|
|
163
|
+
* Base implementation for tools with common functionality
|
|
164
|
+
* @deprecated Use `DeclarativeTool` for new tools.
|
|
165
|
+
*/
|
|
166
|
+
export declare abstract class BaseTool<TParams extends object, TResult extends ToolResult = ToolResult> extends DeclarativeTool<TParams, TResult> {
|
|
167
|
+
readonly name: string;
|
|
168
|
+
readonly displayName: string;
|
|
169
|
+
readonly description: string;
|
|
170
|
+
readonly icon: Icon;
|
|
171
|
+
readonly parameterSchema: Schema;
|
|
172
|
+
readonly isOutputMarkdown: boolean;
|
|
173
|
+
readonly canUpdateOutput: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Creates a new instance of BaseTool
|
|
176
|
+
* @param name Internal name of the tool (used for API calls)
|
|
177
|
+
* @param displayName User-friendly display name of the tool
|
|
178
|
+
* @param description Description of what the tool does
|
|
179
|
+
* @param isOutputMarkdown Whether the tool's output should be rendered as markdown
|
|
180
|
+
* @param canUpdateOutput Whether the tool supports live (streaming) output
|
|
181
|
+
* @param parameterSchema Open API 3.0 Schema defining the parameters
|
|
182
|
+
*/
|
|
183
|
+
constructor(name: string, displayName: string, description: string, icon: Icon, parameterSchema: Schema, isOutputMarkdown?: boolean, canUpdateOutput?: boolean);
|
|
184
|
+
build(params: TParams): ToolInvocation<TParams, TResult>;
|
|
185
|
+
/**
|
|
186
|
+
* Validates the parameters for the tool
|
|
187
|
+
* This is a placeholder implementation and should be overridden
|
|
188
|
+
* Should be called from both `shouldConfirmExecute` and `execute`
|
|
189
|
+
* `shouldConfirmExecute` should return false immediately if invalid
|
|
190
|
+
* @param params Parameters to validate
|
|
191
|
+
* @returns An error message string if invalid, null otherwise
|
|
192
|
+
*/
|
|
193
|
+
validateToolParams(params: TParams): string | null;
|
|
194
|
+
/**
|
|
195
|
+
* Gets a pre-execution description of the tool operation
|
|
196
|
+
* Default implementation that should be overridden by derived classes
|
|
197
|
+
* @param params Parameters for the tool execution
|
|
198
|
+
* @returns A markdown string describing what the tool will do
|
|
199
|
+
*/
|
|
200
|
+
getDescription(params: TParams): string;
|
|
201
|
+
/**
|
|
202
|
+
* Determines if the tool should prompt for confirmation before execution
|
|
203
|
+
* @param params Parameters for the tool execution
|
|
204
|
+
* @returns Whether or not execute should be confirmed by the user.
|
|
205
|
+
*/
|
|
206
|
+
shouldConfirmExecute(params: TParams, abortSignal: AbortSignal): Promise<ToolCallConfirmationDetails | false>;
|
|
207
|
+
/**
|
|
208
|
+
* Determines what file system paths the tool will affect
|
|
209
|
+
* @param params Parameters for the tool execution
|
|
210
|
+
* @returns A list of such paths
|
|
211
|
+
*/
|
|
212
|
+
toolLocations(params: TParams): ToolLocation[];
|
|
213
|
+
/**
|
|
214
|
+
* Abstract method to execute the tool with the given parameters
|
|
215
|
+
* Must be implemented by derived classes
|
|
216
|
+
* @param params Parameters for the tool execution
|
|
217
|
+
* @param signal AbortSignal for tool cancellation
|
|
218
|
+
* @returns Result of the tool execution
|
|
219
|
+
*/
|
|
220
|
+
abstract execute(params: TParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<TResult>;
|
|
221
|
+
}
|
|
222
|
+
export interface ToolResult {
|
|
223
|
+
/**
|
|
224
|
+
* A short, one-line summary of the tool's action and result.
|
|
225
|
+
* e.g., "Read 5 files", "Wrote 256 bytes to foo.txt"
|
|
226
|
+
*/
|
|
227
|
+
summary?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Content meant to be included in LLM history.
|
|
230
|
+
* This should represent the factual outcome of the tool execution.
|
|
231
|
+
*/
|
|
232
|
+
llmContent: PartListUnion;
|
|
233
|
+
/**
|
|
234
|
+
* Markdown string for user display.
|
|
235
|
+
* This provides a user-friendly summary or visualization of the result.
|
|
236
|
+
* NOTE: This might also be considered UI-specific and could potentially be
|
|
237
|
+
* removed or modified in a further refactor if the server becomes purely API-driven.
|
|
238
|
+
* For now, we keep it as the core logic in ReadFileTool currently produces it.
|
|
239
|
+
*/
|
|
240
|
+
returnDisplay: ToolResultDisplay;
|
|
241
|
+
/**
|
|
242
|
+
* If this property is present, the tool call is considered a failure.
|
|
243
|
+
*/
|
|
244
|
+
error?: {
|
|
245
|
+
message: string;
|
|
246
|
+
type?: ToolErrorType;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Detects cycles in a JSON schemas due to `$ref`s.
|
|
251
|
+
* @param schema The root of the JSON schema.
|
|
252
|
+
* @returns `true` if a cycle is detected, `false` otherwise.
|
|
253
|
+
*/
|
|
254
|
+
export declare function hasCycleInSchema(schema: object): boolean;
|
|
255
|
+
export type ToolResultDisplay = string | FileDiff;
|
|
256
|
+
export interface FileDiff {
|
|
257
|
+
fileDiff: string;
|
|
258
|
+
fileName: string;
|
|
259
|
+
originalContent: string | null;
|
|
260
|
+
newContent: string;
|
|
261
|
+
diffStat?: DiffStat;
|
|
262
|
+
}
|
|
263
|
+
export interface DiffStat {
|
|
264
|
+
ai_removed_lines: number;
|
|
265
|
+
ai_added_lines: number;
|
|
266
|
+
user_added_lines: number;
|
|
267
|
+
user_removed_lines: number;
|
|
268
|
+
}
|
|
269
|
+
export interface ToolEditConfirmationDetails {
|
|
270
|
+
type: 'edit';
|
|
271
|
+
title: string;
|
|
272
|
+
onConfirm: (outcome: ToolConfirmationOutcome, payload?: ToolConfirmationPayload) => Promise<void>;
|
|
273
|
+
fileName: string;
|
|
274
|
+
filePath: string;
|
|
275
|
+
fileDiff: string;
|
|
276
|
+
originalContent: string | null;
|
|
277
|
+
newContent: string;
|
|
278
|
+
isModifying?: boolean;
|
|
279
|
+
ideConfirmation?: Promise<DiffUpdateResult>;
|
|
280
|
+
}
|
|
281
|
+
export interface ToolConfirmationPayload {
|
|
282
|
+
newContent: string;
|
|
283
|
+
}
|
|
284
|
+
export interface ToolExecuteConfirmationDetails {
|
|
285
|
+
type: 'exec';
|
|
286
|
+
title: string;
|
|
287
|
+
onConfirm: (outcome: ToolConfirmationOutcome) => Promise<void>;
|
|
288
|
+
command: string;
|
|
289
|
+
rootCommand: string;
|
|
290
|
+
}
|
|
291
|
+
export interface ToolMcpConfirmationDetails {
|
|
292
|
+
type: 'mcp';
|
|
293
|
+
title: string;
|
|
294
|
+
serverName: string;
|
|
295
|
+
toolName: string;
|
|
296
|
+
toolDisplayName: string;
|
|
297
|
+
onConfirm: (outcome: ToolConfirmationOutcome) => Promise<void>;
|
|
298
|
+
}
|
|
299
|
+
export interface ToolInfoConfirmationDetails {
|
|
300
|
+
type: 'info';
|
|
301
|
+
title: string;
|
|
302
|
+
onConfirm: (outcome: ToolConfirmationOutcome) => Promise<void>;
|
|
303
|
+
prompt: string;
|
|
304
|
+
urls?: string[];
|
|
305
|
+
}
|
|
306
|
+
export type ToolCallConfirmationDetails = ToolEditConfirmationDetails | ToolExecuteConfirmationDetails | ToolMcpConfirmationDetails | ToolInfoConfirmationDetails;
|
|
307
|
+
export declare enum ToolConfirmationOutcome {
|
|
308
|
+
ProceedOnce = "proceed_once",
|
|
309
|
+
ProceedAlways = "proceed_always",
|
|
310
|
+
ProceedAlwaysServer = "proceed_always_server",
|
|
311
|
+
ProceedAlwaysTool = "proceed_always_tool",
|
|
312
|
+
ModifyWithEditor = "modify_with_editor",
|
|
313
|
+
Cancel = "cancel"
|
|
314
|
+
}
|
|
315
|
+
export declare enum Icon {
|
|
316
|
+
FileSearch = "fileSearch",
|
|
317
|
+
Folder = "folder",
|
|
318
|
+
Globe = "globe",
|
|
319
|
+
Hammer = "hammer",
|
|
320
|
+
LightBulb = "lightBulb",
|
|
321
|
+
Pencil = "pencil",
|
|
322
|
+
Regex = "regex",
|
|
323
|
+
Terminal = "terminal"
|
|
324
|
+
}
|
|
325
|
+
export interface ToolLocation {
|
|
326
|
+
path: string;
|
|
327
|
+
line?: number;
|
|
328
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A convenience base class for ToolInvocation.
|
|
8
|
+
*/
|
|
9
|
+
export class BaseToolInvocation {
|
|
10
|
+
params;
|
|
11
|
+
constructor(params) {
|
|
12
|
+
this.params = params;
|
|
13
|
+
}
|
|
14
|
+
toolLocations() {
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
shouldConfirmExecute(_abortSignal) {
|
|
18
|
+
return Promise.resolve(false);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* An adapter that wraps the legacy `Tool` interface to make it compatible
|
|
23
|
+
* with the new `ToolInvocation` pattern.
|
|
24
|
+
*/
|
|
25
|
+
export class LegacyToolInvocation {
|
|
26
|
+
legacyTool;
|
|
27
|
+
params;
|
|
28
|
+
constructor(legacyTool, params) {
|
|
29
|
+
this.legacyTool = legacyTool;
|
|
30
|
+
this.params = params;
|
|
31
|
+
}
|
|
32
|
+
getDescription() {
|
|
33
|
+
return this.legacyTool.getDescription(this.params);
|
|
34
|
+
}
|
|
35
|
+
toolLocations() {
|
|
36
|
+
return this.legacyTool.toolLocations(this.params);
|
|
37
|
+
}
|
|
38
|
+
shouldConfirmExecute(abortSignal) {
|
|
39
|
+
return this.legacyTool.shouldConfirmExecute(this.params, abortSignal);
|
|
40
|
+
}
|
|
41
|
+
execute(signal, updateOutput) {
|
|
42
|
+
return this.legacyTool.execute(this.params, signal, updateOutput);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* New base class for tools that separates validation from execution.
|
|
47
|
+
* New tools should extend this class.
|
|
48
|
+
*/
|
|
49
|
+
export class DeclarativeTool {
|
|
50
|
+
name;
|
|
51
|
+
displayName;
|
|
52
|
+
description;
|
|
53
|
+
icon;
|
|
54
|
+
parameterSchema;
|
|
55
|
+
isOutputMarkdown;
|
|
56
|
+
canUpdateOutput;
|
|
57
|
+
constructor(name, displayName, description, icon, parameterSchema, isOutputMarkdown = true, canUpdateOutput = false) {
|
|
58
|
+
this.name = name;
|
|
59
|
+
this.displayName = displayName;
|
|
60
|
+
this.description = description;
|
|
61
|
+
this.icon = icon;
|
|
62
|
+
this.parameterSchema = parameterSchema;
|
|
63
|
+
this.isOutputMarkdown = isOutputMarkdown;
|
|
64
|
+
this.canUpdateOutput = canUpdateOutput;
|
|
65
|
+
}
|
|
66
|
+
get schema() {
|
|
67
|
+
return {
|
|
68
|
+
name: this.name,
|
|
69
|
+
description: this.description,
|
|
70
|
+
parameters: this.parameterSchema,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Validates the raw tool parameters.
|
|
75
|
+
* Subclasses should override this to add custom validation logic
|
|
76
|
+
* beyond the JSON schema check.
|
|
77
|
+
* @param params The raw parameters from the model.
|
|
78
|
+
* @returns An error message string if invalid, null otherwise.
|
|
79
|
+
*/
|
|
80
|
+
validateToolParams(_params) {
|
|
81
|
+
// Base implementation can be extended by subclasses.
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A convenience method that builds and executes the tool in one step.
|
|
86
|
+
* Throws an error if validation fails.
|
|
87
|
+
* @param params The raw, untrusted parameters from the model.
|
|
88
|
+
* @param signal AbortSignal for tool cancellation.
|
|
89
|
+
* @param updateOutput Optional callback to stream output.
|
|
90
|
+
* @returns The result of the tool execution.
|
|
91
|
+
*/
|
|
92
|
+
async buildAndExecute(params, signal, updateOutput) {
|
|
93
|
+
const invocation = this.build(params);
|
|
94
|
+
return invocation.execute(signal, updateOutput);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* New base class for declarative tools that separates validation from execution.
|
|
99
|
+
* New tools should extend this class, which provides a `build` method that
|
|
100
|
+
* validates parameters before deferring to a `createInvocation` method for
|
|
101
|
+
* the final `ToolInvocation` object instantiation.
|
|
102
|
+
*/
|
|
103
|
+
export class BaseDeclarativeTool extends DeclarativeTool {
|
|
104
|
+
build(params) {
|
|
105
|
+
const validationError = this.validateToolParams(params);
|
|
106
|
+
if (validationError) {
|
|
107
|
+
throw new Error(validationError);
|
|
108
|
+
}
|
|
109
|
+
return this.createInvocation(params);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Base implementation for tools with common functionality
|
|
114
|
+
* @deprecated Use `DeclarativeTool` for new tools.
|
|
115
|
+
*/
|
|
116
|
+
export class BaseTool extends DeclarativeTool {
|
|
117
|
+
name;
|
|
118
|
+
displayName;
|
|
119
|
+
description;
|
|
120
|
+
icon;
|
|
121
|
+
parameterSchema;
|
|
122
|
+
isOutputMarkdown;
|
|
123
|
+
canUpdateOutput;
|
|
124
|
+
/**
|
|
125
|
+
* Creates a new instance of BaseTool
|
|
126
|
+
* @param name Internal name of the tool (used for API calls)
|
|
127
|
+
* @param displayName User-friendly display name of the tool
|
|
128
|
+
* @param description Description of what the tool does
|
|
129
|
+
* @param isOutputMarkdown Whether the tool's output should be rendered as markdown
|
|
130
|
+
* @param canUpdateOutput Whether the tool supports live (streaming) output
|
|
131
|
+
* @param parameterSchema Open API 3.0 Schema defining the parameters
|
|
132
|
+
*/
|
|
133
|
+
constructor(name, displayName, description, icon, parameterSchema, isOutputMarkdown = true, canUpdateOutput = false) {
|
|
134
|
+
super(name, displayName, description, icon, parameterSchema, isOutputMarkdown, canUpdateOutput);
|
|
135
|
+
this.name = name;
|
|
136
|
+
this.displayName = displayName;
|
|
137
|
+
this.description = description;
|
|
138
|
+
this.icon = icon;
|
|
139
|
+
this.parameterSchema = parameterSchema;
|
|
140
|
+
this.isOutputMarkdown = isOutputMarkdown;
|
|
141
|
+
this.canUpdateOutput = canUpdateOutput;
|
|
142
|
+
}
|
|
143
|
+
build(params) {
|
|
144
|
+
const validationError = this.validateToolParams(params);
|
|
145
|
+
if (validationError) {
|
|
146
|
+
throw new Error(validationError);
|
|
147
|
+
}
|
|
148
|
+
return new LegacyToolInvocation(this, params);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Validates the parameters for the tool
|
|
152
|
+
* This is a placeholder implementation and should be overridden
|
|
153
|
+
* Should be called from both `shouldConfirmExecute` and `execute`
|
|
154
|
+
* `shouldConfirmExecute` should return false immediately if invalid
|
|
155
|
+
* @param params Parameters to validate
|
|
156
|
+
* @returns An error message string if invalid, null otherwise
|
|
157
|
+
*/
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
159
|
+
validateToolParams(params) {
|
|
160
|
+
// Implementation would typically use a JSON Schema validator
|
|
161
|
+
// This is a placeholder that should be implemented by derived classes
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Gets a pre-execution description of the tool operation
|
|
166
|
+
* Default implementation that should be overridden by derived classes
|
|
167
|
+
* @param params Parameters for the tool execution
|
|
168
|
+
* @returns A markdown string describing what the tool will do
|
|
169
|
+
*/
|
|
170
|
+
getDescription(params) {
|
|
171
|
+
return JSON.stringify(params);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Determines if the tool should prompt for confirmation before execution
|
|
175
|
+
* @param params Parameters for the tool execution
|
|
176
|
+
* @returns Whether or not execute should be confirmed by the user.
|
|
177
|
+
*/
|
|
178
|
+
shouldConfirmExecute(
|
|
179
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
180
|
+
params,
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
182
|
+
abortSignal) {
|
|
183
|
+
return Promise.resolve(false);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Determines what file system paths the tool will affect
|
|
187
|
+
* @param params Parameters for the tool execution
|
|
188
|
+
* @returns A list of such paths
|
|
189
|
+
*/
|
|
190
|
+
toolLocations(
|
|
191
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
192
|
+
params) {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Detects cycles in a JSON schemas due to `$ref`s.
|
|
198
|
+
* @param schema The root of the JSON schema.
|
|
199
|
+
* @returns `true` if a cycle is detected, `false` otherwise.
|
|
200
|
+
*/
|
|
201
|
+
export function hasCycleInSchema(schema) {
|
|
202
|
+
function resolveRef(ref) {
|
|
203
|
+
if (!ref.startsWith('#/')) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
const path = ref.substring(2).split('/');
|
|
207
|
+
let current = schema;
|
|
208
|
+
for (const segment of path) {
|
|
209
|
+
if (typeof current !== 'object' ||
|
|
210
|
+
current === null ||
|
|
211
|
+
!Object.prototype.hasOwnProperty.call(current, segment)) {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
current = current[segment];
|
|
215
|
+
}
|
|
216
|
+
return current;
|
|
217
|
+
}
|
|
218
|
+
function traverse(node, visitedRefs, pathRefs) {
|
|
219
|
+
if (typeof node !== 'object' || node === null) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
if (Array.isArray(node)) {
|
|
223
|
+
for (const item of node) {
|
|
224
|
+
if (traverse(item, visitedRefs, pathRefs)) {
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
if ('$ref' in node && typeof node.$ref === 'string') {
|
|
231
|
+
const ref = node.$ref;
|
|
232
|
+
if (ref === '#/' || pathRefs.has(ref)) {
|
|
233
|
+
// A ref to just '#/' is always a cycle.
|
|
234
|
+
return true; // Cycle detected!
|
|
235
|
+
}
|
|
236
|
+
if (visitedRefs.has(ref)) {
|
|
237
|
+
return false; // Bail early, we have checked this ref before.
|
|
238
|
+
}
|
|
239
|
+
const resolvedNode = resolveRef(ref);
|
|
240
|
+
if (resolvedNode) {
|
|
241
|
+
// Add it to both visited and the current path
|
|
242
|
+
visitedRefs.add(ref);
|
|
243
|
+
pathRefs.add(ref);
|
|
244
|
+
const hasCycle = traverse(resolvedNode, visitedRefs, pathRefs);
|
|
245
|
+
pathRefs.delete(ref); // Backtrack, leaving it in visited
|
|
246
|
+
return hasCycle;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
// Crawl all the properties of node
|
|
250
|
+
for (const key in node) {
|
|
251
|
+
if (Object.prototype.hasOwnProperty.call(node, key)) {
|
|
252
|
+
if (traverse(node[key], visitedRefs, pathRefs)) {
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
return traverse(schema, new Set(), new Set());
|
|
260
|
+
}
|
|
261
|
+
export var ToolConfirmationOutcome;
|
|
262
|
+
(function (ToolConfirmationOutcome) {
|
|
263
|
+
ToolConfirmationOutcome["ProceedOnce"] = "proceed_once";
|
|
264
|
+
ToolConfirmationOutcome["ProceedAlways"] = "proceed_always";
|
|
265
|
+
ToolConfirmationOutcome["ProceedAlwaysServer"] = "proceed_always_server";
|
|
266
|
+
ToolConfirmationOutcome["ProceedAlwaysTool"] = "proceed_always_tool";
|
|
267
|
+
ToolConfirmationOutcome["ModifyWithEditor"] = "modify_with_editor";
|
|
268
|
+
ToolConfirmationOutcome["Cancel"] = "cancel";
|
|
269
|
+
})(ToolConfirmationOutcome || (ToolConfirmationOutcome = {}));
|
|
270
|
+
export var Icon;
|
|
271
|
+
(function (Icon) {
|
|
272
|
+
Icon["FileSearch"] = "fileSearch";
|
|
273
|
+
Icon["Folder"] = "folder";
|
|
274
|
+
Icon["Globe"] = "globe";
|
|
275
|
+
Icon["Hammer"] = "hammer";
|
|
276
|
+
Icon["LightBulb"] = "lightBulb";
|
|
277
|
+
Icon["Pencil"] = "pencil";
|
|
278
|
+
Icon["Regex"] = "regex";
|
|
279
|
+
Icon["Terminal"] = "terminal";
|
|
280
|
+
})(Icon || (Icon = {}));
|
|
281
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/tools/tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmDH;;GAEG;AACH,MAAM,OAAgB,kBAAkB;IAKjB;IAArB,YAAqB,MAAe;QAAf,WAAM,GAAN,MAAM,CAAS;IAAG,CAAC;IAIxC,aAAa;QACX,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