@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
|
@@ -1,30 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Agent Teams
|
|
2
|
+
* Agent Teams status at run time (issue #1241, see
|
|
3
3
|
* docs/agent-teams-design.md「开关机制」).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* drops its layer through the host plugin manager
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
5
|
+
* Switching is the upstream team bundle itself: `/plugin enable|disable`
|
|
6
|
+
* selects or drops its layer through the host plugin manager, which persists
|
|
7
|
+
* to the profile and, with `hmr` mounted, applies at once. `/team` is the
|
|
8
|
+
* read-only side: it reports the bundle, the service and this session's
|
|
9
|
+
* teammates, and is exposed only while the `agentTeams` service is mounted —
|
|
10
|
+
* the same availability the desktop UI gives the feature. A typed `/team`
|
|
11
|
+
* before that still answers with the enable route instead of reaching the
|
|
12
|
+
* model.
|
|
13
|
+
*
|
|
14
|
+
* What stays here besides the command is the one decision that cannot live in
|
|
15
|
+
* a preset — which legacy delegation tools a request carries.
|
|
12
16
|
*
|
|
13
17
|
* @module
|
|
14
18
|
*/
|
|
15
19
|
import type { Context } from '@deepseek-ai/cordis';
|
|
16
20
|
import type { PromptAssembly } from '@deepseek-ai/dsh-system-prompt';
|
|
17
|
-
import
|
|
21
|
+
import type { LocalCommand } from '../commands.js';
|
|
22
|
+
import type { TeamActiveMembers } from './plugin-manage.js';
|
|
23
|
+
/**
|
|
24
|
+
* Whether the team service is mounted. This is the one signal `/team` appears
|
|
25
|
+
* on: the desktop UI shows the same feature only while its service is there.
|
|
26
|
+
* @param ctx - Host context of the composition root.
|
|
27
|
+
*/
|
|
28
|
+
export declare function teamServiceActive(ctx: Context): boolean;
|
|
18
29
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
24
|
-
* @
|
|
25
|
-
*
|
|
30
|
+
* Hide `/team` from Help and `/` completion while the service is not mounted.
|
|
31
|
+
* The typed form stays a local command (`isLocalCommandName` still knows the
|
|
32
|
+
* name), so it can answer with the enable route instead of becoming text sent
|
|
33
|
+
* to the model.
|
|
34
|
+
* @param commands - The current command catalog.
|
|
35
|
+
* @param visible - Whether the team service is mounted.
|
|
36
|
+
* @returns The catalog with `/team` removed when it is not.
|
|
26
37
|
*/
|
|
27
|
-
export declare function
|
|
38
|
+
export declare function withTeamCommandVisibility(commands: readonly LocalCommand[], visible: boolean): readonly LocalCommand[];
|
|
28
39
|
/**
|
|
29
40
|
* Keep one delegation tool set per request. Presets keep their legacy rows,
|
|
30
41
|
* so whether the team replaces them is decided where the tools are known: an
|
|
@@ -39,36 +50,34 @@ export declare function teamBundleSpec(kernel: string | undefined): string | und
|
|
|
39
50
|
export declare function filterTeamReplacedTools(assembly: PromptAssembly): PromptAssembly;
|
|
40
51
|
/** What `/team` was asked. */
|
|
41
52
|
export type TeamCommand = {
|
|
42
|
-
readonly kind: '
|
|
53
|
+
readonly kind: 'status';
|
|
54
|
+
}
|
|
55
|
+
/** `on` / `off`: the switch moved to `/plugin enable|disable`. */
|
|
56
|
+
| {
|
|
57
|
+
readonly kind: 'switch';
|
|
43
58
|
} | {
|
|
44
59
|
readonly kind: 'unknown';
|
|
45
60
|
readonly sub: string;
|
|
46
61
|
};
|
|
47
62
|
export declare function parseTeamArgs(args: string): TeamCommand;
|
|
48
|
-
/** What the screen supplies: the
|
|
49
|
-
export interface TeamCommandSink
|
|
63
|
+
/** What the screen supplies: the bound session's live team counts. */
|
|
64
|
+
export interface TeamCommandSink {
|
|
50
65
|
/** Teammates of the bound session, how many are running or provisioning, and how many may be running. */
|
|
51
66
|
readonly members: () => {
|
|
52
67
|
readonly total: number;
|
|
53
68
|
} & TeamActiveMembers;
|
|
54
69
|
}
|
|
55
|
-
/**
|
|
56
|
-
export type
|
|
57
|
-
readonly kind: 'flow';
|
|
58
|
-
readonly flow: PluginManageFlow;
|
|
59
|
-
} | {
|
|
60
|
-
readonly kind: 'lines';
|
|
61
|
-
readonly lines: Promise<readonly string[]>;
|
|
62
|
-
};
|
|
70
|
+
/** The entry the screen calls: argument text in, report lines out. */
|
|
71
|
+
export type TeamCommandEntry = (args: string, sink: TeamCommandSink) => Promise<readonly string[]>;
|
|
63
72
|
/**
|
|
64
|
-
* Wire `/team` to the running composition.
|
|
73
|
+
* Wire `/team` to the running composition. The command only reports; the
|
|
74
|
+
* bundle switch is `/plugin enable|disable`, which shares the lifecycle flow
|
|
75
|
+
* and its confirmations.
|
|
65
76
|
* @param ctx - Host context of the composition root.
|
|
66
|
-
* @param options - The profile a
|
|
67
|
-
* DSH version (this package's entry; otherwise the installed one is read).
|
|
77
|
+
* @param options - The profile a CLI route names.
|
|
68
78
|
* @returns the command entry the screen calls.
|
|
69
79
|
*/
|
|
70
80
|
export declare function createTeamCommandEntry(ctx: Context, options?: {
|
|
71
81
|
readonly profileName?: string | undefined;
|
|
72
|
-
|
|
73
|
-
}): (args: string, sink: TeamCommandSink) => TeamCommandOutcome;
|
|
82
|
+
}): TeamCommandEntry;
|
|
74
83
|
//# sourceMappingURL=team-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-mode.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/team-mode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"team-mode.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/team-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAS3D;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAEvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,YAAY,EAAE,CAEtH;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAIhF;AAED,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE;AAC7B,kEAAkE;GAChE;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAKvD;AAED,sEAAsE;AACtE,MAAM,WAAW,eAAe;IAC9B,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,iBAAiB,CAAA;CACvE;AAED,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;AAElG;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GAC1D,gBAAgB,CAiBlB"}
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
import { t } from '../i18n.js';
|
|
2
|
-
import { resolveDshProfileName } from '../update.js';
|
|
3
|
-
import { installedKernelVersion, UPSTREAM_VALIDATED_VERSION } from './contract.js';
|
|
4
|
-
import { createPluginManageFlow } from './plugin-manage.js';
|
|
5
2
|
import { pluginManagerOf } from './plugin-manager.js';
|
|
6
3
|
import { cell } from './plugins-info.js';
|
|
7
4
|
import { TEAM_BUNDLE } from './team-roster.js';
|
|
8
5
|
import { TEAM_SPAWN_TOOL } from './team-tools.js';
|
|
6
|
+
/** The slash-command name this module owns. */
|
|
7
|
+
const TEAM_COMMAND_NAME = 'team';
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* code as rc.2). Other lines' team projection may lack the `wire` view
|
|
14
|
-
* `channel.team` needs.
|
|
9
|
+
* Whether the team service is mounted. This is the one signal `/team` appears
|
|
10
|
+
* on: the desktop UI shows the same feature only while its service is there.
|
|
11
|
+
* @param ctx - Host context of the composition root.
|
|
15
12
|
*/
|
|
16
|
-
|
|
13
|
+
export function teamServiceActive(ctx) {
|
|
14
|
+
return ctx.get('agentTeams', false) !== undefined;
|
|
15
|
+
}
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
23
|
-
* @
|
|
24
|
-
*
|
|
17
|
+
* Hide `/team` from Help and `/` completion while the service is not mounted.
|
|
18
|
+
* The typed form stays a local command (`isLocalCommandName` still knows the
|
|
19
|
+
* name), so it can answer with the enable route instead of becoming text sent
|
|
20
|
+
* to the model.
|
|
21
|
+
* @param commands - The current command catalog.
|
|
22
|
+
* @param visible - Whether the team service is mounted.
|
|
23
|
+
* @returns The catalog with `/team` removed when it is not.
|
|
25
24
|
*/
|
|
26
|
-
export function
|
|
27
|
-
|
|
28
|
-
return `${TEAM_BUNDLE}@${UPSTREAM_VALIDATED_VERSION}`;
|
|
29
|
-
return TEAM_LINES.has(kernel) ? `${TEAM_BUNDLE}@${kernel}` : undefined;
|
|
25
|
+
export function withTeamCommandVisibility(commands, visible) {
|
|
26
|
+
return visible ? commands : commands.filter(command => command.name !== TEAM_COMMAND_NAME);
|
|
30
27
|
}
|
|
31
28
|
/**
|
|
32
29
|
* Legacy delegation tools that `spawn_teammate` replaces. The four control
|
|
@@ -58,126 +55,93 @@ export function parseTeamArgs(args) {
|
|
|
58
55
|
if (sub === '' || sub === 'status')
|
|
59
56
|
return { kind: 'status' };
|
|
60
57
|
if (sub === 'on' || sub === 'off')
|
|
61
|
-
return { kind:
|
|
58
|
+
return { kind: 'switch' };
|
|
62
59
|
return { kind: 'unknown', sub };
|
|
63
60
|
}
|
|
64
61
|
/**
|
|
65
|
-
* Wire `/team` to the running composition.
|
|
62
|
+
* Wire `/team` to the running composition. The command only reports; the
|
|
63
|
+
* bundle switch is `/plugin enable|disable`, which shares the lifecycle flow
|
|
64
|
+
* and its confirmations.
|
|
66
65
|
* @param ctx - Host context of the composition root.
|
|
67
|
-
* @param options - The profile a
|
|
68
|
-
* DSH version (this package's entry; otherwise the installed one is read).
|
|
66
|
+
* @param options - The profile a CLI route names.
|
|
69
67
|
* @returns the command entry the screen calls.
|
|
70
68
|
*/
|
|
71
69
|
export function createTeamCommandEntry(ctx, options = {}) {
|
|
72
|
-
const profile =
|
|
73
|
-
|
|
74
|
-
let kernel;
|
|
75
|
-
const hint = (key) => {
|
|
76
|
-
kernel ??= { version: options.kernelVersion ?? installedKernelVersion() };
|
|
77
|
-
const spec = teamBundleSpec(kernel.version);
|
|
78
|
-
return spec === undefined
|
|
79
|
-
? t('team-cmd-kernel-unsupported', { version: cell(kernel.version ?? ''), lines: [...TEAM_LINES].join(' / ') })
|
|
80
|
-
: t(key, { profile: cell(profile()), bundle: spec });
|
|
81
|
-
};
|
|
82
|
-
return (args, sink) => {
|
|
70
|
+
const profile = options.profileName ?? 'dsh-tui';
|
|
71
|
+
return async (args, sink) => {
|
|
83
72
|
const parsed = parseTeamArgs(args);
|
|
84
73
|
if (parsed.kind === 'unknown') {
|
|
85
|
-
return
|
|
74
|
+
return [t('team-cmd-usage', { sub: cell(parsed.sub) })];
|
|
86
75
|
}
|
|
87
|
-
|
|
88
|
-
if (parsed.kind === 'status')
|
|
89
|
-
return
|
|
90
|
-
if (manager === undefined) {
|
|
91
|
-
return { kind: 'lines', lines: Promise.resolve([hint('team-cmd-no-manager')]) };
|
|
76
|
+
// The mounted service is the only state `/team` reports on.
|
|
77
|
+
if (parsed.kind === 'status' && teamServiceActive(ctx)) {
|
|
78
|
+
return teamStatusLines(ctx, sink);
|
|
92
79
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
busy: sink.busy,
|
|
99
|
-
onLines: sink.onLines,
|
|
100
|
-
profileName: profile(),
|
|
101
|
-
teamActiveMembers: sink.members,
|
|
102
|
-
});
|
|
103
|
-
// Without the package the lifecycle flow would answer with its generic
|
|
104
|
-
// "no such target" and every addressable name. Say what is missing
|
|
105
|
-
// instead: `on` with how to install it (installing stays an explicit
|
|
106
|
-
// `/plugin install`, it runs third-party code behind its own trust step),
|
|
107
|
-
// `off` that there is nothing to switch off.
|
|
108
|
-
const bindingAtStart = sink.binding();
|
|
109
|
-
return {
|
|
110
|
-
kind: 'flow',
|
|
111
|
-
flow: {
|
|
112
|
-
...flow,
|
|
113
|
-
async begin() {
|
|
114
|
-
let installed = true;
|
|
115
|
-
let enabled = false;
|
|
116
|
-
try {
|
|
117
|
-
const entry = (await manager.listBundles()).find(candidate => candidate.name === TEAM_BUNDLE);
|
|
118
|
-
installed = entry !== undefined;
|
|
119
|
-
enabled = entry?.enabled === true;
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
// A failing read is the flow's to report: it reads the same list.
|
|
123
|
-
}
|
|
124
|
-
if (parsed.kind === 'off') {
|
|
125
|
-
if (installed)
|
|
126
|
-
return flow.begin();
|
|
127
|
-
if (sink.binding() === bindingAtStart)
|
|
128
|
-
sink.onLines([t('team-cmd-off-not-installed')]);
|
|
129
|
-
return { kind: 'done' };
|
|
130
|
-
}
|
|
131
|
-
// Already selected: no trust question about code already running,
|
|
132
|
-
// no no-op write. Say whether it is actually running.
|
|
133
|
-
if (installed && !enabled)
|
|
134
|
-
return flow.begin();
|
|
135
|
-
if (sink.binding() === bindingAtStart) {
|
|
136
|
-
sink.onLines(!installed
|
|
137
|
-
? [hint('team-cmd-not-installed')]
|
|
138
|
-
: [t('team-cmd-already-on'), ...ctx.get('agentTeams', false) === undefined ? [t('team-cmd-pending-on')] : []]);
|
|
139
|
-
}
|
|
140
|
-
return { kind: 'done' };
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
};
|
|
80
|
+
// Everything else answers where the switch is: but only with a route this
|
|
81
|
+
// launch can take. Without the profile plugin service that route cannot run
|
|
82
|
+
// here, and a bundle the running installation does not ship has no target
|
|
83
|
+
// at all (`/plugin` would answer with every addressable name).
|
|
84
|
+
return teamSwitchRouteLines(ctx, profile, parsed.kind === 'switch' ? 'switch' : 'not-enabled');
|
|
144
85
|
};
|
|
145
86
|
}
|
|
146
87
|
/**
|
|
147
|
-
*
|
|
148
|
-
* the
|
|
88
|
+
* Where the switch went, checked against this launch: the in-session lifecycle
|
|
89
|
+
* command only when the plugin service can run it and the installation lists
|
|
90
|
+
* the bundle; the CLI route or the DSH-line reason otherwise. A bundle the
|
|
91
|
+
* profile already selects is not told to enable itself: with no service running
|
|
92
|
+
* the answer is the restart or the failed activation.
|
|
149
93
|
*/
|
|
150
|
-
async function
|
|
94
|
+
async function teamSwitchRouteLines(ctx, profile, kind) {
|
|
95
|
+
const manager = pluginManagerOf(ctx);
|
|
96
|
+
if (manager === undefined) {
|
|
97
|
+
return [t('team-cmd-no-manager-route', { profile: cell(profile), bundle: TEAM_BUNDLE })];
|
|
98
|
+
}
|
|
99
|
+
let listed = true;
|
|
100
|
+
let selected = false;
|
|
101
|
+
try {
|
|
102
|
+
const bundle = (await manager.listBundles()).find(candidate => candidate.name === TEAM_BUNDLE);
|
|
103
|
+
listed = bundle !== undefined;
|
|
104
|
+
selected = bundle?.enabled === true;
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
// A failing read is the status path's to report; name the general route.
|
|
108
|
+
}
|
|
109
|
+
if (!listed)
|
|
110
|
+
return [t('team-cmd-bundle-absent', { bundle: TEAM_BUNDLE })];
|
|
111
|
+
// Selected but nothing runs: `/plugin enable` would be a no-op, so name the
|
|
112
|
+
// state instead (a restart, or an activation that failed — see the log).
|
|
113
|
+
if (kind === 'not-enabled' && selected)
|
|
114
|
+
return [t('team-cmd-pending-on')];
|
|
115
|
+
return [t(kind === 'switch' ? 'team-cmd-switch-moved' : 'team-cmd-not-enabled', { bundle: TEAM_BUNDLE })];
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* `/team` and `/team status`: whether the profile selects the bundle and the
|
|
119
|
+
* bound session's team. The caller only runs this while the service is mounted,
|
|
120
|
+
* so the service line states that state instead of re-reading it.
|
|
121
|
+
*/
|
|
122
|
+
async function teamStatusLines(ctx, sink) {
|
|
151
123
|
const manager = pluginManagerOf(ctx);
|
|
152
|
-
const service = ctx.get('agentTeams', false) !== undefined;
|
|
153
124
|
const lines = [];
|
|
154
125
|
if (manager === undefined) {
|
|
155
|
-
lines.push(t('team-cmd-service', { state: t(
|
|
156
|
-
lines.push(
|
|
126
|
+
lines.push(t('team-cmd-service', { state: t('team-cmd-running') }));
|
|
127
|
+
lines.push(t('team-cmd-no-manager'));
|
|
157
128
|
}
|
|
158
129
|
else {
|
|
159
130
|
let selected;
|
|
160
|
-
let installed = false;
|
|
161
131
|
try {
|
|
162
132
|
const bundle = (await manager.listBundles()).find(candidate => candidate.name === TEAM_BUNDLE);
|
|
163
|
-
installed = bundle !== undefined;
|
|
164
133
|
selected = bundle?.enabled;
|
|
134
|
+
lines.push(selected === undefined
|
|
135
|
+
? t('team-cmd-bundle-unknown')
|
|
136
|
+
: t('team-cmd-bundle', { state: t(selected ? 'team-cmd-on' : 'team-cmd-off') }));
|
|
165
137
|
}
|
|
166
138
|
catch (error) {
|
|
167
139
|
lines.push(t('plugins-service-error', { err: cell(error instanceof Error ? error.message : String(error)) }));
|
|
168
140
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
lines.push(hint('team-cmd-not-installed'));
|
|
174
|
-
}
|
|
175
|
-
lines.push(t('team-cmd-service', { state: t(service ? 'team-cmd-running' : 'team-cmd-stopped') }));
|
|
176
|
-
// The profile says on but nothing runs (a startup-only profile, or the
|
|
177
|
-
// service failed to activate), or the reverse: say which one wins now.
|
|
178
|
-
if (selected === true && !service)
|
|
179
|
-
lines.push(t('team-cmd-pending-on'));
|
|
180
|
-
if (selected === false && service)
|
|
141
|
+
lines.push(t('team-cmd-service', { state: t('team-cmd-running') }));
|
|
142
|
+
// The service is mounted (the caller gates on that), so a profile that
|
|
143
|
+
// already deselected the bundle is the case that waits for a restart.
|
|
144
|
+
if (selected === false)
|
|
181
145
|
lines.push(t('team-cmd-pending-off'));
|
|
182
146
|
}
|
|
183
147
|
const { total, active, unseen } = sink.members();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ToolCallView, ToolResultView } from './channel/types.js';
|
|
2
|
+
/** The tool name, which is also its pinned upstream call title. */
|
|
3
|
+
export declare const WORKTREE_TOOL = "create_worktree";
|
|
4
|
+
/**
|
|
5
|
+
* Put the requested branch name in a `create_worktree` call card's header.
|
|
6
|
+
*
|
|
7
|
+
* @param name - Tool name.
|
|
8
|
+
* @param view - The upstream presentation view for this call, if any.
|
|
9
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
10
|
+
* @returns The upstream view untouched unless the tool, the pinned title and a
|
|
11
|
+
* non-empty string `name` all line up; else a retitled copy. A call
|
|
12
|
+
* without a name keeps the plain title until its result names the
|
|
13
|
+
* generated branch.
|
|
14
|
+
*/
|
|
15
|
+
export declare function refineWorktreeCallTitle(name: string, view: ToolCallView | undefined, rawArgs: string): ToolCallView | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Summarize a settled `create_worktree` result.
|
|
18
|
+
*
|
|
19
|
+
* @param name - Tool name.
|
|
20
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
21
|
+
* @param text - The result's text payload (the tool's JSON output).
|
|
22
|
+
* @returns A generic card titled with the created branch, whose body is the
|
|
23
|
+
* checkout path (relative to the repository when inside it) and the
|
|
24
|
+
* revision it started from; undefined for any other tool or shape.
|
|
25
|
+
*/
|
|
26
|
+
export declare function worktreeResultView(name: string, rawArgs: string, text: string): ToolResultView | undefined;
|
|
27
|
+
//# sourceMappingURL=worktree-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-tool.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/worktree-tool.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEtE,mEAAmE;AACnE,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAgB9C;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,OAAO,EAAE,MAAM,GACd,YAAY,GAAG,SAAS,CAK1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAmB1G"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card shape for the experimental `create_worktree` tool.
|
|
3
|
+
*
|
|
4
|
+
* `@deepseek-ai/dsh-experimental-tool-worktree@0.2.1-rc.3` titles every call
|
|
5
|
+
* with the bare tool name and ships no result presenter, so the card reads
|
|
6
|
+
* `create_worktree` over one line of JSON (`path`, `branch`, `baseCommit`,
|
|
7
|
+
* `repositoryRoot`) that a narrow terminal breaks mid-field. This adapter is
|
|
8
|
+
* the layer allowed to decide presentation (`agent/presentation.ts`), so the
|
|
9
|
+
* call header names the branch the way the session-search cards name their
|
|
10
|
+
* query (`session-tools.ts`), and a settled result becomes two lines: where
|
|
11
|
+
* the checkout is and what it started from.
|
|
12
|
+
*
|
|
13
|
+
* Self-expiring like those cards: the header is rewritten only while the
|
|
14
|
+
* upstream title is still the pinned tool name, and the result only while the
|
|
15
|
+
* tool has no presenter of its own (the caller checks), so an upstream
|
|
16
|
+
* presentation wins without editing this app.
|
|
17
|
+
*
|
|
18
|
+
* @module
|
|
19
|
+
*/
|
|
20
|
+
import { displayPath } from '../backends/shared/display-path.js';
|
|
21
|
+
import { t } from '../i18n.js';
|
|
22
|
+
/** The tool name, which is also its pinned upstream call title. */
|
|
23
|
+
export const WORKTREE_TOOL = 'create_worktree';
|
|
24
|
+
/** `Worktree("name")`: JSON-encoding keeps the one-line header printable
|
|
25
|
+
* whatever the model put in the name (`session-tools.ts`). */
|
|
26
|
+
const header = (branch) => `Worktree(${JSON.stringify(branch)})`;
|
|
27
|
+
/** The model's `{ name?, from? }` arguments, or undefined when unparseable. */
|
|
28
|
+
function argsOf(rawArgs) {
|
|
29
|
+
try {
|
|
30
|
+
const args = JSON.parse(rawArgs);
|
|
31
|
+
return typeof args === 'object' && args !== null ? args : undefined;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Put the requested branch name in a `create_worktree` call card's header.
|
|
39
|
+
*
|
|
40
|
+
* @param name - Tool name.
|
|
41
|
+
* @param view - The upstream presentation view for this call, if any.
|
|
42
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
43
|
+
* @returns The upstream view untouched unless the tool, the pinned title and a
|
|
44
|
+
* non-empty string `name` all line up; else a retitled copy. A call
|
|
45
|
+
* without a name keeps the plain title until its result names the
|
|
46
|
+
* generated branch.
|
|
47
|
+
*/
|
|
48
|
+
export function refineWorktreeCallTitle(name, view, rawArgs) {
|
|
49
|
+
if (name !== WORKTREE_TOOL || view === undefined || view.card !== 'generic' || view.title !== WORKTREE_TOOL)
|
|
50
|
+
return view;
|
|
51
|
+
const branch = argsOf(rawArgs)?.name;
|
|
52
|
+
if (typeof branch !== 'string' || branch.trim() === '')
|
|
53
|
+
return view;
|
|
54
|
+
return { ...view, title: header(branch.trim()) };
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Summarize a settled `create_worktree` result.
|
|
58
|
+
*
|
|
59
|
+
* @param name - Tool name.
|
|
60
|
+
* @param rawArgs - The call's JSON arguments, as persisted.
|
|
61
|
+
* @param text - The result's text payload (the tool's JSON output).
|
|
62
|
+
* @returns A generic card titled with the created branch, whose body is the
|
|
63
|
+
* checkout path (relative to the repository when inside it) and the
|
|
64
|
+
* revision it started from; undefined for any other tool or shape.
|
|
65
|
+
*/
|
|
66
|
+
export function worktreeResultView(name, rawArgs, text) {
|
|
67
|
+
if (name !== WORKTREE_TOOL)
|
|
68
|
+
return undefined;
|
|
69
|
+
let value;
|
|
70
|
+
try {
|
|
71
|
+
value = JSON.parse(text);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
const { path, branch, baseCommit, repositoryRoot } = (value ?? {});
|
|
77
|
+
if (typeof path !== 'string' || typeof branch !== 'string' || typeof baseCommit !== 'string' || typeof repositoryRoot !== 'string') {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
const from = argsOf(rawArgs)?.from;
|
|
81
|
+
const lines = [
|
|
82
|
+
displayPath(path, repositoryRoot),
|
|
83
|
+
t('worktree-result-base', { from: typeof from === 'string' && from !== '' ? from : 'HEAD', commit: baseCommit.slice(0, 7) }),
|
|
84
|
+
];
|
|
85
|
+
// One block: a generic card joins its text blocks without a separator.
|
|
86
|
+
return { card: 'generic', title: header(branch), content: [{ type: 'text', text: lines.join('\n') }] };
|
|
87
|
+
}
|
|
@@ -4,7 +4,7 @@ export type { TuiDecisionContext, TuiInputEvent, TuiInputDecision, TuiRewindProm
|
|
|
4
4
|
export { DIALOG_DEFAULT_TIMEOUT_MS, INPUT_CELLS, TuiDialogRuntime, TuiDialogStore, } from './dsh-adapter/dialogs.js';
|
|
5
5
|
export type { TuiDialogAnswer, TuiDialogBase, TuiDialogConfirmRequest, TuiDialogInputRequest, TuiDialogSelectOption, TuiDialogSelectRequest, TuiDialogSnapshot, } from './dsh-adapter/dialogs.js';
|
|
6
6
|
export { TuiStatusRuntime, TuiStatusStore } from './dsh-adapter/status.js';
|
|
7
|
-
export type { TuiStatusEntry, TuiStatusViewDescriptor, TuiStatusViewDisposer, TuiStatusViewMaxRows, TuiStatusViewProps, TuiStatusViewUi, } from './dsh-adapter/status.js';
|
|
7
|
+
export type { TuiStatusEntry, TuiStatusFieldOptions, TuiStatusFieldSlot, TuiStatusFieldTone, TuiStatusViewDescriptor, TuiStatusViewDisposer, TuiStatusViewMaxRows, TuiStatusViewProps, TuiStatusViewUi, } from './dsh-adapter/status.js';
|
|
8
8
|
export type { TerminalImageSource } from './ink/terminal-image.js';
|
|
9
9
|
export { matchShortcut, parseShortcutCombo, TuiShortcutRuntime } from './dsh-adapter/shortcuts.js';
|
|
10
10
|
export type { TuiShortcutKey, TuiShortcutOptions } from './dsh-adapter/shortcuts.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/extensions.ts"],"names":[],"mappings":"AAQA,cAAc,6BAA6B,CAAA;AAI3C,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,mCAAmC,CAAA;AAC1C,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,GACnB,MAAM,mCAAmC,CAAA;AAI1C,OAAO,EACL,yBAAyB,EACzB,WAAW,EACX,gBAAgB,EAChB,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC1E,YAAY,EACV,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAClG,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG7F,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../src/extensions.ts"],"names":[],"mappings":"AAQA,cAAc,6BAA6B,CAAA;AAI3C,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,mCAAmC,CAAA;AAC1C,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,GACnB,MAAM,mCAAmC,CAAA;AAI1C,OAAO,EACL,yBAAyB,EACzB,WAAW,EACX,gBAAgB,EAChB,cAAc,GACf,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC1E,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAClG,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACxF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG7F,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* forces production, but a direct `dsh --profile dsh-tui` boot loads this
|
|
7
7
|
* plugin without one and silently regressed to the dev build. This module
|
|
8
8
|
* must stay the FIRST import of the package entry so its body runs before
|
|
9
|
-
* any module in the plugin graph requires react.
|
|
10
|
-
*
|
|
9
|
+
* any module in the plugin graph requires react. A workspace's NODE_ENV
|
|
10
|
+
* does not opt the TUI into development; use DSH_TUI_REACT_DEV=1 explicitly.
|
|
11
11
|
*/
|
|
12
|
-
process.env.NODE_ENV
|
|
12
|
+
process.env.NODE_ENV = process.env.DSH_TUI_REACT_DEV === '1' ? 'development' : 'production';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** env marker naming the file the replacement takes its held texts from. */
|
|
2
|
+
export declare const HELD_INPUTS_ENV = "DSH_TUI_HELD_INPUTS";
|
|
3
|
+
/**
|
|
4
|
+
* Write the texts for a replacement process to take.
|
|
5
|
+
* @returns The env marker to hand the replacement, or undefined when there
|
|
6
|
+
* is nothing to carry or the write failed (best effort: a restart never
|
|
7
|
+
* waits on it).
|
|
8
|
+
*/
|
|
9
|
+
export declare function writeHeldInputs(texts: readonly string[], dir?: string, pid?: number): Record<string, string> | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* The replacement's side: park the texts a `/restart` handed this process as
|
|
12
|
+
* held rows once the screen's channel is ready (never sent by themselves).
|
|
13
|
+
* A pass that cannot reach a ready channel leaves the handoff pending for the
|
|
14
|
+
* next `apply()` instead of dropping it.
|
|
15
|
+
* @returns What stops waiting for a channel that is not ready yet.
|
|
16
|
+
*/
|
|
17
|
+
export declare function adoptHeldInputs(channel: {
|
|
18
|
+
readonly ready: boolean;
|
|
19
|
+
subscribe(listener: () => void): () => void;
|
|
20
|
+
holdInputs(texts: readonly string[]): number;
|
|
21
|
+
}, env?: NodeJS.ProcessEnv, dir?: string): (() => void) | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The resume command after a restart that ended before any replacement took
|
|
24
|
+
* the held texts (a stall, a failed spawn): their file stays, and the command
|
|
25
|
+
* hands it to the next launch. Windows has no shared env-assignment syntax:
|
|
26
|
+
* PowerShell and cmd.exe each get their own copy-pasteable line.
|
|
27
|
+
*/
|
|
28
|
+
export declare function heldInputsResumeCommand(command: string, env: Readonly<Record<string, string>> | undefined, platform?: NodeJS.Platform): string;
|
|
29
|
+
/**
|
|
30
|
+
* Take (read and delete) the texts a `/restart` handed this process. One
|
|
31
|
+
* shot: the env marker is consumed too, so no child inherits it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function takeHeldInputs(env?: NodeJS.ProcessEnv, dir?: string): string[];
|
|
34
|
+
/** Remove held-input files older than the resume window (best effort). */
|
|
35
|
+
export declare function sweepHeldInputs(dir?: string, now?: number): void;
|
|
36
|
+
//# sourceMappingURL=heldInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heldInputs.d.ts","sourceRoot":"","sources":["../../src/heldInputs.ts"],"names":[],"mappings":"AAaA,4EAA4E;AAC5E,eAAO,MAAM,eAAe,wBAAwB,CAAA;AAOpD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,GAAE,MAAiB,EAAE,GAAG,GAAE,MAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAc/I;AAyBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAAC,UAAU,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAA;CAAE,EAC/H,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,GAAE,MAAiB,GACrB,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CA8B1B;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,MAAM,CAShK;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,EAAE,GAAG,GAAE,MAAiB,GAAG,MAAM,EAAE,CAMrG;AAmBD,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAiB,EAAE,GAAG,GAAE,MAAmB,GAAG,IAAI,CAetF"}
|