@zgsm/costrict-cli 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/package.json +2 -2
- package/dist/src/commands/extensions/disable.js +1 -1
- package/dist/src/commands/extensions/disable.test.js +1 -1
- package/dist/src/commands/extensions/enable.js +1 -1
- package/dist/src/commands/extensions/enable.test.js +2 -2
- package/dist/src/commands/extensions/install.js +1 -1
- package/dist/src/commands/extensions/install.test.js +1 -1
- package/dist/src/commands/extensions/link.js +1 -1
- package/dist/src/commands/extensions/link.test.js +1 -1
- package/dist/src/commands/extensions/list.js +1 -1
- package/dist/src/commands/extensions/list.test.js +1 -1
- package/dist/src/commands/extensions/new.js +1 -1
- package/dist/src/commands/extensions/settings.js +1 -1
- package/dist/src/commands/extensions/uninstall.js +1 -1
- package/dist/src/commands/extensions/uninstall.test.js +1 -1
- package/dist/src/commands/extensions/update.js +1 -1
- package/dist/src/commands/extensions/update.test.js +1 -1
- package/dist/src/commands/extensions/utils.d.ts +1 -1
- package/dist/src/commands/extensions/utils.js +1 -1
- package/dist/src/commands/extensions/validate.js +1 -1
- package/dist/src/commands/extensions/validate.test.js +1 -1
- package/dist/src/commands/hooks/migrate.js +1 -1
- package/dist/src/commands/hooks/migrate.test.js +1 -1
- package/dist/src/commands/mcp/add.js +1 -1
- package/dist/src/commands/mcp/add.test.js +1 -1
- package/dist/src/commands/mcp/list.js +1 -1
- package/dist/src/commands/mcp/list.test.js +2 -2
- package/dist/src/commands/mcp/remove.js +1 -1
- package/dist/src/commands/mcp/remove.test.js +1 -1
- package/dist/src/config/auth.js +1 -1
- package/dist/src/config/auth.test.js +1 -1
- package/dist/src/config/config.d.ts +1 -1
- package/dist/src/config/config.integration.test.js +3 -3
- package/dist/src/config/config.js +1 -1
- package/dist/src/config/config.test.js +4 -4
- package/dist/src/config/extension-manager.d.ts +1 -1
- package/dist/src/config/extension-manager.js +1 -1
- package/dist/src/config/extension.d.ts +1 -1
- package/dist/src/config/extension.test.js +2 -2
- package/dist/src/config/extensions/consent.js +1 -1
- package/dist/src/config/extensions/consent.test.js +2 -2
- package/dist/src/config/extensions/extensionEnablement.d.ts +1 -1
- package/dist/src/config/extensions/extensionEnablement.js +1 -1
- package/dist/src/config/extensions/extensionEnablement.test.js +1 -1
- package/dist/src/config/extensions/extensionSettings.js +1 -1
- package/dist/src/config/extensions/extensionSettings.test.js +2 -2
- package/dist/src/config/extensions/github.d.ts +1 -1
- package/dist/src/config/extensions/github.js +1 -1
- package/dist/src/config/extensions/github.test.js +1 -1
- package/dist/src/config/extensions/storage.js +1 -1
- package/dist/src/config/extensions/storage.test.js +2 -2
- package/dist/src/config/extensions/update.d.ts +1 -1
- package/dist/src/config/extensions/update.js +1 -1
- package/dist/src/config/extensions/variables.js +1 -1
- package/dist/src/config/policy-engine.integration.test.js +1 -1
- package/dist/src/config/policy.d.ts +1 -1
- package/dist/src/config/policy.js +1 -1
- package/dist/src/config/sandboxConfig.d.ts +1 -1
- package/dist/src/config/sandboxConfig.js +1 -1
- package/dist/src/config/sandboxConfig.test.js +2 -2
- package/dist/src/config/settings.js +1 -1
- package/dist/src/config/settings.test.js +2 -2
- package/dist/src/config/settingsSchema.d.ts +3 -3
- package/dist/src/config/settingsSchema.js +1 -1
- package/dist/src/config/settings_repro.test.js +1 -1
- package/dist/src/config/trustedFolders.js +1 -1
- package/dist/src/config/trustedFolders.test.js +1 -1
- package/dist/src/core/auth.d.ts +1 -1
- package/dist/src/core/auth.js +1 -1
- package/dist/src/core/auth.test.js +2 -2
- package/dist/src/core/initializer.d.ts +1 -1
- package/dist/src/core/initializer.js +1 -1
- package/dist/src/core/initializer.test.js +2 -2
- package/dist/src/gemini.d.ts +1 -1
- package/dist/src/gemini.js +1 -1
- package/dist/src/gemini.test.js +7 -7
- package/dist/src/gemini_cleanup.test.js +3 -3
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/nonInteractiveCli.d.ts +1 -1
- package/dist/src/nonInteractiveCli.js +1 -1
- package/dist/src/nonInteractiveCli.test.js +3 -3
- package/dist/src/nonInteractiveCliCommands.d.ts +1 -1
- package/dist/src/nonInteractiveCliCommands.js +1 -1
- package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
- package/dist/src/services/BuiltinCommandLoader.js +1 -1
- package/dist/src/services/CommandService.js +1 -1
- package/dist/src/services/CommandService.test.js +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +1 -1
- package/dist/src/services/FileCommandLoader.js +1 -1
- package/dist/src/services/FileCommandLoader.test.js +2 -2
- package/dist/src/services/McpPromptLoader.d.ts +1 -1
- package/dist/src/services/McpPromptLoader.js +1 -1
- package/dist/src/services/McpPromptLoader.test.js +1 -1
- package/dist/src/services/prompt-processors/argumentProcessor.js +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.js +1 -1
- package/dist/src/services/prompt-processors/atFileProcessor.test.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.test.js +2 -2
- package/dist/src/test-utils/createExtension.d.ts +1 -1
- package/dist/src/test-utils/createExtension.js +1 -1
- package/dist/src/test-utils/render.d.ts +1 -1
- package/dist/src/test-utils/render.js +1 -1
- package/dist/src/ui/App.test.js +1 -1
- package/dist/src/ui/AppContainer.d.ts +1 -1
- package/dist/src/ui/AppContainer.js +1 -1
- package/dist/src/ui/AppContainer.test.js +3 -3
- package/dist/src/ui/IdeIntegrationNudge.d.ts +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.js +1 -1
- package/dist/src/ui/auth/ApiAuthDialog.test.js +2 -2
- package/dist/src/ui/auth/AuthDialog.d.ts +1 -1
- package/dist/src/ui/auth/AuthDialog.js +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +2 -2
- package/dist/src/ui/auth/useAuth.d.ts +1 -1
- package/dist/src/ui/auth/useAuth.js +2 -2
- package/dist/src/ui/auth/useAuth.test.js +2 -2
- package/dist/src/ui/commands/aboutCommand.js +1 -1
- package/dist/src/ui/commands/aboutCommand.test.js +2 -2
- package/dist/src/ui/commands/bugCommand.js +1 -1
- package/dist/src/ui/commands/bugCommand.test.js +2 -2
- package/dist/src/ui/commands/chatCommand.js +1 -1
- package/dist/src/ui/commands/chatCommand.test.js +1 -1
- package/dist/src/ui/commands/clearCommand.js +1 -1
- package/dist/src/ui/commands/clearCommand.test.js +3 -3
- package/dist/src/ui/commands/compressCommand.test.js +1 -1
- package/dist/src/ui/commands/copyCommand.js +1 -1
- package/dist/src/ui/commands/directoryCommand.js +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +1 -1
- package/dist/src/ui/commands/hooksCommand.js +1 -1
- package/dist/src/ui/commands/hooksCommand.test.js +1 -1
- package/dist/src/ui/commands/ideCommand.js +2 -2
- package/dist/src/ui/commands/ideCommand.test.js +3 -3
- package/dist/src/ui/commands/initCommand.js +1 -1
- package/dist/src/ui/commands/mcpCommand.js +2 -2
- package/dist/src/ui/commands/mcpCommand.test.js +2 -2
- package/dist/src/ui/commands/memoryCommand.js +1 -1
- package/dist/src/ui/commands/memoryCommand.test.js +2 -2
- package/dist/src/ui/commands/policiesCommand.test.js +1 -1
- package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
- package/dist/src/ui/commands/restoreCommand.js +1 -1
- package/dist/src/ui/commands/restoreCommand.test.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.js +1 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js +1 -1
- package/dist/src/ui/commands/statsCommand.js +1 -1
- package/dist/src/ui/commands/terminalSetupCommand.js +1 -1
- package/dist/src/ui/commands/types.d.ts +1 -1
- package/dist/src/ui/components/AlternateBufferQuittingDisplay.test.js +1 -1
- package/dist/src/ui/components/AnsiOutput.d.ts +1 -1
- package/dist/src/ui/components/AppHeader.test.js +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.js +1 -1
- package/dist/src/ui/components/AutoAcceptIndicator.test.js +1 -1
- package/dist/src/ui/components/Composer.js +1 -1
- package/dist/src/ui/components/Composer.test.js +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.js +1 -1
- package/dist/src/ui/components/ConfigInitDisplay.test.js +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +1 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.js +1 -1
- package/dist/src/ui/components/ContextUsageDisplay.test.js +1 -1
- package/dist/src/ui/components/DebugProfiler.js +1 -1
- package/dist/src/ui/components/DialogManager.test.js +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.test.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.js +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +1 -1
- package/dist/src/ui/components/Footer.js +1 -1
- package/dist/src/ui/components/Footer.test.js +2 -2
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/InputPrompt.d.ts +2 -2
- package/dist/src/ui/components/InputPrompt.js +1 -1
- package/dist/src/ui/components/InputPrompt.test.js +1 -1
- package/dist/src/ui/components/LoadingIndicator.d.ts +1 -1
- package/dist/src/ui/components/ModelDialog.js +1 -1
- package/dist/src/ui/components/ModelDialog.test.js +1 -1
- package/dist/src/ui/components/ModelStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/MultiFolderTrustDialog.d.ts +1 -1
- package/dist/src/ui/components/Notifications.js +1 -1
- package/dist/src/ui/components/Notifications.test.js +1 -1
- package/dist/src/ui/components/ProQuotaDialog.d.ts +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +1 -1
- package/dist/src/ui/components/SessionBrowser.d.ts +1 -1
- package/dist/src/ui/components/SessionSummaryDisplay.test.js +1 -1
- package/dist/src/ui/components/SettingsDialog.d.ts +1 -1
- package/dist/src/ui/components/SettingsDialog.js +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.d.ts +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
- package/dist/src/ui/components/ShellInputPrompt.js +1 -1
- package/dist/src/ui/components/ShellInputPrompt.test.js +3 -3
- package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
- package/dist/src/ui/components/StatsDisplay.js +1 -1
- package/dist/src/ui/components/StatsDisplay.test.js +1 -1
- package/dist/src/ui/components/Tips.d.ts +1 -1
- package/dist/src/ui/components/Tips.js +1 -1
- package/dist/src/ui/components/ToolStatsDisplay.test.js +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.test.js +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.js +1 -1
- package/dist/src/ui/components/messages/ShellToolMessage.test.js +1 -1
- package/dist/src/ui/components/messages/Todo.js +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +1 -1
- package/dist/src/ui/components/messages/ToolMessage.d.ts +1 -1
- package/dist/src/ui/components/messages/ToolShared.js +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +1 -1
- package/dist/src/ui/components/views/ExtensionsList.d.ts +1 -1
- package/dist/src/ui/components/views/ExtensionsList.js +1 -1
- package/dist/src/ui/components/views/McpStatus.d.ts +2 -2
- package/dist/src/ui/components/views/McpStatus.js +1 -1
- package/dist/src/ui/components/views/McpStatus.test.js +2 -2
- package/dist/src/ui/contexts/ConfigContext.d.ts +1 -1
- package/dist/src/ui/contexts/ConfigContext.js +1 -1
- package/dist/src/ui/contexts/KeypressContext.d.ts +1 -1
- package/dist/src/ui/contexts/KeypressContext.js +1 -1
- package/dist/src/ui/contexts/KeypressContext.test.js +1 -1
- package/dist/src/ui/contexts/MouseContext.js +1 -1
- package/dist/src/ui/contexts/SessionContext.d.ts +1 -1
- package/dist/src/ui/contexts/SessionContext.js +1 -1
- package/dist/src/ui/contexts/SessionContext.test.js +1 -1
- package/dist/src/ui/contexts/UIActionsContext.d.ts +1 -1
- package/dist/src/ui/contexts/UIActionsContext.js +1 -1
- package/dist/src/ui/contexts/UIStateContext.d.ts +1 -1
- package/dist/src/ui/editors/editorSettingsManager.d.ts +1 -1
- package/dist/src/ui/editors/editorSettingsManager.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +2 -2
- package/dist/src/ui/hooks/slashCommandProcessor.js +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.test.js +2 -2
- package/dist/src/ui/hooks/useAtCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useAtCompletion.js +1 -1
- package/dist/src/ui/hooks/useAtCompletion.test.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.js +1 -1
- package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +3 -3
- package/dist/src/ui/hooks/useBanner.d.ts +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.js +1 -1
- package/dist/src/ui/hooks/useConsoleMessages.test.js +2 -2
- package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
- package/dist/src/ui/hooks/useEditorSettings.js +1 -1
- package/dist/src/ui/hooks/useEditorSettings.test.js +3 -3
- package/dist/src/ui/hooks/useExtensionUpdates.js +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +1 -1
- package/dist/src/ui/hooks/useFlickerDetector.js +1 -1
- package/dist/src/ui/hooks/useFlickerDetector.test.js +3 -3
- package/dist/src/ui/hooks/useFolderTrust.js +1 -1
- package/dist/src/ui/hooks/useFolderTrust.test.js +1 -1
- package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
- package/dist/src/ui/hooks/useGeminiStream.js +1 -1
- package/dist/src/ui/hooks/useGeminiStream.test.js +2 -2
- package/dist/src/ui/hooks/useGitBranchName.js +1 -1
- package/dist/src/ui/hooks/useGitBranchName.test.js +4 -4
- package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.js +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +2 -2
- package/dist/src/ui/hooks/useIncludeDirsTrust.d.ts +1 -1
- package/dist/src/ui/hooks/useIncludeDirsTrust.js +1 -1
- package/dist/src/ui/hooks/useInputHistoryStore.js +1 -1
- package/dist/src/ui/hooks/useInputHistoryStore.test.js +1 -1
- package/dist/src/ui/hooks/useLogger.d.ts +2 -2
- package/dist/src/ui/hooks/useLogger.js +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.js +1 -1
- package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.d.ts +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.test.js +2 -2
- package/dist/src/ui/hooks/usePromptCompletion.d.ts +1 -1
- package/dist/src/ui/hooks/usePromptCompletion.js +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.js +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.test.js +2 -2
- package/dist/src/ui/hooks/useSessionBrowser.d.ts +1 -1
- package/dist/src/ui/hooks/useSessionBrowser.js +1 -1
- package/dist/src/ui/hooks/useSessionResume.d.ts +1 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +1 -1
- package/dist/src/ui/hooks/useShellHistory.js +1 -1
- package/dist/src/ui/hooks/useShellHistory.test.js +2 -2
- package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +1 -1
- package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.js +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +4 -4
- package/dist/src/ui/hooks/vim.js +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
- package/dist/src/ui/privacy/PrivacyNotice.js +1 -1
- package/dist/src/ui/themes/color-utils.js +1 -1
- package/dist/src/ui/themes/theme-manager.js +1 -1
- package/dist/src/ui/themes/theme-manager.test.js +1 -1
- package/dist/src/ui/types.d.ts +1 -1
- package/dist/src/ui/utils/CodeColorizer.js +1 -1
- package/dist/src/ui/utils/bracketedPaste.js +1 -1
- package/dist/src/ui/utils/clipboardUtils.js +1 -1
- package/dist/src/ui/utils/commandUtils.js +1 -1
- package/dist/src/ui/utils/directoryUtils.test.js +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.js +1 -1
- package/dist/src/ui/utils/kittyProtocolDetector.test.js +1 -1
- package/dist/src/ui/utils/mouse.d.ts +1 -1
- package/dist/src/ui/utils/mouse.js +1 -1
- package/dist/src/ui/utils/terminalSetup.js +1 -1
- package/dist/src/ui/utils/updateCheck.js +1 -1
- package/dist/src/ui/utils/updateCheck.test.js +1 -1
- package/dist/src/utils/cleanup.d.ts +1 -1
- package/dist/src/utils/cleanup.js +1 -1
- package/dist/src/utils/cleanup.test.js +1 -1
- package/dist/src/utils/commentJson.js +1 -1
- package/dist/src/utils/commentJson.test.js +2 -2
- package/dist/src/utils/errors.d.ts +1 -1
- package/dist/src/utils/errors.js +1 -1
- package/dist/src/utils/errors.test.js +2 -2
- package/dist/src/utils/events.d.ts +1 -1
- package/dist/src/utils/gitUtils.js +1 -1
- package/dist/src/utils/installationInfo.js +1 -1
- package/dist/src/utils/installationInfo.test.js +2 -2
- package/dist/src/utils/persistentState.js +1 -1
- package/dist/src/utils/persistentState.test.js +2 -2
- package/dist/src/utils/readStdin.js +1 -1
- package/dist/src/utils/readStdin.test.js +2 -2
- package/dist/src/utils/sandbox.d.ts +1 -1
- package/dist/src/utils/sandbox.js +1 -1
- package/dist/src/utils/sandbox.test.js +2 -2
- package/dist/src/utils/sandboxUtils.js +1 -1
- package/dist/src/utils/sandboxUtils.test.js +1 -1
- package/dist/src/utils/sessionCleanup.d.ts +1 -1
- package/dist/src/utils/sessionCleanup.integration.test.js +1 -1
- package/dist/src/utils/sessionCleanup.js +1 -1
- package/dist/src/utils/sessionCleanup.test.js +1 -1
- package/dist/src/utils/sessionUtils.d.ts +1 -1
- package/dist/src/utils/sessionUtils.js +1 -1
- package/dist/src/utils/sessionUtils.test.js +1 -1
- package/dist/src/utils/sessions.d.ts +1 -1
- package/dist/src/utils/sessions.js +1 -1
- package/dist/src/utils/sessions.test.js +3 -3
- package/dist/src/utils/startupWarnings.js +1 -1
- package/dist/src/utils/startupWarnings.test.js +2 -2
- package/dist/src/validateNonInterActiveAuth.d.ts +2 -2
- package/dist/src/validateNonInterActiveAuth.js +1 -1
- package/dist/src/validateNonInterActiveAuth.test.js +1 -1
- package/dist/src/zed-integration/connection.js +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -1
- package/dist/src/zed-integration/schema.d.ts +940 -940
- package/dist/src/zed-integration/zedIntegration.d.ts +1 -1
- package/dist/src/zed-integration/zedIntegration.js +1 -1
- package/dist/src/zed-integration/zedIntegration.test.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
import { main } from './src/gemini.js';
|
|
8
|
-
import { FatalError, writeToStderr } from '@
|
|
8
|
+
import { FatalError, writeToStderr } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { runExitCleanup } from './src/utils/cleanup.js';
|
|
10
10
|
// --- Global Entry Point ---
|
|
11
11
|
main().catch(async (error) => {
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgsm/costrict-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "CoStrict CLI",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"config": {
|
|
29
|
-
"sandboxImageUri": "us-docker.pkg.dev/zgsm/costrict-cli/sandbox:0.
|
|
29
|
+
"sandboxImageUri": "us-docker.pkg.dev/zgsm/costrict-cli/sandbox:0.0.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zgsm/costrict-cli-core": "file:../core",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import {} from 'yargs';
|
|
7
7
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
8
8
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
11
11
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
12
12
|
import { promptForSetting } from '../../config/extensions/extensionSettings.js';
|
|
@@ -20,7 +20,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
20
20
|
emitConsoleLog('error', format(message, ...args));
|
|
21
21
|
}),
|
|
22
22
|
}));
|
|
23
|
-
vi.mock('@
|
|
23
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
24
24
|
const actual = await importOriginal();
|
|
25
25
|
return {
|
|
26
26
|
...actual,
|
|
@@ -7,7 +7,7 @@ import {} from 'yargs';
|
|
|
7
7
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
8
8
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
9
9
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
10
|
-
import { debugLogger, FatalConfigError, getErrorMessage, } from '@
|
|
10
|
+
import { debugLogger, FatalConfigError, getErrorMessage, } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { promptForSetting } from '../../config/extensions/extensionSettings.js';
|
|
12
12
|
import { exitCli } from '../utils.js';
|
|
13
13
|
export async function handleEnable(args) {
|
|
@@ -9,7 +9,7 @@ import {} from 'yargs';
|
|
|
9
9
|
import { handleEnable, enableCommand } from './enable.js';
|
|
10
10
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
11
11
|
import { loadSettings, SettingScope, } from '../../config/settings.js';
|
|
12
|
-
import { FatalConfigError } from '@
|
|
12
|
+
import { FatalConfigError } from '@zgsm/costrict-cli-core';
|
|
13
13
|
// Mock dependencies
|
|
14
14
|
const emitConsoleLog = vi.hoisted(() => vi.fn());
|
|
15
15
|
const debugLogger = vi.hoisted(() => ({
|
|
@@ -20,7 +20,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
20
20
|
emitConsoleLog('error', format(message, ...args));
|
|
21
21
|
}),
|
|
22
22
|
}));
|
|
23
|
-
vi.mock('@
|
|
23
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
24
24
|
const actual = await importOriginal();
|
|
25
25
|
return {
|
|
26
26
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger, } from '@
|
|
6
|
+
import { debugLogger, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
8
8
|
import { stat } from 'node:fs/promises';
|
|
9
9
|
import { INSTALL_WARNING_MESSAGE, requestConsentNonInteractive, } from '../../config/extensions/consent.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { describe, it, expect, vi } from 'vitest';
|
|
7
7
|
import { handleInstall, installCommand } from './install.js';
|
|
8
8
|
import yargs from 'yargs';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
const mockInstallOrUpdateExtension = vi.hoisted(() => vi.fn());
|
|
11
11
|
const mockRequestConsentNonInteractive = vi.hoisted(() => vi.fn());
|
|
12
12
|
const mockStat = vi.hoisted(() => vi.fn());
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger, } from '@
|
|
6
|
+
import { debugLogger, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
8
8
|
import { INSTALL_WARNING_MESSAGE, requestConsentNonInteractive, } from '../../config/extensions/consent.js';
|
|
9
9
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
@@ -20,7 +20,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
20
20
|
emitConsoleLog('error', format(message, ...args));
|
|
21
21
|
}),
|
|
22
22
|
}));
|
|
23
|
-
vi.mock('@
|
|
23
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
24
24
|
const actual = await importOriginal();
|
|
25
25
|
return {
|
|
26
26
|
...actual,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
7
|
-
import { debugLogger } from '@
|
|
7
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
9
9
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
10
10
|
import { loadSettings } from '../../config/settings.js';
|
|
@@ -19,7 +19,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
19
19
|
emitConsoleLog('error', format(message, ...args));
|
|
20
20
|
}),
|
|
21
21
|
}));
|
|
22
|
-
vi.mock('@
|
|
22
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
23
23
|
const actual = await importOriginal();
|
|
24
24
|
return {
|
|
25
25
|
...actual,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { access, cp, mkdir, readdir, writeFile } from 'node:fs/promises';
|
|
7
7
|
import { join, dirname, basename } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { exitCli } from '../utils.js';
|
|
11
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
12
|
const __dirname = dirname(__filename);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { updateSetting, promptForSetting, ExtensionSettingScope, getScopedEnvContents, } from '../../config/extensions/extensionSettings.js';
|
|
7
7
|
import { getExtensionAndManager } from './utils.js';
|
|
8
|
-
import { debugLogger } from '@
|
|
8
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { exitCli } from '../utils.js';
|
|
10
10
|
const setCommand = {
|
|
11
11
|
command: 'set [--scope] <name> <setting>',
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
7
|
-
import { debugLogger } from '@
|
|
7
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
9
9
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
10
10
|
import { loadSettings } from '../../config/settings.js';
|
|
@@ -40,7 +40,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
40
40
|
emitConsoleLog('error', format(message, ...args));
|
|
41
41
|
}),
|
|
42
42
|
}));
|
|
43
|
-
vi.mock('@
|
|
43
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
44
44
|
const actual = await importOriginal();
|
|
45
45
|
return {
|
|
46
46
|
...actual,
|
|
@@ -7,7 +7,7 @@ import { updateAllUpdatableExtensions, checkForAllExtensionUpdates, updateExtens
|
|
|
7
7
|
import { checkForExtensionUpdate } from '../../config/extensions/github.js';
|
|
8
8
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
9
9
|
import { ExtensionUpdateState } from '../../ui/state/extensions.js';
|
|
10
|
-
import { debugLogger } from '@
|
|
10
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
12
12
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
13
13
|
import { loadSettings } from '../../config/settings.js';
|
|
@@ -22,7 +22,7 @@ const debugLogger = vi.hoisted(() => ({
|
|
|
22
22
|
emitConsoleLog('error', format(message, ...args));
|
|
23
23
|
}),
|
|
24
24
|
}));
|
|
25
|
-
vi.mock('@
|
|
25
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
26
26
|
const actual = await importOriginal();
|
|
27
27
|
return {
|
|
28
28
|
...actual,
|
|
@@ -8,6 +8,6 @@ export declare function getExtensionAndManager(name: string): Promise<{
|
|
|
8
8
|
extension: null;
|
|
9
9
|
extensionManager: null;
|
|
10
10
|
} | {
|
|
11
|
-
extension: import("@
|
|
11
|
+
extension: import("@zgsm/costrict-cli-core/index.js").GeminiCLIExtension;
|
|
12
12
|
extensionManager: ExtensionManager;
|
|
13
13
|
}>;
|
|
@@ -7,7 +7,7 @@ import { ExtensionManager } from '../../config/extension-manager.js';
|
|
|
7
7
|
import { promptForSetting } from '../../config/extensions/extensionSettings.js';
|
|
8
8
|
import { loadSettings } from '../../config/settings.js';
|
|
9
9
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
10
|
-
import { debugLogger } from '@
|
|
10
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
export async function getExtensionAndManager(name) {
|
|
12
12
|
const workspaceDir = process.cwd();
|
|
13
13
|
const extensionManager = new ExtensionManager({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger } from '@
|
|
6
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import * as fs from 'node:fs';
|
|
8
8
|
import * as path from 'node:path';
|
|
9
9
|
import semver from 'semver';
|
|
@@ -10,7 +10,7 @@ import yargs from 'yargs';
|
|
|
10
10
|
import { createExtension } from '../../test-utils/createExtension.js';
|
|
11
11
|
import path from 'node:path';
|
|
12
12
|
import * as os from 'node:os';
|
|
13
|
-
import { debugLogger } from '@
|
|
13
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
14
14
|
vi.mock('../utils.js', () => ({
|
|
15
15
|
exitCli: vi.fn(),
|
|
16
16
|
}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from 'node:fs';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
|
-
import { debugLogger, getErrorMessage } from '@
|
|
8
|
+
import { debugLogger, getErrorMessage } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
10
10
|
import { exitCli } from '../utils.js';
|
|
11
11
|
import stripJsonComments from 'strip-json-comments';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
7
7
|
import * as fs from 'node:fs';
|
|
8
8
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { handleMigrateFromClaude } from './migrate.js';
|
|
11
11
|
vi.mock('node:fs');
|
|
12
12
|
vi.mock('../utils.js', () => ({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
7
|
-
import { debugLogger } from '@
|
|
7
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { exitCli } from '../utils.js';
|
|
9
9
|
async function addMcpServer(name, commandOrUrl, args, options) {
|
|
10
10
|
const { scope, transport, env, header, timeout, trust, description, includeTools, excludeTools, } = options;
|
|
@@ -7,7 +7,7 @@ import { describe, it, expect, vi } from 'vitest';
|
|
|
7
7
|
import yargs, {} from 'yargs';
|
|
8
8
|
import { addCommand } from './add.js';
|
|
9
9
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
10
|
-
import { debugLogger } from '@
|
|
10
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
vi.mock('../utils.js', () => ({
|
|
12
12
|
exitCli: vi.fn(),
|
|
13
13
|
}));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { loadSettings } from '../../config/settings.js';
|
|
7
|
-
import { MCPServerStatus, createTransport, debugLogger, } from '@
|
|
7
|
+
import { MCPServerStatus, createTransport, debugLogger, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
9
9
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
10
10
|
import { requestConsentNonInteractive } from '../../config/extensions/consent.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { vi, describe, it, expect, beforeEach } from 'vitest';
|
|
7
7
|
import { listMcpServers } from './list.js';
|
|
8
8
|
import { loadSettings } from '../../config/settings.js';
|
|
9
|
-
import { createTransport, debugLogger } from '@
|
|
9
|
+
import { createTransport, debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
11
11
|
import { ExtensionStorage } from '../../config/extensions/storage.js';
|
|
12
12
|
import { ExtensionManager } from '../../config/extension-manager.js';
|
|
@@ -19,7 +19,7 @@ vi.mock('../../config/extensions/storage.js', () => ({
|
|
|
19
19
|
},
|
|
20
20
|
}));
|
|
21
21
|
vi.mock('../../config/extension-manager.js');
|
|
22
|
-
vi.mock('@
|
|
22
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
23
23
|
const original = await importOriginal();
|
|
24
24
|
return {
|
|
25
25
|
...original,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { loadSettings, SettingScope } from '../../config/settings.js';
|
|
7
|
-
import { debugLogger } from '@
|
|
7
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { exitCli } from '../utils.js';
|
|
9
9
|
async function removeMcpServer(name, options) {
|
|
10
10
|
const { scope } = options;
|
|
@@ -10,7 +10,7 @@ import { removeCommand } from './remove.js';
|
|
|
10
10
|
import * as fs from 'node:fs';
|
|
11
11
|
import * as path from 'node:path';
|
|
12
12
|
import * as os from 'node:os';
|
|
13
|
-
import { GEMINI_DIR, debugLogger } from '@
|
|
13
|
+
import { GEMINI_DIR, debugLogger } from '@zgsm/costrict-cli-core';
|
|
14
14
|
vi.mock('fs/promises', () => ({
|
|
15
15
|
readFile: vi.fn(),
|
|
16
16
|
writeFile: vi.fn(),
|
package/dist/src/config/auth.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AuthType } from '@
|
|
6
|
+
import { AuthType } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { loadEnvironment, loadSettings } from './settings.js';
|
|
8
8
|
export function validateAuthMethod(authMethod) {
|
|
9
9
|
loadEnvironment(loadSettings().merged);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AuthType } from '@
|
|
6
|
+
import { AuthType } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
8
8
|
import { validateAuthMethod } from './auth.js';
|
|
9
9
|
vi.mock('./settings.js', () => ({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { Config } from '@
|
|
6
|
+
import { Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { Settings } from './settings.js';
|
|
8
8
|
import { RESUME_LATEST } from '../utils/sessionUtils.js';
|
|
9
9
|
export interface CliArgs {
|
|
@@ -7,7 +7,7 @@ import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi, }
|
|
|
7
7
|
import * as fs from 'node:fs';
|
|
8
8
|
import * as path from 'node:path';
|
|
9
9
|
import { tmpdir } from 'node:os';
|
|
10
|
-
import { Config, DEFAULT_FILE_FILTERING_OPTIONS, } from '@
|
|
10
|
+
import { Config, DEFAULT_FILE_FILTERING_OPTIONS, } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { http, HttpResponse } from 'msw';
|
|
12
12
|
import { setupServer } from 'msw/node';
|
|
13
13
|
export const server = setupServer();
|
|
@@ -23,8 +23,8 @@ afterAll(() => {
|
|
|
23
23
|
});
|
|
24
24
|
const CLEARCUT_URL = 'https://play.googleapis.com/log';
|
|
25
25
|
// Mock file discovery service and tool registry
|
|
26
|
-
vi.mock('@
|
|
27
|
-
const actual = await vi.importActual('@
|
|
26
|
+
vi.mock('@zgsm/costrict-cli-core', async () => {
|
|
27
|
+
const actual = await vi.importActual('@zgsm/costrict-cli-core');
|
|
28
28
|
return {
|
|
29
29
|
...actual,
|
|
30
30
|
FileDiscoveryService: vi.fn().mockImplementation(() => ({
|
|
@@ -9,7 +9,7 @@ import process from 'node:process';
|
|
|
9
9
|
import { mcpCommand } from '../commands/mcp.js';
|
|
10
10
|
import { extensionsCommand } from '../commands/extensions.js';
|
|
11
11
|
import { hooksCommand } from '../commands/hooks.js';
|
|
12
|
-
import { Config, setGeminiMdFilename as setServerGeminiMdFilename, getCurrentGeminiMdFilename, ApprovalMode, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, FileDiscoveryService, WRITE_FILE_TOOL_NAME, SHELL_TOOL_NAMES, SHELL_TOOL_NAME, resolveTelemetrySettings, FatalConfigError, getPty, EDIT_TOOL_NAME, debugLogger, loadServerHierarchicalMemory, WEB_FETCH_TOOL_NAME, getVersion, } from '@
|
|
12
|
+
import { Config, setGeminiMdFilename as setServerGeminiMdFilename, getCurrentGeminiMdFilename, ApprovalMode, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_EMBEDDING_MODEL, DEFAULT_FILE_FILTERING_OPTIONS, DEFAULT_MEMORY_FILE_FILTERING_OPTIONS, FileDiscoveryService, WRITE_FILE_TOOL_NAME, SHELL_TOOL_NAMES, SHELL_TOOL_NAME, resolveTelemetrySettings, FatalConfigError, getPty, EDIT_TOOL_NAME, debugLogger, loadServerHierarchicalMemory, WEB_FETCH_TOOL_NAME, getVersion, } from '@zgsm/costrict-cli-core';
|
|
13
13
|
import { loadSandboxConfig } from './sandboxConfig.js';
|
|
14
14
|
import { resolvePath } from '../utils/resolvePath.js';
|
|
15
15
|
import { appEvents } from '../utils/events.js';
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
7
7
|
import * as os from 'node:os';
|
|
8
8
|
import * as path from 'node:path';
|
|
9
|
-
import { DEFAULT_FILE_FILTERING_OPTIONS, OutputFormat, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, EDIT_TOOL_NAME, WEB_FETCH_TOOL_NAME, debugLogger, } from '@
|
|
9
|
+
import { DEFAULT_FILE_FILTERING_OPTIONS, OutputFormat, SHELL_TOOL_NAME, WRITE_FILE_TOOL_NAME, EDIT_TOOL_NAME, WEB_FETCH_TOOL_NAME, debugLogger, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import { loadCliConfig, parseArguments } from './config.js';
|
|
11
|
-
import * as ServerConfig from '@
|
|
11
|
+
import * as ServerConfig from '@zgsm/costrict-cli-core';
|
|
12
12
|
import { isWorkspaceTrusted } from './trustedFolders.js';
|
|
13
13
|
import { ExtensionManager } from './extension-manager.js';
|
|
14
14
|
import { RESUME_LATEST } from '../utils/sessionUtils.js';
|
|
@@ -62,8 +62,8 @@ vi.mock('open', () => ({
|
|
|
62
62
|
vi.mock('read-package-up', () => ({
|
|
63
63
|
readPackageUp: vi.fn(() => Promise.resolve({ packageJson: { version: 'test-version' } })),
|
|
64
64
|
}));
|
|
65
|
-
vi.mock('@
|
|
66
|
-
const actualServer = await vi.importActual('@
|
|
65
|
+
vi.mock('@zgsm/costrict-cli-core', async () => {
|
|
66
|
+
const actualServer = await vi.importActual('@zgsm/costrict-cli-core');
|
|
67
67
|
return {
|
|
68
68
|
...actualServer,
|
|
69
69
|
IdeClient: {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type Settings, SettingScope } from './settings.js';
|
|
7
7
|
import { type ExtensionConfig } from './extension.js';
|
|
8
|
-
import { ExtensionLoader, type ExtensionEvents, type ExtensionInstallMetadata, type GeminiCLIExtension } from '@
|
|
8
|
+
import { ExtensionLoader, type ExtensionEvents, type ExtensionInstallMetadata, type GeminiCLIExtension } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { type ExtensionSetting } from './extensions/extensionSettings.js';
|
|
10
10
|
import type { EventEmitter } from 'node:stream';
|
|
11
11
|
interface ExtensionManagerParams {
|
|
@@ -13,7 +13,7 @@ import { createHash, randomUUID } from 'node:crypto';
|
|
|
13
13
|
import { loadInstallMetadata } from './extension.js';
|
|
14
14
|
import { isWorkspaceTrusted, loadTrustedFolders, TrustLevel, } from './trustedFolders.js';
|
|
15
15
|
import { cloneFromGit, downloadFromGitHubRelease, tryParseGithubUrl, } from './extensions/github.js';
|
|
16
|
-
import { Config, debugLogger, ExtensionDisableEvent, ExtensionEnableEvent, ExtensionInstallEvent, ExtensionLoader, ExtensionUninstallEvent, ExtensionUpdateEvent, getErrorMessage, logExtensionDisable, logExtensionEnable, logExtensionInstallEvent, logExtensionUninstall, logExtensionUpdateEvent, } from '@
|
|
16
|
+
import { Config, debugLogger, ExtensionDisableEvent, ExtensionEnableEvent, ExtensionInstallEvent, ExtensionLoader, ExtensionUninstallEvent, ExtensionUpdateEvent, getErrorMessage, logExtensionDisable, logExtensionEnable, logExtensionInstallEvent, logExtensionUninstall, logExtensionUpdateEvent, } from '@zgsm/costrict-cli-core';
|
|
17
17
|
import { maybeRequestConsentOrFail } from './extensions/consent.js';
|
|
18
18
|
import { resolveEnvVarsInObject } from '../utils/envVarResolver.js';
|
|
19
19
|
import { ExtensionStorage } from './extensions/storage.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { MCPServerConfig, ExtensionInstallMetadata } from '@
|
|
6
|
+
import type { MCPServerConfig, ExtensionInstallMetadata } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { ExtensionSetting } from './extensions/extensionSettings.js';
|
|
8
8
|
/**
|
|
9
9
|
* Extension definition as written to disk in gemini-extension.json files.
|
|
@@ -7,7 +7,7 @@ import { vi, describe, it, expect, beforeEach, afterEach, afterAll, } from 'vite
|
|
|
7
7
|
import * as fs from 'node:fs';
|
|
8
8
|
import * as os from 'node:os';
|
|
9
9
|
import * as path from 'node:path';
|
|
10
|
-
import { ExtensionUninstallEvent, ExtensionDisableEvent, ExtensionEnableEvent, KeychainTokenStorage, } from '@
|
|
10
|
+
import { ExtensionUninstallEvent, ExtensionDisableEvent, ExtensionEnableEvent, KeychainTokenStorage, } from '@zgsm/costrict-cli-core';
|
|
11
11
|
import { loadSettings, SettingScope } from './settings.js';
|
|
12
12
|
import { isWorkspaceTrusted, resetTrustedFoldersForTesting, } from './trustedFolders.js';
|
|
13
13
|
import { createExtension } from '../test-utils/createExtension.js';
|
|
@@ -62,7 +62,7 @@ const mockLogExtensionInstallEvent = vi.hoisted(() => vi.fn());
|
|
|
62
62
|
const mockLogExtensionUninstall = vi.hoisted(() => vi.fn());
|
|
63
63
|
const mockLogExtensionUpdateEvent = vi.hoisted(() => vi.fn());
|
|
64
64
|
const mockLogExtensionDisable = vi.hoisted(() => vi.fn());
|
|
65
|
-
vi.mock('@
|
|
65
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
66
66
|
const actual = await importOriginal();
|
|
67
67
|
return {
|
|
68
68
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger } from '@
|
|
6
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { escapeAnsiCtrlCodes } from '../../ui/utils/textUtils.js';
|
|
8
8
|
export const INSTALL_WARNING_MESSAGE = '**The extension you are about to install may have been created by a third-party developer and sourced from a public repository. Google does not vet, endorse, or guarantee the functionality or security of extensions. Please carefully inspect any extension and its source code before installing to understand the permissions it requires and the actions it may perform.**';
|
|
9
9
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
7
7
|
import { requestConsentNonInteractive, requestConsentInteractive, maybeRequestConsentOrFail, INSTALL_WARNING_MESSAGE, } from './consent.js';
|
|
8
|
-
import { debugLogger } from '@
|
|
8
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
9
9
|
const mockReadline = vi.hoisted(() => ({
|
|
10
10
|
createInterface: vi.fn().mockReturnValue({
|
|
11
11
|
question: vi.fn(),
|
|
@@ -17,7 +17,7 @@ vi.mock('node:readline', () => ({
|
|
|
17
17
|
default: mockReadline,
|
|
18
18
|
createInterface: mockReadline.createInterface,
|
|
19
19
|
}));
|
|
20
|
-
vi.mock('@
|
|
20
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
21
21
|
const actual = await importOriginal();
|
|
22
22
|
return {
|
|
23
23
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type GeminiCLIExtension } from '@
|
|
6
|
+
import { type GeminiCLIExtension } from '@zgsm/costrict-cli-core';
|
|
7
7
|
export interface ExtensionEnablementConfig {
|
|
8
8
|
overrides: string[];
|
|
9
9
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import fs from 'node:fs';
|
|
7
7
|
import path from 'node:path';
|
|
8
|
-
import { coreEvents } from '@
|
|
8
|
+
import { coreEvents } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { ExtensionStorage } from './storage.js';
|
|
10
10
|
export class Override {
|
|
11
11
|
baseRule;
|
|
@@ -9,7 +9,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
|
9
9
|
import { ExtensionEnablementManager, Override } from './extensionEnablement.js';
|
|
10
10
|
import { ExtensionStorage } from './storage.js';
|
|
11
11
|
vi.mock('./storage.js');
|
|
12
|
-
import { coreEvents, GEMINI_DIR, } from '@
|
|
12
|
+
import { coreEvents, GEMINI_DIR, } from '@zgsm/costrict-cli-core';
|
|
13
13
|
vi.mock('node:os', () => ({
|
|
14
14
|
homedir: vi.fn().mockReturnValue('/virtual-home'),
|
|
15
15
|
tmpdir: vi.fn().mockReturnValue('/virtual-tmp'),
|
|
@@ -9,7 +9,7 @@ import * as dotenv from 'dotenv';
|
|
|
9
9
|
import * as path from 'node:path';
|
|
10
10
|
import { ExtensionStorage } from './storage.js';
|
|
11
11
|
import prompts from 'prompts';
|
|
12
|
-
import { debugLogger, KeychainTokenStorage } from '@
|
|
12
|
+
import { debugLogger, KeychainTokenStorage } from '@zgsm/costrict-cli-core';
|
|
13
13
|
import { EXTENSION_SETTINGS_FILENAME } from './variables.js';
|
|
14
14
|
export var ExtensionSettingScope;
|
|
15
15
|
(function (ExtensionSettingScope) {
|
|
@@ -11,7 +11,7 @@ import { ExtensionStorage } from './storage.js';
|
|
|
11
11
|
import prompts from 'prompts';
|
|
12
12
|
import * as fsPromises from 'node:fs/promises';
|
|
13
13
|
import * as fs from 'node:fs';
|
|
14
|
-
import { KeychainTokenStorage } from '@
|
|
14
|
+
import { KeychainTokenStorage } from '@zgsm/costrict-cli-core';
|
|
15
15
|
import { EXTENSION_SETTINGS_FILENAME } from './variables.js';
|
|
16
16
|
vi.mock('prompts');
|
|
17
17
|
vi.mock('os', async (importOriginal) => {
|
|
@@ -21,7 +21,7 @@ vi.mock('os', async (importOriginal) => {
|
|
|
21
21
|
homedir: vi.fn(),
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
|
-
vi.mock('@
|
|
24
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
25
25
|
const actual = await importOriginal();
|
|
26
26
|
return {
|
|
27
27
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type ExtensionInstallMetadata, type GeminiCLIExtension } from '@
|
|
6
|
+
import { type ExtensionInstallMetadata, type GeminiCLIExtension } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { ExtensionUpdateState } from '../../ui/state/extensions.js';
|
|
8
8
|
import type { ExtensionManager } from '../extension-manager.js';
|
|
9
9
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { simpleGit } from 'simple-git';
|
|
7
7
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
8
|
-
import { debugLogger, } from '@
|
|
8
|
+
import { debugLogger, } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { ExtensionUpdateState } from '../../ui/state/extensions.js';
|
|
10
10
|
import * as os from 'node:os';
|
|
11
11
|
import * as https from 'node:https';
|
|
@@ -14,7 +14,7 @@ import * as tar from 'tar';
|
|
|
14
14
|
import * as extract from 'extract-zip';
|
|
15
15
|
import { fetchJson } from './github_fetch.js';
|
|
16
16
|
import { EventEmitter } from 'node:events';
|
|
17
|
-
vi.mock('@
|
|
17
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
18
18
|
const actual = await importOriginal();
|
|
19
19
|
return {
|
|
20
20
|
...actual,
|
|
@@ -7,7 +7,7 @@ import * as path from 'node:path';
|
|
|
7
7
|
import * as fs from 'node:fs';
|
|
8
8
|
import * as os from 'node:os';
|
|
9
9
|
import { EXTENSION_SETTINGS_FILENAME, EXTENSIONS_CONFIG_FILENAME, } from './variables.js';
|
|
10
|
-
import { Storage } from '@
|
|
10
|
+
import { Storage } from '@zgsm/costrict-cli-core';
|
|
11
11
|
export class ExtensionStorage {
|
|
12
12
|
extensionName;
|
|
13
13
|
constructor(extensionName) {
|