@deepseek-harness-tui/dsh-tui 0.14.1 → 0.16.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 +163 -17
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +47 -10
- package/guide/dsh-tui-guide/codex-backend.md +26 -4
- package/guide/dsh-tui-guide/configuration.en.md +168 -18
- package/guide/dsh-tui-guide/configuration.md +144 -16
- package/guide/dsh-tui-guide/getting-started.en.md +15 -0
- package/guide/dsh-tui-guide/getting-started.md +15 -0
- package/guide/dsh-tui-guide/interaction.en.md +64 -24
- package/guide/dsh-tui-guide/interaction.md +49 -19
- package/guide/dsh-tui-guide/plugins.en.md +97 -3
- package/guide/dsh-tui-guide/plugins.md +55 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +53 -21
- package/guide/dsh-tui-guide/user-guide.md +43 -22
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/projection.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +4 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +5 -1
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -3
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +56 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +68 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +2 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -2
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/contract.d.ts +3 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -1
- package/lib/types/backends/codex/contract.js +3 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/async-questions.d.ts +17 -0
- package/lib/types/backends/codex/session/async-questions.d.ts.map +1 -0
- package/lib/types/backends/codex/session/async-questions.js +89 -0
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +100 -42
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/items.js +7 -5
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/codex/translate/question-reply.d.ts +11 -0
- package/lib/types/backends/codex/translate/question-reply.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/question-reply.js +53 -0
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +10 -0
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +15 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +58 -10
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +24 -7
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +14 -9
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +109 -15
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PermissionsPicker.d.ts +10 -1
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
- package/lib/types/components/PermissionsPicker.js +24 -16
- package/lib/types/components/PluginInstallPane.d.ts +21 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -0
- package/lib/types/components/PluginInstallPane.js +84 -0
- package/lib/types/components/PluginManagePane.d.ts +21 -0
- package/lib/types/components/PluginManagePane.d.ts.map +1 -0
- package/lib/types/components/PluginManagePane.js +69 -0
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +65 -121
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/SubagentCard.d.ts +13 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +27 -12
- package/lib/types/components/SubagentDashboard.d.ts +8 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +58 -16
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts +14 -1
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +38 -19
- package/lib/types/components/messages/TeamMessageBubble.d.ts +20 -0
- package/lib/types/components/messages/TeamMessageBubble.d.ts.map +1 -0
- package/lib/types/components/messages/TeamMessageBubble.js +15 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelHost.js +5 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts +8 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +11 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +15 -2
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +7 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +4 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +28 -8
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +2 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +156 -21
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +6 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +64 -16
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +15 -5
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +101 -10
- package/lib/types/components/sidePanel/btw/threads.d.ts +18 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/threads.js +51 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +5 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +5 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.js +19 -4
- package/lib/types/components/sidePanel/companion/skins.d.ts +8 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +57 -12
- package/lib/types/components/sidePanel/types.d.ts +7 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashArtRows.d.ts +29 -0
- package/lib/types/components/splashArtRows.d.ts.map +1 -0
- package/lib/types/components/splashArtRows.js +31 -0
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/teamRoster.d.ts +70 -0
- package/lib/types/components/teamRoster.d.ts.map +1 -0
- package/lib/types/components/teamRoster.js +78 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +102 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +301 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/agent-view.js +3 -1
- package/lib/types/dsh-adapter/approvals.d.ts +7 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +45 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +71 -8
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts +31 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-assembly.js +225 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +62 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +78 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +304 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +91 -46
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +60 -3
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +17 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +19 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +79 -6
- package/lib/types/dsh-adapter/channel/compaction.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +100 -26
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +5 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +330 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +109 -30
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +7 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +235 -13
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +48 -29
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +4 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +2 -0
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +60 -30
- package/lib/types/dsh-adapter/channel/session-reset.js +2 -2
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +22 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +136 -5
- package/lib/types/dsh-adapter/channel/state.d.ts +43 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +84 -12
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +20 -3
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts +55 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.js +96 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +4 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +20 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +7 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +8 -1
- package/lib/types/dsh-adapter/entry-slot.d.ts +38 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +226 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +148 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +77 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +112 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +481 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +253 -0
- package/lib/types/dsh-adapter/index.d.ts +53 -17
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +63 -9
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/invariant.d.ts +7 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +6 -3
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/index.js +2 -2
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +41 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +119 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +183 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts +94 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-feed.js +135 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts +115 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-guard.js +108 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-install.d.ts +160 -0
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-install.js +545 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts +178 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manage.js +468 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts +144 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +83 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +918 -234
- package/lib/types/dsh-adapter/plugins-info.d.ts +130 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +469 -44
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts +66 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-projection-store.js +149 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/settingsEditor.js +2 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts +21 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +53 -0
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +112 -9
- package/lib/types/dsh-adapter/team-mode.d.ts +74 -0
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-mode.js +188 -0
- package/lib/types/dsh-adapter/team-roster.d.ts +67 -0
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-roster.js +136 -0
- package/lib/types/dsh-adapter/team-tools.d.ts +58 -0
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-tools.js +208 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +961 -1439
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +443 -387
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts +9 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +23 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +130 -17
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +8 -1
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/permissionPresetLabels.d.ts +25 -0
- package/lib/types/permissionPresetLabels.d.ts.map +1 -0
- package/lib/types/permissionPresetLabels.js +33 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/preset-patch.d.ts +22 -0
- package/lib/types/preset-patch.d.ts.map +1 -0
- package/lib/types/preset-patch.js +14 -0
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +55 -16
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +742 -280
- package/lib/types/screens/Launchpad.d.ts +33 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +256 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +7 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts +68 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts.map +1 -0
- package/lib/types/screens/chat/usePluginWriteFlow.js +92 -0
- package/lib/types/screens/chatOverlay.d.ts +30 -5
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessionModes.d.ts +5 -3
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +9 -3
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/lib/types/utils/paths.d.ts +11 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +13 -0
- package/package.json +150 -114
- package/presets/winbash.mjs +716 -0
- package/tui-profile/feed/README.md +63 -0
- package/tui-profile/feed/first-party.json +10 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This package's own entry (docs/standalone-host-design.md), started by
|
|
3
|
+
* bin/dsh-tui.js for every kernel: take over the installed dsh's root and
|
|
4
|
+
* module resolution before any TUI module loads, mount the runtime on it, then
|
|
5
|
+
* compose the dsh-tui profile (DSH) or the light profile (other kernels). A DSH
|
|
6
|
+
* launch without a usable installed dsh is handed to `dsh --profile` unchanged.
|
|
7
|
+
*/
|
|
8
|
+
import '../force-production-react.js';
|
|
9
|
+
import { spawn } from 'node:child_process';
|
|
10
|
+
import { markBoot } from '../utils/bootTrace.js';
|
|
11
|
+
import { configuredBackend, delegatesToProfile, entryKernel, hostProfile } from '../hostEntryRoute.js';
|
|
12
|
+
import { HANDOFF_ACK_FD_ENV } from '../handoffAck.js';
|
|
13
|
+
import { HOST_NOTICE_ENV } from '../kernelPrefs.js';
|
|
14
|
+
import { logForDebugging } from '../utils/debug.js';
|
|
15
|
+
import { cmdEscapeArgument } from '../utils/shellQuote.js';
|
|
16
|
+
import { ENTRY_ROW_DEFAULTS } from './lite-profile.js';
|
|
17
|
+
import { HostComposeError, loadHostDsh, NO_DSH_ON_PATH, prepareHostRoot } from './host-dsh.js';
|
|
18
|
+
import { installEntrySignals } from './process-exit.js';
|
|
19
|
+
import { disposeRootSettled, trackComposition } from './root-dispose.js';
|
|
20
|
+
markBoot('entry-start');
|
|
21
|
+
// DSH's native flock loader reads `process.report.getReport()`; with sockets
|
|
22
|
+
// already open, the network section's reverse lookups block the event loop.
|
|
23
|
+
if (process.report !== undefined)
|
|
24
|
+
process.report.excludeNetwork = true;
|
|
25
|
+
const profile = hostProfile();
|
|
26
|
+
const configured = configuredBackend(profile);
|
|
27
|
+
// A `!!js` backend is evaluated only by the profile's Loader: that launch
|
|
28
|
+
// keeps the full `dsh --profile` path, which honours the evaluated row.
|
|
29
|
+
if (delegatesToProfile(configured))
|
|
30
|
+
delegateToDsh();
|
|
31
|
+
else
|
|
32
|
+
await runInEntry(entryKernel(process.env, { configured }));
|
|
33
|
+
/** bin/dsh-tui.js `MSG.noDsh`, newline-terminated. */
|
|
34
|
+
function noDshGuidance() {
|
|
35
|
+
return process.env.DSH_TUI_LANG === 'en'
|
|
36
|
+
? '[dsh-tui] dsh CLI not found. Install the official client first:\n npm install -g @deepseek-ai/dsh\n'
|
|
37
|
+
: '[dsh-tui] 未检测到 dsh CLI。请先安装官方客户端:\n npm install -g @deepseek-ai/dsh\n';
|
|
38
|
+
}
|
|
39
|
+
function delegateToDsh() {
|
|
40
|
+
const appArgs = process.argv.slice(2);
|
|
41
|
+
const args = ['--profile', profile, ...(appArgs.length > 0 ? ['--', ...appArgs] : [])];
|
|
42
|
+
// A kernel-switch replacement's ACK pipe (fd 3) goes to dsh, which adopts the screen.
|
|
43
|
+
const ack = process.env[HANDOFF_ACK_FD_ENV] === '3';
|
|
44
|
+
const windows = process.platform === 'win32';
|
|
45
|
+
// cmd.exe joins the arguments unescaped, and `dsh` is an npm `.cmd` shim that
|
|
46
|
+
// parses the line again: quote, then caret-escape metacharacters twice, so a
|
|
47
|
+
// prompt with `&`, `|`, `<` or `>` stays one argument.
|
|
48
|
+
const child = spawn('dsh', windows ? args.map(arg => cmdEscapeArgument(arg, true)) : args, {
|
|
49
|
+
stdio: ack ? ['inherit', 'inherit', 'inherit', 3] : 'inherit',
|
|
50
|
+
env: process.env,
|
|
51
|
+
...(windows ? { shell: true } : {}),
|
|
52
|
+
});
|
|
53
|
+
// The terminal's own signals reach dsh through the process group; one sent
|
|
54
|
+
// to this pid alone is passed on (SIGINT only by the group: Ctrl+C would
|
|
55
|
+
// otherwise reach dsh twice).
|
|
56
|
+
const forwarders = new Map([
|
|
57
|
+
['SIGTERM', () => { child.kill('SIGTERM'); }],
|
|
58
|
+
['SIGHUP', () => { child.kill('SIGHUP'); }],
|
|
59
|
+
['SIGINT', () => undefined],
|
|
60
|
+
]);
|
|
61
|
+
for (const [signal, forward] of forwarders)
|
|
62
|
+
process.on(signal, forward);
|
|
63
|
+
child.on('error', error => {
|
|
64
|
+
process.stderr.write(`dsh-tui: cannot start dsh (${error.message})\n`);
|
|
65
|
+
if (error.code === 'ENOENT')
|
|
66
|
+
process.stderr.write(noDshGuidance());
|
|
67
|
+
process.exit(1);
|
|
68
|
+
});
|
|
69
|
+
child.on('exit', (code, signal) => {
|
|
70
|
+
if (signal === null) {
|
|
71
|
+
process.exit(code ?? 0);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// Mirror a signal death: the forwarders above would catch (and swallow)
|
|
75
|
+
// the re-raised signal, ending this process with 0 instead.
|
|
76
|
+
for (const [name, forward] of forwarders)
|
|
77
|
+
process.removeListener(name, forward);
|
|
78
|
+
process.kill(process.pid, signal);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Runs before anything renders, so the stderr line stays above the next
|
|
83
|
+
* screen (skipped for a kernel-switch replacement, which draws without a
|
|
84
|
+
* gap); the screen also gets it as a notice (HOST_NOTICE_ENV, read once).
|
|
85
|
+
*/
|
|
86
|
+
function noteHostUnavailable(kernel, error) {
|
|
87
|
+
const reason = (error instanceof Error ? error.message : String(error)).split('\n')[0] ?? '';
|
|
88
|
+
const fallback = kernel === 'dsh' ? 'starting DSH through `dsh --profile`' : 'starting without its module resolution';
|
|
89
|
+
const line = `dsh-tui: the installed dsh cannot host this launch (${reason}); ${fallback}`;
|
|
90
|
+
logForDebugging(line);
|
|
91
|
+
if (process.env[HANDOFF_ACK_FD_ENV] === undefined && process.env.DSH_TUI_RESTART_CHILD !== '1')
|
|
92
|
+
process.stderr.write(`${line}\n`);
|
|
93
|
+
process.env[HOST_NOTICE_ENV] = reason;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Fallback when the funnel is not up (or refused): also close what the
|
|
97
|
+
* funnel's teardown closes — the codex hub pool is process-wide and no
|
|
98
|
+
* session's dispose closes it. Dynamic import keeps backends off the entry's
|
|
99
|
+
* load surface.
|
|
100
|
+
*/
|
|
101
|
+
async function disposeEntryRoot(ctx) {
|
|
102
|
+
try {
|
|
103
|
+
await disposeRootSettled(ctx);
|
|
104
|
+
}
|
|
105
|
+
finally {
|
|
106
|
+
try {
|
|
107
|
+
const { unloadBackends } = await import('./backend-registry.js');
|
|
108
|
+
await unloadBackends();
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
logForDebugging(`dsh-tui: closing backend resources on the entry's exit path failed (${error instanceof Error ? error.message : String(error)})`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async function runInEntry(kernelBeforeHost) {
|
|
116
|
+
// Without a usable dsh, DSH delegates to `dsh --profile`; the other kernels
|
|
117
|
+
// run on this package's own cordis. This pre-mount answer is only for the two
|
|
118
|
+
// failure paths below. The root starts neutral: its final composition mode is
|
|
119
|
+
// selected only after the Loader can assemble third-party backends.
|
|
120
|
+
let root;
|
|
121
|
+
const exitSeam = {};
|
|
122
|
+
try {
|
|
123
|
+
root = await prepareHostRoot(await loadHostDsh(), { profile, args: process.argv.slice(2), exitSeam });
|
|
124
|
+
markBoot('entry-hijacked');
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
markBoot('entry-host-unavailable');
|
|
128
|
+
// No dsh at all: stop with the install guidance rather than delegate into
|
|
129
|
+
// a spawn failure (on Windows `shell: true` hides the ENOENT).
|
|
130
|
+
if (kernelBeforeHost === 'dsh' && error instanceof Error && error.message === NO_DSH_ON_PATH) {
|
|
131
|
+
process.stderr.write(noDshGuidance());
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
noteHostUnavailable(kernelBeforeHost, error);
|
|
135
|
+
if (kernelBeforeHost === 'dsh') {
|
|
136
|
+
delegateToDsh();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const [{ Config }, { apply, handleStartupError }, { assembleBackendsFromProfile }, { createEntrySlot }, { deferRootCapabilityGuard, armRootCapabilityGuard }, { processGuardActive }, { logRestartEvent }] = await Promise.all([
|
|
141
|
+
import('./index.js'),
|
|
142
|
+
import('./plugin.js'),
|
|
143
|
+
import('./backend-assembly.js'),
|
|
144
|
+
import('./entry-slot.js'),
|
|
145
|
+
import('./host-access.js'),
|
|
146
|
+
import('../ink/update-overflow-guard.js'),
|
|
147
|
+
import('../update.js'),
|
|
148
|
+
]);
|
|
149
|
+
markBoot('entry-modules');
|
|
150
|
+
const ctx = root?.ctx ?? new (await import('@deepseek-ai/cordis')).Context();
|
|
151
|
+
const env = process.env;
|
|
152
|
+
// D-1: this entry decides the kernel *before* `apply` runs, and that decision is
|
|
153
|
+
// registry membership — `entryKernel` drops an id no backend answers for, and a
|
|
154
|
+
// third-party bundle's backend is only registered by the assembly below. So the
|
|
155
|
+
// installed bundles are assembled here first, on the mounted root's Loader, and
|
|
156
|
+
// the route is re-decided afterwards. `apply` assembles again; the pass is a
|
|
157
|
+
// no-op the second time. Without a host root there is no Loader and no profile to
|
|
158
|
+
// read: the assembly says so and registers nothing.
|
|
159
|
+
assembleBackendsFromProfile(ctx);
|
|
160
|
+
const kernel = entryKernel(env, { configured: configuredBackend(profile) });
|
|
161
|
+
try {
|
|
162
|
+
await root?.selectKernel(kernel === 'dsh');
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
if (kernel === 'dsh') {
|
|
166
|
+
noteHostUnavailable(kernel, error);
|
|
167
|
+
delegateToDsh();
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
handleStartupError(ctx, error);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
// cordis.patch.yml's dsh-tui row, rebuilt from the same environment; the
|
|
174
|
+
// editable fields come from ./tui-settings.ts on top.
|
|
175
|
+
const config = Config({
|
|
176
|
+
...ENTRY_ROW_DEFAULTS,
|
|
177
|
+
...(env.DSH_TUI_PRESET === undefined ? {} : { preset: env.DSH_TUI_PRESET }),
|
|
178
|
+
...(env.DSH_TUI_WORKSPACE_TARGET === undefined ? {} : { workspace: env.DSH_TUI_WORKSPACE_TARGET }),
|
|
179
|
+
...(env.DSH_TUI_RESUME_SESSION === undefined ? {} : { sessionId: env.DSH_TUI_RESUME_SESSION }),
|
|
180
|
+
...(env.DSH_TUI_BACKEND === undefined ? {} : { backend: env.DSH_TUI_BACKEND }),
|
|
181
|
+
});
|
|
182
|
+
installEntrySignals({
|
|
183
|
+
seam: exitSeam,
|
|
184
|
+
disposeRoot: () => disposeEntryRoot(ctx),
|
|
185
|
+
log: logRestartEvent,
|
|
186
|
+
});
|
|
187
|
+
// Only a host root gets a composition (DSH without one was delegated above).
|
|
188
|
+
const slot = root === undefined ? undefined : createEntrySlot(kernel === 'dsh', root.kernelVersion);
|
|
189
|
+
// Plugins use root capabilities while they activate: hold the TUI's guard
|
|
190
|
+
// back until composition arms it (./host-access.ts).
|
|
191
|
+
const releaseRootGuard = slot === undefined ? undefined : deferRootCapabilityGuard(ctx);
|
|
192
|
+
try {
|
|
193
|
+
// `entryKernel`: the runtime must not re-resolve the kernel — its rebuilt Config
|
|
194
|
+
// lacks the profile patch's row this route was decided on (the entry read that
|
|
195
|
+
// row above, after the assembly registered what an installed bundle declares).
|
|
196
|
+
await apply(ctx, config, ctx, { deferBackendOpen: true, profile, entryKernel: kernel, exitSeam, ...(slot === undefined ? {} : { entrySlot: slot }) });
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
handleStartupError(ctx, error);
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
// One owner of a fatal error: with the TUI's process guard up, DSH's
|
|
203
|
+
// fail-loud would exit 1 before the exit funnel ran.
|
|
204
|
+
if (root !== undefined && processGuardActive())
|
|
205
|
+
root.uninstallFailLoud();
|
|
206
|
+
if (root === undefined || slot === undefined)
|
|
207
|
+
return;
|
|
208
|
+
// The "starting" frame must reach the terminal before the composition's
|
|
209
|
+
// synchronous stretch.
|
|
210
|
+
await slot.firstFrameFlushed?.();
|
|
211
|
+
markBoot('entry-compose-start');
|
|
212
|
+
armRootCapabilityGuard(ctx);
|
|
213
|
+
const loaderOf = () => ctx.get('loader');
|
|
214
|
+
const composition = trackComposition(ctx, async () => { await loaderOf()?.await(); });
|
|
215
|
+
let failure;
|
|
216
|
+
try {
|
|
217
|
+
await root.compose(line => { logForDebugging(`dsh-tui: host composition: ${line.trimEnd()}`); }, () => composition.disposing);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
failure = { error };
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
composition.done();
|
|
224
|
+
releaseRootGuard?.();
|
|
225
|
+
markBoot('entry-compose-end');
|
|
226
|
+
}
|
|
227
|
+
if (!slot.dsh) {
|
|
228
|
+
// A light-profile failure ends the process loudly: a kernel whose plugin
|
|
229
|
+
// ecosystem did not come up must not pass as a boot.
|
|
230
|
+
if (failure === undefined) {
|
|
231
|
+
slot.composeSucceeded?.();
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const { error } = failure;
|
|
235
|
+
handleStartupError(ctx, error instanceof HostComposeError && error.logPath !== undefined ? `${error.message} — startup report: ${error.logPath}` : error);
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
// DSH: past the mount nothing writes to the terminal; a failure lands in the screen.
|
|
239
|
+
if (failure !== undefined) {
|
|
240
|
+
const { error } = failure;
|
|
241
|
+
if (error instanceof HostComposeError)
|
|
242
|
+
slot.composeFailed?.(error.original, error.logPath);
|
|
243
|
+
else
|
|
244
|
+
slot.composeFailed?.(error);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (composition.disposing)
|
|
248
|
+
return;
|
|
249
|
+
if (!slot.rowSeen)
|
|
250
|
+
slot.composeFailed?.(new Error(`the ${profile} profile has no dsh-tui row`));
|
|
251
|
+
else
|
|
252
|
+
slot.composeSucceeded?.();
|
|
253
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import type { Context } from '@deepseek-ai/cordis';
|
|
10
10
|
import Schema from '@deepseek-ai/schemastery';
|
|
11
11
|
import type { SessionModeSpec } from '../sessionModes.js';
|
|
12
|
+
import type { NotificationMethod, TaskNotifications } from '../ink/terminal-notification.js';
|
|
12
13
|
import { type KernelBackendId } from '../kernelPrefs.js';
|
|
13
14
|
import { type CodeFrameStyle, type ImageBacking, type MathImageBacking, type MathImageScale, type MathRendering, type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
14
15
|
import { type ShortcutActionId } from '../utils/keymap.js';
|
|
@@ -29,14 +30,24 @@ export interface Config {
|
|
|
29
30
|
* the local Claude CLI through the Claude Agent SDK (optional peer
|
|
30
31
|
* `@anthropic-ai/claude-agent-sdk`); `codex`, the experimental Codex
|
|
31
32
|
* backend driving the user's own `codex` CLI over `codex app-server`.
|
|
32
|
-
* `dsh-tui --backend <id>` sets it through `DSH_TUI_BACKEND`.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* the
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
33
|
+
* `dsh-tui --backend <id>` sets it through `DSH_TUI_BACKEND`.
|
|
34
|
+
*
|
|
35
|
+
* A plain `string` on purpose: this is the **input** surface, so an embedder
|
|
36
|
+
* writing `{ backend: 'codex' }` keeps compiling. The schema normalizes syntax;
|
|
37
|
+
* the boot checks registry membership after assembling installed bundles.
|
|
38
|
+
* The `BackendId` brand stays inside the package, where it guards session
|
|
39
|
+
* refs and `~/.dsh-tui/backends/<id>/` paths. Declaring the
|
|
40
|
+
* branded `KernelBackendId` here breaks published consumers instead
|
|
41
|
+
* (PR #1380 review R1). */
|
|
42
|
+
backend?: string;
|
|
43
|
+
/** LLM provider route. The route resolves atomically (issue #67): the
|
|
44
|
+
* `/model` choice persisted in `~/.dsh-tui/model.json` — the route the
|
|
45
|
+
* last session ran — wins whole; otherwise a `provider`+`model` pair named
|
|
46
|
+
* here is the deployment DEFAULT; otherwise `agentDefaultModel` supplies
|
|
47
|
+
* the provider-neutral Harness default. A bare embedder without that
|
|
48
|
+
* service falls back to DeepSeek. A half-pinned pair (only one of the two
|
|
49
|
+
* keys) is ignored outright and never half-overrides the persisted
|
|
50
|
+
* choice. */
|
|
40
51
|
provider?: string;
|
|
41
52
|
/** Model override passed to the agent; resolved together with `provider`
|
|
42
53
|
* as one atomic route (see `provider`). */
|
|
@@ -50,11 +61,13 @@ export interface Config {
|
|
|
50
61
|
workspace?: string;
|
|
51
62
|
/** Reasoning effort applied to every request, validated against the live
|
|
52
63
|
* route's adapter levels (an unlisted level is ignored and the adapter
|
|
53
|
-
* default applies).
|
|
54
|
-
* the
|
|
55
|
-
*
|
|
64
|
+
* default applies). This is the deployment DEFAULT beneath the persisted
|
|
65
|
+
* `/effort` choice (the level the last session ran); it also seeds the
|
|
66
|
+
* startup status line until the first request header reports the live
|
|
67
|
+
* value. */
|
|
56
68
|
effort?: string;
|
|
57
|
-
/** Settings default for future sessions;
|
|
69
|
+
/** Settings user-layer default for future sessions; when set it outranks
|
|
70
|
+
* both the persisted `/effort` choice and the `effort` fallback. */
|
|
58
71
|
effortDefault?: string;
|
|
59
72
|
/** Show the header whale and its idle animation. */
|
|
60
73
|
whale?: boolean;
|
|
@@ -93,13 +106,20 @@ export interface Config {
|
|
|
93
106
|
* /settings choices override this value after restart. The environment
|
|
94
107
|
* override DSH_TUI_DISABLE_TERMINAL_IMAGES can always force previews off. */
|
|
95
108
|
terminalImages?: boolean;
|
|
109
|
+
/** Launchpad landing page (settings `dsh-tui.launchpad`): an ordinary
|
|
110
|
+
* launch (no --resume, no first prompt) starts on the launchpad — the
|
|
111
|
+
* page where the first sentence gets typed. On by default; `false` boots
|
|
112
|
+
* straight into the chat page. Saved /settings choices override this
|
|
113
|
+
* value after restart; DSH_TUI_NO_LAUNCHPAD=1 skips it regardless. */
|
|
114
|
+
launchpad?: boolean;
|
|
96
115
|
/** UI language: `en` / `zh`. When absent, the `DSH_TUI_LANG` env var wins,
|
|
97
116
|
* then the `/lang` choice persisted in `~/.dsh-tui/lang.json`, then `zh`. */
|
|
98
117
|
lang?: string;
|
|
99
118
|
/** Agent preset id new sessions compose from (standard/ptc/minimal/
|
|
100
|
-
* cordis/… when the roster is mounted).
|
|
101
|
-
*
|
|
102
|
-
*
|
|
119
|
+
* cordis/… when the roster is mounted). A `DSH_TUI_PRESET` launch
|
|
120
|
+
* instruction outranks everything; otherwise the `/preset` choice
|
|
121
|
+
* persisted in `~/.dsh-tui/agent-preset.json` wins, then this value as
|
|
122
|
+
* the deployment default, then the roster default (`standard`). */
|
|
103
123
|
preset?: string;
|
|
104
124
|
/** Edit/Write diff presentation: `auto` picks side-by-side on wide
|
|
105
125
|
* terminals (≥110 cols) and unified below; `split`/`unified` force one
|
|
@@ -150,6 +170,10 @@ export interface Config {
|
|
|
150
170
|
* a ~30fps reveal instead of jumping per provider burst — bursty or
|
|
151
171
|
* one-shot deliveries read as an even flow. On by default. */
|
|
152
172
|
smoothStreaming?: boolean;
|
|
173
|
+
/** Successful task notifications: off, unfocused (default), or always. */
|
|
174
|
+
taskNotifications?: TaskNotifications;
|
|
175
|
+
/** Terminal notification transport: auto (default), OSC 9, or BEL. */
|
|
176
|
+
notificationMethod?: NotificationMethod;
|
|
153
177
|
/** Mermaid diagrams (settings `dsh-tui.mermaidDiagrams`): ```mermaid
|
|
154
178
|
* fences in replies render as Unicode box-drawing art — flowcharts,
|
|
155
179
|
* sequence/state/class/ER diagrams, pie, mindmap, timeline, gitGraph —
|
|
@@ -240,9 +264,18 @@ export interface Config {
|
|
|
240
264
|
* `plan`/`sandbox`/`approval` atoms; absent → the built-in
|
|
241
265
|
* default/plan/full cycle (see sessionModes.ts). */
|
|
242
266
|
modes?: SessionModeSpec[];
|
|
267
|
+
/** Upstream auto-retry for DSH sessions (default on): seed a retry
|
|
268
|
+
* policy (5 attempts, transport-drop-aware failure codes) on the
|
|
269
|
+
* llm-pi-ai provider route the bound session actually uses whenever
|
|
270
|
+
* it declares no retryPolicy, through the llm-pi-ai settings section
|
|
271
|
+
* — the policy the kernel's llm-retry plugin executes. Dormant
|
|
272
|
+
* channels are never written; routes with an explicit retryPolicy are
|
|
273
|
+
* never overwritten; setting this to false opts out entirely. */
|
|
274
|
+
upstreamRetry?: boolean;
|
|
243
275
|
}
|
|
244
|
-
/** The
|
|
245
|
-
*
|
|
276
|
+
/** The complete two-stage parse: syntax, then registry membership (P0 D1).
|
|
277
|
+
* Empty, malformed or unregistered values mean "not configured". Unlike the
|
|
278
|
+
* syntax-only Config schema, this helper requires discovery to have run. */
|
|
246
279
|
export declare function normalizeBackendChoice(value: unknown): KernelBackendId | undefined;
|
|
247
280
|
export declare const Config: Schema<Config, RuntimeConfig<Config>>;
|
|
248
281
|
/**
|
|
@@ -253,4 +286,7 @@ export declare const Config: Schema<Config, RuntimeConfig<Config>>;
|
|
|
253
286
|
* @returns a promise settling when the Loader entry has scheduled its runtime.
|
|
254
287
|
*/
|
|
255
288
|
export declare function apply(ctx: Context, config: RuntimeConfig<Config>): Promise<void>;
|
|
289
|
+
export { BACKEND, BACKEND_CAPABILITY_NAMES, BACKEND_RESERVED_IDS, validateBackendSpec, type BackendInstallRecipe, type BackendSpec, } from '../adapter/spec/tui-contributions.js';
|
|
290
|
+
export { backendAdmission, type BackendAdmission, type BackendAdmissionHost } from './backend-admission.js';
|
|
291
|
+
export { backendContributionOf } from './backend-contribution.js';
|
|
256
292
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import Schema from '@deepseek-ai/schemastery';
|
|
2
|
-
import {
|
|
2
|
+
import { parseBackendChoice } from './backend-registry.js';
|
|
3
|
+
import { parseBackendId } from '../kernelPrefs.js';
|
|
3
4
|
import { BTW_CONTEXT_BUDGET_DEFAULT, BTW_CONTEXT_TURNS_DEFAULT, DEFAULT_COMPANION_SKIN, DEFAULT_SIDE_PANEL_IDS, DEFAULT_STATUS_BAR, normalizeBtwContextBudget, normalizeBtwContextTurns, normalizeCompanionSkin, normalizePageMargin, normalizeSidePanelPanels, normalizeSidePanelRatio } from '../tuiDisplayPrefs.js';
|
|
4
5
|
import { SHORTCUT_ACTIONS } from '../utils/keymap.js';
|
|
5
6
|
import { normalizeSplashFont } from '../components/splashFonts.js';
|
|
6
7
|
import { normalizeBrandSetting } from '../branding.js';
|
|
7
8
|
import { editableConfig } from './compat/settings.js';
|
|
8
9
|
import { EDITABLE_CONFIG_KEYS } from '../settings/definitions.js';
|
|
10
|
+
import { peekEntrySlot, takeEntryAttach } from './entry-slot.js';
|
|
9
11
|
export const name = 'dsh-tui';
|
|
10
12
|
// `tuiWorkspaces` must stay OUT of this code-level inject (issue #183): the
|
|
11
13
|
// dsh CLI resolves the bundle's cordis.patch.yml from the FIRST copy of this
|
|
@@ -17,20 +19,20 @@ export const name = 'dsh-tui';
|
|
|
17
19
|
// row-level inject purely as an ordering guarantee when the row exists; when
|
|
18
20
|
// it does not, plugin.ts/channel.ts fall back to a local workspace runtime.
|
|
19
21
|
export const inject = ['agents'];
|
|
20
|
-
/** The
|
|
21
|
-
*
|
|
22
|
+
/** The complete two-stage parse: syntax, then registry membership (P0 D1).
|
|
23
|
+
* Empty, malformed or unregistered values mean "not configured". Unlike the
|
|
24
|
+
* syntax-only Config schema, this helper requires discovery to have run. */
|
|
22
25
|
export function normalizeBackendChoice(value) {
|
|
23
|
-
|
|
24
|
-
return undefined;
|
|
25
|
-
const id = value.trim().toLowerCase();
|
|
26
|
-
return isKernelId(id) ? id : undefined;
|
|
26
|
+
return parseBackendChoice(value);
|
|
27
27
|
}
|
|
28
28
|
export const Config = editableConfig(Schema.object({
|
|
29
29
|
sessionId: Schema.string().required(false),
|
|
30
30
|
// A transform, not a union: the row reads `DSH_TUI_BACKEND`, and a stray
|
|
31
31
|
// export (`Claude`, a typo) must not fail the whole boot — case and blanks
|
|
32
|
-
// are normalized and
|
|
33
|
-
|
|
32
|
+
// are normalized here and the id-shape gate drops junk. Cordis validates
|
|
33
|
+
// before `apply` assembles installed backends: membership must wait until
|
|
34
|
+
// after that discovery, or a third-party Config choice is erased.
|
|
35
|
+
backend: Schema.transform(Schema.string(), value => parseBackendId(value)),
|
|
34
36
|
// No schema defaults on the route: a `.default()` here would make an
|
|
35
37
|
// unset key indistinguishable from an explicit cordis.yml choice and the
|
|
36
38
|
// persisted `/model` preference could never win (issue #30). The defaults
|
|
@@ -61,6 +63,10 @@ export const Config = editableConfig(Schema.object({
|
|
|
61
63
|
contextBar: Schema.boolean().default(true),
|
|
62
64
|
fullscreen: Schema.boolean().default(true),
|
|
63
65
|
terminalImages: Schema.boolean().default(true),
|
|
66
|
+
// No `.default()` on purpose (same rule as recapOnOpen): an unset key must
|
|
67
|
+
// stay distinguishable from an explicit `false`, and the boot reads
|
|
68
|
+
// undefined as on (`config.launchpad !== false`).
|
|
69
|
+
launchpad: Schema.boolean(),
|
|
64
70
|
lang: Schema.string().required(false),
|
|
65
71
|
preset: Schema.string().required(false),
|
|
66
72
|
diffLayout: Schema.union(['auto', 'split', 'unified']).default('auto'),
|
|
@@ -77,6 +83,8 @@ export const Config = editableConfig(Schema.object({
|
|
|
77
83
|
promptSessionLabel: Schema.boolean().default(false),
|
|
78
84
|
expandEditor: Schema.boolean().default(true),
|
|
79
85
|
smoothStreaming: Schema.boolean().default(true),
|
|
86
|
+
taskNotifications: Schema.union(['off', 'unfocused', 'always']),
|
|
87
|
+
notificationMethod: Schema.union(['auto', 'osc9', 'bel']),
|
|
80
88
|
mermaidDiagrams: Schema.boolean().default(true),
|
|
81
89
|
codeFrameStyle: Schema.union(['light', 'full']),
|
|
82
90
|
mathRendering: Schema.union(['auto', 'image', 'unicode', 'source']),
|
|
@@ -145,6 +153,9 @@ export const Config = editableConfig(Schema.object({
|
|
|
145
153
|
approval: Schema.union(['ask', 'never']).required(false),
|
|
146
154
|
permission: Schema.string().required(false),
|
|
147
155
|
})).required(false),
|
|
156
|
+
// Upstream auto-retry seeding (see upstream-retry.ts): on by default so
|
|
157
|
+
// an upstream link drop retries like any other transient failure.
|
|
158
|
+
upstreamRetry: Schema.boolean().default(true),
|
|
148
159
|
}), EDITABLE_CONFIG_KEYS);
|
|
149
160
|
/**
|
|
150
161
|
* Start the interactive TUI front door, delegating to the JSX implementation
|
|
@@ -154,6 +165,14 @@ export const Config = editableConfig(Schema.object({
|
|
|
154
165
|
* @returns a promise settling when the Loader entry has scheduled its runtime.
|
|
155
166
|
*/
|
|
156
167
|
export async function apply(ctx, config) {
|
|
168
|
+
// The entry already mounted the screen in this process (./entry-slot.ts):
|
|
169
|
+
// the row only runs the DSH side and hands the session to that screen.
|
|
170
|
+
const entrySlot = peekEntrySlot();
|
|
171
|
+
if (entrySlot !== undefined) {
|
|
172
|
+
entrySlot.rowSeen = true;
|
|
173
|
+
attachToEntry(ctx, config);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
157
176
|
// Upstream drift is NO LONGER spammed to stderr here: per-package
|
|
158
177
|
// console.warn lines interleave with the TUI frame redraw and arrive
|
|
159
178
|
// garbled (typewriter animation repaints over them). The merged,
|
|
@@ -179,3 +198,38 @@ export async function apply(ctx, config) {
|
|
|
179
198
|
handleStartupError(ctx, error);
|
|
180
199
|
});
|
|
181
200
|
}
|
|
201
|
+
/** The row under the entry's screen: the DSH side in its own runtime fiber
|
|
202
|
+
* once the Loader settled, never a second render; a recompose stays idle. */
|
|
203
|
+
function attachToEntry(ctx, config) {
|
|
204
|
+
const attach = takeEntryAttach();
|
|
205
|
+
if (attach === undefined) {
|
|
206
|
+
ctx.logger.warn('dsh-tui: the entry\'s screen already holds a DSH session; this dsh-tui row stays idle');
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
let disposed = false;
|
|
210
|
+
ctx.effect(() => () => { disposed = true; });
|
|
211
|
+
const loader = ctx.get('loader');
|
|
212
|
+
void (loader?.await() ?? ctx.fiber.await()).then(() => {
|
|
213
|
+
if (disposed)
|
|
214
|
+
return;
|
|
215
|
+
return ctx.plugin({
|
|
216
|
+
name: 'dsh-tui-runtime',
|
|
217
|
+
apply: (runtimeCtx) => attach(runtimeCtx, config, ctx),
|
|
218
|
+
});
|
|
219
|
+
}).catch((error) => {
|
|
220
|
+
ctx.logger.error(`dsh-tui: the DSH side failed to start under the entry's screen: ${error instanceof Error ? error.message : String(error)}`);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
// ── The Backend contribution family (B-2) ─────────────────────────────────────
|
|
224
|
+
// `alpha`, and deliberately narrow: the *declaration* shape, its validator, the
|
|
225
|
+
// admission verdict and the projection this package uses for its own manifests.
|
|
226
|
+
// A third-party author writes a declaration by hand against exactly this surface
|
|
227
|
+
// (scripts/verify-public-config-types.mjs compiles a real consumer file against
|
|
228
|
+
// the published declarations), and from here on it may only grow — removing any
|
|
229
|
+
// of it is a breaking change. What is NOT here: the registry, the loader and the
|
|
230
|
+
// picker. Those stay the host's, and the stage C install chain is where a mounted
|
|
231
|
+
// bundle's declaration reaches them (the admission chain itself is wired; see
|
|
232
|
+
// docs/plugins.md).
|
|
233
|
+
export { BACKEND, BACKEND_CAPABILITY_NAMES, BACKEND_RESERVED_IDS, validateBackendSpec, } from '../adapter/spec/tui-contributions.js';
|
|
234
|
+
export { backendAdmission } from './backend-admission.js';
|
|
235
|
+
export { backendContributionOf } from './backend-contribution.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host's install-executor table (roadmap Stage B / B-1, §6 item 12).
|
|
3
|
+
*
|
|
4
|
+
* Stage A locked the install surface to a **backend id** — `backend-registry.ts`
|
|
5
|
+
* kept `HOST_INSTALLABLE_BACKEND_ID = 'claude'` and `backends.ts` statically
|
|
6
|
+
* imported that one backend's installer. That held only while the host had
|
|
7
|
+
* exactly one consumer writing manifests. A manifest now names an **executor**
|
|
8
|
+
* instead, and the registry looks the name up in this table when the entry
|
|
9
|
+
* registers: the value is data any mounted bundle can be checked against
|
|
10
|
+
* (§4.4), not a static import.
|
|
11
|
+
*
|
|
12
|
+
* The table holds exactly one value today, and a recipe naming anything else is
|
|
13
|
+
* treated as **having no install surface** rather than refused (§6 item 12: the
|
|
14
|
+
* field *shape* is public, the value set is the host's). Widening it is adding an
|
|
15
|
+
* entry here; the shape does not change, which is what keeps "one more executor"
|
|
16
|
+
* a non-breaking act once the contribution family freezes (§6 item 5).
|
|
17
|
+
*/
|
|
18
|
+
import type { SdkInstallTarget, SdkInstaller } from '../../agent/backend.js';
|
|
19
|
+
/** The one executor value this host implements: one `pnpm add` in the DSH
|
|
20
|
+
* profile root. Named as a verb, not as a backend — a backend *declares* it. */
|
|
21
|
+
export declare const PNPM_PROFILE_ADD = "pnpm-profile-add";
|
|
22
|
+
/**
|
|
23
|
+
* What one executor value means: the parameterized *how* of an install, with
|
|
24
|
+
* every backend-specific *what* left to the manifest recipe that names it.
|
|
25
|
+
*/
|
|
26
|
+
export interface InstallExecutor {
|
|
27
|
+
/** Where this launch would install — synchronous, read-only (argv + the file
|
|
28
|
+
* system) and never throwing. The non-profile kinds carry the reason for the
|
|
29
|
+
* wizard's manual-instructions panel. `argv` is injectable for regressions. */
|
|
30
|
+
readonly resolveTarget: (argv?: readonly string[]) => SdkInstallTarget;
|
|
31
|
+
/** Whether the tool this executor shells out to runs at all (the wizard's
|
|
32
|
+
* preflight, asked after the user confirmed the target). */
|
|
33
|
+
readonly preflight: () => Promise<boolean>;
|
|
34
|
+
/** Start one install of `specifier` into `dir`; cancellable, settles once. */
|
|
35
|
+
readonly start: (specifier: string, dir: string) => SdkInstaller;
|
|
36
|
+
}
|
|
37
|
+
/** Executor name → actions. The single source of "which recipes this host can
|
|
38
|
+
* actually run"; everything else reads it through {@link installExecutor}. */
|
|
39
|
+
export declare const INSTALL_EXECUTORS: ReadonlyMap<string, InstallExecutor>;
|
|
40
|
+
/** The executor a manifest recipe names, or undefined when this host does not
|
|
41
|
+
* implement it — which every caller reads as "no install surface", never as an
|
|
42
|
+
* error (§6 item 12). */
|
|
43
|
+
export declare function installExecutor(name: string): InstallExecutor | undefined;
|
|
44
|
+
//# sourceMappingURL=executors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executors.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/install/executors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG5E;iFACiF;AACjF,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAElD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;oFAEgF;IAChF,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,KAAK,gBAAgB,CAAA;IACtE;iEAC6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC1C,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,YAAY,CAAA;CACjE;AAED;+EAC+E;AAC/E,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAEjE,CAAA;AAEF;;0BAE0B;AAC1B,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAEzE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { pnpmProfileAdd } from './pnpm-profile-add.js';
|
|
2
|
+
/** The one executor value this host implements: one `pnpm add` in the DSH
|
|
3
|
+
* profile root. Named as a verb, not as a backend — a backend *declares* it. */
|
|
4
|
+
export const PNPM_PROFILE_ADD = 'pnpm-profile-add';
|
|
5
|
+
/** Executor name → actions. The single source of "which recipes this host can
|
|
6
|
+
* actually run"; everything else reads it through {@link installExecutor}. */
|
|
7
|
+
export const INSTALL_EXECUTORS = new Map([
|
|
8
|
+
[PNPM_PROFILE_ADD, pnpmProfileAdd],
|
|
9
|
+
]);
|
|
10
|
+
/** The executor a manifest recipe names, or undefined when this host does not
|
|
11
|
+
* implement it — which every caller reads as "no install surface", never as an
|
|
12
|
+
* error (§6 item 12). */
|
|
13
|
+
export function installExecutor(name) {
|
|
14
|
+
return INSTALL_EXECUTORS.get(name);
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-profile-add.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/install/pnpm-profile-add.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AA8HrD,eAAO,MAAM,cAAc,EAAE,eAAqD,CAAA"}
|