@deepseek-harness-tui/dsh-tui 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -17
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +47 -10
- package/guide/dsh-tui-guide/codex-backend.md +26 -4
- package/guide/dsh-tui-guide/configuration.en.md +168 -18
- package/guide/dsh-tui-guide/configuration.md +144 -16
- package/guide/dsh-tui-guide/getting-started.en.md +15 -0
- package/guide/dsh-tui-guide/getting-started.md +15 -0
- package/guide/dsh-tui-guide/interaction.en.md +64 -24
- package/guide/dsh-tui-guide/interaction.md +49 -19
- package/guide/dsh-tui-guide/plugins.en.md +97 -3
- package/guide/dsh-tui-guide/plugins.md +55 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +53 -21
- package/guide/dsh-tui-guide/user-guide.md +43 -22
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/projection.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +4 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +5 -1
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -3
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +56 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +68 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +2 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -2
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/contract.d.ts +3 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -1
- package/lib/types/backends/codex/contract.js +3 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/async-questions.d.ts +17 -0
- package/lib/types/backends/codex/session/async-questions.d.ts.map +1 -0
- package/lib/types/backends/codex/session/async-questions.js +89 -0
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +100 -42
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/items.js +7 -5
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/codex/translate/question-reply.d.ts +11 -0
- package/lib/types/backends/codex/translate/question-reply.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/question-reply.js +53 -0
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +10 -0
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +15 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +58 -10
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +24 -7
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +14 -9
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +109 -15
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PermissionsPicker.d.ts +10 -1
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
- package/lib/types/components/PermissionsPicker.js +24 -16
- package/lib/types/components/PluginInstallPane.d.ts +21 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -0
- package/lib/types/components/PluginInstallPane.js +84 -0
- package/lib/types/components/PluginManagePane.d.ts +21 -0
- package/lib/types/components/PluginManagePane.d.ts.map +1 -0
- package/lib/types/components/PluginManagePane.js +69 -0
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +65 -121
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/SubagentCard.d.ts +13 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +27 -12
- package/lib/types/components/SubagentDashboard.d.ts +8 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +58 -16
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts +14 -1
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +38 -19
- package/lib/types/components/messages/TeamMessageBubble.d.ts +20 -0
- package/lib/types/components/messages/TeamMessageBubble.d.ts.map +1 -0
- package/lib/types/components/messages/TeamMessageBubble.js +15 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelHost.js +5 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts +8 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +11 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +15 -2
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +7 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +4 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +28 -8
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +2 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +156 -21
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +6 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +64 -16
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +15 -5
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +101 -10
- package/lib/types/components/sidePanel/btw/threads.d.ts +18 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/threads.js +51 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +5 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +5 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.js +19 -4
- package/lib/types/components/sidePanel/companion/skins.d.ts +8 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +57 -12
- package/lib/types/components/sidePanel/types.d.ts +7 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashArtRows.d.ts +29 -0
- package/lib/types/components/splashArtRows.d.ts.map +1 -0
- package/lib/types/components/splashArtRows.js +31 -0
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/teamRoster.d.ts +70 -0
- package/lib/types/components/teamRoster.d.ts.map +1 -0
- package/lib/types/components/teamRoster.js +78 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +102 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +301 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/agent-view.js +3 -1
- package/lib/types/dsh-adapter/approvals.d.ts +7 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +45 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +71 -8
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts +31 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-assembly.js +225 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +62 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +78 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +304 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +91 -46
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +60 -3
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +17 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +19 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +79 -6
- package/lib/types/dsh-adapter/channel/compaction.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +100 -26
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +5 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +330 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +109 -30
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +7 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +235 -13
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +48 -29
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +4 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +2 -0
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +60 -30
- package/lib/types/dsh-adapter/channel/session-reset.js +2 -2
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +22 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +136 -5
- package/lib/types/dsh-adapter/channel/state.d.ts +43 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +84 -12
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +20 -3
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts +55 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.js +96 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +4 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +20 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +7 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +8 -1
- package/lib/types/dsh-adapter/entry-slot.d.ts +38 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +226 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +148 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +77 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +112 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +481 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +253 -0
- package/lib/types/dsh-adapter/index.d.ts +53 -17
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +63 -9
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/invariant.d.ts +7 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +6 -3
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/index.js +2 -2
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +41 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +119 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +183 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts +94 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-feed.js +135 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts +115 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-guard.js +108 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-install.d.ts +160 -0
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-install.js +545 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts +178 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manage.js +468 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts +144 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +83 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +918 -234
- package/lib/types/dsh-adapter/plugins-info.d.ts +130 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +469 -44
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts +66 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-projection-store.js +149 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/settingsEditor.js +2 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts +21 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +53 -0
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +112 -9
- package/lib/types/dsh-adapter/team-mode.d.ts +74 -0
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-mode.js +188 -0
- package/lib/types/dsh-adapter/team-roster.d.ts +67 -0
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-roster.js +136 -0
- package/lib/types/dsh-adapter/team-tools.d.ts +58 -0
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-tools.js +208 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +961 -1439
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +443 -387
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts +9 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +23 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +130 -17
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +8 -1
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/permissionPresetLabels.d.ts +25 -0
- package/lib/types/permissionPresetLabels.d.ts.map +1 -0
- package/lib/types/permissionPresetLabels.js +33 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/preset-patch.d.ts +22 -0
- package/lib/types/preset-patch.d.ts.map +1 -0
- package/lib/types/preset-patch.js +14 -0
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +55 -16
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +742 -280
- package/lib/types/screens/Launchpad.d.ts +33 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +256 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +7 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts +68 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts.map +1 -0
- package/lib/types/screens/chat/usePluginWriteFlow.js +92 -0
- package/lib/types/screens/chatOverlay.d.ts +30 -5
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessionModes.d.ts +5 -3
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +9 -3
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/lib/types/utils/paths.d.ts +11 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +13 -0
- package/package.json +150 -114
- package/presets/winbash.mjs +716 -0
- package/tui-profile/feed/README.md +63 -0
- package/tui-profile/feed/first-party.json +10 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { PluginEntryId } from '@deepseek-ai/dsh-plugin-manager/types';
|
|
3
|
+
import { type PluginGuardAction } from './plugin-guard.js';
|
|
4
|
+
import { type PluginManagerView } from './plugin-manager.js';
|
|
5
|
+
/** The three lifecycle actions. */
|
|
6
|
+
export type PluginManageAction = PluginGuardAction;
|
|
7
|
+
/**
|
|
8
|
+
* One target, once it is known. What it carries is what a report or a
|
|
9
|
+
* confirmation pane needs; what gate 2 reads (`removable`, `readOnlyReason`) is
|
|
10
|
+
* read from the snapshot where the decision is made rather than copied in, so
|
|
11
|
+
* the two cannot disagree about one record.
|
|
12
|
+
*/
|
|
13
|
+
export type PluginManageTarget = {
|
|
14
|
+
readonly action: PluginManageAction;
|
|
15
|
+
readonly kind: 'bundle';
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/** The installed version, when the profile knows one. */
|
|
18
|
+
readonly version?: string | undefined;
|
|
19
|
+
/** The rows the bundle's patch inserts, and the rows it overrides. */
|
|
20
|
+
readonly rows: number;
|
|
21
|
+
readonly overrides: number;
|
|
22
|
+
} | {
|
|
23
|
+
readonly action: PluginManageAction;
|
|
24
|
+
readonly kind: 'row';
|
|
25
|
+
readonly entryId: PluginEntryId;
|
|
26
|
+
readonly moduleName: string;
|
|
27
|
+
/** The patch row this entry is addressable as, when it is. */
|
|
28
|
+
readonly patchId?: string | undefined;
|
|
29
|
+
/** Whether the entry is running now, before the action. */
|
|
30
|
+
readonly enabled: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Teammates the team-off question names: known to be running or
|
|
34
|
+
* provisioning (`active`), and those whose run a teammate session cannot see
|
|
35
|
+
* (`unseen`).
|
|
36
|
+
*/
|
|
37
|
+
export interface TeamActiveMembers {
|
|
38
|
+
readonly active: number;
|
|
39
|
+
readonly unseen: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* What the action asks a person, when it asks. Which question it is decides the
|
|
43
|
+
* wording and the risk it names; all three end in the same write.
|
|
44
|
+
*/
|
|
45
|
+
export type PluginManageQuestion =
|
|
46
|
+
/** `remove` of a bundle: destructive, and the profile's own files change. */
|
|
47
|
+
{
|
|
48
|
+
readonly kind: 'remove';
|
|
49
|
+
}
|
|
50
|
+
/** `enable`: the host does not attest the installed code's source. */
|
|
51
|
+
| {
|
|
52
|
+
readonly kind: 'trust';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* `disable` of a row the host layer owns: the entry belongs to `dsh-base`, so
|
|
56
|
+
* switching it off unloads services this application injects.
|
|
57
|
+
*/
|
|
58
|
+
| {
|
|
59
|
+
readonly kind: 'host-row';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* `disable` of the Agent Teams bundle while teammates run, are being
|
|
63
|
+
* created, or may be running unseen (`unseen`, from a teammate session):
|
|
64
|
+
* the team service stops them as it unloads, so the person decides with
|
|
65
|
+
* that in view.
|
|
66
|
+
*/
|
|
67
|
+
| {
|
|
68
|
+
readonly kind: 'team-active';
|
|
69
|
+
readonly members: number;
|
|
70
|
+
readonly unseen: number;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* What `/plugin remove|enable|disable` has to say next. `done` means the flow
|
|
74
|
+
* has reported everything it is going to report: refused, finished or failed.
|
|
75
|
+
*/
|
|
76
|
+
export type PluginManageStep = {
|
|
77
|
+
readonly kind: 'confirm';
|
|
78
|
+
readonly target: PluginManageTarget;
|
|
79
|
+
readonly question: PluginManageQuestion;
|
|
80
|
+
} | {
|
|
81
|
+
readonly kind: 'done';
|
|
82
|
+
};
|
|
83
|
+
/** What the caller of a flow supplies that only the UI knows. */
|
|
84
|
+
export interface PluginManageSink {
|
|
85
|
+
/** The session the flow's output belongs to; see `binding` below. */
|
|
86
|
+
readonly binding: () => number;
|
|
87
|
+
/** Whether a turn is running; see `busy` on the flow's options. */
|
|
88
|
+
readonly busy: () => boolean;
|
|
89
|
+
/** Where the flow's transcript lines go (already sanitized and capped). */
|
|
90
|
+
readonly onLines: (lines: readonly string[]) => void;
|
|
91
|
+
/** See `teamActiveMembers` on the flow's options. */
|
|
92
|
+
readonly teamActiveMembers?: (() => TeamActiveMembers) | undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* What one removal left behind, asked **after** the write succeeded.
|
|
96
|
+
* `undefined` means "not judged": the wiring had no declaration to read the
|
|
97
|
+
* bundle's own identities from, and that is reported rather than passed off as
|
|
98
|
+
* "nothing left". An empty array means "judged, and it left nothing", which is
|
|
99
|
+
* not worth a line.
|
|
100
|
+
*/
|
|
101
|
+
export type PluginResidueWatch = () => readonly string[] | undefined;
|
|
102
|
+
export interface PluginManageFlowOptions {
|
|
103
|
+
readonly manager: PluginManagerView;
|
|
104
|
+
readonly action: PluginManageAction;
|
|
105
|
+
/** The argument text after the subcommand: a bundle name or a row identity. */
|
|
106
|
+
readonly target: string;
|
|
107
|
+
/** The binding generation that asked; every asynchronous write is fenced to it. */
|
|
108
|
+
readonly binding: () => number;
|
|
109
|
+
/**
|
|
110
|
+
* Whether a turn is running. These actions rewrite the profile and apply or
|
|
111
|
+
* reload plugin layers under whatever is running, so the flow refuses while
|
|
112
|
+
* this is true — before the resolution, and again before the write.
|
|
113
|
+
*/
|
|
114
|
+
readonly busy: () => boolean;
|
|
115
|
+
/** Where the flow's transcript lines go (already sanitized and capped). */
|
|
116
|
+
readonly onLines: (lines: readonly string[]) => void;
|
|
117
|
+
/** The profile an action belongs to, for the manual commands. */
|
|
118
|
+
readonly profileName?: string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* The footprint one removal would leave behind. The wiring reads the bundle's
|
|
121
|
+
* package-root declaration while it is still installed and closes over it,
|
|
122
|
+
* which is why the whole watch is handed over before the write and only
|
|
123
|
+
* consulted after it.
|
|
124
|
+
*/
|
|
125
|
+
readonly residueOf?: ((name: string) => PluginResidueWatch | undefined) | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Teammates of the bound session that are running or provisioning, and
|
|
128
|
+
* those that may be running. Read when `disable` resolves to the Agent
|
|
129
|
+
* Teams bundle; absent reads as none.
|
|
130
|
+
*/
|
|
131
|
+
readonly teamActiveMembers?: (() => TeamActiveMembers) | undefined;
|
|
132
|
+
}
|
|
133
|
+
export interface PluginManageFlow {
|
|
134
|
+
/** Resolve the target, run gate 2, and either ask or write straight away. */
|
|
135
|
+
begin(): Promise<PluginManageStep>;
|
|
136
|
+
/** Answer a `confirm` step: proceed with the write. */
|
|
137
|
+
confirm(): Promise<PluginManageStep>;
|
|
138
|
+
/**
|
|
139
|
+
* Release anything the flow holds. Nothing today, and deliberately not a stop
|
|
140
|
+
* button: these three actions have no cancellation, and a write already handed
|
|
141
|
+
* to the service settles on its own (the install flow's `dispose` is the same
|
|
142
|
+
* shape, plus the subscriptions it really does hold).
|
|
143
|
+
*/
|
|
144
|
+
dispose(): void;
|
|
145
|
+
}
|
|
146
|
+
export declare function createPluginManageFlow(options: PluginManageFlowOptions): PluginManageFlow;
|
|
147
|
+
/**
|
|
148
|
+
* The `/plugin remove|enable|disable` entry the screen calls: `/plugin`'s
|
|
149
|
+
* argument text in, a flow out — or `undefined` for anything that is not one of
|
|
150
|
+
* the three forms, and for a launch with no profile plugin service to act
|
|
151
|
+
* through (the screen then runs the read-only report, which is where the CLI
|
|
152
|
+
* route is printed).
|
|
153
|
+
*
|
|
154
|
+
* This is the one place that knows how a removal is wired to the running
|
|
155
|
+
* composition, and the only place that touches the person's own data. The
|
|
156
|
+
* residue watch is built here, **while the bundle is still installed**: the
|
|
157
|
+
* declaration that names its data directory and its plugin identity is a file
|
|
158
|
+
* inside the package, so it is unreadable once the bundle has left.
|
|
159
|
+
*/
|
|
160
|
+
export declare function createPluginManageEntry(ctx: Context, options?: {
|
|
161
|
+
readonly profileName?: string | undefined;
|
|
162
|
+
}): (args: string, sink: PluginManageSink) => PluginManageFlow | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Watch one bundle's own data across its removal: the piece the flow cannot do
|
|
165
|
+
* itself, because the declaration that names the identities lives *inside* the
|
|
166
|
+
* package and is unreadable once the bundle has left the profile.
|
|
167
|
+
*
|
|
168
|
+
* The declaration says who the plugin is: its `id` is the identity the grants
|
|
169
|
+
* file, the effect ledger and the storage namespaces record, and each
|
|
170
|
+
* `x-dsh-tui` Backend contribution's `spec.id` names the `<dataDir>/backends/<id>`
|
|
171
|
+
* directory that backend writes to (`src/utils/paths.ts`). Read now, checked
|
|
172
|
+
* later.
|
|
173
|
+
*
|
|
174
|
+
* `undefined` when there is nothing to read: a bundle that ships no declaration
|
|
175
|
+
* is not evidence of a clean removal, only of an unanswerable question.
|
|
176
|
+
*/
|
|
177
|
+
export declare function residueWatchOf(ctx: Context, name: string, dataRoot?: string): PluginResidueWatch | undefined;
|
|
178
|
+
//# sourceMappingURL=plugin-manage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manage.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/plugin-manage.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAA4B,aAAa,EAAc,MAAM,uCAAuC,CAAA;AAMhH,OAAO,EAEL,KAAK,iBAAiB,EAIvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAI7E,mCAAmC;AACnC,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAA;AAElD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAC1B;IACA,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,yDAAyD;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,GACC;IACA,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAA;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,2DAA2D;IAC3D,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAC1B,CAAA;AAEH;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAID;;;GAGG;AACH,MAAM,MAAM,oBAAoB;AAC9B,6EAA6E;AAC3E;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE;AAC7B,sEAAsE;GACpE;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE;AAC5B;;;GAGG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE;AAC/B;;;;;GAKG;GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAA;CAAE,GAC1G;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7B,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,CAAA;IAC9B,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAA;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAA;IACpD,qDAAqD;IACrD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,MAAM,iBAAiB,CAAC,GAAG,SAAS,CAAA;CACnE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,SAAS,MAAM,EAAE,GAAG,SAAS,CAAA;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,CAAA;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAA;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,KAAK,IAAI,CAAA;IACpD,iEAAiE;IACjE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC,GAAG,SAAS,CAAA;IACnF;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,MAAM,iBAAiB,CAAC,GAAG,SAAS,CAAA;CACnE;AAED,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,KAAK,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClC,uDAAuD;IACvD,OAAO,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACpC;;;;;OAKG;IACH,OAAO,IAAI,IAAI,CAAA;CAChB;AAyGD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,gBAAgB,CAoOzF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GAC1D,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,KAAK,gBAAgB,GAAG,SAAS,CAqBxE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAiB,GAAG,kBAAkB,GAAG,SAAS,CA0BtH"}
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `/plugin remove | enable | disable`: the lifecycle half of the plugin
|
|
3
|
+
* command (Stage C-5).
|
|
4
|
+
*
|
|
5
|
+
* The flow owns the whole conversation with the host service — resolving what
|
|
6
|
+
* the argument names against one snapshot, asking gate 2 whether this
|
|
7
|
+
* application may touch it at all, deciding whether the action is one a person
|
|
8
|
+
* has to confirm, writing through the service and reporting what happened — and
|
|
9
|
+
* it produces the transcript lines for all of it, exactly like the install flow
|
|
10
|
+
* beside it (`./plugin-install.ts`).
|
|
11
|
+
*
|
|
12
|
+
* Four rules shape it:
|
|
13
|
+
*
|
|
14
|
+
* - **Gate 2 runs before anything else, and a refusal makes no service call.**
|
|
15
|
+
* It is the only line between the host's addressable rows and this application
|
|
16
|
+
* switching itself off; a refusal carries the rule it broke, so the caller
|
|
17
|
+
* prints a reason instead of greying a target out.
|
|
18
|
+
* - **Nothing is guessed.** A target is a bundle name, an `entryId`, a
|
|
19
|
+
* `patchId` or a `moduleName`, matched against one `listBundles()` +
|
|
20
|
+
* `listPlugins()` read. A bundle name wins over a row identity, because the
|
|
21
|
+
* two levels mean different things (a bundle is a composition layer, a row is
|
|
22
|
+
* one entry of one) and a name that is both must not quietly become the
|
|
23
|
+
* smaller action. A target nothing matches is reported with what *is*
|
|
24
|
+
* addressable — never resolved by prefix, case or fuzzy match.
|
|
25
|
+
* - **The outcome is what the profile did, not what was asked.** These actions
|
|
26
|
+
* go through the same `change()` funnel as an installation: `changed` says
|
|
27
|
+
* whether the profile's files really moved, `application` says whether the
|
|
28
|
+
* running host took it, and a failure arrives in-band. A write that changed
|
|
29
|
+
* nothing is not dressed up as a success.
|
|
30
|
+
* - **Every asynchronous write is fenced to the binding that asked.** A `/new`
|
|
31
|
+
* or a resume mid-write must not drop the result into the new session's
|
|
32
|
+
* transcript. There is no cancellation surface here — the service offers none
|
|
33
|
+
* for these actions, and each is a profile-level operation that finishes
|
|
34
|
+
* either way, so closing the pane does not stop it.
|
|
35
|
+
*/
|
|
36
|
+
import { existsSync } from 'node:fs';
|
|
37
|
+
import { t } from '../i18n.js';
|
|
38
|
+
import { resolveDshProfileName } from '../update.js';
|
|
39
|
+
import { backendDataDir, DATA_DIR } from '../utils/paths.js';
|
|
40
|
+
import { COMPOSITION_PACKAGE, declaredBackendsOf, pluginDeclarationOf } from './plugin-declaration.js';
|
|
41
|
+
import { failureReasonOf } from './plugin-install.js';
|
|
42
|
+
import { HOST_BUNDLE, pluginGuardVerdict, } from './plugin-guard.js';
|
|
43
|
+
import { pluginManagerOf } from './plugin-manager.js';
|
|
44
|
+
import { cell, parsePluginArgs, pluginFootprintContains } from './plugins-info.js';
|
|
45
|
+
import { TEAM_BUNDLE } from './team-roster.js';
|
|
46
|
+
const NO_TEAM_MEMBERS = { active: 0, unseen: 0 };
|
|
47
|
+
/**
|
|
48
|
+
* What gate 2's refusal says. A table rather than a composed key: an i18n key
|
|
49
|
+
* has to be a literal somebody can find, or the wording of a refusal becomes
|
|
50
|
+
* invisible to the dictionary gate that would catch a missing translation.
|
|
51
|
+
*/
|
|
52
|
+
const REFUSAL_KEYS = {
|
|
53
|
+
'service-locked': 'plugins-manage-refused-service-locked',
|
|
54
|
+
'app-bundle': 'plugins-manage-refused-app-bundle',
|
|
55
|
+
'host-bundle': 'plugins-manage-refused-host-bundle',
|
|
56
|
+
'not-removable': 'plugins-manage-refused-not-removable',
|
|
57
|
+
'row-not-removable': 'plugins-manage-refused-row-not-removable',
|
|
58
|
+
'app-row': 'plugins-manage-refused-app-row',
|
|
59
|
+
};
|
|
60
|
+
/** What an action's own success line calls itself. */
|
|
61
|
+
const APPLIED_KEYS = {
|
|
62
|
+
remove: 'plugins-manage-removed',
|
|
63
|
+
enable: 'plugins-manage-enabled',
|
|
64
|
+
disable: 'plugins-manage-disabled',
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The manual route for a failure, by what the service was asked to do.
|
|
68
|
+
*
|
|
69
|
+
* The CLI has `add` and `remove` and nothing else: enablement is written into
|
|
70
|
+
* the profile's own files (the manifest's `dsh.profile.bundles`,
|
|
71
|
+
* `cordis.patch.yml`'s `disabled`), so for those two the way through is the
|
|
72
|
+
* profile this application runs on — not a command that does not exist. Handing
|
|
73
|
+
* somebody an `enable` verb the CLI rejects would be worse than saying nothing.
|
|
74
|
+
*/
|
|
75
|
+
function manualKeyOf(action) {
|
|
76
|
+
return action === 'remove' ? 'plugins-manage-manual-remove' : 'plugins-manage-manual-profile';
|
|
77
|
+
}
|
|
78
|
+
/** One bundle as a target, from the record the snapshot carried. */
|
|
79
|
+
function bundleTarget(action, bundle) {
|
|
80
|
+
return {
|
|
81
|
+
action,
|
|
82
|
+
kind: 'bundle',
|
|
83
|
+
name: bundle.name,
|
|
84
|
+
version: bundle.version,
|
|
85
|
+
rows: bundle.rows.length,
|
|
86
|
+
overrides: bundle.overrides.length,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** One loader entry as a target, from the record the snapshot carried. */
|
|
90
|
+
function rowTarget(action, plugin) {
|
|
91
|
+
return {
|
|
92
|
+
action,
|
|
93
|
+
kind: 'row',
|
|
94
|
+
entryId: plugin.entryId,
|
|
95
|
+
moduleName: plugin.moduleName,
|
|
96
|
+
patchId: 'patchId' in plugin ? plugin.patchId : undefined,
|
|
97
|
+
enabled: plugin.enabled,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** The same bundle as gate 2 reads it: what the host says about control. */
|
|
101
|
+
function bundleGuardTarget(bundle) {
|
|
102
|
+
return { kind: 'bundle', name: bundle.name, removable: bundle.removable, readOnlyReason: bundle.readOnlyReason };
|
|
103
|
+
}
|
|
104
|
+
/** The same loader entry as gate 2 reads it, given what the snapshot says about its row. */
|
|
105
|
+
function rowGuardTarget(plugin, ownRowIds) {
|
|
106
|
+
const patchId = 'patchId' in plugin ? plugin.patchId : undefined;
|
|
107
|
+
return {
|
|
108
|
+
kind: 'row',
|
|
109
|
+
entryId: plugin.entryId,
|
|
110
|
+
moduleName: plugin.moduleName,
|
|
111
|
+
patchId,
|
|
112
|
+
ownRow: patchId !== undefined && ownRowIds.has(patchId),
|
|
113
|
+
readOnlyReason: plugin.readOnlyReason,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/** The row ids one bundle's patch inserts. An absent bundle answers the empty set. */
|
|
117
|
+
function insertedRowIds(bundles, name) {
|
|
118
|
+
const bundle = bundles.find(candidate => candidate.name === name);
|
|
119
|
+
return bundle === undefined ? new Set() : new Set(bundle.rows.map(row => row.rowId));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The row ids the host layer owns: the rows `dsh-base`'s patch inserts, plus the
|
|
123
|
+
* built-in rows it overrides. Read off the same snapshot as everything else, so
|
|
124
|
+
* no list of row ids lives here to drift from the profile that is actually
|
|
125
|
+
* composed. An absent host layer answers the empty set, which asks nobody.
|
|
126
|
+
*/
|
|
127
|
+
function hostRowIdsOf(bundles) {
|
|
128
|
+
const host = bundles.find(bundle => bundle.name === HOST_BUNDLE);
|
|
129
|
+
if (host === undefined)
|
|
130
|
+
return new Set();
|
|
131
|
+
return new Set([...host.rows.map(row => row.rowId), ...host.overrides]);
|
|
132
|
+
}
|
|
133
|
+
/** What a person could have named instead: the identities the report prints. */
|
|
134
|
+
function addressableNames(bundles, plugins) {
|
|
135
|
+
const names = [
|
|
136
|
+
...bundles.map(bundle => bundle.name),
|
|
137
|
+
...plugins.map(plugin => plugin.moduleName),
|
|
138
|
+
];
|
|
139
|
+
return names.length === 0 ? '—' : [...new Set(names)].join(', ');
|
|
140
|
+
}
|
|
141
|
+
export function createPluginManageFlow(options) {
|
|
142
|
+
const bindingAtStart = options.binding();
|
|
143
|
+
/** The target, once resolved from the one snapshot the flow read. */
|
|
144
|
+
let target;
|
|
145
|
+
/** What the report calls it: its own name, never the argument text. */
|
|
146
|
+
let label = '';
|
|
147
|
+
/** Whether the session that asked is still bound; false drops every write. */
|
|
148
|
+
const live = () => options.binding() === bindingAtStart;
|
|
149
|
+
const emit = (lines) => {
|
|
150
|
+
if (lines.length === 0 || !live())
|
|
151
|
+
return;
|
|
152
|
+
options.onLines(lines);
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* A turn is running: nothing is asked and no service is called. Checked at
|
|
156
|
+
* both ends of the wait — before the resolution, and again before the write —
|
|
157
|
+
* because a turn can start while the pane waits for an answer.
|
|
158
|
+
*/
|
|
159
|
+
function refuseWhileBusy() {
|
|
160
|
+
if (!options.busy())
|
|
161
|
+
return undefined;
|
|
162
|
+
emit([t('plugins-manage-busy')]);
|
|
163
|
+
return { kind: 'done' };
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Resolve the argument against one snapshot, run gate 2, and decide whether to
|
|
167
|
+
* ask. A `done` step means the flow is over: something was reported.
|
|
168
|
+
*
|
|
169
|
+
* A bundle name is matched first and exactly. Only then the row identities, in
|
|
170
|
+
* the order the host itself offers them: `entryId` (which is what
|
|
171
|
+
* `setPluginEnabled` takes), then `patchId`, then the module name — the
|
|
172
|
+
* weakest of the three, but the one a person can read straight off the report.
|
|
173
|
+
*/
|
|
174
|
+
async function decide() {
|
|
175
|
+
let bundles;
|
|
176
|
+
let plugins;
|
|
177
|
+
try {
|
|
178
|
+
bundles = await options.manager.listBundles();
|
|
179
|
+
plugins = await options.manager.listPlugins();
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
emit([t('plugins-service-error', { err: cell(error instanceof Error ? error.message : String(error)) })]);
|
|
183
|
+
return { kind: 'done' };
|
|
184
|
+
}
|
|
185
|
+
const wanted = options.target;
|
|
186
|
+
const bundle = bundles.find(candidate => candidate.name === wanted);
|
|
187
|
+
if (bundle !== undefined) {
|
|
188
|
+
target = bundleTarget(options.action, bundle);
|
|
189
|
+
label = cell(bundle.name);
|
|
190
|
+
return await guardThenDecide(bundleGuardTarget(bundle), () => ask(hostRowIdsOf(bundles)));
|
|
191
|
+
}
|
|
192
|
+
let plugin = plugins.find(candidate => candidate.entryId === wanted)
|
|
193
|
+
?? plugins.find(candidate => 'patchId' in candidate && candidate.patchId === wanted);
|
|
194
|
+
if (plugin === undefined) {
|
|
195
|
+
const matches = plugins.filter(candidate => candidate.moduleName === wanted);
|
|
196
|
+
if (matches.length > 1) {
|
|
197
|
+
emit([t('plugins-manage-ambiguous', {
|
|
198
|
+
target: cell(wanted),
|
|
199
|
+
ids: cell(matches.map(candidate => candidate.entryId).join(', ')),
|
|
200
|
+
})]);
|
|
201
|
+
return { kind: 'done' };
|
|
202
|
+
}
|
|
203
|
+
plugin = matches[0];
|
|
204
|
+
}
|
|
205
|
+
if (plugin !== undefined) {
|
|
206
|
+
target = rowTarget(options.action, plugin);
|
|
207
|
+
label = cell(plugin.moduleName);
|
|
208
|
+
return await guardThenDecide(rowGuardTarget(plugin, insertedRowIds(bundles, COMPOSITION_PACKAGE)), () => ask(hostRowIdsOf(bundles)));
|
|
209
|
+
}
|
|
210
|
+
emit([t('plugins-manage-unknown', {
|
|
211
|
+
target: cell(wanted),
|
|
212
|
+
names: cell(addressableNames(bundles, plugins)),
|
|
213
|
+
})]);
|
|
214
|
+
return { kind: 'done' };
|
|
215
|
+
}
|
|
216
|
+
/** Gate 2, then whatever the action decided to ask (or do) about an allowed target. */
|
|
217
|
+
async function guardThenDecide(guardTarget, allowed) {
|
|
218
|
+
const verdict = pluginGuardVerdict(guardTarget, options.action);
|
|
219
|
+
if (verdict.kind === 'refused') {
|
|
220
|
+
// `service-locked` quotes the host's own word for it; a rule of ours gets
|
|
221
|
+
// reported without one.
|
|
222
|
+
emit([t(REFUSAL_KEYS[verdict.reason], { target: label, reason: cell(guardTarget.readOnlyReason ?? '') })]);
|
|
223
|
+
return { kind: 'done' };
|
|
224
|
+
}
|
|
225
|
+
return allowed();
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Gate 3's routing for the two actions that ask something (C-5).
|
|
229
|
+
*
|
|
230
|
+
* - **`enable`** always asks. `BundleInfo` carries no installation source:
|
|
231
|
+
* a local or Git package can claim the feed's exact name and version, so
|
|
232
|
+
* matching that metadata cannot prove it is a published artifact.
|
|
233
|
+
* - **`remove`** asks about any bundle the guard allowed. The bundles the
|
|
234
|
+
* launcher supplies are `not-removable` and never reach here.
|
|
235
|
+
* - **`disable`** asks only about a row the host layer owns — the one whose
|
|
236
|
+
* removal takes this application's own services down with it. A bundle and a
|
|
237
|
+
* third-party row are reversible and run no new code, so the guard's
|
|
238
|
+
* `allowed` is the whole answer — except the Agent Teams bundle while
|
|
239
|
+
* teammates are active, whose running turns lose their team tools.
|
|
240
|
+
*/
|
|
241
|
+
async function ask(hostRowIds) {
|
|
242
|
+
const resolved = target;
|
|
243
|
+
if (resolved === undefined)
|
|
244
|
+
return { kind: 'done' };
|
|
245
|
+
if (options.action === 'remove')
|
|
246
|
+
return { kind: 'confirm', target: resolved, question: { kind: 'remove' } };
|
|
247
|
+
if (options.action === 'disable') {
|
|
248
|
+
const hostRow = resolved.kind === 'row' && resolved.patchId !== undefined && hostRowIds.has(resolved.patchId);
|
|
249
|
+
if (hostRow)
|
|
250
|
+
return { kind: 'confirm', target: resolved, question: { kind: 'host-row' } };
|
|
251
|
+
const { active, unseen } = resolved.kind === 'bundle' && resolved.name === TEAM_BUNDLE ? options.teamActiveMembers?.() ?? NO_TEAM_MEMBERS : NO_TEAM_MEMBERS;
|
|
252
|
+
return active + unseen > 0 ? { kind: 'confirm', target: resolved, question: { kind: 'team-active', members: active, unseen } } : run();
|
|
253
|
+
}
|
|
254
|
+
return { kind: 'confirm', target: resolved, question: { kind: 'trust' } };
|
|
255
|
+
}
|
|
256
|
+
/** Write through the service, then turn its result into the next step. */
|
|
257
|
+
async function run() {
|
|
258
|
+
const current = target;
|
|
259
|
+
if (current === undefined)
|
|
260
|
+
return { kind: 'done' };
|
|
261
|
+
// The write is the point of no return, and a turn may have started while the
|
|
262
|
+
// pane waited for an answer: re-check here, not only at `begin()`.
|
|
263
|
+
const refused = refuseWhileBusy();
|
|
264
|
+
if (refused !== undefined)
|
|
265
|
+
return refused;
|
|
266
|
+
let residue;
|
|
267
|
+
if (current.kind === 'bundle' && current.action === 'remove') {
|
|
268
|
+
try {
|
|
269
|
+
// The declaration is inside the package that the write removes.
|
|
270
|
+
residue = options.residueOf?.(current.name);
|
|
271
|
+
}
|
|
272
|
+
catch {
|
|
273
|
+
// An unreadable declaration leaves the removal's residue unjudged.
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
let result;
|
|
277
|
+
try {
|
|
278
|
+
result = await write(current);
|
|
279
|
+
}
|
|
280
|
+
catch (error) {
|
|
281
|
+
// The service folds its failures in-band; only a lock or a disposal error
|
|
282
|
+
// rejects, and that still has to leave a readable line behind.
|
|
283
|
+
emit([t('plugins-manage-failed', { reason: cell(error instanceof Error ? error.message : String(error)) })]);
|
|
284
|
+
return { kind: 'done' };
|
|
285
|
+
}
|
|
286
|
+
// None of these three offers a cancellation; a service that reports one
|
|
287
|
+
// anyway has already been reported by whatever stopped it.
|
|
288
|
+
if (result.application === 'cancelled')
|
|
289
|
+
return { kind: 'done' };
|
|
290
|
+
if (result.application === 'failed') {
|
|
291
|
+
const incompatible = result.error?.code === 'incompatible-version' ? result.error.incompatible ?? [] : [];
|
|
292
|
+
emit([
|
|
293
|
+
t('plugins-manage-failed', { reason: failureReasonOf(result) }),
|
|
294
|
+
...incompatible.length === 0 ? [] : [t('plugins-manage-incompatible', {
|
|
295
|
+
packages: incompatible.map(entry => `${cell(entry.name)}@${cell(entry.version)}`).join(', '),
|
|
296
|
+
profile: cell(options.profileName ?? 'dsh-tui'),
|
|
297
|
+
})],
|
|
298
|
+
t(manualKeyOf(current.action), {
|
|
299
|
+
profile: cell(options.profileName ?? 'dsh-tui'),
|
|
300
|
+
target: label,
|
|
301
|
+
}),
|
|
302
|
+
t('plugins-install-rescue'),
|
|
303
|
+
]);
|
|
304
|
+
return { kind: 'done' };
|
|
305
|
+
}
|
|
306
|
+
// A disk no-op says nothing about higher-priority overrides or a pending
|
|
307
|
+
// restart. Only an applied no-op is already in the requested state.
|
|
308
|
+
if (!result.changed && result.application === 'applied') {
|
|
309
|
+
emit([t('plugins-manage-unchanged', { target: label })]);
|
|
310
|
+
return { kind: 'done' };
|
|
311
|
+
}
|
|
312
|
+
const stateKey = result.application === 'restart-required'
|
|
313
|
+
? 'plugins-install-state-restart'
|
|
314
|
+
: result.application === 'overridden' ? 'plugins-install-state-overridden' : 'plugins-install-state-applied';
|
|
315
|
+
emit([
|
|
316
|
+
t(APPLIED_KEYS[current.action], { target: label, state: t(stateKey) }),
|
|
317
|
+
...result.application === 'restart-required' ? [t('plugins-install-restart-hint')] : [],
|
|
318
|
+
]);
|
|
319
|
+
if (current.kind === 'bundle' && current.action === 'remove')
|
|
320
|
+
reportResidue(current.name, residue);
|
|
321
|
+
return { kind: 'done' };
|
|
322
|
+
}
|
|
323
|
+
/** The service call one action makes, with the id shape the service takes. */
|
|
324
|
+
async function write(current) {
|
|
325
|
+
if (current.action === 'remove' && current.kind === 'bundle')
|
|
326
|
+
return options.manager.removeBundle(current.name);
|
|
327
|
+
const enabled = current.action === 'enable';
|
|
328
|
+
if (current.kind === 'bundle')
|
|
329
|
+
return options.manager.setBundleEnabled(current.name, enabled);
|
|
330
|
+
// A row is addressable whenever this is reached: gate 2 refused the rest.
|
|
331
|
+
return options.manager.setPluginEnabled(current.entryId, enabled);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* What one removal left in this profile. The service rolls the profile's own
|
|
335
|
+
* files back; everything under `~/.dsh-tui` — a backend's data directory, its
|
|
336
|
+
* grants, its storage namespaces — is the person's own data and stays.
|
|
337
|
+
* Reported once, deleted by nobody but them (decision D). Silent when the
|
|
338
|
+
* watch judged the removal and found nothing: an "all clean" line on every
|
|
339
|
+
* removal would be noise, and for a bundle that never had a backend it would
|
|
340
|
+
* also answer a question nobody asked.
|
|
341
|
+
*/
|
|
342
|
+
function reportResidue(name, watch) {
|
|
343
|
+
if (watch === undefined) {
|
|
344
|
+
emit([t('plugins-manage-residue-unjudged', { target: cell(name) })]);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
let left;
|
|
348
|
+
try {
|
|
349
|
+
left = watch();
|
|
350
|
+
}
|
|
351
|
+
catch {
|
|
352
|
+
// The check reads the person's own files: a directory it cannot open is
|
|
353
|
+
// "not judged", never "nothing left".
|
|
354
|
+
emit([t('plugins-manage-residue-unjudged', { target: cell(name) })]);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (left === undefined || left.length === 0)
|
|
358
|
+
return;
|
|
359
|
+
emit([t('plugins-manage-residue', { paths: cell(left.join(', ')) })]);
|
|
360
|
+
}
|
|
361
|
+
return {
|
|
362
|
+
async begin() {
|
|
363
|
+
const refused = refuseWhileBusy();
|
|
364
|
+
if (refused !== undefined)
|
|
365
|
+
return refused;
|
|
366
|
+
return decide();
|
|
367
|
+
},
|
|
368
|
+
async confirm() {
|
|
369
|
+
return run();
|
|
370
|
+
},
|
|
371
|
+
dispose() {
|
|
372
|
+
// Nothing subscribed today; see the interface's own note.
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* The `/plugin remove|enable|disable` entry the screen calls: `/plugin`'s
|
|
378
|
+
* argument text in, a flow out — or `undefined` for anything that is not one of
|
|
379
|
+
* the three forms, and for a launch with no profile plugin service to act
|
|
380
|
+
* through (the screen then runs the read-only report, which is where the CLI
|
|
381
|
+
* route is printed).
|
|
382
|
+
*
|
|
383
|
+
* This is the one place that knows how a removal is wired to the running
|
|
384
|
+
* composition, and the only place that touches the person's own data. The
|
|
385
|
+
* residue watch is built here, **while the bundle is still installed**: the
|
|
386
|
+
* declaration that names its data directory and its plugin identity is a file
|
|
387
|
+
* inside the package, so it is unreadable once the bundle has left.
|
|
388
|
+
*/
|
|
389
|
+
export function createPluginManageEntry(ctx, options = {}) {
|
|
390
|
+
return (args, sink) => {
|
|
391
|
+
const parsed = parsePluginArgs(args);
|
|
392
|
+
if (parsed.kind !== 'remove' && parsed.kind !== 'enable' && parsed.kind !== 'disable')
|
|
393
|
+
return undefined;
|
|
394
|
+
if (parsed.target === '')
|
|
395
|
+
return undefined;
|
|
396
|
+
const manager = pluginManagerOf(ctx);
|
|
397
|
+
if (manager === undefined)
|
|
398
|
+
return undefined;
|
|
399
|
+
return createPluginManageFlow({
|
|
400
|
+
manager,
|
|
401
|
+
action: parsed.kind,
|
|
402
|
+
target: parsed.target,
|
|
403
|
+
binding: sink.binding,
|
|
404
|
+
busy: sink.busy,
|
|
405
|
+
onLines: sink.onLines,
|
|
406
|
+
teamActiveMembers: sink.teamActiveMembers,
|
|
407
|
+
profileName: options.profileName ?? resolveDshProfileName(),
|
|
408
|
+
// Only a removal has anything to leave behind, and only a removal has a
|
|
409
|
+
// package to read the declaration from.
|
|
410
|
+
residueOf: parsed.kind === 'remove' ? name => residueWatchOf(ctx, name) : undefined,
|
|
411
|
+
});
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Watch one bundle's own data across its removal: the piece the flow cannot do
|
|
416
|
+
* itself, because the declaration that names the identities lives *inside* the
|
|
417
|
+
* package and is unreadable once the bundle has left the profile.
|
|
418
|
+
*
|
|
419
|
+
* The declaration says who the plugin is: its `id` is the identity the grants
|
|
420
|
+
* file, the effect ledger and the storage namespaces record, and each
|
|
421
|
+
* `x-dsh-tui` Backend contribution's `spec.id` names the `<dataDir>/backends/<id>`
|
|
422
|
+
* directory that backend writes to (`src/utils/paths.ts`). Read now, checked
|
|
423
|
+
* later.
|
|
424
|
+
*
|
|
425
|
+
* `undefined` when there is nothing to read: a bundle that ships no declaration
|
|
426
|
+
* is not evidence of a clean removal, only of an unanswerable question.
|
|
427
|
+
*/
|
|
428
|
+
export function residueWatchOf(ctx, name, dataRoot = DATA_DIR) {
|
|
429
|
+
const declaration = pluginDeclarationOf(ctx, name);
|
|
430
|
+
if (declaration === undefined)
|
|
431
|
+
return undefined;
|
|
432
|
+
let parsed;
|
|
433
|
+
try {
|
|
434
|
+
parsed = JSON.parse(declaration.source);
|
|
435
|
+
}
|
|
436
|
+
catch {
|
|
437
|
+
return undefined;
|
|
438
|
+
}
|
|
439
|
+
const record = parsed !== null && typeof parsed === 'object' ? parsed : undefined;
|
|
440
|
+
const componentId = typeof record?.id === 'string' && record.id !== '' ? record.id : undefined;
|
|
441
|
+
const backendIds = backendIdsIn(record);
|
|
442
|
+
if (componentId === undefined && backendIds.length === 0)
|
|
443
|
+
return undefined;
|
|
444
|
+
return () => {
|
|
445
|
+
const left = [];
|
|
446
|
+
for (const backendId of backendIds) {
|
|
447
|
+
const dir = backendDataDir(backendId, dataRoot);
|
|
448
|
+
if (existsSync(dir))
|
|
449
|
+
left.push(dir);
|
|
450
|
+
}
|
|
451
|
+
// The three footprint sources the grant matrix unions, asked through the
|
|
452
|
+
// same reader that drew it — never by a second one that could disagree.
|
|
453
|
+
if (componentId !== undefined && pluginFootprintContains(componentId, { dataDir: dataRoot })) {
|
|
454
|
+
left.push(t('plugins-manage-residue-footprint', { id: cell(componentId) }));
|
|
455
|
+
}
|
|
456
|
+
return left;
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* The backend ids a declaration contributes. Only a `Backend` entry names one,
|
|
461
|
+
* and only through its validated `spec.id`. The outer `id` identifies the
|
|
462
|
+
* contribution, not the backend whose data directory the host creates. Read
|
|
463
|
+
* through the shared `declaredBackendsOf()` reader, so this watch and the D-1
|
|
464
|
+
* assembly cannot disagree about which entries are backend contributions.
|
|
465
|
+
*/
|
|
466
|
+
function backendIdsIn(record) {
|
|
467
|
+
return [...new Set(declaredBackendsOf(record).backends.map(backend => backend.spec.id))];
|
|
468
|
+
}
|