@deepseek-harness-tui/dsh-tui 0.14.0 → 0.15.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 +73 -14
- 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 +34 -7
- package/guide/dsh-tui-guide/codex-backend.md +17 -2
- package/guide/dsh-tui-guide/configuration.en.md +129 -16
- package/guide/dsh-tui-guide/configuration.md +110 -14
- package/guide/dsh-tui-guide/interaction.en.md +57 -24
- package/guide/dsh-tui-guide/interaction.md +42 -19
- package/guide/dsh-tui-guide/plugins.en.md +36 -3
- package/guide/dsh-tui-guide/plugins.md +21 -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 +51 -20
- package/guide/dsh-tui-guide/user-guide.md +41 -21
- package/lib/settings.json +103 -9
- 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 +3 -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-settings.d.ts +9 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +50 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +21 -0
- package/lib/types/adapter/ports/channel-view.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/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/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/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 +66 -34
- 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.js +4 -4
- 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/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/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 +5 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +47 -8
- 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 +20 -6
- 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.map +1 -1
- package/lib/types/components/LogoV2.js +9 -6
- 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 +18 -5
- 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/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 +58 -118
- 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/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.map +1 -1
- package/lib/types/components/launchpadLayout.js +2 -2
- 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/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +2 -1
- 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/btw/BtwComposer.d.ts +4 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +12 -4
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +59 -15
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +4 -2
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +12 -6
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/types.d.ts +1 -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/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/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 +20 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +256 -0
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +3 -0
- 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-contribution.d.ts +26 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +37 -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 +285 -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 +92 -46
- 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 +16 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +18 -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 +16 -0
- 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 +7 -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 +3 -0
- 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 +318 -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 +41 -22
- 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 +1 -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 +138 -8
- 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 +40 -28
- 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/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 +56 -27
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +15 -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 +2 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +1 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +37 -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 +66 -6
- 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 +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +1 -1
- 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/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 +1 -1
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +15 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts +36 -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 +221 -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 +53 -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 +76 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +106 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +466 -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 +228 -0
- package/lib/types/dsh-adapter/index.d.ts +55 -18
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +59 -7
- 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/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/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 +35 -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 +21 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +53 -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-manager.d.ts +68 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +51 -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 +870 -233
- package/lib/types/dsh-adapter/plugins-info.d.ts +44 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +354 -34
- 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-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/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 +110 -8
- 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/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 +363 -1432
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +155 -385
- 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/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 +129 -16
- 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/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- 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 +22 -15
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +442 -272
- package/lib/types/screens/Launchpad.d.ts +27 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +241 -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 +6 -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/chatOverlay.d.ts +11 -4
- 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/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/package.json +36 -6
- package/presets/winbash.mjs +716 -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
|
@@ -2,6 +2,8 @@ import { addUsageToCostBuckets, cloneCostBuckets, emptyCostBuckets, isDeepSeekOf
|
|
|
2
2
|
import { toolResultPayload } from './compat/messages.js';
|
|
3
3
|
const MAX_OUTPUT_EVENTS = 160;
|
|
4
4
|
const MAX_OUTPUT_LINES = 160;
|
|
5
|
+
/** Keyed labels parked before their row exists (see `earlyLabels`). */
|
|
6
|
+
const MAX_EARLY_LABELS = 64;
|
|
5
7
|
export class SubagentActivityStore {
|
|
6
8
|
states = new Map();
|
|
7
9
|
sessionToAgent = new Map();
|
|
@@ -13,6 +15,17 @@ export class SubagentActivityStore {
|
|
|
13
15
|
costUnpriced = emptyCostBuckets();
|
|
14
16
|
/** 每个 agent 已消费的最大 durable 事件 seq(同一事件重投不重复计费)。 */
|
|
15
17
|
costSeq = new Map();
|
|
18
|
+
/** 描述的来源。spawn 首帧的描述来自一条**无身份**的 FIFO 队列(并发派发
|
|
19
|
+
* 时可能是别的 child 的),只有 childId-keyed 的权威 label
|
|
20
|
+
* (`subagent/catalog`、子会话 `subagent/descriptor`)能定案:`bound`
|
|
21
|
+
* 之后不再改写,`queue`/`placeholder` 允许被 label 覆盖。 */
|
|
22
|
+
descriptionSource = new Map();
|
|
23
|
+
/** keyed label 可能比它那一行先到:子会话的 `subagent/descriptor` 在会话
|
|
24
|
+
* 链接建立之前就已投递。丢掉它,这一行就只剩队列猜出来的名字,而外部
|
|
25
|
+
* 子代理上游不写 catalog ⇒ 没有第二条 keyed 事实来救,永久错名。先寄存在
|
|
26
|
+
* 这里,建行时直接当描述用:keyed 事实不因到达先后而失效。有界,理由同
|
|
27
|
+
* 队列(没人建行时不能无界增长)。 */
|
|
28
|
+
earlyLabels = new Map();
|
|
16
29
|
commitLine(agentId, kind, text) {
|
|
17
30
|
const state = this.states.get(agentId);
|
|
18
31
|
if (!state)
|
|
@@ -29,11 +42,26 @@ export class SubagentActivityStore {
|
|
|
29
42
|
}
|
|
30
43
|
onSpawned(agentId, provider = 'subagent', model, info = {}) {
|
|
31
44
|
const existing = this.states.get(agentId);
|
|
45
|
+
// A term off the identity-less spawn queue may belong to a concurrent
|
|
46
|
+
// delegation, so it never overrides a description a keyed fact already
|
|
47
|
+
// settled. The caller still consumes (shifts) the term either way — the
|
|
48
|
+
// FIFO has no identity to hand back, and leaving it at the head would only
|
|
49
|
+
// misalign the next spawn.
|
|
50
|
+
const fromQueue = info.descriptionFromQueue === true;
|
|
51
|
+
const description = fromQueue && this.descriptionSource.get(agentId) === 'bound' ? undefined : info.description;
|
|
52
|
+
// A keyed label that outran its row (see `earlyLabels`) carries the same
|
|
53
|
+
// authority as a live one: the row is born settled, and the queue term the
|
|
54
|
+
// same spawn consumed is dropped instead of shown.
|
|
55
|
+
const keyed = this.earlyLabels.get(agentId);
|
|
56
|
+
if (keyed !== undefined)
|
|
57
|
+
this.earlyLabels.delete(agentId);
|
|
58
|
+
const settled = keyed ?? description;
|
|
59
|
+
const source = keyed !== undefined ? 'bound' : description === undefined ? 'placeholder' : fromQueue ? 'queue' : 'bound';
|
|
32
60
|
if (!existing) {
|
|
33
61
|
this.states.set(agentId, {
|
|
34
62
|
agentId,
|
|
35
63
|
runId: info.runId ?? agentId,
|
|
36
|
-
description:
|
|
64
|
+
description: settled ?? `${provider} task`,
|
|
37
65
|
provider,
|
|
38
66
|
model: model ?? info.model ?? provider,
|
|
39
67
|
effort: info.effort,
|
|
@@ -47,6 +75,7 @@ export class SubagentActivityStore {
|
|
|
47
75
|
toolCalls: [],
|
|
48
76
|
...(info.parentAgentId === undefined ? {} : { parentAgentId: info.parentAgentId }),
|
|
49
77
|
});
|
|
78
|
+
this.descriptionSource.set(agentId, source);
|
|
50
79
|
this.notify();
|
|
51
80
|
return;
|
|
52
81
|
}
|
|
@@ -54,7 +83,11 @@ export class SubagentActivityStore {
|
|
|
54
83
|
// new epoch announces a NEW runId (the host's `subagent/start` pairing
|
|
55
84
|
// key). A runId change therefore opens a fresh run: the previous epoch's
|
|
56
85
|
// terminal state, timing, output and tools must not leak into it. The
|
|
57
|
-
//
|
|
86
|
+
// description is the one thing a new epoch does not own *once a keyed
|
|
87
|
+
// label settled it*: that label outranks the queue and survives every
|
|
88
|
+
// epoch (see the guard above), while a row still living on a queue guess
|
|
89
|
+
// takes the new epoch's term like any other fresh run. The same runId
|
|
90
|
+
// re-announced only refreshes display metadata.
|
|
58
91
|
if (info.runId !== undefined && info.runId !== existing.runId) {
|
|
59
92
|
this.streams.delete(agentId);
|
|
60
93
|
existing.runId = info.runId;
|
|
@@ -69,7 +102,9 @@ export class SubagentActivityStore {
|
|
|
69
102
|
existing.outputEvents = [];
|
|
70
103
|
existing.toolCalls = [];
|
|
71
104
|
existing.tokens = undefined;
|
|
72
|
-
existing.description =
|
|
105
|
+
existing.description = settled ?? existing.description;
|
|
106
|
+
if (settled !== undefined)
|
|
107
|
+
this.descriptionSource.set(agentId, source);
|
|
73
108
|
existing.local = info.local ?? existing.local;
|
|
74
109
|
existing.provider = provider;
|
|
75
110
|
existing.model = model ?? existing.model;
|
|
@@ -81,8 +116,10 @@ export class SubagentActivityStore {
|
|
|
81
116
|
else {
|
|
82
117
|
existing.provider = provider;
|
|
83
118
|
existing.model = model ?? existing.model;
|
|
84
|
-
if (
|
|
85
|
-
existing.description =
|
|
119
|
+
if (settled !== undefined) {
|
|
120
|
+
existing.description = settled;
|
|
121
|
+
this.descriptionSource.set(agentId, source);
|
|
122
|
+
}
|
|
86
123
|
if (info.local !== undefined)
|
|
87
124
|
existing.local = info.local;
|
|
88
125
|
if (info.parentAgentId !== undefined && existing.parentAgentId === undefined)
|
|
@@ -90,6 +127,43 @@ export class SubagentActivityStore {
|
|
|
90
127
|
}
|
|
91
128
|
this.notify();
|
|
92
129
|
}
|
|
130
|
+
/** Park a keyed label whose row does not exist yet — a child session's
|
|
131
|
+
* `subagent/descriptor` can be published before the host's spawn edge, and
|
|
132
|
+
* dropping it there would leave the row with the identity-less queue's
|
|
133
|
+
* guess and no second keyed fact to correct it (an external child gets no
|
|
134
|
+
* catalog). `onSpawned` adopts it when the row is created. Bounded: when
|
|
135
|
+
* full, the oldest parked label goes first — the least likely to still be
|
|
136
|
+
* waiting for its row. */
|
|
137
|
+
holdKeyedLabel(agentId, label) {
|
|
138
|
+
if (typeof label !== 'string' || label === '')
|
|
139
|
+
return;
|
|
140
|
+
if (!this.earlyLabels.has(agentId) && this.earlyLabels.size >= MAX_EARLY_LABELS) {
|
|
141
|
+
const oldest = this.earlyLabels.keys().next().value;
|
|
142
|
+
if (oldest !== undefined)
|
|
143
|
+
this.earlyLabels.delete(oldest);
|
|
144
|
+
}
|
|
145
|
+
this.earlyLabels.set(agentId, label);
|
|
146
|
+
}
|
|
147
|
+
/** Bind the authoritative description of one child (a `subagent/catalog`
|
|
148
|
+
* label or a child session's own `subagent/descriptor`). The identity-less
|
|
149
|
+
* spawn queue may have handed this row a concurrent delegation's term, so
|
|
150
|
+
* the keyed fact wins, once, until it is the source of truth for this row.
|
|
151
|
+
* Returns whether the displayed description changed. */
|
|
152
|
+
describeFromLabel(agentId, label) {
|
|
153
|
+
if (typeof label !== 'string' || label === '')
|
|
154
|
+
return false;
|
|
155
|
+
// A row-less call has no display to correct: the projection parks such a
|
|
156
|
+
// label before it gets here (`holdKeyedLabel`) and the row adopts it when
|
|
157
|
+
// it is created.
|
|
158
|
+
const state = this.states.get(agentId);
|
|
159
|
+
if (state === undefined || this.descriptionSource.get(agentId) === 'bound')
|
|
160
|
+
return false;
|
|
161
|
+
this.descriptionSource.set(agentId, 'bound');
|
|
162
|
+
if (state.description === label)
|
|
163
|
+
return false;
|
|
164
|
+
state.description = label;
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
93
167
|
/** Durable discovery (`subagent/catalog`, workflow member events, registry
|
|
94
168
|
* back-fill): register a child WITHOUT disturbing an already-tracked run.
|
|
95
169
|
* `live` marks a child the agents registry currently holds, which keeps the
|
|
@@ -99,16 +173,25 @@ export class SubagentActivityStore {
|
|
|
99
173
|
const existing = this.states.get(agentId);
|
|
100
174
|
if (existing !== undefined) {
|
|
101
175
|
// A bus edge usually created the row first; the durable catalog fact
|
|
102
|
-
// still carries the
|
|
176
|
+
// still carries the two things the edge never knows — the mode, and the
|
|
177
|
+
// childId-keyed label that a queue-derived description only guessed at.
|
|
178
|
+
let changed = false;
|
|
103
179
|
if (info.mode !== undefined && existing.mode === undefined) {
|
|
104
180
|
existing.mode = info.mode;
|
|
105
|
-
|
|
181
|
+
changed = true;
|
|
106
182
|
}
|
|
183
|
+
if (this.describeFromLabel(agentId, info.label))
|
|
184
|
+
changed = true;
|
|
185
|
+
if (changed)
|
|
186
|
+
this.notify();
|
|
107
187
|
return;
|
|
108
188
|
}
|
|
189
|
+
// An empty label is not a fact: the row keeps a visible placeholder that a
|
|
190
|
+
// later real label can still replace.
|
|
191
|
+
const label = typeof info.label === 'string' && info.label !== '' ? info.label : undefined;
|
|
109
192
|
this.states.set(agentId, {
|
|
110
193
|
agentId,
|
|
111
|
-
description:
|
|
194
|
+
description: label ?? `${info.provider ?? 'subagent'} task`,
|
|
112
195
|
provider: info.provider ?? 'subagent',
|
|
113
196
|
model: info.model ?? info.provider,
|
|
114
197
|
status: info.live ? 'running' : 'unknown',
|
|
@@ -119,6 +202,7 @@ export class SubagentActivityStore {
|
|
|
119
202
|
outputEvents: [],
|
|
120
203
|
toolCalls: [],
|
|
121
204
|
});
|
|
205
|
+
this.descriptionSource.set(agentId, label === undefined ? 'placeholder' : 'bound');
|
|
122
206
|
this.notify();
|
|
123
207
|
}
|
|
124
208
|
linkSession(agentId, session) {
|
|
@@ -130,6 +214,11 @@ export class SubagentActivityStore {
|
|
|
130
214
|
}
|
|
131
215
|
getSubagentIdBySession(session) { return this.sessionToAgent.get(session); }
|
|
132
216
|
has(agentId) { return this.states.has(agentId); }
|
|
217
|
+
/** The run key of one tracked child: its current epoch's key, or `undefined`
|
|
218
|
+
* when the row is tracked but has no run fact yet (a durable discovery row
|
|
219
|
+
* carries none). That is the same value an untracked child yields, so a
|
|
220
|
+
* caller that must tell the two apart asks `has()` as well. */
|
|
221
|
+
runIdOf(agentId) { return this.states.get(agentId)?.runId; }
|
|
133
222
|
appendOutput(agentId, text, kind = 'text') {
|
|
134
223
|
const state = this.states.get(agentId);
|
|
135
224
|
if (!state || !text)
|
|
@@ -303,6 +392,14 @@ export class SubagentActivityStore {
|
|
|
303
392
|
}
|
|
304
393
|
break;
|
|
305
394
|
}
|
|
395
|
+
case 'subagent/descriptor': {
|
|
396
|
+
// The child session's own durable self-description: the same keyed
|
|
397
|
+
// label the parent catalog carries, usable once the session link
|
|
398
|
+
// exists.
|
|
399
|
+
if (this.describeFromLabel(agentId, data.label))
|
|
400
|
+
this.notify();
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
306
403
|
default:
|
|
307
404
|
break;
|
|
308
405
|
}
|
|
@@ -313,6 +410,9 @@ export class SubagentActivityStore {
|
|
|
313
410
|
if (!state)
|
|
314
411
|
return;
|
|
315
412
|
Object.assign(state, partial);
|
|
413
|
+
// A description handed in directly is authoritative, never a queue guess.
|
|
414
|
+
if (partial.description !== undefined)
|
|
415
|
+
this.descriptionSource.set(agentId, 'bound');
|
|
316
416
|
this.notify();
|
|
317
417
|
}
|
|
318
418
|
/** One-line preview of a tool-result content block (text or item list). */
|
|
@@ -447,6 +547,8 @@ export class SubagentActivityStore {
|
|
|
447
547
|
this.costByModel.clear();
|
|
448
548
|
this.costUnpriced = emptyCostBuckets();
|
|
449
549
|
this.costSeq.clear();
|
|
550
|
+
this.descriptionSource.clear();
|
|
551
|
+
this.earlyLabels.clear();
|
|
450
552
|
this.notify();
|
|
451
553
|
}
|
|
452
554
|
snapshot() { return Array.from(this.states.values()).map(state => ({ ...state, output: [...state.output], outputEvents: [...state.outputEvents], toolCalls: state.toolCalls.map(tool => ({ ...tool })), tokens: state.tokens ? { ...state.tokens } : undefined })); }
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `dsh-tui` settings namespace served from the TUI's own document
|
|
3
|
+
* (../tuiSettingsFile.ts) instead of the DSH profile, so every kernel reads and writes one user layer. Same shape as
|
|
4
|
+
* the settings service the plugin and channel already consume; every other
|
|
5
|
+
* namespace goes to `delegate` (the host's settings service, when mounted).
|
|
6
|
+
*/
|
|
7
|
+
import type Schema from '@deepseek-ai/schemastery';
|
|
8
|
+
import type { SettingsNamespaceWarning } from '../adapter/ports/channel-settings.js';
|
|
9
|
+
type PathOp = {
|
|
10
|
+
readonly op: 'set';
|
|
11
|
+
readonly path: readonly string[];
|
|
12
|
+
readonly value: unknown;
|
|
13
|
+
} | {
|
|
14
|
+
readonly op: 'unset';
|
|
15
|
+
readonly path: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
interface Descriptor {
|
|
18
|
+
readonly ns: string;
|
|
19
|
+
readonly revision: number;
|
|
20
|
+
readonly applies: 'live' | 'restart';
|
|
21
|
+
readonly value?: unknown;
|
|
22
|
+
readonly user?: unknown;
|
|
23
|
+
/** A fault in the settings document itself, when there is one. */
|
|
24
|
+
readonly warning?: SettingsNamespaceWarning;
|
|
25
|
+
}
|
|
26
|
+
/** The settings service as the plugin and the channel consume it. */
|
|
27
|
+
export interface TuiSettingsService {
|
|
28
|
+
register<T>(ns: string, schema: Schema<T>): {
|
|
29
|
+
get(): T;
|
|
30
|
+
watch(callback: (next: T) => void): () => void;
|
|
31
|
+
};
|
|
32
|
+
describe(options?: {
|
|
33
|
+
redactSecrets?: boolean;
|
|
34
|
+
}): readonly Descriptor[];
|
|
35
|
+
mutate(ns: string, ops: readonly PathOp[], expectedRevision?: number): Promise<void>;
|
|
36
|
+
get(ns: string): unknown;
|
|
37
|
+
}
|
|
38
|
+
/** What the composite forwards other namespaces to (structural). */
|
|
39
|
+
export interface DelegateSettings {
|
|
40
|
+
describe(options?: {
|
|
41
|
+
redactSecrets?: boolean;
|
|
42
|
+
}): readonly Descriptor[];
|
|
43
|
+
mutate(ns: string, ops: readonly PathOp[], expectedRevision?: number): Promise<void>;
|
|
44
|
+
get?(ns: string): unknown;
|
|
45
|
+
}
|
|
46
|
+
export declare function createTuiSettingsService(input: {
|
|
47
|
+
/** The namespace this service owns (the plugin's settings namespace). */
|
|
48
|
+
readonly ns: string;
|
|
49
|
+
readonly file?: string;
|
|
50
|
+
readonly profile: string;
|
|
51
|
+
/** The editable Config keys (what the import may take from the profile). */
|
|
52
|
+
readonly keys: readonly string[];
|
|
53
|
+
/** Read per call: the host's own settings service may register late. */
|
|
54
|
+
readonly delegate?: () => DelegateSettings | undefined;
|
|
55
|
+
}): TuiSettingsService;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=tui-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-settings.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/tui-settings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAOlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AAEpF,KAAK,MAAM,GACP;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAA;AAE9D,UAAU,UAAU;IAClB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;IACvB,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,wBAAwB,CAAA;CAC5C;AAED,qEAAqE;AACrE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC;QAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;KAAE,CAAA;IACxG,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,UAAU,EAAE,CAAA;IACtE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpF,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,UAAU,EAAE,CAAA;IACtE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpF,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;CAC1B;AA4FD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,yEAAyE;IACzE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,gBAAgB,GAAG,SAAS,CAAA;CACvD,GAAG,kBAAkB,CAsFrB"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { logForDebugging } from '../utils/debug.js';
|
|
2
|
+
import { isRecord } from '../backends/shared/jsonl.js';
|
|
3
|
+
import { mkdirSync } from 'node:fs';
|
|
4
|
+
import { dirname } from 'node:path';
|
|
5
|
+
import { withFileLock } from '@deepseek-ai/dsh-atomic-write';
|
|
6
|
+
import { backupUnreadableTuiSettings, createTuiSettings, mergeSettingsLayers, profilePatchPath, readLegacyTuiSettings, readProfileTuiSettings, readTuiSettings, TUI_SETTINGS_FILE, writeTuiSettings } from '../tuiSettingsFile.js';
|
|
7
|
+
/** A stale-revision write, in the error shape the settings screen retries on. */
|
|
8
|
+
class SettingsConflictError extends Error {
|
|
9
|
+
code = 'SETTINGS_CONFLICT';
|
|
10
|
+
}
|
|
11
|
+
/** Apply one path op to a detached sparse layer; empty parents are pruned. */
|
|
12
|
+
function applySettingsOp(layer, op) {
|
|
13
|
+
const [head, ...rest] = op.path;
|
|
14
|
+
if (head === undefined) {
|
|
15
|
+
return op.op === 'set' && isRecord(op.value) ? { ...op.value } : {};
|
|
16
|
+
}
|
|
17
|
+
const next = { ...layer };
|
|
18
|
+
if (rest.length === 0) {
|
|
19
|
+
if (op.op === 'set')
|
|
20
|
+
next[head] = op.value;
|
|
21
|
+
else
|
|
22
|
+
delete next[head];
|
|
23
|
+
return next;
|
|
24
|
+
}
|
|
25
|
+
const child = isRecord(layer[head]) ? layer[head] : {};
|
|
26
|
+
const updated = applySettingsOp(child, op.op === 'set' ? { op: 'set', path: rest, value: op.value } : { op: 'unset', path: rest });
|
|
27
|
+
if (Object.keys(updated).length === 0)
|
|
28
|
+
delete next[head];
|
|
29
|
+
else
|
|
30
|
+
next[head] = updated;
|
|
31
|
+
return next;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The first boot without a document imports the profile patch's `dsh-tui`
|
|
35
|
+
* row and an older host's `settings.yaml` section (once per source; only the
|
|
36
|
+
* first of concurrent imports is written). A pending `settings.yaml` is the
|
|
37
|
+
* user layer above the row, as on those hosts; one DSH already moved into the
|
|
38
|
+
* patch (`.imported`) sits beneath it, since the patch may be newer. A later
|
|
39
|
+
* boot under a profile whose patch the document was not imported from lays
|
|
40
|
+
* that row beneath the user layer (explicit values always win) and records
|
|
41
|
+
* the new source — the first profile no longer pins the document forever.
|
|
42
|
+
*/
|
|
43
|
+
function loadTuiSettings(input) {
|
|
44
|
+
const file = input.file ?? TUI_SETTINGS_FILE;
|
|
45
|
+
const existing = readTuiSettings(file);
|
|
46
|
+
if (existing !== undefined) {
|
|
47
|
+
const patch = profilePatchPath(input.profile);
|
|
48
|
+
// 'none' names no source; anything else is a list of imported paths.
|
|
49
|
+
const sources = existing.imported?.from === undefined || existing.imported.from === 'none' ? [] : existing.imported.from.split(', ');
|
|
50
|
+
// An unreadable document keeps this boot's copy; one already carrying
|
|
51
|
+
// this profile's patch (or none at all, `imported`-less) is adopted as is.
|
|
52
|
+
if (existing.imported === undefined || existing.imported.from === 'unreadable' || sources.includes(patch))
|
|
53
|
+
return existing;
|
|
54
|
+
const row = readProfileTuiSettings(patch, input.keys);
|
|
55
|
+
if (row === undefined)
|
|
56
|
+
return existing;
|
|
57
|
+
const reimported = (document) => ({
|
|
58
|
+
version: 1,
|
|
59
|
+
values: mergeSettingsLayers(row, document.values),
|
|
60
|
+
imported: { from: `${document.imported?.from}, ${patch}`, at: Date.now() },
|
|
61
|
+
});
|
|
62
|
+
try {
|
|
63
|
+
// Re-read as late as possible: another process may have written since
|
|
64
|
+
// the first read, and its keys must survive the merge. Not under the
|
|
65
|
+
// writer lock — like the first import, the merge only ever adds keys.
|
|
66
|
+
const fresh = readTuiSettings(file) ?? existing;
|
|
67
|
+
if (fresh.imported === undefined || fresh.imported.from === 'unreadable' || (fresh.imported.from !== 'none' && fresh.imported.from.split(', ').includes(patch)))
|
|
68
|
+
return fresh;
|
|
69
|
+
const next = reimported(fresh);
|
|
70
|
+
writeTuiSettings(next, file);
|
|
71
|
+
return next;
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
// Still usable for this boot; the next one retries the re-import.
|
|
75
|
+
logForDebugging(`dsh-tui: settings re-import for "${input.profile}" could not be saved (${error instanceof Error ? error.message : String(error)})`);
|
|
76
|
+
return reimported(existing);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const patch = profilePatchPath(input.profile);
|
|
80
|
+
const row = readProfileTuiSettings(patch, input.keys);
|
|
81
|
+
const legacy = readLegacyTuiSettings(input.ns, input.keys);
|
|
82
|
+
const values = legacy === undefined
|
|
83
|
+
? row ?? {}
|
|
84
|
+
: legacy.pending ? mergeSettingsLayers(row ?? {}, legacy.values) : mergeSettingsLayers(legacy.values, row ?? {});
|
|
85
|
+
const sources = [...(row === undefined ? [] : [patch]), ...(legacy === undefined ? [] : [legacy.from])];
|
|
86
|
+
const document = { version: 1, values, imported: { from: sources.length === 0 ? 'none' : sources.join(', '), at: Date.now() } };
|
|
87
|
+
try {
|
|
88
|
+
// Two first launches race here: the later one adopts the document the
|
|
89
|
+
// earlier one created rather than replacing it.
|
|
90
|
+
if (!createTuiSettings(document, file))
|
|
91
|
+
return readTuiSettings(file) ?? document;
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
// Still usable for this boot; the next one retries the import.
|
|
95
|
+
logForDebugging(`dsh-tui: settings import could not be saved (${error instanceof Error ? error.message : String(error)})`);
|
|
96
|
+
}
|
|
97
|
+
return document;
|
|
98
|
+
}
|
|
99
|
+
export function createTuiSettingsService(input) {
|
|
100
|
+
const file = input.file ?? TUI_SETTINGS_FILE;
|
|
101
|
+
let document = loadTuiSettings({ file, ns: input.ns, profile: input.profile, keys: input.keys });
|
|
102
|
+
/** A fault in the document, shown through `describe` so callers (the
|
|
103
|
+
* settings screen's badges) can see it without a debug flag. */
|
|
104
|
+
let warning = document.imported?.from === 'unreadable' ? { id: 'unreadable' } : undefined;
|
|
105
|
+
let revision = 0;
|
|
106
|
+
let schema;
|
|
107
|
+
const watchers = new Set();
|
|
108
|
+
/** The resolved value: the user layer through the registered schema's
|
|
109
|
+
* defaults (an invalid layer resolves to the defaults alone). */
|
|
110
|
+
const resolved = () => {
|
|
111
|
+
if (schema === undefined)
|
|
112
|
+
return document.values;
|
|
113
|
+
try {
|
|
114
|
+
return schema(document.values);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
logForDebugging(`dsh-tui: settings.json does not validate (${error instanceof Error ? error.message : String(error)}); using defaults`);
|
|
118
|
+
try {
|
|
119
|
+
return schema({});
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return {};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const own = { ns: input.ns, revision: 0, applies: 'live' };
|
|
127
|
+
const describeOwn = () => ({ ...own, revision, value: resolved(), user: document.values, ...(warning === undefined ? {} : { warning }) });
|
|
128
|
+
return {
|
|
129
|
+
register(ns, registered) {
|
|
130
|
+
if (ns !== input.ns)
|
|
131
|
+
throw new Error(`dsh-tui: settings namespace "${ns}" is not served here`);
|
|
132
|
+
schema = registered;
|
|
133
|
+
return {
|
|
134
|
+
get: () => resolved(),
|
|
135
|
+
watch(callback) {
|
|
136
|
+
const watcher = (next) => { callback(next); };
|
|
137
|
+
watchers.add(watcher);
|
|
138
|
+
return () => { watchers.delete(watcher); };
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
describe(options) {
|
|
143
|
+
const others = input.delegate?.()?.describe(options).filter(row => row.ns !== input.ns) ?? [];
|
|
144
|
+
return [describeOwn(), ...others];
|
|
145
|
+
},
|
|
146
|
+
async mutate(ns, ops, expectedRevision) {
|
|
147
|
+
if (ns !== input.ns) {
|
|
148
|
+
const delegate = input.delegate?.();
|
|
149
|
+
if (delegate === undefined)
|
|
150
|
+
throw new Error(`dsh-tui: no settings namespace "${ns}"`);
|
|
151
|
+
return delegate.mutate(ns, ops, expectedRevision);
|
|
152
|
+
}
|
|
153
|
+
if (expectedRevision !== undefined && expectedRevision !== revision) {
|
|
154
|
+
throw new SettingsConflictError(`dsh-tui: settings changed (revision ${revision}, expected ${expectedRevision})`);
|
|
155
|
+
}
|
|
156
|
+
// Apply onto the file as it is now: another dsh-tui process may have
|
|
157
|
+
// written since boot (an unreadable file keeps this process's copy).
|
|
158
|
+
// The lock spans the re-read and the replace, so concurrent writers of
|
|
159
|
+
// different keys both land (its `<file>.lock` sibling needs the directory).
|
|
160
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
161
|
+
await withFileLock(file, async () => {
|
|
162
|
+
const latest = readTuiSettings(file);
|
|
163
|
+
if (latest !== undefined && latest.imported?.from !== 'unreadable') {
|
|
164
|
+
document = latest;
|
|
165
|
+
}
|
|
166
|
+
else if (latest?.imported?.from === 'unreadable') {
|
|
167
|
+
// The first write over a document this boot could not parse must
|
|
168
|
+
// never destroy the original bytes: keep them beside the file (a
|
|
169
|
+
// failed backup aborts the write — the settings screen reports it).
|
|
170
|
+
const backup = backupUnreadableTuiSettings(file);
|
|
171
|
+
warning = { id: 'recovered', backup };
|
|
172
|
+
logForDebugging(`dsh-tui: settings.json was unreadable; the original bytes were kept at ${backup}`);
|
|
173
|
+
}
|
|
174
|
+
const values = ops.reduce((layer, op) => applySettingsOp(layer, op), { ...document.values });
|
|
175
|
+
// The unreadable marker describes the file as read, not as rewritten.
|
|
176
|
+
const { imported, ...rest } = document;
|
|
177
|
+
const next = { ...rest, values, ...(imported === undefined || imported.from === 'unreadable' ? {} : { imported }) };
|
|
178
|
+
writeTuiSettings(next, file);
|
|
179
|
+
document = next;
|
|
180
|
+
});
|
|
181
|
+
revision += 1;
|
|
182
|
+
const value = resolved();
|
|
183
|
+
for (const watcher of [...watchers]) {
|
|
184
|
+
try {
|
|
185
|
+
watcher(value);
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
logForDebugging(`dsh-tui: settings watcher failed (${error instanceof Error ? error.message : String(error)})`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
get(ns) {
|
|
193
|
+
if (ns === input.ns)
|
|
194
|
+
return resolved();
|
|
195
|
+
const delegate = input.delegate?.();
|
|
196
|
+
return delegate?.get?.(ns) ?? delegate?.describe().find(row => row.ns === ns)?.value;
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
@@ -17,9 +17,12 @@ export declare function readEffortPref(dir?: string): string | undefined;
|
|
|
17
17
|
* Default reasoning-effort precedence for sessions that do not carry their
|
|
18
18
|
* own choice: the /settings 默认推理强度 user layer (`settings.yaml
|
|
19
19
|
* dsh-tui.effortDefault`; the plugin folds the `auto` option to undefined
|
|
20
|
-
* before calling), then
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* before calling), then this persisted `/effort` file — the level the last
|
|
21
|
+
* session actually ran on — then the cordis.yml `effort` value, which is the
|
|
22
|
+
* deployment DEFAULT beneath the user's standing choice, then the
|
|
23
|
+
* adapter/model default (undefined). Mirrors the lang chain for its first
|
|
24
|
+
* two layers (settings user layer > lang.json) and the last-used rule the
|
|
25
|
+
* model route follows.
|
|
23
26
|
* @param settingsDefault - settings user-layer level (undefined = auto).
|
|
24
27
|
* @param configured - cordis.yml `effort` value, if any.
|
|
25
28
|
* @param persisted - The /effort choice, if any.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED
|
|
1
|
+
{"version":3,"file":"effortPrefs.d.ts","sourceRoot":"","sources":["../../src/effortPrefs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAkB,GAAG,MAAM,GAAG,SAAS,CAS1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAEpB;AAOD;;;;;+EAK+E;AAC/E,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA8C,CAAA;AAElG;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAgBtG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAE,MAAkB,GAAG,OAAO,CAQhF"}
|
package/lib/types/effortPrefs.js
CHANGED
|
@@ -32,16 +32,19 @@ export function readEffortPref(dir = PREFS_DIR) {
|
|
|
32
32
|
* Default reasoning-effort precedence for sessions that do not carry their
|
|
33
33
|
* own choice: the /settings 默认推理强度 user layer (`settings.yaml
|
|
34
34
|
* dsh-tui.effortDefault`; the plugin folds the `auto` option to undefined
|
|
35
|
-
* before calling), then
|
|
36
|
-
*
|
|
37
|
-
*
|
|
35
|
+
* before calling), then this persisted `/effort` file — the level the last
|
|
36
|
+
* session actually ran on — then the cordis.yml `effort` value, which is the
|
|
37
|
+
* deployment DEFAULT beneath the user's standing choice, then the
|
|
38
|
+
* adapter/model default (undefined). Mirrors the lang chain for its first
|
|
39
|
+
* two layers (settings user layer > lang.json) and the last-used rule the
|
|
40
|
+
* model route follows.
|
|
38
41
|
* @param settingsDefault - settings user-layer level (undefined = auto).
|
|
39
42
|
* @param configured - cordis.yml `effort` value, if any.
|
|
40
43
|
* @param persisted - The /effort choice, if any.
|
|
41
44
|
* @returns The winning level id, or undefined for the adapter default.
|
|
42
45
|
*/
|
|
43
46
|
export function resolveEffortDefault(settingsDefault, configured, persisted) {
|
|
44
|
-
return settingsDefault ??
|
|
47
|
+
return settingsDefault ?? persisted ?? configured;
|
|
45
48
|
}
|
|
46
49
|
/** Standard effort-tier order, weakest to strongest (`xhigh` sits between
|
|
47
50
|
* `high` and `max`, matching the ladder the kernels accept — see
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type KernelBackendId } from './kernelPrefs.js';
|
|
2
|
+
export declare function hostProfile(env?: NodeJS.ProcessEnv): string;
|
|
3
|
+
/** The `backend` the profile patch's dsh-tui row pins, if any (the Config
|
|
4
|
+
* row a DSH composition would read). `'dynamic'`: a `!!js` expression only
|
|
5
|
+
* the profile's own Loader can evaluate; one that only forwards
|
|
6
|
+
* DSH_TUI_BACKEND is no pin. */
|
|
7
|
+
export declare function configuredBackend(profile: string, patchFile?: string): KernelBackendId | 'dynamic' | undefined;
|
|
8
|
+
/** Whether the entry hands this launch to `dsh --profile`: a dynamic Config
|
|
9
|
+
* row decides the kernel there, unless a kernel-switch handoff outranks it. */
|
|
10
|
+
export declare function delegatesToProfile(configured: KernelBackendId | 'dynamic' | undefined, env?: NodeJS.ProcessEnv): boolean;
|
|
11
|
+
/** The kernel this launch boots on, ranked as in the plugin (handoff → Config
|
|
12
|
+
* row → DSH_TUI_BACKEND → kernel.json → dsh). An id that is not installed
|
|
13
|
+
* falls back to dsh like a typo, so the entry never mounts an unloadable kernel. */
|
|
14
|
+
export declare function entryKernel(env?: NodeJS.ProcessEnv, input?: {
|
|
15
|
+
readonly configured?: KernelBackendId | 'dynamic';
|
|
16
|
+
readonly memoryFile?: string;
|
|
17
|
+
}): KernelBackendId;
|
|
18
|
+
//# sourceMappingURL=hostEntryRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostEntryRoute.d.ts","sourceRoot":"","sources":["../../src/hostEntryRoute.ts"],"names":[],"mappings":"AAMA,OAAO,EAAwF,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAO7I,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGxE;AAMD;;;iCAGiC;AACjC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAkC,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,CAYzI;AAED;gFACgF;AAChF,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAErI;AAED;;qFAEqF;AACrF,wBAAgB,WAAW,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,KAAK,GAAE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACjD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,eAAe,CAUvB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which kernel the package's entry boots (docs/standalone-host-design.md).
|
|
3
|
+
* The launcher repeats the cheap half inline; the entry decides again here
|
|
4
|
+
* with the profile patch's Config row, which only it can afford to read.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
7
|
+
import { KERNEL_SWITCH_HANDOFF_ENV, parseBackendId, readKernelPrefs, resolveRememberedBackend } from './kernelPrefs.js';
|
|
8
|
+
import { isRegisteredBackend, parseBackendChoice } from './dsh-adapter/backend-registry.js';
|
|
9
|
+
import { profilePatchPath, readProfileTuiSettings } from './tuiSettingsFile.js';
|
|
10
|
+
/** The profile the launcher would have started (`dsh --profile <name>`). */
|
|
11
|
+
const HOST_PROFILE_ENV = 'DSH_TUI_PROFILE';
|
|
12
|
+
export function hostProfile(env = process.env) {
|
|
13
|
+
const name = env[HOST_PROFILE_ENV]?.trim();
|
|
14
|
+
return name === undefined || name === '' ? 'dsh-tui' : name;
|
|
15
|
+
}
|
|
16
|
+
/** An expression that only forwards DSH_TUI_BACKEND (the bundle row's own
|
|
17
|
+
* form): the entry already ranks that variable, right below the row. */
|
|
18
|
+
const ENV_BACKEND_EXPRESSION = /^\s*process\.env\.DSH_TUI_BACKEND\s*(?:(?:\|\||\?\?)\s*undefined\s*)?$/u;
|
|
19
|
+
/** The `backend` the profile patch's dsh-tui row pins, if any (the Config
|
|
20
|
+
* row a DSH composition would read). `'dynamic'`: a `!!js` expression only
|
|
21
|
+
* the profile's own Loader can evaluate; one that only forwards
|
|
22
|
+
* DSH_TUI_BACKEND is no pin. */
|
|
23
|
+
export function configuredBackend(profile, patchFile = profilePatchPath(profile)) {
|
|
24
|
+
// Most patches never mention it: skip the YAML parse then.
|
|
25
|
+
try {
|
|
26
|
+
if (!existsSync(patchFile) || !readFileSync(patchFile, 'utf8').includes('backend'))
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const expressions = new Map();
|
|
33
|
+
const backend = readProfileTuiSettings(patchFile, ['backend'], expressions)?.backend;
|
|
34
|
+
const expression = expressions.get('backend');
|
|
35
|
+
if (expression !== undefined)
|
|
36
|
+
return ENV_BACKEND_EXPRESSION.test(expression) ? undefined : 'dynamic';
|
|
37
|
+
return parseBackendChoice(backend);
|
|
38
|
+
}
|
|
39
|
+
/** Whether the entry hands this launch to `dsh --profile`: a dynamic Config
|
|
40
|
+
* row decides the kernel there, unless a kernel-switch handoff outranks it. */
|
|
41
|
+
export function delegatesToProfile(configured, env = process.env) {
|
|
42
|
+
return configured === 'dynamic' && parseBackendId(env[KERNEL_SWITCH_HANDOFF_ENV]) === undefined;
|
|
43
|
+
}
|
|
44
|
+
/** The kernel this launch boots on, ranked as in the plugin (handoff → Config
|
|
45
|
+
* row → DSH_TUI_BACKEND → kernel.json → dsh). An id that is not installed
|
|
46
|
+
* falls back to dsh like a typo, so the entry never mounts an unloadable kernel. */
|
|
47
|
+
export function entryKernel(env = process.env, input = {}) {
|
|
48
|
+
const handoff = parseBackendId(env[KERNEL_SWITCH_HANDOFF_ENV]);
|
|
49
|
+
const memory = readKernelPrefs(input.memoryFile).backend;
|
|
50
|
+
return resolveRememberedBackend({
|
|
51
|
+
...(handoff === undefined ? {} : { handoff }),
|
|
52
|
+
...(input.configured === undefined || input.configured === 'dynamic' ? {} : { configured: input.configured }),
|
|
53
|
+
envRaw: env.DSH_TUI_BACKEND,
|
|
54
|
+
envKnown: isRegisteredBackend,
|
|
55
|
+
memory: isRegisteredBackend(memory) ? memory : undefined,
|
|
56
|
+
});
|
|
57
|
+
}
|