@office-ai/aioncli-core 0.2.3 → 0.8.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/index.d.ts +10 -3
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/src/agents/codebase-investigator.d.ts +11 -0
- package/dist/src/agents/codebase-investigator.js +73 -0
- package/dist/src/agents/codebase-investigator.js.map +1 -0
- package/dist/src/agents/executor.d.ts +88 -0
- package/dist/src/agents/executor.js +417 -0
- package/dist/src/agents/executor.js.map +1 -0
- package/dist/src/agents/executor.test.js +419 -0
- package/dist/src/agents/executor.test.js.map +1 -0
- package/dist/src/agents/invocation.d.ts +43 -0
- package/dist/src/agents/invocation.js +100 -0
- package/dist/src/agents/invocation.js.map +1 -0
- package/dist/src/agents/invocation.test.js +206 -0
- package/dist/src/agents/invocation.test.js.map +1 -0
- package/dist/src/agents/registry.d.ts +35 -0
- package/dist/src/agents/registry.js +58 -0
- package/dist/src/agents/registry.js.map +1 -0
- package/dist/src/agents/registry.test.js +146 -0
- package/dist/src/agents/registry.test.js.map +1 -0
- package/dist/src/agents/schema-utils.d.ts +39 -0
- package/dist/src/agents/schema-utils.js +57 -0
- package/dist/src/agents/schema-utils.js.map +1 -0
- package/dist/src/agents/schema-utils.test.d.ts +6 -0
- package/dist/src/agents/schema-utils.test.js +144 -0
- package/dist/src/agents/schema-utils.test.js.map +1 -0
- package/dist/src/agents/subagent-tool-wrapper.d.ts +36 -0
- package/dist/src/agents/subagent-tool-wrapper.js +47 -0
- package/dist/src/agents/subagent-tool-wrapper.js.map +1 -0
- package/dist/src/agents/subagent-tool-wrapper.test.d.ts +6 -0
- package/dist/src/agents/subagent-tool-wrapper.test.js +105 -0
- package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -0
- package/dist/src/agents/types.d.ts +116 -0
- package/dist/src/agents/types.js +17 -0
- package/dist/src/agents/types.js.map +1 -0
- package/dist/src/agents/utils.d.ts +15 -0
- package/dist/src/agents/utils.js +29 -0
- package/dist/src/agents/utils.js.map +1 -0
- package/dist/src/agents/utils.test.d.ts +6 -0
- package/dist/src/agents/utils.test.js +87 -0
- package/dist/src/agents/utils.test.js.map +1 -0
- package/dist/src/code_assist/codeAssist.d.ts +6 -3
- package/dist/src/code_assist/codeAssist.js +12 -0
- package/dist/src/code_assist/codeAssist.js.map +1 -1
- package/dist/src/code_assist/converter.d.ts +4 -1
- package/dist/src/code_assist/converter.js +38 -5
- package/dist/src/code_assist/converter.js.map +1 -1
- package/dist/src/code_assist/converter.test.js +93 -0
- package/dist/src/code_assist/converter.test.js.map +1 -1
- package/dist/src/code_assist/oauth-credential-storage.d.ts +25 -0
- package/dist/src/code_assist/oauth-credential-storage.js +109 -0
- package/dist/src/code_assist/oauth-credential-storage.js.map +1 -0
- package/dist/src/code_assist/oauth-credential-storage.test.d.ts +6 -0
- package/dist/src/code_assist/oauth-credential-storage.test.js +136 -0
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -0
- package/dist/src/code_assist/oauth2.d.ts +1 -1
- package/dist/src/code_assist/oauth2.js +107 -48
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +735 -343
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +4 -4
- package/dist/src/code_assist/server.js +25 -2
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +25 -0
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/code_assist/setup.d.ts +1 -1
- package/dist/src/code_assist/setup.js +1 -1
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/code_assist/setup.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +17 -2
- package/dist/src/config/config.d.ts +121 -25
- package/dist/src/config/config.js +298 -89
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +370 -131
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/constants.d.ts +11 -0
- package/dist/src/config/constants.js +16 -0
- package/dist/src/config/constants.js.map +1 -0
- package/dist/src/config/models.d.ts +16 -0
- package/dist/src/config/models.js +29 -0
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/models.test.d.ts +6 -0
- package/dist/src/config/models.test.js +55 -0
- package/dist/src/config/models.test.js.map +1 -0
- package/dist/src/config/storage.d.ts +34 -0
- package/dist/src/config/storage.js +95 -0
- package/dist/src/config/storage.js.map +1 -0
- package/dist/src/config/storage.test.d.ts +6 -0
- package/dist/src/config/storage.test.js +47 -0
- package/dist/src/config/storage.test.js.map +1 -0
- package/dist/src/confirmation-bus/index.d.ts +7 -0
- package/dist/src/confirmation-bus/index.js +8 -0
- package/dist/src/confirmation-bus/index.js.map +1 -0
- package/dist/src/confirmation-bus/message-bus.d.ts +17 -0
- package/dist/src/confirmation-bus/message-bus.js +81 -0
- package/dist/src/confirmation-bus/message-bus.js.map +1 -0
- package/dist/src/confirmation-bus/message-bus.test.d.ts +6 -0
- package/dist/src/confirmation-bus/message-bus.test.js +164 -0
- package/dist/src/confirmation-bus/message-bus.test.js.map +1 -0
- package/dist/src/confirmation-bus/types.d.ts +38 -0
- package/dist/src/confirmation-bus/types.js +15 -0
- package/dist/src/confirmation-bus/types.js.map +1 -0
- package/dist/src/core/baseLlmClient.d.ts +54 -0
- package/dist/src/core/baseLlmClient.js +190 -0
- package/dist/src/core/baseLlmClient.js.map +1 -0
- package/dist/src/core/baseLlmClient.test.d.ts +6 -0
- package/dist/src/core/baseLlmClient.test.js +316 -0
- package/dist/src/core/baseLlmClient.test.js.map +1 -0
- package/dist/src/core/client.d.ts +28 -33
- package/dist/src/core/client.js +187 -384
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +745 -500
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +4 -4
- package/dist/src/core/contentGenerator.js +6 -7
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/contentGenerator.test.js +1 -3
- package/dist/src/core/contentGenerator.test.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +20 -7
- package/dist/src/core/coreToolScheduler.js +216 -53
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +564 -88
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +54 -53
- package/dist/src/core/geminiChat.js +300 -356
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +1255 -321
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/geminiRequest.js +1 -0
- package/dist/src/core/geminiRequest.js.map +1 -1
- package/dist/src/core/logger.d.ts +4 -2
- package/dist/src/core/logger.js +4 -3
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/logger.test.js +17 -16
- package/dist/src/core/logger.test.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.d.ts +3 -3
- package/dist/src/core/loggingContentGenerator.js +15 -16
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.d.ts +3 -5
- package/dist/src/core/nonInteractiveToolExecutor.js +14 -122
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +158 -78
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/openaiContentGenerator.d.ts +4 -3
- package/dist/src/core/openaiContentGenerator.js +21 -14
- package/dist/src/core/openaiContentGenerator.js.map +1 -1
- package/dist/src/core/openaiContentGenerator.test.js +1 -0
- package/dist/src/core/openaiContentGenerator.test.js.map +1 -1
- package/dist/src/core/prompts.d.ts +5 -0
- package/dist/src/core/prompts.js +66 -44
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +130 -1
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/subagent.d.ts +24 -18
- package/dist/src/core/subagent.js +125 -90
- package/dist/src/core/subagent.js.map +1 -1
- package/dist/src/core/subagent.test.js +59 -44
- package/dist/src/core/subagent.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +37 -13
- package/dist/src/core/turn.js +63 -28
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/core/turn.test.js +359 -100
- package/dist/src/core/turn.test.js.map +1 -1
- package/dist/src/fallback/handler.d.ts +7 -0
- package/dist/src/fallback/handler.js +129 -0
- package/dist/src/fallback/handler.js.map +1 -0
- package/dist/src/fallback/handler.test.d.ts +6 -0
- package/dist/src/fallback/handler.test.js +130 -0
- package/dist/src/fallback/handler.test.js.map +1 -0
- package/dist/src/fallback/types.d.ts +14 -0
- package/dist/src/fallback/types.js +7 -0
- package/dist/src/fallback/types.js.map +1 -0
- package/dist/src/ide/constants.d.ts +3 -0
- package/dist/src/ide/constants.js +3 -0
- package/dist/src/ide/constants.js.map +1 -1
- package/dist/src/ide/detect-ide.d.ts +48 -12
- package/dist/src/ide/detect-ide.js +47 -66
- package/dist/src/ide/detect-ide.js.map +1 -1
- package/dist/src/ide/detect-ide.test.js +79 -52
- package/dist/src/ide/detect-ide.test.js.map +1 -1
- package/dist/src/ide/ide-client.d.ts +69 -23
- package/dist/src/ide/ide-client.js +372 -78
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-client.test.js +375 -30
- package/dist/src/ide/ide-client.test.js.map +1 -1
- package/dist/src/ide/ide-installer.d.ts +2 -2
- package/dist/src/ide/ide-installer.js +37 -24
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/ide-installer.test.js +104 -26
- package/dist/src/ide/ide-installer.test.js.map +1 -1
- package/dist/src/ide/ideContext.d.ts +35 -365
- package/dist/src/ide/ideContext.js +60 -106
- package/dist/src/ide/ideContext.js.map +1 -1
- package/dist/src/ide/ideContext.test.js +152 -24
- package/dist/src/ide/ideContext.test.js.map +1 -1
- package/dist/src/ide/process-utils.d.ts +7 -5
- package/dist/src/ide/process-utils.js +81 -50
- package/dist/src/ide/process-utils.js.map +1 -1
- package/dist/src/ide/process-utils.test.d.ts +6 -0
- package/dist/src/ide/process-utils.test.js +158 -0
- package/dist/src/ide/process-utils.test.js.map +1 -0
- package/dist/src/ide/types.d.ts +486 -0
- package/dist/src/ide/types.js +138 -0
- package/dist/src/ide/types.js.map +1 -0
- package/dist/src/index.d.ts +20 -2
- package/dist/src/index.js +20 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/google-auth-provider.d.ts +3 -3
- package/dist/src/mcp/google-auth-provider.test.js.map +1 -1
- package/dist/src/mcp/oauth-provider.d.ts +17 -13
- package/dist/src/mcp/oauth-provider.js +81 -69
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +212 -37
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.d.ts +14 -32
- package/dist/src/mcp/oauth-token-storage.js +54 -25
- package/dist/src/mcp/oauth-token-storage.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.test.js +256 -162
- package/dist/src/mcp/oauth-token-storage.test.js.map +1 -1
- package/dist/src/mcp/oauth-utils.d.ts +9 -1
- package/dist/src/mcp/oauth-utils.js +42 -27
- package/dist/src/mcp/oauth-utils.js.map +1 -1
- package/dist/src/mcp/oauth-utils.test.js +41 -1
- package/dist/src/mcp/oauth-utils.test.js.map +1 -1
- package/dist/src/mcp/sa-impersonation-provider.d.ts +33 -0
- package/dist/src/mcp/sa-impersonation-provider.js +130 -0
- package/dist/src/mcp/sa-impersonation-provider.js.map +1 -0
- package/dist/src/mcp/sa-impersonation-provider.test.d.ts +6 -0
- package/dist/src/mcp/sa-impersonation-provider.test.js +117 -0
- package/dist/src/mcp/sa-impersonation-provider.test.js.map +1 -0
- package/dist/src/mcp/token-storage/base-token-storage.d.ts +19 -0
- package/dist/src/mcp/token-storage/base-token-storage.js +36 -0
- package/dist/src/mcp/token-storage/base-token-storage.js.map +1 -0
- package/dist/src/mcp/token-storage/base-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/token-storage/base-token-storage.test.js +160 -0
- package/dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -0
- package/dist/src/mcp/token-storage/file-token-storage.d.ts +24 -0
- package/dist/src/mcp/token-storage/file-token-storage.js +144 -0
- package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -0
- package/dist/src/mcp/token-storage/file-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/token-storage/file-token-storage.test.js +235 -0
- package/dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.d.ts +23 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.js +78 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.js.map +1 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js +193 -0
- package/dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +1 -0
- package/dist/src/mcp/token-storage/index.d.ts +11 -0
- package/dist/src/mcp/token-storage/index.js +12 -0
- package/dist/src/mcp/token-storage/index.js.map +1 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.d.ts +31 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.js +190 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js +254 -0
- package/dist/src/mcp/token-storage/keychain-token-storage.test.js.map +1 -0
- package/dist/src/mcp/token-storage/types.d.ts +38 -0
- package/dist/src/mcp/token-storage/types.js +11 -0
- package/dist/src/mcp/token-storage/types.js.map +1 -0
- package/dist/src/output/json-formatter.d.ts +11 -0
- package/dist/src/output/json-formatter.js +30 -0
- package/dist/src/output/json-formatter.js.map +1 -0
- package/dist/src/output/json-formatter.test.d.ts +6 -0
- package/dist/src/output/json-formatter.test.js +266 -0
- package/dist/src/output/json-formatter.test.js.map +1 -0
- package/dist/src/output/types.d.ts +20 -0
- package/dist/src/output/types.js +11 -0
- package/dist/src/output/types.js.map +1 -0
- package/dist/src/policy/index.d.ts +7 -0
- package/dist/src/policy/index.js +8 -0
- package/dist/src/policy/index.js.map +1 -0
- package/dist/src/policy/policy-engine.d.ts +30 -0
- package/dist/src/policy/policy-engine.js +92 -0
- package/dist/src/policy/policy-engine.js.map +1 -0
- package/dist/src/policy/policy-engine.test.d.ts +6 -0
- package/dist/src/policy/policy-engine.test.js +515 -0
- package/dist/src/policy/policy-engine.test.js.map +1 -0
- package/dist/src/policy/stable-stringify.d.ts +58 -0
- package/dist/src/policy/stable-stringify.js +122 -0
- package/dist/src/policy/stable-stringify.js.map +1 -0
- package/dist/src/policy/types.d.ts +47 -0
- package/dist/src/policy/types.js +12 -0
- package/dist/src/policy/types.js.map +1 -0
- package/dist/src/prompts/mcp-prompts.d.ts +2 -2
- package/dist/src/prompts/prompt-registry.d.ts +1 -1
- package/dist/src/routing/modelRouterService.d.ts +23 -0
- package/dist/src/routing/modelRouterService.js +70 -0
- package/dist/src/routing/modelRouterService.js.map +1 -0
- package/dist/src/routing/modelRouterService.test.d.ts +6 -0
- package/dist/src/routing/modelRouterService.test.js +98 -0
- package/dist/src/routing/modelRouterService.test.js.map +1 -0
- package/dist/src/routing/routingStrategy.d.ts +62 -0
- package/dist/src/routing/routingStrategy.js +7 -0
- package/dist/src/routing/routingStrategy.js.map +1 -0
- package/dist/src/routing/strategies/classifierStrategy.d.ts +12 -0
- package/dist/src/routing/strategies/classifierStrategy.js +173 -0
- package/dist/src/routing/strategies/classifierStrategy.js.map +1 -0
- package/dist/src/routing/strategies/classifierStrategy.test.d.ts +6 -0
- package/dist/src/routing/strategies/classifierStrategy.test.js +192 -0
- package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -0
- package/dist/src/routing/strategies/compositeStrategy.d.ts +26 -0
- package/dist/src/routing/strategies/compositeStrategy.js +68 -0
- package/dist/src/routing/strategies/compositeStrategy.js.map +1 -0
- package/dist/src/routing/strategies/compositeStrategy.test.d.ts +6 -0
- package/dist/src/routing/strategies/compositeStrategy.test.js +123 -0
- package/dist/src/routing/strategies/compositeStrategy.test.js.map +1 -0
- package/dist/src/routing/strategies/defaultStrategy.d.ts +12 -0
- package/dist/src/routing/strategies/defaultStrategy.js +20 -0
- package/dist/src/routing/strategies/defaultStrategy.js.map +1 -0
- package/dist/src/routing/strategies/defaultStrategy.test.d.ts +6 -0
- package/dist/src/routing/strategies/defaultStrategy.test.js +26 -0
- package/dist/src/routing/strategies/defaultStrategy.test.js.map +1 -0
- package/dist/src/routing/strategies/fallbackStrategy.d.ts +12 -0
- package/dist/src/routing/strategies/fallbackStrategy.js +25 -0
- package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -0
- package/dist/src/routing/strategies/fallbackStrategy.test.d.ts +6 -0
- package/dist/src/routing/strategies/fallbackStrategy.test.js +55 -0
- package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -0
- package/dist/src/routing/strategies/overrideStrategy.d.ts +15 -0
- package/dist/src/routing/strategies/overrideStrategy.js +28 -0
- package/dist/src/routing/strategies/overrideStrategy.js.map +1 -0
- package/dist/src/routing/strategies/overrideStrategy.test.d.ts +6 -0
- package/dist/src/routing/strategies/overrideStrategy.test.js +42 -0
- package/dist/src/routing/strategies/overrideStrategy.test.js.map +1 -0
- package/dist/src/services/chatRecordingService.d.ts +8 -14
- package/dist/src/services/chatRecordingService.js +33 -21
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +69 -25
- package/dist/src/services/chatRecordingService.test.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.d.ts +10 -0
- package/dist/src/services/fileDiscoveryService.js +32 -18
- package/dist/src/services/fileDiscoveryService.js.map +1 -1
- package/dist/src/services/fileDiscoveryService.test.js +3 -3
- package/dist/src/services/fileDiscoveryService.test.js.map +1 -1
- package/dist/src/services/fileSystemService.d.ts +9 -0
- package/dist/src/services/fileSystemService.js +12 -1
- package/dist/src/services/fileSystemService.js.map +1 -1
- package/dist/src/services/fileSystemService.test.js +1 -1
- package/dist/src/services/fileSystemService.test.js.map +1 -1
- package/dist/src/services/gitService.d.ts +3 -1
- package/dist/src/services/gitService.js +30 -24
- package/dist/src/services/gitService.js.map +1 -1
- package/dist/src/services/gitService.test.js +30 -37
- package/dist/src/services/gitService.test.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +8 -2
- package/dist/src/services/loopDetectionService.js +64 -24
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +64 -13
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +36 -2
- package/dist/src/services/shellExecutionService.js +238 -47
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +197 -58
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/telemetry/activity-detector.d.ts +41 -0
- package/dist/src/telemetry/activity-detector.js +61 -0
- package/dist/src/telemetry/activity-detector.js.map +1 -0
- package/dist/src/telemetry/activity-detector.test.d.ts +6 -0
- package/dist/src/telemetry/activity-detector.test.js +136 -0
- package/dist/src/telemetry/activity-detector.test.js.map +1 -0
- package/dist/src/telemetry/activity-types.d.ts +19 -0
- package/dist/src/telemetry/activity-types.js +21 -0
- package/dist/src/telemetry/activity-types.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +34 -4
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +322 -15
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +321 -11
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +51 -2
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +124 -2
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/config.d.ts +31 -0
- package/dist/src/telemetry/config.js +76 -0
- package/dist/src/telemetry/config.js.map +1 -0
- package/dist/src/telemetry/config.test.d.ts +6 -0
- package/dist/src/telemetry/config.test.js +124 -0
- package/dist/src/telemetry/config.test.js.map +1 -0
- package/dist/src/telemetry/constants.d.ts +17 -7
- package/dist/src/telemetry/constants.js +18 -7
- package/dist/src/telemetry/constants.js.map +1 -1
- package/dist/src/telemetry/file-exporters.d.ts +5 -4
- package/dist/src/telemetry/file-exporters.js +1 -1
- package/dist/src/telemetry/file-exporters.js.map +1 -1
- package/dist/src/telemetry/gcp-exporters.d.ts +34 -0
- package/dist/src/telemetry/gcp-exporters.js +117 -0
- package/dist/src/telemetry/gcp-exporters.js.map +1 -0
- package/dist/src/telemetry/gcp-exporters.test.d.ts +6 -0
- package/dist/src/telemetry/gcp-exporters.test.js +318 -0
- package/dist/src/telemetry/gcp-exporters.test.js.map +1 -0
- package/dist/src/telemetry/high-water-mark-tracker.d.ts +43 -0
- package/dist/src/telemetry/high-water-mark-tracker.js +88 -0
- package/dist/src/telemetry/high-water-mark-tracker.js.map +1 -0
- package/dist/src/telemetry/high-water-mark-tracker.test.d.ts +6 -0
- package/dist/src/telemetry/high-water-mark-tracker.test.js +152 -0
- package/dist/src/telemetry/high-water-mark-tracker.test.js.map +1 -0
- package/dist/src/telemetry/index.d.ts +12 -2
- package/dist/src/telemetry/index.js +16 -2
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +17 -2
- package/dist/src/telemetry/loggers.js +316 -14
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.circular.js +3 -3
- package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +452 -48
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +323 -12
- package/dist/src/telemetry/metrics.js +464 -83
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +583 -38
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/rate-limiter.d.ts +48 -0
- package/dist/src/telemetry/rate-limiter.js +100 -0
- package/dist/src/telemetry/rate-limiter.js.map +1 -0
- package/dist/src/telemetry/rate-limiter.test.d.ts +6 -0
- package/dist/src/telemetry/rate-limiter.test.js +207 -0
- package/dist/src/telemetry/rate-limiter.test.js.map +1 -0
- package/dist/src/telemetry/sdk.d.ts +1 -1
- package/dist/src/telemetry/sdk.js +20 -2
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/sdk.test.js +108 -0
- package/dist/src/telemetry/sdk.test.js.map +1 -1
- package/dist/src/telemetry/telemetry-utils.d.ts +6 -0
- package/dist/src/telemetry/telemetry-utils.js +14 -0
- package/dist/src/telemetry/telemetry-utils.js.map +1 -0
- package/dist/src/telemetry/telemetry-utils.test.d.ts +6 -0
- package/dist/src/telemetry/telemetry-utils.test.js +40 -0
- package/dist/src/telemetry/telemetry-utils.test.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +136 -8
- package/dist/src/telemetry/types.js +233 -11
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.d.ts +3 -3
- package/dist/src/telemetry/uiTelemetry.js +7 -8
- package/dist/src/telemetry/uiTelemetry.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js +33 -29
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
- package/dist/src/test-utils/config.d.ts +2 -1
- package/dist/src/test-utils/config.js.map +1 -1
- package/dist/src/test-utils/index.d.ts +6 -0
- package/dist/src/test-utils/index.js +7 -0
- package/dist/src/test-utils/index.js.map +1 -0
- package/dist/src/test-utils/mock-tool.d.ts +66 -0
- package/dist/src/test-utils/{tools.js → mock-tool.js} +45 -29
- package/dist/src/test-utils/mock-tool.js.map +1 -0
- package/dist/src/test-utils/mockWorkspaceContext.d.ts +1 -1
- package/dist/src/tools/diffOptions.d.ts +1 -1
- package/dist/src/tools/diffOptions.js +21 -13
- package/dist/src/tools/diffOptions.js.map +1 -1
- package/dist/src/tools/diffOptions.test.js +58 -22
- package/dist/src/tools/diffOptions.test.js.map +1 -1
- package/dist/src/tools/edit.d.ts +6 -5
- package/dist/src/tools/edit.js +58 -40
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +192 -16
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.d.ts +7 -2
- package/dist/src/tools/glob.js +42 -23
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +80 -4
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/grep.d.ts +3 -2
- package/dist/src/tools/grep.js +35 -15
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +26 -3
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.d.ts +3 -2
- package/dist/src/tools/ls.js +31 -39
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +145 -280
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.d.ts +8 -6
- package/dist/src/tools/mcp-client-manager.js +13 -4
- package/dist/src/tools/mcp-client-manager.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.test.js +20 -1
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
- package/dist/src/tools/mcp-client.d.ts +18 -21
- package/dist/src/tools/mcp-client.js +87 -120
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +32 -152
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +6 -4
- package/dist/src/tools/mcp-tool.js +51 -13
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/mcp-tool.test.js +166 -12
- package/dist/src/tools/mcp-tool.test.js.map +1 -1
- package/dist/src/tools/memoryTool.d.ts +3 -2
- package/dist/src/tools/memoryTool.js +14 -37
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +16 -4
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/message-bus-integration.test.d.ts +6 -0
- package/dist/src/tools/message-bus-integration.test.js +183 -0
- package/dist/src/tools/message-bus-integration.test.js.map +1 -0
- package/dist/src/tools/modifiable-tool.d.ts +2 -2
- package/dist/src/tools/modifiable-tool.js +3 -3
- package/dist/src/tools/modifiable-tool.js.map +1 -1
- package/dist/src/tools/modifiable-tool.test.js +4 -4
- package/dist/src/tools/modifiable-tool.test.js.map +1 -1
- package/dist/src/tools/read-file.d.ts +3 -2
- package/dist/src/tools/read-file.js +23 -38
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +38 -6
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +3 -2
- package/dist/src/tools/read-many-files.js +52 -107
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +64 -11
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.d.ts +55 -0
- package/dist/src/tools/ripGrep.js +393 -0
- package/dist/src/tools/ripGrep.js.map +1 -0
- package/dist/src/tools/ripGrep.test.d.ts +6 -0
- package/dist/src/tools/ripGrep.test.js +976 -0
- package/dist/src/tools/ripGrep.test.js.map +1 -0
- package/dist/src/tools/shell.d.ts +13 -2
- package/dist/src/tools/shell.js +42 -32
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +57 -75
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +91 -0
- package/dist/src/tools/smart-edit.js +702 -0
- package/dist/src/tools/smart-edit.js.map +1 -0
- package/dist/src/tools/smart-edit.test.d.ts +6 -0
- package/dist/src/tools/smart-edit.test.js +542 -0
- package/dist/src/tools/smart-edit.test.js.map +1 -0
- package/dist/src/tools/tool-error.d.ts +18 -1
- package/dist/src/tools/tool-error.js +27 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +10 -4
- package/dist/src/tools/tool-registry.js +20 -7
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +93 -10
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +33 -16
- package/dist/src/tools/tools.js +115 -5
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/tools.test.js +1 -2
- package/dist/src/tools/tools.test.js.map +1 -1
- package/dist/src/tools/web-fetch.d.ts +3 -2
- package/dist/src/tools/web-fetch.js +14 -10
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +55 -16
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +4 -3
- package/dist/src/tools/web-search.js +31 -8
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/web-search.test.js +69 -1
- package/dist/src/tools/web-search.test.js.map +1 -1
- package/dist/src/tools/write-file.d.ts +4 -3
- package/dist/src/tools/write-file.js +17 -18
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +108 -24
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/tools/write-todos.d.ts +25 -0
- package/dist/src/tools/write-todos.js +150 -0
- package/dist/src/tools/write-todos.js.map +1 -0
- package/dist/src/tools/write-todos.test.d.ts +6 -0
- package/dist/src/tools/write-todos.test.js +89 -0
- package/dist/src/tools/write-todos.test.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.d.ts +2 -2
- package/dist/src/utils/bfsFileSearch.js +13 -7
- package/dist/src/utils/bfsFileSearch.js.map +1 -1
- package/dist/src/utils/bfsFileSearch.test.js +3 -3
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
- package/dist/src/utils/editCorrector.d.ts +9 -8
- package/dist/src/utils/editCorrector.js +62 -19
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +33 -82
- package/dist/src/utils/editCorrector.test.js.map +1 -1
- package/dist/src/utils/editor.js +32 -45
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +62 -76
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/environmentContext.d.ts +2 -2
- package/dist/src/utils/errorParsing.js +2 -2
- package/dist/src/utils/errorParsing.js.map +1 -1
- package/dist/src/utils/errorParsing.test.js +7 -7
- package/dist/src/utils/errorParsing.test.js.map +1 -1
- package/dist/src/utils/errorReporting.d.ts +1 -1
- package/dist/src/utils/errors.d.ts +25 -0
- package/dist/src/utils/errors.js +42 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/fetch.js +1 -1
- package/dist/src/utils/fetch.js.map +1 -1
- package/dist/src/utils/fileUtils.d.ts +24 -12
- package/dist/src/utils/fileUtils.js +170 -79
- package/dist/src/utils/fileUtils.js.map +1 -1
- package/dist/src/utils/fileUtils.test.js +347 -29
- package/dist/src/utils/fileUtils.test.js.map +1 -1
- package/dist/src/utils/filesearch/crawler.d.ts +1 -1
- package/dist/src/utils/filesearch/crawler.test.js +2 -2
- package/dist/src/utils/filesearch/crawler.test.js.map +1 -1
- package/dist/src/utils/filesearch/fileSearch.d.ts +1 -0
- package/dist/src/utils/filesearch/fileSearch.js +14 -9
- package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
- package/dist/src/utils/filesearch/fileSearch.test.js +90 -0
- package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -1
- package/dist/src/utils/flashFallback.test.d.ts +6 -0
- package/dist/src/utils/{flashFallback.integration.test.js → flashFallback.test.js} +33 -29
- package/dist/src/utils/flashFallback.test.js.map +1 -0
- package/dist/src/utils/geminiIgnoreParser.d.ts +18 -0
- package/dist/src/utils/geminiIgnoreParser.js +61 -0
- package/dist/src/utils/geminiIgnoreParser.js.map +1 -0
- package/dist/src/utils/geminiIgnoreParser.test.d.ts +6 -0
- package/dist/src/utils/geminiIgnoreParser.test.js +50 -0
- package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -0
- package/dist/src/utils/generateContentResponseUtilities.d.ts +1 -2
- package/dist/src/utils/generateContentResponseUtilities.js +1 -13
- package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
- package/dist/src/utils/generateContentResponseUtilities.test.js +2 -40
- package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
- package/dist/src/utils/getFolderStructure.d.ts +2 -2
- package/dist/src/utils/getFolderStructure.js +3 -3
- package/dist/src/utils/getFolderStructure.js.map +1 -1
- package/dist/src/utils/getFolderStructure.test.js +4 -4
- package/dist/src/utils/getFolderStructure.test.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.d.ts +3 -7
- package/dist/src/utils/gitIgnoreParser.js +126 -35
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +69 -38
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/gitUtils.js +2 -2
- package/dist/src/utils/gitUtils.js.map +1 -1
- package/dist/src/utils/ignorePatterns.d.ts +103 -0
- package/dist/src/utils/ignorePatterns.js +220 -0
- package/dist/src/utils/ignorePatterns.js.map +1 -0
- package/dist/src/utils/ignorePatterns.test.d.ts +6 -0
- package/dist/src/utils/ignorePatterns.test.js +250 -0
- package/dist/src/utils/ignorePatterns.test.js.map +1 -0
- package/dist/src/utils/installationManager.d.ts +16 -0
- package/dist/src/utils/installationManager.js +50 -0
- package/dist/src/utils/installationManager.js.map +1 -0
- package/dist/src/utils/installationManager.test.d.ts +6 -0
- package/dist/src/utils/installationManager.test.js +83 -0
- package/dist/src/utils/installationManager.test.js.map +1 -0
- package/dist/src/utils/language-detection.d.ts +6 -0
- package/dist/src/utils/language-detection.js +101 -0
- package/dist/src/utils/language-detection.js.map +1 -0
- package/dist/src/utils/llm-edit-fixer.d.ts +26 -0
- package/dist/src/utils/llm-edit-fixer.js +131 -0
- package/dist/src/utils/llm-edit-fixer.js.map +1 -0
- package/dist/src/utils/llm-edit-fixer.test.d.ts +6 -0
- package/dist/src/utils/llm-edit-fixer.test.js +186 -0
- package/dist/src/utils/llm-edit-fixer.test.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.d.ts +7 -6
- package/dist/src/utils/memoryDiscovery.js +68 -33
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +88 -26
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.js +15 -22
- package/dist/src/utils/memoryImportProcessor.js.map +1 -1
- package/dist/src/utils/memoryImportProcessor.test.js +16 -141
- package/dist/src/utils/memoryImportProcessor.test.js.map +1 -1
- package/dist/src/utils/messageInspectors.d.ts +1 -1
- package/dist/src/utils/nextSpeakerChecker.d.ts +3 -3
- package/dist/src/utils/nextSpeakerChecker.js +8 -2
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.test.js +75 -64
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
- package/dist/src/utils/partUtils.d.ts +22 -1
- package/dist/src/utils/partUtils.js +68 -0
- package/dist/src/utils/partUtils.js.map +1 -1
- package/dist/src/utils/partUtils.test.js +112 -1
- package/dist/src/utils/partUtils.test.js.map +1 -1
- package/dist/src/utils/pathReader.d.ts +17 -0
- package/dist/src/utils/pathReader.js +92 -0
- package/dist/src/utils/pathReader.js.map +1 -0
- package/dist/src/utils/pathReader.test.d.ts +6 -0
- package/dist/src/utils/pathReader.test.js +363 -0
- package/dist/src/utils/pathReader.test.js.map +1 -0
- package/dist/src/utils/paths.d.ts +0 -17
- package/dist/src/utils/paths.js +2 -28
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/promptIdContext.d.ts +7 -0
- package/dist/src/utils/promptIdContext.js +8 -0
- package/dist/src/utils/promptIdContext.js.map +1 -0
- package/dist/src/utils/quotaErrorDetection.d.ts +1 -1
- package/dist/src/utils/retry.d.ts +3 -1
- package/dist/src/utils/retry.js +20 -5
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +35 -3
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/src/utils/schemaValidator.js +15 -1
- package/dist/src/utils/schemaValidator.js.map +1 -1
- package/dist/src/utils/schemaValidator.test.d.ts +6 -0
- package/dist/src/utils/schemaValidator.test.js +113 -0
- package/dist/src/utils/schemaValidator.test.js.map +1 -0
- package/dist/src/utils/session.js +1 -1
- package/dist/src/utils/session.js.map +1 -1
- package/dist/src/utils/shell-utils.d.ts +6 -1
- package/dist/src/utils/shell-utils.js +51 -30
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +9 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/summarizer.d.ts +2 -2
- package/dist/src/utils/summarizer.test.js.map +1 -1
- package/dist/src/utils/systemEncoding.js +2 -2
- package/dist/src/utils/systemEncoding.js.map +1 -1
- package/dist/src/utils/systemEncoding.test.js +2 -2
- package/dist/src/utils/systemEncoding.test.js.map +1 -1
- package/dist/src/utils/terminalSerializer.d.ts +25 -0
- package/dist/src/utils/terminalSerializer.js +432 -0
- package/dist/src/utils/terminalSerializer.js.map +1 -0
- package/dist/src/utils/terminalSerializer.test.d.ts +6 -0
- package/dist/src/utils/terminalSerializer.test.js +176 -0
- package/dist/src/utils/terminalSerializer.test.js.map +1 -0
- package/dist/src/utils/textUtils.d.ts +5 -0
- package/dist/src/utils/textUtils.js +14 -0
- package/dist/src/utils/textUtils.js.map +1 -1
- package/dist/src/utils/textUtils.test.d.ts +6 -0
- package/dist/src/utils/textUtils.test.js +59 -0
- package/dist/src/utils/textUtils.test.js.map +1 -0
- package/dist/src/utils/thoughtUtils.d.ts +21 -0
- package/dist/src/utils/thoughtUtils.js +39 -0
- package/dist/src/utils/thoughtUtils.js.map +1 -0
- package/dist/src/utils/thoughtUtils.test.d.ts +6 -0
- package/dist/src/utils/thoughtUtils.test.js +78 -0
- package/dist/src/utils/thoughtUtils.test.js.map +1 -0
- package/dist/src/utils/tool-utils.d.ts +19 -0
- package/dist/src/utils/tool-utils.js +58 -0
- package/dist/src/utils/tool-utils.js.map +1 -0
- package/dist/src/utils/tool-utils.test.d.ts +6 -0
- package/dist/src/utils/tool-utils.test.js +61 -0
- package/dist/src/utils/tool-utils.test.js.map +1 -0
- package/dist/src/utils/userAccountManager.d.ts +20 -0
- package/dist/src/utils/userAccountManager.js +114 -0
- package/dist/src/utils/userAccountManager.js.map +1 -0
- package/dist/src/utils/userAccountManager.test.d.ts +6 -0
- package/dist/src/utils/{user_account.test.js → userAccountManager.test.js} +33 -30
- package/dist/src/utils/userAccountManager.test.js.map +1 -0
- package/dist/src/utils/workspaceContext.js +13 -7
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/dist/src/utils/workspaceContext.test.js +41 -16
- package/dist/src/utils/workspaceContext.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -9
- package/dist/src/core/modelCheck.d.ts +0 -14
- package/dist/src/core/modelCheck.js +0 -62
- package/dist/src/core/modelCheck.js.map +0 -1
- package/dist/src/test-utils/tools.d.ts +0 -44
- package/dist/src/test-utils/tools.js.map +0 -1
- package/dist/src/utils/flashFallback.integration.test.js.map +0 -1
- package/dist/src/utils/user_account.d.ts +0 -9
- package/dist/src/utils/user_account.js +0 -109
- package/dist/src/utils/user_account.js.map +0 -1
- package/dist/src/utils/user_account.test.js.map +0 -1
- package/dist/src/utils/user_id.d.ts +0 -11
- package/dist/src/utils/user_id.js +0 -49
- package/dist/src/utils/user_id.js.map +0 -1
- package/dist/src/utils/user_id.test.js +0 -21
- package/dist/src/utils/user_id.test.js.map +0 -1
- /package/dist/src/{utils/flashFallback.integration.test.d.ts → agents/executor.test.d.ts} +0 -0
- /package/dist/src/{utils/user_account.test.d.ts → agents/invocation.test.d.ts} +0 -0
- /package/dist/src/{utils/user_id.test.d.ts → agents/registry.test.d.ts} +0 -0
|
@@ -5,48 +5,54 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as path from 'node:path';
|
|
7
7
|
import process from 'node:process';
|
|
8
|
-
import { AuthType, createContentGeneratorConfig, } from '../core/contentGenerator.js';
|
|
8
|
+
import { AuthType, createContentGenerator, createContentGeneratorConfig, } from '../core/contentGenerator.js';
|
|
9
9
|
import { PromptRegistry } from '../prompts/prompt-registry.js';
|
|
10
10
|
import { ToolRegistry } from '../tools/tool-registry.js';
|
|
11
11
|
import { LSTool } from '../tools/ls.js';
|
|
12
12
|
import { ReadFileTool } from '../tools/read-file.js';
|
|
13
13
|
import { GrepTool } from '../tools/grep.js';
|
|
14
|
+
import { canUseRipgrep, RipGrepTool } from '../tools/ripGrep.js';
|
|
14
15
|
import { GlobTool } from '../tools/glob.js';
|
|
15
16
|
import { EditTool } from '../tools/edit.js';
|
|
17
|
+
import { SmartEditTool } from '../tools/smart-edit.js';
|
|
16
18
|
import { ShellTool } from '../tools/shell.js';
|
|
17
19
|
import { WriteFileTool } from '../tools/write-file.js';
|
|
18
20
|
import { WebFetchTool } from '../tools/web-fetch.js';
|
|
19
21
|
import { ReadManyFilesTool } from '../tools/read-many-files.js';
|
|
20
|
-
import { MemoryTool, setGeminiMdFilename
|
|
22
|
+
import { MemoryTool, setGeminiMdFilename } from '../tools/memoryTool.js';
|
|
21
23
|
import { WebSearchTool } from '../tools/web-search.js';
|
|
22
24
|
import { GeminiClient } from '../core/client.js';
|
|
25
|
+
import { BaseLlmClient } from '../core/baseLlmClient.js';
|
|
23
26
|
import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
|
24
27
|
import { GitService } from '../services/gitService.js';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
28
|
+
import { initializeTelemetry, DEFAULT_TELEMETRY_TARGET, DEFAULT_OTLP_ENDPOINT, uiTelemetryService, } from '../telemetry/index.js';
|
|
29
|
+
import { tokenLimit } from '../core/tokenLimits.js';
|
|
30
|
+
import { StartSessionEvent } from '../telemetry/index.js';
|
|
27
31
|
import { DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_GEMINI_FLASH_MODEL, } from './models.js';
|
|
28
32
|
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
+
import { ideContextStore } from '../ide/ideContext.js';
|
|
34
|
+
import { WriteTodosTool } from '../tools/write-todos.js';
|
|
35
|
+
import { StandardFileSystemService } from '../services/fileSystemService.js';
|
|
36
|
+
import { logCliConfiguration, logRipgrepFallback, } from '../telemetry/loggers.js';
|
|
37
|
+
import { RipgrepFallbackEvent } from '../telemetry/types.js';
|
|
38
|
+
import { ModelRouterService } from '../routing/modelRouterService.js';
|
|
39
|
+
import { OutputFormat } from '../output/types.js';
|
|
33
40
|
import { WorkspaceContext } from '../utils/workspaceContext.js';
|
|
41
|
+
import { Storage } from './storage.js';
|
|
42
|
+
import { FileExclusions } from '../utils/ignorePatterns.js';
|
|
43
|
+
import { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
44
|
+
import { PolicyEngine } from '../policy/policy-engine.js';
|
|
45
|
+
import { ProxyAgent, setGlobalDispatcher } from 'undici';
|
|
34
46
|
export var ApprovalMode;
|
|
35
47
|
(function (ApprovalMode) {
|
|
36
48
|
ApprovalMode["DEFAULT"] = "default";
|
|
37
49
|
ApprovalMode["AUTO_EDIT"] = "autoEdit";
|
|
38
50
|
ApprovalMode["YOLO"] = "yolo";
|
|
39
51
|
})(ApprovalMode || (ApprovalMode = {}));
|
|
40
|
-
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
// For all other files
|
|
46
|
-
export const DEFAULT_FILE_FILTERING_OPTIONS = {
|
|
47
|
-
respectGitIgnore: true,
|
|
48
|
-
respectGeminiIgnore: true,
|
|
49
|
-
};
|
|
52
|
+
import { DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, DEFAULT_FILE_FILTERING_OPTIONS, } from './constants.js';
|
|
53
|
+
export { DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, DEFAULT_FILE_FILTERING_OPTIONS, };
|
|
54
|
+
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4_000_000;
|
|
55
|
+
export const DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1000;
|
|
50
56
|
export class MCPServerConfig {
|
|
51
57
|
command;
|
|
52
58
|
args;
|
|
@@ -64,6 +70,8 @@ export class MCPServerConfig {
|
|
|
64
70
|
extensionName;
|
|
65
71
|
oauth;
|
|
66
72
|
authProviderType;
|
|
73
|
+
targetAudience;
|
|
74
|
+
targetServiceAccount;
|
|
67
75
|
constructor(
|
|
68
76
|
// For stdio transport
|
|
69
77
|
command, args, env, cwd,
|
|
@@ -78,7 +86,12 @@ export class MCPServerConfig {
|
|
|
78
86
|
// Metadata
|
|
79
87
|
description, includeTools, excludeTools, extensionName,
|
|
80
88
|
// OAuth configuration
|
|
81
|
-
oauth, authProviderType
|
|
89
|
+
oauth, authProviderType,
|
|
90
|
+
// Service Account Configuration
|
|
91
|
+
/* targetAudience format: CLIENT_ID.apps.googleusercontent.com */
|
|
92
|
+
targetAudience,
|
|
93
|
+
/* targetServiceAccount format: <service-account-name>@<project-num>.iam.gserviceaccount.com */
|
|
94
|
+
targetServiceAccount) {
|
|
82
95
|
this.command = command;
|
|
83
96
|
this.args = args;
|
|
84
97
|
this.env = env;
|
|
@@ -95,12 +108,15 @@ export class MCPServerConfig {
|
|
|
95
108
|
this.extensionName = extensionName;
|
|
96
109
|
this.oauth = oauth;
|
|
97
110
|
this.authProviderType = authProviderType;
|
|
111
|
+
this.targetAudience = targetAudience;
|
|
112
|
+
this.targetServiceAccount = targetServiceAccount;
|
|
98
113
|
}
|
|
99
114
|
}
|
|
100
115
|
export var AuthProviderType;
|
|
101
116
|
(function (AuthProviderType) {
|
|
102
117
|
AuthProviderType["DYNAMIC_DISCOVERY"] = "dynamic_discovery";
|
|
103
118
|
AuthProviderType["GOOGLE_CREDENTIALS"] = "google_credentials";
|
|
119
|
+
AuthProviderType["SERVICE_ACCOUNT_IMPERSONATION"] = "service_account_impersonation";
|
|
104
120
|
})(AuthProviderType || (AuthProviderType = {}));
|
|
105
121
|
export class Config {
|
|
106
122
|
toolRegistry;
|
|
@@ -108,6 +124,7 @@ export class Config {
|
|
|
108
124
|
sessionId;
|
|
109
125
|
fileSystemService;
|
|
110
126
|
contentGeneratorConfig;
|
|
127
|
+
contentGenerator;
|
|
111
128
|
embeddingModel;
|
|
112
129
|
sandbox;
|
|
113
130
|
targetDir;
|
|
@@ -116,6 +133,7 @@ export class Config {
|
|
|
116
133
|
question;
|
|
117
134
|
fullContext;
|
|
118
135
|
coreTools;
|
|
136
|
+
allowedTools;
|
|
119
137
|
excludeTools;
|
|
120
138
|
toolDiscoveryCommand;
|
|
121
139
|
toolCallCommand;
|
|
@@ -129,6 +147,8 @@ export class Config {
|
|
|
129
147
|
telemetrySettings;
|
|
130
148
|
usageStatisticsEnabled;
|
|
131
149
|
geminiClient;
|
|
150
|
+
baseLlmClient;
|
|
151
|
+
modelRouterService;
|
|
132
152
|
fileFiltering;
|
|
133
153
|
fileDiscoveryService = null;
|
|
134
154
|
gitService = undefined;
|
|
@@ -142,13 +162,12 @@ export class Config {
|
|
|
142
162
|
folderTrustFeature;
|
|
143
163
|
folderTrust;
|
|
144
164
|
ideMode;
|
|
145
|
-
ideClient;
|
|
146
165
|
inFallbackMode = false;
|
|
147
166
|
maxSessionTurns;
|
|
148
167
|
listExtensions;
|
|
149
168
|
_extensions;
|
|
150
169
|
_blockedMcpServers;
|
|
151
|
-
|
|
170
|
+
fallbackModelHandler;
|
|
152
171
|
quotaErrorOccurred = false;
|
|
153
172
|
summarizeToolOutput;
|
|
154
173
|
experimentalZedIntegration = false;
|
|
@@ -156,9 +175,26 @@ export class Config {
|
|
|
156
175
|
chatCompression;
|
|
157
176
|
interactive;
|
|
158
177
|
trustedFolder;
|
|
178
|
+
useRipgrep;
|
|
159
179
|
shouldUseNodePtyShell;
|
|
160
180
|
skipNextSpeakerCheck;
|
|
181
|
+
shellExecutionConfig;
|
|
182
|
+
extensionManagement = true;
|
|
183
|
+
enablePromptCompletion = false;
|
|
184
|
+
truncateToolOutputThreshold;
|
|
185
|
+
truncateToolOutputLines;
|
|
186
|
+
enableToolOutputTruncation;
|
|
161
187
|
initialized = false;
|
|
188
|
+
storage;
|
|
189
|
+
fileExclusions;
|
|
190
|
+
eventEmitter;
|
|
191
|
+
useSmartEdit;
|
|
192
|
+
useWriteTodos;
|
|
193
|
+
messageBus;
|
|
194
|
+
policyEngine;
|
|
195
|
+
outputSettings;
|
|
196
|
+
useModelRouter;
|
|
197
|
+
enableMessageBusIntegration;
|
|
162
198
|
constructor(params) {
|
|
163
199
|
this.sessionId = params.sessionId;
|
|
164
200
|
this.embeddingModel =
|
|
@@ -171,6 +207,7 @@ export class Config {
|
|
|
171
207
|
this.question = params.question;
|
|
172
208
|
this.fullContext = params.fullContext ?? false;
|
|
173
209
|
this.coreTools = params.coreTools;
|
|
210
|
+
this.allowedTools = params.allowedTools;
|
|
174
211
|
this.excludeTools = params.excludeTools;
|
|
175
212
|
this.toolDiscoveryCommand = params.toolDiscoveryCommand;
|
|
176
213
|
this.toolCallCommand = params.toolCallCommand;
|
|
@@ -188,12 +225,14 @@ export class Config {
|
|
|
188
225
|
otlpProtocol: params.telemetry?.otlpProtocol,
|
|
189
226
|
logPrompts: params.telemetry?.logPrompts ?? true,
|
|
190
227
|
outfile: params.telemetry?.outfile,
|
|
228
|
+
useCollector: params.telemetry?.useCollector,
|
|
191
229
|
};
|
|
192
230
|
this.usageStatisticsEnabled = params.usageStatisticsEnabled ?? true;
|
|
193
231
|
this.fileFiltering = {
|
|
194
232
|
respectGitIgnore: params.fileFiltering?.respectGitIgnore ?? true,
|
|
195
233
|
respectGeminiIgnore: params.fileFiltering?.respectGeminiIgnore ?? true,
|
|
196
234
|
enableRecursiveFileSearch: params.fileFiltering?.enableRecursiveFileSearch ?? true,
|
|
235
|
+
disableFuzzySearch: params.fileFiltering?.disableFuzzySearch ?? false,
|
|
197
236
|
};
|
|
198
237
|
this.checkpointing = params.checkpointing ?? false;
|
|
199
238
|
this.proxy = params.proxy;
|
|
@@ -213,21 +252,52 @@ export class Config {
|
|
|
213
252
|
this.folderTrustFeature = params.folderTrustFeature ?? false;
|
|
214
253
|
this.folderTrust = params.folderTrust ?? false;
|
|
215
254
|
this.ideMode = params.ideMode ?? false;
|
|
216
|
-
this.ideClient = IdeClient.getInstance();
|
|
217
255
|
this.loadMemoryFromIncludeDirectories =
|
|
218
256
|
params.loadMemoryFromIncludeDirectories ?? false;
|
|
219
257
|
this.chatCompression = params.chatCompression;
|
|
220
258
|
this.interactive = params.interactive ?? false;
|
|
221
259
|
this.trustedFolder = params.trustedFolder;
|
|
260
|
+
this.useRipgrep = params.useRipgrep ?? true;
|
|
222
261
|
this.shouldUseNodePtyShell = params.shouldUseNodePtyShell ?? false;
|
|
223
|
-
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ??
|
|
262
|
+
this.skipNextSpeakerCheck = params.skipNextSpeakerCheck ?? true;
|
|
263
|
+
this.shellExecutionConfig = {
|
|
264
|
+
terminalWidth: params.shellExecutionConfig?.terminalWidth ?? 80,
|
|
265
|
+
terminalHeight: params.shellExecutionConfig?.terminalHeight ?? 24,
|
|
266
|
+
showColor: params.shellExecutionConfig?.showColor ?? false,
|
|
267
|
+
pager: params.shellExecutionConfig?.pager ?? 'cat',
|
|
268
|
+
};
|
|
269
|
+
this.truncateToolOutputThreshold =
|
|
270
|
+
params.truncateToolOutputThreshold ??
|
|
271
|
+
DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD;
|
|
272
|
+
this.truncateToolOutputLines =
|
|
273
|
+
params.truncateToolOutputLines ?? DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES;
|
|
274
|
+
this.enableToolOutputTruncation = params.enableToolOutputTruncation ?? true;
|
|
275
|
+
this.useSmartEdit = params.useSmartEdit ?? true;
|
|
276
|
+
this.useWriteTodos = params.useWriteTodos ?? false;
|
|
277
|
+
this.useModelRouter = params.useModelRouter ?? false;
|
|
278
|
+
this.enableMessageBusIntegration =
|
|
279
|
+
params.enableMessageBusIntegration ?? false;
|
|
280
|
+
this.extensionManagement = params.extensionManagement ?? true;
|
|
281
|
+
this.storage = new Storage(this.targetDir);
|
|
282
|
+
this.enablePromptCompletion = params.enablePromptCompletion ?? false;
|
|
283
|
+
this.fileExclusions = new FileExclusions(this);
|
|
284
|
+
this.eventEmitter = params.eventEmitter;
|
|
285
|
+
this.policyEngine = new PolicyEngine(params.policyEngineConfig);
|
|
286
|
+
this.messageBus = new MessageBus(this.policyEngine);
|
|
287
|
+
this.outputSettings = {
|
|
288
|
+
format: params.output?.format ?? OutputFormat.TEXT,
|
|
289
|
+
};
|
|
224
290
|
if (params.contextFileName) {
|
|
225
291
|
setGeminiMdFilename(params.contextFileName);
|
|
226
292
|
}
|
|
227
293
|
if (this.telemetrySettings.enabled) {
|
|
228
294
|
initializeTelemetry(this);
|
|
229
295
|
}
|
|
230
|
-
|
|
296
|
+
if (this.getProxy()) {
|
|
297
|
+
setGlobalDispatcher(new ProxyAgent(this.getProxy()));
|
|
298
|
+
}
|
|
299
|
+
this.geminiClient = new GeminiClient(this);
|
|
300
|
+
this.modelRouterService = new ModelRouterService(this);
|
|
231
301
|
}
|
|
232
302
|
/**
|
|
233
303
|
* Must only be called once, throws if called again.
|
|
@@ -244,40 +314,51 @@ export class Config {
|
|
|
244
314
|
}
|
|
245
315
|
this.promptRegistry = new PromptRegistry();
|
|
246
316
|
this.toolRegistry = await this.createToolRegistry();
|
|
317
|
+
await this.geminiClient.initialize();
|
|
318
|
+
}
|
|
319
|
+
getContentGenerator() {
|
|
320
|
+
return this.contentGenerator;
|
|
247
321
|
}
|
|
248
322
|
async refreshAuth(authMethod) {
|
|
249
|
-
// Save the current conversation history before creating a new client
|
|
250
|
-
let existingHistory = [];
|
|
251
|
-
if (this.geminiClient && this.geminiClient.isInitialized()) {
|
|
252
|
-
existingHistory = this.geminiClient.getHistory();
|
|
253
|
-
}
|
|
254
|
-
// Create new content generator config
|
|
255
|
-
const newContentGeneratorConfig = createContentGeneratorConfig(this, authMethod);
|
|
256
|
-
// Create and initialize new client in local variable first
|
|
257
|
-
const newGeminiClient = new GeminiClient(this);
|
|
258
|
-
await newGeminiClient.initialize(newContentGeneratorConfig);
|
|
259
323
|
// Vertex and Genai have incompatible encryption and sending history with
|
|
260
324
|
// throughtSignature from Genai to Vertex will fail, we need to strip them
|
|
261
|
-
|
|
262
|
-
authMethod === AuthType.LOGIN_WITH_GOOGLE
|
|
325
|
+
if (this.contentGeneratorConfig?.authType === AuthType.USE_GEMINI &&
|
|
326
|
+
authMethod === AuthType.LOGIN_WITH_GOOGLE) {
|
|
327
|
+
// Restore the conversation history to the new client
|
|
328
|
+
this.geminiClient.stripThoughtsFromHistory();
|
|
329
|
+
}
|
|
330
|
+
const newContentGeneratorConfig = createContentGeneratorConfig(this, authMethod);
|
|
331
|
+
this.contentGenerator = await createContentGenerator(newContentGeneratorConfig, this, this.getSessionId());
|
|
263
332
|
// Only assign to instance properties after successful initialization
|
|
264
333
|
this.contentGeneratorConfig = newContentGeneratorConfig;
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
if (existingHistory.length > 0) {
|
|
268
|
-
this.geminiClient.setHistory(existingHistory, {
|
|
269
|
-
stripThoughts: fromGenaiToVertex,
|
|
270
|
-
});
|
|
271
|
-
}
|
|
334
|
+
// Initialize BaseLlmClient now that the ContentGenerator is available
|
|
335
|
+
this.baseLlmClient = new BaseLlmClient(this.contentGenerator, this);
|
|
272
336
|
// Reset the session flag since we're explicitly changing auth and using default model
|
|
273
337
|
this.inFallbackMode = false;
|
|
338
|
+
// Logging the cli configuration here as the auth related configuration params would have been loaded by this point
|
|
339
|
+
logCliConfiguration(this, new StartSessionEvent(this, this.toolRegistry));
|
|
340
|
+
}
|
|
341
|
+
getUserTier() {
|
|
342
|
+
return this.contentGenerator?.userTier;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Provides access to the BaseLlmClient for stateless LLM operations.
|
|
346
|
+
*/
|
|
347
|
+
getBaseLlmClient() {
|
|
348
|
+
if (!this.baseLlmClient) {
|
|
349
|
+
// Handle cases where initialization might be deferred or authentication failed
|
|
350
|
+
if (this.contentGenerator) {
|
|
351
|
+
this.baseLlmClient = new BaseLlmClient(this.getContentGenerator(), this);
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
throw new Error('BaseLlmClient not initialized. Ensure authentication has occurred and ContentGenerator is ready.');
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return this.baseLlmClient;
|
|
274
358
|
}
|
|
275
359
|
getSessionId() {
|
|
276
360
|
return this.sessionId;
|
|
277
361
|
}
|
|
278
|
-
setSessionId(sessionId) {
|
|
279
|
-
this.sessionId = sessionId;
|
|
280
|
-
}
|
|
281
362
|
shouldLoadMemoryFromIncludeDirectories() {
|
|
282
363
|
return this.loadMemoryFromIncludeDirectories;
|
|
283
364
|
}
|
|
@@ -285,12 +366,14 @@ export class Config {
|
|
|
285
366
|
return this.contentGeneratorConfig;
|
|
286
367
|
}
|
|
287
368
|
getModel() {
|
|
288
|
-
return this.
|
|
369
|
+
return this.model;
|
|
289
370
|
}
|
|
290
371
|
setModel(newModel) {
|
|
291
|
-
if
|
|
292
|
-
|
|
372
|
+
// Do not allow Pro usage if the user is in fallback mode.
|
|
373
|
+
if (newModel.includes('pro') && this.isInFallbackMode()) {
|
|
374
|
+
return;
|
|
293
375
|
}
|
|
376
|
+
this.model = newModel;
|
|
294
377
|
}
|
|
295
378
|
isInFallbackMode() {
|
|
296
379
|
return this.inFallbackMode;
|
|
@@ -298,10 +381,8 @@ export class Config {
|
|
|
298
381
|
setFallbackMode(active) {
|
|
299
382
|
this.inFallbackMode = active;
|
|
300
383
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
this.flashFallbackHandler = handler;
|
|
304
|
-
console.log(`[Config] FlashFallbackHandler registered successfully`);
|
|
384
|
+
setFallbackModelHandler(handler) {
|
|
385
|
+
this.fallbackModelHandler = handler;
|
|
305
386
|
}
|
|
306
387
|
getMaxSessionTurns() {
|
|
307
388
|
return this.maxSessionTurns;
|
|
@@ -353,6 +434,9 @@ export class Config {
|
|
|
353
434
|
getCoreTools() {
|
|
354
435
|
return this.coreTools;
|
|
355
436
|
}
|
|
437
|
+
getAllowedTools() {
|
|
438
|
+
return this.allowedTools;
|
|
439
|
+
}
|
|
356
440
|
getExcludeTools() {
|
|
357
441
|
return this.excludeTools;
|
|
358
442
|
}
|
|
@@ -384,6 +468,9 @@ export class Config {
|
|
|
384
468
|
return this.approvalMode;
|
|
385
469
|
}
|
|
386
470
|
setApprovalMode(mode) {
|
|
471
|
+
if (!this.isTrustedFolder() && mode !== ApprovalMode.DEFAULT) {
|
|
472
|
+
throw new Error('Cannot enable privileged approval modes in an untrusted folder.');
|
|
473
|
+
}
|
|
387
474
|
this.approvalMode = mode;
|
|
388
475
|
}
|
|
389
476
|
getShowMemoryUsage() {
|
|
@@ -410,18 +497,21 @@ export class Config {
|
|
|
410
497
|
getTelemetryOutfile() {
|
|
411
498
|
return this.telemetrySettings.outfile;
|
|
412
499
|
}
|
|
500
|
+
getTelemetryUseCollector() {
|
|
501
|
+
return this.telemetrySettings.useCollector ?? false;
|
|
502
|
+
}
|
|
413
503
|
getGeminiClient() {
|
|
414
504
|
return this.geminiClient;
|
|
415
505
|
}
|
|
416
|
-
|
|
417
|
-
return
|
|
418
|
-
}
|
|
419
|
-
getProjectTempDir() {
|
|
420
|
-
return getProjectTempDir(this.getProjectRoot());
|
|
506
|
+
getModelRouterService() {
|
|
507
|
+
return this.modelRouterService;
|
|
421
508
|
}
|
|
422
509
|
getEnableRecursiveFileSearch() {
|
|
423
510
|
return this.fileFiltering.enableRecursiveFileSearch;
|
|
424
511
|
}
|
|
512
|
+
getFileFilteringDisableFuzzySearch() {
|
|
513
|
+
return this.fileFiltering.disableFuzzySearch;
|
|
514
|
+
}
|
|
425
515
|
getFileFilteringRespectGitIgnore() {
|
|
426
516
|
return this.fileFiltering.respectGitIgnore;
|
|
427
517
|
}
|
|
@@ -434,6 +524,20 @@ export class Config {
|
|
|
434
524
|
respectGeminiIgnore: this.fileFiltering.respectGeminiIgnore,
|
|
435
525
|
};
|
|
436
526
|
}
|
|
527
|
+
/**
|
|
528
|
+
* Gets custom file exclusion patterns from configuration.
|
|
529
|
+
* TODO: This is a placeholder implementation. In the future, this could
|
|
530
|
+
* read from settings files, CLI arguments, or environment variables.
|
|
531
|
+
*/
|
|
532
|
+
getCustomExcludes() {
|
|
533
|
+
// Placeholder implementation - returns empty array for now
|
|
534
|
+
// Future implementation could read from:
|
|
535
|
+
// - User settings file
|
|
536
|
+
// - Project-specific configuration
|
|
537
|
+
// - Environment variables
|
|
538
|
+
// - CLI arguments
|
|
539
|
+
return [];
|
|
540
|
+
}
|
|
437
541
|
getCheckpointingEnabled() {
|
|
438
542
|
return this.checkpointing;
|
|
439
543
|
}
|
|
@@ -464,6 +568,9 @@ export class Config {
|
|
|
464
568
|
getListExtensions() {
|
|
465
569
|
return this.listExtensions;
|
|
466
570
|
}
|
|
571
|
+
getExtensionManagement() {
|
|
572
|
+
return this.extensionManagement;
|
|
573
|
+
}
|
|
467
574
|
getExtensions() {
|
|
468
575
|
return this._extensions;
|
|
469
576
|
}
|
|
@@ -485,28 +592,33 @@ export class Config {
|
|
|
485
592
|
getFolderTrustFeature() {
|
|
486
593
|
return this.folderTrustFeature;
|
|
487
594
|
}
|
|
595
|
+
/**
|
|
596
|
+
* Returns 'true' if the workspace is considered "trusted".
|
|
597
|
+
* 'false' for untrusted.
|
|
598
|
+
*/
|
|
488
599
|
getFolderTrust() {
|
|
489
600
|
return this.folderTrust;
|
|
490
601
|
}
|
|
491
602
|
isTrustedFolder() {
|
|
492
|
-
|
|
603
|
+
// isWorkspaceTrusted in cli/src/config/trustedFolder.js returns undefined
|
|
604
|
+
// when the file based trust value is unavailable, since it is mainly used
|
|
605
|
+
// in the initialization for trust dialogs, etc. Here we return true since
|
|
606
|
+
// config.isTrustedFolder() is used for the main business logic of blocking
|
|
607
|
+
// tool calls etc in the rest of the application.
|
|
608
|
+
//
|
|
609
|
+
// Default value is true since we load with trusted settings to avoid
|
|
610
|
+
// restarts in the more common path. If the user chooses to mark the folder
|
|
611
|
+
// as untrusted, the CLI will restart and we will have the trust value
|
|
612
|
+
// reloaded.
|
|
613
|
+
const context = ideContextStore.get();
|
|
614
|
+
if (context?.workspaceState?.isTrusted !== undefined) {
|
|
615
|
+
return context.workspaceState.isTrusted;
|
|
616
|
+
}
|
|
617
|
+
return this.trustedFolder ?? true;
|
|
493
618
|
}
|
|
494
619
|
setIdeMode(value) {
|
|
495
620
|
this.ideMode = value;
|
|
496
621
|
}
|
|
497
|
-
async setIdeModeAndSyncConnection(value) {
|
|
498
|
-
this.ideMode = value;
|
|
499
|
-
if (value) {
|
|
500
|
-
await this.ideClient.connect();
|
|
501
|
-
logIdeConnection(this, new IdeConnectionEvent(IdeConnectionType.SESSION));
|
|
502
|
-
}
|
|
503
|
-
else {
|
|
504
|
-
await this.ideClient.disconnect();
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
getIdeClient() {
|
|
508
|
-
return this.ideClient;
|
|
509
|
-
}
|
|
510
622
|
/**
|
|
511
623
|
* Get the current FileSystemService
|
|
512
624
|
*/
|
|
@@ -525,57 +637,154 @@ export class Config {
|
|
|
525
637
|
isInteractive() {
|
|
526
638
|
return this.interactive;
|
|
527
639
|
}
|
|
640
|
+
getUseRipgrep() {
|
|
641
|
+
return this.useRipgrep;
|
|
642
|
+
}
|
|
528
643
|
getShouldUseNodePtyShell() {
|
|
529
644
|
return this.shouldUseNodePtyShell;
|
|
530
645
|
}
|
|
531
646
|
getSkipNextSpeakerCheck() {
|
|
532
647
|
return this.skipNextSpeakerCheck;
|
|
533
648
|
}
|
|
649
|
+
getShellExecutionConfig() {
|
|
650
|
+
return this.shellExecutionConfig;
|
|
651
|
+
}
|
|
652
|
+
setShellExecutionConfig(config) {
|
|
653
|
+
this.shellExecutionConfig = {
|
|
654
|
+
terminalWidth: config.terminalWidth ?? this.shellExecutionConfig.terminalWidth,
|
|
655
|
+
terminalHeight: config.terminalHeight ?? this.shellExecutionConfig.terminalHeight,
|
|
656
|
+
showColor: config.showColor ?? this.shellExecutionConfig.showColor,
|
|
657
|
+
pager: config.pager ?? this.shellExecutionConfig.pager,
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
getScreenReader() {
|
|
661
|
+
return this.accessibility.screenReader ?? false;
|
|
662
|
+
}
|
|
663
|
+
getEnablePromptCompletion() {
|
|
664
|
+
return this.enablePromptCompletion;
|
|
665
|
+
}
|
|
666
|
+
getEnableToolOutputTruncation() {
|
|
667
|
+
return this.enableToolOutputTruncation;
|
|
668
|
+
}
|
|
669
|
+
getTruncateToolOutputThreshold() {
|
|
670
|
+
return Math.min(
|
|
671
|
+
// Estimate remaining context window in characters (1 token ~= 4 chars).
|
|
672
|
+
4 *
|
|
673
|
+
(tokenLimit(this.model) - uiTelemetryService.getLastPromptTokenCount()), this.truncateToolOutputThreshold);
|
|
674
|
+
}
|
|
675
|
+
getTruncateToolOutputLines() {
|
|
676
|
+
return this.truncateToolOutputLines;
|
|
677
|
+
}
|
|
678
|
+
getUseSmartEdit() {
|
|
679
|
+
return this.useSmartEdit;
|
|
680
|
+
}
|
|
681
|
+
getUseWriteTodos() {
|
|
682
|
+
return this.useWriteTodos;
|
|
683
|
+
}
|
|
684
|
+
getOutputFormat() {
|
|
685
|
+
return this.outputSettings?.format
|
|
686
|
+
? this.outputSettings.format
|
|
687
|
+
: OutputFormat.TEXT;
|
|
688
|
+
}
|
|
689
|
+
getUseModelRouter() {
|
|
690
|
+
return this.useModelRouter;
|
|
691
|
+
}
|
|
534
692
|
async getGitService() {
|
|
535
693
|
if (!this.gitService) {
|
|
536
|
-
this.gitService = new GitService(this.targetDir);
|
|
694
|
+
this.gitService = new GitService(this.targetDir, this.storage);
|
|
537
695
|
await this.gitService.initialize();
|
|
538
696
|
}
|
|
539
697
|
return this.gitService;
|
|
540
698
|
}
|
|
699
|
+
getFileExclusions() {
|
|
700
|
+
return this.fileExclusions;
|
|
701
|
+
}
|
|
702
|
+
getMessageBus() {
|
|
703
|
+
return this.messageBus;
|
|
704
|
+
}
|
|
705
|
+
getPolicyEngine() {
|
|
706
|
+
return this.policyEngine;
|
|
707
|
+
}
|
|
708
|
+
getEnableMessageBusIntegration() {
|
|
709
|
+
return this.enableMessageBusIntegration;
|
|
710
|
+
}
|
|
541
711
|
async createToolRegistry() {
|
|
542
|
-
const registry = new ToolRegistry(this);
|
|
712
|
+
const registry = new ToolRegistry(this, this.eventEmitter);
|
|
543
713
|
// helper to create & register core tools that are enabled
|
|
544
714
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
545
715
|
const registerCoreTool = (ToolClass, ...args) => {
|
|
546
716
|
const className = ToolClass.name;
|
|
547
717
|
const toolName = ToolClass.Name || className;
|
|
548
718
|
const coreTools = this.getCoreTools();
|
|
549
|
-
const excludeTools = this.getExcludeTools();
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
tool
|
|
557
|
-
tool.startsWith(`${
|
|
558
|
-
tool.startsWith(`${toolName}(`));
|
|
719
|
+
const excludeTools = this.getExcludeTools() || [];
|
|
720
|
+
// On some platforms, the className can be minified to _ClassName.
|
|
721
|
+
const normalizedClassName = className.replace(/^_+/, '');
|
|
722
|
+
let isEnabled = true; // Enabled by default if coreTools is not set.
|
|
723
|
+
if (coreTools) {
|
|
724
|
+
isEnabled = coreTools.some((tool) => tool === toolName ||
|
|
725
|
+
tool === normalizedClassName ||
|
|
726
|
+
tool.startsWith(`${toolName}(`) ||
|
|
727
|
+
tool.startsWith(`${normalizedClassName}(`));
|
|
559
728
|
}
|
|
560
|
-
|
|
561
|
-
|
|
729
|
+
const isExcluded = excludeTools.some((tool) => tool === toolName || tool === normalizedClassName);
|
|
730
|
+
if (isExcluded) {
|
|
562
731
|
isEnabled = false;
|
|
563
732
|
}
|
|
564
733
|
if (isEnabled) {
|
|
565
|
-
|
|
734
|
+
// Pass message bus to tools when feature flag is enabled
|
|
735
|
+
// This first implementation is only focused on the general case of
|
|
736
|
+
// the tool registry.
|
|
737
|
+
const messageBusEnabled = this.getEnableMessageBusIntegration();
|
|
738
|
+
if (this.debugMode && messageBusEnabled) {
|
|
739
|
+
console.log(`[DEBUG] enableMessageBusIntegration setting: ${messageBusEnabled}`);
|
|
740
|
+
}
|
|
741
|
+
const toolArgs = messageBusEnabled
|
|
742
|
+
? [...args, this.getMessageBus()]
|
|
743
|
+
: args;
|
|
744
|
+
if (this.debugMode && messageBusEnabled) {
|
|
745
|
+
console.log(`[DEBUG] Registering ${className} with messageBus: ${messageBusEnabled ? 'YES' : 'NO'}`);
|
|
746
|
+
}
|
|
747
|
+
registry.registerTool(new ToolClass(...toolArgs));
|
|
566
748
|
}
|
|
567
749
|
};
|
|
568
750
|
registerCoreTool(LSTool, this);
|
|
569
751
|
registerCoreTool(ReadFileTool, this);
|
|
570
|
-
|
|
752
|
+
if (this.getUseRipgrep()) {
|
|
753
|
+
let useRipgrep = false;
|
|
754
|
+
let errorString = undefined;
|
|
755
|
+
try {
|
|
756
|
+
useRipgrep = await canUseRipgrep();
|
|
757
|
+
}
|
|
758
|
+
catch (error) {
|
|
759
|
+
errorString = String(error);
|
|
760
|
+
}
|
|
761
|
+
if (useRipgrep) {
|
|
762
|
+
registerCoreTool(RipGrepTool, this);
|
|
763
|
+
}
|
|
764
|
+
else {
|
|
765
|
+
logRipgrepFallback(this, new RipgrepFallbackEvent(errorString));
|
|
766
|
+
registerCoreTool(GrepTool, this);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
registerCoreTool(GrepTool, this);
|
|
771
|
+
}
|
|
571
772
|
registerCoreTool(GlobTool, this);
|
|
572
|
-
|
|
773
|
+
if (this.getUseSmartEdit()) {
|
|
774
|
+
registerCoreTool(SmartEditTool, this);
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
registerCoreTool(EditTool, this);
|
|
778
|
+
}
|
|
573
779
|
registerCoreTool(WriteFileTool, this);
|
|
574
780
|
registerCoreTool(WebFetchTool, this);
|
|
575
781
|
registerCoreTool(ReadManyFilesTool, this);
|
|
576
782
|
registerCoreTool(ShellTool, this);
|
|
577
783
|
registerCoreTool(MemoryTool);
|
|
578
784
|
registerCoreTool(WebSearchTool, this);
|
|
785
|
+
if (this.getUseWriteTodos()) {
|
|
786
|
+
registerCoreTool(WriteTodosTool, this);
|
|
787
|
+
}
|
|
579
788
|
await registry.discoverAllTools();
|
|
580
789
|
return registry;
|
|
581
790
|
}
|