@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
|
@@ -9,7 +9,7 @@ import * as os from 'node:os';
|
|
|
9
9
|
import * as path from 'node:path';
|
|
10
10
|
import * as fs from 'node:fs';
|
|
11
11
|
import { EXTENSION_SETTINGS_FILENAME, EXTENSIONS_CONFIG_FILENAME, } from './variables.js';
|
|
12
|
-
import { Storage } from '@
|
|
12
|
+
import { Storage } from '@zgsm/costrict-cli-core';
|
|
13
13
|
vi.mock('node:os');
|
|
14
14
|
vi.mock('node:fs', async (importOriginal) => {
|
|
15
15
|
const actual = await importOriginal();
|
|
@@ -21,7 +21,7 @@ vi.mock('node:fs', async (importOriginal) => {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
|
-
vi.mock('@
|
|
24
|
+
vi.mock('@zgsm/costrict-cli-core');
|
|
25
25
|
describe('ExtensionStorage', () => {
|
|
26
26
|
const mockHomeDir = '/mock/home';
|
|
27
27
|
const extensionName = 'test-extension';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { type ExtensionUpdateAction, ExtensionUpdateState, type ExtensionUpdateStatus } from '../../ui/state/extensions.js';
|
|
7
|
-
import { type GeminiCLIExtension } from '@
|
|
7
|
+
import { type GeminiCLIExtension } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { type ExtensionManager } from '../extension-manager.js';
|
|
9
9
|
export interface ExtensionUpdateInfo {
|
|
10
10
|
name: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ExtensionUpdateState, } from '../../ui/state/extensions.js';
|
|
7
7
|
import { loadInstallMetadata } from '../extension.js';
|
|
8
8
|
import { checkForExtensionUpdate } from './github.js';
|
|
9
|
-
import { debugLogger } from '@
|
|
9
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import * as fs from 'node:fs';
|
|
11
11
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
12
12
|
import { copyExtension } from '../extension-manager.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as path from 'node:path';
|
|
7
7
|
import { VARIABLE_SCHEMA } from './variableSchema.js';
|
|
8
|
-
import { GEMINI_DIR } from '@
|
|
8
|
+
import { GEMINI_DIR } from '@zgsm/costrict-cli-core';
|
|
9
9
|
export const EXTENSIONS_DIRECTORY_NAME = path.join(GEMINI_DIR, 'extensions');
|
|
10
10
|
export const EXTENSIONS_CONFIG_FILENAME = 'gemini-extension.json';
|
|
11
11
|
export const INSTALL_METADATA_FILENAME = '.gemini-extension-install.json';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect } from 'vitest';
|
|
7
|
-
import { ApprovalMode, PolicyDecision, PolicyEngine, } from '@
|
|
7
|
+
import { ApprovalMode, PolicyDecision, PolicyEngine, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { createPolicyEngineConfig } from './policy.js';
|
|
9
9
|
describe('Policy Engine Integration Tests', () => {
|
|
10
10
|
describe('Policy configuration produces valid PolicyEngine config', () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type PolicyEngineConfig, type ApprovalMode, type PolicyEngine, type MessageBus } from '@
|
|
6
|
+
import { type PolicyEngineConfig, type ApprovalMode, type PolicyEngine, type MessageBus } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { type Settings } from './settings.js';
|
|
8
8
|
export declare function createPolicyEngineConfig(settings: Settings, approvalMode: ApprovalMode): Promise<PolicyEngineConfig>;
|
|
9
9
|
export declare function createPolicyUpdater(policyEngine: PolicyEngine, messageBus: MessageBus): void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { createPolicyEngineConfig as createCorePolicyEngineConfig, createPolicyUpdater as createCorePolicyUpdater, } from '@
|
|
6
|
+
import { createPolicyEngineConfig as createCorePolicyEngineConfig, createPolicyUpdater as createCorePolicyUpdater, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import {} from './settings.js';
|
|
8
8
|
export async function createPolicyEngineConfig(settings, approvalMode) {
|
|
9
9
|
// Explicitly construct PolicySettings from Settings to ensure type safety
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type SandboxConfig } from '@
|
|
6
|
+
import { type SandboxConfig } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { Settings } from './settings.js';
|
|
8
8
|
interface SandboxCliArgs {
|
|
9
9
|
sandbox?: boolean | string | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getPackageJson, FatalSandboxError, } from '@
|
|
6
|
+
import { getPackageJson, FatalSandboxError, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import commandExists from 'command-exists';
|
|
8
8
|
import * as os from 'node:os';
|
|
9
9
|
import { fileURLToPath } from 'node:url';
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getPackageJson } from '@
|
|
6
|
+
import { getPackageJson } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import commandExists from 'command-exists';
|
|
8
8
|
import * as os from 'node:os';
|
|
9
9
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
10
10
|
import { loadSandboxConfig } from './sandboxConfig.js';
|
|
11
11
|
// Mock dependencies
|
|
12
|
-
vi.mock('@
|
|
12
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
13
13
|
const actual = await importOriginal();
|
|
14
14
|
return {
|
|
15
15
|
...actual,
|
|
@@ -8,7 +8,7 @@ import * as path from 'node:path';
|
|
|
8
8
|
import { homedir, platform } from 'node:os';
|
|
9
9
|
import * as dotenv from 'dotenv';
|
|
10
10
|
import process from 'node:process';
|
|
11
|
-
import { debugLogger, FatalConfigError, GEMINI_DIR, getErrorMessage, Storage, coreEvents, } from '@
|
|
11
|
+
import { debugLogger, FatalConfigError, GEMINI_DIR, getErrorMessage, Storage, coreEvents, } from '@zgsm/costrict-cli-core';
|
|
12
12
|
import stripJsonComments from 'strip-json-comments';
|
|
13
13
|
import { DefaultLight } from '../ui/themes/default-light.js';
|
|
14
14
|
import { DefaultDark } from '../ui/themes/default.js';
|
|
@@ -38,7 +38,7 @@ import { isWorkspaceTrusted } from './trustedFolders.js';
|
|
|
38
38
|
// These imports will get the versions from the vi.mock('./settings.js', ...) factory.
|
|
39
39
|
import { loadSettings, USER_SETTINGS_PATH, // This IS the mocked path.
|
|
40
40
|
getSystemSettingsPath, getSystemDefaultsPath, migrateSettingsToV1, needsMigration, loadEnvironment, migrateDeprecatedSettings, SettingScope, saveSettings, } from './settings.js';
|
|
41
|
-
import { FatalConfigError, GEMINI_DIR } from '@
|
|
41
|
+
import { FatalConfigError, GEMINI_DIR } from '@zgsm/costrict-cli-core';
|
|
42
42
|
import { ExtensionManager } from './extension-manager.js';
|
|
43
43
|
import { updateSettingsFilePreservingFormat } from '../utils/commentJson.js';
|
|
44
44
|
const MOCK_WORKSPACE_DIR = '/mock/workspace';
|
|
@@ -61,7 +61,7 @@ vi.mock('./extension.js');
|
|
|
61
61
|
const mockCoreEvents = vi.hoisted(() => ({
|
|
62
62
|
emitFeedback: vi.fn(),
|
|
63
63
|
}));
|
|
64
|
-
vi.mock('@
|
|
64
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
65
65
|
const actual = await importOriginal();
|
|
66
66
|
return {
|
|
67
67
|
...actual,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { MCPServerConfig, BugCommandSettings, TelemetrySettings, AuthType } from '@
|
|
6
|
+
import type { MCPServerConfig, BugCommandSettings, TelemetrySettings, AuthType } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { CustomTheme } from '../ui/themes/theme.js';
|
|
8
8
|
import type { SessionRetentionSettings } from './settings.js';
|
|
9
9
|
export type SettingsType = 'boolean' | 'string' | 'number' | 'array' | 'object' | 'enum';
|
|
@@ -655,7 +655,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
655
655
|
readonly label: "Model Configs";
|
|
656
656
|
readonly category: "Model";
|
|
657
657
|
readonly requiresRestart: false;
|
|
658
|
-
readonly default: import("@
|
|
658
|
+
readonly default: import("@zgsm/costrict-cli-core/src/services/modelConfigService.js").ModelConfigServiceConfig;
|
|
659
659
|
readonly description: "Model configurations.";
|
|
660
660
|
readonly showInDialog: false;
|
|
661
661
|
readonly properties: {
|
|
@@ -664,7 +664,7 @@ declare const SETTINGS_SCHEMA: {
|
|
|
664
664
|
readonly label: "Model Config Aliases";
|
|
665
665
|
readonly category: "Model";
|
|
666
666
|
readonly requiresRestart: false;
|
|
667
|
-
readonly default: Record<string, import("@
|
|
667
|
+
readonly default: Record<string, import("@zgsm/costrict-cli-core/src/services/modelConfigService.js").ModelConfigAlias> | undefined;
|
|
668
668
|
readonly description: "Named presets for model configs. Can be used in place of a model name and can inherit from other aliases using an `extends` property.";
|
|
669
669
|
readonly showInDialog: false;
|
|
670
670
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, DEFAULT_MODEL_CONFIGS, GEMINI_MODEL_ALIAS_PRO, } from '@
|
|
6
|
+
import { DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES, DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD, DEFAULT_MODEL_CONFIGS, GEMINI_MODEL_ALIAS_PRO, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { DEFAULT_MIN_RETENTION } from '../utils/sessionCleanup.js';
|
|
8
8
|
/**
|
|
9
9
|
* Setting datatypes that "toggle" through a fixed list of options
|
|
@@ -50,7 +50,7 @@ vi.mock('./extension.js');
|
|
|
50
50
|
const mockCoreEvents = vi.hoisted(() => ({
|
|
51
51
|
emitFeedback: vi.fn(),
|
|
52
52
|
}));
|
|
53
|
-
vi.mock('@
|
|
53
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
54
54
|
const actual = await importOriginal();
|
|
55
55
|
return {
|
|
56
56
|
...actual,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import * as fs from 'node:fs';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
8
|
import { homedir } from 'node:os';
|
|
9
|
-
import { FatalConfigError, getErrorMessage, isWithinRoot, ideContextStore, GEMINI_DIR, } from '@
|
|
9
|
+
import { FatalConfigError, getErrorMessage, isWithinRoot, ideContextStore, GEMINI_DIR, } from '@zgsm/costrict-cli-core';
|
|
10
10
|
import stripJsonComments from 'strip-json-comments';
|
|
11
11
|
export const TRUSTED_FOLDERS_FILENAME = 'trustedFolders.json';
|
|
12
12
|
export function getUserSettingsDir() {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import * as osActual from 'node:os';
|
|
7
|
-
import { FatalConfigError, ideContextStore } from '@
|
|
7
|
+
import { FatalConfigError, ideContextStore } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { describe, it, expect, vi, beforeEach, afterEach, } from 'vitest';
|
|
9
9
|
import * as fs from 'node:fs';
|
|
10
10
|
import stripJsonComments from 'strip-json-comments';
|
package/dist/src/core/auth.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type AuthType, type Config } from '@
|
|
6
|
+
import { type AuthType, type Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
/**
|
|
8
8
|
* Handles the initial authentication flow.
|
|
9
9
|
* @param config The application config.
|
package/dist/src/core/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 { getErrorMessage, } from '@
|
|
6
|
+
import { getErrorMessage, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
/**
|
|
8
8
|
* Handles the initial authentication flow.
|
|
9
9
|
* @param config The application config.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
7
7
|
import { performInitialAuth } from './auth.js';
|
|
8
|
-
import {} from '@
|
|
9
|
-
vi.mock('@
|
|
8
|
+
import {} from '@zgsm/costrict-cli-core';
|
|
9
|
+
vi.mock('@zgsm/costrict-cli-core', () => ({
|
|
10
10
|
AuthType: {
|
|
11
11
|
OAUTH: 'oauth',
|
|
12
12
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { type Config } from '@
|
|
6
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { type LoadedSettings } from '../config/settings.js';
|
|
8
8
|
export interface InitializationResult {
|
|
9
9
|
authError: string | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { IdeClient, IdeConnectionEvent, IdeConnectionType, logIdeConnection, StartSessionEvent, logCliConfiguration, startupProfiler, } from '@
|
|
6
|
+
import { IdeClient, IdeConnectionEvent, IdeConnectionType, logIdeConnection, StartSessionEvent, logCliConfiguration, startupProfiler, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import {} from '../config/settings.js';
|
|
8
8
|
import { performInitialAuth } from './auth.js';
|
|
9
9
|
import { validateTheme } from './theme.js';
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
7
7
|
import { initializeApp } from './initializer.js';
|
|
8
|
-
import { IdeClient, logIdeConnection, logCliConfiguration, } from '@
|
|
8
|
+
import { IdeClient, logIdeConnection, logCliConfiguration, } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import { performInitialAuth } from './auth.js';
|
|
10
10
|
import { validateTheme } from './theme.js';
|
|
11
11
|
import {} from '../config/settings.js';
|
|
12
|
-
vi.mock('@
|
|
12
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
13
13
|
const actual = await importOriginal();
|
|
14
14
|
return {
|
|
15
15
|
...actual,
|
package/dist/src/gemini.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { DnsResolutionOrder, LoadedSettings } from './config/settings.js';
|
|
7
|
-
import { type Config, type ResumedSessionData } from '@
|
|
7
|
+
import { type Config, type ResumedSessionData } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { type InitializationResult } from './core/initializer.js';
|
|
9
9
|
export declare function validateDnsResolutionOrder(order: string | undefined): DnsResolutionOrder;
|
|
10
10
|
export declare function getNodeMemoryArgs(isDebugMode: boolean): string[];
|
package/dist/src/gemini.js
CHANGED
|
@@ -22,7 +22,7 @@ import { getUserStartupWarnings } from './utils/userStartupWarnings.js';
|
|
|
22
22
|
import { ConsolePatcher } from './ui/utils/ConsolePatcher.js';
|
|
23
23
|
import { runNonInteractive } from './nonInteractiveCli.js';
|
|
24
24
|
import { cleanupCheckpoints, registerCleanup, registerSyncCleanup, runExitCleanup, registerTelemetryConfig, } from './utils/cleanup.js';
|
|
25
|
-
import { sessionId, logUserPrompt, AuthType, getOauthClient, UserPromptEvent, debugLogger, recordSlowRender, coreEvents, CoreEvent, createWorkingStdio, patchStdio, writeToStdout, writeToStderr, disableMouseEvents, enableMouseEvents, enterAlternateScreen, disableLineWrapping, shouldEnterAlternateScreen, startupProfiler, ExitCodes, SessionStartSource, SessionEndReason, fireSessionStartHook, fireSessionEndHook, getVersion, } from '@
|
|
25
|
+
import { sessionId, logUserPrompt, AuthType, getOauthClient, UserPromptEvent, debugLogger, recordSlowRender, coreEvents, CoreEvent, createWorkingStdio, patchStdio, writeToStdout, writeToStderr, disableMouseEvents, enableMouseEvents, enterAlternateScreen, disableLineWrapping, shouldEnterAlternateScreen, startupProfiler, ExitCodes, SessionStartSource, SessionEndReason, fireSessionStartHook, fireSessionEndHook, getVersion, } from '@zgsm/costrict-cli-core';
|
|
26
26
|
import { initializeApp, } from './core/initializer.js';
|
|
27
27
|
import { validateAuthMethod } from './config/auth.js';
|
|
28
28
|
import { setMaxSizedBoxDebugging } from './ui/components/shared/MaxSizedBox.js';
|
package/dist/src/gemini.test.js
CHANGED
|
@@ -10,14 +10,14 @@ import v8 from 'node:v8';
|
|
|
10
10
|
import {} from './config/config.js';
|
|
11
11
|
import {} from './config/settings.js';
|
|
12
12
|
import { appEvents, AppEvent } from './utils/events.js';
|
|
13
|
-
import { debugLogger, } from '@
|
|
13
|
+
import { debugLogger, } from '@zgsm/costrict-cli-core';
|
|
14
14
|
import { act } from 'react';
|
|
15
15
|
import {} from './core/initializer.js';
|
|
16
16
|
const performance = vi.hoisted(() => ({
|
|
17
17
|
now: vi.fn(),
|
|
18
18
|
}));
|
|
19
19
|
vi.stubGlobal('performance', performance);
|
|
20
|
-
vi.mock('@
|
|
20
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
21
21
|
const actual = await importOriginal();
|
|
22
22
|
return {
|
|
23
23
|
...actual,
|
|
@@ -298,7 +298,7 @@ describe('initializeOutputListenersAndFlush', () => {
|
|
|
298
298
|
vi.restoreAllMocks();
|
|
299
299
|
});
|
|
300
300
|
it('should flush backlogs and setup listeners if no listeners exist', async () => {
|
|
301
|
-
const { coreEvents } = await import('@
|
|
301
|
+
const { coreEvents } = await import('@zgsm/costrict-cli-core');
|
|
302
302
|
const { initializeOutputListenersAndFlush } = await import('./gemini.js');
|
|
303
303
|
// Mock listenerCount to return 0
|
|
304
304
|
vi.spyOn(coreEvents, 'listenerCount').mockReturnValue(0);
|
|
@@ -1167,7 +1167,7 @@ describe('startInteractiveUI', () => {
|
|
|
1167
1167
|
expect(reactElement).toBeDefined();
|
|
1168
1168
|
});
|
|
1169
1169
|
it('should enable mouse events when alternate buffer is enabled', async () => {
|
|
1170
|
-
const { enableMouseEvents } = await import('@
|
|
1170
|
+
const { enableMouseEvents } = await import('@zgsm/costrict-cli-core');
|
|
1171
1171
|
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1172
1172
|
expect(enableMouseEvents).toHaveBeenCalled();
|
|
1173
1173
|
});
|
|
@@ -1178,7 +1178,7 @@ describe('startInteractiveUI', () => {
|
|
|
1178
1178
|
expect(patchSpy).toHaveBeenCalled();
|
|
1179
1179
|
});
|
|
1180
1180
|
it('should perform all startup tasks in correct order', async () => {
|
|
1181
|
-
const { getVersion } = await import('@
|
|
1181
|
+
const { getVersion } = await import('@zgsm/costrict-cli-core');
|
|
1182
1182
|
const { checkForUpdates } = await import('./ui/utils/updateCheck.js');
|
|
1183
1183
|
const { registerCleanup } = await import('./utils/cleanup.js');
|
|
1184
1184
|
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
@@ -1194,13 +1194,13 @@ describe('startInteractiveUI', () => {
|
|
|
1194
1194
|
expect(checkForUpdates).toHaveBeenCalledTimes(1);
|
|
1195
1195
|
});
|
|
1196
1196
|
it('should not recordSlowRender when less than threshold', async () => {
|
|
1197
|
-
const { recordSlowRender } = await import('@
|
|
1197
|
+
const { recordSlowRender } = await import('@zgsm/costrict-cli-core');
|
|
1198
1198
|
performance.now.mockReturnValueOnce(0);
|
|
1199
1199
|
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
1200
1200
|
expect(recordSlowRender).not.toHaveBeenCalled();
|
|
1201
1201
|
});
|
|
1202
1202
|
it('should call recordSlowRender when more than threshold', async () => {
|
|
1203
|
-
const { recordSlowRender } = await import('@
|
|
1203
|
+
const { recordSlowRender } = await import('@zgsm/costrict-cli-core');
|
|
1204
1204
|
performance.now.mockReturnValueOnce(0);
|
|
1205
1205
|
performance.now.mockReturnValueOnce(300);
|
|
1206
1206
|
await startTestInteractiveUI(mockConfig, mockSettings, mockStartupWarnings, mockWorkspaceRoot, undefined, mockInitializationResult);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
7
7
|
import { main } from './gemini.js';
|
|
8
|
-
import { debugLogger } from '@
|
|
9
|
-
import {} from '@
|
|
8
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
9
|
+
import {} from '@zgsm/costrict-cli-core';
|
|
10
10
|
// Custom error to identify mock process.exit calls
|
|
11
11
|
class MockProcessExitError extends Error {
|
|
12
12
|
code;
|
|
@@ -16,7 +16,7 @@ class MockProcessExitError extends Error {
|
|
|
16
16
|
this.name = 'MockProcessExitError';
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
vi.mock('@
|
|
19
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
20
20
|
const actual = await importOriginal();
|
|
21
21
|
return {
|
|
22
22
|
...actual,
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export declare const GIT_COMMIT_INFO = "
|
|
7
|
-
export declare const CLI_VERSION = "0.0.1
|
|
6
|
+
export declare const GIT_COMMIT_INFO = "bd0217f7f";
|
|
7
|
+
export declare const CLI_VERSION = "0.0.1";
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
// This file is auto-generated by the build script (scripts/generate-git-commit-info.js)
|
|
7
7
|
// Do not edit this file manually.
|
|
8
|
-
export const GIT_COMMIT_INFO = '
|
|
9
|
-
export const CLI_VERSION = '0.0.1
|
|
8
|
+
export const GIT_COMMIT_INFO = 'bd0217f7f';
|
|
9
|
+
export const CLI_VERSION = '0.0.1';
|
|
10
10
|
//# sourceMappingURL=git-commit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"git-commit.js","sourceRoot":"","sources":["../../../src/generated/git-commit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wFAAwF;AACxF,kCAAkC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config, ResumedSessionData } from '@
|
|
6
|
+
import type { Config, ResumedSessionData } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { LoadedSettings } from './config/settings.js';
|
|
8
8
|
interface RunNonInteractiveParams {
|
|
9
9
|
config: Config;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { isSlashCommand } from './ui/utils/commandUtils.js';
|
|
7
|
-
import { executeToolCall, GeminiEventType, FatalInputError, promptIdContext, OutputFormat, JsonFormatter, StreamJsonFormatter, JsonStreamEventType, uiTelemetryService, debugLogger, coreEvents, CoreEvent, createWorkingStdio, } from '@
|
|
7
|
+
import { executeToolCall, GeminiEventType, FatalInputError, promptIdContext, OutputFormat, JsonFormatter, StreamJsonFormatter, JsonStreamEventType, uiTelemetryService, debugLogger, coreEvents, CoreEvent, createWorkingStdio, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import readline from 'node:readline';
|
|
9
9
|
import { convertSessionToHistoryFormats } from './ui/hooks/useSessionBrowser.js';
|
|
10
10
|
import { handleSlashCommand } from './nonInteractiveCliCommands.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { executeToolCall, ToolErrorType, GeminiEventType, OutputFormat, uiTelemetryService, FatalInputError, CoreEvent, } from '@
|
|
6
|
+
import { executeToolCall, ToolErrorType, GeminiEventType, OutputFormat, uiTelemetryService, FatalInputError, CoreEvent, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { runNonInteractive } from './nonInteractiveCli.js';
|
|
8
8
|
import { describe, it, expect, beforeEach, afterEach, vi, } from 'vitest';
|
|
9
9
|
// Mock core modules
|
|
@@ -14,7 +14,7 @@ const mockCoreEvents = vi.hoisted(() => ({
|
|
|
14
14
|
drainBacklogs: vi.fn(),
|
|
15
15
|
emit: vi.fn(),
|
|
16
16
|
}));
|
|
17
|
-
vi.mock('@
|
|
17
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
18
18
|
const original = await importOriginal();
|
|
19
19
|
class MockChatRecordingService {
|
|
20
20
|
initialize = vi.fn();
|
|
@@ -1316,7 +1316,7 @@ describe('runNonInteractive', () => {
|
|
|
1316
1316
|
.fn()
|
|
1317
1317
|
.mockReturnValue('model-1');
|
|
1318
1318
|
// Mock debugLogger.error
|
|
1319
|
-
const { debugLogger } = await import('@
|
|
1319
|
+
const { debugLogger } = await import('@zgsm/costrict-cli-core');
|
|
1320
1320
|
const debugLoggerErrorSpy = vi
|
|
1321
1321
|
.spyOn(debugLogger, 'error')
|
|
1322
1322
|
.mockImplementation(() => { });
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import type { PartListUnion } from '@google/genai';
|
|
7
|
-
import { type Config } from '@
|
|
7
|
+
import { type Config } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import type { LoadedSettings } from './config/settings.js';
|
|
9
9
|
/**
|
|
10
10
|
* Processes a slash command in a non-interactive environment.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { parseSlashCommand } from './utils/commands.js';
|
|
7
|
-
import { FatalInputError, Logger, uiTelemetryService, } from '@
|
|
7
|
+
import { FatalInputError, Logger, uiTelemetryService, } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { CommandService } from './services/CommandService.js';
|
|
9
9
|
import { FileCommandLoader } from './services/FileCommandLoader.js';
|
|
10
10
|
import { McpPromptLoader } from './services/McpPromptLoader.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { ICommandLoader } from './types.js';
|
|
7
7
|
import type { SlashCommand } from '../ui/commands/types.js';
|
|
8
|
-
import type { Config } from '@
|
|
8
|
+
import type { Config } from '@zgsm/costrict-cli-core';
|
|
9
9
|
/**
|
|
10
10
|
* Loads the core, hard-coded slash commands that are an integral part
|
|
11
11
|
* of the Gemini CLI application.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { isDevelopment } from '../utils/installationInfo.js';
|
|
7
|
-
import { startupProfiler } from '@
|
|
7
|
+
import { startupProfiler } from '@zgsm/costrict-cli-core';
|
|
8
8
|
import { aboutCommand } from '../ui/commands/aboutCommand.js';
|
|
9
9
|
import { authCommand } from '../ui/commands/authCommand.js';
|
|
10
10
|
import { bugCommand } from '../ui/commands/bugCommand.js';
|
|
@@ -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
|
/**
|
|
8
8
|
* Orchestrates the discovery and loading of all slash commands for the CLI.
|
|
9
9
|
*
|
|
@@ -7,7 +7,7 @@ import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
|
|
|
7
7
|
import { CommandService } from './CommandService.js';
|
|
8
8
|
import {} from './types.js';
|
|
9
9
|
import { CommandKind } from '../ui/commands/types.js';
|
|
10
|
-
import { debugLogger } from '@
|
|
10
|
+
import { debugLogger } from '@zgsm/costrict-cli-core';
|
|
11
11
|
const createMockCommand = (name, kind) => ({
|
|
12
12
|
name,
|
|
13
13
|
description: `Description for ${name}`,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config } from '@
|
|
6
|
+
import type { Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { ICommandLoader } from './types.js';
|
|
8
8
|
import type { SlashCommand } from '../ui/commands/types.js';
|
|
9
9
|
/**
|
|
@@ -8,7 +8,7 @@ import path from 'node:path';
|
|
|
8
8
|
import toml from '@iarna/toml';
|
|
9
9
|
import { glob } from 'glob';
|
|
10
10
|
import { z } from 'zod';
|
|
11
|
-
import { Storage } from '@
|
|
11
|
+
import { Storage } from '@zgsm/costrict-cli-core';
|
|
12
12
|
import { CommandKind } from '../ui/commands/types.js';
|
|
13
13
|
import { DefaultArgumentProcessor } from './prompt-processors/argumentProcessor.js';
|
|
14
14
|
import { SHORTHAND_ARGS_PLACEHOLDER, SHELL_INJECTION_TRIGGER, AT_FILE_INJECTION_TRIGGER, } from './prompt-processors/types.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as glob from 'glob';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
|
-
import { GEMINI_DIR, Storage } from '@
|
|
8
|
+
import { GEMINI_DIR, Storage } from '@zgsm/costrict-cli-core';
|
|
9
9
|
import mock from 'mock-fs';
|
|
10
10
|
import { FileCommandLoader } from './FileCommandLoader.js';
|
|
11
11
|
import { assert, vi } from 'vitest';
|
|
@@ -42,7 +42,7 @@ vi.mock('./prompt-processors/argumentProcessor.js', async (importOriginal) => {
|
|
|
42
42
|
.mockImplementation(() => new original.DefaultArgumentProcessor()),
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
|
-
vi.mock('@
|
|
45
|
+
vi.mock('@zgsm/costrict-cli-core', async (importOriginal) => {
|
|
46
46
|
const original = await importOriginal();
|
|
47
47
|
return {
|
|
48
48
|
...original,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type { Config } from '@
|
|
6
|
+
import type { Config } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import type { SlashCommand } from '../ui/commands/types.js';
|
|
8
8
|
import type { ICommandLoader } from './types.js';
|
|
9
9
|
import type { PromptArgument } from '@modelcontextprotocol/sdk/types.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { getErrorMessage, getMCPServerPrompts } from '@
|
|
6
|
+
import { getErrorMessage, getMCPServerPrompts } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { CommandKind } from '../ui/commands/types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Discovers and loads executable slash commands from prompts exposed by
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { McpPromptLoader } from './McpPromptLoader.js';
|
|
7
7
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
8
8
|
import { CommandKind } from '../ui/commands/types.js';
|
|
9
|
-
import * as cliCore from '@
|
|
9
|
+
import * as cliCore from '@zgsm/costrict-cli-core';
|
|
10
10
|
// Define the mock prompt data at a higher scope
|
|
11
11
|
const mockPrompt = {
|
|
12
12
|
name: 'test-prompt',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { appendToLastTextPart } from '@
|
|
6
|
+
import { appendToLastTextPart } from '@zgsm/costrict-cli-core';
|
|
7
7
|
/**
|
|
8
8
|
* Appends the user's full command invocation to the prompt if arguments are
|
|
9
9
|
* provided, allowing the model to perform its own argument parsing.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { debugLogger, flatMapTextParts, readPathFromWorkspace, } from '@
|
|
6
|
+
import { debugLogger, flatMapTextParts, readPathFromWorkspace, } from '@zgsm/costrict-cli-core';
|
|
7
7
|
import { MessageType } from '../../ui/types.js';
|
|
8
8
|
import { AT_FILE_INJECTION_TRIGGER, } from './types.js';
|
|
9
9
|
import { extractInjections } from './injectionParser.js';
|