@google/gemini-cli-core 0.0.3-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +310 -0
- package/dist/.last_build +0 -0
- package/dist/google-gemini-cli-core-0.3.0-preview.3.tgz +0 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/src/__mocks__/fs/promises.d.ts +11 -0
- package/dist/src/__mocks__/fs/promises.js +17 -0
- package/dist/src/__mocks__/fs/promises.js.map +1 -0
- package/dist/src/code_assist/codeAssist.d.ts +10 -0
- package/dist/src/code_assist/codeAssist.js +19 -0
- package/dist/src/code_assist/codeAssist.js.map +1 -0
- package/dist/src/code_assist/converter.d.ts +72 -0
- package/dist/src/code_assist/converter.js +159 -0
- package/dist/src/code_assist/converter.js.map +1 -0
- package/dist/src/code_assist/converter.test.d.ts +6 -0
- package/dist/src/code_assist/converter.test.js +362 -0
- package/dist/src/code_assist/converter.test.js.map +1 -0
- package/dist/src/code_assist/oauth2.d.ts +22 -0
- package/dist/src/code_assist/oauth2.js +353 -0
- package/dist/src/code_assist/oauth2.js.map +1 -0
- package/dist/src/code_assist/oauth2.test.d.ts +6 -0
- package/dist/src/code_assist/oauth2.test.js +427 -0
- package/dist/src/code_assist/oauth2.test.js.map +1 -0
- package/dist/src/code_assist/server.d.ts +37 -0
- package/dist/src/code_assist/server.js +125 -0
- package/dist/src/code_assist/server.js.map +1 -0
- package/dist/src/code_assist/server.test.d.ts +6 -0
- package/dist/src/code_assist/server.test.js +134 -0
- package/dist/src/code_assist/server.test.js.map +1 -0
- package/dist/src/code_assist/setup.d.ts +20 -0
- package/dist/src/code_assist/setup.js +101 -0
- package/dist/src/code_assist/setup.js.map +1 -0
- package/dist/src/code_assist/setup.test.d.ts +6 -0
- package/dist/src/code_assist/setup.test.js +171 -0
- package/dist/src/code_assist/setup.test.js.map +1 -0
- package/dist/src/code_assist/types.d.ts +148 -0
- package/dist/src/code_assist/types.js +46 -0
- package/dist/src/code_assist/types.js.map +1 -0
- package/dist/src/config/config.d.ts +318 -0
- package/dist/src/config/config.js +633 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/config.test.d.ts +6 -0
- package/dist/src/config/config.test.js +585 -0
- package/dist/src/config/config.test.js.map +1 -0
- package/dist/src/config/flashFallback.test.d.ts +6 -0
- package/dist/src/config/flashFallback.test.js +87 -0
- package/dist/src/config/flashFallback.test.js.map +1 -0
- package/dist/src/config/models.d.ts +9 -0
- package/dist/src/config/models.js +10 -0
- package/dist/src/config/models.js.map +1 -0
- package/dist/src/config/storage.d.ts +32 -0
- package/dist/src/config/storage.js +90 -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 +43 -0
- package/dist/src/config/storage.test.js.map +1 -0
- package/dist/src/core/client.d.ts +65 -0
- package/dist/src/core/client.js +689 -0
- package/dist/src/core/client.js.map +1 -0
- package/dist/src/core/client.test.d.ts +6 -0
- package/dist/src/core/client.test.js +1857 -0
- package/dist/src/core/client.test.js.map +1 -0
- package/dist/src/core/contentGenerator.d.ts +33 -0
- package/dist/src/core/contentGenerator.js +80 -0
- package/dist/src/core/contentGenerator.js.map +1 -0
- package/dist/src/core/contentGenerator.test.d.ts +6 -0
- package/dist/src/core/contentGenerator.test.js +124 -0
- package/dist/src/core/contentGenerator.test.js.map +1 -0
- package/dist/src/core/coreToolScheduler.d.ts +126 -0
- package/dist/src/core/coreToolScheduler.js +605 -0
- package/dist/src/core/coreToolScheduler.js.map +1 -0
- package/dist/src/core/coreToolScheduler.test.d.ts +6 -0
- package/dist/src/core/coreToolScheduler.test.js +923 -0
- package/dist/src/core/coreToolScheduler.test.js.map +1 -0
- package/dist/src/core/geminiChat.d.ts +122 -0
- package/dist/src/core/geminiChat.js +547 -0
- package/dist/src/core/geminiChat.js.map +1 -0
- package/dist/src/core/geminiChat.test.d.ts +6 -0
- package/dist/src/core/geminiChat.test.js +875 -0
- package/dist/src/core/geminiChat.test.js.map +1 -0
- package/dist/src/core/geminiRequest.d.ts +13 -0
- package/dist/src/core/geminiRequest.js +11 -0
- package/dist/src/core/geminiRequest.js.map +1 -0
- package/dist/src/core/logger.d.ts +60 -0
- package/dist/src/core/logger.js +360 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/logger.test.d.ts +6 -0
- package/dist/src/core/logger.test.js +534 -0
- package/dist/src/core/logger.test.js.map +1 -0
- package/dist/src/core/loggingContentGenerator.d.ts +25 -0
- package/dist/src/core/loggingContentGenerator.js +97 -0
- package/dist/src/core/loggingContentGenerator.js.map +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.d.ts +10 -0
- package/dist/src/core/nonInteractiveToolExecutor.js +24 -0
- package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js +236 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
- package/dist/src/core/prompts.d.ts +12 -0
- package/dist/src/core/prompts.js +359 -0
- package/dist/src/core/prompts.js.map +1 -0
- package/dist/src/core/prompts.test.d.ts +6 -0
- package/dist/src/core/prompts.test.js +214 -0
- package/dist/src/core/prompts.test.js.map +1 -0
- package/dist/src/core/subagent.d.ts +236 -0
- package/dist/src/core/subagent.js +485 -0
- package/dist/src/core/subagent.js.map +1 -0
- package/dist/src/core/subagent.test.d.ts +6 -0
- package/dist/src/core/subagent.test.js +520 -0
- package/dist/src/core/subagent.test.js.map +1 -0
- package/dist/src/core/tokenLimits.d.ts +10 -0
- package/dist/src/core/tokenLimits.js +28 -0
- package/dist/src/core/tokenLimits.js.map +1 -0
- package/dist/src/core/turn.d.ts +125 -0
- package/dist/src/core/turn.js +154 -0
- package/dist/src/core/turn.js.map +1 -0
- package/dist/src/core/turn.test.d.ts +6 -0
- package/dist/src/core/turn.test.js +388 -0
- package/dist/src/core/turn.test.js.map +1 -0
- package/dist/src/generated/git-commit.d.ts +7 -0
- package/dist/src/generated/git-commit.js +10 -0
- package/dist/src/generated/git-commit.js.map +1 -0
- package/dist/src/ide/constants.d.ts +6 -0
- package/dist/src/ide/constants.js +7 -0
- package/dist/src/ide/constants.js.map +1 -0
- package/dist/src/ide/detect-ide.d.ts +25 -0
- package/dist/src/ide/detect-ide.js +104 -0
- package/dist/src/ide/detect-ide.js.map +1 -0
- package/dist/src/ide/detect-ide.test.d.ts +6 -0
- package/dist/src/ide/detect-ide.test.js +109 -0
- package/dist/src/ide/detect-ide.test.js.map +1 -0
- package/dist/src/ide/ide-client.d.ts +67 -0
- package/dist/src/ide/ide-client.js +418 -0
- package/dist/src/ide/ide-client.js.map +1 -0
- package/dist/src/ide/ide-client.test.d.ts +6 -0
- package/dist/src/ide/ide-client.test.js +155 -0
- package/dist/src/ide/ide-client.test.js.map +1 -0
- package/dist/src/ide/ide-installer.d.ts +14 -0
- package/dist/src/ide/ide-installer.js +107 -0
- package/dist/src/ide/ide-installer.js.map +1 -0
- package/dist/src/ide/ide-installer.test.d.ts +6 -0
- package/dist/src/ide/ide-installer.test.js +113 -0
- package/dist/src/ide/ide-installer.test.js.map +1 -0
- package/dist/src/ide/ideContext.d.ts +374 -0
- package/dist/src/ide/ideContext.js +147 -0
- package/dist/src/ide/ideContext.js.map +1 -0
- package/dist/src/ide/ideContext.test.d.ts +6 -0
- package/dist/src/ide/ideContext.test.js +265 -0
- package/dist/src/ide/ideContext.test.js.map +1 -0
- package/dist/src/ide/process-utils.d.ts +22 -0
- package/dist/src/ide/process-utils.js +153 -0
- package/dist/src/ide/process-utils.js.map +1 -0
- package/dist/src/ide/process-utils.test.d.ts +6 -0
- package/dist/src/ide/process-utils.test.js +72 -0
- package/dist/src/ide/process-utils.test.js.map +1 -0
- package/dist/src/index.d.ts +81 -0
- package/dist/src/index.js +90 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.test.d.ts +6 -0
- package/dist/src/index.test.js +12 -0
- package/dist/src/index.test.js.map +1 -0
- package/dist/src/mcp/google-auth-provider.d.ts +23 -0
- package/dist/src/mcp/google-auth-provider.js +72 -0
- package/dist/src/mcp/google-auth-provider.js.map +1 -0
- package/dist/src/mcp/google-auth-provider.test.d.ts +6 -0
- package/dist/src/mcp/google-auth-provider.test.js +89 -0
- package/dist/src/mcp/google-auth-provider.test.js.map +1 -0
- package/dist/src/mcp/oauth-provider.d.ts +146 -0
- package/dist/src/mcp/oauth-provider.js +601 -0
- package/dist/src/mcp/oauth-provider.js.map +1 -0
- package/dist/src/mcp/oauth-provider.test.d.ts +6 -0
- package/dist/src/mcp/oauth-provider.test.js +672 -0
- package/dist/src/mcp/oauth-provider.test.js.map +1 -0
- package/dist/src/mcp/oauth-token-storage.d.ts +61 -0
- package/dist/src/mcp/oauth-token-storage.js +148 -0
- package/dist/src/mcp/oauth-token-storage.js.map +1 -0
- package/dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
- package/dist/src/mcp/oauth-token-storage.test.js +206 -0
- package/dist/src/mcp/oauth-token-storage.test.js.map +1 -0
- package/dist/src/mcp/oauth-utils.d.ts +119 -0
- package/dist/src/mcp/oauth-utils.js +235 -0
- package/dist/src/mcp/oauth-utils.js.map +1 -0
- package/dist/src/mcp/oauth-utils.test.d.ts +6 -0
- package/dist/src/mcp/oauth-utils.test.js +199 -0
- package/dist/src/mcp/oauth-utils.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/types.d.ts +34 -0
- package/dist/src/mcp/token-storage/types.js +7 -0
- package/dist/src/mcp/token-storage/types.js.map +1 -0
- package/dist/src/mocks/msw.d.ts +6 -0
- package/dist/src/mocks/msw.js +8 -0
- package/dist/src/mocks/msw.js.map +1 -0
- package/dist/src/prompts/mcp-prompts.d.ts +8 -0
- package/dist/src/prompts/mcp-prompts.js +13 -0
- package/dist/src/prompts/mcp-prompts.js.map +1 -0
- package/dist/src/prompts/prompt-registry.d.ts +34 -0
- package/dist/src/prompts/prompt-registry.js +63 -0
- package/dist/src/prompts/prompt-registry.js.map +1 -0
- package/dist/src/services/chatRecordingService.d.ts +150 -0
- package/dist/src/services/chatRecordingService.js +321 -0
- package/dist/src/services/chatRecordingService.js.map +1 -0
- package/dist/src/services/chatRecordingService.test.d.ts +6 -0
- package/dist/src/services/chatRecordingService.test.js +290 -0
- package/dist/src/services/chatRecordingService.test.js.map +1 -0
- package/dist/src/services/fileDiscoveryService.d.ts +35 -0
- package/dist/src/services/fileDiscoveryService.js +91 -0
- package/dist/src/services/fileDiscoveryService.js.map +1 -0
- package/dist/src/services/fileDiscoveryService.test.d.ts +6 -0
- package/dist/src/services/fileDiscoveryService.test.js +143 -0
- package/dist/src/services/fileDiscoveryService.test.js.map +1 -0
- package/dist/src/services/fileSystemService.d.ts +31 -0
- package/dist/src/services/fileSystemService.js +18 -0
- package/dist/src/services/fileSystemService.js.map +1 -0
- package/dist/src/services/fileSystemService.test.d.ts +6 -0
- package/dist/src/services/fileSystemService.test.js +41 -0
- package/dist/src/services/fileSystemService.test.js.map +1 -0
- package/dist/src/services/gitService.d.ts +23 -0
- package/dist/src/services/gitService.js +110 -0
- package/dist/src/services/gitService.js.map +1 -0
- package/dist/src/services/gitService.test.d.ts +6 -0
- package/dist/src/services/gitService.test.js +212 -0
- package/dist/src/services/gitService.test.js.map +1 -0
- package/dist/src/services/loopDetectionService.d.ts +98 -0
- package/dist/src/services/loopDetectionService.js +363 -0
- package/dist/src/services/loopDetectionService.js.map +1 -0
- package/dist/src/services/loopDetectionService.test.d.ts +6 -0
- package/dist/src/services/loopDetectionService.test.js +558 -0
- package/dist/src/services/loopDetectionService.test.js.map +1 -0
- package/dist/src/services/shellExecutionService.d.ts +68 -0
- package/dist/src/services/shellExecutionService.js +332 -0
- package/dist/src/services/shellExecutionService.js.map +1 -0
- package/dist/src/services/shellExecutionService.test.d.ts +6 -0
- package/dist/src/services/shellExecutionService.test.js +517 -0
- package/dist/src/services/shellExecutionService.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +121 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +773 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +17 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +407 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +90 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +229 -0
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -0
- package/dist/src/telemetry/constants.d.ts +32 -0
- package/dist/src/telemetry/constants.js +33 -0
- package/dist/src/telemetry/constants.js.map +1 -0
- package/dist/src/telemetry/file-exporters.d.ts +29 -0
- package/dist/src/telemetry/file-exporters.js +62 -0
- package/dist/src/telemetry/file-exporters.js.map +1 -0
- package/dist/src/telemetry/index.d.ts +21 -0
- package/dist/src/telemetry/index.js +21 -0
- package/dist/src/telemetry/index.js.map +1 -0
- package/dist/src/telemetry/integration.test.circular.d.ts +6 -0
- package/dist/src/telemetry/integration.test.circular.js +54 -0
- package/dist/src/telemetry/integration.test.circular.js.map +1 -0
- package/dist/src/telemetry/loggers.d.ts +26 -0
- package/dist/src/telemetry/loggers.js +404 -0
- package/dist/src/telemetry/loggers.js.map +1 -0
- package/dist/src/telemetry/loggers.test.circular.d.ts +6 -0
- package/dist/src/telemetry/loggers.test.circular.js +107 -0
- package/dist/src/telemetry/loggers.test.circular.js.map +1 -0
- package/dist/src/telemetry/loggers.test.d.ts +6 -0
- package/dist/src/telemetry/loggers.test.js +658 -0
- package/dist/src/telemetry/loggers.test.js.map +1 -0
- package/dist/src/telemetry/metrics.d.ts +36 -0
- package/dist/src/telemetry/metrics.js +208 -0
- package/dist/src/telemetry/metrics.js.map +1 -0
- package/dist/src/telemetry/metrics.test.d.ts +6 -0
- package/dist/src/telemetry/metrics.test.js +242 -0
- package/dist/src/telemetry/metrics.test.js.map +1 -0
- package/dist/src/telemetry/sdk.d.ts +9 -0
- package/dist/src/telemetry/sdk.js +163 -0
- package/dist/src/telemetry/sdk.js.map +1 -0
- package/dist/src/telemetry/sdk.test.d.ts +6 -0
- package/dist/src/telemetry/sdk.test.js +82 -0
- package/dist/src/telemetry/sdk.test.js.map +1 -0
- 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/telemetry.test.d.ts +6 -0
- package/dist/src/telemetry/telemetry.test.js +50 -0
- package/dist/src/telemetry/telemetry.test.js.map +1 -0
- package/dist/src/telemetry/tool-call-decision.d.ts +13 -0
- package/dist/src/telemetry/tool-call-decision.js +29 -0
- package/dist/src/telemetry/tool-call-decision.js.map +1 -0
- package/dist/src/telemetry/types.d.ts +220 -0
- package/dist/src/telemetry/types.js +383 -0
- package/dist/src/telemetry/types.js.map +1 -0
- package/dist/src/telemetry/uiTelemetry.d.ts +75 -0
- package/dist/src/telemetry/uiTelemetry.js +153 -0
- package/dist/src/telemetry/uiTelemetry.js.map +1 -0
- package/dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
- package/dist/src/telemetry/uiTelemetry.test.js +558 -0
- package/dist/src/telemetry/uiTelemetry.test.js.map +1 -0
- package/dist/src/test-utils/config.d.ts +17 -0
- package/dist/src/test-utils/config.js +32 -0
- package/dist/src/test-utils/config.js.map +1 -0
- package/dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
- package/dist/src/test-utils/mockWorkspaceContext.js +24 -0
- package/dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
- package/dist/src/test-utils/tools.d.ts +45 -0
- package/dist/src/test-utils/tools.js +105 -0
- package/dist/src/test-utils/tools.js.map +1 -0
- package/dist/src/tools/diffOptions.d.ts +9 -0
- package/dist/src/tools/diffOptions.js +38 -0
- package/dist/src/tools/diffOptions.js.map +1 -0
- package/dist/src/tools/diffOptions.test.d.ts +6 -0
- package/dist/src/tools/diffOptions.test.js +119 -0
- package/dist/src/tools/diffOptions.test.js.map +1 -0
- package/dist/src/tools/edit.d.ts +56 -0
- package/dist/src/tools/edit.js +423 -0
- package/dist/src/tools/edit.js.map +1 -0
- package/dist/src/tools/edit.test.d.ts +6 -0
- package/dist/src/tools/edit.test.js +713 -0
- package/dist/src/tools/edit.test.js.map +1 -0
- package/dist/src/tools/glob.d.ts +52 -0
- package/dist/src/tools/glob.js +236 -0
- package/dist/src/tools/glob.js.map +1 -0
- package/dist/src/tools/glob.test.d.ts +6 -0
- package/dist/src/tools/glob.test.js +375 -0
- package/dist/src/tools/glob.test.js.map +1 -0
- package/dist/src/tools/grep.d.ts +47 -0
- package/dist/src/tools/grep.js +517 -0
- package/dist/src/tools/grep.js.map +1 -0
- package/dist/src/tools/grep.test.d.ts +6 -0
- package/dist/src/tools/grep.test.js +295 -0
- package/dist/src/tools/grep.test.js.map +1 -0
- package/dist/src/tools/ls.d.ts +68 -0
- package/dist/src/tools/ls.js +227 -0
- package/dist/src/tools/ls.js.map +1 -0
- package/dist/src/tools/ls.test.d.ts +6 -0
- package/dist/src/tools/ls.test.js +389 -0
- package/dist/src/tools/ls.test.js.map +1 -0
- package/dist/src/tools/mcp-client-manager.d.ts +38 -0
- package/dist/src/tools/mcp-client-manager.js +74 -0
- package/dist/src/tools/mcp-client-manager.js.map +1 -0
- package/dist/src/tools/mcp-client-manager.test.d.ts +6 -0
- package/dist/src/tools/mcp-client-manager.test.js +39 -0
- package/dist/src/tools/mcp-client-manager.test.js.map +1 -0
- package/dist/src/tools/mcp-client.d.ts +199 -0
- package/dist/src/tools/mcp-client.js +995 -0
- package/dist/src/tools/mcp-client.js.map +1 -0
- package/dist/src/tools/mcp-client.test.d.ts +6 -0
- package/dist/src/tools/mcp-client.test.js +454 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -0
- package/dist/src/tools/mcp-tool.d.ts +23 -0
- package/dist/src/tools/mcp-tool.js +240 -0
- package/dist/src/tools/mcp-tool.js.map +1 -0
- package/dist/src/tools/mcp-tool.test.d.ts +6 -0
- package/dist/src/tools/mcp-tool.test.js +576 -0
- package/dist/src/tools/mcp-tool.test.js.map +1 -0
- package/dist/src/tools/memoryTool.d.ts +40 -0
- package/dist/src/tools/memoryTool.js +296 -0
- package/dist/src/tools/memoryTool.js.map +1 -0
- package/dist/src/tools/memoryTool.test.d.ts +6 -0
- package/dist/src/tools/memoryTool.test.js +298 -0
- package/dist/src/tools/memoryTool.test.js.map +1 -0
- package/dist/src/tools/modifiable-tool.d.ts +32 -0
- package/dist/src/tools/modifiable-tool.js +88 -0
- package/dist/src/tools/modifiable-tool.js.map +1 -0
- package/dist/src/tools/modifiable-tool.test.d.ts +6 -0
- package/dist/src/tools/modifiable-tool.test.js +193 -0
- package/dist/src/tools/modifiable-tool.test.js.map +1 -0
- package/dist/src/tools/read-file.d.ts +35 -0
- package/dist/src/tools/read-file.js +127 -0
- package/dist/src/tools/read-file.js.map +1 -0
- package/dist/src/tools/read-file.test.d.ts +6 -0
- package/dist/src/tools/read-file.test.js +311 -0
- package/dist/src/tools/read-file.test.js.map +1 -0
- package/dist/src/tools/read-many-files.d.ts +60 -0
- package/dist/src/tools/read-many-files.js +414 -0
- package/dist/src/tools/read-many-files.js.map +1 -0
- package/dist/src/tools/read-many-files.test.d.ts +6 -0
- package/dist/src/tools/read-many-files.test.js +565 -0
- package/dist/src/tools/read-many-files.test.js.map +1 -0
- package/dist/src/tools/ripGrep.d.ts +47 -0
- package/dist/src/tools/ripGrep.js +368 -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 +874 -0
- package/dist/src/tools/ripGrep.test.js.map +1 -0
- package/dist/src/tools/shell.d.ts +22 -0
- package/dist/src/tools/shell.js +320 -0
- package/dist/src/tools/shell.js.map +1 -0
- package/dist/src/tools/shell.test.d.ts +6 -0
- package/dist/src/tools/shell.test.js +336 -0
- package/dist/src/tools/shell.test.js.map +1 -0
- package/dist/src/tools/tool-error.d.ts +43 -0
- package/dist/src/tools/tool-error.js +58 -0
- package/dist/src/tools/tool-error.js.map +1 -0
- package/dist/src/tools/tool-registry.d.ts +86 -0
- package/dist/src/tools/tool-registry.js +369 -0
- package/dist/src/tools/tool-registry.js.map +1 -0
- package/dist/src/tools/tool-registry.test.d.ts +6 -0
- package/dist/src/tools/tool-registry.test.js +332 -0
- package/dist/src/tools/tool-registry.test.js.map +1 -0
- package/dist/src/tools/tools.d.ts +274 -0
- package/dist/src/tools/tools.js +250 -0
- package/dist/src/tools/tools.js.map +1 -0
- package/dist/src/tools/tools.test.d.ts +6 -0
- package/dist/src/tools/tools.test.js +205 -0
- package/dist/src/tools/tools.test.js.map +1 -0
- package/dist/src/tools/web-fetch.d.ts +27 -0
- package/dist/src/tools/web-fetch.js +243 -0
- package/dist/src/tools/web-fetch.js.map +1 -0
- package/dist/src/tools/web-fetch.test.d.ts +6 -0
- package/dist/src/tools/web-fetch.test.js +114 -0
- package/dist/src/tools/web-fetch.test.js.map +1 -0
- package/dist/src/tools/web-search.d.ts +49 -0
- package/dist/src/tools/web-search.js +137 -0
- package/dist/src/tools/web-search.js.map +1 -0
- package/dist/src/tools/web-search.test.d.ts +6 -0
- package/dist/src/tools/web-search.test.js +207 -0
- package/dist/src/tools/web-search.test.js.map +1 -0
- package/dist/src/tools/write-file.d.ts +52 -0
- package/dist/src/tools/write-file.js +314 -0
- package/dist/src/tools/write-file.js.map +1 -0
- package/dist/src/tools/write-file.test.d.ts +6 -0
- package/dist/src/tools/write-file.test.js +531 -0
- package/dist/src/tools/write-file.test.js.map +1 -0
- package/dist/src/utils/LruCache.d.ts +13 -0
- package/dist/src/utils/LruCache.js +38 -0
- package/dist/src/utils/LruCache.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.d.ts +24 -0
- package/dist/src/utils/bfsFileSearch.js +89 -0
- package/dist/src/utils/bfsFileSearch.js.map +1 -0
- package/dist/src/utils/bfsFileSearch.test.d.ts +6 -0
- package/dist/src/utils/bfsFileSearch.test.js +163 -0
- package/dist/src/utils/bfsFileSearch.test.js.map +1 -0
- package/dist/src/utils/browser.d.ts +13 -0
- package/dist/src/utils/browser.js +50 -0
- package/dist/src/utils/browser.js.map +1 -0
- package/dist/src/utils/editCorrector.d.ts +53 -0
- package/dist/src/utils/editCorrector.js +545 -0
- package/dist/src/utils/editCorrector.js.map +1 -0
- package/dist/src/utils/editCorrector.test.d.ts +6 -0
- package/dist/src/utils/editCorrector.test.js +564 -0
- package/dist/src/utils/editCorrector.test.js.map +1 -0
- package/dist/src/utils/editor.d.ts +28 -0
- package/dist/src/utils/editor.js +186 -0
- package/dist/src/utils/editor.js.map +1 -0
- package/dist/src/utils/editor.test.d.ts +6 -0
- package/dist/src/utils/editor.test.js +445 -0
- package/dist/src/utils/editor.test.js.map +1 -0
- package/dist/src/utils/environmentContext.d.ts +21 -0
- package/dist/src/utils/environmentContext.js +90 -0
- package/dist/src/utils/environmentContext.js.map +1 -0
- package/dist/src/utils/environmentContext.test.d.ts +6 -0
- package/dist/src/utils/environmentContext.test.js +140 -0
- package/dist/src/utils/environmentContext.test.js.map +1 -0
- package/dist/src/utils/errorParsing.d.ts +8 -0
- package/dist/src/utils/errorParsing.js +93 -0
- package/dist/src/utils/errorParsing.js.map +1 -0
- package/dist/src/utils/errorParsing.test.d.ts +6 -0
- package/dist/src/utils/errorParsing.test.js +172 -0
- package/dist/src/utils/errorParsing.test.js.map +1 -0
- package/dist/src/utils/errorReporting.d.ts +14 -0
- package/dist/src/utils/errorReporting.js +88 -0
- package/dist/src/utils/errorReporting.js.map +1 -0
- package/dist/src/utils/errorReporting.test.d.ts +6 -0
- package/dist/src/utils/errorReporting.test.js +130 -0
- package/dist/src/utils/errorReporting.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +33 -0
- package/dist/src/utils/errors.js +86 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/fetch.d.ts +11 -0
- package/dist/src/utils/fetch.js +51 -0
- package/dist/src/utils/fetch.js.map +1 -0
- package/dist/src/utils/fileUtils.d.ts +52 -0
- package/dist/src/utils/fileUtils.js +283 -0
- package/dist/src/utils/fileUtils.js.map +1 -0
- package/dist/src/utils/fileUtils.test.d.ts +6 -0
- package/dist/src/utils/fileUtils.test.js +364 -0
- package/dist/src/utils/fileUtils.test.js.map +1 -0
- package/dist/src/utils/filesearch/crawlCache.d.ts +25 -0
- package/dist/src/utils/filesearch/crawlCache.js +57 -0
- package/dist/src/utils/filesearch/crawlCache.js.map +1 -0
- package/dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
- package/dist/src/utils/filesearch/crawlCache.test.js +103 -0
- package/dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
- package/dist/src/utils/filesearch/crawler.d.ts +15 -0
- package/dist/src/utils/filesearch/crawler.js +50 -0
- package/dist/src/utils/filesearch/crawler.js.map +1 -0
- package/dist/src/utils/filesearch/crawler.test.d.ts +6 -0
- package/dist/src/utils/filesearch/crawler.test.js +468 -0
- package/dist/src/utils/filesearch/crawler.test.js.map +1 -0
- package/dist/src/utils/filesearch/fileSearch.d.ts +38 -0
- package/dist/src/utils/filesearch/fileSearch.js +191 -0
- package/dist/src/utils/filesearch/fileSearch.js.map +1 -0
- package/dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
- package/dist/src/utils/filesearch/fileSearch.test.js +642 -0
- package/dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
- package/dist/src/utils/filesearch/ignore.d.ts +42 -0
- package/dist/src/utils/filesearch/ignore.js +106 -0
- package/dist/src/utils/filesearch/ignore.js.map +1 -0
- package/dist/src/utils/filesearch/ignore.test.d.ts +6 -0
- package/dist/src/utils/filesearch/ignore.test.js +144 -0
- package/dist/src/utils/filesearch/ignore.test.js.map +1 -0
- package/dist/src/utils/filesearch/result-cache.d.ts +33 -0
- package/dist/src/utils/filesearch/result-cache.js +59 -0
- package/dist/src/utils/filesearch/result-cache.js.map +1 -0
- package/dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
- package/dist/src/utils/filesearch/result-cache.test.js +46 -0
- package/dist/src/utils/filesearch/result-cache.test.js.map +1 -0
- package/dist/src/utils/flashFallback.integration.test.d.ts +6 -0
- package/dist/src/utils/flashFallback.integration.test.js +118 -0
- package/dist/src/utils/flashFallback.integration.test.js.map +1 -0
- package/dist/src/utils/formatters.d.ts +6 -0
- package/dist/src/utils/formatters.js +16 -0
- package/dist/src/utils/formatters.js.map +1 -0
- package/dist/src/utils/generateContentResponseUtilities.d.ts +13 -0
- package/dist/src/utils/generateContentResponseUtilities.js +80 -0
- package/dist/src/utils/generateContentResponseUtilities.js.map +1 -0
- package/dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
- package/dist/src/utils/generateContentResponseUtilities.test.js +235 -0
- package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
- package/dist/src/utils/getFolderStructure.d.ts +31 -0
- package/dist/src/utils/getFolderStructure.js +246 -0
- package/dist/src/utils/getFolderStructure.js.map +1 -0
- package/dist/src/utils/getFolderStructure.test.d.ts +6 -0
- package/dist/src/utils/getFolderStructure.test.js +282 -0
- package/dist/src/utils/getFolderStructure.test.js.map +1 -0
- package/dist/src/utils/getPty.d.ts +19 -0
- package/dist/src/utils/getPty.js +23 -0
- package/dist/src/utils/getPty.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.d.ts +20 -0
- package/dist/src/utils/gitIgnoreParser.js +61 -0
- package/dist/src/utils/gitIgnoreParser.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
- package/dist/src/utils/gitIgnoreParser.test.js +154 -0
- package/dist/src/utils/gitIgnoreParser.test.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +17 -0
- package/dist/src/utils/gitUtils.js +61 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/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/memoryDiscovery.d.ts +15 -0
- package/dist/src/utils/memoryDiscovery.js +253 -0
- package/dist/src/utils/memoryDiscovery.js.map +1 -0
- package/dist/src/utils/memoryDiscovery.test.d.ts +6 -0
- package/dist/src/utils/memoryDiscovery.test.js +219 -0
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -0
- package/dist/src/utils/memoryImportProcessor.d.ts +42 -0
- package/dist/src/utils/memoryImportProcessor.js +296 -0
- package/dist/src/utils/memoryImportProcessor.js.map +1 -0
- package/dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
- package/dist/src/utils/memoryImportProcessor.test.js +573 -0
- package/dist/src/utils/memoryImportProcessor.test.js.map +1 -0
- package/dist/src/utils/messageInspectors.d.ts +8 -0
- package/dist/src/utils/messageInspectors.js +16 -0
- package/dist/src/utils/messageInspectors.js.map +1 -0
- package/dist/src/utils/nextSpeakerChecker.d.ts +12 -0
- package/dist/src/utils/nextSpeakerChecker.js +91 -0
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -0
- package/dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
- package/dist/src/utils/nextSpeakerChecker.test.js +168 -0
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
- package/dist/src/utils/partUtils.d.ts +35 -0
- package/dist/src/utils/partUtils.js +133 -0
- package/dist/src/utils/partUtils.js.map +1 -0
- package/dist/src/utils/partUtils.test.d.ts +6 -0
- package/dist/src/utils/partUtils.test.js +241 -0
- package/dist/src/utils/partUtils.test.js.map +1 -0
- 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 +58 -0
- package/dist/src/utils/paths.js +159 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/paths.test.d.ts +6 -0
- package/dist/src/utils/paths.test.js +225 -0
- package/dist/src/utils/paths.test.js.map +1 -0
- package/dist/src/utils/quotaErrorDetection.d.ts +18 -0
- package/dist/src/utils/quotaErrorDetection.js +65 -0
- package/dist/src/utils/quotaErrorDetection.js.map +1 -0
- package/dist/src/utils/retry.d.ts +30 -0
- package/dist/src/utils/retry.js +276 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/utils/retry.test.d.ts +6 -0
- package/dist/src/utils/retry.test.js +325 -0
- package/dist/src/utils/retry.test.js.map +1 -0
- package/dist/src/utils/safeJsonStringify.d.ts +13 -0
- package/dist/src/utils/safeJsonStringify.js +25 -0
- package/dist/src/utils/safeJsonStringify.js.map +1 -0
- package/dist/src/utils/safeJsonStringify.test.d.ts +6 -0
- package/dist/src/utils/safeJsonStringify.test.js +61 -0
- package/dist/src/utils/safeJsonStringify.test.js.map +1 -0
- package/dist/src/utils/schemaValidator.d.ts +15 -0
- package/dist/src/utils/schemaValidator.js +38 -0
- package/dist/src/utils/schemaValidator.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.d.ts +23 -0
- package/dist/src/utils/secure-browser-launcher.js +165 -0
- package/dist/src/utils/secure-browser-launcher.js.map +1 -0
- package/dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
- package/dist/src/utils/secure-browser-launcher.test.js +149 -0
- package/dist/src/utils/secure-browser-launcher.test.js.map +1 -0
- package/dist/src/utils/session.d.ts +6 -0
- package/dist/src/utils/session.js +8 -0
- package/dist/src/utils/session.js.map +1 -0
- package/dist/src/utils/shell-utils.d.ts +117 -0
- package/dist/src/utils/shell-utils.js +370 -0
- package/dist/src/utils/shell-utils.js.map +1 -0
- package/dist/src/utils/shell-utils.test.d.ts +6 -0
- package/dist/src/utils/shell-utils.test.js +332 -0
- package/dist/src/utils/shell-utils.test.js.map +1 -0
- package/dist/src/utils/summarizer.d.ts +25 -0
- package/dist/src/utils/summarizer.js +51 -0
- package/dist/src/utils/summarizer.js.map +1 -0
- package/dist/src/utils/summarizer.test.d.ts +6 -0
- package/dist/src/utils/summarizer.test.js +131 -0
- package/dist/src/utils/summarizer.test.js.map +1 -0
- package/dist/src/utils/systemEncoding.d.ts +40 -0
- package/dist/src/utils/systemEncoding.js +149 -0
- package/dist/src/utils/systemEncoding.js.map +1 -0
- package/dist/src/utils/systemEncoding.test.d.ts +6 -0
- package/dist/src/utils/systemEncoding.test.js +368 -0
- package/dist/src/utils/systemEncoding.test.js.map +1 -0
- package/dist/src/utils/testUtils.d.ts +29 -0
- package/dist/src/utils/testUtils.js +70 -0
- package/dist/src/utils/testUtils.js.map +1 -0
- package/dist/src/utils/textUtils.d.ts +13 -0
- package/dist/src/utils/textUtils.js +28 -0
- package/dist/src/utils/textUtils.js.map +1 -0
- package/dist/src/utils/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/userAccountManager.test.js +223 -0
- package/dist/src/utils/userAccountManager.test.js.map +1 -0
- package/dist/src/utils/workspaceContext.d.ts +66 -0
- package/dist/src/utils/workspaceContext.js +171 -0
- package/dist/src/utils/workspaceContext.js.map +1 -0
- package/dist/src/utils/workspaceContext.test.d.ts +6 -0
- package/dist/src/utils/workspaceContext.test.js +318 -0
- package/dist/src/utils/workspaceContext.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export type Unsubscribe = () => void;
|
|
7
|
+
/**
|
|
8
|
+
* WorkspaceContext manages multiple workspace directories and validates paths
|
|
9
|
+
* against them. This allows the CLI to operate on files from multiple directories
|
|
10
|
+
* in a single session.
|
|
11
|
+
*/
|
|
12
|
+
export declare class WorkspaceContext {
|
|
13
|
+
private directories;
|
|
14
|
+
private initialDirectories;
|
|
15
|
+
private onDirectoriesChangedListeners;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new WorkspaceContext with the given initial directory and optional additional directories.
|
|
18
|
+
* @param directory The initial working directory (usually cwd)
|
|
19
|
+
* @param additionalDirectories Optional array of additional directories to include
|
|
20
|
+
*/
|
|
21
|
+
constructor(directory: string, additionalDirectories?: string[]);
|
|
22
|
+
/**
|
|
23
|
+
* Registers a listener that is called when the workspace directories change.
|
|
24
|
+
* @param listener The listener to call.
|
|
25
|
+
* @returns A function to unsubscribe the listener.
|
|
26
|
+
*/
|
|
27
|
+
onDirectoriesChanged(listener: () => void): Unsubscribe;
|
|
28
|
+
private notifyDirectoriesChanged;
|
|
29
|
+
/**
|
|
30
|
+
* Adds a directory to the workspace.
|
|
31
|
+
* @param directory The directory path to add (can be relative or absolute)
|
|
32
|
+
* @param basePath Optional base path for resolving relative paths (defaults to cwd)
|
|
33
|
+
*/
|
|
34
|
+
addDirectory(directory: string, basePath?: string): void;
|
|
35
|
+
private resolveAndValidateDir;
|
|
36
|
+
/**
|
|
37
|
+
* Gets a copy of all workspace directories.
|
|
38
|
+
* @returns Array of absolute directory paths
|
|
39
|
+
*/
|
|
40
|
+
getDirectories(): readonly string[];
|
|
41
|
+
getInitialDirectories(): readonly string[];
|
|
42
|
+
setDirectories(directories: readonly string[]): void;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if a given path is within any of the workspace directories.
|
|
45
|
+
* @param pathToCheck The path to validate
|
|
46
|
+
* @returns True if the path is within the workspace, false otherwise
|
|
47
|
+
*/
|
|
48
|
+
isPathWithinWorkspace(pathToCheck: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Fully resolves a path, including symbolic links.
|
|
51
|
+
* If the path does not exist, it returns the fully resolved path as it would be
|
|
52
|
+
* if it did exist.
|
|
53
|
+
*/
|
|
54
|
+
private fullyResolvedPath;
|
|
55
|
+
/**
|
|
56
|
+
* Checks if a path is within a given root directory.
|
|
57
|
+
* @param pathToCheck The absolute path to check
|
|
58
|
+
* @param rootDirectory The absolute root directory
|
|
59
|
+
* @returns True if the path is within the root directory, false otherwise
|
|
60
|
+
*/
|
|
61
|
+
private isPathWithinRoot;
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a file path is a symbolic link that points to a file.
|
|
64
|
+
*/
|
|
65
|
+
private isFileSymlink;
|
|
66
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { isNodeError } from '../utils/errors.js';
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as path from 'node:path';
|
|
9
|
+
import * as process from 'node:process';
|
|
10
|
+
/**
|
|
11
|
+
* WorkspaceContext manages multiple workspace directories and validates paths
|
|
12
|
+
* against them. This allows the CLI to operate on files from multiple directories
|
|
13
|
+
* in a single session.
|
|
14
|
+
*/
|
|
15
|
+
export class WorkspaceContext {
|
|
16
|
+
directories = new Set();
|
|
17
|
+
initialDirectories;
|
|
18
|
+
onDirectoriesChangedListeners = new Set();
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new WorkspaceContext with the given initial directory and optional additional directories.
|
|
21
|
+
* @param directory The initial working directory (usually cwd)
|
|
22
|
+
* @param additionalDirectories Optional array of additional directories to include
|
|
23
|
+
*/
|
|
24
|
+
constructor(directory, additionalDirectories = []) {
|
|
25
|
+
this.addDirectory(directory);
|
|
26
|
+
for (const additionalDirectory of additionalDirectories) {
|
|
27
|
+
this.addDirectory(additionalDirectory);
|
|
28
|
+
}
|
|
29
|
+
this.initialDirectories = new Set(this.directories);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Registers a listener that is called when the workspace directories change.
|
|
33
|
+
* @param listener The listener to call.
|
|
34
|
+
* @returns A function to unsubscribe the listener.
|
|
35
|
+
*/
|
|
36
|
+
onDirectoriesChanged(listener) {
|
|
37
|
+
this.onDirectoriesChangedListeners.add(listener);
|
|
38
|
+
return () => {
|
|
39
|
+
this.onDirectoriesChangedListeners.delete(listener);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
notifyDirectoriesChanged() {
|
|
43
|
+
// Iterate over a copy of the set in case a listener unsubscribes itself or others.
|
|
44
|
+
for (const listener of [...this.onDirectoriesChangedListeners]) {
|
|
45
|
+
try {
|
|
46
|
+
listener();
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
// Don't let one listener break others.
|
|
50
|
+
console.error('Error in WorkspaceContext listener:', e);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Adds a directory to the workspace.
|
|
56
|
+
* @param directory The directory path to add (can be relative or absolute)
|
|
57
|
+
* @param basePath Optional base path for resolving relative paths (defaults to cwd)
|
|
58
|
+
*/
|
|
59
|
+
addDirectory(directory, basePath = process.cwd()) {
|
|
60
|
+
try {
|
|
61
|
+
const resolved = this.resolveAndValidateDir(directory, basePath);
|
|
62
|
+
if (this.directories.has(resolved)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
this.directories.add(resolved);
|
|
66
|
+
this.notifyDirectoriesChanged();
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
console.warn(`[WARN] Skipping unreadable directory: ${directory} (${err instanceof Error ? err.message : String(err)})`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
resolveAndValidateDir(directory, basePath = process.cwd()) {
|
|
73
|
+
const absolutePath = path.isAbsolute(directory)
|
|
74
|
+
? directory
|
|
75
|
+
: path.resolve(basePath, directory);
|
|
76
|
+
if (!fs.existsSync(absolutePath)) {
|
|
77
|
+
throw new Error(`Directory does not exist: ${absolutePath}`);
|
|
78
|
+
}
|
|
79
|
+
const stats = fs.statSync(absolutePath);
|
|
80
|
+
if (!stats.isDirectory()) {
|
|
81
|
+
throw new Error(`Path is not a directory: ${absolutePath}`);
|
|
82
|
+
}
|
|
83
|
+
return fs.realpathSync(absolutePath);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets a copy of all workspace directories.
|
|
87
|
+
* @returns Array of absolute directory paths
|
|
88
|
+
*/
|
|
89
|
+
getDirectories() {
|
|
90
|
+
return Array.from(this.directories);
|
|
91
|
+
}
|
|
92
|
+
getInitialDirectories() {
|
|
93
|
+
return Array.from(this.initialDirectories);
|
|
94
|
+
}
|
|
95
|
+
setDirectories(directories) {
|
|
96
|
+
const newDirectories = new Set();
|
|
97
|
+
for (const dir of directories) {
|
|
98
|
+
newDirectories.add(this.resolveAndValidateDir(dir));
|
|
99
|
+
}
|
|
100
|
+
if (newDirectories.size !== this.directories.size ||
|
|
101
|
+
![...newDirectories].every((d) => this.directories.has(d))) {
|
|
102
|
+
this.directories = newDirectories;
|
|
103
|
+
this.notifyDirectoriesChanged();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Checks if a given path is within any of the workspace directories.
|
|
108
|
+
* @param pathToCheck The path to validate
|
|
109
|
+
* @returns True if the path is within the workspace, false otherwise
|
|
110
|
+
*/
|
|
111
|
+
isPathWithinWorkspace(pathToCheck) {
|
|
112
|
+
try {
|
|
113
|
+
const fullyResolvedPath = this.fullyResolvedPath(pathToCheck);
|
|
114
|
+
for (const dir of this.directories) {
|
|
115
|
+
if (this.isPathWithinRoot(fullyResolvedPath, dir)) {
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
catch (_error) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Fully resolves a path, including symbolic links.
|
|
127
|
+
* If the path does not exist, it returns the fully resolved path as it would be
|
|
128
|
+
* if it did exist.
|
|
129
|
+
*/
|
|
130
|
+
fullyResolvedPath(pathToCheck) {
|
|
131
|
+
try {
|
|
132
|
+
return fs.realpathSync(pathToCheck);
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
if (isNodeError(e) &&
|
|
136
|
+
e.code === 'ENOENT' &&
|
|
137
|
+
e.path &&
|
|
138
|
+
// realpathSync does not set e.path correctly for symlinks to
|
|
139
|
+
// non-existent files.
|
|
140
|
+
!this.isFileSymlink(e.path)) {
|
|
141
|
+
// If it doesn't exist, e.path contains the fully resolved path.
|
|
142
|
+
return e.path;
|
|
143
|
+
}
|
|
144
|
+
throw e;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Checks if a path is within a given root directory.
|
|
149
|
+
* @param pathToCheck The absolute path to check
|
|
150
|
+
* @param rootDirectory The absolute root directory
|
|
151
|
+
* @returns True if the path is within the root directory, false otherwise
|
|
152
|
+
*/
|
|
153
|
+
isPathWithinRoot(pathToCheck, rootDirectory) {
|
|
154
|
+
const relative = path.relative(rootDirectory, pathToCheck);
|
|
155
|
+
return (!relative.startsWith(`..${path.sep}`) &&
|
|
156
|
+
relative !== '..' &&
|
|
157
|
+
!path.isAbsolute(relative));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Checks if a file path is a symbolic link that points to a file.
|
|
161
|
+
*/
|
|
162
|
+
isFileSymlink(filePath) {
|
|
163
|
+
try {
|
|
164
|
+
return !fs.readlinkSync(filePath).endsWith('/');
|
|
165
|
+
}
|
|
166
|
+
catch (_error) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=workspaceContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaceContext.js","sourceRoot":"","sources":["../../../src/utils/workspaceContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAIxC;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;I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;gBACD,gEAAgE;gBAChE,OAAO,CAAC,CAAC,IAAI,CAAC;YAChB,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,gBAAgB,CACtB,WAAmB,EACnB,aAAqB;QAErB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QAC3D,OAAO,CACL,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;YACrC,QAAQ,KAAK,IAAI;YACjB,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC3B,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,QAAgB;QACpC,IAAI,CAAC;YACH,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
7
|
+
import * as fs from 'node:fs';
|
|
8
|
+
import * as os from 'node:os';
|
|
9
|
+
import * as path from 'node:path';
|
|
10
|
+
import { WorkspaceContext } from './workspaceContext.js';
|
|
11
|
+
describe('WorkspaceContext with real filesystem', () => {
|
|
12
|
+
let tempDir;
|
|
13
|
+
let cwd;
|
|
14
|
+
let otherDir;
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
// os.tmpdir() can return a path using a symlink (this is standard on macOS)
|
|
17
|
+
// Use fs.realpathSync to fully resolve the absolute path.
|
|
18
|
+
tempDir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'workspace-context-test-')));
|
|
19
|
+
cwd = path.join(tempDir, 'project');
|
|
20
|
+
otherDir = path.join(tempDir, 'other-project');
|
|
21
|
+
fs.mkdirSync(cwd, { recursive: true });
|
|
22
|
+
fs.mkdirSync(otherDir, { recursive: true });
|
|
23
|
+
});
|
|
24
|
+
afterEach(() => {
|
|
25
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
26
|
+
});
|
|
27
|
+
describe('initialization', () => {
|
|
28
|
+
it('should initialize with a single directory (cwd)', () => {
|
|
29
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
30
|
+
const directories = workspaceContext.getDirectories();
|
|
31
|
+
expect(directories).toEqual([cwd]);
|
|
32
|
+
});
|
|
33
|
+
it('should validate and resolve directories to absolute paths', () => {
|
|
34
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
35
|
+
const directories = workspaceContext.getDirectories();
|
|
36
|
+
expect(directories).toEqual([cwd, otherDir]);
|
|
37
|
+
});
|
|
38
|
+
it('should handle empty initialization', () => {
|
|
39
|
+
const workspaceContext = new WorkspaceContext(cwd, []);
|
|
40
|
+
const directories = workspaceContext.getDirectories();
|
|
41
|
+
expect(directories).toHaveLength(1);
|
|
42
|
+
expect(fs.realpathSync(directories[0])).toBe(cwd);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
describe('adding directories', () => {
|
|
46
|
+
it('should add valid directories', () => {
|
|
47
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
48
|
+
workspaceContext.addDirectory(otherDir);
|
|
49
|
+
const directories = workspaceContext.getDirectories();
|
|
50
|
+
expect(directories).toEqual([cwd, otherDir]);
|
|
51
|
+
});
|
|
52
|
+
it('should resolve relative paths to absolute', () => {
|
|
53
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
54
|
+
const relativePath = path.relative(cwd, otherDir);
|
|
55
|
+
workspaceContext.addDirectory(relativePath, cwd);
|
|
56
|
+
const directories = workspaceContext.getDirectories();
|
|
57
|
+
expect(directories).toEqual([cwd, otherDir]);
|
|
58
|
+
});
|
|
59
|
+
it('should prevent duplicate directories', () => {
|
|
60
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
61
|
+
workspaceContext.addDirectory(otherDir);
|
|
62
|
+
workspaceContext.addDirectory(otherDir);
|
|
63
|
+
const directories = workspaceContext.getDirectories();
|
|
64
|
+
expect(directories).toHaveLength(2);
|
|
65
|
+
});
|
|
66
|
+
it('should handle symbolic links correctly', () => {
|
|
67
|
+
const realDir = path.join(tempDir, 'real');
|
|
68
|
+
fs.mkdirSync(realDir, { recursive: true });
|
|
69
|
+
const symlinkDir = path.join(tempDir, 'symlink-to-real');
|
|
70
|
+
fs.symlinkSync(realDir, symlinkDir, 'dir');
|
|
71
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
72
|
+
workspaceContext.addDirectory(symlinkDir);
|
|
73
|
+
const directories = workspaceContext.getDirectories();
|
|
74
|
+
expect(directories).toEqual([cwd, realDir]);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe('path validation', () => {
|
|
78
|
+
it('should accept paths within workspace directories', () => {
|
|
79
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
80
|
+
const validPath1 = path.join(cwd, 'src', 'file.ts');
|
|
81
|
+
const validPath2 = path.join(otherDir, 'lib', 'module.js');
|
|
82
|
+
fs.mkdirSync(path.dirname(validPath1), { recursive: true });
|
|
83
|
+
fs.writeFileSync(validPath1, 'content');
|
|
84
|
+
fs.mkdirSync(path.dirname(validPath2), { recursive: true });
|
|
85
|
+
fs.writeFileSync(validPath2, 'content');
|
|
86
|
+
expect(workspaceContext.isPathWithinWorkspace(validPath1)).toBe(true);
|
|
87
|
+
expect(workspaceContext.isPathWithinWorkspace(validPath2)).toBe(true);
|
|
88
|
+
});
|
|
89
|
+
it('should accept non-existent paths within workspace directories', () => {
|
|
90
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
91
|
+
const validPath1 = path.join(cwd, 'src', 'file.ts');
|
|
92
|
+
const validPath2 = path.join(otherDir, 'lib', 'module.js');
|
|
93
|
+
expect(workspaceContext.isPathWithinWorkspace(validPath1)).toBe(true);
|
|
94
|
+
expect(workspaceContext.isPathWithinWorkspace(validPath2)).toBe(true);
|
|
95
|
+
});
|
|
96
|
+
it('should reject paths outside workspace', () => {
|
|
97
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
98
|
+
const invalidPath = path.join(tempDir, 'outside-workspace', 'file.txt');
|
|
99
|
+
expect(workspaceContext.isPathWithinWorkspace(invalidPath)).toBe(false);
|
|
100
|
+
});
|
|
101
|
+
it('should reject non-existent paths outside workspace', () => {
|
|
102
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
103
|
+
const invalidPath = path.join(tempDir, 'outside-workspace', 'file.txt');
|
|
104
|
+
expect(workspaceContext.isPathWithinWorkspace(invalidPath)).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
it('should handle nested directories correctly', () => {
|
|
107
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
108
|
+
const nestedPath = path.join(cwd, 'deeply', 'nested', 'path', 'file.txt');
|
|
109
|
+
expect(workspaceContext.isPathWithinWorkspace(nestedPath)).toBe(true);
|
|
110
|
+
});
|
|
111
|
+
it('should handle edge cases (root, parent references)', () => {
|
|
112
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
113
|
+
const rootPath = path.parse(tempDir).root;
|
|
114
|
+
const parentPath = path.dirname(cwd);
|
|
115
|
+
expect(workspaceContext.isPathWithinWorkspace(rootPath)).toBe(false);
|
|
116
|
+
expect(workspaceContext.isPathWithinWorkspace(parentPath)).toBe(false);
|
|
117
|
+
});
|
|
118
|
+
it('should handle non-existent paths correctly', () => {
|
|
119
|
+
const workspaceContext = new WorkspaceContext(cwd, [otherDir]);
|
|
120
|
+
const nonExistentPath = path.join(cwd, 'does-not-exist.txt');
|
|
121
|
+
expect(workspaceContext.isPathWithinWorkspace(nonExistentPath)).toBe(true);
|
|
122
|
+
});
|
|
123
|
+
describe('with symbolic link', () => {
|
|
124
|
+
describe('in the workspace', () => {
|
|
125
|
+
let realDir;
|
|
126
|
+
let symlinkDir;
|
|
127
|
+
beforeEach(() => {
|
|
128
|
+
realDir = path.join(cwd, 'real-dir');
|
|
129
|
+
fs.mkdirSync(realDir, { recursive: true });
|
|
130
|
+
symlinkDir = path.join(cwd, 'symlink-file');
|
|
131
|
+
fs.symlinkSync(realDir, symlinkDir, 'dir');
|
|
132
|
+
});
|
|
133
|
+
it('should accept dir paths', () => {
|
|
134
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
135
|
+
expect(workspaceContext.isPathWithinWorkspace(symlinkDir)).toBe(true);
|
|
136
|
+
});
|
|
137
|
+
it('should accept non-existent paths', () => {
|
|
138
|
+
const filePath = path.join(symlinkDir, 'does-not-exist.txt');
|
|
139
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
140
|
+
expect(workspaceContext.isPathWithinWorkspace(filePath)).toBe(true);
|
|
141
|
+
});
|
|
142
|
+
it('should accept non-existent deep paths', () => {
|
|
143
|
+
const filePath = path.join(symlinkDir, 'deep', 'does-not-exist.txt');
|
|
144
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
145
|
+
expect(workspaceContext.isPathWithinWorkspace(filePath)).toBe(true);
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
describe('outside the workspace', () => {
|
|
149
|
+
let realDir;
|
|
150
|
+
let symlinkDir;
|
|
151
|
+
beforeEach(() => {
|
|
152
|
+
realDir = path.join(tempDir, 'real-dir');
|
|
153
|
+
fs.mkdirSync(realDir, { recursive: true });
|
|
154
|
+
symlinkDir = path.join(cwd, 'symlink-file');
|
|
155
|
+
fs.symlinkSync(realDir, symlinkDir, 'dir');
|
|
156
|
+
});
|
|
157
|
+
it('should reject dir paths', () => {
|
|
158
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
159
|
+
expect(workspaceContext.isPathWithinWorkspace(symlinkDir)).toBe(false);
|
|
160
|
+
});
|
|
161
|
+
it('should reject non-existent paths', () => {
|
|
162
|
+
const filePath = path.join(symlinkDir, 'does-not-exist.txt');
|
|
163
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
164
|
+
expect(workspaceContext.isPathWithinWorkspace(filePath)).toBe(false);
|
|
165
|
+
});
|
|
166
|
+
it('should reject non-existent deep paths', () => {
|
|
167
|
+
const filePath = path.join(symlinkDir, 'deep', 'does-not-exist.txt');
|
|
168
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
169
|
+
expect(workspaceContext.isPathWithinWorkspace(filePath)).toBe(false);
|
|
170
|
+
});
|
|
171
|
+
it('should reject partially non-existent deep paths', () => {
|
|
172
|
+
const deepDir = path.join(symlinkDir, 'deep');
|
|
173
|
+
fs.mkdirSync(deepDir, { recursive: true });
|
|
174
|
+
const filePath = path.join(deepDir, 'does-not-exist.txt');
|
|
175
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
176
|
+
expect(workspaceContext.isPathWithinWorkspace(filePath)).toBe(false);
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
it('should reject symbolic file links outside the workspace', () => {
|
|
180
|
+
const realFile = path.join(tempDir, 'real-file.txt');
|
|
181
|
+
fs.writeFileSync(realFile, 'content');
|
|
182
|
+
const symlinkFile = path.join(cwd, 'symlink-to-real-file');
|
|
183
|
+
fs.symlinkSync(realFile, symlinkFile, 'file');
|
|
184
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
185
|
+
expect(workspaceContext.isPathWithinWorkspace(symlinkFile)).toBe(false);
|
|
186
|
+
});
|
|
187
|
+
it('should reject non-existent symbolic file links outside the workspace', () => {
|
|
188
|
+
const realFile = path.join(tempDir, 'real-file.txt');
|
|
189
|
+
const symlinkFile = path.join(cwd, 'symlink-to-real-file');
|
|
190
|
+
fs.symlinkSync(realFile, symlinkFile, 'file');
|
|
191
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
192
|
+
expect(workspaceContext.isPathWithinWorkspace(symlinkFile)).toBe(false);
|
|
193
|
+
});
|
|
194
|
+
it('should handle circular symlinks gracefully', () => {
|
|
195
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
196
|
+
const linkA = path.join(cwd, 'link-a');
|
|
197
|
+
const linkB = path.join(cwd, 'link-b');
|
|
198
|
+
// Create a circular dependency: linkA -> linkB -> linkA
|
|
199
|
+
fs.symlinkSync(linkB, linkA, 'dir');
|
|
200
|
+
fs.symlinkSync(linkA, linkB, 'dir');
|
|
201
|
+
// fs.realpathSync should throw ELOOP, and isPathWithinWorkspace should
|
|
202
|
+
// handle it gracefully and return false.
|
|
203
|
+
expect(workspaceContext.isPathWithinWorkspace(linkA)).toBe(false);
|
|
204
|
+
expect(workspaceContext.isPathWithinWorkspace(linkB)).toBe(false);
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
describe('onDirectoriesChanged', () => {
|
|
209
|
+
it('should call listener when adding a directory', () => {
|
|
210
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
211
|
+
const listener = vi.fn();
|
|
212
|
+
workspaceContext.onDirectoriesChanged(listener);
|
|
213
|
+
workspaceContext.addDirectory(otherDir);
|
|
214
|
+
expect(listener).toHaveBeenCalledOnce();
|
|
215
|
+
});
|
|
216
|
+
it('should not call listener when adding a duplicate directory', () => {
|
|
217
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
218
|
+
workspaceContext.addDirectory(otherDir);
|
|
219
|
+
const listener = vi.fn();
|
|
220
|
+
workspaceContext.onDirectoriesChanged(listener);
|
|
221
|
+
workspaceContext.addDirectory(otherDir);
|
|
222
|
+
expect(listener).not.toHaveBeenCalled();
|
|
223
|
+
});
|
|
224
|
+
it('should call listener when setting different directories', () => {
|
|
225
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
226
|
+
const listener = vi.fn();
|
|
227
|
+
workspaceContext.onDirectoriesChanged(listener);
|
|
228
|
+
workspaceContext.setDirectories([otherDir]);
|
|
229
|
+
expect(listener).toHaveBeenCalledOnce();
|
|
230
|
+
});
|
|
231
|
+
it('should not call listener when setting same directories', () => {
|
|
232
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
233
|
+
const listener = vi.fn();
|
|
234
|
+
workspaceContext.onDirectoriesChanged(listener);
|
|
235
|
+
workspaceContext.setDirectories([cwd]);
|
|
236
|
+
expect(listener).not.toHaveBeenCalled();
|
|
237
|
+
});
|
|
238
|
+
it('should support multiple listeners', () => {
|
|
239
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
240
|
+
const listener1 = vi.fn();
|
|
241
|
+
const listener2 = vi.fn();
|
|
242
|
+
workspaceContext.onDirectoriesChanged(listener1);
|
|
243
|
+
workspaceContext.onDirectoriesChanged(listener2);
|
|
244
|
+
workspaceContext.addDirectory(otherDir);
|
|
245
|
+
expect(listener1).toHaveBeenCalledOnce();
|
|
246
|
+
expect(listener2).toHaveBeenCalledOnce();
|
|
247
|
+
});
|
|
248
|
+
it('should allow unsubscribing a listener', () => {
|
|
249
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
250
|
+
const listener = vi.fn();
|
|
251
|
+
const unsubscribe = workspaceContext.onDirectoriesChanged(listener);
|
|
252
|
+
unsubscribe();
|
|
253
|
+
workspaceContext.addDirectory(otherDir);
|
|
254
|
+
expect(listener).not.toHaveBeenCalled();
|
|
255
|
+
});
|
|
256
|
+
it('should not fail if a listener throws an error', () => {
|
|
257
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
258
|
+
const errorListener = () => {
|
|
259
|
+
throw new Error('test error');
|
|
260
|
+
};
|
|
261
|
+
const listener = vi.fn();
|
|
262
|
+
workspaceContext.onDirectoriesChanged(errorListener);
|
|
263
|
+
workspaceContext.onDirectoriesChanged(listener);
|
|
264
|
+
expect(() => {
|
|
265
|
+
workspaceContext.addDirectory(otherDir);
|
|
266
|
+
}).not.toThrow();
|
|
267
|
+
expect(listener).toHaveBeenCalledOnce();
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
describe('getDirectories', () => {
|
|
271
|
+
it('should return a copy of directories array', () => {
|
|
272
|
+
const workspaceContext = new WorkspaceContext(cwd);
|
|
273
|
+
const dirs1 = workspaceContext.getDirectories();
|
|
274
|
+
const dirs2 = workspaceContext.getDirectories();
|
|
275
|
+
expect(dirs1).not.toBe(dirs2);
|
|
276
|
+
expect(dirs1).toEqual(dirs2);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
describe('WorkspaceContext with optional directories', () => {
|
|
281
|
+
let tempDir;
|
|
282
|
+
let cwd;
|
|
283
|
+
let existingDir1;
|
|
284
|
+
let existingDir2;
|
|
285
|
+
let nonExistentDir;
|
|
286
|
+
beforeEach(() => {
|
|
287
|
+
tempDir = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'workspace-context-optional-')));
|
|
288
|
+
cwd = path.join(tempDir, 'project');
|
|
289
|
+
existingDir1 = path.join(tempDir, 'existing-dir-1');
|
|
290
|
+
existingDir2 = path.join(tempDir, 'existing-dir-2');
|
|
291
|
+
nonExistentDir = path.join(tempDir, 'non-existent-dir');
|
|
292
|
+
fs.mkdirSync(cwd, { recursive: true });
|
|
293
|
+
fs.mkdirSync(existingDir1, { recursive: true });
|
|
294
|
+
fs.mkdirSync(existingDir2, { recursive: true });
|
|
295
|
+
vi.spyOn(console, 'warn').mockImplementation(() => { });
|
|
296
|
+
});
|
|
297
|
+
afterEach(() => {
|
|
298
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
299
|
+
vi.restoreAllMocks();
|
|
300
|
+
});
|
|
301
|
+
it('should skip a missing optional directory and log a warning', () => {
|
|
302
|
+
const workspaceContext = new WorkspaceContext(cwd, [
|
|
303
|
+
nonExistentDir,
|
|
304
|
+
existingDir1,
|
|
305
|
+
]);
|
|
306
|
+
const directories = workspaceContext.getDirectories();
|
|
307
|
+
expect(directories).toEqual([cwd, existingDir1]);
|
|
308
|
+
expect(console.warn).toHaveBeenCalledTimes(1);
|
|
309
|
+
expect(console.warn).toHaveBeenCalledWith(`[WARN] Skipping unreadable directory: ${nonExistentDir} (Directory does not exist: ${nonExistentDir})`);
|
|
310
|
+
});
|
|
311
|
+
it('should include an existing optional directory', () => {
|
|
312
|
+
const workspaceContext = new WorkspaceContext(cwd, [existingDir1]);
|
|
313
|
+
const directories = workspaceContext.getDirectories();
|
|
314
|
+
expect(directories).toEqual([cwd, existingDir1]);
|
|
315
|
+
expect(console.warn).not.toHaveBeenCalled();
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
//# sourceMappingURL=workspaceContext.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspaceContext.test.js","sourceRoot":"","sources":["../../../src/utils/workspaceContext.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;IACrD,IAAI,OAAe,CAAC;IACpB,IAAI,GAAW,CAAC;IAChB,IAAI,QAAgB,CAAC;IAErB,UAAU,CAAC,GAAG,EAAE;QACd,4EAA4E;QAC5E,0DAA0D;QAC1D,OAAO,GAAG,EAAE,CAAC,YAAY,CACvB,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAClE,CAAC;QAE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