@machina.ai/cell-cli-core 1.11.0-rc1 → 1.13.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +9 -3
- package/dist/src/agents/executor.d.ts +19 -0
- package/dist/src/agents/executor.js +226 -32
- package/dist/src/agents/executor.js.map +1 -1
- package/dist/src/agents/executor.test.js +335 -9
- package/dist/src/agents/executor.test.js.map +1 -1
- package/dist/src/agents/subagent-tool-wrapper.test.js +2 -4
- package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
- package/dist/src/agents/types.d.ts +2 -1
- package/dist/src/agents/types.js +1 -0
- package/dist/src/agents/types.js.map +1 -1
- package/dist/src/code_assist/experiments/client_metadata.d.ts +12 -0
- package/dist/src/code_assist/experiments/client_metadata.js +49 -0
- package/dist/src/code_assist/experiments/client_metadata.js.map +1 -0
- package/dist/src/code_assist/experiments/experiments.d.ts +17 -0
- package/dist/src/code_assist/experiments/experiments.js +36 -0
- package/dist/src/code_assist/experiments/experiments.js.map +1 -0
- package/dist/src/code_assist/experiments/types.d.ts +35 -0
- package/dist/src/code_assist/experiments/types.js +7 -0
- package/dist/src/code_assist/experiments/types.js.map +1 -0
- package/dist/src/code_assist/oauth-credential-storage.js +5 -4
- package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
- package/dist/src/code_assist/oauth-credential-storage.test.js +15 -3
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -1
- package/dist/src/code_assist/oauth2.d.ts +2 -2
- package/dist/src/code_assist/oauth2.js +53 -41
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +65 -33
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +6 -4
- package/dist/src/code_assist/server.js +11 -0
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +17 -0
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/code_assist/setup.d.ts +2 -2
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +1 -1
- package/dist/src/code_assist/types.js.map +1 -1
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +9 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/extensions.test.d.ts +6 -0
- package/dist/src/commands/extensions.test.js +19 -0
- package/dist/src/commands/extensions.test.js.map +1 -0
- package/dist/src/config/config.d.ts +72 -24
- package/dist/src/config/config.js +168 -55
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +59 -23
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/models.d.ts +1 -1
- package/dist/src/config/models.js +2 -2
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/storage.d.ts +3 -0
- package/dist/src/config/storage.js +20 -0
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/core/apiKeyCredentialStorage.d.ts +17 -0
- package/dist/src/core/apiKeyCredentialStorage.js +64 -0
- package/dist/src/core/apiKeyCredentialStorage.js.map +1 -0
- package/dist/src/core/apiKeyCredentialStorage.test.d.ts +6 -0
- package/dist/src/core/apiKeyCredentialStorage.test.js +71 -0
- package/dist/src/core/apiKeyCredentialStorage.test.js.map +1 -0
- package/dist/src/core/client.d.ts +2 -11
- package/dist/src/core/client.js +28 -168
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +107 -409
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.js +64 -59
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +38 -4
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +7 -8
- package/dist/src/core/coreToolScheduler.js +316 -187
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +240 -10
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/fakeContentGenerator.d.ts +33 -0
- package/dist/src/core/fakeContentGenerator.js +58 -0
- package/dist/src/core/fakeContentGenerator.js.map +1 -0
- package/dist/src/core/fakeContentGenerator.test.d.ts +6 -0
- package/dist/src/core/fakeContentGenerator.test.js +127 -0
- package/dist/src/core/fakeContentGenerator.test.js.map +1 -0
- package/dist/src/core/geminiChat.d.ts +2 -0
- package/dist/src/core/geminiChat.js +6 -2
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +15 -3
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/logger.js +10 -9
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.d.ts +1 -0
- package/dist/src/core/loggingContentGenerator.js +113 -33
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.js +5 -4
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
- package/dist/src/core/prompts.js +104 -55
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +30 -108
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/recordingContentGenerator.d.ts +18 -0
- package/dist/src/core/recordingContentGenerator.js +77 -0
- package/dist/src/core/recordingContentGenerator.js.map +1 -0
- package/dist/src/core/recordingContentGenerator.test.d.ts +6 -0
- package/dist/src/core/recordingContentGenerator.test.js +101 -0
- package/dist/src/core/recordingContentGenerator.test.js.map +1 -0
- package/dist/src/fallback/handler.js +2 -0
- package/dist/src/fallback/handler.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/hooks/hookPlanner.d.ts +46 -0
- package/dist/src/hooks/hookPlanner.js +108 -0
- package/dist/src/hooks/hookPlanner.js.map +1 -0
- package/dist/src/hooks/hookPlanner.test.d.ts +6 -0
- package/dist/src/hooks/hookPlanner.test.js +255 -0
- package/dist/src/hooks/hookPlanner.test.js.map +1 -0
- package/dist/src/hooks/hookRegistry.d.ts +87 -0
- package/dist/src/hooks/hookRegistry.js +198 -0
- package/dist/src/hooks/hookRegistry.js.map +1 -0
- package/dist/src/hooks/hookRegistry.test.d.ts +6 -0
- package/dist/src/hooks/hookRegistry.test.js +341 -0
- package/dist/src/hooks/hookRegistry.test.js.map +1 -0
- package/dist/src/hooks/hookTranslator.d.ts +113 -0
- package/dist/src/hooks/hookTranslator.js +232 -0
- package/dist/src/hooks/hookTranslator.js.map +1 -0
- package/dist/src/hooks/hookTranslator.test.d.ts +6 -0
- package/dist/src/hooks/hookTranslator.test.js +192 -0
- package/dist/src/hooks/hookTranslator.test.js.map +1 -0
- package/dist/src/hooks/types.d.ts +384 -0
- package/dist/src/hooks/types.js +284 -0
- package/dist/src/hooks/types.js.map +1 -0
- package/dist/src/hooks/types.test.d.ts +6 -0
- package/dist/src/hooks/types.test.js +35 -0
- package/dist/src/hooks/types.test.js.map +1 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +14 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/google-auth-provider.d.ts +2 -0
- package/dist/src/mcp/google-auth-provider.js +21 -3
- package/dist/src/mcp/google-auth-provider.js.map +1 -1
- package/dist/src/mcp/google-auth-provider.test.js +42 -9
- package/dist/src/mcp/google-auth-provider.test.js.map +1 -1
- package/dist/src/mcp/mcpLauncher.d.ts +26 -0
- package/dist/src/mcp/mcpLauncher.js +238 -0
- package/dist/src/mcp/mcpLauncher.js.map +1 -0
- package/dist/src/mcp/oauth-provider.d.ts +8 -5
- package/dist/src/mcp/oauth-provider.js +120 -36
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +191 -2
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.js +5 -4
- package/dist/src/mcp/oauth-token-storage.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.test.js +17 -11
- package/dist/src/mcp/oauth-token-storage.test.js.map +1 -1
- package/dist/src/mcp/oauth-utils.d.ts +7 -0
- package/dist/src/mcp/oauth-utils.js +19 -0
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/mcp/oauth-utils.test.js +32 -0
- package/dist/src/mcp/oauth-utils.test.js.map +1 -1
- package/dist/src/mcp/sa-impersonation-provider.d.ts +0 -6
- package/dist/src/mcp/sa-impersonation-provider.js +6 -23
- package/dist/src/mcp/sa-impersonation-provider.js.map +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.test.js +75 -84
- package/dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.test.js +7 -5
- package/dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/hybrid-token-storage.js +1 -1
- package/dist/src/mcp/token-storage/hybrid-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js +2 -2
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.d.ts +6 -2
- package/dist/src/mcp/token-storage/keychain-token-storage.js +63 -7
- package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js +54 -3
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/types.d.ts +6 -0
- package/dist/src/mcp/token-storage/types.js.map +1 -1
- package/dist/src/policy/config.d.ts +31 -0
- package/dist/src/policy/config.js +197 -0
- package/dist/src/policy/config.js.map +1 -0
- package/dist/src/policy/config.test.d.ts +6 -0
- package/dist/src/policy/config.test.js +404 -0
- package/dist/src/policy/config.test.js.map +1 -0
- package/dist/src/policy/index.d.ts +2 -0
- package/dist/src/policy/index.js +2 -0
- package/dist/src/policy/index.js.map +1 -1
- package/dist/src/policy/policies/read-only.toml +56 -0
- package/dist/src/policy/policies/write.toml +63 -0
- package/dist/src/policy/policies/yolo.toml +31 -0
- package/dist/src/policy/policy-engine.js +4 -0
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/toml-loader.d.ts +46 -0
- package/dist/src/policy/toml-loader.js +314 -0
- package/dist/src/policy/toml-loader.js.map +1 -0
- package/dist/src/policy/toml-loader.test.d.ts +6 -0
- package/dist/src/policy/toml-loader.test.js +522 -0
- package/dist/src/policy/toml-loader.test.js.map +1 -0
- package/dist/src/policy/types.d.ts +18 -0
- package/dist/src/policy/types.js +6 -0
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/services/chatCompressionService.d.ts +32 -0
- package/dist/src/services/chatCompressionService.js +162 -0
- package/dist/src/services/chatCompressionService.js.map +1 -0
- package/dist/src/services/chatCompressionService.test.d.ts +6 -0
- package/dist/src/services/chatCompressionService.test.js +209 -0
- package/dist/src/services/chatCompressionService.test.js.map +1 -0
- package/dist/src/services/chatRecordingService.js +9 -8
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.d.ts +2 -14
- package/dist/src/services/fileDiscoveryService.js +19 -55
- package/dist/src/services/fileDiscoveryService.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.test.js +91 -11
- package/dist/src/services/fileDiscoveryService.test.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +1 -1
- package/dist/src/services/loopDetectionService.js +26 -13
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +119 -11
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.js +22 -6
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +32 -6
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +84 -33
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +40 -61
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +4 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +6 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/gcp-exporters.js +0 -1
- package/dist/src/telemetry/gcp-exporters.js.map +1 -1
- package/dist/src/telemetry/gcp-exporters.test.js +1 -1
- package/dist/src/telemetry/gcp-exporters.test.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +2 -1
- package/dist/src/telemetry/index.js +3 -2
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +2 -1
- package/dist/src/telemetry/loggers.js +37 -26
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +199 -44
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +55 -6
- package/dist/src/telemetry/metrics.js +89 -1
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +172 -213
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/semantic.d.ts +82 -0
- package/dist/src/telemetry/semantic.js +269 -0
- package/dist/src/telemetry/semantic.js.map +1 -0
- package/dist/src/telemetry/semantic.test.d.ts +6 -0
- package/dist/src/telemetry/semantic.test.js +387 -0
- package/dist/src/telemetry/semantic.test.js.map +1 -0
- package/dist/src/telemetry/telemetry-utils.test.js +29 -28
- package/dist/src/telemetry/telemetry-utils.test.js.map +1 -1
- package/dist/src/telemetry/trace.d.ts +46 -0
- package/dist/src/telemetry/trace.js +121 -0
- package/dist/src/telemetry/trace.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +64 -28
- package/dist/src/telemetry/types.js +163 -55
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.js +6 -6
- package/dist/src/telemetry/uiTelemetry.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js +88 -66
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
- package/dist/src/tools/edit.d.ts +3 -2
- package/dist/src/tools/edit.js +16 -12
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +78 -1
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.js +9 -13
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +203 -199
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/grep.js +2 -2
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/ls.js +7 -13
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +2 -9
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.d.ts +49 -4
- package/dist/src/tools/mcp-client-manager.js +209 -23
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +130 -33
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +5 -1
- package/dist/src/tools/mcp-client.js +72 -92
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +65 -6
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +4 -2
- package/dist/src/tools/mcp-tool.js +14 -10
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +5 -3
- package/dist/src/tools/memoryTool.js +10 -8
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/modifiable-tool.js +3 -2
- package/dist/src/tools/modifiable-tool.js.map +1 -1
- package/dist/src/tools/read-file.js +7 -3
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +25 -2
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.js +8 -29
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/shell.d.ts +6 -4
- package/dist/src/tools/shell.js +23 -16
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +8 -1
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +3 -2
- package/dist/src/tools/smart-edit.js +23 -12
- package/dist/src/tools/smart-edit.js.map +1 -1
- package/dist/src/tools/smart-edit.test.js +62 -1
- package/dist/src/tools/smart-edit.test.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +6 -19
- package/dist/src/tools/tool-registry.js +11 -47
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +2 -24
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +8 -1
- package/dist/src/tools/tools.js +32 -18
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/web-fetch.js +4 -18
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +3 -3
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +2 -1
- package/dist/src/tools/write-file.js +7 -7
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +1 -1
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/tools/write-todos.d.ts +2 -1
- package/dist/src/tools/write-todos.js +5 -2
- package/dist/src/tools/write-todos.js.map +1 -1
- package/dist/src/utils/channel.d.ts +19 -0
- package/dist/src/utils/channel.js +49 -0
- package/dist/src/utils/channel.js.map +1 -0
- package/dist/src/utils/channel.test.d.ts +6 -0
- package/dist/src/utils/channel.test.js +170 -0
- package/dist/src/utils/channel.test.js.map +1 -0
- package/dist/src/utils/environmentContext.d.ts +2 -1
- package/dist/src/utils/environmentContext.js +18 -0
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/errorParsing.d.ts +1 -1
- package/dist/src/utils/errorParsing.js +5 -33
- package/dist/src/utils/errorParsing.js.map +1 -1
- package/dist/src/utils/errorParsing.test.js +0 -88
- package/dist/src/utils/errorParsing.test.js.map +1 -1
- package/dist/src/utils/errors.d.ts +3 -0
- package/dist/src/utils/errors.js +6 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/events.d.ts +88 -0
- package/dist/src/utils/events.js +77 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/events.test.d.ts +6 -0
- package/dist/src/utils/events.test.js +131 -0
- package/dist/src/utils/events.test.js.map +1 -0
- package/dist/src/utils/extensionLoader.d.ts +78 -0
- package/dist/src/utils/extensionLoader.js +162 -0
- package/dist/src/utils/extensionLoader.js.map +1 -0
- package/dist/src/utils/extensionLoader.test.d.ts +6 -0
- package/dist/src/utils/extensionLoader.test.js +90 -0
- package/dist/src/utils/extensionLoader.test.js.map +1 -0
- package/dist/src/utils/fetch.js +1 -6
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/flashFallback.test.js +26 -45
- package/dist/src/utils/flashFallback.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.js +7 -16
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.d.ts +4 -1
- package/dist/src/utils/gitIgnoreParser.js +21 -4
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +28 -0
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/googleErrors.d.ts +104 -0
- package/dist/src/utils/googleErrors.js +152 -0
- package/dist/src/utils/googleErrors.js.map +1 -0
- package/dist/src/utils/googleErrors.test.d.ts +6 -0
- package/dist/src/utils/googleErrors.test.js +301 -0
- package/dist/src/utils/googleErrors.test.js.map +1 -0
- package/dist/src/utils/googleQuotaErrors.d.ts +36 -0
- package/dist/src/utils/googleQuotaErrors.js +149 -0
- package/dist/src/utils/googleQuotaErrors.js.map +1 -0
- package/dist/src/utils/googleQuotaErrors.test.d.ts +6 -0
- package/dist/src/utils/googleQuotaErrors.test.js +311 -0
- package/dist/src/utils/googleQuotaErrors.test.js.map +1 -0
- package/dist/src/utils/ignorePatterns.test.js +26 -30
- package/dist/src/utils/ignorePatterns.test.js.map +1 -1
- package/dist/src/utils/installationManager.js +2 -1
- package/dist/src/utils/installationManager.js.map +1 -1
- package/dist/src/utils/installationManager.test.js +3 -3
- package/dist/src/utils/installationManager.test.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.d.ts +1 -1
- package/dist/src/utils/llm-edit-fixer.js +27 -3
- package/dist/src/utils/llm-edit-fixer.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.test.js +21 -0
- package/dist/src/utils/llm-edit-fixer.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.d.ts +11 -2
- package/dist/src/utils/memoryDiscovery.js +140 -2
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +153 -37
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +15 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/paths.js +126 -26
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/paths.test.js +200 -68
- package/dist/src/utils/paths.test.js.map +1 -1
- package/dist/src/utils/quotaErrorDetection.d.ts +0 -2
- package/dist/src/utils/quotaErrorDetection.js +0 -46
- package/dist/src/utils/quotaErrorDetection.js.map +1 -1
- package/dist/src/utils/retry.js +41 -145
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +31 -110
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/src/utils/shell-utils.js +29 -1
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +88 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/summarizer.js +2 -1
- package/dist/src/utils/summarizer.js.map +1 -1
- package/dist/src/utils/summarizer.test.js +0 -1
- package/dist/src/utils/summarizer.test.js.map +1 -1
- package/dist/src/utils/workspaceContext.js +1 -1
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/dist/src/utils/workspaceContext.test.js +2 -2
- package/dist/src/utils/workspaceContext.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -3
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ApiRequestEvent, ApiResponseEvent, ApiErrorEvent, } from '../telemetry/types.js';
|
|
7
7
|
import { logApiError, logApiRequest, logApiResponse, } from '../telemetry/loggers.js';
|
|
8
|
+
import { CodeAssistServer } from '../code_assist/server.js';
|
|
8
9
|
import { toContents } from '../code_assist/converter.js';
|
|
9
10
|
import { isStructuredError } from '../utils/quotaErrorDetection.js';
|
|
11
|
+
import { runInDevTraceSpan } from '../telemetry/trace.js';
|
|
10
12
|
/**
|
|
11
13
|
* A decorator that wraps a ContentGenerator to add logging to API calls.
|
|
12
14
|
*/
|
|
@@ -24,48 +26,108 @@ export class LoggingContentGenerator {
|
|
|
24
26
|
const requestText = JSON.stringify(contents);
|
|
25
27
|
logApiRequest(this.config, new ApiRequestEvent(model, promptId, requestText));
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
_getEndpointUrl(req, method) {
|
|
30
|
+
// Case 1: Authenticated with a Google account (`gcloud auth login`).
|
|
31
|
+
// Requests are routed through the internal CodeAssistServer.
|
|
32
|
+
if (this.wrapped instanceof CodeAssistServer) {
|
|
33
|
+
const url = new URL(this.wrapped.getMethodUrl(method));
|
|
34
|
+
const port = url.port
|
|
35
|
+
? parseInt(url.port, 10)
|
|
36
|
+
: url.protocol === 'https:'
|
|
37
|
+
? 443
|
|
38
|
+
: 80;
|
|
39
|
+
return { address: url.hostname, port };
|
|
40
|
+
}
|
|
41
|
+
const genConfig = this.config.getContentGeneratorConfig();
|
|
42
|
+
// Case 2: Using an API key for Vertex AI.
|
|
43
|
+
if (genConfig?.vertexai) {
|
|
44
|
+
const location = process.env['GOOGLE_CLOUD_LOCATION'];
|
|
45
|
+
if (location) {
|
|
46
|
+
return { address: `${location}-aiplatform.googleapis.com`, port: 443 };
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return { address: 'unknown', port: 0 };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Case 3: Default to the public Gemini API endpoint.
|
|
53
|
+
// This is used when an API key is provided but not for Vertex AI.
|
|
54
|
+
return { address: `generativelanguage.googleapis.com`, port: 443 };
|
|
55
|
+
}
|
|
56
|
+
_logApiResponse(requestContents, durationMs, model, prompt_id, responseId, responseCandidates, usageMetadata, responseText, generationConfig, serverDetails) {
|
|
57
|
+
logApiResponse(this.config, new ApiResponseEvent(model, durationMs, {
|
|
58
|
+
prompt_id,
|
|
59
|
+
contents: requestContents,
|
|
60
|
+
generate_content_config: generationConfig,
|
|
61
|
+
server: serverDetails,
|
|
62
|
+
}, {
|
|
63
|
+
candidates: responseCandidates,
|
|
64
|
+
response_id: responseId,
|
|
65
|
+
}, this.config.getContentGeneratorConfig()?.authType, usageMetadata, responseText));
|
|
29
66
|
}
|
|
30
|
-
_logApiError(durationMs, error, model, prompt_id) {
|
|
67
|
+
_logApiError(durationMs, error, model, prompt_id, requestContents, generationConfig, serverDetails) {
|
|
31
68
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
32
69
|
const errorType = error instanceof Error ? error.name : 'unknown';
|
|
33
|
-
logApiError(this.config, new ApiErrorEvent(model, errorMessage, durationMs,
|
|
70
|
+
logApiError(this.config, new ApiErrorEvent(model, errorMessage, durationMs, {
|
|
71
|
+
prompt_id,
|
|
72
|
+
contents: requestContents,
|
|
73
|
+
generate_content_config: generationConfig,
|
|
74
|
+
server: serverDetails,
|
|
75
|
+
}, this.config.getContentGeneratorConfig()?.authType, errorType, isStructuredError(error)
|
|
34
76
|
? error.status
|
|
35
77
|
: undefined));
|
|
36
78
|
}
|
|
37
79
|
async generateContent(req, userPromptId) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
80
|
+
return runInDevTraceSpan({
|
|
81
|
+
name: 'generateContent',
|
|
82
|
+
}, async ({ metadata: spanMetadata }) => {
|
|
83
|
+
spanMetadata.input = { request: req, userPromptId, model: req.model };
|
|
84
|
+
const startTime = Date.now();
|
|
85
|
+
const contents = toContents(req.contents);
|
|
86
|
+
this.logApiRequest(toContents(req.contents), req.model, userPromptId);
|
|
87
|
+
const serverDetails = this._getEndpointUrl(req, 'generateContent');
|
|
88
|
+
try {
|
|
89
|
+
const response = await this.wrapped.generateContent(req, userPromptId);
|
|
90
|
+
spanMetadata.output = {
|
|
91
|
+
response,
|
|
92
|
+
usageMetadata: response.usageMetadata,
|
|
93
|
+
};
|
|
94
|
+
const durationMs = Date.now() - startTime;
|
|
95
|
+
this._logApiResponse(contents, durationMs, response.modelVersion || req.model, userPromptId, response.responseId, response.candidates, response.usageMetadata, JSON.stringify(response), req.config, serverDetails);
|
|
96
|
+
return response;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
const durationMs = Date.now() - startTime;
|
|
100
|
+
this._logApiError(durationMs, error, req.model, userPromptId, contents, req.config, serverDetails);
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
51
104
|
}
|
|
52
105
|
async generateContentStream(req, userPromptId) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
106
|
+
return runInDevTraceSpan({
|
|
107
|
+
name: 'generateContentStream',
|
|
108
|
+
noAutoEnd: true,
|
|
109
|
+
}, async ({ metadata: spanMetadata, endSpan }) => {
|
|
110
|
+
spanMetadata.input = { request: req, userPromptId, model: req.model };
|
|
111
|
+
const startTime = Date.now();
|
|
112
|
+
this.logApiRequest(toContents(req.contents), req.model, userPromptId);
|
|
113
|
+
const serverDetails = this._getEndpointUrl(req, 'generateContentStream');
|
|
114
|
+
let stream;
|
|
115
|
+
try {
|
|
116
|
+
stream = await this.wrapped.generateContentStream(req, userPromptId);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
const durationMs = Date.now() - startTime;
|
|
120
|
+
this._logApiError(durationMs, error, req.model, userPromptId, toContents(req.contents), req.config, serverDetails);
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
return this.loggingStreamWrapper(req, stream, startTime, userPromptId, spanMetadata, endSpan);
|
|
124
|
+
});
|
|
65
125
|
}
|
|
66
|
-
async *loggingStreamWrapper(stream, startTime, userPromptId,
|
|
126
|
+
async *loggingStreamWrapper(req, stream, startTime, userPromptId, spanMetadata, endSpan) {
|
|
67
127
|
const responses = [];
|
|
68
128
|
let lastUsageMetadata;
|
|
129
|
+
const serverDetails = this._getEndpointUrl(req, 'generateContentStream');
|
|
130
|
+
const requestContents = toContents(req.contents);
|
|
69
131
|
try {
|
|
70
132
|
for await (const response of stream) {
|
|
71
133
|
responses.push(response);
|
|
@@ -76,19 +138,37 @@ export class LoggingContentGenerator {
|
|
|
76
138
|
}
|
|
77
139
|
// Only log successful API response if no error occurred
|
|
78
140
|
const durationMs = Date.now() - startTime;
|
|
79
|
-
this._logApiResponse(durationMs, responses[0]?.modelVersion || model, userPromptId, lastUsageMetadata, JSON.stringify(responses));
|
|
141
|
+
this._logApiResponse(requestContents, durationMs, responses[0]?.modelVersion || req.model, userPromptId, responses[0]?.responseId, responses.flatMap((response) => response.candidates || []), lastUsageMetadata, JSON.stringify(responses), req.config, serverDetails);
|
|
142
|
+
spanMetadata.output = {
|
|
143
|
+
streamChunks: responses.map((r) => ({
|
|
144
|
+
content: r.candidates?.[0]?.content ?? null,
|
|
145
|
+
})),
|
|
146
|
+
usageMetadata: lastUsageMetadata,
|
|
147
|
+
durationMs,
|
|
148
|
+
};
|
|
80
149
|
}
|
|
81
150
|
catch (error) {
|
|
151
|
+
spanMetadata.error = error;
|
|
82
152
|
const durationMs = Date.now() - startTime;
|
|
83
|
-
this._logApiError(durationMs, error, responses[0]?.modelVersion || model, userPromptId);
|
|
153
|
+
this._logApiError(durationMs, error, responses[0]?.modelVersion || req.model, userPromptId, requestContents, req.config, serverDetails);
|
|
84
154
|
throw error;
|
|
85
155
|
}
|
|
156
|
+
finally {
|
|
157
|
+
endSpan();
|
|
158
|
+
}
|
|
86
159
|
}
|
|
87
160
|
async countTokens(req) {
|
|
88
161
|
return this.wrapped.countTokens(req);
|
|
89
162
|
}
|
|
90
163
|
async embedContent(req) {
|
|
91
|
-
return
|
|
164
|
+
return runInDevTraceSpan({
|
|
165
|
+
name: 'embedContent',
|
|
166
|
+
}, async ({ metadata: spanMetadata }) => {
|
|
167
|
+
spanMetadata.input = { request: req };
|
|
168
|
+
const output = await this.wrapped.embedContent(req);
|
|
169
|
+
spanMetadata.output = output;
|
|
170
|
+
return output;
|
|
171
|
+
});
|
|
92
172
|
}
|
|
93
173
|
}
|
|
94
174
|
//# sourceMappingURL=loggingContentGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggingContentGenerator.js","sourceRoot":"","sources":["../../../src/core/loggingContentGenerator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"loggingContentGenerator.js","sourceRoot":"","sources":["../../../src/core/loggingContentGenerator.ts"],"names":[],"mapp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e,EACf,GAAG,CAAC,MAAM,EACV,aAAa,CACd,CAAC;YACF,MAAM,KAAK,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAA0B;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,GAA2B;QAE3B,OAAO,iBAAiB,CACtB;YACE,IAAI,EAAE,cAAc;SACrB,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE;YACnC,YAAY,CAAC,KAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACpD,YAAY,CAAC,MAAM,GAAG,MAAM,CAAC;YAC7B,OAAO,MAAM,CAAC;QAChB,CAAC,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -9,16 +9,17 @@ import { CoreToolScheduler, } from './coreToolScheduler.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export async function executeToolCall(config, toolCallRequest, abortSignal) {
|
|
11
11
|
return new Promise((resolve, reject) => {
|
|
12
|
-
new CoreToolScheduler({
|
|
12
|
+
const scheduler = new CoreToolScheduler({
|
|
13
13
|
config,
|
|
14
14
|
getPreferredEditor: () => undefined,
|
|
15
15
|
onEditorClose: () => { },
|
|
16
16
|
onAllToolCallsComplete: async (completedToolCalls) => {
|
|
17
17
|
resolve(completedToolCalls[0]);
|
|
18
18
|
},
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
});
|
|
20
|
+
scheduler.schedule(toolCallRequest, abortSignal).catch((error) => {
|
|
21
|
+
reject(error);
|
|
22
|
+
});
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=nonInteractiveToolExecutor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nonInteractiveToolExecutor.js","sourceRoot":"","sources":["../../../src/core/nonInteractiveToolExecutor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAc,EACd,eAAoC,EACpC,WAAwB;IAExB,OAAO,IAAI,OAAO,CAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxD,IAAI,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"nonInteractiveToolExecutor.js","sourceRoot":"","sources":["../../../src/core/nonInteractiveToolExecutor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAc,EACd,eAAoC,EACpC,WAAwB;IAExB,OAAO,IAAI,OAAO,CAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxD,MAAM,SAAS,GAAG,IAAI,iBAAiB,CAAC;YACtC,MAAM;YACN,kBAAkB,EAAE,GAAG,EAAE,CAAC,SAAS;YACnC,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;YACvB,sBAAsB,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE;gBACnD,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;YACjC,CAAC;SACF,CAAC,CAAC;QAEH,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAC/D,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/core/prompts.js
CHANGED
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
import path from 'node:path';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import os from 'node:os';
|
|
9
|
-
import { EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, MEMORY_TOOL_NAME, READ_FILE_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, } from '../tools/tool-names.js';
|
|
9
|
+
import { EDIT_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME, MEMORY_TOOL_NAME, READ_FILE_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, WRITE_TODOS_TOOL_NAME, } from '../tools/tool-names.js';
|
|
10
10
|
import process from 'node:process';
|
|
11
11
|
import { isGitRepository } from '../utils/gitUtils.js';
|
|
12
12
|
import { CodebaseInvestigatorAgent } from '../agents/codebase-investigator.js';
|
|
13
13
|
import { CELL_DIR } from '../utils/paths.js';
|
|
14
14
|
import { debugLogger } from '../utils/debugLogger.js';
|
|
15
|
+
import { WriteTodosTool } from '../tools/write-todos.js';
|
|
15
16
|
export function resolvePathFromEnv(envVar) {
|
|
16
17
|
// Handle the case where the environment variable is not set, empty, or just whitespace.
|
|
17
18
|
const trimmedEnvVar = envVar?.trim();
|
|
@@ -75,10 +76,18 @@ export function getCoreSystemPrompt(config, userMemory) {
|
|
|
75
76
|
.getToolRegistry()
|
|
76
77
|
.getAllToolNames()
|
|
77
78
|
.includes(CodebaseInvestigatorAgent.name);
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
const enableWriteTodosTool = config
|
|
80
|
+
.getToolRegistry()
|
|
81
|
+
.getAllToolNames()
|
|
82
|
+
.includes(WriteTodosTool.Name);
|
|
83
|
+
let basePrompt;
|
|
84
|
+
if (systemMdEnabled) {
|
|
85
|
+
basePrompt = fs.readFileSync(systemMdPath, 'utf8');
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const promptConfig = {
|
|
89
|
+
preamble: `You are an interactive CLI agent specializing in software engineering tasks. Your primary goal is to help users safely and efficiently, adhering strictly to the following instructions and utilizing your available tools.`,
|
|
90
|
+
coreMandates: `
|
|
82
91
|
# Core Mandates
|
|
83
92
|
|
|
84
93
|
- **Conventions:** Rigorously adhere to existing project conventions when reading or modifying code. Analyze surrounding code, tests, and configuration first.
|
|
@@ -89,25 +98,39 @@ export function getCoreSystemPrompt(config, userMemory) {
|
|
|
89
98
|
- **Proactiveness:** Fulfill the user's request thoroughly. When adding features or fixing bugs, this includes adding tests to ensure quality. Consider all created files, especially tests, to be permanent artifacts unless the user says otherwise.
|
|
90
99
|
- **Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If asked *how* to do something, explain first, don't just do it.
|
|
91
100
|
- **Explaining Changes:** After completing a code modification or file operation *do not* provide summaries unless asked.
|
|
92
|
-
- **Path Construction:** Before using any file system tool (e.g., ${READ_FILE_TOOL_NAME}
|
|
93
|
-
- **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes
|
|
101
|
+
- **Path Construction:** Before using any file system tool (e.g., ${READ_FILE_TOOL_NAME} or '${WRITE_FILE_TOOL_NAME}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
|
|
102
|
+
- **Do Not revert changes:** Do not revert changes to the codebase unless asked to do so by the user. Only revert changes made by you if they have resulted in an error or if the user has explicitly asked you to revert the changes.`,
|
|
103
|
+
primaryWorkflows_prefix: `
|
|
104
|
+
# Primary Workflows
|
|
94
105
|
|
|
106
|
+
## Software Engineering Tasks
|
|
107
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
108
|
+
1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
|
|
109
|
+
Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
|
|
110
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
111
|
+
primaryWorkflows_prefix_ci: `
|
|
112
|
+
# Primary Workflows
|
|
95
113
|
|
|
114
|
+
## Software Engineering Tasks
|
|
115
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
116
|
+
1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary tool** must be '${CodebaseInvestigatorAgent.name}'. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.
|
|
117
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
118
|
+
primaryWorkflows_prefix_ci_todo: `
|
|
96
119
|
# Primary Workflows
|
|
97
120
|
|
|
98
121
|
## Software Engineering Tasks
|
|
99
122
|
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
100
|
-
${(function () {
|
|
101
|
-
if (enableCodebaseInvestigator) {
|
|
102
|
-
return `
|
|
103
123
|
1. **Understand & Strategize:** Think about the user's request and the relevant codebase context. When the task involves **complex refactoring, codebase exploration or system-wide analysis**, your **first and primary tool** must be '${CodebaseInvestigatorAgent.name}'. Use it to build a comprehensive understanding of the code, its structure, and dependencies. For **simple, targeted searches** (like finding a specific function name, file path, or variable declaration), you should use '${GREP_TOOL_NAME}' or '${GLOB_TOOL_NAME}' directly.
|
|
104
|
-
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution
|
|
105
|
-
|
|
106
|
-
|
|
124
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If '${CodebaseInvestigatorAgent.name}' was used, do not ignore the output of '${CodebaseInvestigatorAgent.name}', you must use it as the foundation of your plan. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
125
|
+
primaryWorkflows_todo: `
|
|
126
|
+
# Primary Workflows
|
|
127
|
+
|
|
128
|
+
## Software Engineering Tasks
|
|
129
|
+
When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
|
|
107
130
|
1. **Understand:** Think about the user's request and the relevant codebase context. Use '${GREP_TOOL_NAME}' and '${GLOB_TOOL_NAME}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions. Use '${READ_FILE_TOOL_NAME}' and '${READ_MANY_FILES_TOOL_NAME}' to understand context and validate any assumptions you may have.
|
|
108
|
-
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution
|
|
109
|
-
|
|
110
|
-
|
|
131
|
+
2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`,
|
|
132
|
+
primaryWorkflows_suffix: `3. **Implement:** Use the available tools (e.g., '${EDIT_TOOL_NAME}', '${WRITE_FILE_TOOL_NAME}' '${SHELL_TOOL_NAME}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core
|
|
133
|
+
Mandates').
|
|
111
134
|
4. **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'package.json'), or existing test execution patterns. NEVER assume standard test commands.
|
|
112
135
|
5. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (e.g., 'tsc', 'npm run lint', 'ruff check .') that you have identified for this project (or obtained from the user). This ensures code quality and adherence to standards. If unsure about these commands, you can ask the user if they'd like you to run them and if so how to.
|
|
113
136
|
6. **Finalize:** After all verification passes, consider the task complete. Do not remove or revert any changes or created files (like tests). Await the user's next instruction.
|
|
@@ -129,13 +152,13 @@ ${(function () {
|
|
|
129
152
|
3. **User Approval:** Obtain user approval for the proposed plan.
|
|
130
153
|
4. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. When starting ensure you scaffold the application using '${SHELL_TOOL_NAME}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.
|
|
131
154
|
5. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.
|
|
132
|
-
6. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype
|
|
133
|
-
|
|
155
|
+
6. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype.`,
|
|
156
|
+
operationalGuidelines: `
|
|
134
157
|
# Operational Guidelines
|
|
135
158
|
${(function () {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
159
|
+
if (config.getEnableShellOutputEfficiency()) {
|
|
160
|
+
const tempDir = config.storage.getProjectTempDir();
|
|
161
|
+
return `
|
|
139
162
|
## Shell tool output token efficiency:
|
|
140
163
|
|
|
141
164
|
IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
@@ -147,9 +170,9 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
|
147
170
|
- If a command does not have quiet/silent flags or for commands with potentially long output that may not be useful, redirect stdout and stderr to temp files in the project's temporary directory: ${tempDir}. For example: 'command > ${path.posix.join(tempDir, 'out.log')} 2> ${path.posix.join(tempDir, 'err.log')}'.
|
|
148
171
|
- After the command runs, inspect the temp files (e.g. '${path.posix.join(tempDir, 'out.log')}' and '${path.posix.join(tempDir, 'err.log')}') using commands like 'grep', 'tail', 'head', ... (or platform equivalents). Remove the temp files when done.
|
|
149
172
|
`;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
173
|
+
}
|
|
174
|
+
return '';
|
|
175
|
+
})()}
|
|
153
176
|
|
|
154
177
|
## Tone and Style (CLI Interaction)
|
|
155
178
|
- **Concise & Direct:** Adopt a professional, direct, and concise tone suitable for a CLI environment.
|
|
@@ -171,47 +194,47 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
|
|
|
171
194
|
- **Command Execution:** Use the '${SHELL_TOOL_NAME}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
|
|
172
195
|
- **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
|
|
173
196
|
${(function () {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
197
|
+
if (!config.isInteractiveShellEnabled()) {
|
|
198
|
+
return `- **Interactive Commands:** Some commands are interactive, meaning they can accept user input during their execution (e.g. ssh, vim). Only execute non-interactive commands. Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available. Interactive shell commands are not supported and may cause hangs until canceled by the user.`;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
return `- **Interactive Commands:** Prefer non-interactive commands when it makes sense; however, some commands are only interactive and expect user input during their execution (e.g. ssh, vim). If you choose to execute an interactive command consider letting the user know they can press \`ctrl + f\` to focus into the shell to provide input.`;
|
|
202
|
+
}
|
|
203
|
+
})()}
|
|
181
204
|
- **Remembering Facts:** Use the '${MEMORY_TOOL_NAME}' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"
|
|
182
205
|
- **Respect User Confirmations:** Most tool calls (also denoted as 'function calls') will first require confirmation from the user, where they will either approve or cancel the function call. If a user cancels a function call, respect their choice and do _not_ try to make the function call again. It is okay to request the tool call again _only_ if the user requests that same tool call on a subsequent prompt. When a user cancels a function call, assume best intentions from the user and consider inquiring if they prefer any alternative paths forward.
|
|
183
206
|
|
|
184
207
|
## Interaction Details
|
|
185
208
|
- **Help Command:** The user can use '/help' to display help information.
|
|
186
|
-
- **Feedback:** To report a bug or provide feedback, please use the /bug command
|
|
187
|
-
|
|
209
|
+
- **Feedback:** To report a bug or provide feedback, please use the /bug command.`,
|
|
210
|
+
sandbox: `
|
|
188
211
|
${(function () {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
212
|
+
// Determine sandbox status based on environment variables
|
|
213
|
+
const isSandboxExec = process.env['SANDBOX'] === 'sandbox-exec';
|
|
214
|
+
const isGenericSandbox = !!process.env['SANDBOX']; // Check if SANDBOX is set to any non-empty value
|
|
215
|
+
if (isSandboxExec) {
|
|
216
|
+
return `
|
|
194
217
|
# macOS Seatbelt
|
|
195
218
|
You are running under macos seatbelt with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to macOS Seatbelt (e.g. if a command fails with 'Operation not permitted' or similar error), as you report the error to the user, also explain why you think it could be due to macOS Seatbelt, and how the user may need to adjust their Seatbelt profile.
|
|
196
219
|
`;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
220
|
+
}
|
|
221
|
+
else if (isGenericSandbox) {
|
|
222
|
+
return `
|
|
200
223
|
# Sandbox
|
|
201
224
|
You are running in a sandbox container with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to sandboxing (e.g. if a command fails with 'Operation not permitted' or similar error), when you report the error to the user, also explain why you think it could be due to sandboxing, and how the user may need to adjust their sandbox configuration.
|
|
202
225
|
`;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
return `
|
|
206
229
|
# Outside of Sandbox
|
|
207
230
|
You are running outside of a sandbox container, directly on the user's system. For critical commands that are particularly likely to modify the user's system outside of the project directory or system temp directory, as you explain the command to the user (per the Explain Critical Commands rule above), also remind the user to consider enabling sandboxing.
|
|
208
231
|
`;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
232
|
+
}
|
|
233
|
+
})()}`,
|
|
234
|
+
git: `
|
|
212
235
|
${(function () {
|
|
213
|
-
|
|
214
|
-
|
|
236
|
+
if (isGitRepository(process.cwd())) {
|
|
237
|
+
return `
|
|
215
238
|
# Git Repository
|
|
216
239
|
- The current working (project) directory is being managed by a git repository.
|
|
217
240
|
- When asked to commit changes or prepare a commit, always start by gathering information using shell commands:
|
|
@@ -227,13 +250,39 @@ ${(function () {
|
|
|
227
250
|
- If a commit fails, never attempt to work around the issues without being asked to do so.
|
|
228
251
|
- Never push changes to a remote repository without being asked explicitly by the user.
|
|
229
252
|
`;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
253
|
+
}
|
|
254
|
+
return '';
|
|
255
|
+
})()}`,
|
|
256
|
+
finalReminder: `
|
|
234
257
|
# Final Reminder
|
|
235
|
-
Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' or '${READ_MANY_FILES_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved
|
|
236
|
-
|
|
258
|
+
Your core function is efficient and safe assistance. Balance extreme conciseness with the crucial need for clarity, especially regarding safety and potential system modifications. Always prioritize user control and project conventions. Never make assumptions about the contents of files; instead use '${READ_FILE_TOOL_NAME}' or '${READ_MANY_FILES_TOOL_NAME}' to ensure you aren't making broad assumptions. Finally, you are an agent - please keep going until the user's query is completely resolved.`,
|
|
259
|
+
};
|
|
260
|
+
const orderedPrompts = [
|
|
261
|
+
'preamble',
|
|
262
|
+
'coreMandates',
|
|
263
|
+
];
|
|
264
|
+
if (enableCodebaseInvestigator && enableWriteTodosTool) {
|
|
265
|
+
orderedPrompts.push('primaryWorkflows_prefix_ci_todo');
|
|
266
|
+
}
|
|
267
|
+
else if (enableCodebaseInvestigator) {
|
|
268
|
+
orderedPrompts.push('primaryWorkflows_prefix_ci');
|
|
269
|
+
}
|
|
270
|
+
else if (enableWriteTodosTool) {
|
|
271
|
+
orderedPrompts.push('primaryWorkflows_todo');
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
orderedPrompts.push('primaryWorkflows_prefix');
|
|
275
|
+
}
|
|
276
|
+
orderedPrompts.push('primaryWorkflows_suffix', 'operationalGuidelines', 'sandbox', 'git', 'finalReminder');
|
|
277
|
+
// By default, all prompts are enabled. A prompt is disabled if its corresponding
|
|
278
|
+
// GEMINI_PROMPT_<NAME> environment variable is set to "0" or "false".
|
|
279
|
+
const enabledPrompts = orderedPrompts.filter((key) => {
|
|
280
|
+
const envVar = process.env[`GEMINI_PROMPT_${key.toUpperCase()}`];
|
|
281
|
+
const lowerEnvVar = envVar?.trim().toLowerCase();
|
|
282
|
+
return lowerEnvVar !== '0' && lowerEnvVar !== 'false';
|
|
283
|
+
});
|
|
284
|
+
basePrompt = enabledPrompts.map((key) => promptConfig[key]).join('\n');
|
|
285
|
+
}
|
|
237
286
|
// if CELL_WRITE_SYSTEM_MD is set (and not 0|false), write base system prompt to file
|
|
238
287
|
const writeSystemMdResolution = resolvePathFromEnv(process.env['CELL_WRITE_SYSTEM_MD']);
|
|
239
288
|
// Check if the feature is enabled. This proceeds only if the environment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/core/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,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