@deepseek-harness-tui/dsh-tui 0.17.0 → 0.19.0
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/README.md +43 -16
- package/bin/dsh-tui.js +46 -3
- package/cli/adapters/dsh/index.mjs +2 -2
- package/guide/dsh-tui-guide/cli.en.md +1 -1
- package/guide/dsh-tui-guide/cli.md +1 -1
- package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
- package/guide/dsh-tui-guide/codex-backend.md +2 -2
- package/guide/dsh-tui-guide/configuration.en.md +8 -2
- package/guide/dsh-tui-guide/configuration.md +8 -2
- package/guide/dsh-tui-guide/getting-started.en.md +174 -6
- package/guide/dsh-tui-guide/getting-started.md +125 -15
- package/guide/dsh-tui-guide/interaction.en.md +30 -8
- package/guide/dsh-tui-guide/interaction.md +18 -5
- package/guide/dsh-tui-guide/plugins.en.md +28 -7
- package/guide/dsh-tui-guide/plugins.md +18 -5
- package/guide/dsh-tui-guide/user-guide.en.md +32 -17
- package/guide/dsh-tui-guide/user-guide.md +23 -12
- package/lib/settings.json +3 -3
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +10 -2
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +31 -5
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.d.ts +60 -0
- package/lib/types/adapter/standard/grants.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.js +74 -0
- package/lib/types/agent/events.d.ts +16 -3
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/session.d.ts +5 -0
- package/lib/types/agent/session.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.d.ts +2 -2
- package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/core.js +10 -6
- package/lib/types/backends/codex/session/commands.d.ts +2 -0
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +8 -4
- package/lib/types/backends/codex/session/input.d.ts +11 -7
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +68 -15
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +2 -3
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +78 -10
- package/lib/types/channel/questions.d.ts +19 -3
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +8 -4
- package/lib/types/channel/subagent-failure.d.ts +49 -0
- package/lib/types/channel/subagent-failure.d.ts.map +1 -0
- package/lib/types/channel/subagent-failure.js +59 -0
- package/lib/types/channel/transcript.d.ts +17 -0
- package/lib/types/channel/transcript.d.ts.map +1 -1
- package/lib/types/channel/transcript.js +35 -0
- package/lib/types/commands.js +2 -2
- package/lib/types/components/GoalTodoPanel.d.ts +71 -6
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +165 -17
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +14 -9
- package/lib/types/components/PluginGrantList.d.ts +45 -0
- package/lib/types/components/PluginGrantList.d.ts.map +1 -0
- package/lib/types/components/PluginGrantList.js +126 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
- package/lib/types/components/PluginInstallPane.js +35 -6
- package/lib/types/components/PluginManagePane.d.ts.map +1 -1
- package/lib/types/components/PluginManagePane.js +65 -8
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +63 -8
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +17 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +12 -0
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +16 -7
- package/lib/types/components/onboardingModel.d.ts +2 -2
- package/lib/types/components/onboardingModel.js +3 -3
- package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
- package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
- package/lib/types/components/onboardingProviderPlan.js +78 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
- package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/revealScope.d.ts +15 -0
- package/lib/types/components/revealScope.d.ts.map +1 -0
- package/lib/types/components/revealScope.js +17 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +41 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +123 -6
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +9 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +9 -2
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +14 -2
- package/lib/types/components/sidePanel/types.d.ts +2 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +15 -1
- package/lib/types/components/smoothReveal.d.ts +36 -6
- package/lib/types/components/smoothReveal.d.ts.map +1 -1
- package/lib/types/components/smoothReveal.js +92 -21
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
- package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/session.js +74 -6
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +15 -6
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
- package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
- package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +10 -2
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-mentions.js +22 -7
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +16 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +35 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +6 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
- package/lib/types/dsh-adapter/channel/emitter.js +1 -1
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +8 -0
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +4 -4
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +59 -5
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +21 -8
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mentions.js +21 -7
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +11 -9
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +3 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +10 -3
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +9 -3
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +11 -5
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
- package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +13 -4
- package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.d.ts +27 -3
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +47 -5
- package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.d.ts +3 -0
- package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.js +4 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
- package/lib/types/dsh-adapter/fresh-agent.js +60 -11
- package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
- package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grant-file.js +178 -0
- package/lib/types/dsh-adapter/host-access.d.ts +4 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +114 -15
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-contract.js +5 -3
- package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-dsh.js +27 -6
- package/lib/types/dsh-adapter/host-entry.js +4 -0
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +8 -5
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -1
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-install.js +160 -13
- package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-manage.js +240 -51
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +203 -58
- package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +34 -21
- package/lib/types/dsh-adapter/presets.d.ts +41 -10
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +59 -12
- package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
- package/lib/types/dsh-adapter/process-exit.js +1 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +11 -5
- package/lib/types/dsh-adapter/questions.d.ts +3 -4
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +1 -1
- package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
- package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
- package/lib/types/dsh-adapter/row-attachment.js +29 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
- package/lib/types/dsh-adapter/subagents.d.ts +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +22 -1
- package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +19 -12
- package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
- package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tool-scope.js +127 -0
- package/lib/types/dsh-adapter/types.d.ts +2 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
- package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
- package/lib/types/dsh-adapter/worktree-tool.js +87 -0
- package/lib/types/heldInputs.d.ts +75 -0
- package/lib/types/heldInputs.d.ts.map +1 -0
- package/lib/types/heldInputs.js +409 -0
- package/lib/types/i18n.d.ts +577 -34
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +230 -22
- package/lib/types/ink/components/App.d.ts +2 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +8 -0
- package/lib/types/ink/events/input-event.d.ts.map +1 -1
- package/lib/types/ink/events/input-event.js +7 -6
- package/lib/types/ink/hit-test.d.ts +2 -0
- package/lib/types/ink/hit-test.d.ts.map +1 -1
- package/lib/types/ink/hit-test.js +10 -0
- package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
- package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-program-status.js +3 -2
- package/lib/types/ink/ink.d.ts +1 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +5 -2
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +25 -0
- package/lib/types/ink/terminal.d.ts +13 -2
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +29 -5
- package/lib/types/onboardingDraft.d.ts +143 -0
- package/lib/types/onboardingDraft.d.ts.map +1 -0
- package/lib/types/onboardingDraft.js +71 -0
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +133 -32
- package/lib/types/screens/Onboarding.d.ts +22 -3
- package/lib/types/screens/Onboarding.d.ts.map +1 -1
- package/lib/types/screens/Onboarding.js +606 -36
- package/lib/types/screens/SessionSupervisor.d.ts +3 -6
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +5 -8
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
- package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +1 -1
- package/lib/types/sessionMounts.d.ts +12 -5
- package/lib/types/sessionMounts.d.ts.map +1 -1
- package/lib/types/sessionMounts.js +33 -6
- package/lib/types/settings/definitions.js +2 -2
- package/lib/types/update.d.ts +412 -20
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +2094 -193
- package/lib/types/updateHost.d.ts +198 -0
- package/lib/types/updateHost.d.ts.map +1 -0
- package/lib/types/updateHost.js +608 -0
- package/lib/types/utils/paths.d.ts +15 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +25 -0
- package/lib/types/utils/processName.d.ts +16 -0
- package/lib/types/utils/processName.d.ts.map +1 -0
- package/lib/types/utils/processName.js +27 -0
- package/package.json +114 -108
- package/tui-profile/feed/README.md +1 -1
- package/tui-profile/feed/first-party.json +1 -1
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/** `DSH_TUI_DSH_PM=npm|pnpm` forces the package-manager classification. */
|
|
2
|
+
export declare const DSH_PM_ENV = "DSH_TUI_DSH_PM";
|
|
3
|
+
export type HostInstaller = 'npm' | 'pnpm' | 'volta' | 'unknown';
|
|
4
|
+
/** A detected global `dsh` install and the way this machine updates it. */
|
|
5
|
+
export interface HostInstall {
|
|
6
|
+
/** Real package directory (realpath applied when readable). */
|
|
7
|
+
readonly packageDir: string;
|
|
8
|
+
/** Manifest version; undefined when unreadable. */
|
|
9
|
+
readonly version: string | undefined;
|
|
10
|
+
readonly installer: HostInstaller;
|
|
11
|
+
/** npm global prefix (`<prefix>/lib/node_modules` or `<prefix>\node_modules`). */
|
|
12
|
+
readonly prefix?: string;
|
|
13
|
+
/** PNPM_HOME to drive `pnpm add -g`; derived from the owning group, never ambient. */
|
|
14
|
+
readonly pnpmHome?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The pnpm isolated install group that owns `packageDir`. Only set when the
|
|
17
|
+
* ownership was proven (the package path itself names `global/<n>`, or a
|
|
18
|
+
* `dsh` shim on PATH leads to the group). `pnpm add -g <one package>`
|
|
19
|
+
* replaces the whole group, so an unproven group is never auto-installed
|
|
20
|
+
* into.
|
|
21
|
+
*/
|
|
22
|
+
readonly groupRoot?: string;
|
|
23
|
+
/** False = the detected prefix is not writable (or cannot be checked). */
|
|
24
|
+
readonly writable: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** One engine install command, with the extra env the layout needs. */
|
|
27
|
+
export interface HostCommand {
|
|
28
|
+
readonly file: string;
|
|
29
|
+
readonly args: readonly string[];
|
|
30
|
+
/** Environment additions for the child (`PNPM_HOME` on pnpm installs). */
|
|
31
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
32
|
+
}
|
|
33
|
+
export type HostNoneReason = 'newest' | 'newer-than-validated' | 'unknown-current' | 'unknown-range' | 'disabled';
|
|
34
|
+
export type HostUnavailableReason = 'offline' | 'no-version' | 'no-installer' | 'not-writable'
|
|
35
|
+
/**
|
|
36
|
+
* A pnpm install whose owning group cannot be proven to contain this package
|
|
37
|
+
* alone. `pnpm add -g <one package>` replaces every group that contains it,
|
|
38
|
+
* deleting co-installed CLIs, so this is refused instead of guessed at.
|
|
39
|
+
*/
|
|
40
|
+
| 'group-unproven';
|
|
41
|
+
/**
|
|
42
|
+
* The engine half of an update plan.
|
|
43
|
+
*
|
|
44
|
+
* `none` with `disabled` still carries `to`/`manual` when an install WOULD
|
|
45
|
+
* have been needed: the switch skips the automatic install, it does not
|
|
46
|
+
* silently bless an incompatible pair (the caller refuses a TUI update that
|
|
47
|
+
* would leave an engine outside the new TUI's range).
|
|
48
|
+
*/
|
|
49
|
+
export type HostStep = {
|
|
50
|
+
readonly kind: 'none';
|
|
51
|
+
readonly reason: HostNoneReason;
|
|
52
|
+
readonly from?: string;
|
|
53
|
+
readonly to?: string;
|
|
54
|
+
readonly manual?: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* A newer engine release is published, but outside the target TUI's
|
|
57
|
+
* enumerated line — the set is settled on the validated line, and the
|
|
58
|
+
* notice must say it is waiting for a TUI release instead of looking
|
|
59
|
+
* like a failed upgrade. Alpha lines never set this: they are never
|
|
60
|
+
* selected by policy, so naming one would be noise.
|
|
61
|
+
*/
|
|
62
|
+
readonly newerPublished?: string;
|
|
63
|
+
} | {
|
|
64
|
+
readonly kind: 'install';
|
|
65
|
+
readonly from: string | undefined;
|
|
66
|
+
readonly to: string;
|
|
67
|
+
readonly packageDir: string;
|
|
68
|
+
readonly command: HostCommand;
|
|
69
|
+
/** Manual fallback commands if the automated install fails. */
|
|
70
|
+
readonly manual: readonly string[];
|
|
71
|
+
} | {
|
|
72
|
+
readonly kind: 'unavailable';
|
|
73
|
+
readonly reason: HostUnavailableReason;
|
|
74
|
+
readonly from?: string;
|
|
75
|
+
readonly to?: string;
|
|
76
|
+
readonly manual: readonly string[];
|
|
77
|
+
};
|
|
78
|
+
export type HostTargetSelection = {
|
|
79
|
+
readonly kind: 'none';
|
|
80
|
+
readonly reason: 'newest' | 'newer-than-validated' | 'unknown-current';
|
|
81
|
+
} | {
|
|
82
|
+
readonly kind: 'install';
|
|
83
|
+
readonly to: string;
|
|
84
|
+
} | {
|
|
85
|
+
readonly kind: 'unavailable';
|
|
86
|
+
readonly reason: 'no-version';
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Parse an enumerated peer range into exact versions.
|
|
90
|
+
*
|
|
91
|
+
* @param raw - e.g. `'0.2.1-rc.5 || 0.2.2-rc.1'`.
|
|
92
|
+
* @returns Deduplicated versions, or `[]` for an absent/operator range.
|
|
93
|
+
*/
|
|
94
|
+
export declare function parseHostLineRange(raw: string | undefined): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Pick the engine version for a target TUI line.
|
|
97
|
+
*
|
|
98
|
+
* `newest` is the highest PUBLISHED version inside `allowed`; anything newer
|
|
99
|
+
* on the registry (an alpha line, say) is never selected. A current engine
|
|
100
|
+
* ahead of the window is kept — this project never downgrades — and reported
|
|
101
|
+
* as drift by the caller.
|
|
102
|
+
*
|
|
103
|
+
* @param input - Current engine, the target TUI's enumerated line, and the
|
|
104
|
+
* registry's published versions.
|
|
105
|
+
*/
|
|
106
|
+
export declare function selectHostTarget(input: {
|
|
107
|
+
readonly current: string | undefined;
|
|
108
|
+
readonly allowed: readonly string[];
|
|
109
|
+
readonly available: readonly string[];
|
|
110
|
+
}): HostTargetSelection;
|
|
111
|
+
/**
|
|
112
|
+
* Classify a host package directory by layout. Only recognized global npm /
|
|
113
|
+
* pnpm layouts are auto-installable; volta and anything else are reported as
|
|
114
|
+
* such so the caller prints a manual command instead of guessing.
|
|
115
|
+
*
|
|
116
|
+
* @param packageDir - The installed `@deepseek-ai/dsh` package directory.
|
|
117
|
+
* @param env - Process environment (`PNPM_HOME`, `VOLTA_HOME`, `DSH_TUI_DSH_PM`).
|
|
118
|
+
* @param platform - Test seam for the Windows npm layout.
|
|
119
|
+
*/
|
|
120
|
+
export declare function detectHostInstall(packageDir: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): HostInstall;
|
|
121
|
+
/**
|
|
122
|
+
* pnpm >= 11 refuses versions younger than `minimumReleaseAge` (24h by
|
|
123
|
+
* default) unless that exact version is exempted. The profile install writes
|
|
124
|
+
* the exemption into the profile's workspace file; the one-shot global
|
|
125
|
+
* installs here have no such file, and `/update` runs right after a release —
|
|
126
|
+
* i.e. always inside the window. The pinned version is one the target TUI
|
|
127
|
+
* validates, so the window is waived for that single invocation only. Both
|
|
128
|
+
* spellings are set: pnpm 12's CLI reads PNPM_CONFIG_ (verified on 12.16.1;
|
|
129
|
+
* its own error text advertises that form), while npm-style config readers
|
|
130
|
+
* only understand npm_config_ - the repo pins pnpm 11 for releases, which
|
|
131
|
+
* cannot be probed here, so the second spelling is kept rather than guessed
|
|
132
|
+
* away. Each reader ignores the other's variable. The waiver covers the whole
|
|
133
|
+
* dependency closure of this one install, not just the package: the engine's
|
|
134
|
+
* closure is published in lockstep at the same version, so an exact-version
|
|
135
|
+
* exclusion would not unblock it anyway.
|
|
136
|
+
*/
|
|
137
|
+
export declare const PNPM_RELEASE_AGE_ENV: Readonly<Record<string, string>>;
|
|
138
|
+
/** Render `NAME=value` prefixes so a printed command can be pasted as-is. */
|
|
139
|
+
export declare function shellEnvPrefix(vars: Readonly<Record<string, string>>, platform?: NodeJS.Platform): string;
|
|
140
|
+
/** The installer command for a detected layout, or undefined when unknown. */
|
|
141
|
+
export declare function hostInstallCommand(install: HostInstall, packageName: string, version: string): HostCommand | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Manual repair commands for a layout. More than one entry when the platform
|
|
144
|
+
* has an alternative (e.g. the sudo form for an unwritable npm prefix).
|
|
145
|
+
*
|
|
146
|
+
* @param install - Detected install; undefined when detection failed.
|
|
147
|
+
*/
|
|
148
|
+
export declare function hostManualCommands(packageName: string, version: string, install: HostInstall | undefined, platform?: NodeJS.Platform): string[];
|
|
149
|
+
/**
|
|
150
|
+
* Whether the engine is usable after the planned step. `undefined` = cannot
|
|
151
|
+
* tell (unknown current version or unparseable range) and the caller must not
|
|
152
|
+
* claim compatibility either way.
|
|
153
|
+
*
|
|
154
|
+
* An engine AHEAD of the window counts as usable for the boot/restart
|
|
155
|
+
* decision: this project never downgrades, and the boot drift notice reports
|
|
156
|
+
* the newer line. This is NOT the official plugin manager's install check: the
|
|
157
|
+
* manager validates a new TUI against the running engine with exact semver
|
|
158
|
+
* membership, where an ahead engine is outside the line. Use
|
|
159
|
+
* {@link hostSatisfiesLine} for that decision.
|
|
160
|
+
*/
|
|
161
|
+
export declare function hostCompatibility(input: {
|
|
162
|
+
readonly current: string | undefined;
|
|
163
|
+
readonly allowed: readonly string[];
|
|
164
|
+
readonly step?: HostStep;
|
|
165
|
+
}): boolean | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Strict line membership for the official plugin manager's install check.
|
|
168
|
+
*
|
|
169
|
+
* The manager evaluates the target TUI's peer ranges against the RUNNING
|
|
170
|
+
* engine with semver `satisfies()`; an engine ABOVE the enumerated line is
|
|
171
|
+
* outside it exactly like an older one, so it cannot install that TUI.
|
|
172
|
+
* `hostCompatibility` deliberately keeps an ahead engine usable for the
|
|
173
|
+
* boot/restart decision and must not be used here.
|
|
174
|
+
*
|
|
175
|
+
* @param input - The current engine and the target TUI's enumerated line.
|
|
176
|
+
* @returns true when the current version is one of the enumerated versions;
|
|
177
|
+
* false when it is outside; undefined when either side cannot be read.
|
|
178
|
+
*/
|
|
179
|
+
export declare function hostSatisfiesLine(input: {
|
|
180
|
+
readonly current: string | undefined;
|
|
181
|
+
readonly allowed: readonly string[];
|
|
182
|
+
}): boolean | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Build the engine step of a plan.
|
|
185
|
+
*
|
|
186
|
+
* @param input - Current version, the target TUI's enumerated peer range, the
|
|
187
|
+
* registry's available versions (undefined = lookup failed), the detected
|
|
188
|
+
* install, the package name and the `DSH_TUI_UPDATE_ENGINE=0` switch.
|
|
189
|
+
*/
|
|
190
|
+
export declare function planHostStep(input: {
|
|
191
|
+
readonly current: string | undefined;
|
|
192
|
+
readonly range: string | undefined;
|
|
193
|
+
readonly available: readonly string[] | undefined;
|
|
194
|
+
readonly install: HostInstall | undefined;
|
|
195
|
+
readonly packageName: string;
|
|
196
|
+
readonly disabled?: boolean;
|
|
197
|
+
}): HostStep;
|
|
198
|
+
//# sourceMappingURL=updateHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateHost.d.ts","sourceRoot":"","sources":["../../src/updateHost.ts"],"names":[],"mappings":"AAqBA,2EAA2E;AAC3E,eAAO,MAAM,UAAU,mBAAmB,CAAA;AAE1C,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEhE,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,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