@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,112 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type * as AppBoot from '@deepseek-ai/dsh-app-boot';
|
|
3
|
+
import type * as HomePaths from '@deepseek-ai/dsh-home-paths';
|
|
4
|
+
import type * as Cmdline from '@deepseek-ai/dsh-cmdline';
|
|
5
|
+
import type * as HttpProxy from '@deepseek-ai/dsh-http-proxy';
|
|
6
|
+
import { HOST_MODULES } from './host-contract.js';
|
|
7
|
+
import { type ProcessExitSeam } from './process-exit.js';
|
|
8
|
+
type Warn = (line: string) => void;
|
|
9
|
+
/** Picking from the real module type fails the build when the contract names an undeclared export. */
|
|
10
|
+
type ContractExports<K extends (typeof HOST_MODULES)[number]['key']> = Extract<(typeof HOST_MODULES)[number], {
|
|
11
|
+
key: K;
|
|
12
|
+
}>['exports'][number];
|
|
13
|
+
type AppBootModule = Pick<typeof AppBoot, ContractExports<'appBoot'>>;
|
|
14
|
+
/** `@deepseek-ai/dsh/profile-boot`, declared locally: the host CLI is not a dependency. */
|
|
15
|
+
interface ProfileBootModule {
|
|
16
|
+
prepareProfile(name: string, userLayer?: boolean, fromDefaultProfile?: string): AppBoot.Profile;
|
|
17
|
+
readonly INSTALL_ANCHOR: string;
|
|
18
|
+
readonly PROFILE_ROOT_FILENAME: 'cordis.yml';
|
|
19
|
+
}
|
|
20
|
+
type HomePathsModule = Pick<typeof HomePaths, ContractExports<'homePaths'>>;
|
|
21
|
+
type CmdlineModule = Pick<typeof Cmdline, ContractExports<'cmdline'>>;
|
|
22
|
+
type HttpProxyModule = Pick<typeof HttpProxy, ContractExports<'httpProxy'>>;
|
|
23
|
+
export interface HostDsh {
|
|
24
|
+
readonly packageDir: string;
|
|
25
|
+
/** Reported, not gated on: the exports are. */
|
|
26
|
+
readonly version: string;
|
|
27
|
+
readonly Context: new () => Context;
|
|
28
|
+
readonly appBoot: AppBootModule;
|
|
29
|
+
readonly Loader: unknown;
|
|
30
|
+
readonly homePaths: HomePathsModule;
|
|
31
|
+
readonly launchEnvironmentKey: string;
|
|
32
|
+
readonly cmdline: CmdlineModule;
|
|
33
|
+
readonly profileBoot: ProfileBootModule;
|
|
34
|
+
readonly httpProxy: HttpProxyModule;
|
|
35
|
+
}
|
|
36
|
+
/** Where the host came from, or why there is none (shown to the user). */
|
|
37
|
+
export type HostDshLocation = {
|
|
38
|
+
readonly packageDir: string;
|
|
39
|
+
readonly via: 'link' | 'shim' | 'beside' | 'volta';
|
|
40
|
+
} | {
|
|
41
|
+
readonly reason: string;
|
|
42
|
+
};
|
|
43
|
+
/** `findHostDsh`'s reason when PATH has no `dsh` at all. */
|
|
44
|
+
export declare const NO_DSH_ON_PATH = "no dsh on PATH";
|
|
45
|
+
/**
|
|
46
|
+
* Find the installed host package from the first `dsh` on PATH, following
|
|
47
|
+
* what a launch would run: a link (npm on Unix) by its realpath, an npm /
|
|
48
|
+
* pnpm / yarn launcher script (sh, `.cmd`, `.ps1`) by the script path it
|
|
49
|
+
* starts, a volta shim through volta's package image. A launcher that
|
|
50
|
+
* cannot be followed is no host: the reason says what was found.
|
|
51
|
+
*/
|
|
52
|
+
export declare function findHostDsh(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): HostDshLocation;
|
|
53
|
+
/**
|
|
54
|
+
* The script paths a launcher starts: quoted or bare tokens ending in
|
|
55
|
+
* `.js` / `.mjs` / `.cjs` (npm and pnpm cmd-shim, `.cmd` and `.ps1` shims,
|
|
56
|
+
* a hand-written `exec node …/bin.js` wrapper).
|
|
57
|
+
*/
|
|
58
|
+
export declare function launcherScriptPaths(text: string): string[];
|
|
59
|
+
/** Expand a launcher's own-directory variables and resolve with `platform`'s path rules. */
|
|
60
|
+
export declare function resolveLauncherPath(script: string, base: string, platform: NodeJS.Platform): string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The capability probe: throws naming what is missing (no host, a module that
|
|
63
|
+
* does not import, an export the entry needs); the caller falls back.
|
|
64
|
+
*/
|
|
65
|
+
export declare function loadHostDsh(packageDir?: string | undefined): Promise<HostDsh>;
|
|
66
|
+
export interface HostRoot {
|
|
67
|
+
readonly ctx: Context;
|
|
68
|
+
/**
|
|
69
|
+
* Select the final kernel after the Loader is available and third-party
|
|
70
|
+
* backends have been assembled. This must happen before the runtime applies
|
|
71
|
+
* and before the root composes its profile.
|
|
72
|
+
*/
|
|
73
|
+
selectKernel(dsh: boolean): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* The dsh-tui profile (DSH kernel) or the light profile (./lite-profile.ts).
|
|
76
|
+
* Rejects with the Loader's or the audit's error; the tree stays up.
|
|
77
|
+
* `stopping`: a root dispose is waiting, so skip audit and readiness.
|
|
78
|
+
*/
|
|
79
|
+
compose(warn: Warn, stopping?: () => boolean): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Remove the fail-loud handlers (DSH kernel; a no-op otherwise) once the
|
|
82
|
+
* TUI's process guard is up: it alone owns a fatal error, and fail-loud
|
|
83
|
+
* would exit before the funnel restored the terminal.
|
|
84
|
+
*/
|
|
85
|
+
readonly uninstallFailLoud: () => void;
|
|
86
|
+
/** The host's DSH runtime version (`unknown` when it reports none). */
|
|
87
|
+
readonly kernelVersion: string;
|
|
88
|
+
}
|
|
89
|
+
export interface PrepareHostRootOptions {
|
|
90
|
+
readonly profile: string;
|
|
91
|
+
/** `ctx.cmdlineArgs`. */
|
|
92
|
+
readonly args: readonly string[];
|
|
93
|
+
/** Routes `ctx.appExit(code)` to the TUI's exit funnel; the bounded `shutdown` when unfilled or refused. */
|
|
94
|
+
readonly exitSeam?: ProcessExitSeam;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Build the entry's root from the host's `cordis` and install the host's
|
|
98
|
+
* module resolution on it before any TUI module is imported, so the TUI and
|
|
99
|
+
* the DSH plugins resolve shared packages (react, schemastery, the
|
|
100
|
+
* `@deepseek-ai/*` peers) the same way. Both kernels: otherwise the peers
|
|
101
|
+
* resolve only through `$DSH_HOME/profiles/node_modules`, which a fresh
|
|
102
|
+
* install may not have. The DSH kernel also gets the rest of `runProfile`'s prepare.
|
|
103
|
+
*/
|
|
104
|
+
export declare function prepareHostRoot(host: HostDsh, options: PrepareHostRootOptions): Promise<HostRoot>;
|
|
105
|
+
/** A composition failure, with the startup report saved for it. */
|
|
106
|
+
export declare class HostComposeError extends Error {
|
|
107
|
+
readonly original: unknown;
|
|
108
|
+
readonly logPath: string | undefined;
|
|
109
|
+
constructor(original: unknown, logPath: string | undefined);
|
|
110
|
+
}
|
|
111
|
+
export {};
|
|
112
|
+
//# sourceMappingURL=host-dsh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-dsh.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/host-dsh.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,KAAK,OAAO,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,KAAK,SAAS,MAAM,6BAA6B,CAAA;AAC7D,OAAO,KAAK,KAAK,OAAO,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,KAAK,SAAS,MAAM,6BAA6B,CAAA;AAE7D,OAAO,EAAE,YAAY,EAAgB,MAAM,oBAAoB,CAAA;AAE/D,OAAO,EAA+B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAOrF,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;AAElC,sGAAsG;AACtG,KAAK,eAAe,CAAC,CAAC,SAAS,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5I,KAAK,aAAa,GAAG,IAAI,CAAC,OAAO,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAA;AACrE,2FAA2F;AAC3F,UAAU,iBAAiB;IACzB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAA;IAC/F,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,qBAAqB,EAAE,YAAY,CAAA;CAC7C;AACD,KAAK,eAAe,GAAG,IAAI,CAAC,OAAO,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAA;AAC3E,KAAK,aAAa,GAAG,IAAI,CAAC,OAAO,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAAA;AACrE,KAAK,eAAe,GAAG,IAAI,CAAC,OAAO,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,CAAA;AAM3E,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,UAAU,OAAO,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;IACnC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAA;IACvC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAA;CACpC;AAED,0EAA0E;AAC1E,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;CAAE,GACnF;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAE/B,4DAA4D;AAC5D,eAAO,MAAM,cAAc,mBAAmB,CAAA;AAE9C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,eAAe,CA0B/H;AAmDD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1D;AAED,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,SAAS,CAW/G;AAWD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,UAAU,GAAE,MAAM,GAAG,SAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiD9F;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IACtC,uEAAuE;IACvE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,4GAA4G;IAC5G,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CACpC;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2IvG;AAED,mEAAmE;AACnE,qBAAa,gBAAiB,SAAQ,KAAK;IAE7B,QAAQ,CAAC,QAAQ,EAAE,OAAO;IADtC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;gBACf,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS;CAKpE"}
|
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the installed dsh's modules and builds the entry's single Cordis root.
|
|
3
|
+
* Host modules come from the `dsh` on PATH by realpath, imported by file URL;
|
|
4
|
+
* `@deepseek-ai/*` is `import type` here only (contract: ./host-contract.ts).
|
|
5
|
+
* Never writes to stdout: before the mount host warnings go to stderr, the
|
|
6
|
+
* composition takes the caller's sink.
|
|
7
|
+
*/
|
|
8
|
+
import { randomUUID } from 'node:crypto';
|
|
9
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
10
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
import { basename, delimiter, dirname, join, posix, win32 } from 'node:path';
|
|
13
|
+
import { pathToFileURL } from 'node:url';
|
|
14
|
+
import { inspect } from 'node:util';
|
|
15
|
+
import { HOST_MODULES, HOST_PACKAGE } from './host-contract.js';
|
|
16
|
+
import { LITE_PROFILE_EXCLUDED_BUNDLES, liteProfilePlan } from './lite-profile.js';
|
|
17
|
+
import { PROCESS_SHUTDOWN_TIMEOUT_MS } from './process-exit.js';
|
|
18
|
+
/** The diagnostic prefix the host's own boot uses. */
|
|
19
|
+
const BIN_NAME = 'dsh';
|
|
20
|
+
/** Cordis fiber state "active" (dsh-app-boot FIBER_ACTIVE). */
|
|
21
|
+
const FIBER_ACTIVE = 2;
|
|
22
|
+
const APP_BOOT = HOST_MODULES.find(spec => spec.key === 'appBoot').specifier;
|
|
23
|
+
/** `findHostDsh`'s reason when PATH has no `dsh` at all. */
|
|
24
|
+
export const NO_DSH_ON_PATH = 'no dsh on PATH';
|
|
25
|
+
/**
|
|
26
|
+
* Find the installed host package from the first `dsh` on PATH, following
|
|
27
|
+
* what a launch would run: a link (npm on Unix) by its realpath, an npm /
|
|
28
|
+
* pnpm / yarn launcher script (sh, `.cmd`, `.ps1`) by the script path it
|
|
29
|
+
* starts, a volta shim through volta's package image. A launcher that
|
|
30
|
+
* cannot be followed is no host: the reason says what was found.
|
|
31
|
+
*/
|
|
32
|
+
export function findHostDsh(env = process.env, platform = process.platform) {
|
|
33
|
+
const names = platform === 'win32' ? ['dsh.cmd', 'dsh.ps1', 'dsh'] : ['dsh'];
|
|
34
|
+
for (const dir of (env.PATH ?? env.Path ?? '').split(delimiter)) {
|
|
35
|
+
if (dir === '')
|
|
36
|
+
continue;
|
|
37
|
+
for (const name of names) {
|
|
38
|
+
const candidate = join(dir, name);
|
|
39
|
+
if (!existsSync(candidate))
|
|
40
|
+
continue;
|
|
41
|
+
// npm's Windows shims sit beside the global node_modules.
|
|
42
|
+
if (platform === 'win32') {
|
|
43
|
+
const beside = join(dir, 'node_modules', '@deepseek-ai', 'dsh');
|
|
44
|
+
if (isHostPackage(beside))
|
|
45
|
+
return { packageDir: beside, via: 'beside' };
|
|
46
|
+
}
|
|
47
|
+
// The first `dsh` on PATH is the one a launch would run: it is the host
|
|
48
|
+
// or there is none.
|
|
49
|
+
let real;
|
|
50
|
+
try {
|
|
51
|
+
real = realpathSync(candidate);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
return { reason: `${candidate} cannot be resolved (${error instanceof Error ? error.message : String(error)})` };
|
|
55
|
+
}
|
|
56
|
+
const linked = hostPackageAbove(real);
|
|
57
|
+
if (linked !== undefined)
|
|
58
|
+
return { packageDir: linked, via: 'link' };
|
|
59
|
+
return followLauncher(candidate, real, env, platform);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return { reason: NO_DSH_ON_PATH };
|
|
63
|
+
}
|
|
64
|
+
function hostPackageAbove(path) {
|
|
65
|
+
for (let up = dirname(path);; up = dirname(up)) {
|
|
66
|
+
if (isHostPackage(up))
|
|
67
|
+
return up;
|
|
68
|
+
if (dirname(up) === up)
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** The largest launcher script read (npm / pnpm shims are well under 2 KiB). */
|
|
73
|
+
const LAUNCHER_SCRIPT_MAX = 64 * 1024;
|
|
74
|
+
/**
|
|
75
|
+
* A `dsh` that is not a link into the package: a launcher script (read the
|
|
76
|
+
* script path it starts) or a volta shim (volta's package image).
|
|
77
|
+
*/
|
|
78
|
+
function followLauncher(candidate, real, env, platform) {
|
|
79
|
+
if (/^volta-shim(?:\.exe)?$/iu.test(basename(real))) {
|
|
80
|
+
const volta = env.VOLTA_HOME ?? join(env.HOME ?? env.USERPROFILE ?? '', '.volta');
|
|
81
|
+
const image = join(volta, 'tools', 'image', 'packages', '@deepseek-ai', 'dsh');
|
|
82
|
+
for (const packageDir of [join(image, 'lib', 'node_modules', '@deepseek-ai', 'dsh'), join(image, 'node_modules', '@deepseek-ai', 'dsh')]) {
|
|
83
|
+
if (isHostPackage(packageDir))
|
|
84
|
+
return { packageDir, via: 'volta' };
|
|
85
|
+
}
|
|
86
|
+
return { reason: `${candidate} is a volta shim and volta's image has no @deepseek-ai/dsh under ${image}` };
|
|
87
|
+
}
|
|
88
|
+
let text;
|
|
89
|
+
try {
|
|
90
|
+
const content = readFileSync(real);
|
|
91
|
+
if (content.length > LAUNCHER_SCRIPT_MAX || content.subarray(0, 4096).includes(0)) {
|
|
92
|
+
return { reason: `${candidate} is neither a link into @deepseek-ai/dsh nor a launcher script` };
|
|
93
|
+
}
|
|
94
|
+
text = content.toString('utf8');
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
return { reason: `${candidate} cannot be read (${error instanceof Error ? error.message : String(error)})` };
|
|
98
|
+
}
|
|
99
|
+
const base = dirname(real);
|
|
100
|
+
for (const script of launcherScriptPaths(text)) {
|
|
101
|
+
const path = resolveLauncherPath(script, base, platform);
|
|
102
|
+
if (path === undefined || !existsSync(path))
|
|
103
|
+
continue;
|
|
104
|
+
let target;
|
|
105
|
+
try {
|
|
106
|
+
target = realpathSync(path);
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const packageDir = hostPackageAbove(target);
|
|
112
|
+
if (packageDir !== undefined)
|
|
113
|
+
return { packageDir, via: 'shim' };
|
|
114
|
+
}
|
|
115
|
+
return { reason: `${candidate} is a launcher script that starts no @deepseek-ai/dsh script found on disk` };
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The script paths a launcher starts: quoted or bare tokens ending in
|
|
119
|
+
* `.js` / `.mjs` / `.cjs` (npm and pnpm cmd-shim, `.cmd` and `.ps1` shims,
|
|
120
|
+
* a hand-written `exec node …/bin.js` wrapper).
|
|
121
|
+
*/
|
|
122
|
+
export function launcherScriptPaths(text) {
|
|
123
|
+
const found = [];
|
|
124
|
+
const token = /"([^"\r\n]+?\.[cm]?js)"|'([^'\r\n]+?\.[cm]?js)'|((?:[^\s"'`;|&<>()]+?)\.[cm]?js)(?=[\s"';|&)]|$)/gmu;
|
|
125
|
+
for (const match of text.matchAll(token)) {
|
|
126
|
+
const path = match[1] ?? match[2] ?? match[3];
|
|
127
|
+
if (path !== undefined && !found.includes(path))
|
|
128
|
+
found.push(path);
|
|
129
|
+
}
|
|
130
|
+
return found;
|
|
131
|
+
}
|
|
132
|
+
/** Expand a launcher's own-directory variables and resolve with `platform`'s path rules. */
|
|
133
|
+
export function resolveLauncherPath(script, base, platform) {
|
|
134
|
+
let path = script
|
|
135
|
+
.replace(/^\$\{?basedir\}?/u, base)
|
|
136
|
+
.replace(/^\$\(dirname\s+"?\$0"?\)/u, base)
|
|
137
|
+
.replace(/^%~dp0%?/iu, base + '\\')
|
|
138
|
+
.replace(/^%dp0%/iu, base)
|
|
139
|
+
.replace(/^\$PSScriptRoot/iu, base);
|
|
140
|
+
// Anything else still holding a variable is not a path this can follow.
|
|
141
|
+
if (/[$%]/u.test(path))
|
|
142
|
+
return undefined;
|
|
143
|
+
if (platform !== 'win32')
|
|
144
|
+
path = path.replaceAll('\\', '/');
|
|
145
|
+
return (platform === 'win32' ? win32 : posix).resolve(base, path);
|
|
146
|
+
}
|
|
147
|
+
function isHostPackage(dir) {
|
|
148
|
+
try {
|
|
149
|
+
const manifest = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8'));
|
|
150
|
+
return typeof manifest === 'object' && manifest !== null && manifest.name === HOST_PACKAGE;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The capability probe: throws naming what is missing (no host, a module that
|
|
158
|
+
* does not import, an export the entry needs); the caller falls back.
|
|
159
|
+
*/
|
|
160
|
+
export async function loadHostDsh(packageDir = undefined) {
|
|
161
|
+
if (packageDir === undefined) {
|
|
162
|
+
const found = findHostDsh();
|
|
163
|
+
if (!('packageDir' in found))
|
|
164
|
+
throw new Error(found.reason);
|
|
165
|
+
packageDir = found.packageDir;
|
|
166
|
+
}
|
|
167
|
+
let version = 'unknown';
|
|
168
|
+
try {
|
|
169
|
+
const manifest = JSON.parse(readFileSync(join(packageDir, 'package.json'), 'utf8'));
|
|
170
|
+
if (typeof manifest.version === 'string')
|
|
171
|
+
version = manifest.version;
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
}
|
|
175
|
+
const hostRequire = createRequire(join(packageDir, 'package.json'));
|
|
176
|
+
const importFrom = async (require, specifier) => {
|
|
177
|
+
try {
|
|
178
|
+
return await import(pathToFileURL(require.resolve(specifier)).href);
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
throw new Error(`dsh ${version} at ${packageDir}: ${specifier} does not load (${error instanceof Error ? error.message.split('\n')[0] : String(error)})`, { cause: error });
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
// The Loader and the home paths are app-boot's own dependencies (the
|
|
185
|
+
// Loader's builtins must be the instance app-boot mounts includes with).
|
|
186
|
+
let appBootRequire;
|
|
187
|
+
try {
|
|
188
|
+
appBootRequire = createRequire(hostRequire.resolve(APP_BOOT));
|
|
189
|
+
}
|
|
190
|
+
catch (error) {
|
|
191
|
+
throw new Error(`dsh ${version} at ${packageDir}: ${APP_BOOT} does not resolve (${error instanceof Error ? error.message.split('\n')[0] : String(error)})`, { cause: error });
|
|
192
|
+
}
|
|
193
|
+
const loaded = await Promise.all(HOST_MODULES.map(spec => importFrom(spec.via === 'app-boot' ? appBootRequire : hostRequire, spec.specifier)));
|
|
194
|
+
const modules = new Map(HOST_MODULES.map((spec, index) => [spec.key, loaded[index]]));
|
|
195
|
+
for (const spec of HOST_MODULES) {
|
|
196
|
+
const module = modules.get(spec.key);
|
|
197
|
+
for (const name of spec.exports) {
|
|
198
|
+
if (module?.[name] === undefined)
|
|
199
|
+
throw new Error(`dsh ${version} at ${packageDir} lacks ${spec.specifier.replace(/^@deepseek-ai\//u, '')}.${name}`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const module = (key) => modules.get(key);
|
|
203
|
+
return {
|
|
204
|
+
packageDir,
|
|
205
|
+
version,
|
|
206
|
+
Context: module('cordis').Context,
|
|
207
|
+
appBoot: module('appBoot'),
|
|
208
|
+
Loader: module('loader').default,
|
|
209
|
+
homePaths: module('homePaths'),
|
|
210
|
+
launchEnvironmentKey: module('launchEnvironment').DSH_LAUNCH_ENVIRONMENT_KEY,
|
|
211
|
+
cmdline: module('cmdline'),
|
|
212
|
+
profileBoot: module('profileBoot'),
|
|
213
|
+
httpProxy: module('httpProxy'),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Build the entry's root from the host's `cordis` and install the host's
|
|
218
|
+
* module resolution on it before any TUI module is imported, so the TUI and
|
|
219
|
+
* the DSH plugins resolve shared packages (react, schemastery, the
|
|
220
|
+
* `@deepseek-ai/*` peers) the same way. Both kernels: otherwise the peers
|
|
221
|
+
* resolve only through `$DSH_HOME/profiles/node_modules`, which a fresh
|
|
222
|
+
* install may not have. The DSH kernel also gets the rest of `runProfile`'s prepare.
|
|
223
|
+
*/
|
|
224
|
+
export async function prepareHostRoot(host, options) {
|
|
225
|
+
const { appBoot, profileBoot } = host;
|
|
226
|
+
// bin.js: the `.env` layers fill unset variables before anything reads them
|
|
227
|
+
// (the dsh-tui row's `!!js process.env.DSH_TUI_*` included).
|
|
228
|
+
const environment = appBoot.loadLayeredEnv(BIN_NAME);
|
|
229
|
+
// 1–2. composeProfile (no `--patch` overlays from the launcher).
|
|
230
|
+
const profile = profileBoot.prepareProfile(options.profile, true, undefined);
|
|
231
|
+
const resolution = await appBoot.createRuntimeResolution({ installAnchor: profileBoot.INSTALL_ANCHOR, profile });
|
|
232
|
+
const rootConfig = join(profile.dir, profileBoot.PROFILE_ROOT_FILENAME);
|
|
233
|
+
// Build the neutral Loader root first: discovery needs its resolver before
|
|
234
|
+
// the final kernel can decide whether DSH-only preparation is appropriate.
|
|
235
|
+
const ctx = new host.Context();
|
|
236
|
+
ctx.baseUrl = pathToFileURL(dirname(rootConfig)).href + '/';
|
|
237
|
+
ctx.provide('dshHomePath', host.homePaths.dshHomePath);
|
|
238
|
+
ctx.on('internal/update', ((_config, _noSave, next) => {
|
|
239
|
+
Promise.resolve(next()).catch((error) => { ctx.logger.error(error); });
|
|
240
|
+
}), { global: true, prepend: true });
|
|
241
|
+
await ctx.plugin(host.Loader, undefined);
|
|
242
|
+
const shutdown = createProcessShutdown(() => ctx.fiber.dispose());
|
|
243
|
+
const appReady = createAppReady();
|
|
244
|
+
let uninstallFailLoud = () => undefined;
|
|
245
|
+
// `startedBundles` names what is really composed.
|
|
246
|
+
const profileContextFor = (startedBundles) => ({
|
|
247
|
+
name: options.profile,
|
|
248
|
+
dir: profile.dir,
|
|
249
|
+
patchPath: profile.patchPath,
|
|
250
|
+
installAnchor: profileBoot.INSTALL_ANCHOR,
|
|
251
|
+
startedBundles: [...startedBundles],
|
|
252
|
+
cwd: process.cwd(),
|
|
253
|
+
home: host.homePaths.resolveDshHome(),
|
|
254
|
+
overlays: [],
|
|
255
|
+
telemetryDisabledEnv: process.env.DSH_TELEMETRY_DISABLED,
|
|
256
|
+
});
|
|
257
|
+
let profileContext;
|
|
258
|
+
let kernelSelected = false;
|
|
259
|
+
try {
|
|
260
|
+
// 6. The resolution hijack (both kernels), before any TUI module loads.
|
|
261
|
+
await ctx.plugin(appBoot.PluginPackages, { resolution });
|
|
262
|
+
}
|
|
263
|
+
catch (error) {
|
|
264
|
+
// The caller falls back to another launch path in this same process:
|
|
265
|
+
// leave nothing of this root behind (runProfile disposes on failure too).
|
|
266
|
+
await ctx.fiber.dispose().catch(() => undefined);
|
|
267
|
+
throw error;
|
|
268
|
+
}
|
|
269
|
+
const selectKernel = async (dsh) => {
|
|
270
|
+
if (kernelSelected)
|
|
271
|
+
throw new Error('dsh-tui: the host kernel was already selected');
|
|
272
|
+
// A light profile needs none of runProfile's DSH-only services. The entry
|
|
273
|
+
// uses the same final answer for its slot and for this composition mode.
|
|
274
|
+
try {
|
|
275
|
+
if (dsh) {
|
|
276
|
+
const disposeProxy = await host.httpProxy.installProxyFromEnvironment(environment, message => { process.stderr.write(`${BIN_NAME}: ${message}\n`); });
|
|
277
|
+
if (disposeProxy !== undefined)
|
|
278
|
+
ctx.effect(() => () => { void Promise.resolve(disposeProxy()).catch(() => undefined); }, 'dsh-tui host proxy');
|
|
279
|
+
// 5. runProfile: fail-loud (removable here, unlike runProfile's).
|
|
280
|
+
uninstallFailLoud = appBoot.installFailLoud(BIN_NAME, process, async () => { await ctx.fiber.dispose(); });
|
|
281
|
+
profileContext = profileContextFor(profile.layers.map(layer => layer.packageName));
|
|
282
|
+
ctx.provide('profileContext', profileContext);
|
|
283
|
+
ctx.provide(host.launchEnvironmentKey, environment);
|
|
284
|
+
// 7. App arguments and the exit / readiness seams.
|
|
285
|
+
host.cmdline.provideCmdline(ctx, {
|
|
286
|
+
args: options.args,
|
|
287
|
+
exit: code => {
|
|
288
|
+
const answer = options.exitSeam?.request?.({ kind: 'code', code }) ?? 'refused';
|
|
289
|
+
if (answer === 'refused')
|
|
290
|
+
void shutdown(code);
|
|
291
|
+
},
|
|
292
|
+
ready: appReady.service,
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
kernelSelected = true;
|
|
296
|
+
}
|
|
297
|
+
catch (error) {
|
|
298
|
+
uninstallFailLoud();
|
|
299
|
+
await ctx.fiber.dispose().catch(() => undefined);
|
|
300
|
+
throw error;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
const mountAndAudit = async (patches, warn, stopping) => {
|
|
304
|
+
// boot(): warnings and errors logged while the tree starts, for the startup report.
|
|
305
|
+
const startupLogs = [];
|
|
306
|
+
const diagnostics = new host.Context();
|
|
307
|
+
diagnostics.logger = ctx.logger;
|
|
308
|
+
diagnostics.logger.exporter({
|
|
309
|
+
levels: { default: 2 },
|
|
310
|
+
export: ({ ts, name, type, args }) => {
|
|
311
|
+
if (type === 'warn' || type === 'error')
|
|
312
|
+
startupLogs.push({ ts, name, type, args });
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
try {
|
|
316
|
+
await appBoot.mountRootInclude(ctx, rootConfig, patches, undefined, BIN_NAME);
|
|
317
|
+
const loader = () => ctx.get('loader');
|
|
318
|
+
await loader()?.await();
|
|
319
|
+
// Disposed or about to be: no audit, and no readiness (HMR would start
|
|
320
|
+
// its profile refresh on a dying tree).
|
|
321
|
+
if (loader() === undefined || stopping())
|
|
322
|
+
return;
|
|
323
|
+
await appBoot.auditStartupEntries(ctx, BIN_NAME, warn);
|
|
324
|
+
if (ctx.fiber.state === FIBER_ACTIVE && loader() !== undefined && !stopping())
|
|
325
|
+
appReady.commit();
|
|
326
|
+
}
|
|
327
|
+
catch (error) {
|
|
328
|
+
// Unlike bin.js, a report is saved for every failure (the screen
|
|
329
|
+
// stays up and shows its path).
|
|
330
|
+
if (error instanceof appBoot.StartupError) {
|
|
331
|
+
Object.defineProperty(error, 'startup', { value: { configurationPath: rootConfig, messages: startupLogs }, enumerable: false, configurable: true, writable: true });
|
|
332
|
+
}
|
|
333
|
+
const logPath = await writeStartupReport(error, {
|
|
334
|
+
home: host.homePaths.resolveDshHome(),
|
|
335
|
+
version: hostVersion(host),
|
|
336
|
+
profile: options.profile,
|
|
337
|
+
...(error instanceof appBoot.StartupError ? {} : { configurationPath: rootConfig, messages: startupLogs }),
|
|
338
|
+
});
|
|
339
|
+
throw new HostComposeError(error, logPath);
|
|
340
|
+
}
|
|
341
|
+
finally {
|
|
342
|
+
await diagnostics.fiber.dispose().catch(() => undefined);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
return {
|
|
346
|
+
ctx,
|
|
347
|
+
selectKernel,
|
|
348
|
+
uninstallFailLoud: () => { uninstallFailLoud(); },
|
|
349
|
+
kernelVersion: hostVersion(host),
|
|
350
|
+
async compose(warn, stopping = () => false) {
|
|
351
|
+
if (!kernelSelected)
|
|
352
|
+
throw new Error('dsh-tui: select the host kernel before composing its profile');
|
|
353
|
+
if (profileContext !== undefined) {
|
|
354
|
+
await mountAndAudit(appBoot.readProfilePatches(BIN_NAME, profileContext, profile), warn, stopping);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
const plan = liteProfilePlan(profile);
|
|
358
|
+
if (!plan.trimmed) {
|
|
359
|
+
// Nothing to trim: composing the layers is the full composition, and
|
|
360
|
+
// not fatal (the screen is mounted; failing would cost every plugin).
|
|
361
|
+
warn(`dsh-tui: light profile: ${options.profile} lists none of ${LITE_PROFILE_EXCLUDED_BUNDLES.join(', ')}; composing it whole but the dsh-tui row\n`);
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
warn(`dsh-tui: light profile: ${plan.excluded.join(', ')} left out of ${profile.layers.length} bundles; disabled ${plan.disableRows.map(row => row.id).join(', ')} (their injected services come from the excluded bundles)\n`);
|
|
365
|
+
}
|
|
366
|
+
// The trimmed layers' patches, then the disable rows applied last (a
|
|
367
|
+
// static disable in cordis.patch.yml would also hit the DSH kernel).
|
|
368
|
+
const patches = appBoot.readProfilePatches(BIN_NAME, profileContextFor(plan.layers.map(layer => layer.packageName)), { ...profile, layers: [...plan.layers] });
|
|
369
|
+
patches.push(...plan.disableRows);
|
|
370
|
+
await mountAndAudit(patches, warn, stopping);
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
/** A composition failure, with the startup report saved for it. */
|
|
375
|
+
export class HostComposeError extends Error {
|
|
376
|
+
original;
|
|
377
|
+
logPath;
|
|
378
|
+
constructor(original, logPath) {
|
|
379
|
+
super(original instanceof Error ? original.message : String(original), { cause: original });
|
|
380
|
+
this.original = original;
|
|
381
|
+
this.name = 'HostComposeError';
|
|
382
|
+
this.logPath = logPath;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
function hostVersion(host) {
|
|
386
|
+
try {
|
|
387
|
+
return host.appBoot.getDshRuntimeVersion();
|
|
388
|
+
}
|
|
389
|
+
catch {
|
|
390
|
+
return host.version;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* dsh `bin.js` reportStartupFailure (0.2.1-rc.2), the file half only: the
|
|
395
|
+
* screen is up, so never stderr. Undefined when it could not be written.
|
|
396
|
+
*/
|
|
397
|
+
async function writeStartupReport(error, context) {
|
|
398
|
+
const now = new Date().toISOString();
|
|
399
|
+
const report = 'WARNING: Raw diagnostics may contain configuration or credential values from plugin errors. Review before sharing.\n\n' + inspect({
|
|
400
|
+
timestamp: now,
|
|
401
|
+
dshVersion: context.version,
|
|
402
|
+
nodeVersion: process.version,
|
|
403
|
+
platform: process.platform,
|
|
404
|
+
arch: process.arch,
|
|
405
|
+
profile: context.profile,
|
|
406
|
+
...(context.configurationPath === undefined ? {} : { startup: { configurationPath: context.configurationPath, messages: context.messages ?? [] } }),
|
|
407
|
+
error,
|
|
408
|
+
}, {
|
|
409
|
+
depth: null,
|
|
410
|
+
maxArrayLength: null,
|
|
411
|
+
maxStringLength: null,
|
|
412
|
+
showHidden: true,
|
|
413
|
+
customInspect: false,
|
|
414
|
+
getters: false,
|
|
415
|
+
colors: false,
|
|
416
|
+
}) + '\n';
|
|
417
|
+
const logDir = join(context.home, 'logs');
|
|
418
|
+
const logPath = join(logDir, `startup-${now.replaceAll(':', '-')}-${randomUUID()}.log`);
|
|
419
|
+
try {
|
|
420
|
+
await mkdir(logDir, { recursive: true, mode: 0o700 });
|
|
421
|
+
await writeFile(logPath, report, { flag: 'wx', mode: 0o600 });
|
|
422
|
+
}
|
|
423
|
+
catch {
|
|
424
|
+
return undefined;
|
|
425
|
+
}
|
|
426
|
+
return logPath;
|
|
427
|
+
}
|
|
428
|
+
/** dsh `profile-boot` createAppReady (0.2.1-rc.2). */
|
|
429
|
+
function createAppReady() {
|
|
430
|
+
let ready = false;
|
|
431
|
+
const listeners = new Set();
|
|
432
|
+
return {
|
|
433
|
+
service: {
|
|
434
|
+
onReady(listener) {
|
|
435
|
+
if (ready) {
|
|
436
|
+
listener();
|
|
437
|
+
return () => undefined;
|
|
438
|
+
}
|
|
439
|
+
listeners.add(listener);
|
|
440
|
+
return () => { listeners.delete(listener); };
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
commit() {
|
|
444
|
+
if (ready)
|
|
445
|
+
return;
|
|
446
|
+
ready = true;
|
|
447
|
+
for (const listener of [...listeners])
|
|
448
|
+
listener();
|
|
449
|
+
listeners.clear();
|
|
450
|
+
},
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
/** dsh `process-shutdown` createProcessShutdown (0.2.1-rc.2), the `shutdown` half only. */
|
|
454
|
+
function createProcessShutdown(dispose, timeoutMs = PROCESS_SHUTDOWN_TIMEOUT_MS) {
|
|
455
|
+
let pending;
|
|
456
|
+
let settled = false;
|
|
457
|
+
return code => {
|
|
458
|
+
if (pending !== undefined)
|
|
459
|
+
return pending;
|
|
460
|
+
const timer = setTimeout(() => {
|
|
461
|
+
if (settled)
|
|
462
|
+
return;
|
|
463
|
+
settled = true;
|
|
464
|
+
process.exit(code);
|
|
465
|
+
}, timeoutMs);
|
|
466
|
+
pending = Promise.resolve().then(dispose).then(() => {
|
|
467
|
+
if (settled)
|
|
468
|
+
return;
|
|
469
|
+
settled = true;
|
|
470
|
+
clearTimeout(timer);
|
|
471
|
+
process.exitCode = code;
|
|
472
|
+
}, () => {
|
|
473
|
+
if (settled)
|
|
474
|
+
return;
|
|
475
|
+
settled = true;
|
|
476
|
+
clearTimeout(timer);
|
|
477
|
+
process.exit(code);
|
|
478
|
+
});
|
|
479
|
+
return pending;
|
|
480
|
+
};
|
|
481
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
//# sourceMappingURL=host-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-entry.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/host-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,8BAA8B,CAAA"}
|