@deepseek-harness-tui/dsh-tui 0.16.1 → 0.18.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 +213 -34
- package/assets/plugin-icon.svg +13 -0
- package/assets/windows-installer.cs +308 -0
- package/assets/windows-installer.ps1 +17 -0
- package/bin/dsh-tui.js +64 -5
- package/cli/adapters/dsh/index.mjs +111 -0
- package/cli/adapters/dsh/locate.mjs +73 -0
- package/cli/adapters/dsh/management-plugin.mjs +111 -0
- package/cli/args.mjs +154 -0
- package/cli/contracts.d.ts +48 -0
- package/cli/engine.mjs +92 -0
- package/cli/entry.mjs +48 -0
- package/cli/process.mjs +118 -0
- package/cli/protocol.mjs +23 -0
- package/cli/schema-v1.json +33 -0
- package/cordis.patch.yml +3 -1
- package/cordis.yml +3 -1
- package/guide/dsh-tui-guide/SKILL.md +1 -0
- package/guide/dsh-tui-guide/cli.en.md +114 -0
- package/guide/dsh-tui-guide/cli.md +114 -0
- package/guide/dsh-tui-guide/configuration.en.md +7 -5
- package/guide/dsh-tui-guide/configuration.md +7 -5
- package/guide/dsh-tui-guide/getting-started.en.md +33 -3
- package/guide/dsh-tui-guide/getting-started.md +23 -2
- package/guide/dsh-tui-guide/interaction.en.md +50 -17
- package/guide/dsh-tui-guide/interaction.md +35 -13
- package/guide/dsh-tui-guide/plugins.en.md +63 -11
- package/guide/dsh-tui-guide/plugins.md +41 -7
- package/guide/dsh-tui-guide/user-guide.en.md +55 -34
- package/guide/dsh-tui-guide/user-guide.md +45 -28
- package/lib/settings.json +85 -42
- package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
- package/lib/types/adapter/channel/plugins.js +8 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +2 -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/ports/channel-display.d.ts +10 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +2 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +11 -1
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +7 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.d.ts +60 -0
- package/lib/types/adapter/standard/grants.d.ts.map +1 -1
- package/lib/types/adapter/standard/grants.js +74 -0
- package/lib/types/agent/capabilities.d.ts +2 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +15 -1
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/api.d.ts +2 -2
- package/lib/types/api.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
- package/lib/types/backends/claude/translate/events.js +2 -1
- package/lib/types/backends/codex/auth/status.js +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +6 -5
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/events.js +3 -1
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +9 -8
- package/lib/types/channel/history-restore.d.ts.map +1 -1
- package/lib/types/channel/history-restore.js +2 -0
- package/lib/types/channel/interaction.d.ts.map +1 -1
- package/lib/types/channel/interaction.js +1 -0
- package/lib/types/channel/projection.d.ts +1 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +19 -4
- package/lib/types/channel/questions.d.ts +2 -0
- package/lib/types/channel/questions.d.ts.map +1 -1
- package/lib/types/channel/sanitize.d.ts +14 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +55 -0
- package/lib/types/channel/working-directory.d.ts +9 -0
- package/lib/types/channel/working-directory.d.ts.map +1 -0
- package/lib/types/channel/working-directory.js +7 -0
- package/lib/types/commands.d.ts +8 -1
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +14 -5
- package/lib/types/components/ChatTitle.d.ts +7 -0
- package/lib/types/components/ChatTitle.d.ts.map +1 -0
- package/lib/types/components/ChatTitle.js +15 -0
- package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
- package/lib/types/components/CodeBlockFrame.js +10 -5
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
- package/lib/types/components/CompactionStatusRow.js +24 -3
- package/lib/types/components/GoalTodoPanel.d.ts +73 -6
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +165 -17
- package/lib/types/components/Markdown.d.ts +9 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +5 -4
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +20 -14
- package/lib/types/components/PluginGrantList.d.ts +45 -0
- package/lib/types/components/PluginGrantList.d.ts.map +1 -0
- package/lib/types/components/PluginGrantList.js +126 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
- package/lib/types/components/PluginInstallPane.js +35 -6
- package/lib/types/components/PluginManagePane.d.ts.map +1 -1
- package/lib/types/components/PluginManagePane.js +65 -8
- package/lib/types/components/PromptInput.d.ts +13 -5
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +190 -108
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +232 -22
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +10 -0
- package/lib/types/components/SubagentDetailScene.d.ts +3 -1
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +17 -1
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +8 -5
- package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
- package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
- package/lib/types/components/approvals/ApprovalPanel.js +93 -11
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +24 -11
- package/lib/types/components/onboardingModel.d.ts +2 -2
- package/lib/types/components/onboardingModel.js +3 -3
- package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
- package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
- package/lib/types/components/onboardingProviderPlan.js +78 -0
- package/lib/types/components/previewRows.d.ts +19 -0
- package/lib/types/components/previewRows.d.ts.map +1 -0
- package/lib/types/components/previewRows.js +46 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
- package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +18 -10
- package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/InfoPanel.js +4 -3
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
- package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +16 -0
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +8 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +8 -1
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
- package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +36 -18
- package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
- package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
- package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
- package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
- package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
- package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
- package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
- package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
- package/lib/types/components/sidePanel/types.d.ts +2 -0
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +39 -7
- package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
- package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
- package/lib/types/components/trajectory/MiniWake.js +7 -3
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
- package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
- package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/session.js +62 -6
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +18 -4
- package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +11 -1
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +121 -113
- package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-mentions.js +38 -17
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -5
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +48 -3
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +7 -0
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +2 -1
- package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +192 -13
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +31 -5
- package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-actions.js +34 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +31 -4
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mentions.js +21 -7
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +11 -9
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +56 -36
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +3 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +3 -1
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
- package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +2 -2
- package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
- package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
- package/lib/types/dsh-adapter/contract.d.ts +7 -5
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +10 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +1 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/experimental-bundles.d.ts +29 -0
- package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
- package/lib/types/dsh-adapter/experimental-bundles.js +15 -0
- package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
- package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
- package/lib/types/dsh-adapter/grant-file.js +178 -0
- package/lib/types/dsh-adapter/host-access.d.ts +4 -0
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +54 -4
- package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
- package/lib/types/dsh-adapter/host-contract.js +2 -2
- package/lib/types/dsh-adapter/host-dsh.js +3 -3
- package/lib/types/dsh-adapter/index.d.ts +8 -4
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +17 -12
- package/lib/types/dsh-adapter/panels.d.ts +28 -8
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +11 -56
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-install.js +160 -13
- package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-manage.js +240 -51
- package/lib/types/dsh-adapter/plugin.d.ts +81 -0
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +378 -84
- package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +99 -31
- package/lib/types/dsh-adapter/presets.d.ts +19 -6
- package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/presets.js +69 -12
- package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
- package/lib/types/dsh-adapter/process-exit.js +1 -1
- package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +11 -5
- package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
- package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
- package/lib/types/dsh-adapter/row-attachment.js +29 -0
- package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
- package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-tools.js +39 -0
- package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +73 -0
- package/lib/types/dsh-adapter/status.d.ts +88 -1
- package/lib/types/dsh-adapter/status.d.ts.map +1 -1
- package/lib/types/dsh-adapter/status.js +318 -3
- package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
- package/lib/types/dsh-adapter/team-mode.js +76 -112
- package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
- package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
- package/lib/types/dsh-adapter/worktree-tool.js +87 -0
- package/lib/types/extensions.d.ts +1 -1
- package/lib/types/extensions.d.ts.map +1 -1
- package/lib/types/force-production-react.js +3 -3
- package/lib/types/heldInputs.d.ts +36 -0
- package/lib/types/heldInputs.d.ts.map +1 -0
- package/lib/types/heldInputs.js +173 -0
- package/lib/types/i18n.d.ts +543 -73
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +265 -46
- package/lib/types/ink/colorize.d.ts +7 -1
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +29 -8
- package/lib/types/ink/components/App.d.ts +2 -1
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +10 -3
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +1 -0
- package/lib/types/ink/dom.d.ts +1 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
- package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
- package/lib/types/ink/hooks/use-program-status.js +96 -0
- package/lib/types/ink/ink.d.ts +13 -4
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +119 -25
- package/lib/types/ink/output.d.ts +17 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +85 -2
- package/lib/types/ink/parse-keypress.d.ts +1 -0
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +5 -4
- package/lib/types/ink/render-node-to-output.d.ts +2 -0
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +79 -10
- package/lib/types/ink/root.d.ts +8 -0
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/root.js +12 -3
- package/lib/types/ink/screen.d.ts +11 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +44 -0
- package/lib/types/ink/selection.d.ts +7 -2
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +187 -44
- package/lib/types/ink/shutdown-input.d.ts +15 -0
- package/lib/types/ink/shutdown-input.d.ts.map +1 -0
- package/lib/types/ink/shutdown-input.js +28 -0
- package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
- package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
- package/lib/types/ink/sixel-cursor-heal.js +62 -0
- package/lib/types/ink/sixel-graphics.d.ts +6 -0
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +18 -0
- package/lib/types/ink/styles.d.ts +8 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
- package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification-windows.js +433 -0
- package/lib/types/ink/terminal-notification.d.ts +3 -1
- package/lib/types/ink/terminal-notification.d.ts.map +1 -1
- package/lib/types/ink/terminal-notification.js +4 -1
- package/lib/types/ink/terminal-querier.d.ts +9 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +32 -1
- package/lib/types/ink/terminal.d.ts +23 -2
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +32 -2
- package/lib/types/ink/termio/osc.d.ts +2 -1
- package/lib/types/ink/termio/osc.d.ts.map +1 -1
- package/lib/types/ink/termio/osc.js +37 -8
- package/lib/types/ink/termio/osc7501.d.ts +102 -0
- package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
- package/lib/types/ink/termio/osc7501.js +229 -0
- package/lib/types/ink/termio/tokenize.js +5 -7
- package/lib/types/onboardingDraft.d.ts +143 -0
- package/lib/types/onboardingDraft.d.ts.map +1 -0
- package/lib/types/onboardingDraft.js +71 -0
- package/lib/types/panels.d.ts +1 -1
- package/lib/types/panels.d.ts.map +1 -1
- package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
- package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
- package/lib/types/screens/AgentTranscriptScene.js +5 -1
- package/lib/types/screens/Chat.d.ts +6 -6
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +394 -141
- package/lib/types/screens/Launchpad.d.ts +8 -2
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +32 -12
- package/lib/types/screens/Onboarding.d.ts +22 -3
- package/lib/types/screens/Onboarding.d.ts.map +1 -1
- package/lib/types/screens/Onboarding.js +606 -36
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +31 -21
- package/lib/types/screens/Settings.d.ts +5 -1
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +528 -51
- package/lib/types/screens/StatusLine.d.ts +9 -3
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +91 -15
- package/lib/types/screens/StatusMetrics.d.ts +2 -11
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +20 -14
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
- 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 +13 -21
- package/lib/types/sessionMounts.d.ts +14 -0
- package/lib/types/sessionMounts.d.ts.map +1 -1
- package/lib/types/sessionMounts.js +20 -9
- package/lib/types/sessions/format.d.ts +39 -0
- package/lib/types/sessions/format.d.ts.map +1 -1
- package/lib/types/sessions/format.js +83 -0
- package/lib/types/sessions/resumeFailure.d.ts +4 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
- package/lib/types/sessions/resumeFailure.js +12 -4
- package/lib/types/sessions/workspaceCounts.d.ts +6 -0
- package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
- package/lib/types/sessions/workspaceCounts.js +24 -0
- package/lib/types/settings/definitions.d.ts +24 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +40 -15
- package/lib/types/tips.js +2 -2
- package/lib/types/tuiDisplayPrefs.d.ts +113 -5
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +276 -14
- package/lib/types/update.d.ts +15 -14
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +163 -115
- package/lib/types/updateProcess.d.ts +28 -0
- package/lib/types/updateProcess.d.ts.map +1 -0
- package/lib/types/updateProcess.js +135 -0
- package/lib/types/utils/inputWordBoundary.d.ts +5 -0
- package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
- package/lib/types/utils/inputWordBoundary.js +18 -0
- package/lib/types/utils/keymap.d.ts +1 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +6 -1
- package/lib/types/utils/paths.d.ts +15 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +25 -0
- package/lib/types/windowsInstaller.d.ts +4 -0
- package/lib/types/windowsInstaller.d.ts.map +1 -0
- package/lib/types/windowsInstaller.js +237 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +130 -111
- package/presets/liangshen/custom-bash.mjs +13 -1
- package/presets/liangshen/instruction-hint.mjs +4 -1
- package/presets/liangshen/skill-search.mjs +14 -2
- package/presets/winbash.mjs +16 -4
- package/tui-profile/feed/README.md +17 -8
- package/tui-profile/feed/first-party.json +1 -1
|
@@ -76,18 +76,17 @@ export interface PluginFootprintOverrides {
|
|
|
76
76
|
* storage namespaces ('host'/'undeclared' ledger identities are not
|
|
77
77
|
* plugins and are excluded). */
|
|
78
78
|
export declare function pluginFootprints(paths: PluginFootprintPaths): string[];
|
|
79
|
+
/** Which of the three sources still names one plugin id. */
|
|
80
|
+
export declare function pluginFootprintSourcesOf(pluginId: string, overrides?: PluginFootprintOverrides): {
|
|
81
|
+
readonly grants: boolean;
|
|
82
|
+
readonly ledger: boolean;
|
|
83
|
+
readonly storage: boolean;
|
|
84
|
+
};
|
|
79
85
|
/**
|
|
80
86
|
* The three footprint sources, resolved the way the diagnostics resolve them
|
|
81
87
|
* (test overrides first, else the packaged locations under `~/.dsh-tui`).
|
|
82
88
|
*/
|
|
83
89
|
export declare function pluginFootprintPaths(overrides?: PluginFootprintOverrides): PluginFootprintPaths;
|
|
84
|
-
/**
|
|
85
|
-
* Whether one plugin id still has a footprint in this profile: a grants-file
|
|
86
|
-
* key, an effect-ledger record, or a storage namespace. The same three sources
|
|
87
|
-
* the matrix unions — a removal that left something behind is read here rather
|
|
88
|
-
* than by a second reader that could disagree with the report (C-5).
|
|
89
|
-
*/
|
|
90
|
-
export declare function pluginFootprintContains(pluginId: string, overrides?: PluginFootprintOverrides): boolean;
|
|
91
90
|
/** Which form of the command the raw argument text asks for. */
|
|
92
91
|
export type PluginArgs = {
|
|
93
92
|
readonly kind: 'overview';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-info.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/plugins-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAYH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,EAA2C,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":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AE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAaxD;AAED,0DAA0D;AAC1D,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,GAAG,MAAM,EAAE,CAuG9E;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAClD,mBAAmB,CAMrB;AA+ND,sFAAsF;AACtF,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,iBAAiB,GAAG,SAAS,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BnB;AAED,+EAA+E;AAC/E,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,iBAAiB,GAAG,SAAS,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CAEnB"}
|
|
@@ -40,6 +40,7 @@ import { loadSpecData } from '../adapter/standard/registry.js';
|
|
|
40
40
|
import { createContractIndex, validatePlugin, negotiate } from '../adapter/standard/admission.js';
|
|
41
41
|
import { cleanScalarText } from './sanitize.js';
|
|
42
42
|
import { isCompositionOwned, pluginDeclarationIn } from './plugin-declaration.js';
|
|
43
|
+
import { TUI_EXPERIMENTAL_BUNDLES } from './experimental-bundles.js';
|
|
43
44
|
import { extraBundles, localizedPluginText } from './plugin-manager.js';
|
|
44
45
|
import { PLUGIN_STORAGE_DIR } from './plugin-storage.js';
|
|
45
46
|
import { EFFECT_LEDGER_NAME } from './effect-ledger.js';
|
|
@@ -135,11 +136,16 @@ function readLedgerRecords(file) {
|
|
|
135
136
|
}
|
|
136
137
|
return records;
|
|
137
138
|
}
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
/**
|
|
140
|
+
* Read the three sources once. {@link pluginFootprints} and
|
|
141
|
+
* {@link pluginFootprintSourcesOf} both go through this, so the matrix, the
|
|
142
|
+
* "is anything left" check and the per-source residue report cannot disagree
|
|
143
|
+
* about what counts as a footprint.
|
|
144
|
+
*/
|
|
145
|
+
function pluginFootprintSourceSets(paths) {
|
|
146
|
+
const grants = new Set();
|
|
147
|
+
const ledger = new Set();
|
|
148
|
+
const storage = new Set();
|
|
143
149
|
try {
|
|
144
150
|
const raw = JSON.parse(readFileSync(join(paths.dataDir, 'extension-grants.json'), 'utf8'));
|
|
145
151
|
if (raw !== null && typeof raw === 'object') {
|
|
@@ -147,7 +153,7 @@ export function pluginFootprints(paths) {
|
|
|
147
153
|
for (const section of [table.grants, table.denies]) {
|
|
148
154
|
if (section !== null && typeof section === 'object') {
|
|
149
155
|
for (const plugin of Object.keys(section))
|
|
150
|
-
|
|
156
|
+
grants.add(plugin);
|
|
151
157
|
}
|
|
152
158
|
}
|
|
153
159
|
}
|
|
@@ -158,7 +164,7 @@ export function pluginFootprints(paths) {
|
|
|
158
164
|
}
|
|
159
165
|
for (const record of readLedgerRecords(paths.ledgerFile)) {
|
|
160
166
|
if (typeof record.pluginId === 'string' && record.pluginId !== '' && record.pluginId !== 'host' && record.pluginId !== 'undeclared') {
|
|
161
|
-
|
|
167
|
+
ledger.add(record.pluginId);
|
|
162
168
|
}
|
|
163
169
|
}
|
|
164
170
|
try {
|
|
@@ -167,13 +173,29 @@ export function pluginFootprints(paths) {
|
|
|
167
173
|
continue;
|
|
168
174
|
const namespace = decodeURIComponent(entry.slice(0, -'.json'.length));
|
|
169
175
|
if (namespace !== '')
|
|
170
|
-
|
|
176
|
+
storage.add(namespace);
|
|
171
177
|
}
|
|
172
178
|
}
|
|
173
179
|
catch {
|
|
174
180
|
// No storage directory yet: no rows from this source.
|
|
175
181
|
}
|
|
176
|
-
return
|
|
182
|
+
return { grants, ledger, storage };
|
|
183
|
+
}
|
|
184
|
+
/** The plugin set for the matrix: grants-file keys ∪ ledger pluginIds ∪
|
|
185
|
+
* storage namespaces ('host'/'undeclared' ledger identities are not
|
|
186
|
+
* plugins and are excluded). */
|
|
187
|
+
export function pluginFootprints(paths) {
|
|
188
|
+
const sources = pluginFootprintSourceSets(paths);
|
|
189
|
+
return [...new Set([...sources.grants, ...sources.ledger, ...sources.storage])].sort();
|
|
190
|
+
}
|
|
191
|
+
/** Which of the three sources still names one plugin id. */
|
|
192
|
+
export function pluginFootprintSourcesOf(pluginId, overrides = {}) {
|
|
193
|
+
const sources = pluginFootprintSourceSets(pluginFootprintPaths(overrides));
|
|
194
|
+
return {
|
|
195
|
+
grants: sources.grants.has(pluginId),
|
|
196
|
+
ledger: sources.ledger.has(pluginId),
|
|
197
|
+
storage: sources.storage.has(pluginId),
|
|
198
|
+
};
|
|
177
199
|
}
|
|
178
200
|
/**
|
|
179
201
|
* The three footprint sources, resolved the way the diagnostics resolve them
|
|
@@ -187,15 +209,6 @@ export function pluginFootprintPaths(overrides = {}) {
|
|
|
187
209
|
storageDir: overrides.storageDir ?? join(dataDir, PLUGIN_STORAGE_DIR),
|
|
188
210
|
};
|
|
189
211
|
}
|
|
190
|
-
/**
|
|
191
|
-
* Whether one plugin id still has a footprint in this profile: a grants-file
|
|
192
|
-
* key, an effect-ledger record, or a storage namespace. The same three sources
|
|
193
|
-
* the matrix unions — a removal that left something behind is read here rather
|
|
194
|
-
* than by a second reader that could disagree with the report (C-5).
|
|
195
|
-
*/
|
|
196
|
-
export function pluginFootprintContains(pluginId, overrides = {}) {
|
|
197
|
-
return pluginFootprints(pluginFootprintPaths(overrides)).includes(pluginId);
|
|
198
|
-
}
|
|
199
212
|
/** `/plugin check <path>`: official parse/projection + profile validation + negotiation. */
|
|
200
213
|
function checkManifestLines(pathArg, deps) {
|
|
201
214
|
const lines = [];
|
|
@@ -260,9 +273,10 @@ function checkManifestLines(pathArg, deps) {
|
|
|
260
273
|
const decision = negotiate(index, manifest, host.descriptor, granted);
|
|
261
274
|
lines.push(...decisionLines(decision));
|
|
262
275
|
if (decision.decision === 'waiting_authorization') {
|
|
263
|
-
// Close the loop on the five-state vocabulary: the user sees not just
|
|
264
|
-
//
|
|
265
|
-
//
|
|
276
|
+
// Close the loop on the five-state vocabulary: the user sees not just the
|
|
277
|
+
// state but the exact file + shape that flips it. `/plugin install` and
|
|
278
|
+
// `/plugin enable` are the interactive grant path; this hint stays for the
|
|
279
|
+
// static `check <path>` route, which may run with no live service.
|
|
266
280
|
lines.push(t('plugins-check-grant-hint', {
|
|
267
281
|
id: cell(manifest.id),
|
|
268
282
|
perms: cell(decision.deniedPermissions.join(', ')),
|
|
@@ -562,19 +576,73 @@ function bundleLine(deps, bundle, options = {}) {
|
|
|
562
576
|
function needsDeclarationLegend(deps, bundles) {
|
|
563
577
|
return bundles.some(bundle => !isCompositionOwned(bundle.name) && deps.declaration?.(bundle.name) === undefined);
|
|
564
578
|
}
|
|
565
|
-
/**
|
|
579
|
+
/**
|
|
580
|
+
* The TUI experimental features this installation supplies, in catalog order.
|
|
581
|
+
* A bundle the profile itself added (`installed: true`) is the person's own
|
|
582
|
+
* plugin and stays in the "you added" section; only the installation-supplied
|
|
583
|
+
* half is advertised here.
|
|
584
|
+
*/
|
|
585
|
+
function experimentalEntries(bundles) {
|
|
586
|
+
return TUI_EXPERIMENTAL_BUNDLES.flatMap(entry => {
|
|
587
|
+
const bundle = bundles.find(candidate => candidate.name === entry.name && candidate.optional && !candidate.installed);
|
|
588
|
+
return bundle === undefined ? [] : [{ bundle, hint: entry.hint }];
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
/** The switch line and the usage hint of one experimental bundle, when readable. */
|
|
592
|
+
function experimentalUsageLines(bundle, hint) {
|
|
593
|
+
if (bundle.error !== undefined)
|
|
594
|
+
return [];
|
|
595
|
+
return [
|
|
596
|
+
` ${t(bundle.enabled ? 'plugins-experimental-disable' : 'plugins-experimental-enable', { bundle: cell(bundle.name) })}`,
|
|
597
|
+
` ${t(hint)}`,
|
|
598
|
+
];
|
|
599
|
+
}
|
|
600
|
+
/** One experimental row: title, version and state, without plugin-declaration tags. */
|
|
601
|
+
function experimentalLine(bundle) {
|
|
602
|
+
const flags = [t(bundle.enabled ? 'plugins-bundle-on' : 'plugins-bundle-off')];
|
|
603
|
+
if (bundle.error !== undefined)
|
|
604
|
+
flags.push(t('plugins-bundle-problem', { code: cell(bundle.error.code) }));
|
|
605
|
+
const title = cell(localizedPluginText(bundle, bundle.name));
|
|
606
|
+
const version = bundle.version === undefined ? '' : ` ${cell(bundle.version)}`;
|
|
607
|
+
return ` ${title}${version} · ${flags.join(' · ')}`;
|
|
608
|
+
}
|
|
609
|
+
/** The experimental section; empty when the installation supplies none. */
|
|
610
|
+
function experimentalLines(entries) {
|
|
611
|
+
if (entries.length === 0)
|
|
612
|
+
return [];
|
|
613
|
+
const lines = [t('plugins-experimental-header', { count: String(entries.length) })];
|
|
614
|
+
for (const { bundle, hint } of entries) {
|
|
615
|
+
lines.push(experimentalLine(bundle));
|
|
616
|
+
lines.push(...experimentalUsageLines(bundle, hint));
|
|
617
|
+
}
|
|
618
|
+
return lines;
|
|
619
|
+
}
|
|
620
|
+
/** `/plugin list`: the plugins this profile added, then switchable experimental features. */
|
|
566
621
|
function listLines(deps, bundles) {
|
|
567
622
|
const extras = extraBundles(bundles);
|
|
568
|
-
|
|
623
|
+
const experimental = experimentalEntries(bundles);
|
|
624
|
+
if (extras.length === 0 && experimental.length === 0)
|
|
569
625
|
return [t('plugins-list-empty')];
|
|
570
|
-
const lines = [
|
|
571
|
-
|
|
572
|
-
lines.push(
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
626
|
+
const lines = [];
|
|
627
|
+
if (extras.length === 0) {
|
|
628
|
+
lines.push(t('plugins-list-empty'));
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
lines.push(t('plugins-list-header', { count: String(extras.length) }));
|
|
632
|
+
for (const bundle of extras)
|
|
633
|
+
lines.push(bundleLine(deps, bundle, { rows: false }));
|
|
634
|
+
// The tag is explained once per report, next to the rows it qualifies: this
|
|
635
|
+
// surface is a transcript, so there is nothing to click open (C-3).
|
|
636
|
+
if (needsDeclarationLegend(deps, extras))
|
|
637
|
+
lines.push(t('plugins-tag-undeclared-hint'));
|
|
638
|
+
}
|
|
639
|
+
// Separate the two sections (and their entries) so the report reads as
|
|
640
|
+
// blocks instead of one dense list.
|
|
641
|
+
if (experimental.length > 0) {
|
|
642
|
+
if (lines.length > 0)
|
|
643
|
+
lines.push('');
|
|
644
|
+
lines.push(...experimentalLines(experimental));
|
|
645
|
+
}
|
|
578
646
|
return lines;
|
|
579
647
|
}
|
|
580
648
|
/**
|
|
@@ -103,16 +103,29 @@ export declare function resolvePersistedRoute(ctx: Context, sessionId: SessionId
|
|
|
103
103
|
export declare function presetHidesHostAskTool(presetId: string | undefined): boolean;
|
|
104
104
|
/**
|
|
105
105
|
* Keep the official Minimal preset's model-facing catalog minimal: it declares
|
|
106
|
-
* exactly one persistent shell tool, and
|
|
107
|
-
* must not become
|
|
106
|
+
* exactly one persistent shell tool, and host-layer contributors the person
|
|
107
|
+
* switched on elsewhere must not become extra ones.
|
|
108
108
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
109
|
+
* Three such contributors are carved out here (the last one for liangshen
|
|
110
|
+
* too, see `PERSISTENT_SHELL_PRESETS`):
|
|
111
|
+
* - the host-mounted `ask_user_question` (see `presetHidesHostAskTool`);
|
|
112
|
+
* - `@deepseek-ai/dsh-experimental-session-search`, which registers five
|
|
113
|
+
* read-only tools AND a usage-guidance section. The upstream bundle promises
|
|
114
|
+
* "every preset including minimal"; this app intentionally deviates, because
|
|
115
|
+
* Minimal's published promise is one persistent shell and a TUI process runs
|
|
116
|
+
* sessions under several presets at once — hence an assembly-boundary filter
|
|
117
|
+
* rather than a registry (or shell-whitelist) decision that would leak;
|
|
118
|
+
* - `@deepseek-ai/dsh-experimental-tool-worktree`'s `create_worktree` (one
|
|
119
|
+
* host-layer tool, no section), which would move the session away from the
|
|
120
|
+
* persistent shell.
|
|
121
|
+
*
|
|
122
|
+
* This is per-assembly because one TUI process can resume, create, or
|
|
123
|
+
* recompose sessions under different presets. The session log remains the
|
|
124
|
+
* source of truth for the active preset.
|
|
112
125
|
*
|
|
113
126
|
* @param assembly - Fully assembled prompt inputs for one model request.
|
|
114
127
|
* @param presetId - Preset recorded for the requesting session.
|
|
115
|
-
* @returns The original assembly
|
|
128
|
+
* @returns The original assembly when nothing is carved out, else the filtered copy.
|
|
116
129
|
*/
|
|
117
130
|
export declare function filterMinimalPresetTools(assembly: PromptAssembly, presetId: string | undefined): PromptAssembly;
|
|
118
131
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/presets.ts"],"names":[],"mappings":"A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AAM,GAAG,SAAS,GAAG,cAAc,CAU/G;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAKpG"}
|
|
@@ -19,7 +19,47 @@ import { recordedModelRoute } from '../modelRoute.js';
|
|
|
19
19
|
import { snapshotLiveSessionEvents } from './compat/liveSession.js';
|
|
20
20
|
import { readPersistedSession } from './compat/persistence.js';
|
|
21
21
|
import { resolveCompatiblePreset, resolveRecordedPreset, rosterOf, } from './preset-resolution.js';
|
|
22
|
+
import { WORKTREE_TOOL } from './worktree-tool.js';
|
|
22
23
|
const ASK_USER_TOOL = 'ask_user_question';
|
|
24
|
+
/**
|
|
25
|
+
* The prompt section `@deepseek-ai/dsh-experimental-session-search` contributes
|
|
26
|
+
* to the host layer once that bundle is enabled (`order: TOOL_SESSION_QUERY`).
|
|
27
|
+
* It is a section, not a tool: dropping only the five tools below would leave
|
|
28
|
+
* Minimal's model reading guidance for tools it cannot call.
|
|
29
|
+
*/
|
|
30
|
+
const SESSION_SEARCH_SECTION = 'tool:session-query';
|
|
31
|
+
/**
|
|
32
|
+
* The five read-only tools the same bundle registers on the host tool layer
|
|
33
|
+
* (`@deepseek-ai/dsh-tool-session-query@0.2.1-rc.2`). The assembly carries no
|
|
34
|
+
* per-tool provenance, so these names are the only way to recognise them —
|
|
35
|
+
* same approach as `team-mode.ts`'s replaced-tool list. Renames upstream turn
|
|
36
|
+
* this carve-out into a silent no-op; `verify:minimal-preset-tools` pins them.
|
|
37
|
+
*/
|
|
38
|
+
const SESSION_SEARCH_TOOLS = new Set([
|
|
39
|
+
'session_search',
|
|
40
|
+
'session_event_search',
|
|
41
|
+
'session_trace',
|
|
42
|
+
'session_event_trace',
|
|
43
|
+
'session_event_read',
|
|
44
|
+
]);
|
|
45
|
+
/**
|
|
46
|
+
* Whether a preset's model-facing catalog is fixed by its own composition and
|
|
47
|
+
* must therefore be shielded from HOST-layer contributors the person switched
|
|
48
|
+
* on elsewhere. Only the official Minimal preset qualifies.
|
|
49
|
+
*/
|
|
50
|
+
function isMinimalPreset(presetId) {
|
|
51
|
+
return presetId === 'minimal';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Presets whose `bash` is the official persistent shell, which starts in the
|
|
55
|
+
* directory of its first call and never follows a later move: Minimal, and
|
|
56
|
+
* the bundled liangshen preset (the same shell on POSIX; its Windows
|
|
57
|
+
* `custom-bash` does follow, but one rule for both platforms keeps this a
|
|
58
|
+
* preset decision). After a worktree switch that shell would keep editing the
|
|
59
|
+
* source checkout, so these presets are not offered `create_worktree` until the
|
|
60
|
+
* shell follows the session directory (#1738).
|
|
61
|
+
*/
|
|
62
|
+
const PERSISTENT_SHELL_PRESETS = new Set(['minimal', 'liangshen']);
|
|
23
63
|
/**
|
|
24
64
|
* Resolve the preset one new/resumed session will run under and the setup
|
|
25
65
|
* that installs it. `requested` undefined adopts the roster default.
|
|
@@ -142,28 +182,45 @@ export async function resolvePersistedRoute(ctx, sessionId) {
|
|
|
142
182
|
* @returns True when the host-layer tool must be filtered out of the assembly.
|
|
143
183
|
*/
|
|
144
184
|
export function presetHidesHostAskTool(presetId) {
|
|
145
|
-
return presetId
|
|
185
|
+
return isMinimalPreset(presetId);
|
|
146
186
|
}
|
|
147
187
|
/**
|
|
148
188
|
* Keep the official Minimal preset's model-facing catalog minimal: it declares
|
|
149
|
-
* exactly one persistent shell tool, and
|
|
150
|
-
* must not become
|
|
189
|
+
* exactly one persistent shell tool, and host-layer contributors the person
|
|
190
|
+
* switched on elsewhere must not become extra ones.
|
|
191
|
+
*
|
|
192
|
+
* Three such contributors are carved out here (the last one for liangshen
|
|
193
|
+
* too, see `PERSISTENT_SHELL_PRESETS`):
|
|
194
|
+
* - the host-mounted `ask_user_question` (see `presetHidesHostAskTool`);
|
|
195
|
+
* - `@deepseek-ai/dsh-experimental-session-search`, which registers five
|
|
196
|
+
* read-only tools AND a usage-guidance section. The upstream bundle promises
|
|
197
|
+
* "every preset including minimal"; this app intentionally deviates, because
|
|
198
|
+
* Minimal's published promise is one persistent shell and a TUI process runs
|
|
199
|
+
* sessions under several presets at once — hence an assembly-boundary filter
|
|
200
|
+
* rather than a registry (or shell-whitelist) decision that would leak;
|
|
201
|
+
* - `@deepseek-ai/dsh-experimental-tool-worktree`'s `create_worktree` (one
|
|
202
|
+
* host-layer tool, no section), which would move the session away from the
|
|
203
|
+
* persistent shell.
|
|
151
204
|
*
|
|
152
|
-
* This is
|
|
153
|
-
*
|
|
154
|
-
*
|
|
205
|
+
* This is per-assembly because one TUI process can resume, create, or
|
|
206
|
+
* recompose sessions under different presets. The session log remains the
|
|
207
|
+
* source of truth for the active preset.
|
|
155
208
|
*
|
|
156
209
|
* @param assembly - Fully assembled prompt inputs for one model request.
|
|
157
210
|
* @param presetId - Preset recorded for the requesting session.
|
|
158
|
-
* @returns The original assembly
|
|
211
|
+
* @returns The original assembly when nothing is carved out, else the filtered copy.
|
|
159
212
|
*/
|
|
160
213
|
export function filterMinimalPresetTools(assembly, presetId) {
|
|
161
|
-
|
|
214
|
+
const minimal = isMinimalPreset(presetId);
|
|
215
|
+
const persistentShell = presetId !== undefined && PERSISTENT_SHELL_PRESETS.has(presetId);
|
|
216
|
+
if (!minimal && !persistentShell)
|
|
162
217
|
return assembly;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
218
|
+
const tools = assembly.tools.filter(tool => !(persistentShell && tool.name === WORKTREE_TOOL) &&
|
|
219
|
+
!(minimal && (tool.name === ASK_USER_TOOL || SESSION_SEARCH_TOOLS.has(tool.name))));
|
|
220
|
+
const sections = minimal ? assembly.sections.filter(section => section.name !== SESSION_SEARCH_SECTION) : assembly.sections;
|
|
221
|
+
if (tools.length === assembly.tools.length && sections.length === assembly.sections.length)
|
|
222
|
+
return assembly;
|
|
223
|
+
return { ...assembly, tools, sections };
|
|
167
224
|
}
|
|
168
225
|
/**
|
|
169
226
|
* Read a service the way a joined agent sees it: through the preset scope
|
|
@@ -23,7 +23,7 @@ export type ExitRequestAnswer = 'exiting' | 'pending' | 'supervising' | 'refused
|
|
|
23
23
|
export interface ProcessExitSeam {
|
|
24
24
|
request?: (request: ExitRequest) => ExitRequestAnswer;
|
|
25
25
|
}
|
|
26
|
-
/** dsh `process-shutdown` PROCESS_SHUTDOWN_TIMEOUT_MS (0.2.1-rc.
|
|
26
|
+
/** dsh `process-shutdown` PROCESS_SHUTDOWN_TIMEOUT_MS (0.2.1-rc.5): the dispose bound. */
|
|
27
27
|
export declare const PROCESS_SHUTDOWN_TIMEOUT_MS = 5000;
|
|
28
28
|
/**
|
|
29
29
|
* End the process by `signal`. Only the entry's own listeners come off, so the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* tmux and service managers); a second signal forces the exit at once.
|
|
7
7
|
*/
|
|
8
8
|
export const TERMINATION_SIGNALS = ['SIGTERM', 'SIGHUP', 'SIGINT'];
|
|
9
|
-
/** dsh `process-shutdown` PROCESS_SHUTDOWN_TIMEOUT_MS (0.2.1-rc.
|
|
9
|
+
/** dsh `process-shutdown` PROCESS_SHUTDOWN_TIMEOUT_MS (0.2.1-rc.5): the dispose bound. */
|
|
10
10
|
export const PROCESS_SHUTDOWN_TIMEOUT_MS = 5000;
|
|
11
11
|
/** Last-resort bound for a funnel exit: outlasts its terminal cleanup plus the dispose bound. */
|
|
12
12
|
const BACKSTOP_MS = PROCESS_SHUTDOWN_TIMEOUT_MS + 2000;
|
|
@@ -24,6 +24,8 @@ export interface ProviderWizardDeps {
|
|
|
24
24
|
/** Live turn state; the model-switch question is skipped while working. */
|
|
25
25
|
readonly working: () => boolean;
|
|
26
26
|
readonly switchModel: (provider: string, model: string) => Promise<boolean>;
|
|
27
|
+
/** The live model id, named on the switch question's keep option when known. */
|
|
28
|
+
readonly currentModel?: () => string | undefined;
|
|
27
29
|
}
|
|
28
30
|
export type ProviderWizardOutcome = 'added' | 'updated' | 'deleted' | 'signed-out' | 'cancelled' | 'failed';
|
|
29
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerWizard.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/providerWizard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAA+D,cAAc,EAA8D,MAAM,sCAAsC,CAAA;AACtN,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAsBjM,OAAO,EAEL,KAAK,qBAAqB,EAE1B,KAAK,sBAAsB,EAC5B,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAO1E,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,QAAoC,CAAA;AAElE,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,2EAIrB,CAAA;AAEV;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;IAChC,QAAQ,CAAC,GAAG,EAAE,CACZ,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,KAC3B,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACnC,QAAQ,CAAC,MAAM,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,KACtE,IAAI,CAAA;IACT,QAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,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CAAA;IAC5C,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACxC,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAA;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAA;CACvC"}
|
|
@@ -335,16 +335,22 @@ async function runAddFlow(deps) {
|
|
|
335
335
|
]);
|
|
336
336
|
notify(t('provider-success', { route }), { color: 'success' });
|
|
337
337
|
if (!deps.working() && models.length > 0) {
|
|
338
|
-
|
|
338
|
+
// Every enabled model is offered, so with several the user names the
|
|
339
|
+
// default explicitly instead of getting the first one or nothing (#1646).
|
|
340
|
+
const current = deps.currentModel?.();
|
|
339
341
|
const switchAnswer = await ask({
|
|
340
342
|
questions: [optionQuestion('switch', t('provider-q-switch'), [
|
|
341
|
-
{ label: t('provider-opt-switch-now', { model
|
|
342
|
-
{
|
|
343
|
+
...models.map(model => ({ label: t('provider-opt-switch-now', { model }) })),
|
|
344
|
+
{
|
|
345
|
+
label: t('provider-opt-switch-keep'),
|
|
346
|
+
...(current === undefined ? {} : { description: t('provider-opt-switch-keep-desc', { model: current }) }),
|
|
347
|
+
},
|
|
343
348
|
], { hideCustomInput: true })],
|
|
344
349
|
});
|
|
345
|
-
|
|
350
|
+
const picked = answerSelected(switchAnswer, 'switch')[0];
|
|
351
|
+
const target = models.find(model => picked === t('provider-opt-switch-now', { model }));
|
|
352
|
+
if (target !== undefined)
|
|
346
353
|
await deps.switchModel(route, target);
|
|
347
|
-
}
|
|
348
354
|
}
|
|
349
355
|
return 'added';
|
|
350
356
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type { EntrySlot } from './entry-slot.js';
|
|
3
|
+
/** What the entry's runtime lends the `dsh-tui` row hand-off (#1651). */
|
|
4
|
+
export interface RowAttachmentDeps {
|
|
5
|
+
/** The composition failed or the process is leaving: no row takes over. */
|
|
6
|
+
closed(): boolean;
|
|
7
|
+
/** The screen's channel can resume a session. */
|
|
8
|
+
ready(): boolean;
|
|
9
|
+
/** Mount the row's seams (presets, ask_user, approvals, the assembly
|
|
10
|
+
* filters) on its context; they unload with it. */
|
|
11
|
+
mountSeams(rowCtx: Context): Promise<void>;
|
|
12
|
+
/** A returning row's config becomes the screen's. */
|
|
13
|
+
readConfig(rowRuntimeConfig: unknown): void;
|
|
14
|
+
/** The screen's session ended with the previous row. */
|
|
15
|
+
ended(): boolean;
|
|
16
|
+
/** Reopen the ended session; it outlives the row that triggered it. */
|
|
17
|
+
reopen(): Promise<void>;
|
|
18
|
+
/** A reattach failed: the screen keeps the ended session. */
|
|
19
|
+
failed(error: unknown): void;
|
|
20
|
+
}
|
|
21
|
+
export interface RowAttachment {
|
|
22
|
+
/** Mount a row's seams; the row counts as mounted until its context unloads. */
|
|
23
|
+
mount(rowCtx: Context): Promise<void>;
|
|
24
|
+
/** The `EntrySlot.reattachDsh` hook: undefined while a row is mounted. */
|
|
25
|
+
reattach(): EntrySlot['attachDsh'];
|
|
26
|
+
}
|
|
27
|
+
/** The row seams the entry's DSH side mounts on the first `dsh-tui` row and
|
|
28
|
+
* again on any row that applies after the previous one unloaded. */
|
|
29
|
+
export declare function createRowAttachment(deps: RowAttachmentDeps): RowAttachment;
|
|
30
|
+
//# sourceMappingURL=row-attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-attachment.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/row-attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,MAAM,IAAI,OAAO,CAAA;IACjB,iDAAiD;IACjD,KAAK,IAAI,OAAO,CAAA;IAChB;wDACoD;IACpD,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1C,qDAAqD;IACrD,UAAU,CAAC,gBAAgB,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3C,wDAAwD;IACxD,KAAK,IAAI,OAAO,CAAA;IAChB,uEAAuE;IACvE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB,6DAA6D;IAC7D,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,gFAAgF;IAChF,KAAK,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrC,0EAA0E;IAC1E,QAAQ,IAAI,SAAS,CAAC,WAAW,CAAC,CAAA;CACnC;AAED;qEACqE;AACrE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAsB1E"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** The row seams the entry's DSH side mounts on the first `dsh-tui` row and
|
|
2
|
+
* again on any row that applies after the previous one unloaded. */
|
|
3
|
+
export function createRowAttachment(deps) {
|
|
4
|
+
let mounted = false;
|
|
5
|
+
const mount = async (rowCtx) => {
|
|
6
|
+
mounted = true;
|
|
7
|
+
rowCtx.effect(() => () => { mounted = false; });
|
|
8
|
+
await deps.mountSeams(rowCtx);
|
|
9
|
+
};
|
|
10
|
+
const reattach = () => {
|
|
11
|
+
if (deps.closed() || mounted || !deps.ready())
|
|
12
|
+
return undefined;
|
|
13
|
+
return async (rowCtx, rowRuntimeConfig) => {
|
|
14
|
+
if (deps.closed() || mounted)
|
|
15
|
+
return;
|
|
16
|
+
try {
|
|
17
|
+
// The row may come back with a changed config: read it like the first.
|
|
18
|
+
deps.readConfig(rowRuntimeConfig);
|
|
19
|
+
await mount(rowCtx);
|
|
20
|
+
if (deps.ended())
|
|
21
|
+
await deps.reopen();
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
deps.failed(error);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
return { mount, reattach };
|
|
29
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card headers for the experimental session-search tools.
|
|
3
|
+
*
|
|
4
|
+
* `@deepseek-ai/dsh-tool-session-query@0.2.1-rc.2` gives both search calls a
|
|
5
|
+
* static sentence — "Search prior sessions" / "Search session events" — while
|
|
6
|
+
* a titled generic card renders that sentence and nothing else (the tool name
|
|
7
|
+
* and the arguments stay off the header). Two different calls therefore read
|
|
8
|
+
* alike, and the word "search" repeats the result body's own first line
|
|
9
|
+
* ("Session search results (3):").
|
|
10
|
+
*
|
|
11
|
+
* This adapter is the layer allowed to decide presentation (`agent/
|
|
12
|
+
* presentation.ts`: "a backend translator decides which shape a call gets"),
|
|
13
|
+
* so it gives those two calls a bash-style header instead: the object first,
|
|
14
|
+
* the concrete query in parentheses.
|
|
15
|
+
*
|
|
16
|
+
* The rewrite is self-expiring: it fires only while the upstream title is
|
|
17
|
+
* still the pinned 0.2.1-rc.2 string. A wording change upstream (or a future
|
|
18
|
+
* result presenter) wins silently instead of fighting a second source of
|
|
19
|
+
* truth; delete the entry once upstream ships the new wording.
|
|
20
|
+
*
|
|
21
|
+
* @module
|
|
22
|
+
*/
|
|
23
|
+
import type { ToolCallView } from './channel/types.js';
|
|
24
|
+
/**
|
|
25
|
+
* Refine a session-search call card's title with the query it was given.
|
|
26
|
+
*
|
|
27
|
+
* @param name - Tool name.
|
|
28
|
+
* @param view - The upstream presentation view for this call, if any.
|
|
29
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
30
|
+
* @returns The upstream view untouched unless the tool, the pinned title and
|
|
31
|
+
* a non-empty string `query` all line up; else a retitled copy.
|
|
32
|
+
*/
|
|
33
|
+
export declare function refineSessionSearchTitle(name: string, view: ToolCallView | undefined, rawArgs: string): ToolCallView | undefined;
|
|
34
|
+
//# sourceMappingURL=session-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-tools.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/session-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAQtD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GACd,YAAY,GAAG,SAAS,CAmB1B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Pinned upstream title → the header stem this app shows instead. */
|
|
2
|
+
const REFINED = new Map([
|
|
3
|
+
['session_search', { pinned: 'Search prior sessions', stem: 'Sessions' }],
|
|
4
|
+
['session_event_search', { pinned: 'Search session events', stem: 'Events' }],
|
|
5
|
+
]);
|
|
6
|
+
/**
|
|
7
|
+
* Refine a session-search call card's title with the query it was given.
|
|
8
|
+
*
|
|
9
|
+
* @param name - Tool name.
|
|
10
|
+
* @param view - The upstream presentation view for this call, if any.
|
|
11
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
12
|
+
* @returns The upstream view untouched unless the tool, the pinned title and
|
|
13
|
+
* a non-empty string `query` all line up; else a retitled copy.
|
|
14
|
+
*/
|
|
15
|
+
export function refineSessionSearchTitle(name, view, rawArgs) {
|
|
16
|
+
if (view === undefined || view.card !== 'generic')
|
|
17
|
+
return view;
|
|
18
|
+
const refined = REFINED.get(name);
|
|
19
|
+
if (refined === undefined || view.title !== refined.pinned)
|
|
20
|
+
return view;
|
|
21
|
+
let args;
|
|
22
|
+
try {
|
|
23
|
+
args = JSON.parse(rawArgs);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return view;
|
|
27
|
+
}
|
|
28
|
+
const query = args?.query;
|
|
29
|
+
if (typeof query !== 'string')
|
|
30
|
+
return view;
|
|
31
|
+
const trimmed = query.trim();
|
|
32
|
+
if (trimmed === '')
|
|
33
|
+
return view;
|
|
34
|
+
// The generic card header is one line (`HeaderTitle`'s non-terminal branch),
|
|
35
|
+
// and the query is free model text: JSON-encoding keeps newlines, quotes and
|
|
36
|
+
// control bytes printable inside the `Name("query")` shape instead of
|
|
37
|
+
// splitting the row or writing raw escape sequences to the terminal.
|
|
38
|
+
return { ...view, title: `${refined.stem}(${JSON.stringify(trimmed)})` };
|
|
39
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TuiSettingsSection } from '../adapter/ports/channel-settings.js';
|
|
2
|
-
export type { TuiSettingsSection, TuiSettingsGroup, TuiSettingsField, TuiSettingsFieldKind, TuiSettingsFieldOption, TuiSettingsFieldWrite } from '../adapter/ports/channel-settings.js';
|
|
2
|
+
export type { TuiSettingsSection, TuiSettingsPage, TuiSettingsGroup, TuiSettingsField, TuiSettingsFieldKind, TuiSettingsFieldOption, TuiSettingsFieldWrite } from '../adapter/ports/channel-settings.js';
|
|
3
3
|
/**
|
|
4
4
|
* Plugin settings-section extension seam for terminal front doors.
|
|
5
5
|
*
|
|
@@ -44,5 +44,22 @@ export declare class TuiSettingsSectionsRuntime extends Service {
|
|
|
44
44
|
}
|
|
45
45
|
export declare function getHostSettingsSections(runtime: TuiSettingsSectionsRuntime | undefined): TuiSettingsSectionsHost | undefined;
|
|
46
46
|
export declare function getLocalSettingsSectionsHost(ctx?: Context): TuiSettingsSectionsHost;
|
|
47
|
+
/**
|
|
48
|
+
* Register a host-owned section in whichever registry `/settings` reads, and
|
|
49
|
+
* keep it there while the composition's `tuiSettingsSections` service comes
|
|
50
|
+
* and goes.
|
|
51
|
+
*
|
|
52
|
+
* The channel prefers the service whenever it exists, while a registration
|
|
53
|
+
* made before the service row activated lands in the in-package fallback —
|
|
54
|
+
* profile rows activate concurrently (`EntryGroup.update` awaits all of
|
|
55
|
+
* them), so "the service exists" is not a boot-order guarantee. A reloaded
|
|
56
|
+
* service row also starts from an empty registry, stranding sections
|
|
57
|
+
* registered in the previous instance. Either transition would leave the
|
|
58
|
+
* section in the registry the screen no longer reads: it disappears from
|
|
59
|
+
* /settings while other sections keep rendering. Both announce themselves
|
|
60
|
+
* through `internal/service`; the replacement registration is taken before
|
|
61
|
+
* the old one is released, so a failed move leaves the section where it was.
|
|
62
|
+
*/
|
|
63
|
+
export declare function trackHostSettingsSection(ctx: Context, section: TuiSettingsSection): () => void;
|
|
47
64
|
export default TuiSettingsSectionsRuntime;
|
|
48
65
|
//# sourceMappingURL=settings-sections.d.ts.map
|