@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
package/lib/types/update.js
CHANGED
|
@@ -4,18 +4,24 @@ import { appendFileSync, chmodSync, copyFileSync, existsSync, lstatSync, mkdirSy
|
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { dirname, join, resolve, sep } from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
|
-
|
|
7
|
+
// Per-function imports: this file loads before the first frame.
|
|
8
|
+
import gt from 'semver/functions/gt.js';
|
|
9
|
+
import gte from 'semver/functions/gte.js';
|
|
10
|
+
import lt from 'semver/functions/lt.js';
|
|
11
|
+
import valid from 'semver/functions/valid.js';
|
|
8
12
|
import { shellQuote } from './utils/shellQuote.js';
|
|
9
13
|
import { DATA_DIR } from './utils/paths.js';
|
|
10
14
|
import { stripResumeArgs } from './sessionHistory.js';
|
|
11
|
-
import { KERNEL_SWITCH_HANDOFF_ENV,
|
|
15
|
+
import { HOST_ENTRY_PATH_ENV, KERNEL_SWITCH_HANDOFF_ENV, RESUME_BACKEND_ENV, RESUME_RETRY_ENV, hostEntryDisabled, parseBackendId } from './kernelPrefs.js';
|
|
12
16
|
import { classifyReplacementOutcome, formatHandoffNotice, handoffEventTag, writeHandoffStage } from './handoffEvents.js';
|
|
13
17
|
import { HANDOFF_ACK_FD_ENV, HANDOFF_ATTEMPT_ENV, HANDOFF_SCREEN_ENV, parseHandoffAckLine } from './handoffAck.js';
|
|
14
18
|
import { DISABLE_KITTY_KEYBOARD, DISABLE_MODIFY_OTHER_KEYS, DISABLE_WIN32_INPUT_MODE } from './ink/termio/csi.js';
|
|
15
19
|
import { DBP, DFE, DISABLE_MOUSE_TRACKING, EXIT_ALT_SCREEN, SHOW_CURSOR } from './ink/termio/dec.js';
|
|
20
|
+
import { detachHandoffStdin } from './ink/stdin-handoff.js';
|
|
16
21
|
// Re-exported for scripts/verify-update.mjs and the bin launcher, which reads
|
|
17
22
|
// the compiled copy at lib/types/utils/shellQuote.js.
|
|
18
23
|
export { shellQuote };
|
|
24
|
+
export { detachHandoffStdin };
|
|
19
25
|
const PACKAGE_NAME = '@deepseek-harness-tui/dsh-tui';
|
|
20
26
|
const DEFAULT_REGISTRY = 'https://registry.npmjs.org';
|
|
21
27
|
const GITHUB_REPO = 'ccch1mneyyy/dsh-TUI';
|
|
@@ -39,6 +45,12 @@ const UPDATED_FROM_ENV = 'DSH_TUI_UPDATED_FROM';
|
|
|
39
45
|
* (ordinary launches stay silent, so the file is restart-only evidence).
|
|
40
46
|
*/
|
|
41
47
|
const RESTART_CHILD_ENV = 'DSH_TUI_RESTART_CHILD';
|
|
48
|
+
/**
|
|
49
|
+
* env marker on every replacement (/restart, /update, kernel switch): it is
|
|
50
|
+
* started with the original app arguments, so a command-line prompt in them
|
|
51
|
+
* was already sent by the first process and must not be sent again.
|
|
52
|
+
*/
|
|
53
|
+
export const LAUNCH_PROMPT_SENT_ENV = 'DSH_TUI_LAUNCH_PROMPT_SENT';
|
|
42
54
|
/**
|
|
43
55
|
* Field-diagnosis log for the /restart terminal handoff, appended by BOTH
|
|
44
56
|
* processes: the exiting TUI logs the funnel path, the spawned replacement
|
|
@@ -118,14 +130,19 @@ export function readLastRunRecord(file = LAST_RUN_FILE) {
|
|
|
118
130
|
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
119
131
|
return undefined;
|
|
120
132
|
const record = parsed;
|
|
121
|
-
|
|
133
|
+
// The syntax gate only: this module is also loaded by the launcher's retry
|
|
134
|
+
// path, which must not pull the registry (and cannot, without compiled
|
|
135
|
+
// modules). A record naming an uninstalled plugin reads back fine — the boot
|
|
136
|
+
// then falls back to dsh with a warning, like any unknown value (P0 D1).
|
|
137
|
+
const backendId = parseBackendId(record.backendId);
|
|
138
|
+
if (backendId === undefined)
|
|
122
139
|
return undefined;
|
|
123
140
|
if (typeof record.sessionId !== 'string' || typeof record.cwd !== 'string' || typeof record.attemptId !== 'string')
|
|
124
141
|
return undefined;
|
|
125
142
|
if (typeof record.updatedAt !== 'number' || !Number.isFinite(record.updatedAt))
|
|
126
143
|
return undefined;
|
|
127
144
|
return {
|
|
128
|
-
backendId
|
|
145
|
+
backendId,
|
|
129
146
|
sessionId: record.sessionId,
|
|
130
147
|
cwd: record.cwd,
|
|
131
148
|
attemptId: record.attemptId,
|
|
@@ -902,6 +919,9 @@ export async function resolveTuiUpdateTarget() {
|
|
|
902
919
|
* or blocks the interactive TUI.
|
|
903
920
|
*/
|
|
904
921
|
export async function checkForTuiUpdate() {
|
|
922
|
+
// Callers start this during the first render; the first `fetch()` loads
|
|
923
|
+
// undici synchronously, so yield first and let that cost land after the frame.
|
|
924
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
905
925
|
const target = await resolveTuiUpdateTarget();
|
|
906
926
|
return target.kind === 'update'
|
|
907
927
|
? {
|
|
@@ -1001,7 +1021,11 @@ function allowBuildsKeyLine(key) {
|
|
|
1001
1021
|
* ERR_PNPM_IGNORED_BUILDS diagnostic stays the visible fallback.
|
|
1002
1022
|
*/
|
|
1003
1023
|
export function ensureProfileAllowBuilds(profile) {
|
|
1004
|
-
|
|
1024
|
+
return ensureWorkspaceAllowBuilds(profileWorkspaceYamlPath(profile));
|
|
1025
|
+
}
|
|
1026
|
+
/** Path-based core of {@link ensureProfileAllowBuilds} for callers that hold
|
|
1027
|
+
* the profile directory itself (the Claude SDK installer's heal pass). */
|
|
1028
|
+
export function ensureWorkspaceAllowBuilds(yamlPath) {
|
|
1005
1029
|
try {
|
|
1006
1030
|
if (!existsSafe(dirname(yamlPath)))
|
|
1007
1031
|
return undefined;
|
|
@@ -1174,6 +1198,51 @@ export function ensureProfileReleaseAgeExclude(profile, version, alsoExempt) {
|
|
|
1174
1198
|
return undefined;
|
|
1175
1199
|
}
|
|
1176
1200
|
}
|
|
1201
|
+
/**
|
|
1202
|
+
* pnpm resolves its content-addressable store from the environment when no
|
|
1203
|
+
* explicit setting exists: a pnpm run under a redirected \u0060XDG_DATA_HOME\u0060
|
|
1204
|
+
* (sandbox, relay, container) silently records THAT location in the
|
|
1205
|
+
* profile's \u0060node_modules/.modules.yaml\u0060, and every later pnpm run in the
|
|
1206
|
+
* profile — dsh's own updates, plugin installs, the Claude SDK wizard —
|
|
1207
|
+
* dies with ERR_PNPM_UNEXPECTED_STORE until node_modules is rebuilt by
|
|
1208
|
+
* hand. Pin \u0060storeDir\u0060 in the profile's pnpm-workspace.yaml so all of them
|
|
1209
|
+
* resolve the same store whatever the environment says. The value is
|
|
1210
|
+
* relative on purpose: pnpm resolves it against the workspace file\u0027s
|
|
1211
|
+
* directory, landing on \u0060<dsh home>/.pnpm-store\u0060 beside the profiles root
|
|
1212
|
+
* for every user and surviving a relocated \u0060DSH_HOME\u0060. Same best-effort,
|
|
1213
|
+
* idempotent pattern as {@link ensureProfileAllowBuilds}: an existing
|
|
1214
|
+
* top-level \u0060storeDir:\u0060 is never overwritten (an explicit user decision
|
|
1215
|
+
* wins), a missing file is created, and any failure resolves to undefined —
|
|
1216
|
+
* pnpm's own diagnostic stays the visible fallback, and the installer's
|
|
1217
|
+
* store-mismatch self-heal catches what a failed pin leaves behind.
|
|
1218
|
+
*/
|
|
1219
|
+
export function ensureWorkspaceStoreDir(yamlPath) {
|
|
1220
|
+
try {
|
|
1221
|
+
if (!existsSafe(dirname(yamlPath)))
|
|
1222
|
+
return undefined;
|
|
1223
|
+
let text = '';
|
|
1224
|
+
try {
|
|
1225
|
+
text = readFileSync(yamlPath, 'utf8');
|
|
1226
|
+
}
|
|
1227
|
+
catch {
|
|
1228
|
+
// Missing file — start from an empty document; writeFileSync creates it.
|
|
1229
|
+
}
|
|
1230
|
+
const lines = text.split(/\r?\n/u);
|
|
1231
|
+
for (const line of lines) {
|
|
1232
|
+
if (line !== '' && line === line.trimStart() && /^storeDir:/u.test(line)) {
|
|
1233
|
+
return { changed: false };
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
if (lines.length > 0 && lines[lines.length - 1] !== '')
|
|
1237
|
+
lines.push('');
|
|
1238
|
+
lines.push('storeDir: ../../.pnpm-store');
|
|
1239
|
+
writeFileSync(yamlPath, `${lines.join('\n')}\n`);
|
|
1240
|
+
return { changed: true };
|
|
1241
|
+
}
|
|
1242
|
+
catch {
|
|
1243
|
+
return undefined;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1177
1246
|
function existsSafe(path) {
|
|
1178
1247
|
try {
|
|
1179
1248
|
statSync(path);
|
|
@@ -1681,7 +1750,9 @@ export async function updateTui(profile, targetVersion) {
|
|
|
1681
1750
|
* @param kernel - The kernel this process runs (TuiRestartOptions.kernel).
|
|
1682
1751
|
* @returns Exit codes for the update run and the replacement process.
|
|
1683
1752
|
*/
|
|
1684
|
-
export async function updateTuiAndRestart(sessionId, profile, targetVersion, kernel
|
|
1753
|
+
export async function updateTuiAndRestart(sessionId, profile, targetVersion, kernel,
|
|
1754
|
+
/** The standalone entry's supervision hooks (TuiRestartOptions.onSpawn / onTerminationSignal). */
|
|
1755
|
+
supervision = {}) {
|
|
1685
1756
|
const outcome = await updateTui(profile, targetVersion);
|
|
1686
1757
|
const { updatedFrom } = outcome;
|
|
1687
1758
|
if (outcome.code !== 0)
|
|
@@ -1697,6 +1768,7 @@ export async function updateTuiAndRestart(sessionId, profile, targetVersion, ker
|
|
|
1697
1768
|
env: { [UPDATED_FROM_ENV]: updatedFrom },
|
|
1698
1769
|
kind: 'update',
|
|
1699
1770
|
...(kernel === undefined ? {} : { kernel }),
|
|
1771
|
+
...supervision,
|
|
1700
1772
|
});
|
|
1701
1773
|
return { updateCode: 0, restartCode };
|
|
1702
1774
|
}
|
|
@@ -1762,33 +1834,6 @@ export async function cliUpdate(profile) {
|
|
|
1762
1834
|
}
|
|
1763
1835
|
return outcome.code;
|
|
1764
1836
|
}
|
|
1765
|
-
/**
|
|
1766
|
-
* Release the shared console for the replacement without resetting it.
|
|
1767
|
-
*
|
|
1768
|
-
* A pty's termios is per-DEVICE: destroying this stream would write this
|
|
1769
|
-
* process's saved cooked/ECHO mode back over the replacement's raw mode
|
|
1770
|
-
* (libuv restores orig_termios on tty close; verified on Node 24 — mouse
|
|
1771
|
-
* reports then echo as `^[[<…M` and keys wait for a newline). Detaching —
|
|
1772
|
-
* no readers, paused, unref'd — keeps the mode untouched.
|
|
1773
|
-
*
|
|
1774
|
-
* Two deliberate trade-offs vs the old destroy():
|
|
1775
|
-
* - destroy() doubled as a permanent gate ("a destroyed stream can never be
|
|
1776
|
-
* resumed"). Readers removed + paused already keep this process out of the
|
|
1777
|
-
* console's key path (#284/#307), and after the handoff only the
|
|
1778
|
-
* child-exit listener remains here — nothing re-attaches a reader.
|
|
1779
|
-
* - On exit Node still writes the saved cooked mode back once (atexit
|
|
1780
|
-
* uv_tty_reset_mode). Fine in the normal order — this process outlives the
|
|
1781
|
-
* replacement, and the shell wants cooked back anyway; it only bites if
|
|
1782
|
-
* this process dies while the replacement is still running.
|
|
1783
|
-
*
|
|
1784
|
-
* @param stdin - Console stream to detach; injectable for the regression.
|
|
1785
|
-
*/
|
|
1786
|
-
export function detachHandoffStdin(stdin = process.stdin) {
|
|
1787
|
-
stdin.removeAllListeners('readable');
|
|
1788
|
-
stdin.removeAllListeners('data');
|
|
1789
|
-
stdin.pause();
|
|
1790
|
-
stdin.unref();
|
|
1791
|
-
}
|
|
1792
1837
|
/**
|
|
1793
1838
|
* The replacement's env, pure: the resume marker, the /restart child stamp,
|
|
1794
1839
|
* the caller's extra markers and the kernel-switch overrides. Exported for
|
|
@@ -1803,8 +1848,13 @@ export function restartChildEnv(parentEnv, sessionId, kind, options) {
|
|
|
1803
1848
|
// Marks the replacement so its own boot logs to restart.log without
|
|
1804
1849
|
// noisy logging on every ordinary launch (/restart only).
|
|
1805
1850
|
...(kind === 'restart' ? { [RESTART_CHILD_ENV]: '1' } : {}),
|
|
1851
|
+
[LAUNCH_PROMPT_SENT_ENV]: '1',
|
|
1806
1852
|
...options.env,
|
|
1807
1853
|
};
|
|
1854
|
+
// The Config schema preserves '', so an absent session must be represented
|
|
1855
|
+
// by removing the marker, including one inherited from the previous launch.
|
|
1856
|
+
if (sessionId === '')
|
|
1857
|
+
delete childEnv.DSH_TUI_RESUME_SESSION;
|
|
1808
1858
|
// A stale handoff override never leaks into a plain replacement: the var is
|
|
1809
1859
|
// one-shot (consumed at this process's own boot), and a child that is NOT
|
|
1810
1860
|
// switching kernels keeps this process's kernel by config/env/memory as
|
|
@@ -1816,6 +1866,16 @@ export function restartChildEnv(parentEnv, sessionId, kind, options) {
|
|
|
1816
1866
|
delete childEnv[HANDOFF_SCREEN_ENV];
|
|
1817
1867
|
delete childEnv[HANDOFF_ACK_FD_ENV];
|
|
1818
1868
|
delete childEnv[HANDOFF_ATTEMPT_ENV];
|
|
1869
|
+
// A derived resume target's provenance is never inherited: whatever survives
|
|
1870
|
+
// here was built by THIS process, and on a kernel switch even the target itself
|
|
1871
|
+
// goes (below). Keeping a stale mark would make the replacement revoke a target
|
|
1872
|
+
// nobody derived (see resolveResumeTarget in kernelPrefs.ts).
|
|
1873
|
+
delete childEnv[RESUME_BACKEND_ENV];
|
|
1874
|
+
// Same for the safe-mode retry marker: "this boot is a retry" describes the
|
|
1875
|
+
// process the launcher spawned, not the replacement it spawns now. The boot
|
|
1876
|
+
// consumes it on read anyway — this keeps a replacement honest even if one is
|
|
1877
|
+
// ever built from an env that still carries it.
|
|
1878
|
+
delete childEnv[RESUME_RETRY_ENV];
|
|
1819
1879
|
if (options.backend === undefined && options.kernel !== undefined)
|
|
1820
1880
|
childEnv[KERNEL_SWITCH_HANDOFF_ENV] = options.kernel;
|
|
1821
1881
|
if (options.backend !== undefined) {
|
|
@@ -1832,15 +1892,33 @@ export function restartChildEnv(parentEnv, sessionId, kind, options) {
|
|
|
1832
1892
|
}
|
|
1833
1893
|
return childEnv;
|
|
1834
1894
|
}
|
|
1895
|
+
/**
|
|
1896
|
+
* The replacement's argv after `process.execPath`, pure: the same script and
|
|
1897
|
+
* arguments again, except that a replacement started outside the entry goes
|
|
1898
|
+
* to `hostEntry` with the app arguments (the entry hosts every kernel).
|
|
1899
|
+
*/
|
|
1900
|
+
export function restartArgv(input) {
|
|
1901
|
+
const strip = (args) => input.switching || input.fresh === true ? stripResumeArgs(args) : [...args];
|
|
1902
|
+
const script = input.argv[1];
|
|
1903
|
+
if (input.hostEntry !== undefined && script !== input.hostEntry) {
|
|
1904
|
+
// The app arguments: everything after dsh's own `--`.
|
|
1905
|
+
const separator = input.argv.indexOf('--', 2);
|
|
1906
|
+
const appArgs = separator === -1 ? [] : input.argv.slice(separator + 1);
|
|
1907
|
+
return [...input.execArgv, input.hostEntry, ...strip(appArgs)];
|
|
1908
|
+
}
|
|
1909
|
+
return [...input.execArgv, ...strip(input.argv.slice(1))];
|
|
1910
|
+
}
|
|
1835
1911
|
export async function restartTui(sessionId, options = {}) {
|
|
1836
1912
|
const kind = options.kind ?? 'restart';
|
|
1837
1913
|
const tag = options.backend !== undefined ? 'backend-switch' : kind === 'update' ? 'update-restart' : 'restart';
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1914
|
+
const hostEntry = process.env[HOST_ENTRY_PATH_ENV];
|
|
1915
|
+
const argv = restartArgv({
|
|
1916
|
+
execArgv: process.execArgv,
|
|
1917
|
+
argv: process.argv,
|
|
1918
|
+
switching: options.backend !== undefined,
|
|
1919
|
+
fresh: sessionId === '',
|
|
1920
|
+
hostEntry: hostEntry === undefined || hostEntry === '' || hostEntryDisabled() ? undefined : hostEntry,
|
|
1921
|
+
});
|
|
1844
1922
|
logRestartEvent(`${tag}: spawning replacement`, {
|
|
1845
1923
|
node: process.execPath,
|
|
1846
1924
|
argv,
|
|
@@ -1866,7 +1944,7 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1866
1944
|
// "Starting X…" goes out before the spawn, waiting for the write callback
|
|
1867
1945
|
// so it lands before the replacement draws anything.
|
|
1868
1946
|
if (options.backend !== undefined) {
|
|
1869
|
-
await writeHandoffStage(process.stdout, formatHandoffNotice('stage-start', { name:
|
|
1947
|
+
await writeHandoffStage(process.stdout, formatHandoffNotice('stage-start', { name: options.backendName ?? options.backend, color: process.stdout.isTTY === true }) + '\n');
|
|
1870
1948
|
logRestartEvent(handoffEventTag('stage-start'), { backend: options.backend, ...(attemptId === undefined ? {} : { attemptId }) });
|
|
1871
1949
|
}
|
|
1872
1950
|
return new Promise(resolve => {
|
|
@@ -1878,6 +1956,9 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1878
1956
|
childEnv[HANDOFF_ATTEMPT_ENV] = attemptId;
|
|
1879
1957
|
logRestartEvent('handoff: alt-screen bracket held for the replacement', { attemptId });
|
|
1880
1958
|
}
|
|
1959
|
+
// Reassert after root disposal: even a late drain must not restart the
|
|
1960
|
+
// parent's native stdin read before the replacement probes the terminal.
|
|
1961
|
+
detachHandoffStdin();
|
|
1881
1962
|
const child = spawn(process.execPath, argv, {
|
|
1882
1963
|
env: childEnv,
|
|
1883
1964
|
// stdin/stdout stay inherited so the replacement owns the console the
|
|
@@ -1930,6 +2011,7 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1930
2011
|
ackWatch.unref();
|
|
1931
2012
|
}
|
|
1932
2013
|
logRestartEvent(`${tag}: replacement spawned`, { childPid: child.pid, ...(options.backend === undefined ? {} : { backend: options.backend }) });
|
|
2014
|
+
options.onSpawn?.(child);
|
|
1933
2015
|
// Handoff watchdog (field evidence 2026-08-24: restarted TUI mounts but
|
|
1934
2016
|
// takes no input). Two jobs, both diagnosis-grade:
|
|
1935
2017
|
// 1. SAMPLE this process's stdin state every second — if anything
|
|
@@ -1995,7 +2077,7 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
1995
2077
|
// not a crash.
|
|
1996
2078
|
logRestartEvent(handoffEventTag('failed'), { reason: 'spawn-error', message: error.message });
|
|
1997
2079
|
writeHandoffNotice(formatHandoffNotice('failed', {
|
|
1998
|
-
name:
|
|
2080
|
+
name: options.backendName ?? options.backend,
|
|
1999
2081
|
reason: 'spawn-error',
|
|
2000
2082
|
safeHint: true,
|
|
2001
2083
|
color: process.stderr.isTTY === true,
|
|
@@ -2015,6 +2097,12 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
2015
2097
|
signal: signal ?? null,
|
|
2016
2098
|
elapsedMs,
|
|
2017
2099
|
});
|
|
2100
|
+
// A replacement that took the screen over and died by a signal: the hook
|
|
2101
|
+
// may end this process by that signal. Before a handoff's first frame this
|
|
2102
|
+
// process still holds the screen, so the failure path below restores it.
|
|
2103
|
+
if (signal !== null && options.onTerminationSignal !== undefined && (!handoff || ackReadyAt !== undefined)) {
|
|
2104
|
+
options.onTerminationSignal(signal);
|
|
2105
|
+
}
|
|
2018
2106
|
if (options.backend !== undefined) {
|
|
2019
2107
|
// Kernel switch outcome: success is quiet (restart.log only), a
|
|
2020
2108
|
// replacement that never came up is a yellow failure with the session
|
|
@@ -2037,7 +2125,7 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
2037
2125
|
restoreHandoffScreen();
|
|
2038
2126
|
const suffix = childStderr.trim() === '' ? '' : `\n${childStderr.trimEnd()}`;
|
|
2039
2127
|
writeHandoffNotice(formatHandoffNotice('failed', {
|
|
2040
|
-
name:
|
|
2128
|
+
name: options.backendName ?? options.backend,
|
|
2041
2129
|
reason: outcome.reason,
|
|
2042
2130
|
safeHint: true,
|
|
2043
2131
|
color: process.stderr.isTTY === true,
|
|
@@ -2049,7 +2137,7 @@ export async function restartTui(sessionId, options = {}) {
|
|
|
2049
2137
|
if (handoff && signal !== null)
|
|
2050
2138
|
restoreHandoffScreen();
|
|
2051
2139
|
writeHandoffNotice('\n' + formatHandoffNotice('crashed', {
|
|
2052
|
-
name:
|
|
2140
|
+
name: options.backendName ?? options.backend,
|
|
2053
2141
|
code: outcome.code,
|
|
2054
2142
|
safeHint: true,
|
|
2055
2143
|
color: process.stderr.isTTY === true,
|
package/lib/types/utils/bmp.d.ts
CHANGED
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
* bottom-up or top-down. Anything else returns null and the caller keeps its
|
|
8
8
|
* "format unsupported" path.
|
|
9
9
|
*/
|
|
10
|
+
/**
|
|
11
|
+
* Whether the bytes open like a bitmap: a `BM` file, or a headerless DIB —
|
|
12
|
+
* the shape an X11 or Windows clipboard owner hands over. Structural only;
|
|
13
|
+
* {@link bmpToPng} still does the real validation, so a false positive costs
|
|
14
|
+
* one refused conversion and nothing else.
|
|
15
|
+
*/
|
|
16
|
+
export declare function looksLikeBitmap(bytes: Uint8Array): boolean;
|
|
10
17
|
/**
|
|
11
18
|
* Convert BMP bytes (a `BM` file, or a headerless DIB) to PNG.
|
|
12
19
|
* @param bmp - Raw clipboard bytes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmEH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAa1D;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4FlE"}
|
package/lib/types/utils/bmp.js
CHANGED
|
@@ -51,6 +51,33 @@ async function encodePng(width, height, channels, pixels) {
|
|
|
51
51
|
pngChunk('IEND', Buffer.alloc(0)),
|
|
52
52
|
]);
|
|
53
53
|
}
|
|
54
|
+
/** DIB header sizes a bitmap can carry: the OS/2 core header (12), the
|
|
55
|
+
* BITMAPINFOHEADER (40), its three V2/V3 extensions (52/56/64) and the V4/V5
|
|
56
|
+
* headers (108/124). */
|
|
57
|
+
const DIB_HEADER_SIZES = new Set([12, 40, 52, 56, 64, 108, 124]);
|
|
58
|
+
/**
|
|
59
|
+
* Whether the bytes open like a bitmap: a `BM` file, or a headerless DIB —
|
|
60
|
+
* the shape an X11 or Windows clipboard owner hands over. Structural only;
|
|
61
|
+
* {@link bmpToPng} still does the real validation, so a false positive costs
|
|
62
|
+
* one refused conversion and nothing else.
|
|
63
|
+
*/
|
|
64
|
+
export function looksLikeBitmap(bytes) {
|
|
65
|
+
if (bytes.length >= 2 && bytes[0] === 0x42 && bytes[1] === 0x4d)
|
|
66
|
+
return true;
|
|
67
|
+
if (bytes.length < 16)
|
|
68
|
+
return false;
|
|
69
|
+
const headerSize = (bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24)) >>> 0;
|
|
70
|
+
if (!DIB_HEADER_SIZES.has(headerSize))
|
|
71
|
+
return false;
|
|
72
|
+
// The OS/2 core header is 12 bytes and puts planes/depth earlier than the
|
|
73
|
+
// Windows headers do. Planes is 1 in every real bitmap, and the depth must
|
|
74
|
+
// be one BMP defines.
|
|
75
|
+
const windowsHeader = headerSize !== 12;
|
|
76
|
+
const planes = windowsHeader ? bytes[12] | (bytes[13] << 8) : bytes[8] | (bytes[9] << 8);
|
|
77
|
+
const bpp = windowsHeader ? bytes[14] | (bytes[15] << 8) : bytes[10] | (bytes[11] << 8);
|
|
78
|
+
return planes === 1
|
|
79
|
+
&& (bpp === 1 || bpp === 4 || bpp === 8 || bpp === 16 || bpp === 24 || bpp === 32);
|
|
80
|
+
}
|
|
54
81
|
/**
|
|
55
82
|
* Convert BMP bytes (a `BM` file, or a headerless DIB) to PNG.
|
|
56
83
|
* @param bmp - Raw clipboard bytes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootTrace.d.ts","sourceRoot":"","sources":["../../../src/utils/bootTrace.ts"],"names":[],"mappings":"AAUA,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQ3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Opt-in boot timeline for startup measurements. With
|
|
3
|
+
* `DSH_TUI_BOOT_TRACE=<file>` each mark appends one JSON line to that file:
|
|
4
|
+
* `{"mark","ms","at","pid"}`, where `ms` counts from this process's start and
|
|
5
|
+
* `at` is the wall clock (for lining up with the launcher). Otherwise it does
|
|
6
|
+
* nothing. Never writes to stdout/stderr.
|
|
7
|
+
*/
|
|
8
|
+
import { appendFileSync } from 'node:fs';
|
|
9
|
+
import { performance } from 'node:perf_hooks';
|
|
10
|
+
export function markBoot(mark) {
|
|
11
|
+
const file = process.env.DSH_TUI_BOOT_TRACE;
|
|
12
|
+
if (file === undefined || file === '')
|
|
13
|
+
return;
|
|
14
|
+
try {
|
|
15
|
+
appendFileSync(file, `${JSON.stringify({ mark, ms: Math.round(performance.now()), at: Date.now(), pid: process.pid })}\n`);
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// A measurement aid must never affect the boot.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAeH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA;AAE5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAWD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYtE;
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAeH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA;AAE5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAWD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYtE;AAyDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAS9C;AAufD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAStD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAG5C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAcvE"}
|
|
@@ -148,9 +148,16 @@ const IMAGE_EXTENSIONS = {
|
|
|
148
148
|
'image/gif': '.gif',
|
|
149
149
|
'image/webp': '.webp',
|
|
150
150
|
'image/bmp': '.bmp',
|
|
151
|
+
'image/x-bmp': '.bmp',
|
|
152
|
+
'image/x-ms-bmp': '.bmp',
|
|
153
|
+
'image/vnd.microsoft.bitmap': '.bmp',
|
|
151
154
|
'image/tiff': '.tiff',
|
|
152
155
|
'image/svg+xml': '.svg',
|
|
153
156
|
};
|
|
157
|
+
/** Every MIME spelling a bitmap copy arrives under — Windows, WSLg and X11
|
|
158
|
+
* owners disagree on it, and all of them go to the dependency-free
|
|
159
|
+
* converter, so the paste does not depend on which spelling won. */
|
|
160
|
+
const BMP_MEDIA_TYPES = /^image\/(?:x-ms-|x-|vnd\.microsoft\.)?bmp$/iu;
|
|
154
161
|
// Per-process private directory for exported clipboard images, created
|
|
155
162
|
// lazily on the first image paste. mkdtemp guarantees a fresh,
|
|
156
163
|
// unpredictably-named directory; mode 0700 keeps other local users out of
|
|
@@ -269,9 +276,10 @@ async function captureLinuxImage(tool, mime) {
|
|
|
269
276
|
const result = await spawnForBuffer(tool, args);
|
|
270
277
|
if (result.code !== 0 || result.stdout.length === 0)
|
|
271
278
|
return null;
|
|
272
|
-
// A
|
|
273
|
-
//
|
|
274
|
-
|
|
279
|
+
// A bitmap copy (a Windows/WSLg owner, or an X11 one) arrives under one of
|
|
280
|
+
// the bitmap spellings, none of which the attachment profile accepts:
|
|
281
|
+
// convert to PNG, keeping the bitmap bytes when the conversion cannot.
|
|
282
|
+
const png = BMP_MEDIA_TYPES.test(mime) ? await bmpToPng(result.stdout) : null;
|
|
275
283
|
return writeImageExport(png === null ? mime : 'image/png', png ?? result.stdout);
|
|
276
284
|
}
|
|
277
285
|
/**
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
/** The DSH home that owns the credential store, following the launcher's rule. */
|
|
2
2
|
export declare function dshHomeDir(): string;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The credential documents a read may consult, most authoritative first: the
|
|
5
|
+
* active home's store, then the default `~/.dsh` store.
|
|
6
|
+
*
|
|
7
|
+
* A `DSH_HOME` override moves the harness home, but the codex bridge and
|
|
8
|
+
* `/doctor` are dsh-tui's own surfaces: a key the user stored at the location
|
|
9
|
+
* both READMEs name (`~/.dsh/.credentials.yaml`) must keep working instead of
|
|
10
|
+
* reporting "missing" for a key that is sitting right there.
|
|
11
|
+
* @param home - DSH home override; defaults to {@link dshHomeDir}.
|
|
12
|
+
* @returns Candidate file paths, most authoritative first.
|
|
13
|
+
*/
|
|
14
|
+
export declare function credentialStoreFiles(home?: string): readonly string[];
|
|
15
|
+
/**
|
|
16
|
+
* Whether any credential store declares a reference by this name.
|
|
5
17
|
*
|
|
6
18
|
* Only the top-level `refs:` block is inspected — the bare name also appears in
|
|
7
19
|
* grants and payloads, where a match would be a false positive.
|
|
8
20
|
* @param name - Reference name to look for (for example `DEEPSEEK_API_KEY`).
|
|
9
21
|
* @param home - DSH home override; defaults to {@link dshHomeDir}.
|
|
10
|
-
* @returns True when a `refs` entry with that name exists.
|
|
22
|
+
* @returns True when a `refs` entry with that name exists in any store.
|
|
11
23
|
*/
|
|
12
24
|
export declare function credentialRefDeclared(name: string, home?: string): boolean;
|
|
13
25
|
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"AAmBA,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,MAAqB,GAAG,SAAS,MAAM,EAAE,CAInF;AAeD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB,GAAG,OAAO,CAExF"}
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
* The store is a small YAML document at `$DSH_HOME/.credentials.yaml` whose
|
|
5
5
|
* top-level `refs:` block maps reference names (for example `DEEPSEEK_API_KEY`)
|
|
6
6
|
* to stored secrets. dsh resolves those refs into a session at launch, so an
|
|
7
|
-
* environment-only check reports "missing" for a key that works.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* environment-only check reports "missing" for a key that works. A read also
|
|
8
|
+
* consults the default `~/.dsh` store ({@link credentialStoreFiles}), so a
|
|
9
|
+
* `DSH_HOME` override does not orphan keys stored at the documented location.
|
|
10
|
+
* This module only ever answers "is a ref declared": the value is never read,
|
|
11
|
+
* formatted, or logged. The launcher keeps a mirror of this check in
|
|
12
|
+
* `bin/dsh-tui.js` (it is dependency-free and cannot import `lib/`); the two
|
|
13
|
+
* must not diverge.
|
|
11
14
|
* @module dsh-tui/utils/credentials
|
|
12
15
|
*/
|
|
13
16
|
import { readFileSync } from 'node:fs';
|
|
@@ -22,17 +25,25 @@ export function dshHomeDir() {
|
|
|
22
25
|
return process.env.DSH_HOME || join(homedir(), '.dsh');
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
28
|
+
* The credential documents a read may consult, most authoritative first: the
|
|
29
|
+
* active home's store, then the default `~/.dsh` store.
|
|
26
30
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
31
|
+
* A `DSH_HOME` override moves the harness home, but the codex bridge and
|
|
32
|
+
* `/doctor` are dsh-tui's own surfaces: a key the user stored at the location
|
|
33
|
+
* both READMEs name (`~/.dsh/.credentials.yaml`) must keep working instead of
|
|
34
|
+
* reporting "missing" for a key that is sitting right there.
|
|
30
35
|
* @param home - DSH home override; defaults to {@link dshHomeDir}.
|
|
31
|
-
* @returns
|
|
36
|
+
* @returns Candidate file paths, most authoritative first.
|
|
32
37
|
*/
|
|
33
|
-
export function
|
|
38
|
+
export function credentialStoreFiles(home = dshHomeDir()) {
|
|
39
|
+
const active = join(home, '.credentials.yaml');
|
|
40
|
+
const fallback = join(homedir(), '.dsh', '.credentials.yaml');
|
|
41
|
+
return active === fallback ? [active] : [active, fallback];
|
|
42
|
+
}
|
|
43
|
+
/** Whether one document declares `name` in its top-level `refs:` block. */
|
|
44
|
+
function refDeclaredIn(file, name) {
|
|
34
45
|
try {
|
|
35
|
-
const text = readFileSync(
|
|
46
|
+
const text = readFileSync(file, 'utf8');
|
|
36
47
|
const block = /^refs:[ \t]*\r?\n((?:[ \t]+\S.*(?:\r?\n|$))*)/mu.exec(text);
|
|
37
48
|
if (block === null)
|
|
38
49
|
return false;
|
|
@@ -43,3 +54,15 @@ export function credentialRefDeclared(name, home = dshHomeDir()) {
|
|
|
43
54
|
return false;
|
|
44
55
|
}
|
|
45
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Whether any credential store declares a reference by this name.
|
|
59
|
+
*
|
|
60
|
+
* Only the top-level `refs:` block is inspected — the bare name also appears in
|
|
61
|
+
* grants and payloads, where a match would be a false positive.
|
|
62
|
+
* @param name - Reference name to look for (for example `DEEPSEEK_API_KEY`).
|
|
63
|
+
* @param home - DSH home override; defaults to {@link dshHomeDir}.
|
|
64
|
+
* @returns True when a `refs` entry with that name exists in any store.
|
|
65
|
+
*/
|
|
66
|
+
export function credentialRefDeclared(name, home = dshHomeDir()) {
|
|
67
|
+
return credentialStoreFiles(home).some(file => refDeclaredIn(file, name));
|
|
68
|
+
}
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* The image media type the encoded bytes actually are, from the magic
|
|
7
|
-
* bytes alone (the same signatures {@link probeImageSize} dispatches on):
|
|
8
|
-
* PNG, JPEG, WebP (RIFF/WEBP) or GIF; anything else is undefined and the
|
|
9
|
-
* caller keeps its own label (those bytes take the decode-or-refuse path
|
|
10
|
-
* anyway). Used to keep a renamed file from travelling under a label its
|
|
11
|
-
* content contradicts.
|
|
12
|
-
*/
|
|
13
|
-
export declare function sniffImageMediaType(bytes: Uint8Array): 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Measure intrinsic pixel dimensions from the encoded bytes alone — no
|
|
16
|
-
* decode, no dependencies. Recognizes PNG / JPEG / WebP (VP8X, VP8,
|
|
17
|
-
* VP8L) / GIF; anything else returns null, which callers MUST treat as
|
|
18
|
-
* "unknown, force a real decode" — never as "small enough".
|
|
19
|
-
*/
|
|
20
|
-
export declare function probeImageSize(bytes: Uint8Array): ImageSizeProbe | null;
|
|
1
|
+
import { probeImageSize, sniffImageMediaType } from '../backends/shared/image-size.js';
|
|
2
|
+
import type { ImageSizeProbe } from '../backends/shared/image-size.js';
|
|
3
|
+
export { probeImageSize, sniffImageMediaType };
|
|
4
|
+
export type { ImageSizeProbe };
|
|
21
5
|
/** The admission limits that matter for resampling decisions. */
|
|
22
6
|
export interface ResizeLimits {
|
|
23
7
|
/** Maximum intrinsic width AND height, per side, in pixels. */
|
|
@@ -65,6 +49,12 @@ export type AdaptOutcome = {
|
|
|
65
49
|
* short-circuits the common case — bytes it proves to be inside the caps in an
|
|
66
50
|
* accepted format are returned untouched, with no encoder loaded.
|
|
67
51
|
*
|
|
52
|
+
* A bitmap paste is converted before any of that: BMP is a format the byte
|
|
53
|
+
* probe cannot measure and libvips cannot decode at all, so a WeChat or X11
|
|
54
|
+
* clipboard copy used to be refused as "unsupported image format" however
|
|
55
|
+
* valid it was. {@link bmpToPng} is dependency-free, so the conversion also
|
|
56
|
+
* covers deployments without sharp.
|
|
57
|
+
*
|
|
68
58
|
* Aspect ratio is preserved by {@link downscaleTarget}. An animated source is
|
|
69
59
|
* REFUSED whenever this gate would have to touch its bytes: re-encoding a
|
|
70
60
|
* multi-page image here cannot promise frames, delays and loop survive, and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageResize.d.ts","sourceRoot":"","sources":["../../../src/utils/imageResize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"imageResize.d.ts","sourceRoot":"","sources":["../../../src/utils/imageResize.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAGtE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAA;AAC9C,YAAY,EAAE,cAAc,EAAE,CAAA;AAE9B,iEAAiE;AACjE,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,wCAAwC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAIzF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,GAAG,cAAc,CAW1F;AAqCD,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IACA,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAC5B,GACC;IACA;;;qDAGiD;IACjD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,eAAe,GAAG,sBAAsB,CAAA;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB,CAAA;AAcH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,UAAU,EACjB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,YAAY,EACpB,kBAAkB,EAAE,SAAS,MAAM,EAAE,GACpC,OAAO,CAAC,YAAY,CAAC,CA8FvB"}
|