@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
|
@@ -1,19 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { type BackendId } from './agent/backend-manifest.js';
|
|
2
|
+
/**
|
|
3
|
+
* The backends that ship inside this package, in picker order. They are the
|
|
4
|
+
* registry's seed and the vocabulary the launcher's messages use — **not** the
|
|
5
|
+
* validation source any more: since P0 D1 any syntactically valid id may name a
|
|
6
|
+
* plugin backend, and membership is decided by
|
|
7
|
+
* `src/dsh-adapter/backend-registry.ts` (which the launcher cannot import when
|
|
8
|
+
* it runs without compiled modules, hence the mirrored copy in `bin/dsh-tui.js`).
|
|
9
|
+
*/
|
|
10
|
+
export declare const BUILTIN_BACKEND_IDS: readonly ["dsh", "claude", "codex"];
|
|
11
|
+
/**
|
|
12
|
+
* An id that passed the id-syntax gate (the rule and the brand live in
|
|
13
|
+
* `agent/backend-manifest.ts`, next to the manifest that declares it).
|
|
14
|
+
*
|
|
15
|
+
* It marks "validated input", which is what the session-ref and path builders
|
|
16
|
+
* need. *Membership* ("is this backend installed?") is a runtime question:
|
|
17
|
+
* `parseBackendChoice()` in the registry answers both halves, and the boot falls
|
|
18
|
+
* back to dsh when the second half misses — exactly like an unknown value always
|
|
19
|
+
* did (P0 D1).
|
|
20
|
+
*/
|
|
21
|
+
export type KernelBackendId = BackendId;
|
|
22
|
+
/** The fallback every path lands on. `dsh` passes the syntax gate by
|
|
23
|
+
* construction and is always registered, so it needs no runtime check. */
|
|
24
|
+
export declare const DSH_BACKEND_ID: KernelBackendId;
|
|
25
|
+
/**
|
|
26
|
+
* The first half of the parse: trim, lowercase, id syntax. Anything else (a
|
|
27
|
+
* blank, a typo, `has:colon`, `a/b`) is undefined, which every caller reads as
|
|
28
|
+
* "no choice made". The second half — is it registered? — belongs to the
|
|
29
|
+
* registry, which is deliberately not imported here (this module is reachable
|
|
30
|
+
* from the UI, which may not import the adapter).
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseBackendId(value: unknown): KernelBackendId | undefined;
|
|
17
33
|
/** Stored shape. */
|
|
18
34
|
export interface KernelPrefsData {
|
|
19
35
|
readonly backend?: KernelBackendId;
|
|
@@ -31,6 +47,13 @@ export declare function writeKernelPrefs(data: KernelPrefsData, file?: string, d
|
|
|
31
47
|
* config > env > remembered choice.
|
|
32
48
|
*/
|
|
33
49
|
export declare const KERNEL_SWITCH_HANDOFF_ENV = "DSH_TUI_BACKEND_HANDOFF";
|
|
50
|
+
/** The entry's path, set by the launcher: every replacement
|
|
51
|
+
* relaunches through it (src/update.ts restartArgv). */
|
|
52
|
+
export declare const HOST_ENTRY_PATH_ENV = "DSH_TUI_HOST_ENTRY_PATH";
|
|
53
|
+
export declare function hostEntryDisabled(env?: NodeJS.ProcessEnv): boolean;
|
|
54
|
+
/** Why the entry could not use the installed dsh; set by the entry, read and
|
|
55
|
+
* cleared once by the runtime (plugin.ts), also in a delegated `dsh --profile`. */
|
|
56
|
+
export declare const HOST_NOTICE_ENV = "DSH_TUI_HOST_NOTICE";
|
|
34
57
|
/**
|
|
35
58
|
* The kernel boot runs on (plugin.ts backendChoice): a valid switch handoff
|
|
36
59
|
* first, then the Config row, then DSH_TUI_BACKEND, then the remembered
|
|
@@ -41,11 +64,101 @@ export declare const KERNEL_SWITCH_HANDOFF_ENV = "DSH_TUI_BACKEND_HANDOFF";
|
|
|
41
64
|
export declare function resolveRememberedBackend(input: {
|
|
42
65
|
/** KERNEL_SWITCH_HANDOFF_ENV, normalized; undefined on ordinary launches. */
|
|
43
66
|
readonly handoff?: KernelBackendId | undefined;
|
|
44
|
-
/** Config.backend
|
|
67
|
+
/** Config.backend after the boot's post-discovery membership check. */
|
|
45
68
|
readonly configured?: KernelBackendId | undefined;
|
|
46
69
|
/** process.env.DSH_TUI_BACKEND as given. */
|
|
47
70
|
readonly envRaw?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Whether DSH_TUI_BACKEND names an *installed* backend. Absent means the
|
|
73
|
+
* syntax gate alone, which is what callers without a registry (the
|
|
74
|
+
* crash-retry regressions) can offer. The boot passes the registry's
|
|
75
|
+
* `isRegisteredBackend`: an uninstalled plugin id must fall back to dsh
|
|
76
|
+
* exactly like a typo does, instead of reaching `loadBackend()` and crashing
|
|
77
|
+
* the boot on a pinned choice (P0 D1).
|
|
78
|
+
*/
|
|
79
|
+
readonly envKnown?: ((id: string) => boolean) | undefined;
|
|
48
80
|
/** The kernel remembered in kernel.json. */
|
|
49
81
|
readonly memory?: KernelBackendId | undefined;
|
|
50
82
|
}): KernelBackendId;
|
|
83
|
+
/**
|
|
84
|
+
* The backend a **derived** resume target was read from (launcher → boot handoff).
|
|
85
|
+
*
|
|
86
|
+
* `DSH_TUI_RESUME_SESSION` alone cannot be trusted across backends. The launcher
|
|
87
|
+
* derives a bare `--resume` target from the chosen backend's own
|
|
88
|
+
* `backends/<id>/prefs.json` (`envFromLastRun` does the same from `last-run.json`),
|
|
89
|
+
* and this boot may then land on a *different* backend: an uninstalled plugin id
|
|
90
|
+
* falls back to dsh (P0 D1), and an unset `DSH_TUI_BACKEND` follows the remembered
|
|
91
|
+
* kernel instead. Handing the id to whoever booted resumes the wrong backend's
|
|
92
|
+
* session, or fails on one that never heard of it. This variable records the
|
|
93
|
+
* source so the boot can refuse it.
|
|
94
|
+
*
|
|
95
|
+
* An id the user placed themselves (`--resume <id>`, a Config row, `/restart`)
|
|
96
|
+
* carries no mark — where it belongs is theirs to decide, and the boot only says
|
|
97
|
+
* what it knows. Boot deletes this from process.env as soon as it reads it,
|
|
98
|
+
* exactly like {@link KERNEL_SWITCH_HANDOFF_ENV}.
|
|
99
|
+
*/
|
|
100
|
+
export declare const RESUME_BACKEND_ENV = "DSH_TUI_RESUME_BACKEND";
|
|
101
|
+
/**
|
|
102
|
+
* Marks a boot the launcher started as the safe-mode **retry** (`dsh-tui safe`
|
|
103
|
+
* → option 1, and the first-run fallback that shares it).
|
|
104
|
+
*
|
|
105
|
+
* A retry derives its target from `last-run.json` — "the kernel and session that
|
|
106
|
+
* were running when the crash happened" — and the recorded kernel may no longer
|
|
107
|
+
* be in the registry, which is exactly the case {@link resolveResumeTarget}
|
|
108
|
+
* revokes. Failing the boot there would close the user's last way back, so a
|
|
109
|
+
* retry gets the tolerated branch instead: warn, then cold-start on the kernel
|
|
110
|
+
* that did open. The launcher sets it for the whole retry env, the boot deletes
|
|
111
|
+
* it as soon as it reads it (one-shot, like the mark above), and it never
|
|
112
|
+
* reaches the plugin protocol — `lastSession` and this handoff are implementation
|
|
113
|
+
* details, not a backend contract (roadmap §6 item 11).
|
|
114
|
+
*/
|
|
115
|
+
export declare const RESUME_RETRY_ENV = "DSH_TUI_RESUME_RETRY";
|
|
116
|
+
/**
|
|
117
|
+
* What the boot must do with the resume request it inherited.
|
|
118
|
+
*
|
|
119
|
+
* The four outcomes the decision names (roadmap §6 item 11): only the selected
|
|
120
|
+
* backend is ever asked, a target is bound to the backend that derived it, and a
|
|
121
|
+
* request that cannot be honored fails the boot instead of degrading into a cold
|
|
122
|
+
* start or a session nobody asked for. `none` and `usable` are the two ordinary
|
|
123
|
+
* outcomes; `revoked` carries everything the caller needs to report the refusal —
|
|
124
|
+
* which backend the target came from, and whether the refusal is allowed to be
|
|
125
|
+
* soft (safe-mode retry only).
|
|
126
|
+
*/
|
|
127
|
+
export type ResumeTarget =
|
|
128
|
+
/** No resume request survives (nothing was asked for, or the id was blank). */
|
|
129
|
+
{
|
|
130
|
+
readonly kind: 'none';
|
|
131
|
+
}
|
|
132
|
+
/** Hand this id to `backendChoice`, the backend this boot landed on. */
|
|
133
|
+
| {
|
|
134
|
+
readonly kind: 'usable';
|
|
135
|
+
readonly sessionId: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* A **derived** target whose source backend is not the one this boot landed on.
|
|
139
|
+
* `fatal` says how loud the refusal is: `true` fails the boot (the target is
|
|
140
|
+
* neither carried across nor silently replaced by a new session), `false`
|
|
141
|
+
* (safe-mode retry) only warns and lets the boot continue on `backendChoice`.
|
|
142
|
+
*/
|
|
143
|
+
| {
|
|
144
|
+
readonly kind: 'revoked';
|
|
145
|
+
readonly from: KernelBackendId;
|
|
146
|
+
readonly fatal: boolean;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Whether a resume target may be handed to the backend this boot landed on. A
|
|
150
|
+
* derived target is usable only on the backend it came from; a revoked one is
|
|
151
|
+
* dropped rather than carried over, which is why the result hands the source back
|
|
152
|
+
* for the caller's refusal instead of returning nothing. Pure.
|
|
153
|
+
*/
|
|
154
|
+
export declare function resolveResumeTarget(input: {
|
|
155
|
+
/** The id as given: DSH_TUI_RESUME_SESSION, else Config.sessionId. */
|
|
156
|
+
readonly sessionId?: string | undefined;
|
|
157
|
+
/** RESUME_BACKEND_ENV, normalized. Absent = the user named the target. */
|
|
158
|
+
readonly sourceBackend?: KernelBackendId | undefined;
|
|
159
|
+
/** The backend this boot landed on (plugin.ts `backendChoice`). */
|
|
160
|
+
readonly backendChoice: KernelBackendId;
|
|
161
|
+
/** RESUME_RETRY_ENV: a safe-mode retry must survive a revoked target. */
|
|
162
|
+
readonly retry?: boolean | undefined;
|
|
163
|
+
}): ResumeTarget;
|
|
51
164
|
//# sourceMappingURL=kernelPrefs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernelPrefs.d.ts","sourceRoot":"","sources":["../../src/kernelPrefs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kernelPrefs.d.ts","sourceRoot":"","sources":["../../src/kernelPrefs.ts"],"names":[],"mappings":"AAcA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAG/E;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,qCAAsC,CAAA;AAEtE;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,CAAA;AAEvC;2EAC2E;AAC3E,eAAO,MAAM,cAAc,EAAY,eAAe,CAAA;AAEtD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAI1E;AAED,oBAAoB;AACpB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CACnC;AASD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,IAAI,GAAE,MAAsC,GAAG,eAAe,CAM7F;AAuBD,sFAAsF;AACtF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,eAAe,EACrB,IAAI,GAAE,MAAsC,EAC5C,KAAK,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAsB,GACjD,IAAI,CAcN;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,4BAA4B,CAAA;AAQlE;yDACyD;AACzD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAE5D,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAE/E;AAED;oFACoF;AACpF,eAAO,MAAM,eAAe,wBAAwB,CAAA;AAEpD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IAC9C,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACjD,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACzD,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;CAC9C,GAAG,eAAe,CASlB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAE1D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,yBAAyB,CAAA;AAEtD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY;AACtB,+EAA+E;AAC7E;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAC3B,wEAAwE;GACtE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AACzD;;;;;GAKG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAA;AAEzF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,0EAA0E;IAC1E,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpD,mEAAmE;IACnE,QAAQ,CAAC,aAAa,EAAE,eAAe,CAAA;IACvC,yEAAyE;IACzE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACrC,GAAG,YAAY,CAOf"}
|
package/lib/types/kernelPrefs.js
CHANGED
|
@@ -12,32 +12,39 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs';
|
|
14
14
|
import { basename, dirname, join } from 'node:path';
|
|
15
|
+
import { isBackendIdSyntax } from './agent/backend-manifest.js';
|
|
15
16
|
import { DATA_DIR } from './utils/paths.js';
|
|
16
|
-
/** Kernels the TUI can run on (the Config.backend values). */
|
|
17
|
-
export const KERNEL_IDS = ['dsh', 'claude', 'codex'];
|
|
18
|
-
export function isKernelId(value) {
|
|
19
|
-
return typeof value === 'string' && KERNEL_IDS.includes(value);
|
|
20
|
-
}
|
|
21
17
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
18
|
+
* The backends that ship inside this package, in picker order. They are the
|
|
19
|
+
* registry's seed and the vocabulary the launcher's messages use — **not** the
|
|
20
|
+
* validation source any more: since P0 D1 any syntactically valid id may name a
|
|
21
|
+
* plugin backend, and membership is decided by
|
|
22
|
+
* `src/dsh-adapter/backend-registry.ts` (which the launcher cannot import when
|
|
23
|
+
* it runs without compiled modules, hence the mirrored copy in `bin/dsh-tui.js`).
|
|
24
|
+
*/
|
|
25
|
+
export const BUILTIN_BACKEND_IDS = ['dsh', 'claude', 'codex'];
|
|
26
|
+
/** The fallback every path lands on. `dsh` passes the syntax gate by
|
|
27
|
+
* construction and is always registered, so it needs no runtime check. */
|
|
28
|
+
export const DSH_BACKEND_ID = 'dsh';
|
|
29
|
+
/**
|
|
30
|
+
* The first half of the parse: trim, lowercase, id syntax. Anything else (a
|
|
31
|
+
* blank, a typo, `has:colon`, `a/b`) is undefined, which every caller reads as
|
|
32
|
+
* "no choice made". The second half — is it registered? — belongs to the
|
|
33
|
+
* registry, which is deliberately not imported here (this module is reachable
|
|
34
|
+
* from the UI, which may not import the adapter).
|
|
25
35
|
*/
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** Brand names used by kernel chips and notices. */
|
|
32
|
-
export function kernelDisplayName(id) {
|
|
33
|
-
return id === 'dsh' ? 'DSH' : id === 'claude' ? 'Claude' : id === 'codex' ? 'Codex' : id;
|
|
36
|
+
export function parseBackendId(value) {
|
|
37
|
+
if (typeof value !== 'string')
|
|
38
|
+
return undefined;
|
|
39
|
+
const id = value.trim().toLowerCase();
|
|
40
|
+
return isBackendIdSyntax(id) ? id : undefined;
|
|
34
41
|
}
|
|
35
42
|
/** Keep only a valid backend value; anything else reads as no preference. */
|
|
36
43
|
function parseKernelPrefs(parsed) {
|
|
37
44
|
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
38
45
|
return {};
|
|
39
|
-
const backend = parsed.backend;
|
|
40
|
-
return
|
|
46
|
+
const backend = parseBackendId(parsed.backend);
|
|
47
|
+
return backend === undefined ? {} : { backend };
|
|
41
48
|
}
|
|
42
49
|
/** Read the preference; missing, broken or unreadable means none. Never throws. */
|
|
43
50
|
export function readKernelPrefs(file = join(DATA_DIR, 'kernel.json')) {
|
|
@@ -87,15 +94,6 @@ export function writeKernelPrefs(data, file = join(DATA_DIR, 'kernel.json'), deb
|
|
|
87
94
|
debug(`dsh-tui: kernel prefs write failed (${error instanceof Error ? error.message : String(error)})`);
|
|
88
95
|
}
|
|
89
96
|
}
|
|
90
|
-
/** Same rules as dsh-adapter's normalizeBackendChoice (kept local so this
|
|
91
|
-
* module does not import the adapter): trimmed, case-insensitive; empty or
|
|
92
|
-
* unknown gives undefined. */
|
|
93
|
-
function normalizeBackend(value) {
|
|
94
|
-
if (typeof value !== 'string')
|
|
95
|
-
return undefined;
|
|
96
|
-
const id = value.trim().toLowerCase();
|
|
97
|
-
return isKernelId(id) ? id : undefined;
|
|
98
|
-
}
|
|
99
97
|
/**
|
|
100
98
|
* The kernel this one boot must land on, set by a kernel switch (restartTui's
|
|
101
99
|
* backend option) and by the launcher's crash retry. Boot deletes it from
|
|
@@ -105,6 +103,21 @@ function normalizeBackend(value) {
|
|
|
105
103
|
* config > env > remembered choice.
|
|
106
104
|
*/
|
|
107
105
|
export const KERNEL_SWITCH_HANDOFF_ENV = 'DSH_TUI_BACKEND_HANDOFF';
|
|
106
|
+
/**
|
|
107
|
+
* The package's own entry, which hosts every kernel by default (routing in
|
|
108
|
+
* hostEntryRoute.ts). Kept here so src/update.ts does not pull that module in.
|
|
109
|
+
* `DSH_TUI_HOST_ENTRY=0` keeps every kernel on `dsh --profile`.
|
|
110
|
+
*/
|
|
111
|
+
const HOST_ENTRY_ENV = 'DSH_TUI_HOST_ENTRY';
|
|
112
|
+
/** The entry's path, set by the launcher: every replacement
|
|
113
|
+
* relaunches through it (src/update.ts restartArgv). */
|
|
114
|
+
export const HOST_ENTRY_PATH_ENV = 'DSH_TUI_HOST_ENTRY_PATH';
|
|
115
|
+
export function hostEntryDisabled(env = process.env) {
|
|
116
|
+
return env[HOST_ENTRY_ENV] === '0';
|
|
117
|
+
}
|
|
118
|
+
/** Why the entry could not use the installed dsh; set by the entry, read and
|
|
119
|
+
* cleared once by the runtime (plugin.ts), also in a delegated `dsh --profile`. */
|
|
120
|
+
export const HOST_NOTICE_ENV = 'DSH_TUI_HOST_NOTICE';
|
|
108
121
|
/**
|
|
109
122
|
* The kernel boot runs on (plugin.ts backendChoice): a valid switch handoff
|
|
110
123
|
* first, then the Config row, then DSH_TUI_BACKEND, then the remembered
|
|
@@ -113,14 +126,64 @@ export const KERNEL_SWITCH_HANDOFF_ENV = 'DSH_TUI_BACKEND_HANDOFF';
|
|
|
113
126
|
* choice; an invalid handoff value is ignored. Pure.
|
|
114
127
|
*/
|
|
115
128
|
export function resolveRememberedBackend(input) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
129
|
+
const handoff = parseBackendId(input.handoff);
|
|
130
|
+
if (handoff !== undefined)
|
|
131
|
+
return handoff;
|
|
132
|
+
const configured = parseBackendId(input.configured);
|
|
133
|
+
if (configured !== undefined)
|
|
134
|
+
return configured;
|
|
135
|
+
const env = parseBackendId(input.envRaw);
|
|
136
|
+
if (env !== undefined && (input.envKnown === undefined || input.envKnown(env)))
|
|
122
137
|
return env;
|
|
123
138
|
if (input.envRaw !== undefined && input.envRaw.trim() !== '')
|
|
124
|
-
return
|
|
125
|
-
return input.memory ??
|
|
139
|
+
return DSH_BACKEND_ID;
|
|
140
|
+
return input.memory ?? DSH_BACKEND_ID;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The backend a **derived** resume target was read from (launcher → boot handoff).
|
|
144
|
+
*
|
|
145
|
+
* `DSH_TUI_RESUME_SESSION` alone cannot be trusted across backends. The launcher
|
|
146
|
+
* derives a bare `--resume` target from the chosen backend's own
|
|
147
|
+
* `backends/<id>/prefs.json` (`envFromLastRun` does the same from `last-run.json`),
|
|
148
|
+
* and this boot may then land on a *different* backend: an uninstalled plugin id
|
|
149
|
+
* falls back to dsh (P0 D1), and an unset `DSH_TUI_BACKEND` follows the remembered
|
|
150
|
+
* kernel instead. Handing the id to whoever booted resumes the wrong backend's
|
|
151
|
+
* session, or fails on one that never heard of it. This variable records the
|
|
152
|
+
* source so the boot can refuse it.
|
|
153
|
+
*
|
|
154
|
+
* An id the user placed themselves (`--resume <id>`, a Config row, `/restart`)
|
|
155
|
+
* carries no mark — where it belongs is theirs to decide, and the boot only says
|
|
156
|
+
* what it knows. Boot deletes this from process.env as soon as it reads it,
|
|
157
|
+
* exactly like {@link KERNEL_SWITCH_HANDOFF_ENV}.
|
|
158
|
+
*/
|
|
159
|
+
export const RESUME_BACKEND_ENV = 'DSH_TUI_RESUME_BACKEND';
|
|
160
|
+
/**
|
|
161
|
+
* Marks a boot the launcher started as the safe-mode **retry** (`dsh-tui safe`
|
|
162
|
+
* → option 1, and the first-run fallback that shares it).
|
|
163
|
+
*
|
|
164
|
+
* A retry derives its target from `last-run.json` — "the kernel and session that
|
|
165
|
+
* were running when the crash happened" — and the recorded kernel may no longer
|
|
166
|
+
* be in the registry, which is exactly the case {@link resolveResumeTarget}
|
|
167
|
+
* revokes. Failing the boot there would close the user's last way back, so a
|
|
168
|
+
* retry gets the tolerated branch instead: warn, then cold-start on the kernel
|
|
169
|
+
* that did open. The launcher sets it for the whole retry env, the boot deletes
|
|
170
|
+
* it as soon as it reads it (one-shot, like the mark above), and it never
|
|
171
|
+
* reaches the plugin protocol — `lastSession` and this handoff are implementation
|
|
172
|
+
* details, not a backend contract (roadmap §6 item 11).
|
|
173
|
+
*/
|
|
174
|
+
export const RESUME_RETRY_ENV = 'DSH_TUI_RESUME_RETRY';
|
|
175
|
+
/**
|
|
176
|
+
* Whether a resume target may be handed to the backend this boot landed on. A
|
|
177
|
+
* derived target is usable only on the backend it came from; a revoked one is
|
|
178
|
+
* dropped rather than carried over, which is why the result hands the source back
|
|
179
|
+
* for the caller's refusal instead of returning nothing. Pure.
|
|
180
|
+
*/
|
|
181
|
+
export function resolveResumeTarget(input) {
|
|
182
|
+
const sessionId = input.sessionId?.trim();
|
|
183
|
+
if (sessionId === undefined || sessionId === '')
|
|
184
|
+
return { kind: 'none' };
|
|
185
|
+
if (input.sourceBackend === undefined || input.sourceBackend === input.backendChoice) {
|
|
186
|
+
return { kind: 'usable', sessionId };
|
|
187
|
+
}
|
|
188
|
+
return { kind: 'revoked', from: input.sourceBackend, fatal: input.retry !== true };
|
|
126
189
|
}
|
|
@@ -15,6 +15,8 @@ export type InlineRow = {
|
|
|
15
15
|
readonly width: number;
|
|
16
16
|
/** The row continues the previous one (a wrap, not a source newline). */
|
|
17
17
|
readonly continuation: boolean;
|
|
18
|
+
/** A separator omitted at a full row boundary; restore it on copy. */
|
|
19
|
+
readonly gap: boolean;
|
|
18
20
|
};
|
|
19
21
|
/** The placeholder run standing in for formula `index`, `columns` cells wide. */
|
|
20
22
|
export declare function inlineMediaPlaceholder(index: number, columns: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-layout.d.ts","sourceRoot":"","sources":["../../../src/math/inline-layout.ts"],"names":[],"mappings":"AAoBA,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,OAAS,CAAA;AAItC,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"inline-layout.d.ts","sourceRoot":"","sources":["../../../src/math/inline-layout.ts"],"names":[],"mappings":"AAoBA,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,OAAS,CAAA;AAItC,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxE;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEhF,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,CAAA;IACvC,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,SAAS,MAAM,EAAE,GACzB,SAAS,EAAE,GAAG,SAAS,CAyCzB"}
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* its image (one private-use code point per formula, so neighbouring
|
|
6
6
|
* formulas stay distinguishable), and the formatted paragraph is wrapped by
|
|
7
7
|
* the same `wrapText` that <Text> uses. A run holds no spaces, so it wraps
|
|
8
|
-
* as one unbreakable word: a formula never splits across rows
|
|
9
|
-
*
|
|
8
|
+
* as one unbreakable word: a formula never splits across rows. The display
|
|
9
|
+
* helper hides separators moved past a full row without changing row count. Each
|
|
10
10
|
* wrapped row is then cut into ANSI-balanced text pieces (sliceAnsi re-opens
|
|
11
11
|
* the styles and links a cut crosses) and the image slots between them.
|
|
12
12
|
* Pure: no React, no terminal.
|
|
13
13
|
*/
|
|
14
14
|
import stripAnsi from 'strip-ansi';
|
|
15
15
|
import { stringWidth } from '../ink/stringWidth.js';
|
|
16
|
-
import
|
|
16
|
+
import { wrapTextLines } from '../ink/wrap-text.js';
|
|
17
17
|
import sliceAnsi from '../utils/sliceAnsi.js';
|
|
18
18
|
/** First placeholder code point (Private Use Area, width 1). */
|
|
19
19
|
const PLACEHOLDER_BASE = 0xe000;
|
|
@@ -39,9 +39,7 @@ export function layoutInlineMedia(formatted, width, columns) {
|
|
|
39
39
|
return undefined;
|
|
40
40
|
const seen = new Set();
|
|
41
41
|
const rows = [];
|
|
42
|
-
const
|
|
43
|
-
const continuations = wrapContinuations(stripAnsi(formatted), stripAnsi(wrapped));
|
|
44
|
-
for (const [lineIndex, line] of wrapped.split('\n').entries()) {
|
|
42
|
+
for (const { text: line, continuation, gap } of wrapTextLines(formatted, width)) {
|
|
45
43
|
const pieces = [];
|
|
46
44
|
const plain = stripAnsi(line);
|
|
47
45
|
let column = 0;
|
|
@@ -80,27 +78,7 @@ export function layoutInlineMedia(formatted, width, columns) {
|
|
|
80
78
|
if (!closeRun())
|
|
81
79
|
return undefined;
|
|
82
80
|
flushText(column);
|
|
83
|
-
rows.push({ pieces, width: column, continuation
|
|
81
|
+
rows.push({ pieces, width: column, continuation, gap });
|
|
84
82
|
}
|
|
85
83
|
return seen.size === columns.length ? rows : undefined;
|
|
86
84
|
}
|
|
87
|
-
/**
|
|
88
|
-
* For each line of `wrapped`, whether the newline before it was inserted by
|
|
89
|
-
* wrapping (true) or was in `source` (false). wrapAnsi (trim off) only
|
|
90
|
-
* inserts newlines, so walking both plain strings in step finds them.
|
|
91
|
-
*/
|
|
92
|
-
function wrapContinuations(source, wrapped) {
|
|
93
|
-
const result = [false];
|
|
94
|
-
let at = 0;
|
|
95
|
-
for (const char of wrapped) {
|
|
96
|
-
if (char === '\n') {
|
|
97
|
-
const inSource = source[at] === '\n';
|
|
98
|
-
result.push(!inSource);
|
|
99
|
-
if (inSource)
|
|
100
|
-
at += 1;
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
at += char.length;
|
|
104
|
-
}
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pure derivation for the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* recents row's localized label is resolved at render time (its `label`
|
|
7
|
-
* field is the {@link RECENTS_LABEL_PLACEHOLDER} sentinel).
|
|
2
|
+
* Pure derivation for the `/model` provider tabs, with a pinned
|
|
3
|
+
* "recently used" pseudo-provider first. Kept free of React/channel/i18n state so
|
|
4
|
+
* `scripts/verify-model-picker-groups.mjs` can drive it headless. Renderers
|
|
5
|
+
* derive the localized recents label from its provider key.
|
|
8
6
|
*
|
|
9
7
|
* @module dsh-tui/modelGroups
|
|
10
8
|
*/
|
|
@@ -15,14 +13,14 @@ import type { LlmModelInfo, LlmProviderInfo } from './adapter/ports/channel-view
|
|
|
15
13
|
* never collide with a real route.
|
|
16
14
|
*/
|
|
17
15
|
export declare const RECENTS_GROUP_PROVIDER = "__recents__";
|
|
18
|
-
/**
|
|
16
|
+
/** Placeholder for pure group data; the UI labels recents by provider key. */
|
|
19
17
|
export declare const RECENTS_LABEL_PLACEHOLDER = "__recent__";
|
|
20
18
|
/** One recent-model reference (same shape as modelRecents' persisted ref). */
|
|
21
19
|
export interface ModelRef {
|
|
22
20
|
readonly provider: string;
|
|
23
21
|
readonly id: string;
|
|
24
22
|
}
|
|
25
|
-
/** One
|
|
23
|
+
/** One provider tab with its picker-facing identity. */
|
|
26
24
|
export interface ModelGroupRow {
|
|
27
25
|
/** Harness route key (also the grouping key over `LlmModelInfo.provider`). */
|
|
28
26
|
readonly provider: string;
|
|
@@ -33,7 +31,7 @@ export interface ModelGroupRow {
|
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* The recent refs that the current catalog still lists, most-recent-first —
|
|
36
|
-
* the
|
|
34
|
+
* the model list of the recents tab. Refs whose model vanished from the
|
|
37
35
|
* catalog (provider removed, or an OAuth provider signed out and
|
|
38
36
|
* credential-gated away) drop out here, so the group never offers a row the
|
|
39
37
|
* picker could not switch to.
|
|
@@ -42,31 +40,21 @@ export declare function recentCatalogModels(recents: readonly ModelRef[], models
|
|
|
42
40
|
/**
|
|
43
41
|
* Group a flat model catalog into provider rows, first-appearance order
|
|
44
42
|
* (the registry's own listing order), labels resolved through
|
|
45
|
-
* `providerInfos` with a route-key fallback.
|
|
46
|
-
*
|
|
43
|
+
* `providerInfos` with a route-key fallback. Supplying recent refs pins an
|
|
44
|
+
* extra pseudo-group at the top, including an empty tab.
|
|
47
45
|
*/
|
|
48
46
|
export declare function deriveModelGroups(models: readonly LlmModelInfo[], providerInfos: readonly LlmProviderInfo[], recents?: readonly ModelRef[]): readonly ModelGroupRow[];
|
|
49
|
-
/** Where `/model` should open
|
|
47
|
+
/** Where `/model` should open. */
|
|
50
48
|
export interface ModelPickerLanding {
|
|
51
|
-
/**
|
|
52
|
-
* The group to open *inside* — set only by the single-provider fast path,
|
|
53
|
-
* where a one-row top level would be pure friction (and there are no
|
|
54
|
-
* recents to pin). Multi-provider catalogs — and any catalog with recents
|
|
55
|
-
* — land at the top level (`undefined`).
|
|
56
|
-
*/
|
|
49
|
+
/** Active provider tab; undefined only for an empty catalog without recents. */
|
|
57
50
|
readonly group: string | undefined;
|
|
58
|
-
/** Focus index within
|
|
51
|
+
/** Focus index within that tab's model list. */
|
|
59
52
|
readonly index: number;
|
|
60
53
|
}
|
|
61
54
|
/**
|
|
62
|
-
*
|
|
63
|
-
* the
|
|
64
|
-
*
|
|
65
|
-
* group. The single-provider fast path applies while recents carry no
|
|
66
|
-
* navigation value — an empty list, or a lone entry that can only be the
|
|
67
|
-
* current model (the picker seeds it): drilling straight into the only
|
|
68
|
-
* provider's list beats a top level whose recents row duplicates it. Two or
|
|
69
|
-
* more recents (or any multi-provider catalog) land at the top level.
|
|
55
|
+
* Open on the first recent model when the recents tab is present. Otherwise
|
|
56
|
+
* open the current provider and focus its current model, falling back to the
|
|
57
|
+
* first provider/model when the current route is absent.
|
|
70
58
|
*/
|
|
71
59
|
export declare function modelPickerLanding(models: readonly LlmModelInfo[], currentProvider: string | undefined, currentModel: string | undefined, recents?: readonly ModelRef[]): ModelPickerLanding;
|
|
72
60
|
//# sourceMappingURL=modelGroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelGroups.d.ts","sourceRoot":"","sources":["../../src/modelGroups.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"modelGroups.d.ts","sourceRoot":"","sources":["../../src/modelGroups.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEpF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,gBAAgB,CAAA;AAEnD,8EAA8E;AAC9E,eAAO,MAAM,yBAAyB,eAAe,CAAA;AAErD,8EAA8E;AAC9E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,wDAAwD;AACxD,MAAM,WAAW,aAAa;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,SAAS,YAAY,EAAE,CAUzB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,aAAa,EAAE,SAAS,eAAe,EAAE,EACzC,OAAO,CAAC,EAAE,SAAS,QAAQ,EAAE,GAC5B,SAAS,aAAa,EAAE,CAoB1B;AAED,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,OAAO,CAAC,EAAE,SAAS,QAAQ,EAAE,GAC5B,kBAAkB,CAUpB"}
|
package/lib/types/modelGroups.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pure derivation for the
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* recents row's localized label is resolved at render time (its `label`
|
|
7
|
-
* field is the {@link RECENTS_LABEL_PLACEHOLDER} sentinel).
|
|
2
|
+
* Pure derivation for the `/model` provider tabs, with a pinned
|
|
3
|
+
* "recently used" pseudo-provider first. Kept free of React/channel/i18n state so
|
|
4
|
+
* `scripts/verify-model-picker-groups.mjs` can drive it headless. Renderers
|
|
5
|
+
* derive the localized recents label from its provider key.
|
|
8
6
|
*
|
|
9
7
|
* @module dsh-tui/modelGroups
|
|
10
8
|
*/
|
|
@@ -14,11 +12,11 @@
|
|
|
14
12
|
* never collide with a real route.
|
|
15
13
|
*/
|
|
16
14
|
export const RECENTS_GROUP_PROVIDER = '__recents__';
|
|
17
|
-
/**
|
|
15
|
+
/** Placeholder for pure group data; the UI labels recents by provider key. */
|
|
18
16
|
export const RECENTS_LABEL_PLACEHOLDER = '__recent__';
|
|
19
17
|
/**
|
|
20
18
|
* The recent refs that the current catalog still lists, most-recent-first —
|
|
21
|
-
* the
|
|
19
|
+
* the model list of the recents tab. Refs whose model vanished from the
|
|
22
20
|
* catalog (provider removed, or an OAuth provider signed out and
|
|
23
21
|
* credential-gated away) drop out here, so the group never offers a row the
|
|
24
22
|
* picker could not switch to.
|
|
@@ -40,8 +38,8 @@ export function recentCatalogModels(recents, models) {
|
|
|
40
38
|
/**
|
|
41
39
|
* Group a flat model catalog into provider rows, first-appearance order
|
|
42
40
|
* (the registry's own listing order), labels resolved through
|
|
43
|
-
* `providerInfos` with a route-key fallback.
|
|
44
|
-
*
|
|
41
|
+
* `providerInfos` with a route-key fallback. Supplying recent refs pins an
|
|
42
|
+
* extra pseudo-group at the top, including an empty tab.
|
|
45
43
|
*/
|
|
46
44
|
export function deriveModelGroups(models, providerInfos, recents) {
|
|
47
45
|
const order = [];
|
|
@@ -60,23 +58,18 @@ export function deriveModelGroups(models, providerInfos, recents) {
|
|
|
60
58
|
}));
|
|
61
59
|
if (recents !== undefined) {
|
|
62
60
|
const recentCount = recentCatalogModels(recents, models).length;
|
|
63
|
-
|
|
64
|
-
groups.unshift({ provider: RECENTS_GROUP_PROVIDER, label: RECENTS_LABEL_PLACEHOLDER, count: recentCount });
|
|
65
|
-
}
|
|
61
|
+
groups.unshift({ provider: RECENTS_GROUP_PROVIDER, label: RECENTS_LABEL_PLACEHOLDER, count: recentCount });
|
|
66
62
|
}
|
|
67
63
|
return groups;
|
|
68
64
|
}
|
|
69
65
|
/**
|
|
70
|
-
*
|
|
71
|
-
* the
|
|
72
|
-
*
|
|
73
|
-
* group. The single-provider fast path applies while recents carry no
|
|
74
|
-
* navigation value — an empty list, or a lone entry that can only be the
|
|
75
|
-
* current model (the picker seeds it): drilling straight into the only
|
|
76
|
-
* provider's list beats a top level whose recents row duplicates it. Two or
|
|
77
|
-
* more recents (or any multi-provider catalog) land at the top level.
|
|
66
|
+
* Open on the first recent model when the recents tab is present. Otherwise
|
|
67
|
+
* open the current provider and focus its current model, falling back to the
|
|
68
|
+
* first provider/model when the current route is absent.
|
|
78
69
|
*/
|
|
79
70
|
export function modelPickerLanding(models, currentProvider, currentModel, recents) {
|
|
71
|
+
if (recents !== undefined)
|
|
72
|
+
return { group: RECENTS_GROUP_PROVIDER, index: 0 };
|
|
80
73
|
const providers = [];
|
|
81
74
|
for (const model of models) {
|
|
82
75
|
if (!providers.includes(model.provider))
|
|
@@ -84,14 +77,7 @@ export function modelPickerLanding(models, currentProvider, currentModel, recent
|
|
|
84
77
|
}
|
|
85
78
|
if (providers.length === 0)
|
|
86
79
|
return { group: undefined, index: 0 };
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const index = models.findIndex(model => model.provider === currentProvider && model.id === currentModel);
|
|
91
|
-
return { group: only, index: index >= 0 ? index : 0 };
|
|
92
|
-
}
|
|
93
|
-
if (recentCount > 0)
|
|
94
|
-
return { group: undefined, index: 0 };
|
|
95
|
-
const groupIndex = providers.indexOf(currentProvider ?? '');
|
|
96
|
-
return { group: undefined, index: groupIndex >= 0 ? groupIndex : 0 };
|
|
80
|
+
const group = providers.includes(currentProvider ?? '') ? currentProvider : providers[0];
|
|
81
|
+
const index = models.filter(model => model.provider === group).findIndex(model => model.id === currentModel && model.provider === currentProvider);
|
|
82
|
+
return { group, index: Math.max(0, index) };
|
|
97
83
|
}
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
* `~/.dsh-tui/model.json` (`provider` + `model` keys) so the choice survives
|
|
4
4
|
* restarts — same pattern as agent-preset.json. The file is best-effort: a
|
|
5
5
|
* missing/corrupt file or an incomplete route simply falls back to the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* deployment default. This preference is the standing user choice and wins
|
|
7
|
+
* over explicit `provider`/`model` keys in cordis.yml, which are the
|
|
8
|
+
* deployment DEFAULT for the first run — but only as a COMPLETE pair, so a
|
|
9
|
+
* config route can never merge with half of this file; the atomic resolution
|
|
10
|
+
* itself lives in modelRoute.ts (issue #67).
|
|
10
11
|
*/
|
|
11
12
|
/** One persisted model route: the provider route plus its model id. */
|
|
12
13
|
export interface ModelPref {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modelPrefs.d.ts","sourceRoot":"","sources":["../../src/modelPrefs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"modelPrefs.d.ts","sourceRoot":"","sources":["../../src/modelPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,uEAAuE;AACvE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAWlE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAkB,GAAG,SAAS,GAAG,SAAS,CAM5E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhG"}
|