@hibanacloud/cli 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +115 -0
- package/dist/src/commands/extensions/disable.d.ts +13 -0
- package/dist/src/commands/extensions/disable.js +56 -0
- package/dist/src/commands/extensions/disable.js.map +1 -0
- package/dist/src/commands/extensions/enable.d.ts +13 -0
- package/dist/src/commands/extensions/enable.js +59 -0
- package/dist/src/commands/extensions/enable.js.map +1 -0
- package/dist/src/commands/extensions/examples/context/QWEN.md +8 -0
- package/dist/src/commands/extensions/examples/context/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +6 -0
- package/dist/src/commands/extensions/examples/custom-commands/qwen-extension.json +4 -0
- package/dist/src/commands/extensions/examples/exclude-tools/qwen-extension.json +5 -0
- package/dist/src/commands/extensions/examples/mcp-server/example.ts +60 -0
- package/dist/src/commands/extensions/examples/mcp-server/package.json +18 -0
- package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +11 -0
- package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +13 -0
- package/dist/src/commands/extensions/install.d.ts +14 -0
- package/dist/src/commands/extensions/install.js +78 -0
- package/dist/src/commands/extensions/install.js.map +1 -0
- package/dist/src/commands/extensions/install.test.d.ts +6 -0
- package/dist/src/commands/extensions/install.test.js +102 -0
- package/dist/src/commands/extensions/install.test.js.map +1 -0
- package/dist/src/commands/extensions/link.d.ts +12 -0
- package/dist/src/commands/extensions/link.js +37 -0
- package/dist/src/commands/extensions/link.js.map +1 -0
- package/dist/src/commands/extensions/list.d.ts +8 -0
- package/dist/src/commands/extensions/list.js +32 -0
- package/dist/src/commands/extensions/list.js.map +1 -0
- package/dist/src/commands/extensions/new.d.ts +7 -0
- package/dist/src/commands/extensions/new.js +90 -0
- package/dist/src/commands/extensions/new.js.map +1 -0
- package/dist/src/commands/extensions/new.test.d.ts +6 -0
- package/dist/src/commands/extensions/new.test.js +59 -0
- package/dist/src/commands/extensions/new.test.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.d.ts +12 -0
- package/dist/src/commands/extensions/uninstall.js +38 -0
- package/dist/src/commands/extensions/uninstall.js.map +1 -0
- package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
- package/dist/src/commands/extensions/uninstall.test.js +18 -0
- package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
- package/dist/src/commands/extensions/update.d.ts +13 -0
- package/dist/src/commands/extensions/update.js +104 -0
- package/dist/src/commands/extensions/update.js.map +1 -0
- package/dist/src/commands/extensions.d.ts +7 -0
- package/dist/src/commands/extensions.js +33 -0
- package/dist/src/commands/extensions.js.map +1 -0
- package/dist/src/commands/mcp/add.d.ts +7 -0
- package/dist/src/commands/mcp/add.js +171 -0
- package/dist/src/commands/mcp/add.js.map +1 -0
- package/dist/src/commands/mcp/list.d.ts +8 -0
- package/dist/src/commands/mcp/list.js +111 -0
- package/dist/src/commands/mcp/list.js.map +1 -0
- package/dist/src/commands/mcp/remove.d.ts +7 -0
- package/dist/src/commands/mcp/remove.js +44 -0
- package/dist/src/commands/mcp/remove.js.map +1 -0
- package/dist/src/commands/mcp.d.ts +7 -0
- package/dist/src/commands/mcp.js +23 -0
- package/dist/src/commands/mcp.js.map +1 -0
- package/dist/src/config/auth.d.ts +6 -0
- package/dist/src/config/auth.js +28 -0
- package/dist/src/config/auth.js.map +1 -0
- package/dist/src/config/auth.test.d.ts +6 -0
- package/dist/src/config/auth.test.js +37 -0
- package/dist/src/config/auth.test.js.map +1 -0
- package/dist/src/config/config.d.ts +58 -0
- package/dist/src/config/config.js +678 -0
- package/dist/src/config/config.js.map +1 -0
- package/dist/src/config/extension.d.ts +83 -0
- package/dist/src/config/extension.js +534 -0
- package/dist/src/config/extension.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.d.ts +47 -0
- package/dist/src/config/extensions/extensionEnablement.js +189 -0
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -0
- package/dist/src/config/extensions/extensionEnablement.test.d.ts +6 -0
- package/dist/src/config/extensions/extensionEnablement.test.js +333 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -0
- package/dist/src/config/extensions/github.d.ts +30 -0
- package/dist/src/config/extensions/github.js +322 -0
- package/dist/src/config/extensions/github.js.map +1 -0
- package/dist/src/config/extensions/github.test.d.ts +6 -0
- package/dist/src/config/extensions/github.test.js +334 -0
- package/dist/src/config/extensions/github.test.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +19 -0
- package/dist/src/config/extensions/update.js +113 -0
- package/dist/src/config/extensions/update.js.map +1 -0
- package/dist/src/config/extensions/update.test.d.ts +6 -0
- package/dist/src/config/extensions/update.test.js +342 -0
- package/dist/src/config/extensions/update.test.js.map +1 -0
- package/dist/src/config/extensions/variableSchema.d.ts +36 -0
- package/dist/src/config/extensions/variableSchema.js +22 -0
- package/dist/src/config/extensions/variableSchema.js.map +1 -0
- package/dist/src/config/extensions/variables.d.ts +17 -0
- package/dist/src/config/extensions/variables.js +40 -0
- package/dist/src/config/extensions/variables.js.map +1 -0
- package/dist/src/config/extensions/variables.test.d.ts +6 -0
- package/dist/src/config/extensions/variables.test.js +17 -0
- package/dist/src/config/extensions/variables.test.js.map +1 -0
- package/dist/src/config/keyBindings.d.ts +70 -0
- package/dist/src/config/keyBindings.js +130 -0
- package/dist/src/config/keyBindings.js.map +1 -0
- package/dist/src/config/keyBindings.test.d.ts +6 -0
- package/dist/src/config/keyBindings.test.js +51 -0
- package/dist/src/config/keyBindings.test.js.map +1 -0
- package/dist/src/config/migration.d.ts +10 -0
- package/dist/src/config/migration.js +45 -0
- package/dist/src/config/migration.js.map +1 -0
- package/dist/src/config/sandboxConfig.d.ts +13 -0
- package/dist/src/config/sandboxConfig.js +73 -0
- package/dist/src/config/sandboxConfig.js.map +1 -0
- package/dist/src/config/settings.d.ts +72 -0
- package/dist/src/config/settings.js +631 -0
- package/dist/src/config/settings.js.map +1 -0
- package/dist/src/config/settingsSchema.d.ts +1174 -0
- package/dist/src/config/settingsSchema.js +1118 -0
- package/dist/src/config/settingsSchema.js.map +1 -0
- package/dist/src/config/settingsSchema.test.d.ts +6 -0
- package/dist/src/config/settingsSchema.test.js +201 -0
- package/dist/src/config/settingsSchema.test.js.map +1 -0
- package/dist/src/config/trustedFolders.d.ts +56 -0
- package/dist/src/config/trustedFolders.js +168 -0
- package/dist/src/config/trustedFolders.js.map +1 -0
- package/dist/src/config/trustedFolders.test.d.ts +6 -0
- package/dist/src/config/trustedFolders.test.js +340 -0
- package/dist/src/config/trustedFolders.test.js.map +1 -0
- package/dist/src/config/webSearch.d.ts +35 -0
- package/dist/src/config/webSearch.js +87 -0
- package/dist/src/config/webSearch.js.map +1 -0
- package/dist/src/core/auth.d.ts +13 -0
- package/dist/src/core/auth.js +34 -0
- package/dist/src/core/auth.js.map +1 -0
- package/dist/src/core/initializer.d.ts +21 -0
- package/dist/src/core/initializer.js +48 -0
- package/dist/src/core/initializer.js.map +1 -0
- package/dist/src/core/theme.d.ts +12 -0
- package/dist/src/core/theme.js +23 -0
- package/dist/src/core/theme.js.map +1 -0
- package/dist/src/gemini.d.ts +14 -0
- package/dist/src/gemini.js +327 -0
- package/dist/src/gemini.js.map +1 -0
- package/dist/src/gemini.test.d.ts +6 -0
- package/dist/src/gemini.test.js +507 -0
- package/dist/src/gemini.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/i18n/index.d.ts +18 -0
- package/dist/src/i18n/index.js +184 -0
- package/dist/src/i18n/index.js.map +1 -0
- package/dist/src/i18n/locales/en.js +1129 -0
- package/dist/src/i18n/locales/zh.js +1052 -0
- package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
- package/dist/src/nonInteractive/control/ControlContext.js +31 -0
- package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js +549 -0
- package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
- package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
- package/dist/src/nonInteractive/control/ControlService.js +154 -0
- package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js +102 -0
- package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js +42 -0
- package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
- package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
- package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
- package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
- package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
- package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +446 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1197 -0
- package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js +56 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +624 -0
- package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
- package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +69 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +808 -0
- package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
- package/dist/src/nonInteractive/session.d.ts +23 -0
- package/dist/src/nonInteractive/session.js +549 -0
- package/dist/src/nonInteractive/session.js.map +1 -0
- package/dist/src/nonInteractive/session.test.d.ts +6 -0
- package/dist/src/nonInteractive/session.test.js +407 -0
- package/dist/src/nonInteractive/session.test.js.map +1 -0
- package/dist/src/nonInteractive/types.d.ts +344 -0
- package/dist/src/nonInteractive/types.js +78 -0
- package/dist/src/nonInteractive/types.js.map +1 -0
- package/dist/src/nonInteractiveCli.d.ts +28 -0
- package/dist/src/nonInteractiveCli.js +268 -0
- package/dist/src/nonInteractiveCli.js.map +1 -0
- package/dist/src/nonInteractiveCliCommands.d.ts +35 -0
- package/dist/src/nonInteractiveCliCommands.js +144 -0
- package/dist/src/nonInteractiveCliCommands.js.map +1 -0
- package/dist/src/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/patches/punycode-shim.d.ts +6 -0
- package/dist/src/patches/punycode-shim.js +20 -0
- package/dist/src/patches/punycode-shim.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +99 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.test.d.ts +6 -0
- package/dist/src/services/BuiltinCommandLoader.test.js +167 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +55 -0
- package/dist/src/services/CommandService.js +90 -0
- package/dist/src/services/CommandService.js.map +1 -0
- package/dist/src/services/CommandService.test.d.ts +6 -0
- package/dist/src/services/CommandService.test.js +233 -0
- package/dist/src/services/CommandService.test.js.map +1 -0
- package/dist/src/services/FileCommandLoader.d.ts +51 -0
- package/dist/src/services/FileCommandLoader.js +230 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +35 -0
- package/dist/src/services/McpPromptLoader.js +254 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
- package/dist/src/services/McpPromptLoader.test.js +341 -0
- package/dist/src/services/McpPromptLoader.test.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +16 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.d.ts +12 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js +62 -0
- package/dist/src/services/prompt-processors/atFileProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +174 -0
- package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.d.ts +29 -0
- package/dist/src/services/prompt-processors/injectionParser.js +60 -0
- package/dist/src/services/prompt-processors/injectionParser.js.map +1 -0
- package/dist/src/services/prompt-processors/injectionParser.test.d.ts +6 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js +189 -0
- package/dist/src/services/prompt-processors/injectionParser.test.js.map +1 -0
- package/dist/src/services/prompt-processors/shellProcessor.d.ts +27 -0
- package/dist/src/services/prompt-processors/shellProcessor.js +128 -0
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +45 -0
- package/dist/src/services/prompt-processors/types.js +20 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/test-utils/createExtension.d.ts +15 -0
- package/dist/src/test-utils/createExtension.js +25 -0
- package/dist/src/test-utils/createExtension.js.map +1 -0
- package/dist/src/test-utils/customMatchers.d.ts +14 -0
- package/dist/src/test-utils/customMatchers.js +40 -0
- package/dist/src/test-utils/customMatchers.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.d.ts +18 -0
- package/dist/src/test-utils/mockCommandContext.js +93 -0
- package/dist/src/test-utils/mockCommandContext.js.map +1 -0
- package/dist/src/test-utils/mockCommandContext.test.d.ts +6 -0
- package/dist/src/test-utils/mockCommandContext.test.js +51 -0
- package/dist/src/test-utils/mockCommandContext.test.js.map +1 -0
- package/dist/src/test-utils/render.d.ts +12 -0
- package/dist/src/test-utils/render.js +14 -0
- package/dist/src/test-utils/render.js.map +1 -0
- package/dist/src/ui/App.d.ts +6 -0
- package/dist/src/ui/App.js +37 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/AppContainer.d.ts +17 -0
- package/dist/src/ui/AppContainer.js +1074 -0
- package/dist/src/ui/AppContainer.js.map +1 -0
- package/dist/src/ui/AppContainer.test.d.ts +6 -0
- package/dist/src/ui/AppContainer.test.js +831 -0
- package/dist/src/ui/AppContainer.test.js.map +1 -0
- package/dist/src/ui/IdeIntegrationNudge.d.ts +16 -0
- package/dist/src/ui/IdeIntegrationNudge.js +50 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.d.ts +7 -0
- package/dist/src/ui/auth/AuthDialog.js +63 -0
- package/dist/src/ui/auth/AuthDialog.js.map +1 -0
- package/dist/src/ui/auth/AuthDialog.test.d.ts +6 -0
- package/dist/src/ui/auth/AuthDialog.test.js +391 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -0
- package/dist/src/ui/auth/AuthInProgress.d.ts +11 -0
- package/dist/src/ui/auth/AuthInProgress.js +24 -0
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -0
- package/dist/src/ui/auth/OAuthFlow.d.ts +14 -0
- package/dist/src/ui/auth/OAuthFlow.js +48 -0
- package/dist/src/ui/auth/OAuthFlow.js.map +1 -0
- package/dist/src/ui/auth/useAuth.d.ts +27 -0
- package/dist/src/ui/auth/useAuth.js +244 -0
- package/dist/src/ui/auth/useAuth.js.map +1 -0
- package/dist/src/ui/colors.d.ts +7 -0
- package/dist/src/ui/colors.js +54 -0
- package/dist/src/ui/colors.js.map +1 -0
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +25 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/agentsCommand.d.ts +7 -0
- package/dist/src/ui/commands/agentsCommand.js +39 -0
- package/dist/src/ui/commands/agentsCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.d.ts +7 -0
- package/dist/src/ui/commands/approvalModeCommand.js +19 -0
- package/dist/src/ui/commands/approvalModeCommand.js.map +1 -0
- package/dist/src/ui/commands/approvalModeCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js +49 -0
- package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +19 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +51 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +9 -0
- package/dist/src/ui/commands/chatCommand.js +351 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.d.ts +7 -0
- package/dist/src/ui/commands/clearCommand.js +30 -0
- package/dist/src/ui/commands/clearCommand.js.map +1 -0
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +71 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +62 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +16 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/directoryCommand.d.ts +8 -0
- package/dist/src/ui/commands/directoryCommand.js +153 -0
- package/dist/src/ui/commands/directoryCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +39 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +19 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/extensionsCommand.js +115 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.d.ts +7 -0
- package/dist/src/ui/commands/helpCommand.js +24 -0
- package/dist/src/ui/commands/helpCommand.js.map +1 -0
- package/dist/src/ui/commands/ideCommand.d.ts +7 -0
- package/dist/src/ui/commands/ideCommand.js +241 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/initCommand.d.ts +7 -0
- package/dist/src/ui/commands/initCommand.js +118 -0
- package/dist/src/ui/commands/initCommand.js.map +1 -0
- package/dist/src/ui/commands/languageCommand.d.ts +7 -0
- package/dist/src/ui/commands/languageCommand.js +386 -0
- package/dist/src/ui/commands/languageCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +269 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
- package/dist/src/ui/commands/memoryCommand.js +254 -0
- package/dist/src/ui/commands/memoryCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.d.ts +7 -0
- package/dist/src/ui/commands/modelCommand.js +48 -0
- package/dist/src/ui/commands/modelCommand.js.map +1 -0
- package/dist/src/ui/commands/modelCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/modelCommand.test.js +137 -0
- package/dist/src/ui/commands/modelCommand.test.js.map +1 -0
- package/dist/src/ui/commands/openaiProfileCommand.d.ts +7 -0
- package/dist/src/ui/commands/openaiProfileCommand.js +135 -0
- package/dist/src/ui/commands/openaiProfileCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/permissionsCommand.js +19 -0
- package/dist/src/ui/commands/permissionsCommand.js.map +1 -0
- package/dist/src/ui/commands/permissionsCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/permissionsCommand.test.js +30 -0
- package/dist/src/ui/commands/permissionsCommand.test.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +8 -0
- package/dist/src/ui/commands/quitCommand.js +64 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +124 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/settingsCommand.d.ts +7 -0
- package/dist/src/ui/commands/settingsCommand.js +19 -0
- package/dist/src/ui/commands/settingsCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.d.ts +9 -0
- package/dist/src/ui/commands/setupGithubCommand.js +157 -0
- package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.test.d.ts +6 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js +167 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -0
- package/dist/src/ui/commands/spCommand.d.ts +7 -0
- package/dist/src/ui/commands/spCommand.js +352 -0
- package/dist/src/ui/commands/spCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +61 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/summaryCommand.d.ts +7 -0
- package/dist/src/ui/commands/summaryCommand.js +156 -0
- package/dist/src/ui/commands/summaryCommand.js.map +1 -0
- package/dist/src/ui/commands/systemPromptCommand.d.ts +7 -0
- package/dist/src/ui/commands/systemPromptCommand.js +322 -0
- package/dist/src/ui/commands/systemPromptCommand.js.map +1 -0
- package/dist/src/ui/commands/terminalSetupCommand.d.ts +13 -0
- package/dist/src/ui/commands/terminalSetupCommand.js +47 -0
- package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.d.ts +7 -0
- package/dist/src/ui/commands/themeCommand.js +19 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -0
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +45 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +160 -0
- package/dist/src/ui/commands/types.js +12 -0
- package/dist/src/ui/commands/types.js.map +1 -0
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +26 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/AboutBox.d.ts +10 -0
- package/dist/src/ui/components/AboutBox.js +10 -0
- package/dist/src/ui/components/AboutBox.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.d.ts +13 -0
- package/dist/src/ui/components/AnsiOutput.js +12 -0
- package/dist/src/ui/components/AnsiOutput.js.map +1 -0
- package/dist/src/ui/components/AnsiOutput.test.d.ts +6 -0
- package/dist/src/ui/components/AnsiOutput.test.js +97 -0
- package/dist/src/ui/components/AnsiOutput.test.js.map +1 -0
- package/dist/src/ui/components/AppHeader.d.ts +10 -0
- package/dist/src/ui/components/AppHeader.js +19 -0
- package/dist/src/ui/components/AppHeader.js.map +1 -0
- package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
- package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
- package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
- package/dist/src/ui/components/AsciiArt.d.ts +8 -0
- package/dist/src/ui/components/AsciiArt.js +30 -0
- package/dist/src/ui/components/AsciiArt.js.map +1 -0
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js +32 -0
- package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/components/Composer.d.ts +6 -0
- package/dist/src/ui/components/Composer.js +55 -0
- package/dist/src/ui/components/Composer.js.map +1 -0
- package/dist/src/ui/components/Composer.test.d.ts +6 -0
- package/dist/src/ui/components/Composer.test.js +337 -0
- package/dist/src/ui/components/Composer.test.js.map +1 -0
- package/dist/src/ui/components/ConfigInitDisplay.d.ts +6 -0
- package/dist/src/ui/components/ConfigInitDisplay.js +42 -0
- package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
- package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js +90 -0
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/ContextUsageDisplay.d.ts +10 -0
- package/dist/src/ui/components/ContextUsageDisplay.js +16 -0
- package/dist/src/ui/components/ContextUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.js +27 -0
- package/dist/src/ui/components/DebugProfiler.js.map +1 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
- package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +12 -0
- package/dist/src/ui/components/DialogManager.js +158 -0
- package/dist/src/ui/components/DialogManager.js.map +1 -0
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +16 -0
- package/dist/src/ui/components/EditorSettingsDialog.js +85 -0
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.d.ts +17 -0
- package/dist/src/ui/components/FolderTrustDialog.js +58 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js +88 -0
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/Footer.d.ts +7 -0
- package/dist/src/ui/components/Footer.js +48 -0
- package/dist/src/ui/components/Footer.js.map +1 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +21 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js +23 -0
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
- package/dist/src/ui/components/Header.d.ts +13 -0
- package/dist/src/ui/components/Header.js +28 -0
- package/dist/src/ui/components/Header.js.map +1 -0
- package/dist/src/ui/components/Header.test.d.ts +6 -0
- package/dist/src/ui/components/Header.test.js +37 -0
- package/dist/src/ui/components/Header.test.js.map +1 -0
- package/dist/src/ui/components/Help.d.ts +12 -0
- package/dist/src/ui/components/Help.js +23 -0
- package/dist/src/ui/components/Help.js.map +1 -0
- package/dist/src/ui/components/Help.test.d.ts +6 -0
- package/dist/src/ui/components/Help.test.js +57 -0
- package/dist/src/ui/components/Help.test.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +21 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +31 -0
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js +183 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +32 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +37 -0
- package/dist/src/ui/components/InputPrompt.js +583 -0
- package/dist/src/ui/components/InputPrompt.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
- package/dist/src/ui/components/LoadingIndicator.js +30 -0
- package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
- package/dist/src/ui/components/LoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/components/LoadingIndicator.test.js +194 -0
- package/dist/src/ui/components/LoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +13 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js +37 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +6 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js +28 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +1 -0
- package/dist/src/ui/components/MainContent.d.ts +6 -0
- package/dist/src/ui/components/MainContent.js +28 -0
- package/dist/src/ui/components/MainContent.js.map +1 -0
- package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js +24 -0
- package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.d.ts +11 -0
- package/dist/src/ui/components/ModelDialog.js +99 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -0
- package/dist/src/ui/components/ModelDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelDialog.test.js +158 -0
- package/dist/src/ui/components/ModelDialog.test.js.map +1 -0
- package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ModelStatsDisplay.js +34 -0
- package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.d.ts +15 -0
- package/dist/src/ui/components/ModelSwitchDialog.js +40 -0
- package/dist/src/ui/components/ModelSwitchDialog.js.map +1 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js +128 -0
- package/dist/src/ui/components/ModelSwitchDialog.test.js.map +1 -0
- package/dist/src/ui/components/Notifications.d.ts +6 -0
- package/dist/src/ui/components/Notifications.js +23 -0
- package/dist/src/ui/components/Notifications.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +25 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js +90 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js +51 -0
- package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +13 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +48 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +6 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +154 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -0
- package/dist/src/ui/components/PlanSummaryDisplay.d.ts +14 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js +9 -0
- package/dist/src/ui/components/PlanSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.d.ts +15 -0
- package/dist/src/ui/components/PrepareLabel.js +72 -0
- package/dist/src/ui/components/PrepareLabel.js.map +1 -0
- package/dist/src/ui/components/PrepareLabel.test.d.ts +6 -0
- package/dist/src/ui/components/PrepareLabel.test.js +71 -0
- package/dist/src/ui/components/PrepareLabel.test.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.d.ts +13 -0
- package/dist/src/ui/components/ProQuotaDialog.js +24 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -0
- package/dist/src/ui/components/ProQuotaDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js +58 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.d.ts +9 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js +20 -0
- package/dist/src/ui/components/QueuedMessageDisplay.js.map +1 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js +56 -0
- package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +1 -0
- package/dist/src/ui/components/QuitConfirmationDialog.d.ts +17 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js +49 -0
- package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/QuittingDisplay.d.ts +6 -0
- package/dist/src/ui/components/QuittingDisplay.js +20 -0
- package/dist/src/ui/components/QuittingDisplay.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.d.ts +16 -0
- package/dist/src/ui/components/QwenOAuthProgress.js +111 -0
- package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +6 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js +364 -0
- package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -0
- package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js +5 -0
- package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.d.ts +18 -0
- package/dist/src/ui/components/SettingsDialog.js +647 -0
- package/dist/src/ui/components/SettingsDialog.js.map +1 -0
- package/dist/src/ui/components/SettingsDialog.test.d.ts +6 -0
- package/dist/src/ui/components/SettingsDialog.test.js +1037 -0
- package/dist/src/ui/components/SettingsDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +15 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js +50 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js +40 -0
- package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +1 -0
- package/dist/src/ui/components/ShellInputPrompt.d.ts +11 -0
- package/dist/src/ui/components/ShellInputPrompt.js +36 -0
- package/dist/src/ui/components/ShellInputPrompt.js.map +1 -0
- package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
- package/dist/src/ui/components/ShellModeIndicator.js +5 -0
- package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
- package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
- package/dist/src/ui/components/ShowMoreLines.js +24 -0
- package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
- package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
- package/dist/src/ui/components/StatsDisplay.js +44 -0
- package/dist/src/ui/components/StatsDisplay.js.map +1 -0
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +27 -0
- package/dist/src/ui/components/SuggestionsDisplay.js +40 -0
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.d.ts +20 -0
- package/dist/src/ui/components/ThemeDialog.js +126 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -0
- package/dist/src/ui/components/ThemeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/ThemeDialog.test.js +75 -0
- package/dist/src/ui/components/ThemeDialog.test.js.map +1 -0
- package/dist/src/ui/components/Tips.d.ts +12 -0
- package/dist/src/ui/components/Tips.js +10 -0
- package/dist/src/ui/components/Tips.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.d.ts +16 -0
- package/dist/src/ui/components/TodoDisplay.js +27 -0
- package/dist/src/ui/components/TodoDisplay.js.map +1 -0
- package/dist/src/ui/components/TodoDisplay.test.d.ts +6 -0
- package/dist/src/ui/components/TodoDisplay.test.js +77 -0
- package/dist/src/ui/components/TodoDisplay.test.js.map +1 -0
- package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
- package/dist/src/ui/components/ToolStatsDisplay.js +42 -0
- package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
- package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
- package/dist/src/ui/components/UpdateNotification.js +10 -0
- package/dist/src/ui/components/UpdateNotification.js.map +1 -0
- package/dist/src/ui/components/WelcomeBackDialog.d.ts +13 -0
- package/dist/src/ui/components/WelcomeBackDialog.js +43 -0
- package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +45 -0
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.d.ts +10 -0
- package/dist/src/ui/components/messages/CompressionMessage.js +50 -0
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js +160 -0
- package/dist/src/ui/components/messages/CompressionMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +17 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +218 -0
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +6 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js +239 -0
- package/dist/src/ui/components/messages/DiffRenderer.test.js.map +1 -0
- package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
- package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessage.js +11 -0
- package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
- package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
- package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/InfoMessage.js +14 -0
- package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
- package/dist/src/ui/components/messages/SummaryMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/SummaryMessage.js +35 -0
- package/dist/src/ui/components/messages/SummaryMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +16 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +245 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +165 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +58 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +261 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.d.ts +19 -0
- package/dist/src/ui/components/messages/ToolMessage.js +180 -0
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
- package/dist/src/ui/components/messages/ToolMessage.test.d.ts +6 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js +182 -0
- package/dist/src/ui/components/messages/ToolMessage.test.js.map +1 -0
- package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserMessage.js +13 -0
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
- package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
- package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
- package/dist/src/ui/components/messages/WarningMessage.d.ts +11 -0
- package/dist/src/ui/components/messages/WarningMessage.js +10 -0
- package/dist/src/ui/components/messages/WarningMessage.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +38 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js +72 -0
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +6 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +376 -0
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +35 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +13 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +79 -0
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.d.ts +18 -0
- package/dist/src/ui/components/shared/EnumSelector.js +44 -0
- package/dist/src/ui/components/shared/EnumSelector.js.map +1 -0
- package/dist/src/ui/components/shared/EnumSelector.test.d.ts +6 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js +70 -0
- package/dist/src/ui/components/shared/EnumSelector.test.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js +451 -0
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +6 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js +154 -0
- package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +45 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js +21 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +6 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +134 -0
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -0
- package/dist/src/ui/components/shared/ScopeSelector.d.ts +19 -0
- package/dist/src/ui/components/shared/ScopeSelector.js +16 -0
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -0
- package/dist/src/ui/components/shared/TextInput.d.ts +16 -0
- package/dist/src/ui/components/shared/TextInput.js +127 -0
- package/dist/src/ui/components/shared/TextInput.js.map +1 -0
- package/dist/src/ui/components/shared/text-buffer.d.ts +490 -0
- package/dist/src/ui/components/shared/text-buffer.js +1598 -0
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +552 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- package/dist/src/ui/components/subagents/constants.d.ts +23 -0
- package/dist/src/ui/components/subagents/constants.js +67 -0
- package/dist/src/ui/components/subagents/constants.js.map +1 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +186 -0
- package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +15 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js +43 -0
- package/dist/src/ui/components/subagents/create/ColorSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js +174 -0
- package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js +107 -0
- package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +10 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js +39 -0
- package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +26 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js +28 -0
- package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +1 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +16 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js +145 -0
- package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -0
- package/dist/src/ui/components/subagents/index.d.ts +8 -0
- package/dist/src/ui/components/subagents/index.js +12 -0
- package/dist/src/ui/components/subagents/index.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +71 -0
- package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +13 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +36 -0
- package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js +73 -0
- package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +12 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +231 -0
- package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +11 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +20 -0
- package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +15 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +212 -0
- package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/components/subagents/reducers.d.ts +14 -0
- package/dist/src/ui/components/subagents/reducers.js +162 -0
- package/dist/src/ui/components/subagents/reducers.js.map +1 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +20 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +193 -0
- package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +1 -0
- package/dist/src/ui/components/subagents/types.d.ts +137 -0
- package/dist/src/ui/components/subagents/types.js +15 -0
- package/dist/src/ui/components/subagents/types.js.map +1 -0
- package/dist/src/ui/components/subagents/utils.d.ts +15 -0
- package/dist/src/ui/components/subagents/utils.js +79 -0
- package/dist/src/ui/components/subagents/utils.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.js +47 -0
- package/dist/src/ui/components/views/ExtensionsList.js.map +1 -0
- package/dist/src/ui/components/views/ExtensionsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js +97 -0
- package/dist/src/ui/components/views/ExtensionsList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +90 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +117 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +8 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/constants.d.ts +18 -0
- package/dist/src/ui/constants.js +23 -0
- package/dist/src/ui/constants.js.map +1 -0
- package/dist/src/ui/contexts/AppContext.d.ts +11 -0
- package/dist/src/ui/contexts/AppContext.js +15 -0
- package/dist/src/ui/contexts/AppContext.js.map +1 -0
- package/dist/src/ui/contexts/ConfigContext.d.ts +9 -0
- package/dist/src/ui/contexts/ConfigContext.js +16 -0
- package/dist/src/ui/contexts/ConfigContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.d.ts +35 -0
- package/dist/src/ui/contexts/KeypressContext.js +636 -0
- package/dist/src/ui/contexts/KeypressContext.js.map +1 -0
- package/dist/src/ui/contexts/KeypressContext.test.d.ts +6 -0
- package/dist/src/ui/contexts/KeypressContext.test.js +1180 -0
- package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -0
- package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
- package/dist/src/ui/contexts/OverflowContext.js +38 -0
- package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
- package/dist/src/ui/contexts/SessionContext.d.ts +45 -0
- package/dist/src/ui/contexts/SessionContext.js +157 -0
- package/dist/src/ui/contexts/SessionContext.js.map +1 -0
- package/dist/src/ui/contexts/SettingsContext.d.ts +9 -0
- package/dist/src/ui/contexts/SettingsContext.js +15 -0
- package/dist/src/ui/contexts/SettingsContext.js.map +1 -0
- package/dist/src/ui/contexts/ShellFocusContext.d.ts +7 -0
- package/dist/src/ui/contexts/ShellFocusContext.js +9 -0
- package/dist/src/ui/contexts/ShellFocusContext.js.map +1 -0
- package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
- package/dist/src/ui/contexts/StreamingContext.js +15 -0
- package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
- package/dist/src/ui/contexts/UIActionsContext.d.ts +46 -0
- package/dist/src/ui/contexts/UIActionsContext.js +22 -0
- package/dist/src/ui/contexts/UIActionsContext.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +117 -0
- package/dist/src/ui/contexts/UIStateContext.js +17 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -0
- package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
- package/dist/src/ui/contexts/VimModeContext.js +48 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
- package/dist/src/ui/editors/editorSettingsManager.js +48 -0
- package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +364 -0
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js +836 -0
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/keyToAnsi.d.ts +15 -0
- package/dist/src/ui/hooks/keyToAnsi.js +67 -0
- package/dist/src/ui/hooks/keyToAnsi.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +18 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js +284 -0
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +6 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +508 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -0
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +52 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js +503 -0
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +11 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js +21 -0
- package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +1 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
- package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useAtCompletion.d.ts +23 -0
- package/dist/src/ui/hooks/useAtCompletion.js +179 -0
- package/dist/src/ui/hooks/useAtCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.d.ts +14 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
- package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
- package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +13 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +40 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +306 -0
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
- package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
- package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +29 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +164 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useCompletion.d.ts +24 -0
- package/dist/src/ui/hooks/useCompletion.js +88 -0
- package/dist/src/ui/hooks/useCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
- package/dist/src/ui/hooks/useConsoleMessages.js +76 -0
- package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
- package/dist/src/ui/hooks/useDialogClose.d.ts +35 -0
- package/dist/src/ui/hooks/useDialogClose.js +53 -0
- package/dist/src/ui/hooks/useDialogClose.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
- package/dist/src/ui/hooks/useEditorSettings.js +43 -0
- package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
- package/dist/src/ui/hooks/useEditorSettings.test.d.ts +6 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js +164 -0
- package/dist/src/ui/hooks/useEditorSettings.test.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +21 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js +116 -0
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +6 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +243 -0
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -0
- package/dist/src/ui/hooks/useFocus.d.ts +10 -0
- package/dist/src/ui/hooks/useFocus.js +51 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useFolderTrust.d.ts +13 -0
- package/dist/src/ui/hooks/useFolderTrust.js +60 -0
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.d.ts +39 -0
- package/dist/src/ui/hooks/useGeminiStream.js +781 -0
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.js +61 -0
- package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
- package/dist/src/ui/hooks/useGitBranchName.test.d.ts +6 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js +189 -0
- package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
- package/dist/src/ui/hooks/useHistoryManager.js +72 -0
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
- package/dist/src/ui/hooks/useHistoryManager.test.d.ts +6 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js +171 -0
- package/dist/src/ui/hooks/useHistoryManager.test.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +16 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js +65 -0
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
- package/dist/src/ui/hooks/useInitializationAuthError.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistory.js +84 -0
- package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistory.test.js +207 -0
- package/dist/src/ui/hooks/useInputHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.d.ts +19 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js +81 -0
- package/dist/src/ui/hooks/useInputHistoryStore.js.map +1 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +6 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +234 -0
- package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +1 -0
- package/dist/src/ui/hooks/useKeypress.d.ts +17 -0
- package/dist/src/ui/hooks/useKeypress.js +27 -0
- package/dist/src/ui/hooks/useKeypress.js.map +1 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +15 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +20 -0
- package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +1 -0
- package/dist/src/ui/hooks/useLaunchEditor.d.ts +10 -0
- package/dist/src/ui/hooks/useLaunchEditor.js +70 -0
- package/dist/src/ui/hooks/useLaunchEditor.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
- package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +6 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js +91 -0
- package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +1 -0
- package/dist/src/ui/hooks/useLogger.d.ts +11 -0
- package/dist/src/ui/hooks/useLogger.js +29 -0
- package/dist/src/ui/hooks/useLogger.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.d.ts +13 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js +28 -0
- package/dist/src/ui/hooks/useMemoryMonitor.js.map +1 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js +57 -0
- package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.d.ts +23 -0
- package/dist/src/ui/hooks/useMessageQueue.js +51 -0
- package/dist/src/ui/hooks/useMessageQueue.js.map +1 -0
- package/dist/src/ui/hooks/useMessageQueue.test.d.ts +6 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js +167 -0
- package/dist/src/ui/hooks/useMessageQueue.test.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.d.ts +12 -0
- package/dist/src/ui/hooks/useModelCommand.js +21 -0
- package/dist/src/ui/hooks/useModelCommand.js.map +1 -0
- package/dist/src/ui/hooks/useModelCommand.test.d.ts +6 -0
- package/dist/src/ui/hooks/useModelCommand.test.js +35 -0
- package/dist/src/ui/hooks/useModelCommand.test.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +17 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +78 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +1 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +6 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +182 -0
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +1 -0
- package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
- package/dist/src/ui/hooks/usePhraseCycler.js +192 -0
- package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
- package/dist/src/ui/hooks/useQuitConfirmation.d.ts +14 -0
- package/dist/src/ui/hooks/useQuitConfirmation.js +36 -0
- package/dist/src/ui/hooks/useQuitConfirmation.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +21 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +122 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +269 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.d.ts +15 -0
- package/dist/src/ui/hooks/useQwenAuth.js +74 -0
- package/dist/src/ui/hooks/useQwenAuth.js.map +1 -0
- package/dist/src/ui/hooks/useQwenAuth.test.d.ts +6 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js +266 -0
- package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -0
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +34 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js +192 -0
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
- package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js +103 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +6 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +163 -0
- package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.d.ts +34 -0
- package/dist/src/ui/hooks/useSelectionList.js +245 -0
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -0
- package/dist/src/ui/hooks/useSelectionList.test.d.ts +6 -0
- package/dist/src/ui/hooks/useSelectionList.test.js +701 -0
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -0
- package/dist/src/ui/hooks/useSettingsCommand.d.ts +10 -0
- package/dist/src/ui/hooks/useSettingsCommand.js +21 -0
- package/dist/src/ui/hooks/useSettingsCommand.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.d.ts +14 -0
- package/dist/src/ui/hooks/useShellHistory.js +111 -0
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
- package/dist/src/ui/hooks/useShellHistory.test.d.ts +6 -0
- package/dist/src/ui/hooks/useShellHistory.test.js +187 -0
- package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
- package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +20 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +349 -0
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +9 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js +597 -0
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -0
- package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
- package/dist/src/ui/hooks/useStateAndRef.js +26 -0
- package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.d.ts +10 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js +21 -0
- package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +1 -0
- package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
- package/dist/src/ui/hooks/useTerminalSize.js +27 -0
- package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
- package/dist/src/ui/hooks/useThemeCommand.js +73 -0
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.d.ts +12 -0
- package/dist/src/ui/hooks/useTimer.js +58 -0
- package/dist/src/ui/hooks/useTimer.js.map +1 -0
- package/dist/src/ui/hooks/useTimer.test.d.ts +6 -0
- package/dist/src/ui/hooks/useTimer.test.js +90 -0
- package/dist/src/ui/hooks/useTimer.test.js.map +1 -0
- package/dist/src/ui/hooks/useToolScheduler.test.d.ts +6 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js +623 -0
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.d.ts +47 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js +262 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.js.map +1 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.d.ts +6 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js +515 -0
- package/dist/src/ui/hooks/useVisionAutoSwitch.test.js.map +1 -0
- package/dist/src/ui/hooks/useWelcomeBack.d.ts +23 -0
- package/dist/src/ui/hooks/useWelcomeBack.js +79 -0
- package/dist/src/ui/hooks/useWelcomeBack.js.map +1 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js +54 -0
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +639 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/keyMatchers.d.ts +27 -0
- package/dist/src/ui/keyMatchers.js +68 -0
- package/dist/src/ui/keyMatchers.js.map +1 -0
- package/dist/src/ui/keyMatchers.test.d.ts +6 -0
- package/dist/src/ui/keyMatchers.test.js +293 -0
- package/dist/src/ui/keyMatchers.test.js.map +1 -0
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +9 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/models/availableModels.d.ts +49 -0
- package/dist/src/ui/models/availableModels.js +130 -0
- package/dist/src/ui/models/availableModels.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +12 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +29 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -0
- package/dist/src/ui/semantic-colors.d.ts +7 -0
- package/dist/src/ui/semantic-colors.js +24 -0
- package/dist/src/ui/semantic-colors.js.map +1 -0
- package/dist/src/ui/state/extensions.d.ts +42 -0
- package/dist/src/ui/state/extensions.js +62 -0
- package/dist/src/ui/state/extensions.js.map +1 -0
- package/dist/src/ui/textConstants.d.ts +9 -0
- package/dist/src/ui/textConstants.js +10 -0
- package/dist/src/ui/textConstants.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.d.ts +7 -0
- package/dist/src/ui/themes/ansi-light.js +142 -0
- package/dist/src/ui/themes/ansi-light.js.map +1 -0
- package/dist/src/ui/themes/ansi.d.ts +7 -0
- package/dist/src/ui/themes/ansi.js +152 -0
- package/dist/src/ui/themes/ansi.js.map +1 -0
- package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
- package/dist/src/ui/themes/atom-one-dark.js +138 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
- package/dist/src/ui/themes/ayu-light.d.ts +7 -0
- package/dist/src/ui/themes/ayu-light.js +130 -0
- package/dist/src/ui/themes/ayu-light.js.map +1 -0
- package/dist/src/ui/themes/ayu.d.ts +7 -0
- package/dist/src/ui/themes/ayu.js +104 -0
- package/dist/src/ui/themes/ayu.js.map +1 -0
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +221 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/color-utils.test.d.ts +6 -0
- package/dist/src/ui/themes/color-utils.test.js +197 -0
- package/dist/src/ui/themes/color-utils.test.js.map +1 -0
- package/dist/src/ui/themes/default-light.d.ts +7 -0
- package/dist/src/ui/themes/default-light.js +100 -0
- package/dist/src/ui/themes/default-light.js.map +1 -0
- package/dist/src/ui/themes/default.d.ts +7 -0
- package/dist/src/ui/themes/default.js +143 -0
- package/dist/src/ui/themes/default.js.map +1 -0
- package/dist/src/ui/themes/dracula.d.ts +7 -0
- package/dist/src/ui/themes/dracula.js +115 -0
- package/dist/src/ui/themes/dracula.js.map +1 -0
- package/dist/src/ui/themes/github-dark.d.ts +7 -0
- package/dist/src/ui/themes/github-dark.js +138 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -0
- package/dist/src/ui/themes/github-light.d.ts +7 -0
- package/dist/src/ui/themes/github-light.js +140 -0
- package/dist/src/ui/themes/github-light.js.map +1 -0
- package/dist/src/ui/themes/googlecode.d.ts +7 -0
- package/dist/src/ui/themes/googlecode.js +137 -0
- package/dist/src/ui/themes/googlecode.js.map +1 -0
- package/dist/src/ui/themes/hibana-dark.d.ts +7 -0
- package/dist/src/ui/themes/hibana-dark.js +105 -0
- package/dist/src/ui/themes/hibana-dark.js.map +1 -0
- package/dist/src/ui/themes/hibana-light.d.ts +7 -0
- package/dist/src/ui/themes/hibana-light.js +131 -0
- package/dist/src/ui/themes/hibana-light.js.map +1 -0
- package/dist/src/ui/themes/no-color.d.ts +7 -0
- package/dist/src/ui/themes/no-color.js +115 -0
- package/dist/src/ui/themes/no-color.js.map +1 -0
- package/dist/src/ui/themes/qwen-dark.d.ts +7 -0
- package/dist/src/ui/themes/qwen-dark.js +105 -0
- package/dist/src/ui/themes/qwen-dark.js.map +1 -0
- package/dist/src/ui/themes/qwen-light.d.ts +7 -0
- package/dist/src/ui/themes/qwen-light.js +131 -0
- package/dist/src/ui/themes/qwen-light.js.map +1 -0
- package/dist/src/ui/themes/semantic-tokens.d.ts +37 -0
- package/dist/src/ui/themes/semantic-tokens.js +94 -0
- package/dist/src/ui/themes/semantic-tokens.js.map +1 -0
- package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
- package/dist/src/ui/themes/shades-of-purple.js +304 -0
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.d.ts +66 -0
- package/dist/src/ui/themes/theme-manager.js +270 -0
- package/dist/src/ui/themes/theme-manager.js.map +1 -0
- package/dist/src/ui/themes/theme-manager.test.d.ts +6 -0
- package/dist/src/ui/themes/theme-manager.test.js +142 -0
- package/dist/src/ui/themes/theme-manager.test.js.map +1 -0
- package/dist/src/ui/themes/theme.d.ts +130 -0
- package/dist/src/ui/themes/theme.js +379 -0
- package/dist/src/ui/themes/theme.js.map +1 -0
- package/dist/src/ui/themes/xcode.d.ts +7 -0
- package/dist/src/ui/themes/xcode.js +145 -0
- package/dist/src/ui/themes/xcode.js.map +1 -0
- package/dist/src/ui/types.d.ts +311 -0
- package/dist/src/ui/types.js +60 -0
- package/dist/src/ui/types.js.map +1 -0
- package/dist/src/ui/utils/CodeColorizer.d.ts +17 -0
- package/dist/src/ui/utils/CodeColorizer.js +111 -0
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
- package/dist/src/ui/utils/ConsolePatcher.d.ts +25 -0
- package/dist/src/ui/utils/ConsolePatcher.js +52 -0
- package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js +111 -0
- package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
- package/dist/src/ui/utils/MarkdownDisplay.js +207 -0
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +6 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js +169 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -0
- package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
- package/dist/src/ui/utils/TableRenderer.js +84 -0
- package/dist/src/ui/utils/TableRenderer.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
- package/dist/src/ui/utils/clipboardUtils.js +126 -0
- package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
- package/dist/src/ui/utils/clipboardUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/clipboardUtils.test.js +65 -0
- package/dist/src/ui/utils/clipboardUtils.test.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.d.ts +40 -0
- package/dist/src/ui/utils/commandUtils.js +146 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -0
- package/dist/src/ui/utils/commandUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/commandUtils.test.js +352 -0
- package/dist/src/ui/utils/commandUtils.test.js.map +1 -0
- package/dist/src/ui/utils/computeStats.d.ts +10 -0
- package/dist/src/ui/utils/computeStats.js +57 -0
- package/dist/src/ui/utils/computeStats.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.d.ts +18 -0
- package/dist/src/ui/utils/displayUtils.js +27 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -0
- package/dist/src/ui/utils/displayUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/displayUtils.test.js +61 -0
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -0
- package/dist/src/ui/utils/formatters.d.ts +13 -0
- package/dist/src/ui/utils/formatters.js +56 -0
- package/dist/src/ui/utils/formatters.js.map +1 -0
- package/dist/src/ui/utils/formatters.test.d.ts +6 -0
- package/dist/src/ui/utils/formatters.test.js +56 -0
- package/dist/src/ui/utils/formatters.test.js.map +1 -0
- package/dist/src/ui/utils/highlight.d.ts +11 -0
- package/dist/src/ui/utils/highlight.js +78 -0
- package/dist/src/ui/utils/highlight.js.map +1 -0
- package/dist/src/ui/utils/highlight.test.d.ts +6 -0
- package/dist/src/ui/utils/highlight.test.js +120 -0
- package/dist/src/ui/utils/highlight.test.js.map +1 -0
- package/dist/src/ui/utils/isNarrowWidth.d.ts +6 -0
- package/dist/src/ui/utils/isNarrowWidth.js +9 -0
- package/dist/src/ui/utils/isNarrowWidth.js.map +1 -0
- package/dist/src/ui/utils/kittyProtocolDetector.d.ts +13 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js +98 -0
- package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.js +110 -0
- package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
- package/dist/src/ui/utils/markdownUtilities.test.d.ts +6 -0
- package/dist/src/ui/utils/markdownUtilities.test.js +42 -0
- package/dist/src/ui/utils/markdownUtilities.test.js.map +1 -0
- package/dist/src/ui/utils/platformConstants.d.ts +75 -0
- package/dist/src/ui/utils/platformConstants.js +78 -0
- package/dist/src/ui/utils/platformConstants.js.map +1 -0
- package/dist/src/ui/utils/terminalSetup.d.ts +30 -0
- package/dist/src/ui/utils/terminalSetup.js +308 -0
- package/dist/src/ui/utils/terminalSetup.js.map +1 -0
- package/dist/src/ui/utils/textUtils.d.ts +42 -0
- package/dist/src/ui/utils/textUtils.js +185 -0
- package/dist/src/ui/utils/textUtils.js.map +1 -0
- package/dist/src/ui/utils/textUtils.test.d.ts +6 -0
- package/dist/src/ui/utils/textUtils.test.js +132 -0
- package/dist/src/ui/utils/textUtils.test.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.d.ts +12 -0
- package/dist/src/ui/utils/updateCheck.js +78 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -0
- package/dist/src/ui/utils/updateCheck.test.d.ts +6 -0
- package/dist/src/ui/utils/updateCheck.test.js +145 -0
- package/dist/src/ui/utils/updateCheck.test.js.map +1 -0
- package/dist/src/utils/attentionNotification.d.ts +20 -0
- package/dist/src/utils/attentionNotification.js +34 -0
- package/dist/src/utils/attentionNotification.js.map +1 -0
- package/dist/src/utils/attentionNotification.test.d.ts +6 -0
- package/dist/src/utils/attentionNotification.test.js +46 -0
- package/dist/src/utils/attentionNotification.test.js.map +1 -0
- package/dist/src/utils/checks.d.ts +19 -0
- package/dist/src/utils/checks.js +24 -0
- package/dist/src/utils/checks.js.map +1 -0
- package/dist/src/utils/cleanup.d.ts +8 -0
- package/dist/src/utils/cleanup.js +35 -0
- package/dist/src/utils/cleanup.js.map +1 -0
- package/dist/src/utils/commands.d.ts +20 -0
- package/dist/src/utils/commands.js +53 -0
- package/dist/src/utils/commands.js.map +1 -0
- package/dist/src/utils/commands.test.d.ts +6 -0
- package/dist/src/utils/commands.test.js +115 -0
- package/dist/src/utils/commands.test.js.map +1 -0
- package/dist/src/utils/commentJson.d.ts +9 -0
- package/dist/src/utils/commentJson.js +55 -0
- package/dist/src/utils/commentJson.js.map +1 -0
- package/dist/src/utils/commentJson.test.d.ts +6 -0
- package/dist/src/utils/commentJson.test.js +146 -0
- package/dist/src/utils/commentJson.test.js.map +1 -0
- package/dist/src/utils/deepMerge.d.ts +9 -0
- package/dist/src/utils/deepMerge.js +58 -0
- package/dist/src/utils/deepMerge.js.map +1 -0
- package/dist/src/utils/deepMerge.test.d.ts +6 -0
- package/dist/src/utils/deepMerge.test.js +143 -0
- package/dist/src/utils/deepMerge.test.js.map +1 -0
- package/dist/src/utils/dialogScopeUtils.d.ts +28 -0
- package/dist/src/utils/dialogScopeUtils.js +51 -0
- package/dist/src/utils/dialogScopeUtils.js.map +1 -0
- package/dist/src/utils/envVarResolver.d.ts +39 -0
- package/dist/src/utils/envVarResolver.js +97 -0
- package/dist/src/utils/envVarResolver.js.map +1 -0
- package/dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/dist/src/utils/envVarResolver.test.js +221 -0
- package/dist/src/utils/envVarResolver.test.js.map +1 -0
- package/dist/src/utils/errors.d.ts +35 -0
- package/dist/src/utils/errors.js +106 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/errors.test.d.ts +6 -0
- package/dist/src/utils/errors.test.js +340 -0
- package/dist/src/utils/errors.test.js.map +1 -0
- package/dist/src/utils/events.d.ts +12 -0
- package/dist/src/utils/events.js +14 -0
- package/dist/src/utils/events.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +30 -0
- package/dist/src/utils/gitUtils.js +89 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/gitUtils.test.d.ts +6 -0
- package/dist/src/utils/gitUtils.test.js +113 -0
- package/dist/src/utils/gitUtils.test.js.map +1 -0
- package/dist/src/utils/handleAutoUpdate.d.ts +11 -0
- package/dist/src/utils/handleAutoUpdate.js +102 -0
- package/dist/src/utils/handleAutoUpdate.js.map +1 -0
- package/dist/src/utils/installationInfo.d.ts +23 -0
- package/dist/src/utils/installationInfo.js +153 -0
- package/dist/src/utils/installationInfo.js.map +1 -0
- package/dist/src/utils/installationInfo.test.d.ts +6 -0
- package/dist/src/utils/installationInfo.test.js +242 -0
- package/dist/src/utils/installationInfo.test.js.map +1 -0
- package/dist/src/utils/math.d.ts +13 -0
- package/dist/src/utils/math.js +14 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.d.ts +88 -0
- package/dist/src/utils/nonInteractiveHelpers.js +470 -0
- package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
- package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js +945 -0
- package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
- package/dist/src/utils/package.d.ts +12 -0
- package/dist/src/utils/package.js +24 -0
- package/dist/src/utils/package.js.map +1 -0
- package/dist/src/utils/processUtils.d.ts +13 -0
- package/dist/src/utils/processUtils.js +18 -0
- package/dist/src/utils/processUtils.js.map +1 -0
- package/dist/src/utils/processUtils.test.d.ts +6 -0
- package/dist/src/utils/processUtils.test.js +20 -0
- package/dist/src/utils/processUtils.test.js.map +1 -0
- package/dist/src/utils/readStdin.d.ts +6 -0
- package/dist/src/utils/readStdin.js +59 -0
- package/dist/src/utils/readStdin.js.map +1 -0
- package/dist/src/utils/readStdin.test.d.ts +6 -0
- package/dist/src/utils/readStdin.test.js +88 -0
- package/dist/src/utils/readStdin.test.js.map +1 -0
- package/dist/src/utils/relaunch.d.ts +7 -0
- package/dist/src/utils/relaunch.js +57 -0
- package/dist/src/utils/relaunch.js.map +1 -0
- package/dist/src/utils/relaunch.test.d.ts +6 -0
- package/dist/src/utils/relaunch.test.js +273 -0
- package/dist/src/utils/relaunch.test.js.map +1 -0
- package/dist/src/utils/resolvePath.d.ts +6 -0
- package/dist/src/utils/resolvePath.js +21 -0
- package/dist/src/utils/resolvePath.js.map +1 -0
- package/dist/src/utils/sandbox-macos-permissive-closed.sb +32 -0
- package/dist/src/utils/sandbox-macos-permissive-open.sb +25 -0
- package/dist/src/utils/sandbox-macos-permissive-proxied.sb +37 -0
- package/dist/src/utils/sandbox-macos-restrictive-closed.sb +93 -0
- package/dist/src/utils/sandbox-macos-restrictive-open.sb +96 -0
- package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +98 -0
- package/dist/src/utils/sandbox.d.ts +7 -0
- package/dist/src/utils/sandbox.js +763 -0
- package/dist/src/utils/sandbox.js.map +1 -0
- package/dist/src/utils/settingsUtils.d.ts +144 -0
- package/dist/src/utils/settingsUtils.js +346 -0
- package/dist/src/utils/settingsUtils.js.map +1 -0
- package/dist/src/utils/settingsUtils.test.d.ts +6 -0
- package/dist/src/utils/settingsUtils.test.js +808 -0
- package/dist/src/utils/settingsUtils.test.js.map +1 -0
- package/dist/src/utils/spawnWrapper.d.ts +7 -0
- package/dist/src/utils/spawnWrapper.js +8 -0
- package/dist/src/utils/spawnWrapper.js.map +1 -0
- package/dist/src/utils/startupWarnings.d.ts +6 -0
- package/dist/src/utils/startupWarnings.js +40 -0
- package/dist/src/utils/startupWarnings.js.map +1 -0
- package/dist/src/utils/systemInfo.d.ts +66 -0
- package/dist/src/utils/systemInfo.js +125 -0
- package/dist/src/utils/systemInfo.js.map +1 -0
- package/dist/src/utils/systemInfo.test.d.ts +6 -0
- package/dist/src/utils/systemInfo.test.js +259 -0
- package/dist/src/utils/systemInfo.test.js.map +1 -0
- package/dist/src/utils/systemInfoFields.d.ts +22 -0
- package/dist/src/utils/systemInfoFields.js +96 -0
- package/dist/src/utils/systemInfoFields.js.map +1 -0
- package/dist/src/utils/updateEventEmitter.d.ts +11 -0
- package/dist/src/utils/updateEventEmitter.js +12 -0
- package/dist/src/utils/updateEventEmitter.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.d.ts +12 -0
- package/dist/src/utils/userStartupWarnings.js +74 -0
- package/dist/src/utils/userStartupWarnings.js.map +1 -0
- package/dist/src/utils/userStartupWarnings.test.d.ts +6 -0
- package/dist/src/utils/userStartupWarnings.test.js +88 -0
- package/dist/src/utils/userStartupWarnings.test.js.map +1 -0
- package/dist/src/utils/version.d.ts +6 -0
- package/dist/src/utils/version.js +11 -0
- package/dist/src/utils/version.js.map +1 -0
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/validateNonInterActiveAuth.d.ts +9 -0
- package/dist/src/validateNonInterActiveAuth.js +73 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/src/zed-integration/acp.d.ts +63 -0
- package/dist/src/zed-integration/acp.js +225 -0
- package/dist/src/zed-integration/acp.js.map +1 -0
- package/dist/src/zed-integration/fileSystemService.d.ts +20 -0
- package/dist/src/zed-integration/fileSystemService.js +46 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -0
- package/dist/src/zed-integration/schema.d.ts +12024 -0
- package/dist/src/zed-integration/schema.js +324 -0
- package/dist/src/zed-integration/schema.js.map +1 -0
- package/dist/src/zed-integration/zedIntegration.d.ts +17 -0
- package/dist/src/zed-integration/zedIntegration.js +1135 -0
- package/dist/src/zed-integration/zedIntegration.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,763 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { exec, execSync, spawn } from 'node:child_process';
|
|
7
|
+
import os from 'node:os';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import fs from 'node:fs';
|
|
10
|
+
import { readFile } from 'node:fs/promises';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import { quote, parse } from 'shell-quote';
|
|
13
|
+
import { USER_SETTINGS_DIR, SETTINGS_DIRECTORY_NAME, } from '../config/settings.js';
|
|
14
|
+
import { promisify } from 'node:util';
|
|
15
|
+
import { FatalSandboxError } from '@hibanacloud/core';
|
|
16
|
+
import { ConsolePatcher } from '../ui/utils/ConsolePatcher.js';
|
|
17
|
+
import { randomBytes } from 'node:crypto';
|
|
18
|
+
const execAsync = promisify(exec);
|
|
19
|
+
function getContainerPath(hostPath) {
|
|
20
|
+
if (os.platform() !== 'win32') {
|
|
21
|
+
return hostPath;
|
|
22
|
+
}
|
|
23
|
+
const withForwardSlashes = hostPath.replace(/\\/g, '/');
|
|
24
|
+
const match = withForwardSlashes.match(/^([A-Z]):\/(.*)/i);
|
|
25
|
+
if (match) {
|
|
26
|
+
return `/${match[1].toLowerCase()}/${match[2]}`;
|
|
27
|
+
}
|
|
28
|
+
return hostPath;
|
|
29
|
+
}
|
|
30
|
+
const LOCAL_DEV_SANDBOX_IMAGE_NAME = 'qwen-code-sandbox';
|
|
31
|
+
const SANDBOX_NETWORK_NAME = 'qwen-code-sandbox';
|
|
32
|
+
const SANDBOX_PROXY_NAME = 'qwen-code-sandbox-proxy';
|
|
33
|
+
const BUILTIN_SEATBELT_PROFILES = [
|
|
34
|
+
'permissive-open',
|
|
35
|
+
'permissive-closed',
|
|
36
|
+
'permissive-proxied',
|
|
37
|
+
'restrictive-open',
|
|
38
|
+
'restrictive-closed',
|
|
39
|
+
'restrictive-proxied',
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* Determines whether the sandbox container should be run with the current user's UID and GID.
|
|
43
|
+
* This is often necessary on Linux systems (especially Debian/Ubuntu based) when using
|
|
44
|
+
* rootful Docker without userns-remap configured, to avoid permission issues with
|
|
45
|
+
* mounted volumes.
|
|
46
|
+
*
|
|
47
|
+
* The behavior is controlled by the `SANDBOX_SET_UID_GID` environment variable:
|
|
48
|
+
* - If `SANDBOX_SET_UID_GID` is "1" or "true", this function returns `true`.
|
|
49
|
+
* - If `SANDBOX_SET_UID_GID` is "0" or "false", this function returns `false`.
|
|
50
|
+
* - If `SANDBOX_SET_UID_GID` is not set:
|
|
51
|
+
* - On Debian/Ubuntu Linux, it defaults to `true`.
|
|
52
|
+
* - On other OSes, or if OS detection fails, it defaults to `false`.
|
|
53
|
+
*
|
|
54
|
+
* For more context on running Docker containers as non-root, see:
|
|
55
|
+
* https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15
|
|
56
|
+
*
|
|
57
|
+
* @returns {Promise<boolean>} A promise that resolves to true if the current user's UID/GID should be used, false otherwise.
|
|
58
|
+
*/
|
|
59
|
+
async function shouldUseCurrentUserInSandbox() {
|
|
60
|
+
const envVar = process.env['SANDBOX_SET_UID_GID']?.toLowerCase().trim();
|
|
61
|
+
if (envVar === '1' || envVar === 'true') {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
if (envVar === '0' || envVar === 'false') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
// If environment variable is not explicitly set, check for Debian/Ubuntu Linux
|
|
68
|
+
if (os.platform() === 'linux') {
|
|
69
|
+
try {
|
|
70
|
+
const osReleaseContent = await readFile('/etc/os-release', 'utf8');
|
|
71
|
+
if (osReleaseContent.includes('ID=debian') ||
|
|
72
|
+
osReleaseContent.includes('ID=ubuntu') ||
|
|
73
|
+
osReleaseContent.match(/^ID_LIKE=.*debian.*/m) || // Covers derivatives
|
|
74
|
+
osReleaseContent.match(/^ID_LIKE=.*ubuntu.*/m) // Covers derivatives
|
|
75
|
+
) {
|
|
76
|
+
// note here and below we use console.error for informational messages on stderr
|
|
77
|
+
console.error('INFO: Defaulting to use current user UID/GID for Debian/Ubuntu-based Linux.');
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (_err) {
|
|
82
|
+
// Silently ignore if /etc/os-release is not found or unreadable.
|
|
83
|
+
// The default (false) will be applied in this case.
|
|
84
|
+
console.warn('Warning: Could not read /etc/os-release to auto-detect Debian/Ubuntu for UID/GID default.');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false; // Default to false if no other condition is met
|
|
88
|
+
}
|
|
89
|
+
// docker does not allow container names to contain ':' or '/', so we
|
|
90
|
+
// parse those out to shorten the name
|
|
91
|
+
function parseImageName(image) {
|
|
92
|
+
const [fullName, tag] = image.split(':');
|
|
93
|
+
const name = fullName.split('/').at(-1) ?? 'unknown-image';
|
|
94
|
+
return tag ? `${name}-${tag}` : name;
|
|
95
|
+
}
|
|
96
|
+
function ports() {
|
|
97
|
+
return (process.env['SANDBOX_PORTS'] ?? '')
|
|
98
|
+
.split(',')
|
|
99
|
+
.filter((p) => p.trim())
|
|
100
|
+
.map((p) => p.trim());
|
|
101
|
+
}
|
|
102
|
+
function entrypoint(workdir, cliArgs) {
|
|
103
|
+
const isWindows = os.platform() === 'win32';
|
|
104
|
+
const containerWorkdir = getContainerPath(workdir);
|
|
105
|
+
const shellCmds = [];
|
|
106
|
+
const pathSeparator = isWindows ? ';' : ':';
|
|
107
|
+
let pathSuffix = '';
|
|
108
|
+
if (process.env['PATH']) {
|
|
109
|
+
const paths = process.env['PATH'].split(pathSeparator);
|
|
110
|
+
for (const p of paths) {
|
|
111
|
+
const containerPath = getContainerPath(p);
|
|
112
|
+
if (containerPath.toLowerCase().startsWith(containerWorkdir.toLowerCase())) {
|
|
113
|
+
pathSuffix += `:${containerPath}`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (pathSuffix) {
|
|
118
|
+
shellCmds.push(`export PATH="$PATH${pathSuffix}";`);
|
|
119
|
+
}
|
|
120
|
+
let pythonPathSuffix = '';
|
|
121
|
+
if (process.env['PYTHONPATH']) {
|
|
122
|
+
const paths = process.env['PYTHONPATH'].split(pathSeparator);
|
|
123
|
+
for (const p of paths) {
|
|
124
|
+
const containerPath = getContainerPath(p);
|
|
125
|
+
if (containerPath.toLowerCase().startsWith(containerWorkdir.toLowerCase())) {
|
|
126
|
+
pythonPathSuffix += `:${containerPath}`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (pythonPathSuffix) {
|
|
131
|
+
shellCmds.push(`export PYTHONPATH="$PYTHONPATH${pythonPathSuffix}";`);
|
|
132
|
+
}
|
|
133
|
+
const projectSandboxBashrc = path.join(SETTINGS_DIRECTORY_NAME, 'sandbox.bashrc');
|
|
134
|
+
if (fs.existsSync(projectSandboxBashrc)) {
|
|
135
|
+
shellCmds.push(`source ${getContainerPath(projectSandboxBashrc)};`);
|
|
136
|
+
}
|
|
137
|
+
ports().forEach((p) => shellCmds.push(`socat TCP4-LISTEN:${p},bind=$(hostname -i),fork,reuseaddr TCP4:127.0.0.1:${p} 2> /dev/null &`));
|
|
138
|
+
const quotedCliArgs = cliArgs.slice(2).map((arg) => quote([arg]));
|
|
139
|
+
const cliCmd = process.env['NODE_ENV'] === 'development'
|
|
140
|
+
? process.env['DEBUG']
|
|
141
|
+
? 'npm run debug --'
|
|
142
|
+
: 'npm rebuild && npm run start --'
|
|
143
|
+
: process.env['DEBUG']
|
|
144
|
+
? `node --inspect-brk=0.0.0.0:${process.env['DEBUG_PORT'] || '9229'} $(which qwen)`
|
|
145
|
+
: 'qwen';
|
|
146
|
+
const args = [...shellCmds, cliCmd, ...quotedCliArgs];
|
|
147
|
+
return ['bash', '-c', args.join(' ')];
|
|
148
|
+
}
|
|
149
|
+
export async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
150
|
+
const patcher = new ConsolePatcher({
|
|
151
|
+
debugMode: cliConfig?.getDebugMode() || !!process.env['DEBUG'],
|
|
152
|
+
stderr: true,
|
|
153
|
+
});
|
|
154
|
+
patcher.patch();
|
|
155
|
+
try {
|
|
156
|
+
if (config.command === 'sandbox-exec') {
|
|
157
|
+
// disallow BUILD_SANDBOX
|
|
158
|
+
if (process.env['BUILD_SANDBOX']) {
|
|
159
|
+
throw new FatalSandboxError('Cannot BUILD_SANDBOX when using macOS Seatbelt');
|
|
160
|
+
}
|
|
161
|
+
const profile = (process.env['SEATBELT_PROFILE'] ??= 'permissive-open');
|
|
162
|
+
let profileFile = fileURLToPath(new URL(`sandbox-macos-${profile}.sb`, import.meta.url));
|
|
163
|
+
// if profile name is not recognized, then look for file under project settings directory
|
|
164
|
+
if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
|
|
165
|
+
profileFile = path.join(SETTINGS_DIRECTORY_NAME, `sandbox-macos-${profile}.sb`);
|
|
166
|
+
}
|
|
167
|
+
if (!fs.existsSync(profileFile)) {
|
|
168
|
+
throw new FatalSandboxError(`Missing macos seatbelt profile file '${profileFile}'`);
|
|
169
|
+
}
|
|
170
|
+
// Log on STDERR so it doesn't clutter the output on STDOUT
|
|
171
|
+
console.error(`using macos seatbelt (profile: ${profile}) ...`);
|
|
172
|
+
// if DEBUG is set, convert to --inspect-brk in NODE_OPTIONS
|
|
173
|
+
const nodeOptions = [
|
|
174
|
+
...(process.env['DEBUG'] ? ['--inspect-brk'] : []),
|
|
175
|
+
...nodeArgs,
|
|
176
|
+
].join(' ');
|
|
177
|
+
const args = [
|
|
178
|
+
'-D',
|
|
179
|
+
`TARGET_DIR=${fs.realpathSync(process.cwd())}`,
|
|
180
|
+
'-D',
|
|
181
|
+
`TMP_DIR=${fs.realpathSync(os.tmpdir())}`,
|
|
182
|
+
'-D',
|
|
183
|
+
`HOME_DIR=${fs.realpathSync(os.homedir())}`,
|
|
184
|
+
'-D',
|
|
185
|
+
`CACHE_DIR=${fs.realpathSync(execSync(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`,
|
|
186
|
+
];
|
|
187
|
+
// Add included directories from the workspace context
|
|
188
|
+
// Always add 5 INCLUDE_DIR parameters to ensure .sb files can reference them
|
|
189
|
+
const MAX_INCLUDE_DIRS = 5;
|
|
190
|
+
const targetDir = fs.realpathSync(cliConfig?.getTargetDir() || '');
|
|
191
|
+
const includedDirs = [];
|
|
192
|
+
if (cliConfig) {
|
|
193
|
+
const workspaceContext = cliConfig.getWorkspaceContext();
|
|
194
|
+
const directories = workspaceContext.getDirectories();
|
|
195
|
+
// Filter out TARGET_DIR
|
|
196
|
+
for (const dir of directories) {
|
|
197
|
+
const realDir = fs.realpathSync(dir);
|
|
198
|
+
if (realDir !== targetDir) {
|
|
199
|
+
includedDirs.push(realDir);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
for (let i = 0; i < MAX_INCLUDE_DIRS; i++) {
|
|
204
|
+
let dirPath = '/dev/null'; // Default to a safe path that won't cause issues
|
|
205
|
+
if (i < includedDirs.length) {
|
|
206
|
+
dirPath = includedDirs[i];
|
|
207
|
+
}
|
|
208
|
+
args.push('-D', `INCLUDE_DIR_${i}=${dirPath}`);
|
|
209
|
+
}
|
|
210
|
+
const finalArgv = cliArgs;
|
|
211
|
+
args.push('-f', profileFile, 'sh', '-c', [
|
|
212
|
+
`SANDBOX=sandbox-exec`,
|
|
213
|
+
`NODE_OPTIONS="${nodeOptions}"`,
|
|
214
|
+
...finalArgv.map((arg) => quote([arg])),
|
|
215
|
+
].join(' '));
|
|
216
|
+
// start and set up proxy if GEMINI_SANDBOX_PROXY_COMMAND is set
|
|
217
|
+
const proxyCommand = process.env['GEMINI_SANDBOX_PROXY_COMMAND'];
|
|
218
|
+
let proxyProcess = undefined;
|
|
219
|
+
let sandboxProcess = undefined;
|
|
220
|
+
const sandboxEnv = { ...process.env };
|
|
221
|
+
if (proxyCommand) {
|
|
222
|
+
const proxy = process.env['HTTPS_PROXY'] ||
|
|
223
|
+
process.env['https_proxy'] ||
|
|
224
|
+
process.env['HTTP_PROXY'] ||
|
|
225
|
+
process.env['http_proxy'] ||
|
|
226
|
+
'http://localhost:8877';
|
|
227
|
+
sandboxEnv['HTTPS_PROXY'] = proxy;
|
|
228
|
+
sandboxEnv['https_proxy'] = proxy; // lower-case can be required, e.g. for curl
|
|
229
|
+
sandboxEnv['HTTP_PROXY'] = proxy;
|
|
230
|
+
sandboxEnv['http_proxy'] = proxy;
|
|
231
|
+
const noProxy = process.env['NO_PROXY'] || process.env['no_proxy'];
|
|
232
|
+
if (noProxy) {
|
|
233
|
+
sandboxEnv['NO_PROXY'] = noProxy;
|
|
234
|
+
sandboxEnv['no_proxy'] = noProxy;
|
|
235
|
+
}
|
|
236
|
+
proxyProcess = spawn(proxyCommand, {
|
|
237
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
238
|
+
shell: true,
|
|
239
|
+
detached: true,
|
|
240
|
+
});
|
|
241
|
+
// install handlers to stop proxy on exit/signal
|
|
242
|
+
const stopProxy = () => {
|
|
243
|
+
console.log('stopping proxy ...');
|
|
244
|
+
if (proxyProcess?.pid) {
|
|
245
|
+
process.kill(-proxyProcess.pid, 'SIGTERM');
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
process.on('exit', stopProxy);
|
|
249
|
+
process.on('SIGINT', stopProxy);
|
|
250
|
+
process.on('SIGTERM', stopProxy);
|
|
251
|
+
// commented out as it disrupts ink rendering
|
|
252
|
+
// proxyProcess.stdout?.on('data', (data) => {
|
|
253
|
+
// console.info(data.toString());
|
|
254
|
+
// });
|
|
255
|
+
proxyProcess.stderr?.on('data', (data) => {
|
|
256
|
+
console.error(data.toString());
|
|
257
|
+
});
|
|
258
|
+
proxyProcess.on('close', (code, signal) => {
|
|
259
|
+
if (sandboxProcess?.pid) {
|
|
260
|
+
process.kill(-sandboxProcess.pid, 'SIGTERM');
|
|
261
|
+
}
|
|
262
|
+
throw new FatalSandboxError(`Proxy command '${proxyCommand}' exited with code ${code}, signal ${signal}`);
|
|
263
|
+
});
|
|
264
|
+
console.log('waiting for proxy to start ...');
|
|
265
|
+
await execAsync(`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`);
|
|
266
|
+
}
|
|
267
|
+
// spawn child and let it inherit stdio
|
|
268
|
+
process.stdin.pause();
|
|
269
|
+
sandboxProcess = spawn(config.command, args, {
|
|
270
|
+
stdio: 'inherit',
|
|
271
|
+
});
|
|
272
|
+
return new Promise((resolve, reject) => {
|
|
273
|
+
sandboxProcess?.on('error', reject);
|
|
274
|
+
sandboxProcess?.on('close', (code) => {
|
|
275
|
+
process.stdin.resume();
|
|
276
|
+
resolve(code ?? 1);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
console.error(`hopping into sandbox (command: ${config.command}) ...`);
|
|
281
|
+
// determine full path for gemini-cli to distinguish linked vs installed setting
|
|
282
|
+
const gcPath = fs.realpathSync(process.argv[1]);
|
|
283
|
+
const projectSandboxDockerfile = path.join(SETTINGS_DIRECTORY_NAME, 'sandbox.Dockerfile');
|
|
284
|
+
const isCustomProjectSandbox = fs.existsSync(projectSandboxDockerfile);
|
|
285
|
+
const image = config.image;
|
|
286
|
+
const workdir = path.resolve(process.cwd());
|
|
287
|
+
const containerWorkdir = getContainerPath(workdir);
|
|
288
|
+
// if BUILD_SANDBOX is set, then call scripts/build_sandbox.js under gemini-cli repo
|
|
289
|
+
//
|
|
290
|
+
// note this can only be done with binary linked from gemini-cli repo
|
|
291
|
+
if (process.env['BUILD_SANDBOX']) {
|
|
292
|
+
if (!gcPath.includes('gemini-cli/packages/')) {
|
|
293
|
+
throw new FatalSandboxError('Cannot build sandbox using installed gemini binary; ' +
|
|
294
|
+
'run `npm link ./packages/cli` under gemini-cli repo to switch to linked binary.');
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
console.error('building sandbox ...');
|
|
298
|
+
const gcRoot = gcPath.split('/packages/')[0];
|
|
299
|
+
// if project folder has sandbox.Dockerfile under project settings folder, use that
|
|
300
|
+
let buildArgs = '';
|
|
301
|
+
const projectSandboxDockerfile = path.join(SETTINGS_DIRECTORY_NAME, 'sandbox.Dockerfile');
|
|
302
|
+
if (isCustomProjectSandbox) {
|
|
303
|
+
console.error(`using ${projectSandboxDockerfile} for sandbox`);
|
|
304
|
+
buildArgs += `-f ${path.resolve(projectSandboxDockerfile)} -i ${image}`;
|
|
305
|
+
}
|
|
306
|
+
execSync(`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`, {
|
|
307
|
+
stdio: 'inherit',
|
|
308
|
+
env: {
|
|
309
|
+
...process.env,
|
|
310
|
+
GEMINI_SANDBOX: config.command, // in case sandbox is enabled via flags (see config.ts under cli package)
|
|
311
|
+
},
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// stop if image is missing
|
|
316
|
+
if (!(await ensureSandboxImageIsPresent(config.command, image))) {
|
|
317
|
+
const remedy = image === LOCAL_DEV_SANDBOX_IMAGE_NAME
|
|
318
|
+
? 'Try running `npm run build:all` or `npm run build:sandbox` under the gemini-cli repo to build it locally, or check the image name and your network connection.'
|
|
319
|
+
: 'Please check the image name, your network connection, or notify gemini-cli-dev@google.com if the issue persists.';
|
|
320
|
+
throw new FatalSandboxError(`Sandbox image '${image}' is missing or could not be pulled. ${remedy}`);
|
|
321
|
+
}
|
|
322
|
+
// use interactive mode and auto-remove container on exit
|
|
323
|
+
// run init binary inside container to forward signals & reap zombies
|
|
324
|
+
const args = ['run', '-i', '--rm', '--init', '--workdir', containerWorkdir];
|
|
325
|
+
// add custom flags from SANDBOX_FLAGS
|
|
326
|
+
if (process.env['SANDBOX_FLAGS']) {
|
|
327
|
+
const flags = parse(process.env['SANDBOX_FLAGS'], process.env).filter((f) => typeof f === 'string');
|
|
328
|
+
args.push(...flags);
|
|
329
|
+
}
|
|
330
|
+
// add TTY only if stdin is TTY as well, i.e. for piped input don't init TTY in container
|
|
331
|
+
if (process.stdin.isTTY) {
|
|
332
|
+
args.push('-t');
|
|
333
|
+
}
|
|
334
|
+
// allow access to host.docker.internal
|
|
335
|
+
args.push('--add-host', 'host.docker.internal:host-gateway');
|
|
336
|
+
// mount current directory as working directory in sandbox (set via --workdir)
|
|
337
|
+
args.push('--volume', `${workdir}:${containerWorkdir}`);
|
|
338
|
+
// mount user settings directory inside container, after creating if missing
|
|
339
|
+
// note user/home changes inside sandbox and we mount at BOTH paths for consistency
|
|
340
|
+
const userSettingsDirOnHost = USER_SETTINGS_DIR;
|
|
341
|
+
const userSettingsDirInSandbox = getContainerPath(`/home/node/${SETTINGS_DIRECTORY_NAME}`);
|
|
342
|
+
if (!fs.existsSync(userSettingsDirOnHost)) {
|
|
343
|
+
fs.mkdirSync(userSettingsDirOnHost);
|
|
344
|
+
}
|
|
345
|
+
args.push('--volume', `${userSettingsDirOnHost}:${userSettingsDirInSandbox}`);
|
|
346
|
+
if (userSettingsDirInSandbox !== userSettingsDirOnHost) {
|
|
347
|
+
args.push('--volume', `${userSettingsDirOnHost}:${getContainerPath(userSettingsDirOnHost)}`);
|
|
348
|
+
}
|
|
349
|
+
// mount os.tmpdir() as os.tmpdir() inside container
|
|
350
|
+
args.push('--volume', `${os.tmpdir()}:${getContainerPath(os.tmpdir())}`);
|
|
351
|
+
// mount gcloud config directory if it exists
|
|
352
|
+
const gcloudConfigDir = path.join(os.homedir(), '.config', 'gcloud');
|
|
353
|
+
if (fs.existsSync(gcloudConfigDir)) {
|
|
354
|
+
args.push('--volume', `${gcloudConfigDir}:${getContainerPath(gcloudConfigDir)}:ro`);
|
|
355
|
+
}
|
|
356
|
+
// mount ADC file if GOOGLE_APPLICATION_CREDENTIALS is set
|
|
357
|
+
if (process.env['GOOGLE_APPLICATION_CREDENTIALS']) {
|
|
358
|
+
const adcFile = process.env['GOOGLE_APPLICATION_CREDENTIALS'];
|
|
359
|
+
if (fs.existsSync(adcFile)) {
|
|
360
|
+
args.push('--volume', `${adcFile}:${getContainerPath(adcFile)}:ro`);
|
|
361
|
+
args.push('--env', `GOOGLE_APPLICATION_CREDENTIALS=${getContainerPath(adcFile)}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// mount paths listed in SANDBOX_MOUNTS
|
|
365
|
+
if (process.env['SANDBOX_MOUNTS']) {
|
|
366
|
+
for (let mount of process.env['SANDBOX_MOUNTS'].split(',')) {
|
|
367
|
+
if (mount.trim()) {
|
|
368
|
+
// parse mount as from:to:opts
|
|
369
|
+
let [from, to, opts] = mount.trim().split(':');
|
|
370
|
+
to = to || from; // default to mount at same path inside container
|
|
371
|
+
opts = opts || 'ro'; // default to read-only
|
|
372
|
+
mount = `${from}:${to}:${opts}`;
|
|
373
|
+
// check that from path is absolute
|
|
374
|
+
if (!path.isAbsolute(from)) {
|
|
375
|
+
throw new FatalSandboxError(`Path '${from}' listed in SANDBOX_MOUNTS must be absolute`);
|
|
376
|
+
}
|
|
377
|
+
// check that from path exists on host
|
|
378
|
+
if (!fs.existsSync(from)) {
|
|
379
|
+
throw new FatalSandboxError(`Missing mount path '${from}' listed in SANDBOX_MOUNTS`);
|
|
380
|
+
}
|
|
381
|
+
console.error(`SANDBOX_MOUNTS: ${from} -> ${to} (${opts})`);
|
|
382
|
+
args.push('--volume', mount);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
// expose env-specified ports on the sandbox
|
|
387
|
+
ports().forEach((p) => args.push('--publish', `${p}:${p}`));
|
|
388
|
+
// if DEBUG is set, expose debugging port
|
|
389
|
+
if (process.env['DEBUG']) {
|
|
390
|
+
const debugPort = process.env['DEBUG_PORT'] || '9229';
|
|
391
|
+
args.push(`--publish`, `${debugPort}:${debugPort}`);
|
|
392
|
+
}
|
|
393
|
+
// copy proxy environment variables, replacing localhost with SANDBOX_PROXY_NAME
|
|
394
|
+
// copy as both upper-case and lower-case as is required by some utilities
|
|
395
|
+
// GEMINI_SANDBOX_PROXY_COMMAND implies HTTPS_PROXY unless HTTP_PROXY is set
|
|
396
|
+
const proxyCommand = process.env['GEMINI_SANDBOX_PROXY_COMMAND'];
|
|
397
|
+
if (proxyCommand) {
|
|
398
|
+
let proxy = process.env['HTTPS_PROXY'] ||
|
|
399
|
+
process.env['https_proxy'] ||
|
|
400
|
+
process.env['HTTP_PROXY'] ||
|
|
401
|
+
process.env['http_proxy'] ||
|
|
402
|
+
'http://localhost:8877';
|
|
403
|
+
proxy = proxy.replace('localhost', SANDBOX_PROXY_NAME);
|
|
404
|
+
if (proxy) {
|
|
405
|
+
args.push('--env', `HTTPS_PROXY=${proxy}`);
|
|
406
|
+
args.push('--env', `https_proxy=${proxy}`); // lower-case can be required, e.g. for curl
|
|
407
|
+
args.push('--env', `HTTP_PROXY=${proxy}`);
|
|
408
|
+
args.push('--env', `http_proxy=${proxy}`);
|
|
409
|
+
}
|
|
410
|
+
const noProxy = process.env['NO_PROXY'] || process.env['no_proxy'];
|
|
411
|
+
if (noProxy) {
|
|
412
|
+
args.push('--env', `NO_PROXY=${noProxy}`);
|
|
413
|
+
args.push('--env', `no_proxy=${noProxy}`);
|
|
414
|
+
}
|
|
415
|
+
// if using proxy, switch to internal networking through proxy
|
|
416
|
+
if (proxy) {
|
|
417
|
+
execSync(`${config.command} network inspect ${SANDBOX_NETWORK_NAME} || ${config.command} network create --internal ${SANDBOX_NETWORK_NAME}`);
|
|
418
|
+
args.push('--network', SANDBOX_NETWORK_NAME);
|
|
419
|
+
// if proxy command is set, create a separate network w/ host access (i.e. non-internal)
|
|
420
|
+
// we will run proxy in its own container connected to both host network and internal network
|
|
421
|
+
// this allows proxy to work even on rootless podman on macos with host<->vm<->container isolation
|
|
422
|
+
if (proxyCommand) {
|
|
423
|
+
execSync(`${config.command} network inspect ${SANDBOX_PROXY_NAME} || ${config.command} network create ${SANDBOX_PROXY_NAME}`);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
// name container after image, plus random suffix to avoid conflicts
|
|
428
|
+
const imageName = parseImageName(image);
|
|
429
|
+
const isIntegrationTest = process.env['GEMINI_CLI_INTEGRATION_TEST'] === 'true';
|
|
430
|
+
let containerName;
|
|
431
|
+
if (isIntegrationTest) {
|
|
432
|
+
containerName = `gemini-cli-integration-test-${randomBytes(4).toString('hex')}`;
|
|
433
|
+
console.log(`ContainerName: ${containerName}`);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
let index = 0;
|
|
437
|
+
const containerNameCheck = execSync(`${config.command} ps -a --format "{{.Names}}"`)
|
|
438
|
+
.toString()
|
|
439
|
+
.trim();
|
|
440
|
+
while (containerNameCheck.includes(`${imageName}-${index}`)) {
|
|
441
|
+
index++;
|
|
442
|
+
}
|
|
443
|
+
containerName = `${imageName}-${index}`;
|
|
444
|
+
console.log(`ContainerName (regular): ${containerName}`);
|
|
445
|
+
}
|
|
446
|
+
args.push('--name', containerName, '--hostname', containerName);
|
|
447
|
+
// copy GEMINI_CLI_TEST_VAR for integration tests
|
|
448
|
+
if (process.env['GEMINI_CLI_TEST_VAR']) {
|
|
449
|
+
args.push('--env', `GEMINI_CLI_TEST_VAR=${process.env['GEMINI_CLI_TEST_VAR']}`);
|
|
450
|
+
}
|
|
451
|
+
// copy GEMINI_API_KEY(s)
|
|
452
|
+
if (process.env['GEMINI_API_KEY']) {
|
|
453
|
+
args.push('--env', `GEMINI_API_KEY=${process.env['GEMINI_API_KEY']}`);
|
|
454
|
+
}
|
|
455
|
+
if (process.env['GOOGLE_API_KEY']) {
|
|
456
|
+
args.push('--env', `GOOGLE_API_KEY=${process.env['GOOGLE_API_KEY']}`);
|
|
457
|
+
}
|
|
458
|
+
// copy OPENAI_API_KEY and related env vars for Qwen
|
|
459
|
+
if (process.env['OPENAI_API_KEY']) {
|
|
460
|
+
args.push('--env', `OPENAI_API_KEY=${process.env['OPENAI_API_KEY']}`);
|
|
461
|
+
}
|
|
462
|
+
// copy TAVILY_API_KEY for web search tool
|
|
463
|
+
if (process.env['TAVILY_API_KEY']) {
|
|
464
|
+
args.push('--env', `TAVILY_API_KEY=${process.env['TAVILY_API_KEY']}`);
|
|
465
|
+
}
|
|
466
|
+
if (process.env['OPENAI_BASE_URL']) {
|
|
467
|
+
args.push('--env', `OPENAI_BASE_URL=${process.env['OPENAI_BASE_URL']}`);
|
|
468
|
+
}
|
|
469
|
+
if (process.env['OPENAI_MODEL']) {
|
|
470
|
+
args.push('--env', `OPENAI_MODEL=${process.env['OPENAI_MODEL']}`);
|
|
471
|
+
}
|
|
472
|
+
// copy GOOGLE_GENAI_USE_VERTEXAI
|
|
473
|
+
if (process.env['GOOGLE_GENAI_USE_VERTEXAI']) {
|
|
474
|
+
args.push('--env', `GOOGLE_GENAI_USE_VERTEXAI=${process.env['GOOGLE_GENAI_USE_VERTEXAI']}`);
|
|
475
|
+
}
|
|
476
|
+
// copy GOOGLE_GENAI_USE_GCA
|
|
477
|
+
if (process.env['GOOGLE_GENAI_USE_GCA']) {
|
|
478
|
+
args.push('--env', `GOOGLE_GENAI_USE_GCA=${process.env['GOOGLE_GENAI_USE_GCA']}`);
|
|
479
|
+
}
|
|
480
|
+
// copy GOOGLE_CLOUD_PROJECT
|
|
481
|
+
if (process.env['GOOGLE_CLOUD_PROJECT']) {
|
|
482
|
+
args.push('--env', `GOOGLE_CLOUD_PROJECT=${process.env['GOOGLE_CLOUD_PROJECT']}`);
|
|
483
|
+
}
|
|
484
|
+
// copy GOOGLE_CLOUD_LOCATION
|
|
485
|
+
if (process.env['GOOGLE_CLOUD_LOCATION']) {
|
|
486
|
+
args.push('--env', `GOOGLE_CLOUD_LOCATION=${process.env['GOOGLE_CLOUD_LOCATION']}`);
|
|
487
|
+
}
|
|
488
|
+
// copy GEMINI_MODEL
|
|
489
|
+
if (process.env['GEMINI_MODEL']) {
|
|
490
|
+
args.push('--env', `GEMINI_MODEL=${process.env['GEMINI_MODEL']}`);
|
|
491
|
+
}
|
|
492
|
+
// copy TERM and COLORTERM to try to maintain terminal setup
|
|
493
|
+
if (process.env['TERM']) {
|
|
494
|
+
args.push('--env', `TERM=${process.env['TERM']}`);
|
|
495
|
+
}
|
|
496
|
+
if (process.env['COLORTERM']) {
|
|
497
|
+
args.push('--env', `COLORTERM=${process.env['COLORTERM']}`);
|
|
498
|
+
}
|
|
499
|
+
// Pass through IDE mode environment variables
|
|
500
|
+
for (const envVar of [
|
|
501
|
+
'QWEN_CODE_IDE_SERVER_PORT',
|
|
502
|
+
'QWEN_CODE_IDE_WORKSPACE_PATH',
|
|
503
|
+
'TERM_PROGRAM',
|
|
504
|
+
]) {
|
|
505
|
+
if (process.env[envVar]) {
|
|
506
|
+
args.push('--env', `${envVar}=${process.env[envVar]}`);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
// copy VIRTUAL_ENV if under working directory
|
|
510
|
+
// also mount-replace VIRTUAL_ENV directory with <project_settings>/sandbox.venv
|
|
511
|
+
// sandbox can then set up this new VIRTUAL_ENV directory using sandbox.bashrc (see below)
|
|
512
|
+
// directory will be empty if not set up, which is still preferable to having host binaries
|
|
513
|
+
if (process.env['VIRTUAL_ENV']
|
|
514
|
+
?.toLowerCase()
|
|
515
|
+
.startsWith(workdir.toLowerCase())) {
|
|
516
|
+
const sandboxVenvPath = path.resolve(SETTINGS_DIRECTORY_NAME, 'sandbox.venv');
|
|
517
|
+
if (!fs.existsSync(sandboxVenvPath)) {
|
|
518
|
+
fs.mkdirSync(sandboxVenvPath, { recursive: true });
|
|
519
|
+
}
|
|
520
|
+
args.push('--volume', `${sandboxVenvPath}:${getContainerPath(process.env['VIRTUAL_ENV'])}`);
|
|
521
|
+
args.push('--env', `VIRTUAL_ENV=${getContainerPath(process.env['VIRTUAL_ENV'])}`);
|
|
522
|
+
}
|
|
523
|
+
// copy additional environment variables from SANDBOX_ENV
|
|
524
|
+
if (process.env['SANDBOX_ENV']) {
|
|
525
|
+
for (let env of process.env['SANDBOX_ENV'].split(',')) {
|
|
526
|
+
if ((env = env.trim())) {
|
|
527
|
+
if (env.includes('=')) {
|
|
528
|
+
console.error(`SANDBOX_ENV: ${env}`);
|
|
529
|
+
args.push('--env', env);
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
throw new FatalSandboxError('SANDBOX_ENV must be a comma-separated list of key=value pairs');
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
// copy NODE_OPTIONS
|
|
538
|
+
const existingNodeOptions = process.env['NODE_OPTIONS'] || '';
|
|
539
|
+
const allNodeOptions = [
|
|
540
|
+
...(existingNodeOptions ? [existingNodeOptions] : []),
|
|
541
|
+
...nodeArgs,
|
|
542
|
+
].join(' ');
|
|
543
|
+
if (allNodeOptions.length > 0) {
|
|
544
|
+
args.push('--env', `NODE_OPTIONS="${allNodeOptions}"`);
|
|
545
|
+
}
|
|
546
|
+
// set SANDBOX as container name
|
|
547
|
+
args.push('--env', `SANDBOX=${containerName}`);
|
|
548
|
+
// for podman only, use empty --authfile to skip unnecessary auth refresh overhead
|
|
549
|
+
if (config.command === 'podman') {
|
|
550
|
+
const emptyAuthFilePath = path.join(os.tmpdir(), 'empty_auth.json');
|
|
551
|
+
fs.writeFileSync(emptyAuthFilePath, '{}', 'utf-8');
|
|
552
|
+
args.push('--authfile', emptyAuthFilePath);
|
|
553
|
+
}
|
|
554
|
+
// Determine if the current user's UID/GID should be passed to the sandbox.
|
|
555
|
+
// See shouldUseCurrentUserInSandbox for more details.
|
|
556
|
+
let userFlag = '';
|
|
557
|
+
const finalEntrypoint = entrypoint(workdir, cliArgs);
|
|
558
|
+
if (process.env['GEMINI_CLI_INTEGRATION_TEST'] === 'true') {
|
|
559
|
+
args.push('--user', 'root');
|
|
560
|
+
userFlag = '--user root';
|
|
561
|
+
}
|
|
562
|
+
else if (await shouldUseCurrentUserInSandbox()) {
|
|
563
|
+
// For the user-creation logic to work, the container must start as root.
|
|
564
|
+
// The entrypoint script then handles dropping privileges to the correct user.
|
|
565
|
+
args.push('--user', 'root');
|
|
566
|
+
const uid = execSync('id -u').toString().trim();
|
|
567
|
+
const gid = execSync('id -g').toString().trim();
|
|
568
|
+
// Instead of passing --user to the main sandbox container, we let it
|
|
569
|
+
// start as root, then create a user with the host's UID/GID, and
|
|
570
|
+
// finally switch to that user to run the gemini process. This is
|
|
571
|
+
// necessary on Linux to ensure the user exists within the
|
|
572
|
+
// container's /etc/passwd file, which is required by os.userInfo().
|
|
573
|
+
const username = 'gemini';
|
|
574
|
+
const homeDir = getContainerPath(os.homedir());
|
|
575
|
+
const setupUserCommands = [
|
|
576
|
+
// Use -f with groupadd to avoid errors if the group already exists.
|
|
577
|
+
`groupadd -f -g ${gid} ${username}`,
|
|
578
|
+
// Create user only if it doesn't exist. Use -o for non-unique UID.
|
|
579
|
+
`id -u ${username} &>/dev/null || useradd -o -u ${uid} -g ${gid} -d ${homeDir} -s /bin/bash ${username}`,
|
|
580
|
+
].join(' && ');
|
|
581
|
+
const originalCommand = finalEntrypoint[2];
|
|
582
|
+
const escapedOriginalCommand = originalCommand.replace(/'/g, "'\\''");
|
|
583
|
+
// Use `su -p` to preserve the environment.
|
|
584
|
+
const suCommand = `su -p ${username} -c '${escapedOriginalCommand}'`;
|
|
585
|
+
// The entrypoint is always `['bash', '-c', '<command>']`, so we modify the command part.
|
|
586
|
+
finalEntrypoint[2] = `${setupUserCommands} && ${suCommand}`;
|
|
587
|
+
// We still need userFlag for the simpler proxy container, which does not have this issue.
|
|
588
|
+
userFlag = `--user ${uid}:${gid}`;
|
|
589
|
+
// When forcing a UID in the sandbox, $HOME can be reset to '/', so we copy $HOME as well.
|
|
590
|
+
args.push('--env', `HOME=${os.homedir()}`);
|
|
591
|
+
}
|
|
592
|
+
// push container image name
|
|
593
|
+
args.push(image);
|
|
594
|
+
// push container entrypoint (including args)
|
|
595
|
+
args.push(...finalEntrypoint);
|
|
596
|
+
// start and set up proxy if GEMINI_SANDBOX_PROXY_COMMAND is set
|
|
597
|
+
let proxyProcess = undefined;
|
|
598
|
+
let sandboxProcess = undefined;
|
|
599
|
+
if (proxyCommand) {
|
|
600
|
+
// run proxyCommand in its own container
|
|
601
|
+
const proxyContainerCommand = `${config.command} run --rm --init ${userFlag} --name ${SANDBOX_PROXY_NAME} --network ${SANDBOX_PROXY_NAME} -p 8877:8877 -v ${process.cwd()}:${workdir} --workdir ${workdir} ${image} ${proxyCommand}`;
|
|
602
|
+
proxyProcess = spawn(proxyContainerCommand, {
|
|
603
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
604
|
+
shell: true,
|
|
605
|
+
detached: true,
|
|
606
|
+
});
|
|
607
|
+
// install handlers to stop proxy on exit/signal
|
|
608
|
+
const stopProxy = () => {
|
|
609
|
+
console.log('stopping proxy container ...');
|
|
610
|
+
execSync(`${config.command} rm -f ${SANDBOX_PROXY_NAME}`);
|
|
611
|
+
};
|
|
612
|
+
process.on('exit', stopProxy);
|
|
613
|
+
process.on('SIGINT', stopProxy);
|
|
614
|
+
process.on('SIGTERM', stopProxy);
|
|
615
|
+
// commented out as it disrupts ink rendering
|
|
616
|
+
// proxyProcess.stdout?.on('data', (data) => {
|
|
617
|
+
// console.info(data.toString());
|
|
618
|
+
// });
|
|
619
|
+
proxyProcess.stderr?.on('data', (data) => {
|
|
620
|
+
console.error(data.toString().trim());
|
|
621
|
+
});
|
|
622
|
+
proxyProcess.on('close', (code, signal) => {
|
|
623
|
+
if (sandboxProcess?.pid) {
|
|
624
|
+
process.kill(-sandboxProcess.pid, 'SIGTERM');
|
|
625
|
+
}
|
|
626
|
+
throw new FatalSandboxError(`Proxy container command '${proxyContainerCommand}' exited with code ${code}, signal ${signal}`);
|
|
627
|
+
});
|
|
628
|
+
console.log('waiting for proxy to start ...');
|
|
629
|
+
await execAsync(`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`);
|
|
630
|
+
// connect proxy container to sandbox network
|
|
631
|
+
// (workaround for older versions of docker that don't support multiple --network args)
|
|
632
|
+
await execAsync(`${config.command} network connect ${SANDBOX_NETWORK_NAME} ${SANDBOX_PROXY_NAME}`);
|
|
633
|
+
}
|
|
634
|
+
// spawn child and let it inherit stdio
|
|
635
|
+
process.stdin.pause();
|
|
636
|
+
sandboxProcess = spawn(config.command, args, {
|
|
637
|
+
stdio: 'inherit',
|
|
638
|
+
});
|
|
639
|
+
return new Promise((resolve, reject) => {
|
|
640
|
+
sandboxProcess.on('error', (err) => {
|
|
641
|
+
console.error('Sandbox process error:', err);
|
|
642
|
+
reject(err);
|
|
643
|
+
});
|
|
644
|
+
sandboxProcess?.on('close', (code, signal) => {
|
|
645
|
+
process.stdin.resume();
|
|
646
|
+
if (code !== 0 && code !== null) {
|
|
647
|
+
console.error(`Sandbox process exited with code: ${code}, signal: ${signal}`);
|
|
648
|
+
}
|
|
649
|
+
resolve(code ?? 1);
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
finally {
|
|
654
|
+
patcher.cleanup();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
// Helper functions to ensure sandbox image is present
|
|
658
|
+
async function imageExists(sandbox, image) {
|
|
659
|
+
return new Promise((resolve) => {
|
|
660
|
+
const args = ['images', '-q', image];
|
|
661
|
+
const checkProcess = spawn(sandbox, args);
|
|
662
|
+
let stdoutData = '';
|
|
663
|
+
if (checkProcess.stdout) {
|
|
664
|
+
checkProcess.stdout.on('data', (data) => {
|
|
665
|
+
stdoutData += data.toString();
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
checkProcess.on('error', (err) => {
|
|
669
|
+
console.warn(`Failed to start '${sandbox}' command for image check: ${err.message}`);
|
|
670
|
+
resolve(false);
|
|
671
|
+
});
|
|
672
|
+
checkProcess.on('close', (code) => {
|
|
673
|
+
// Non-zero code might indicate docker daemon not running, etc.
|
|
674
|
+
// The primary success indicator is non-empty stdoutData.
|
|
675
|
+
if (code !== 0) {
|
|
676
|
+
// console.warn(`'${sandbox} images -q ${image}' exited with code ${code}.`);
|
|
677
|
+
}
|
|
678
|
+
resolve(stdoutData.trim() !== '');
|
|
679
|
+
});
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
async function pullImage(sandbox, image) {
|
|
683
|
+
console.info(`Attempting to pull image ${image} using ${sandbox}...`);
|
|
684
|
+
return new Promise((resolve) => {
|
|
685
|
+
const args = ['pull', image];
|
|
686
|
+
const pullProcess = spawn(sandbox, args, { stdio: 'pipe' });
|
|
687
|
+
let stderrData = '';
|
|
688
|
+
const onStdoutData = (data) => {
|
|
689
|
+
console.info(data.toString().trim()); // Show pull progress
|
|
690
|
+
};
|
|
691
|
+
const onStderrData = (data) => {
|
|
692
|
+
stderrData += data.toString();
|
|
693
|
+
console.error(data.toString().trim()); // Show pull errors/info from the command itself
|
|
694
|
+
};
|
|
695
|
+
const onError = (err) => {
|
|
696
|
+
console.warn(`Failed to start '${sandbox} pull ${image}' command: ${err.message}`);
|
|
697
|
+
cleanup();
|
|
698
|
+
resolve(false);
|
|
699
|
+
};
|
|
700
|
+
const onClose = (code) => {
|
|
701
|
+
if (code === 0) {
|
|
702
|
+
console.info(`Successfully pulled image ${image}.`);
|
|
703
|
+
cleanup();
|
|
704
|
+
resolve(true);
|
|
705
|
+
}
|
|
706
|
+
else {
|
|
707
|
+
console.warn(`Failed to pull image ${image}. '${sandbox} pull ${image}' exited with code ${code}.`);
|
|
708
|
+
if (stderrData.trim()) {
|
|
709
|
+
// Details already printed by the stderr listener above
|
|
710
|
+
}
|
|
711
|
+
cleanup();
|
|
712
|
+
resolve(false);
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
const cleanup = () => {
|
|
716
|
+
if (pullProcess.stdout) {
|
|
717
|
+
pullProcess.stdout.removeListener('data', onStdoutData);
|
|
718
|
+
}
|
|
719
|
+
if (pullProcess.stderr) {
|
|
720
|
+
pullProcess.stderr.removeListener('data', onStderrData);
|
|
721
|
+
}
|
|
722
|
+
pullProcess.removeListener('error', onError);
|
|
723
|
+
pullProcess.removeListener('close', onClose);
|
|
724
|
+
if (pullProcess.connected) {
|
|
725
|
+
pullProcess.disconnect();
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
if (pullProcess.stdout) {
|
|
729
|
+
pullProcess.stdout.on('data', onStdoutData);
|
|
730
|
+
}
|
|
731
|
+
if (pullProcess.stderr) {
|
|
732
|
+
pullProcess.stderr.on('data', onStderrData);
|
|
733
|
+
}
|
|
734
|
+
pullProcess.on('error', onError);
|
|
735
|
+
pullProcess.on('close', onClose);
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
async function ensureSandboxImageIsPresent(sandbox, image) {
|
|
739
|
+
console.info(`Checking for sandbox image: ${image}`);
|
|
740
|
+
if (await imageExists(sandbox, image)) {
|
|
741
|
+
console.info(`Sandbox image ${image} found locally.`);
|
|
742
|
+
return true;
|
|
743
|
+
}
|
|
744
|
+
console.info(`Sandbox image ${image} not found locally.`);
|
|
745
|
+
if (image === LOCAL_DEV_SANDBOX_IMAGE_NAME) {
|
|
746
|
+
// user needs to build the image themselves
|
|
747
|
+
return false;
|
|
748
|
+
}
|
|
749
|
+
if (await pullImage(sandbox, image)) {
|
|
750
|
+
// After attempting to pull, check again to be certain
|
|
751
|
+
if (await imageExists(sandbox, image)) {
|
|
752
|
+
console.info(`Sandbox image ${image} is now available after pulling.`);
|
|
753
|
+
return true;
|
|
754
|
+
}
|
|
755
|
+
else {
|
|
756
|
+
console.warn(`Sandbox image ${image} still not found after a pull attempt. This might indicate an issue with the image name or registry, or the pull command reported success but failed to make the image available.`);
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
console.error(`Failed to obtain sandbox image ${image} after check and pull attempt.`);
|
|
761
|
+
return false; // Pull command failed or image still not present
|
|
762
|
+
}
|
|
763
|
+
//# sourceMappingURL=sandbox.js.map
|