@google/gemini-cli-core 0.0.3-preview.4 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +12 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/src/code_assist/codeAssist.d.ts +2 -0
- 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 +3 -1
- package/dist/src/code_assist/converter.js +2 -1
- package/dist/src/code_assist/converter.js.map +1 -1
- package/dist/src/code_assist/converter.test.js +10 -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.js +136 -0
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -0
- package/dist/src/code_assist/oauth2.js +92 -29
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +729 -339
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/server.d.ts +1 -1
- package/dist/src/code_assist/server.js +24 -1
- 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/types.d.ts +17 -2
- package/dist/src/config/config.d.ts +72 -12
- package/dist/src/config/config.js +196 -64
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +305 -178
- package/dist/src/config/config.test.js.map +1 -1
- 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 +2 -0
- package/dist/src/config/storage.js +6 -1
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/config/storage.test.js +4 -0
- package/dist/src/config/storage.test.js.map +1 -1
- 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 +46 -0
- package/dist/src/core/baseLlmClient.js +112 -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 +253 -0
- package/dist/src/core/baseLlmClient.test.js.map +1 -0
- package/dist/src/core/client.d.ts +16 -21
- package/dist/src/core/client.js +145 -232
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +393 -492
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/contentGenerator.d.ts +2 -3
- package/dist/src/core/contentGenerator.js +0 -4
- 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 +8 -3
- package/dist/src/core/coreToolScheduler.js +106 -5
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +233 -5
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +38 -32
- package/dist/src/core/geminiChat.js +209 -219
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +674 -386
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.js +13 -16
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +59 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.d.ts +5 -0
- package/dist/src/core/prompts.js +63 -42
- 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.js +7 -10
- package/dist/src/core/subagent.js.map +1 -1
- package/dist/src/core/subagent.test.js +32 -22
- package/dist/src/core/subagent.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +21 -5
- package/dist/src/core/turn.js +45 -11
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/core/turn.test.js +340 -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 +51 -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/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- 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 +42 -14
- package/dist/src/ide/detect-ide.js +22 -68
- package/dist/src/ide/detect-ide.js.map +1 -1
- package/dist/src/ide/detect-ide.test.js +11 -51
- package/dist/src/ide/detect-ide.test.js.map +1 -1
- package/dist/src/ide/ide-client.d.ts +60 -18
- package/dist/src/ide/ide-client.js +275 -53
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-client.test.js +239 -6
- 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 +15 -11
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/ide-installer.test.js +30 -12
- 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 +0 -1
- package/dist/src/ide/process-utils.js +43 -25
- package/dist/src/ide/process-utils.js.map +1 -1
- package/dist/src/ide/process-utils.test.js +90 -4
- package/dist/src/ide/process-utils.test.js.map +1 -1
- 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 +10 -2
- package/dist/src/index.js +11 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/oauth-provider.d.ts +15 -12
- package/dist/src/mcp/oauth-provider.js +63 -56
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +74 -35
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.d.ts +14 -10
- package/dist/src/mcp/oauth-token-storage.js +52 -20
- package/dist/src/mcp/oauth-token-storage.js.map +1 -1
- package/dist/src/mcp/oauth-token-storage.test.js +255 -162
- package/dist/src/mcp/oauth-token-storage.test.js.map +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.d.ts +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.js +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.js.map +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.test.js +1 -1
- package/dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -1
- 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 +4 -0
- package/dist/src/mcp/token-storage/types.js +5 -1
- package/dist/src/mcp/token-storage/types.js.map +1 -1
- 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/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 +67 -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 +7 -13
- package/dist/src/services/chatRecordingService.js +28 -19
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +62 -20
- 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 +31 -17
- package/dist/src/services/fileDiscoveryService.js.map +1 -1
- package/dist/src/services/gitService.js +9 -12
- package/dist/src/services/gitService.js.map +1 -1
- package/dist/src/services/gitService.test.js +10 -20
- package/dist/src/services/gitService.test.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +5 -0
- package/dist/src/services/loopDetectionService.js +36 -20
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +41 -12
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.d.ts +34 -2
- package/dist/src/services/shellExecutionService.js +192 -43
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +184 -55
- 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 +16 -2
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +143 -24
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +101 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +19 -2
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +48 -2
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/constants.d.ts +8 -0
- package/dist/src/telemetry/constants.js +8 -0
- package/dist/src/telemetry/constants.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 +7 -2
- package/dist/src/telemetry/index.js +7 -2
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +8 -1
- package/dist/src/telemetry/loggers.js +140 -8
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +268 -39
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +4 -3
- package/dist/src/telemetry/metrics.js +33 -10
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +47 -25
- 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.js +16 -1
- package/dist/src/telemetry/sdk.js.map +1 -1
- package/dist/src/telemetry/sdk.test.js +95 -0
- package/dist/src/telemetry/sdk.test.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +70 -6
- package/dist/src/telemetry/types.js +112 -8
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.d.ts +1 -1
- package/dist/src/telemetry/uiTelemetry.js +6 -7
- package/dist/src/telemetry/uiTelemetry.js.map +1 -1
- package/dist/src/telemetry/uiTelemetry.test.js +15 -15
- package/dist/src/telemetry/uiTelemetry.test.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 +41 -0
- package/dist/src/test-utils/mock-tool.js +51 -0
- package/dist/src/test-utils/mock-tool.js.map +1 -0
- 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 +2 -2
- package/dist/src/tools/edit.js +35 -44
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +124 -13
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.d.ts +5 -1
- package/dist/src/tools/glob.js +24 -17
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +51 -0
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/ls.js +19 -32
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +140 -280
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client-manager.d.ts +5 -3
- 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 +5 -5
- package/dist/src/tools/mcp-client.js +40 -35
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +3 -3
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +3 -2
- package/dist/src/tools/mcp-tool.js +9 -9
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/mcp-tool.test.js +28 -7
- package/dist/src/tools/mcp-tool.test.js.map +1 -1
- package/dist/src/tools/memoryTool.js +5 -33
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/read-file.js +8 -3
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +29 -0
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +1 -1
- package/dist/src/tools/read-many-files.js +18 -50
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +4 -4
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.d.ts +8 -0
- package/dist/src/tools/ripGrep.js +26 -1
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +107 -5
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +12 -2
- package/dist/src/tools/shell.js +20 -24
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +35 -70
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +72 -0
- package/dist/src/tools/smart-edit.js +594 -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 +419 -0
- package/dist/src/tools/smart-edit.test.js.map +1 -0
- package/dist/src/tools/tool-registry.d.ts +2 -1
- package/dist/src/tools/tool-registry.js +6 -5
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tools.d.ts +14 -7
- package/dist/src/tools/tools.js +9 -2
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/web-fetch.js +4 -3
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-search.d.ts +1 -1
- package/dist/src/tools/web-search.js +3 -1
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/write-file.js +14 -19
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +99 -19
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/utils/bfsFileSearch.js +11 -5
- package/dist/src/utils/bfsFileSearch.js.map +1 -1
- package/dist/src/utils/editCorrector.d.ts +7 -6
- package/dist/src/utils/editCorrector.js +61 -18
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +30 -79
- package/dist/src/utils/editCorrector.test.js.map +1 -1
- package/dist/src/utils/editor.js +31 -44
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +61 -75
- package/dist/src/utils/editor.test.js.map +1 -1
- 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/errors.d.ts +6 -0
- package/dist/src/utils/errors.js +10 -0
- package/dist/src/utils/errors.js.map +1 -1
- package/dist/src/utils/fileUtils.d.ts +20 -3
- package/dist/src/utils/fileUtils.js +154 -32
- 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/flashFallback.test.d.ts +6 -0
- package/dist/src/utils/{flashFallback.integration.test.js → flashFallback.test.js} +31 -27
- 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/gitIgnoreParser.d.ts +3 -7
- package/dist/src/utils/gitIgnoreParser.js +125 -34
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/gitIgnoreParser.test.js +66 -35
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.d.ts +26 -0
- package/dist/src/utils/llm-edit-fixer.js +121 -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 +105 -0
- package/dist/src/utils/llm-edit-fixer.test.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.d.ts +5 -4
- package/dist/src/utils/memoryDiscovery.js +10 -9
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +50 -25
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.d.ts +2 -2
- 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/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/shell-utils.d.ts +5 -0
- package/dist/src/utils/shell-utils.js +23 -0
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/terminalSerializer.d.ts +28 -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/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -3
- package/dist/google-gemini-cli-core-0.3.0-preview.3.tgz +0 -0
- package/dist/src/utils/flashFallback.integration.test.js.map +0 -1
- /package/dist/src/{utils/flashFallback.integration.test.d.ts → code_assist/oauth-credential-storage.test.d.ts} +0 -0
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* A file that is open in the IDE.
|
|
9
|
+
*/
|
|
10
|
+
export declare const FileSchema: z.ZodObject<{
|
|
11
|
+
/**
|
|
12
|
+
* The absolute path to the file.
|
|
13
|
+
*/
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
/**
|
|
16
|
+
* The unix timestamp of when the file was last focused.
|
|
17
|
+
*/
|
|
18
|
+
timestamp: z.ZodNumber;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the file is the currently active file. Only one file can be active at a time.
|
|
21
|
+
*/
|
|
22
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
/**
|
|
24
|
+
* The text that is currently selected in the active file.
|
|
25
|
+
*/
|
|
26
|
+
selectedText: z.ZodOptional<z.ZodString>;
|
|
27
|
+
/**
|
|
28
|
+
* The cursor position in the active file.
|
|
29
|
+
*/
|
|
30
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
/**
|
|
32
|
+
* The 1-based line number.
|
|
33
|
+
*/
|
|
34
|
+
line: z.ZodNumber;
|
|
35
|
+
/**
|
|
36
|
+
* The 1-based character offset.
|
|
37
|
+
*/
|
|
38
|
+
character: z.ZodNumber;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
line: number;
|
|
41
|
+
character: number;
|
|
42
|
+
}, {
|
|
43
|
+
line: number;
|
|
44
|
+
character: number;
|
|
45
|
+
}>>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
path: string;
|
|
48
|
+
timestamp: number;
|
|
49
|
+
cursor?: {
|
|
50
|
+
line: number;
|
|
51
|
+
character: number;
|
|
52
|
+
} | undefined;
|
|
53
|
+
isActive?: boolean | undefined;
|
|
54
|
+
selectedText?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
path: string;
|
|
57
|
+
timestamp: number;
|
|
58
|
+
cursor?: {
|
|
59
|
+
line: number;
|
|
60
|
+
character: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
isActive?: boolean | undefined;
|
|
63
|
+
selectedText?: string | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
export type File = z.infer<typeof FileSchema>;
|
|
66
|
+
/**
|
|
67
|
+
* The context of the IDE.
|
|
68
|
+
*/
|
|
69
|
+
export declare const IdeContextSchema: z.ZodObject<{
|
|
70
|
+
workspaceState: z.ZodOptional<z.ZodObject<{
|
|
71
|
+
/**
|
|
72
|
+
* The list of files that are currently open.
|
|
73
|
+
*/
|
|
74
|
+
openFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
75
|
+
/**
|
|
76
|
+
* The absolute path to the file.
|
|
77
|
+
*/
|
|
78
|
+
path: z.ZodString;
|
|
79
|
+
/**
|
|
80
|
+
* The unix timestamp of when the file was last focused.
|
|
81
|
+
*/
|
|
82
|
+
timestamp: z.ZodNumber;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the file is the currently active file. Only one file can be active at a time.
|
|
85
|
+
*/
|
|
86
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
/**
|
|
88
|
+
* The text that is currently selected in the active file.
|
|
89
|
+
*/
|
|
90
|
+
selectedText: z.ZodOptional<z.ZodString>;
|
|
91
|
+
/**
|
|
92
|
+
* The cursor position in the active file.
|
|
93
|
+
*/
|
|
94
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
/**
|
|
96
|
+
* The 1-based line number.
|
|
97
|
+
*/
|
|
98
|
+
line: z.ZodNumber;
|
|
99
|
+
/**
|
|
100
|
+
* The 1-based character offset.
|
|
101
|
+
*/
|
|
102
|
+
character: z.ZodNumber;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
line: number;
|
|
105
|
+
character: number;
|
|
106
|
+
}, {
|
|
107
|
+
line: number;
|
|
108
|
+
character: number;
|
|
109
|
+
}>>;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
path: string;
|
|
112
|
+
timestamp: number;
|
|
113
|
+
cursor?: {
|
|
114
|
+
line: number;
|
|
115
|
+
character: number;
|
|
116
|
+
} | undefined;
|
|
117
|
+
isActive?: boolean | undefined;
|
|
118
|
+
selectedText?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
path: string;
|
|
121
|
+
timestamp: number;
|
|
122
|
+
cursor?: {
|
|
123
|
+
line: number;
|
|
124
|
+
character: number;
|
|
125
|
+
} | undefined;
|
|
126
|
+
isActive?: boolean | undefined;
|
|
127
|
+
selectedText?: string | undefined;
|
|
128
|
+
}>, "many">>;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the workspace is trusted.
|
|
131
|
+
*/
|
|
132
|
+
isTrusted: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
openFiles?: {
|
|
135
|
+
path: string;
|
|
136
|
+
timestamp: number;
|
|
137
|
+
cursor?: {
|
|
138
|
+
line: number;
|
|
139
|
+
character: number;
|
|
140
|
+
} | undefined;
|
|
141
|
+
isActive?: boolean | undefined;
|
|
142
|
+
selectedText?: string | undefined;
|
|
143
|
+
}[] | undefined;
|
|
144
|
+
isTrusted?: boolean | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
openFiles?: {
|
|
147
|
+
path: string;
|
|
148
|
+
timestamp: number;
|
|
149
|
+
cursor?: {
|
|
150
|
+
line: number;
|
|
151
|
+
character: number;
|
|
152
|
+
} | undefined;
|
|
153
|
+
isActive?: boolean | undefined;
|
|
154
|
+
selectedText?: string | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
isTrusted?: boolean | undefined;
|
|
157
|
+
}>>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
workspaceState?: {
|
|
160
|
+
openFiles?: {
|
|
161
|
+
path: string;
|
|
162
|
+
timestamp: number;
|
|
163
|
+
cursor?: {
|
|
164
|
+
line: number;
|
|
165
|
+
character: number;
|
|
166
|
+
} | undefined;
|
|
167
|
+
isActive?: boolean | undefined;
|
|
168
|
+
selectedText?: string | undefined;
|
|
169
|
+
}[] | undefined;
|
|
170
|
+
isTrusted?: boolean | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
workspaceState?: {
|
|
174
|
+
openFiles?: {
|
|
175
|
+
path: string;
|
|
176
|
+
timestamp: number;
|
|
177
|
+
cursor?: {
|
|
178
|
+
line: number;
|
|
179
|
+
character: number;
|
|
180
|
+
} | undefined;
|
|
181
|
+
isActive?: boolean | undefined;
|
|
182
|
+
selectedText?: string | undefined;
|
|
183
|
+
}[] | undefined;
|
|
184
|
+
isTrusted?: boolean | undefined;
|
|
185
|
+
} | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
export type IdeContext = z.infer<typeof IdeContextSchema>;
|
|
188
|
+
/**
|
|
189
|
+
* A notification that the IDE context has been updated.
|
|
190
|
+
*/
|
|
191
|
+
export declare const IdeContextNotificationSchema: z.ZodObject<{
|
|
192
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
193
|
+
method: z.ZodLiteral<"ide/contextUpdate">;
|
|
194
|
+
params: z.ZodObject<{
|
|
195
|
+
workspaceState: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
/**
|
|
197
|
+
* The list of files that are currently open.
|
|
198
|
+
*/
|
|
199
|
+
openFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
200
|
+
/**
|
|
201
|
+
* The absolute path to the file.
|
|
202
|
+
*/
|
|
203
|
+
path: z.ZodString;
|
|
204
|
+
/**
|
|
205
|
+
* The unix timestamp of when the file was last focused.
|
|
206
|
+
*/
|
|
207
|
+
timestamp: z.ZodNumber;
|
|
208
|
+
/**
|
|
209
|
+
* Whether the file is the currently active file. Only one file can be active at a time.
|
|
210
|
+
*/
|
|
211
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
+
/**
|
|
213
|
+
* The text that is currently selected in the active file.
|
|
214
|
+
*/
|
|
215
|
+
selectedText: z.ZodOptional<z.ZodString>;
|
|
216
|
+
/**
|
|
217
|
+
* The cursor position in the active file.
|
|
218
|
+
*/
|
|
219
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
/**
|
|
221
|
+
* The 1-based line number.
|
|
222
|
+
*/
|
|
223
|
+
line: z.ZodNumber;
|
|
224
|
+
/**
|
|
225
|
+
* The 1-based character offset.
|
|
226
|
+
*/
|
|
227
|
+
character: z.ZodNumber;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
line: number;
|
|
230
|
+
character: number;
|
|
231
|
+
}, {
|
|
232
|
+
line: number;
|
|
233
|
+
character: number;
|
|
234
|
+
}>>;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
path: string;
|
|
237
|
+
timestamp: number;
|
|
238
|
+
cursor?: {
|
|
239
|
+
line: number;
|
|
240
|
+
character: number;
|
|
241
|
+
} | undefined;
|
|
242
|
+
isActive?: boolean | undefined;
|
|
243
|
+
selectedText?: string | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
path: string;
|
|
246
|
+
timestamp: number;
|
|
247
|
+
cursor?: {
|
|
248
|
+
line: number;
|
|
249
|
+
character: number;
|
|
250
|
+
} | undefined;
|
|
251
|
+
isActive?: boolean | undefined;
|
|
252
|
+
selectedText?: string | undefined;
|
|
253
|
+
}>, "many">>;
|
|
254
|
+
/**
|
|
255
|
+
* Whether the workspace is trusted.
|
|
256
|
+
*/
|
|
257
|
+
isTrusted: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, "strip", z.ZodTypeAny, {
|
|
259
|
+
openFiles?: {
|
|
260
|
+
path: string;
|
|
261
|
+
timestamp: number;
|
|
262
|
+
cursor?: {
|
|
263
|
+
line: number;
|
|
264
|
+
character: number;
|
|
265
|
+
} | undefined;
|
|
266
|
+
isActive?: boolean | undefined;
|
|
267
|
+
selectedText?: string | undefined;
|
|
268
|
+
}[] | undefined;
|
|
269
|
+
isTrusted?: boolean | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
openFiles?: {
|
|
272
|
+
path: string;
|
|
273
|
+
timestamp: number;
|
|
274
|
+
cursor?: {
|
|
275
|
+
line: number;
|
|
276
|
+
character: number;
|
|
277
|
+
} | undefined;
|
|
278
|
+
isActive?: boolean | undefined;
|
|
279
|
+
selectedText?: string | undefined;
|
|
280
|
+
}[] | undefined;
|
|
281
|
+
isTrusted?: boolean | undefined;
|
|
282
|
+
}>>;
|
|
283
|
+
}, "strip", z.ZodTypeAny, {
|
|
284
|
+
workspaceState?: {
|
|
285
|
+
openFiles?: {
|
|
286
|
+
path: string;
|
|
287
|
+
timestamp: number;
|
|
288
|
+
cursor?: {
|
|
289
|
+
line: number;
|
|
290
|
+
character: number;
|
|
291
|
+
} | undefined;
|
|
292
|
+
isActive?: boolean | undefined;
|
|
293
|
+
selectedText?: string | undefined;
|
|
294
|
+
}[] | undefined;
|
|
295
|
+
isTrusted?: boolean | undefined;
|
|
296
|
+
} | undefined;
|
|
297
|
+
}, {
|
|
298
|
+
workspaceState?: {
|
|
299
|
+
openFiles?: {
|
|
300
|
+
path: string;
|
|
301
|
+
timestamp: number;
|
|
302
|
+
cursor?: {
|
|
303
|
+
line: number;
|
|
304
|
+
character: number;
|
|
305
|
+
} | undefined;
|
|
306
|
+
isActive?: boolean | undefined;
|
|
307
|
+
selectedText?: string | undefined;
|
|
308
|
+
}[] | undefined;
|
|
309
|
+
isTrusted?: boolean | undefined;
|
|
310
|
+
} | undefined;
|
|
311
|
+
}>;
|
|
312
|
+
}, "strip", z.ZodTypeAny, {
|
|
313
|
+
params: {
|
|
314
|
+
workspaceState?: {
|
|
315
|
+
openFiles?: {
|
|
316
|
+
path: string;
|
|
317
|
+
timestamp: number;
|
|
318
|
+
cursor?: {
|
|
319
|
+
line: number;
|
|
320
|
+
character: number;
|
|
321
|
+
} | undefined;
|
|
322
|
+
isActive?: boolean | undefined;
|
|
323
|
+
selectedText?: string | undefined;
|
|
324
|
+
}[] | undefined;
|
|
325
|
+
isTrusted?: boolean | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
};
|
|
328
|
+
jsonrpc: "2.0";
|
|
329
|
+
method: "ide/contextUpdate";
|
|
330
|
+
}, {
|
|
331
|
+
params: {
|
|
332
|
+
workspaceState?: {
|
|
333
|
+
openFiles?: {
|
|
334
|
+
path: string;
|
|
335
|
+
timestamp: number;
|
|
336
|
+
cursor?: {
|
|
337
|
+
line: number;
|
|
338
|
+
character: number;
|
|
339
|
+
} | undefined;
|
|
340
|
+
isActive?: boolean | undefined;
|
|
341
|
+
selectedText?: string | undefined;
|
|
342
|
+
}[] | undefined;
|
|
343
|
+
isTrusted?: boolean | undefined;
|
|
344
|
+
} | undefined;
|
|
345
|
+
};
|
|
346
|
+
jsonrpc: "2.0";
|
|
347
|
+
method: "ide/contextUpdate";
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* A notification that a diff has been accepted in the IDE.
|
|
351
|
+
*/
|
|
352
|
+
export declare const IdeDiffAcceptedNotificationSchema: z.ZodObject<{
|
|
353
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
354
|
+
method: z.ZodLiteral<"ide/diffAccepted">;
|
|
355
|
+
params: z.ZodObject<{
|
|
356
|
+
/**
|
|
357
|
+
* The absolute path to the file that was diffed.
|
|
358
|
+
*/
|
|
359
|
+
filePath: z.ZodString;
|
|
360
|
+
/**
|
|
361
|
+
* The full content of the file after the diff was accepted, which includes any manual edits the user may have made.
|
|
362
|
+
*/
|
|
363
|
+
content: z.ZodString;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
filePath: string;
|
|
366
|
+
content: string;
|
|
367
|
+
}, {
|
|
368
|
+
filePath: string;
|
|
369
|
+
content: string;
|
|
370
|
+
}>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
params: {
|
|
373
|
+
filePath: string;
|
|
374
|
+
content: string;
|
|
375
|
+
};
|
|
376
|
+
jsonrpc: "2.0";
|
|
377
|
+
method: "ide/diffAccepted";
|
|
378
|
+
}, {
|
|
379
|
+
params: {
|
|
380
|
+
filePath: string;
|
|
381
|
+
content: string;
|
|
382
|
+
};
|
|
383
|
+
jsonrpc: "2.0";
|
|
384
|
+
method: "ide/diffAccepted";
|
|
385
|
+
}>;
|
|
386
|
+
/**
|
|
387
|
+
* A notification that a diff has been rejected in the IDE.
|
|
388
|
+
*/
|
|
389
|
+
export declare const IdeDiffRejectedNotificationSchema: z.ZodObject<{
|
|
390
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
391
|
+
method: z.ZodLiteral<"ide/diffRejected">;
|
|
392
|
+
params: z.ZodObject<{
|
|
393
|
+
/**
|
|
394
|
+
* The absolute path to the file that was diffed.
|
|
395
|
+
*/
|
|
396
|
+
filePath: z.ZodString;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
filePath: string;
|
|
399
|
+
}, {
|
|
400
|
+
filePath: string;
|
|
401
|
+
}>;
|
|
402
|
+
}, "strip", z.ZodTypeAny, {
|
|
403
|
+
params: {
|
|
404
|
+
filePath: string;
|
|
405
|
+
};
|
|
406
|
+
jsonrpc: "2.0";
|
|
407
|
+
method: "ide/diffRejected";
|
|
408
|
+
}, {
|
|
409
|
+
params: {
|
|
410
|
+
filePath: string;
|
|
411
|
+
};
|
|
412
|
+
jsonrpc: "2.0";
|
|
413
|
+
method: "ide/diffRejected";
|
|
414
|
+
}>;
|
|
415
|
+
/**
|
|
416
|
+
* This is defineded for backwards compatability only. Newer extension versions
|
|
417
|
+
* will only send IdeDiffRejectedNotificationSchema.
|
|
418
|
+
*
|
|
419
|
+
* A notification that a diff has been closed in the IDE.
|
|
420
|
+
*/
|
|
421
|
+
export declare const IdeDiffClosedNotificationSchema: z.ZodObject<{
|
|
422
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
423
|
+
method: z.ZodLiteral<"ide/diffClosed">;
|
|
424
|
+
params: z.ZodObject<{
|
|
425
|
+
filePath: z.ZodString;
|
|
426
|
+
content: z.ZodOptional<z.ZodString>;
|
|
427
|
+
}, "strip", z.ZodTypeAny, {
|
|
428
|
+
filePath: string;
|
|
429
|
+
content?: string | undefined;
|
|
430
|
+
}, {
|
|
431
|
+
filePath: string;
|
|
432
|
+
content?: string | undefined;
|
|
433
|
+
}>;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
435
|
+
params: {
|
|
436
|
+
filePath: string;
|
|
437
|
+
content?: string | undefined;
|
|
438
|
+
};
|
|
439
|
+
jsonrpc: "2.0";
|
|
440
|
+
method: "ide/diffClosed";
|
|
441
|
+
}, {
|
|
442
|
+
params: {
|
|
443
|
+
filePath: string;
|
|
444
|
+
content?: string | undefined;
|
|
445
|
+
};
|
|
446
|
+
jsonrpc: "2.0";
|
|
447
|
+
method: "ide/diffClosed";
|
|
448
|
+
}>;
|
|
449
|
+
/**
|
|
450
|
+
* The request to open a diff view in the IDE.
|
|
451
|
+
*/
|
|
452
|
+
export declare const OpenDiffRequestSchema: z.ZodObject<{
|
|
453
|
+
/**
|
|
454
|
+
* The absolute path to the file to be diffed.
|
|
455
|
+
*/
|
|
456
|
+
filePath: z.ZodString;
|
|
457
|
+
/**
|
|
458
|
+
* The proposed new content for the file.
|
|
459
|
+
*/
|
|
460
|
+
newContent: z.ZodString;
|
|
461
|
+
}, "strip", z.ZodTypeAny, {
|
|
462
|
+
filePath: string;
|
|
463
|
+
newContent: string;
|
|
464
|
+
}, {
|
|
465
|
+
filePath: string;
|
|
466
|
+
newContent: string;
|
|
467
|
+
}>;
|
|
468
|
+
/**
|
|
469
|
+
* The request to close a diff view in the IDE.
|
|
470
|
+
*/
|
|
471
|
+
export declare const CloseDiffRequestSchema: z.ZodObject<{
|
|
472
|
+
/**
|
|
473
|
+
* The absolute path to the file to be diffed.
|
|
474
|
+
*/
|
|
475
|
+
filePath: z.ZodString;
|
|
476
|
+
/**
|
|
477
|
+
* @deprecated
|
|
478
|
+
*/
|
|
479
|
+
suppressNotification: z.ZodOptional<z.ZodBoolean>;
|
|
480
|
+
}, "strip", z.ZodTypeAny, {
|
|
481
|
+
filePath: string;
|
|
482
|
+
suppressNotification?: boolean | undefined;
|
|
483
|
+
}, {
|
|
484
|
+
filePath: string;
|
|
485
|
+
suppressNotification?: boolean | undefined;
|
|
486
|
+
}>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* A file that is open in the IDE.
|
|
9
|
+
*/
|
|
10
|
+
export const FileSchema = z.object({
|
|
11
|
+
/**
|
|
12
|
+
* The absolute path to the file.
|
|
13
|
+
*/
|
|
14
|
+
path: z.string(),
|
|
15
|
+
/**
|
|
16
|
+
* The unix timestamp of when the file was last focused.
|
|
17
|
+
*/
|
|
18
|
+
timestamp: z.number(),
|
|
19
|
+
/**
|
|
20
|
+
* Whether the file is the currently active file. Only one file can be active at a time.
|
|
21
|
+
*/
|
|
22
|
+
isActive: z.boolean().optional(),
|
|
23
|
+
/**
|
|
24
|
+
* The text that is currently selected in the active file.
|
|
25
|
+
*/
|
|
26
|
+
selectedText: z.string().optional(),
|
|
27
|
+
/**
|
|
28
|
+
* The cursor position in the active file.
|
|
29
|
+
*/
|
|
30
|
+
cursor: z
|
|
31
|
+
.object({
|
|
32
|
+
/**
|
|
33
|
+
* The 1-based line number.
|
|
34
|
+
*/
|
|
35
|
+
line: z.number(),
|
|
36
|
+
/**
|
|
37
|
+
* The 1-based character offset.
|
|
38
|
+
*/
|
|
39
|
+
character: z.number(),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* The context of the IDE.
|
|
45
|
+
*/
|
|
46
|
+
export const IdeContextSchema = z.object({
|
|
47
|
+
workspaceState: z
|
|
48
|
+
.object({
|
|
49
|
+
/**
|
|
50
|
+
* The list of files that are currently open.
|
|
51
|
+
*/
|
|
52
|
+
openFiles: z.array(FileSchema).optional(),
|
|
53
|
+
/**
|
|
54
|
+
* Whether the workspace is trusted.
|
|
55
|
+
*/
|
|
56
|
+
isTrusted: z.boolean().optional(),
|
|
57
|
+
})
|
|
58
|
+
.optional(),
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* A notification that the IDE context has been updated.
|
|
62
|
+
*/
|
|
63
|
+
export const IdeContextNotificationSchema = z.object({
|
|
64
|
+
jsonrpc: z.literal('2.0'),
|
|
65
|
+
method: z.literal('ide/contextUpdate'),
|
|
66
|
+
params: IdeContextSchema,
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* A notification that a diff has been accepted in the IDE.
|
|
70
|
+
*/
|
|
71
|
+
export const IdeDiffAcceptedNotificationSchema = z.object({
|
|
72
|
+
jsonrpc: z.literal('2.0'),
|
|
73
|
+
method: z.literal('ide/diffAccepted'),
|
|
74
|
+
params: z.object({
|
|
75
|
+
/**
|
|
76
|
+
* The absolute path to the file that was diffed.
|
|
77
|
+
*/
|
|
78
|
+
filePath: z.string(),
|
|
79
|
+
/**
|
|
80
|
+
* The full content of the file after the diff was accepted, which includes any manual edits the user may have made.
|
|
81
|
+
*/
|
|
82
|
+
content: z.string(),
|
|
83
|
+
}),
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* A notification that a diff has been rejected in the IDE.
|
|
87
|
+
*/
|
|
88
|
+
export const IdeDiffRejectedNotificationSchema = z.object({
|
|
89
|
+
jsonrpc: z.literal('2.0'),
|
|
90
|
+
method: z.literal('ide/diffRejected'),
|
|
91
|
+
params: z.object({
|
|
92
|
+
/**
|
|
93
|
+
* The absolute path to the file that was diffed.
|
|
94
|
+
*/
|
|
95
|
+
filePath: z.string(),
|
|
96
|
+
}),
|
|
97
|
+
});
|
|
98
|
+
/**
|
|
99
|
+
* This is defineded for backwards compatability only. Newer extension versions
|
|
100
|
+
* will only send IdeDiffRejectedNotificationSchema.
|
|
101
|
+
*
|
|
102
|
+
* A notification that a diff has been closed in the IDE.
|
|
103
|
+
*/
|
|
104
|
+
export const IdeDiffClosedNotificationSchema = z.object({
|
|
105
|
+
jsonrpc: z.literal('2.0'),
|
|
106
|
+
method: z.literal('ide/diffClosed'),
|
|
107
|
+
params: z.object({
|
|
108
|
+
filePath: z.string(),
|
|
109
|
+
content: z.string().optional(),
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
/**
|
|
113
|
+
* The request to open a diff view in the IDE.
|
|
114
|
+
*/
|
|
115
|
+
export const OpenDiffRequestSchema = z.object({
|
|
116
|
+
/**
|
|
117
|
+
* The absolute path to the file to be diffed.
|
|
118
|
+
*/
|
|
119
|
+
filePath: z.string(),
|
|
120
|
+
/**
|
|
121
|
+
* The proposed new content for the file.
|
|
122
|
+
*/
|
|
123
|
+
newContent: z.string(),
|
|
124
|
+
});
|
|
125
|
+
/**
|
|
126
|
+
* The request to close a diff view in the IDE.
|
|
127
|
+
*/
|
|
128
|
+
export const CloseDiffRequestSchema = z.object({
|
|
129
|
+
/**
|
|
130
|
+
* The absolute path to the file to be diffed.
|
|
131
|
+
*/
|
|
132
|
+
filePath: z.string(),
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated
|
|
135
|
+
*/
|
|
136
|
+
suppressNotification: z.boolean().optional(),
|
|
137
|
+
});
|
|
138
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ide/types.ts"],"names":[],"mappings":"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"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
export * from './config/config.js';
|
|
7
|
+
export * from './output/types.js';
|
|
8
|
+
export * from './output/json-formatter.js';
|
|
9
|
+
export * from './policy/types.js';
|
|
10
|
+
export * from './policy/policy-engine.js';
|
|
7
11
|
export * from './core/client.js';
|
|
8
12
|
export * from './core/contentGenerator.js';
|
|
9
13
|
export * from './core/loggingContentGenerator.js';
|
|
@@ -15,6 +19,7 @@ export * from './core/turn.js';
|
|
|
15
19
|
export * from './core/geminiRequest.js';
|
|
16
20
|
export * from './core/coreToolScheduler.js';
|
|
17
21
|
export * from './core/nonInteractiveToolExecutor.js';
|
|
22
|
+
export * from './fallback/types.js';
|
|
18
23
|
export * from './code_assist/codeAssist.js';
|
|
19
24
|
export * from './code_assist/oauth2.js';
|
|
20
25
|
export * from './code_assist/server.js';
|
|
@@ -31,6 +36,7 @@ export * from './utils/quotaErrorDetection.js';
|
|
|
31
36
|
export * from './utils/fileUtils.js';
|
|
32
37
|
export * from './utils/retry.js';
|
|
33
38
|
export * from './utils/shell-utils.js';
|
|
39
|
+
export * from './utils/terminalSerializer.js';
|
|
34
40
|
export * from './utils/systemEncoding.js';
|
|
35
41
|
export * from './utils/textUtils.js';
|
|
36
42
|
export * from './utils/formatters.js';
|
|
@@ -40,6 +46,7 @@ export * from './utils/errorParsing.js';
|
|
|
40
46
|
export * from './utils/workspaceContext.js';
|
|
41
47
|
export * from './utils/ignorePatterns.js';
|
|
42
48
|
export * from './utils/partUtils.js';
|
|
49
|
+
export * from './utils/promptIdContext.js';
|
|
43
50
|
export * from './services/fileDiscoveryService.js';
|
|
44
51
|
export * from './services/gitService.js';
|
|
45
52
|
export * from './services/chatRecordingService.js';
|
|
@@ -47,9 +54,9 @@ export * from './services/fileSystemService.js';
|
|
|
47
54
|
export * from './ide/ide-client.js';
|
|
48
55
|
export * from './ide/ideContext.js';
|
|
49
56
|
export * from './ide/ide-installer.js';
|
|
50
|
-
export {
|
|
51
|
-
export { type IdeInfo } from './ide/detect-ide.js';
|
|
57
|
+
export { IDE_DEFINITIONS, type IdeInfo } from './ide/detect-ide.js';
|
|
52
58
|
export * from './ide/constants.js';
|
|
59
|
+
export * from './ide/types.js';
|
|
53
60
|
export * from './services/shellExecutionService.js';
|
|
54
61
|
export * from './tools/tools.js';
|
|
55
62
|
export * from './tools/tool-error.js';
|
|
@@ -79,3 +86,4 @@ export * from './telemetry/index.js';
|
|
|
79
86
|
export { sessionId } from './utils/session.js';
|
|
80
87
|
export * from './utils/browser.js';
|
|
81
88
|
export { Storage } from './config/storage.js';
|
|
89
|
+
export * from './test-utils/index.js';
|