@deepseek-harness-tui/dsh-tui 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -17
- package/bin/dsh-tui.js +200 -34
- package/cordis.patch.yml +16 -52
- package/cordis.yml +6 -2
- package/guide/dsh-tui-guide/claude-backend.en.md +44 -7
- package/guide/dsh-tui-guide/claude-backend.md +28 -6
- package/guide/dsh-tui-guide/codex-backend.en.md +47 -10
- package/guide/dsh-tui-guide/codex-backend.md +26 -4
- package/guide/dsh-tui-guide/configuration.en.md +168 -18
- package/guide/dsh-tui-guide/configuration.md +144 -16
- package/guide/dsh-tui-guide/getting-started.en.md +15 -0
- package/guide/dsh-tui-guide/getting-started.md +15 -0
- package/guide/dsh-tui-guide/interaction.en.md +64 -24
- package/guide/dsh-tui-guide/interaction.md +49 -19
- package/guide/dsh-tui-guide/plugins.en.md +97 -3
- package/guide/dsh-tui-guide/plugins.md +55 -2
- package/guide/dsh-tui-guide/themes.en.md +23 -14
- package/guide/dsh-tui-guide/themes.md +19 -12
- package/guide/dsh-tui-guide/user-guide.en.md +53 -21
- package/guide/dsh-tui-guide/user-guide.md +43 -22
- package/lib/settings.json +103 -9
- package/lib/types/adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/projection.js +1 -0
- package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +4 -0
- package/lib/types/adapter/channel/ui.d.ts +2 -0
- package/lib/types/adapter/channel/ui.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui.js +6 -2
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/ports/channel-catalog.d.ts +5 -1
- package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +14 -3
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +56 -12
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +68 -0
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +2 -0
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/spec/backend-capabilities.d.ts +22 -0
- package/lib/types/adapter/spec/backend-capabilities.d.ts.map +1 -0
- package/lib/types/adapter/spec/backend-capabilities.js +49 -0
- package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
- package/lib/types/adapter/spec/protocol-constants.js +10 -3
- package/lib/types/adapter/spec/tui-contributions.d.ts +3 -0
- package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
- package/lib/types/adapter/spec/tui-contributions.js +7 -0
- package/lib/types/adapter/standard/registry.d.ts +6 -0
- package/lib/types/adapter/standard/registry.d.ts.map +1 -1
- package/lib/types/adapter/standard/registry.js +65 -15
- package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -1
- package/lib/types/adapter/standard/tui-extension.js +7 -1
- package/lib/types/adapter/standard/types.d.ts +10 -1
- package/lib/types/adapter/standard/types.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/host-descriptor-driver.js +52 -0
- package/lib/types/agent/backend-manifest.d.ts +152 -0
- package/lib/types/agent/backend-manifest.d.ts.map +1 -0
- package/lib/types/agent/backend-manifest.js +14 -0
- package/lib/types/agent/backend.d.ts +71 -5
- package/lib/types/agent/backend.d.ts.map +1 -1
- package/lib/types/agent/capabilities.d.ts +6 -0
- package/lib/types/agent/capabilities.d.ts.map +1 -1
- package/lib/types/agent/events.d.ts +3 -2
- package/lib/types/agent/events.d.ts.map +1 -1
- package/lib/types/agent/index.d.ts +2 -0
- package/lib/types/agent/index.d.ts.map +1 -1
- package/lib/types/agent/refs.d.ts +11 -1
- package/lib/types/agent/refs.d.ts.map +1 -1
- package/lib/types/agent/starting-session.d.ts +4 -0
- package/lib/types/agent/starting-session.d.ts.map +1 -0
- package/lib/types/agent/starting-session.js +19 -0
- package/lib/types/backends/claude/activity.d.ts +1 -1
- package/lib/types/backends/claude/activity.d.ts.map +1 -1
- package/lib/types/backends/claude/activity.js +5 -5
- package/lib/types/backends/claude/auth.d.ts.map +1 -1
- package/lib/types/backends/claude/auth.js +10 -3
- package/lib/types/backends/claude/backend.d.ts.map +1 -1
- package/lib/types/backends/claude/backend.js +103 -29
- package/lib/types/backends/claude/catalog.d.ts +2 -1
- package/lib/types/backends/claude/catalog.d.ts.map +1 -1
- package/lib/types/backends/claude/catalog.js +15 -5
- package/lib/types/backends/claude/channels.d.ts +5 -3
- package/lib/types/backends/claude/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/channels.js +5 -4
- package/lib/types/backends/claude/contract.d.ts +4 -0
- package/lib/types/backends/claude/contract.d.ts.map +1 -1
- package/lib/types/backends/claude/contract.js +4 -0
- package/lib/types/backends/claude/controls.d.ts +4 -0
- package/lib/types/backends/claude/controls.d.ts.map +1 -1
- package/lib/types/backends/claude/controls.js +34 -42
- package/lib/types/backends/claude/dialogs.d.ts +8 -2
- package/lib/types/backends/claude/dialogs.d.ts.map +1 -1
- package/lib/types/backends/claude/dialogs.js +24 -16
- package/lib/types/backends/claude/images.d.ts +1 -1
- package/lib/types/backends/claude/images.d.ts.map +1 -1
- package/lib/types/backends/claude/images.js +7 -7
- package/lib/types/backends/claude/manifest.d.ts +21 -0
- package/lib/types/backends/claude/manifest.d.ts.map +1 -0
- package/lib/types/backends/claude/manifest.js +29 -0
- package/lib/types/backends/claude/older-history.js +2 -2
- package/lib/types/backends/claude/permissions.js +11 -11
- package/lib/types/backends/claude/prefs.d.ts +4 -2
- package/lib/types/backends/claude/prefs.d.ts.map +1 -1
- package/lib/types/backends/claude/prefs.js +4 -3
- package/lib/types/backends/claude/process.d.ts +16 -4
- package/lib/types/backends/claude/process.d.ts.map +1 -1
- package/lib/types/backends/claude/process.js +100 -37
- package/lib/types/backends/claude/send-message.d.ts +1 -1
- package/lib/types/backends/claude/send-message.d.ts.map +1 -1
- package/lib/types/backends/claude/session/auth.js +22 -22
- package/lib/types/backends/claude/session/channels.d.ts +4 -0
- package/lib/types/backends/claude/session/channels.d.ts.map +1 -1
- package/lib/types/backends/claude/session/channels.js +5 -3
- package/lib/types/backends/claude/session/lifecycle.d.ts.map +1 -1
- package/lib/types/backends/claude/session/lifecycle.js +31 -23
- package/lib/types/backends/claude/session/store.js +8 -8
- package/lib/types/backends/claude/session/subagents.js +2 -2
- package/lib/types/backends/claude/session/types.d.ts +7 -0
- package/lib/types/backends/claude/session/types.d.ts.map +1 -1
- package/lib/types/backends/claude/side-query.js +3 -3
- package/lib/types/backends/claude/task-output.js +5 -5
- package/lib/types/backends/claude/text.d.ts +778 -0
- package/lib/types/backends/claude/text.d.ts.map +1 -0
- package/lib/types/backends/claude/text.js +298 -0
- package/lib/types/backends/claude/transcript-file.d.ts +1 -1
- package/lib/types/backends/claude/transcript-file.d.ts.map +1 -1
- package/lib/types/backends/claude/transcript-file.js +4 -4
- package/lib/types/backends/claude/translate/attempts.js +2 -2
- package/lib/types/backends/claude/translate/core.js +3 -3
- package/lib/types/backends/claude/translate/messages.js +4 -4
- package/lib/types/backends/claude/translate/system.js +14 -14
- package/lib/types/backends/claude/translate/tasks.js +2 -2
- package/lib/types/backends/claude/translate/types.d.ts +1 -1
- package/lib/types/backends/claude/translate/types.d.ts.map +1 -1
- package/lib/types/backends/codex/auth/external-tokens.js +16 -16
- package/lib/types/backends/codex/auth/status.js +14 -14
- package/lib/types/backends/codex/backend.d.ts +4 -19
- package/lib/types/backends/codex/backend.d.ts.map +1 -1
- package/lib/types/backends/codex/backend.js +118 -25
- package/lib/types/backends/codex/catalog.d.ts +2 -1
- package/lib/types/backends/codex/catalog.d.ts.map +1 -1
- package/lib/types/backends/codex/catalog.js +63 -18
- package/lib/types/backends/codex/channels.d.ts +6 -3
- package/lib/types/backends/codex/channels.d.ts.map +1 -1
- package/lib/types/backends/codex/channels.js +15 -13
- package/lib/types/backends/codex/contract.d.ts +3 -0
- package/lib/types/backends/codex/contract.d.ts.map +1 -1
- package/lib/types/backends/codex/contract.js +3 -0
- package/lib/types/backends/codex/detect.d.ts.map +1 -1
- package/lib/types/backends/codex/detect.js +9 -6
- package/lib/types/backends/codex/manifest.d.ts +30 -0
- package/lib/types/backends/codex/manifest.d.ts.map +1 -0
- package/lib/types/backends/codex/manifest.js +23 -0
- package/lib/types/backends/codex/prefs.d.ts +4 -2
- package/lib/types/backends/codex/prefs.d.ts.map +1 -1
- package/lib/types/backends/codex/prefs.js +4 -3
- package/lib/types/backends/codex/rpc/hub.js +2 -2
- package/lib/types/backends/codex/session/activity.d.ts +1 -1
- package/lib/types/backends/codex/session/activity.d.ts.map +1 -1
- package/lib/types/backends/codex/session/activity.js +13 -13
- package/lib/types/backends/codex/session/approvals.js +30 -30
- package/lib/types/backends/codex/session/async-questions.d.ts +17 -0
- package/lib/types/backends/codex/session/async-questions.d.ts.map +1 -0
- package/lib/types/backends/codex/session/async-questions.js +89 -0
- package/lib/types/backends/codex/session/commands.d.ts +8 -2
- package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
- package/lib/types/backends/codex/session/commands.js +71 -23
- package/lib/types/backends/codex/session/controls.d.ts +1 -1
- package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
- package/lib/types/backends/codex/session/controls.js +21 -16
- package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
- package/lib/types/backends/codex/session/goals.js +3 -3
- package/lib/types/backends/codex/session/history.js +2 -2
- package/lib/types/backends/codex/session/images.js +8 -8
- package/lib/types/backends/codex/session/input.d.ts +6 -2
- package/lib/types/backends/codex/session/input.d.ts.map +1 -1
- package/lib/types/backends/codex/session/input.js +55 -13
- package/lib/types/backends/codex/session/plan-review.js +6 -6
- package/lib/types/backends/codex/session/session.d.ts.map +1 -1
- package/lib/types/backends/codex/session/session.js +100 -42
- package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
- package/lib/types/backends/codex/session/side-query.js +27 -9
- package/lib/types/backends/codex/session/state.d.ts +6 -1
- package/lib/types/backends/codex/session/state.d.ts.map +1 -1
- package/lib/types/backends/codex/session/subagents.js +5 -5
- package/lib/types/backends/codex/session/tasks.js +4 -4
- package/lib/types/backends/codex/text.d.ts +933 -0
- package/lib/types/backends/codex/text.d.ts.map +1 -0
- package/lib/types/backends/codex/text.js +313 -0
- package/lib/types/backends/codex/translate/items.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/items.js +7 -5
- package/lib/types/backends/codex/translate/live.d.ts.map +1 -1
- package/lib/types/backends/codex/translate/live.js +11 -8
- package/lib/types/backends/codex/translate/notices.js +10 -10
- package/lib/types/backends/codex/translate/question-reply.d.ts +11 -0
- package/lib/types/backends/codex/translate/question-reply.d.ts.map +1 -0
- package/lib/types/backends/codex/translate/question-reply.js +53 -0
- package/lib/types/backends/shared/channel-slug.d.ts +4 -0
- package/lib/types/backends/shared/channel-slug.d.ts.map +1 -0
- package/lib/types/backends/shared/channel-slug.js +25 -0
- package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
- package/lib/types/backends/shared/channel-tokens.js +30 -23
- package/lib/types/{channel → backends/shared}/elicitation.d.ts +78 -21
- package/lib/types/backends/shared/elicitation.d.ts.map +1 -0
- package/lib/types/{channel → backends/shared}/elicitation.js +64 -66
- package/lib/types/backends/shared/image-size.d.ts +33 -0
- package/lib/types/backends/shared/image-size.d.ts.map +1 -0
- package/lib/types/backends/shared/image-size.js +134 -0
- package/lib/types/{utils → backends/shared}/jsonl.d.ts +5 -1
- package/lib/types/backends/shared/jsonl.d.ts.map +1 -0
- package/lib/types/{utils → backends/shared}/jsonl.js +5 -1
- package/lib/types/backends/shared/localized-text.d.ts +30 -0
- package/lib/types/backends/shared/localized-text.d.ts.map +1 -0
- package/lib/types/backends/shared/localized-text.js +24 -0
- package/lib/types/backends/shared/platform-text.d.ts +88 -0
- package/lib/types/backends/shared/platform-text.d.ts.map +1 -0
- package/lib/types/backends/shared/platform-text.js +33 -0
- package/lib/types/branding.d.ts +13 -0
- package/lib/types/branding.d.ts.map +1 -1
- package/lib/types/branding.js +18 -0
- package/lib/types/channel/channel-slug.d.ts +3 -1
- package/lib/types/channel/channel-slug.d.ts.map +1 -1
- package/lib/types/channel/channel-slug.js +3 -1
- package/lib/types/channel/projection.d.ts.map +1 -1
- package/lib/types/channel/projection.js +10 -0
- package/lib/types/channel/sanitize.d.ts +7 -0
- package/lib/types/channel/sanitize.d.ts.map +1 -1
- package/lib/types/channel/sanitize.js +9 -0
- package/lib/types/channel/usage.d.ts.map +1 -1
- package/lib/types/channel/usage.js +5 -0
- package/lib/types/commands.d.ts +15 -0
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +58 -10
- package/lib/types/components/AgentMessageComposer.d.ts.map +1 -1
- package/lib/types/components/AgentMessageComposer.js +3 -2
- package/lib/types/components/BtwPanel.d.ts.map +1 -1
- package/lib/types/components/BtwPanel.js +4 -2
- package/lib/types/components/Chat/JobCard.js +3 -3
- package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
- package/lib/types/components/CommandSuggestions.js +24 -7
- package/lib/types/components/ContextBarView.d.ts +5 -1
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +6 -3
- package/lib/types/components/ExtensionDialog.d.ts.map +1 -1
- package/lib/types/components/ExtensionDialog.js +2 -3
- package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
- package/lib/types/components/GoalTodoPanel.js +14 -3
- package/lib/types/components/InlineMathParagraph.js +1 -1
- package/lib/types/components/KernelPicker.d.ts.map +1 -1
- package/lib/types/components/KernelPicker.js +1 -1
- package/lib/types/components/LogoV2.d.ts +4 -1
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +14 -9
- package/lib/types/components/MarkdownTable.d.ts.map +1 -1
- package/lib/types/components/MarkdownTable.js +4 -3
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +109 -15
- package/lib/types/components/ModelPicker.d.ts +24 -31
- package/lib/types/components/ModelPicker.d.ts.map +1 -1
- package/lib/types/components/ModelPicker.js +115 -40
- package/lib/types/components/PermissionsPicker.d.ts +10 -1
- package/lib/types/components/PermissionsPicker.d.ts.map +1 -1
- package/lib/types/components/PermissionsPicker.js +24 -16
- package/lib/types/components/PluginInstallPane.d.ts +21 -0
- package/lib/types/components/PluginInstallPane.d.ts.map +1 -0
- package/lib/types/components/PluginInstallPane.js +84 -0
- package/lib/types/components/PluginManagePane.d.ts +21 -0
- package/lib/types/components/PluginManagePane.d.ts.map +1 -0
- package/lib/types/components/PluginManagePane.js +69 -0
- package/lib/types/components/PromptEditor.d.ts +3 -3
- package/lib/types/components/PromptInput.d.ts +21 -3
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +65 -121
- package/lib/types/components/SdkInstallWizard.d.ts +3 -1
- package/lib/types/components/SdkInstallWizard.d.ts.map +1 -1
- package/lib/types/components/SdkInstallWizard.js +8 -1
- package/lib/types/components/SearchBox.d.ts +13 -15
- package/lib/types/components/SearchBox.d.ts.map +1 -1
- package/lib/types/components/SearchBox.js +58 -27
- package/lib/types/components/SubagentCard.d.ts +13 -1
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +27 -12
- package/lib/types/components/SubagentDashboard.d.ts +8 -1
- package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
- package/lib/types/components/SubagentDashboard.js +58 -16
- package/lib/types/components/ThemePicker.d.ts +1 -1
- package/lib/types/components/ThemePicker.d.ts.map +1 -1
- package/lib/types/components/ThemePicker.js +14 -11
- package/lib/types/components/Tooltip.js +1 -1
- package/lib/types/components/WorkingSpinner.js +1 -1
- package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
- package/lib/types/components/WorkspaceFlowPicker.js +4 -3
- package/lib/types/components/composerImageTokens.d.ts +24 -0
- package/lib/types/components/composerImageTokens.d.ts.map +1 -0
- package/lib/types/components/composerImageTokens.js +37 -0
- package/lib/types/components/design-system/InputCaret.d.ts +7 -0
- package/lib/types/components/design-system/InputCaret.d.ts.map +1 -0
- package/lib/types/components/design-system/InputCaret.js +9 -0
- package/lib/types/components/design-system/ListItem.d.ts +13 -2
- package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
- package/lib/types/components/design-system/ListItem.js +11 -5
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +6 -8
- package/lib/types/components/kernelCatalog.d.ts +55 -11
- package/lib/types/components/kernelCatalog.d.ts.map +1 -1
- package/lib/types/components/kernelCatalog.js +42 -23
- package/lib/types/components/launchpadActions.d.ts +4 -0
- package/lib/types/components/launchpadActions.d.ts.map +1 -1
- package/lib/types/components/launchpadActions.js +5 -4
- package/lib/types/components/launchpadLayout.d.ts +14 -1
- package/lib/types/components/launchpadLayout.d.ts.map +1 -1
- package/lib/types/components/launchpadLayout.js +38 -19
- package/lib/types/components/messages/TeamMessageBubble.d.ts +20 -0
- package/lib/types/components/messages/TeamMessageBubble.d.ts.map +1 -0
- package/lib/types/components/messages/TeamMessageBubble.js +15 -0
- package/lib/types/components/messages/UserPromptMessage.d.ts +4 -3
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +4 -3
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +8 -3
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +4 -3
- package/lib/types/components/questions/ProviderModelEditor.d.ts.map +1 -1
- package/lib/types/components/questions/ProviderModelEditor.js +3 -13
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -1
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
- package/lib/types/components/sessions/ForeignSessionRow.js +5 -2
- package/lib/types/components/sessions/SessionListRow.d.ts +3 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +5 -2
- package/lib/types/components/sidePanel/PanelBar.d.ts +1 -0
- package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelBar.js +21 -17
- package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelHost.js +5 -1
- package/lib/types/components/sidePanel/PanelStore.d.ts +8 -0
- package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -1
- package/lib/types/components/sidePanel/PanelStore.js +11 -0
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelColumn.js +15 -2
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts +6 -4
- package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelLayout.js +33 -7
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +7 -0
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -1
- package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +4 -0
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -2
- package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwComposer.js +28 -8
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts +2 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +156 -21
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +6 -2
- package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadScene.js +64 -16
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts +15 -5
- package/lib/types/components/sidePanel/btw/BtwThreadView.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/BtwThreadView.js +101 -10
- package/lib/types/components/sidePanel/btw/threads.d.ts +18 -0
- package/lib/types/components/sidePanel/btw/threads.d.ts.map +1 -1
- package/lib/types/components/sidePanel/btw/threads.js +51 -0
- package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
- package/lib/types/components/sidePanel/builtinPanels.js +5 -1
- package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -2
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +5 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/SplashMascot.js +19 -4
- package/lib/types/components/sidePanel/companion/skins.d.ts +8 -0
- package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -1
- package/lib/types/components/sidePanel/companion/skins.js +57 -12
- package/lib/types/components/sidePanel/types.d.ts +7 -1
- package/lib/types/components/sidePanel/types.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.d.ts +2 -0
- package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
- package/lib/types/components/sidePanel/useSidePanel.js +11 -1
- package/lib/types/components/splashArtRows.d.ts +29 -0
- package/lib/types/components/splashArtRows.d.ts.map +1 -0
- package/lib/types/components/splashArtRows.js +31 -0
- package/lib/types/components/splashFonts.d.ts +24 -1
- package/lib/types/components/splashFonts.d.ts.map +1 -1
- package/lib/types/components/splashFonts.js +40 -5
- package/lib/types/components/teamRoster.d.ts +70 -0
- package/lib/types/components/teamRoster.d.ts.map +1 -0
- package/lib/types/components/teamRoster.js +78 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +5 -2
- package/lib/types/dsh-adapter/admission-loader.d.ts +102 -0
- package/lib/types/dsh-adapter/admission-loader.d.ts.map +1 -0
- package/lib/types/dsh-adapter/admission-loader.js +301 -0
- package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -1
- package/lib/types/dsh-adapter/agent-view.js +3 -1
- package/lib/types/dsh-adapter/approvals.d.ts +7 -0
- package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
- package/lib/types/dsh-adapter/approvals.js +45 -1
- package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backend/translate.js +71 -8
- package/lib/types/dsh-adapter/backend-admission.d.ts +64 -0
- package/lib/types/dsh-adapter/backend-admission.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-admission.js +34 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts +31 -0
- package/lib/types/dsh-adapter/backend-assembly.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-assembly.js +225 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts +62 -0
- package/lib/types/dsh-adapter/backend-contribution.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-contribution.js +78 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts +136 -0
- package/lib/types/dsh-adapter/backend-registry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backend-registry.js +304 -0
- package/lib/types/dsh-adapter/backends.d.ts +67 -24
- package/lib/types/dsh-adapter/backends.d.ts.map +1 -1
- package/lib/types/dsh-adapter/backends.generated.d.ts +12 -0
- package/lib/types/dsh-adapter/backends.generated.d.ts.map +1 -0
- package/lib/types/dsh-adapter/backends.generated.js +6 -0
- package/lib/types/dsh-adapter/backends.js +91 -46
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
- package/lib/types/dsh-adapter/bundled-presets.js +60 -3
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +2 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +9 -3
- package/lib/types/dsh-adapter/channel/agent-view-projection.js +2 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +8 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +17 -3
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +19 -46
- package/lib/types/dsh-adapter/channel/channel-host.d.ts +45 -0
- package/lib/types/dsh-adapter/channel/channel-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/channel-host.js +1 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/command-completions.js +79 -6
- package/lib/types/dsh-adapter/channel/compaction.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +100 -26
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +4 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +36 -5
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts +14 -0
- package/lib/types/dsh-adapter/channel/cordis-host.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/cordis-host.js +35 -0
- package/lib/types/dsh-adapter/channel/core/actions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/actions.js +15 -6
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -3
- package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/binding-feed.js +5 -1
- package/lib/types/dsh-adapter/channel/core/compose.d.ts +12 -28
- package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/compose.js +330 -117
- package/lib/types/dsh-adapter/channel/core/files.d.ts +7 -2
- package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/files.js +1 -0
- package/lib/types/dsh-adapter/channel/core/host.d.ts +12 -6
- package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/host.js +69 -35
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +5 -3
- package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/local-actions.js +5 -2
- package/lib/types/dsh-adapter/channel/core/session-controls.js +2 -2
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts +7 -4
- package/lib/types/dsh-adapter/channel/core/session-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/session-switch.js +8 -4
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/core/sessions.js +75 -16
- package/lib/types/dsh-adapter/channel/extensions.d.ts +4 -3
- package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/extensions.js +109 -30
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
- package/lib/types/dsh-adapter/channel/job-projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/job-projection.js +205 -24
- package/lib/types/dsh-adapter/channel/mentions.d.ts +3 -3
- package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +7 -0
- package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/mode-permission-actions.js +235 -13
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +5 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +48 -29
- package/lib/types/dsh-adapter/channel/model-selection.d.ts +17 -0
- package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/model-selection.js +109 -0
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +12 -21
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +39 -102
- package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/permissions.js +4 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection-helpers.js +2 -0
- package/lib/types/dsh-adapter/channel/projection.js +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +11 -3
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +33 -20
- package/lib/types/dsh-adapter/channel/session-listing.d.ts +20 -0
- package/lib/types/dsh-adapter/channel/session-listing.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-listing.js +51 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +3 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +60 -30
- package/lib/types/dsh-adapter/channel/session-reset.js +2 -2
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +22 -8
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +38 -24
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +38 -24
- package/lib/types/dsh-adapter/channel/settings-host.d.ts +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +136 -5
- package/lib/types/dsh-adapter/channel/state.d.ts +43 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +14 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +84 -12
- package/lib/types/dsh-adapter/channel/task-completion.d.ts +6 -0
- package/lib/types/dsh-adapter/channel/task-completion.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/task-completion.js +114 -0
- package/lib/types/dsh-adapter/channel/transcript.d.ts +8 -1
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +20 -3
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts +81 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/upstream-retry.js +138 -0
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +9 -8
- package/lib/types/dsh-adapter/channel-ui.d.ts +3 -1
- package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel-ui.js +4 -2
- package/lib/types/dsh-adapter/channel.d.ts +2 -2
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +19 -5
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts +55 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/agent-team-0.2.0.js +96 -0
- package/lib/types/dsh-adapter/context-occupancy.d.ts +81 -4
- package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -1
- package/lib/types/dsh-adapter/context-occupancy.js +108 -17
- package/lib/types/dsh-adapter/contract.d.ts +4 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +20 -5
- package/lib/types/dsh-adapter/effect-ledger.d.ts +7 -0
- package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
- package/lib/types/dsh-adapter/effect-ledger.js +8 -1
- package/lib/types/dsh-adapter/entry-slot.d.ts +38 -0
- package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/entry-slot.js +28 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts +22 -0
- package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -0
- package/lib/types/dsh-adapter/fresh-agent.js +226 -0
- package/lib/types/dsh-adapter/host-access.d.ts +16 -1
- package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
- package/lib/types/dsh-adapter/host-access.js +148 -2
- package/lib/types/dsh-adapter/host-contract.d.ts +103 -0
- package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-contract.js +77 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts +112 -0
- package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-dsh.js +481 -0
- package/lib/types/dsh-adapter/host-entry.d.ts +9 -0
- package/lib/types/dsh-adapter/host-entry.d.ts.map +1 -0
- package/lib/types/dsh-adapter/host-entry.js +253 -0
- package/lib/types/dsh-adapter/index.d.ts +53 -17
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +63 -9
- package/lib/types/dsh-adapter/install/executors.d.ts +44 -0
- package/lib/types/dsh-adapter/install/executors.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/executors.js +15 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts +3 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -0
- package/lib/types/dsh-adapter/install/pnpm-profile-add.js +150 -0
- package/lib/types/dsh-adapter/invariant.d.ts +7 -2
- package/lib/types/dsh-adapter/invariant.d.ts.map +1 -1
- package/lib/types/dsh-adapter/invariant.js +6 -3
- package/lib/types/dsh-adapter/jobs.d.ts +7 -0
- package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
- package/lib/types/dsh-adapter/jobs.js +13 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts +50 -0
- package/lib/types/dsh-adapter/lite-profile.d.ts.map +1 -0
- package/lib/types/dsh-adapter/lite-profile.js +49 -0
- package/lib/types/dsh-adapter/migrate/index.js +2 -2
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -1
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +4 -3
- package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
- package/lib/types/dsh-adapter/oauth/profiles.js +5 -1
- package/lib/types/dsh-adapter/panels.d.ts +7 -0
- package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
- package/lib/types/dsh-adapter/panels.js +41 -2
- package/lib/types/dsh-adapter/plugin-completions.d.ts +32 -0
- package/lib/types/dsh-adapter/plugin-completions.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-completions.js +80 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts +119 -0
- package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-declaration.js +183 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts +94 -0
- package/lib/types/dsh-adapter/plugin-feed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-feed.js +135 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts +115 -0
- package/lib/types/dsh-adapter/plugin-guard.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-guard.js +108 -0
- package/lib/types/dsh-adapter/plugin-host.d.ts +13 -2
- package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin-host.js +34 -8
- package/lib/types/dsh-adapter/plugin-install.d.ts +160 -0
- package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-install.js +545 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts +178 -0
- package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manage.js +468 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts +144 -0
- package/lib/types/dsh-adapter/plugin-manager.d.ts.map +1 -0
- package/lib/types/dsh-adapter/plugin-manager.js +83 -0
- package/lib/types/dsh-adapter/plugin.d.ts +50 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +918 -234
- package/lib/types/dsh-adapter/plugins-info.d.ts +130 -8
- package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugins-info.js +469 -44
- package/lib/types/dsh-adapter/process-exit.d.ts +43 -0
- package/lib/types/dsh-adapter/process-exit.d.ts.map +1 -0
- package/lib/types/dsh-adapter/process-exit.js +60 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts +18 -0
- package/lib/types/dsh-adapter/root-dispose.d.ts.map +1 -0
- package/lib/types/dsh-adapter/root-dispose.js +28 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts +20 -0
- package/lib/types/dsh-adapter/session-list-metadata.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-list-metadata.js +56 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts +66 -0
- package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-projection-store.js +149 -0
- package/lib/types/dsh-adapter/session-seed.d.ts +11 -0
- package/lib/types/dsh-adapter/session-seed.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-seed.js +47 -0
- package/lib/types/dsh-adapter/sessions/list.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +11 -5
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +0 -2
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/snapshot.js +7 -70
- package/lib/types/dsh-adapter/settingsEditor.js +2 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts +21 -0
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +53 -0
- package/lib/types/dsh-adapter/startup-args.d.ts +2 -0
- package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -1
- package/lib/types/dsh-adapter/startup-args.js +5 -0
- package/lib/types/dsh-adapter/subagents.d.ts +33 -1
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +112 -9
- package/lib/types/dsh-adapter/team-mode.d.ts +74 -0
- package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-mode.js +188 -0
- package/lib/types/dsh-adapter/team-roster.d.ts +67 -0
- package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-roster.js +136 -0
- package/lib/types/dsh-adapter/team-tools.d.ts +58 -0
- package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/team-tools.js +208 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts +57 -0
- package/lib/types/dsh-adapter/tui-settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/tui-settings.js +199 -0
- package/lib/types/dsh-adapter/types.d.ts +1 -1
- package/lib/types/dsh-adapter/types.d.ts.map +1 -1
- package/lib/types/effortPrefs.d.ts +6 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +7 -4
- package/lib/types/hostEntryRoute.d.ts +18 -0
- package/lib/types/hostEntryRoute.d.ts.map +1 -0
- package/lib/types/hostEntryRoute.js +57 -0
- package/lib/types/i18n.d.ts +961 -1439
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +443 -387
- package/lib/types/ink/components/AlternateScreen.js +2 -2
- package/lib/types/ink/components/App.d.ts +1 -0
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +16 -4
- package/lib/types/ink/components/CursorDeclarationContext.d.ts +9 -0
- package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -1
- package/lib/types/ink/components/CursorDeclarationContext.js +2 -0
- package/lib/types/ink/components/ScrollBox.d.ts +9 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +23 -0
- package/lib/types/ink/dom.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts +2 -2
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +13 -7
- package/lib/types/ink/hooks/use-declared-cursor.d.ts +11 -3
- package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-declared-cursor.js +30 -10
- package/lib/types/ink/ink.d.ts +22 -17
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +151 -40
- package/lib/types/ink/kitty-graphics.d.ts +2 -0
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +6 -1
- package/lib/types/ink/node-cache.d.ts +2 -1
- package/lib/types/ink/node-cache.d.ts.map +1 -1
- package/lib/types/ink/output.d.ts +10 -4
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +14 -10
- package/lib/types/ink/render-node-to-output.d.ts +5 -2
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +27 -9
- package/lib/types/ink/renderer.d.ts +1 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +4 -3
- package/lib/types/ink/root.d.ts +4 -1
- package/lib/types/ink/root.d.ts.map +1 -1
- package/lib/types/ink/screen.d.ts +4 -2
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/selection.d.ts +10 -1
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +94 -25
- package/lib/types/ink/stdin-handoff.d.ts +11 -0
- package/lib/types/ink/stdin-handoff.d.ts.map +1 -0
- package/lib/types/ink/stdin-handoff.js +20 -0
- package/lib/types/ink/styles.d.ts +2 -1
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +6 -4
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.js +16 -39
- package/lib/types/ink/terminal-notification.d.ts +8 -0
- package/lib/types/ink/terminal-notification.d.ts.map +1 -0
- package/lib/types/ink/terminal-notification.js +83 -0
- package/lib/types/ink/terminal.d.ts +9 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +34 -1
- package/lib/types/ink/termio/csi.d.ts +11 -0
- package/lib/types/ink/termio/csi.d.ts.map +1 -1
- package/lib/types/ink/termio/csi.js +13 -0
- package/lib/types/ink/update-overflow-guard.d.ts +6 -0
- package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
- package/lib/types/ink/update-overflow-guard.js +17 -0
- package/lib/types/ink/wrap-text.d.ts +6 -0
- package/lib/types/ink/wrap-text.d.ts.map +1 -1
- package/lib/types/ink/wrap-text.js +17 -0
- package/lib/types/kernelPrefs.d.ts +130 -17
- package/lib/types/kernelPrefs.d.ts.map +1 -1
- package/lib/types/kernelPrefs.js +98 -35
- package/lib/types/math/inline-layout.d.ts +2 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -1
- package/lib/types/math/inline-layout.js +5 -27
- package/lib/types/modelGroups.d.ts +15 -27
- package/lib/types/modelGroups.d.ts.map +1 -1
- package/lib/types/modelGroups.js +17 -31
- package/lib/types/modelPrefs.d.ts +5 -4
- package/lib/types/modelPrefs.d.ts.map +1 -1
- package/lib/types/modelPrefs.js +5 -4
- package/lib/types/modelRoute.d.ts +23 -9
- package/lib/types/modelRoute.d.ts.map +1 -1
- package/lib/types/modelRoute.js +25 -11
- package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
- package/lib/types/native-ts/yoga-layout/index.js +8 -1
- package/lib/types/permissionPrefs.d.ts +34 -0
- package/lib/types/permissionPrefs.d.ts.map +1 -0
- package/lib/types/permissionPrefs.js +61 -0
- package/lib/types/permissionPresetLabels.d.ts +25 -0
- package/lib/types/permissionPresetLabels.d.ts.map +1 -0
- package/lib/types/permissionPresetLabels.js +33 -0
- package/lib/types/plugin-host.d.ts +1 -0
- package/lib/types/plugin-host.d.ts.map +1 -1
- package/lib/types/preset-patch.d.ts +22 -0
- package/lib/types/preset-patch.d.ts.map +1 -0
- package/lib/types/preset-patch.js +14 -0
- package/lib/types/presetPrefs.d.ts +17 -3
- package/lib/types/presetPrefs.d.ts.map +1 -1
- package/lib/types/presetPrefs.js +20 -3
- package/lib/types/reload.d.ts +6 -10
- package/lib/types/reload.d.ts.map +1 -1
- package/lib/types/reload.js +14 -14
- package/lib/types/screens/Chat.d.ts +55 -16
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +742 -280
- package/lib/types/screens/Launchpad.d.ts +33 -17
- package/lib/types/screens/Launchpad.d.ts.map +1 -1
- package/lib/types/screens/Launchpad.js +256 -78
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +53 -12
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +7 -0
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +24 -7
- package/lib/types/screens/StatusMetrics.d.ts +46 -1
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +72 -0
- package/lib/types/screens/chat/useKernelPicker.d.ts +8 -4
- package/lib/types/screens/chat/useKernelPicker.d.ts.map +1 -1
- package/lib/types/screens/chat/useKernelPicker.js +61 -21
- package/lib/types/screens/chat/useModelPicker.d.ts +42 -0
- package/lib/types/screens/chat/useModelPicker.d.ts.map +1 -0
- package/lib/types/screens/chat/useModelPicker.js +182 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts +68 -0
- package/lib/types/screens/chat/usePluginWriteFlow.d.ts.map +1 -0
- package/lib/types/screens/chat/usePluginWriteFlow.js +92 -0
- package/lib/types/screens/chatOverlay.d.ts +30 -5
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +0 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +26 -5
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +51 -29
- package/lib/types/sessionHistory.d.ts +5 -0
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +5 -0
- package/lib/types/sessionModes.d.ts +5 -3
- package/lib/types/sessionModes.d.ts.map +1 -1
- package/lib/types/sessionModes.js +9 -3
- package/lib/types/sessions/listSnapshot.d.ts +6 -0
- package/lib/types/sessions/listSnapshot.d.ts.map +1 -0
- package/lib/types/sessions/listSnapshot.js +67 -0
- package/lib/types/settings/definitions.d.ts +50 -0
- package/lib/types/settings/definitions.d.ts.map +1 -1
- package/lib/types/settings/definitions.js +42 -8
- package/lib/types/terminal-utils/cjk-emphasis.d.ts +28 -0
- package/lib/types/terminal-utils/cjk-emphasis.d.ts.map +1 -0
- package/lib/types/terminal-utils/cjk-emphasis.js +31 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +7 -2
- package/lib/types/theme.d.ts +29 -12
- package/lib/types/theme.d.ts.map +1 -1
- package/lib/types/theme.js +310 -23
- package/lib/types/themeCatalog.d.ts.map +1 -1
- package/lib/types/themeCatalog.js +21 -2
- package/lib/types/tips.js +4 -4
- package/lib/types/tuiSettingsFile.d.ts +56 -0
- package/lib/types/tuiSettingsFile.d.ts.map +1 -0
- package/lib/types/tuiSettingsFile.js +206 -0
- package/lib/types/ui.d.ts +2 -0
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +2 -0
- package/lib/types/update.d.ts +72 -26
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +131 -43
- package/lib/types/utils/bmp.d.ts +7 -0
- package/lib/types/utils/bmp.d.ts.map +1 -1
- package/lib/types/utils/bmp.js +27 -0
- package/lib/types/utils/bootTrace.d.ts +2 -0
- package/lib/types/utils/bootTrace.d.ts.map +1 -0
- package/lib/types/utils/bootTrace.js +20 -0
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +11 -3
- package/lib/types/utils/credentials.d.ts +14 -2
- package/lib/types/utils/credentials.d.ts.map +1 -1
- package/lib/types/utils/credentials.js +34 -11
- package/lib/types/utils/imageResize.d.ts +10 -20
- package/lib/types/utils/imageResize.d.ts.map +1 -1
- package/lib/types/utils/imageResize.js +61 -134
- package/lib/types/utils/inputPaste.d.ts +2 -2
- package/lib/types/utils/inputPaste.js +2 -2
- package/lib/types/utils/pastedImagePath.d.ts +5 -0
- package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
- package/lib/types/utils/pastedImagePath.js +33 -0
- package/lib/types/utils/paths.d.ts +11 -0
- package/lib/types/utils/paths.d.ts.map +1 -1
- package/lib/types/utils/paths.js +13 -0
- package/package.json +150 -114
- package/presets/winbash.mjs +716 -0
- package/tui-profile/feed/README.md +63 -0
- package/tui-profile/feed/first-party.json +10 -0
- package/tui-profile/protocols/profile-definitions.d.ts +1 -0
- package/tui-profile/protocols/profile-definitions.js +14 -0
- package/tui-profile/protocols/tui-contributions.d.ts +55 -0
- package/tui-profile/protocols/tui-contributions.js +141 -0
- package/tui-profile/registry/contracts/backend-v1alpha1.json +13 -0
- package/tui-profile/registry/registry-0.15.json +12 -0
- package/lib/types/backends/claude/install.d.ts +0 -15
- package/lib/types/backends/claude/install.d.ts.map +0 -1
- package/lib/types/backends/claude/install.js +0 -91
- package/lib/types/channel/elicitation.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts +0 -42
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/session-lineage.js +0 -51
- package/lib/types/utils/jsonl.d.ts.map +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { isAbsolute, join, normalize } from 'node:path';
|
|
5
|
-
import { DATA_DIR } from '../../utils/paths.js';
|
|
6
|
-
const directory = join(DATA_DIR, 'session-lists');
|
|
7
|
-
const generations = new Map();
|
|
1
|
+
/** DSH provider scope over the shared, first-paint-only listing snapshot. */
|
|
2
|
+
import { isAbsolute, normalize } from 'node:path';
|
|
3
|
+
import { beginListingSnapshot as begin, readListingSnapshot as read } from '../../sessions/listSnapshot.js';
|
|
8
4
|
/** Only the known JSONL provider exposes a public, durable source configuration. */
|
|
9
5
|
function sourceKey(source) {
|
|
10
6
|
if (source.name !== 'session-persistence-jsonl')
|
|
@@ -13,78 +9,19 @@ function sourceKey(source) {
|
|
|
13
9
|
if (config === null || typeof config !== 'object')
|
|
14
10
|
return undefined;
|
|
15
11
|
const { root, compression } = config;
|
|
16
|
-
//
|
|
17
|
-
//
|
|
12
|
+
// Relative roots can change meaning after a workspace switch. Keep exact
|
|
13
|
+
// path case, including on Windows, rather than sharing another store's rows.
|
|
18
14
|
if (typeof root !== 'string' || !isAbsolute(root))
|
|
19
15
|
return undefined;
|
|
20
16
|
if (compression !== undefined && compression !== 'zstd' && compression !== 'none')
|
|
21
17
|
return undefined;
|
|
22
|
-
|
|
23
|
-
// Even Windows can host case-sensitive directories; alias misses are safer
|
|
24
|
-
// than displaying a different store's rows.
|
|
25
|
-
return JSON.stringify([source.name, path, compression ?? 'zstd']);
|
|
18
|
+
return JSON.stringify([source.name, normalize(root), compression ?? 'zstd']);
|
|
26
19
|
}
|
|
27
|
-
const record = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
28
|
-
const finite = (value) => typeof value === 'number' && Number.isFinite(value);
|
|
29
|
-
const optionalText = (value) => value === undefined || typeof value === 'string';
|
|
30
|
-
function isSummary(value) {
|
|
31
|
-
if (!record(value) || typeof value.id !== 'string' || !value.id || typeof value.cwd !== 'string' ||
|
|
32
|
-
!finite(value.createdAt) || !finite(value.updatedAt) || typeof value.hasPrompt !== 'boolean' ||
|
|
33
|
-
!finite(value.childCount) || value.childCount < 0 ||
|
|
34
|
-
(value.bytes !== undefined && (!finite(value.bytes) || value.bytes < 0)) ||
|
|
35
|
-
!['agentPreset', 'model', 'label', 'branch'].every(key => optionalText(value[key])))
|
|
36
|
-
return false;
|
|
37
|
-
const { title, kind } = value;
|
|
38
|
-
if (!record(title) || typeof title.text !== 'string' || typeof title.source !== 'string' ||
|
|
39
|
-
!['renamed', 'auto', 'prompt', 'fallback'].includes(title.source) || !record(kind))
|
|
40
|
-
return false;
|
|
41
|
-
return kind.kind === 'root' ||
|
|
42
|
-
(kind.kind === 'fork' && typeof kind.parent === 'string') ||
|
|
43
|
-
(kind.kind === 'subagent' && optionalText(kind.parent) && finite(kind.depth) && kind.depth >= 0);
|
|
44
|
-
}
|
|
45
|
-
function fileOf(key) {
|
|
46
|
-
return join(directory, createHash('sha256').update(key).digest('hex') + '.json');
|
|
47
|
-
}
|
|
48
|
-
function read(key) {
|
|
49
|
-
try {
|
|
50
|
-
const value = JSON.parse(readFileSync(fileOf(key), 'utf8'));
|
|
51
|
-
if (!record(value) || value.version !== 1 || value.source !== key || !Array.isArray(value.rows) || !value.rows.every(isSummary))
|
|
52
|
-
return undefined;
|
|
53
|
-
if (new Set(value.rows.map(row => row.id)).size !== value.rows.length)
|
|
54
|
-
return undefined;
|
|
55
|
-
return value.rows;
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/** Undefined is unknown; an empty snapshot is a successful empty listing. */
|
|
62
20
|
export function readListingSnapshot(source) {
|
|
63
21
|
const key = sourceKey(source);
|
|
64
22
|
return key === undefined ? undefined : read(key);
|
|
65
23
|
}
|
|
66
|
-
/** Capture ordering before async work, including across distinct Context proxies. */
|
|
67
24
|
export function beginListingSnapshot(source) {
|
|
68
25
|
const key = sourceKey(source);
|
|
69
|
-
|
|
70
|
-
return () => { };
|
|
71
|
-
const generation = (generations.get(key) ?? 0) + 1;
|
|
72
|
-
generations.set(key, generation);
|
|
73
|
-
return rows => {
|
|
74
|
-
if (generations.get(key) !== generation)
|
|
75
|
-
return;
|
|
76
|
-
const file = fileOf(key);
|
|
77
|
-
const temporary = file + '.' + process.pid + '.tmp';
|
|
78
|
-
try {
|
|
79
|
-
mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
80
|
-
writeFileSync(temporary, JSON.stringify({ version: 1, source: key, rows }), { mode: 0o600 });
|
|
81
|
-
renameSync(temporary, file);
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
try {
|
|
85
|
-
rmSync(temporary, { force: true });
|
|
86
|
-
}
|
|
87
|
-
catch { /* A cache never blocks listing. */ }
|
|
88
|
-
}
|
|
89
|
-
};
|
|
26
|
+
return key === undefined ? () => { } : begin(key);
|
|
90
27
|
}
|
|
@@ -183,7 +183,7 @@ export class SettingsForm {
|
|
|
183
183
|
if (field.secret !== undefined) {
|
|
184
184
|
// Blank drafts write nothing; typed drafts replace the credential.
|
|
185
185
|
if (staged.text !== '')
|
|
186
|
-
secrets.push({ ref: field.secret.ref, text: staged.text });
|
|
186
|
+
secrets.push({ ref: field.secret.ref, text: staged.text, field });
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
189
|
const write = staged.clear ? { kind: 'clear' } : defaultParse(field, staged.text);
|
|
@@ -210,7 +210,7 @@ export class SettingsForm {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
for (const secret of secrets) {
|
|
213
|
-
await this.host.writeCredential(secret.ref, secret.text);
|
|
213
|
+
await this.host.writeCredential(secret.ref, secret.text, secret.field.secret?.authorization);
|
|
214
214
|
}
|
|
215
215
|
for (const [key, edit] of snapshot) {
|
|
216
216
|
if (this.edits.get(key) === edit)
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
+
import type { Agent } from '@deepseek-ai/dsh-agent';
|
|
9
10
|
import { type ContentBlock, type Message, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
10
11
|
import type { SessionEvent } from '@deepseek-ai/dsh-session';
|
|
11
12
|
type ToolCall = Extract<ContentBlock, {
|
|
@@ -71,5 +72,25 @@ export declare function runSideQuestion(params: {
|
|
|
71
72
|
/** Cancellation: aborting yields `{answer: null}` with no error text. */
|
|
72
73
|
signal?: AbortSignal;
|
|
73
74
|
}): Promise<SideQuestionOutcome>;
|
|
75
|
+
/** The `agents` service as {@link runAsSideBranch} needs it. */
|
|
76
|
+
export interface InitiatorScope {
|
|
77
|
+
withInitiator<T>(agent: Agent, operation: () => T): T;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Run a side question with a seeded fork of `agent` as its initiator. The
|
|
81
|
+
* call replays the session's history without entering it, which DSH models as
|
|
82
|
+
* a fork (`parentSession` + `isSeeded` on the child header). Initiator-keyed
|
|
83
|
+
* consumers then see a branch of the conversation rather than an agentless
|
|
84
|
+
* call: a compressing proxy (billion-context) adopts the parent's state for
|
|
85
|
+
* the branch instead of sending the raw replay, which overflows long sessions.
|
|
86
|
+
* Without the service, or once its scope is closing, the call runs as before.
|
|
87
|
+
*
|
|
88
|
+
* The view is no stored Session: `session.id` carries the branch identity
|
|
89
|
+
* while `header.id` deliberately keeps the parent's (a stored fork's header id
|
|
90
|
+
* mirrors its own session). The verified consumer path reads `session.id`;
|
|
91
|
+
* aligning `header.id` changes what a parent-resolving consumer sees and needs
|
|
92
|
+
* the same real-host recheck. scripts/verify-preset-patch.ts pins this shape.
|
|
93
|
+
*/
|
|
94
|
+
export declare function runAsSideBranch<T>(agents: Partial<InitiatorScope> | undefined, agent: Agent, operation: () => Promise<T>): Promise<T>;
|
|
74
95
|
export {};
|
|
75
96
|
//# sourceMappingURL=sideQuestion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sideQuestion.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sideQuestion.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"sideQuestion.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sideQuestion.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAkB,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAK5D,KAAK,QAAQ,GAAG,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAAA;AAK5D;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,SAAS,QAAQ,EAAO,GAAG,MAAM,CAG5F;AAeD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG;IACpG,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;IAC5B,OAAO,EAAE,QAAQ,EAAE,CAAA;CACpB,CA2BA;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAUhF;AAED,0EAA0E;AAC1E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,yEAAyE;IACzE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,aAAa,CAAC,WAAW,CAAC,CAAA;IACvD,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAA;IACf,iDAAiD;IACjD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAuB/B;AAED,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;CACtD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOrI"}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import { BlockAssembler } from '@deepseek-ai/dsh-llm';
|
|
10
|
+
import { randomUUID } from 'node:crypto';
|
|
10
11
|
import { sideQuestionPrompt } from '../channel/side-prompts.js';
|
|
11
12
|
import { answeredToolCallIds } from './compat/messages.js';
|
|
12
13
|
/** Per-call argument budget in the pending-calls note; a file write can carry megabytes. */
|
|
@@ -143,3 +144,55 @@ export async function runSideQuestion(params) {
|
|
|
143
144
|
return { answer: null, error: 'No response received' };
|
|
144
145
|
return { answer };
|
|
145
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Run a side question with a seeded fork of `agent` as its initiator. The
|
|
149
|
+
* call replays the session's history without entering it, which DSH models as
|
|
150
|
+
* a fork (`parentSession` + `isSeeded` on the child header). Initiator-keyed
|
|
151
|
+
* consumers then see a branch of the conversation rather than an agentless
|
|
152
|
+
* call: a compressing proxy (billion-context) adopts the parent's state for
|
|
153
|
+
* the branch instead of sending the raw replay, which overflows long sessions.
|
|
154
|
+
* Without the service, or once its scope is closing, the call runs as before.
|
|
155
|
+
*
|
|
156
|
+
* The view is no stored Session: `session.id` carries the branch identity
|
|
157
|
+
* while `header.id` deliberately keeps the parent's (a stored fork's header id
|
|
158
|
+
* mirrors its own session). The verified consumer path reads `session.id`;
|
|
159
|
+
* aligning `header.id` changes what a parent-resolving consumer sees and needs
|
|
160
|
+
* the same real-host recheck. scripts/verify-preset-patch.ts pins this shape.
|
|
161
|
+
*/
|
|
162
|
+
export function runAsSideBranch(agents, agent, operation) {
|
|
163
|
+
if (typeof agents?.withInitiator !== 'function')
|
|
164
|
+
return operation();
|
|
165
|
+
try {
|
|
166
|
+
return agents.withInitiator(sideBranchOf(agent), operation);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return operation();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function sideBranchOf(agent) {
|
|
173
|
+
const session = agent.session;
|
|
174
|
+
const surface = session.surface;
|
|
175
|
+
const last = surface?.nodes?.at(-1);
|
|
176
|
+
const generation = surface?.replaceGeneration;
|
|
177
|
+
const id = last === undefined || generation === undefined
|
|
178
|
+
? `${session.id}-btw-${randomUUID()}`
|
|
179
|
+
: `${session.id}-btw-${generation}-${last}`;
|
|
180
|
+
// header.id stays the parent's on purpose; see runAsSideBranch.
|
|
181
|
+
const header = { ...session.header, parentSession: session.id, isSeeded: true };
|
|
182
|
+
return readThrough(agent, { session: readThrough(session, { id, header }) });
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* A view of `target` with some properties replaced. Everything else, methods
|
|
186
|
+
* included, still acts on `target` (a mutating call reaches the real
|
|
187
|
+
* session); the view lives only for one side call's stream.
|
|
188
|
+
*/
|
|
189
|
+
function readThrough(target, overrides) {
|
|
190
|
+
return new Proxy(target, {
|
|
191
|
+
get(object, key) {
|
|
192
|
+
if (Object.hasOwn(overrides, key))
|
|
193
|
+
return overrides[key];
|
|
194
|
+
const value = Reflect.get(object, key, object);
|
|
195
|
+
return typeof value === 'function' ? value.bind(object) : value;
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
* `--` ends flag parsing; all following tokens are literal prompt text.
|
|
6
6
|
*/
|
|
7
7
|
export declare function initialPromptFromCmdlineArgs(args: readonly string[] | undefined): string;
|
|
8
|
+
/** `ctx.cmdlineArgs`: the app argv the host snapshotted, if it provides one. */
|
|
9
|
+
export declare function cmdlineArgsOf(ctx: object): readonly string[] | undefined;
|
|
8
10
|
//# sourceMappingURL=startup-args.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startup-args.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/startup-args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAsBxF"}
|
|
1
|
+
{"version":3,"file":"startup-args.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/startup-args.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,CAsBxF;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAGxE"}
|
|
@@ -32,3 +32,8 @@ export function initialPromptFromCmdlineArgs(args) {
|
|
|
32
32
|
}
|
|
33
33
|
return promptArgs.join(' ').trim();
|
|
34
34
|
}
|
|
35
|
+
/** `ctx.cmdlineArgs`: the app argv the host snapshotted, if it provides one. */
|
|
36
|
+
export function cmdlineArgsOf(ctx) {
|
|
37
|
+
const cmdline = ctx.cmdlineArgs;
|
|
38
|
+
return cmdline?.get?.() ?? cmdline?.args;
|
|
39
|
+
}
|
|
@@ -18,9 +18,36 @@ export declare class SubagentActivityStore {
|
|
|
18
18
|
private costUnpriced;
|
|
19
19
|
/** 每个 agent 已消费的最大 durable 事件 seq(同一事件重投不重复计费)。 */
|
|
20
20
|
private costSeq;
|
|
21
|
+
/** 描述的来源。spawn 首帧的描述来自一条**无身份**的 FIFO 队列(并发派发
|
|
22
|
+
* 时可能是别的 child 的),只有 childId-keyed 的权威 label
|
|
23
|
+
* (`subagent/catalog`、子会话 `subagent/descriptor`)能定案:`bound`
|
|
24
|
+
* 之后不再改写,`queue`/`placeholder` 允许被 label 覆盖。 */
|
|
25
|
+
private descriptionSource;
|
|
26
|
+
/** keyed label 可能比它那一行先到:子会话的 `subagent/descriptor` 在会话
|
|
27
|
+
* 链接建立之前就已投递。丢掉它,这一行就只剩队列猜出来的名字,而外部
|
|
28
|
+
* 子代理上游不写 catalog ⇒ 没有第二条 keyed 事实来救,永久错名。先寄存在
|
|
29
|
+
* 这里,建行时直接当描述用:keyed 事实不因到达先后而失效。有界,理由同
|
|
30
|
+
* 队列(没人建行时不能无界增长)。 */
|
|
31
|
+
private earlyLabels;
|
|
21
32
|
private commitLine;
|
|
22
33
|
private pushLine;
|
|
23
|
-
onSpawned(agentId: string, provider?: string, model?: string, info?: Partial<SubagentState>
|
|
34
|
+
onSpawned(agentId: string, provider?: string, model?: string, info?: Partial<SubagentState> & {
|
|
35
|
+
descriptionFromQueue?: boolean;
|
|
36
|
+
}): void;
|
|
37
|
+
/** Park a keyed label whose row does not exist yet — a child session's
|
|
38
|
+
* `subagent/descriptor` can be published before the host's spawn edge, and
|
|
39
|
+
* dropping it there would leave the row with the identity-less queue's
|
|
40
|
+
* guess and no second keyed fact to correct it (an external child gets no
|
|
41
|
+
* catalog). `onSpawned` adopts it when the row is created. Bounded: when
|
|
42
|
+
* full, the oldest parked label goes first — the least likely to still be
|
|
43
|
+
* waiting for its row. */
|
|
44
|
+
holdKeyedLabel(agentId: string, label: unknown): void;
|
|
45
|
+
/** Bind the authoritative description of one child (a `subagent/catalog`
|
|
46
|
+
* label or a child session's own `subagent/descriptor`). The identity-less
|
|
47
|
+
* spawn queue may have handed this row a concurrent delegation's term, so
|
|
48
|
+
* the keyed fact wins, once, until it is the source of truth for this row.
|
|
49
|
+
* Returns whether the displayed description changed. */
|
|
50
|
+
private describeFromLabel;
|
|
24
51
|
/** Durable discovery (`subagent/catalog`, workflow member events, registry
|
|
25
52
|
* back-fill): register a child WITHOUT disturbing an already-tracked run.
|
|
26
53
|
* `live` marks a child the agents registry currently holds, which keeps the
|
|
@@ -37,6 +64,11 @@ export declare class SubagentActivityStore {
|
|
|
37
64
|
linkSession(agentId: string, session: unknown): void;
|
|
38
65
|
getSubagentIdBySession(session: unknown): string | undefined;
|
|
39
66
|
has(agentId: string): boolean;
|
|
67
|
+
/** The run key of one tracked child: its current epoch's key, or `undefined`
|
|
68
|
+
* when the row is tracked but has no run fact yet (a durable discovery row
|
|
69
|
+
* carries none). That is the same value an untracked child yields, so a
|
|
70
|
+
* caller that must tell the two apart asks `has()` as well. */
|
|
71
|
+
runIdOf(agentId: string): string | undefined;
|
|
40
72
|
appendOutput(agentId: string, text: string, kind?: SubagentOutputKind): void;
|
|
41
73
|
/** Mark the streaming tail line complete (run settlement). */
|
|
42
74
|
flushOutput(agentId: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagents.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/subagents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"subagents.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/subagents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAIlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAsC,kBAAkB,EAAE,gBAAgB,EAAsB,MAAM,kCAAkC,CAAA;AACxM,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AAQtL;gCACgC;AAChC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,QAAQ,EAAE,gBAAgB,CAAA;CAC3B;AAaD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,OAAO,CAA2C;IAC1D,+DAA+D;IAC/D,OAAO,CAAC,WAAW,CAAuC;IAC1D,iDAAiD;IACjD,OAAO,CAAC,YAAY,CAAqB;IACzC,mDAAmD;IACnD,OAAO,CAAC,OAAO,CAA4B;IAC3C;;;qDAGiD;IACjD,OAAO,CAAC,iBAAiB,CAAuD;IAChF;;;;2BAIuB;IACvB,OAAO,CAAC,WAAW,CAA4B;IAE/C,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,QAAQ;IAOhB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAa,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,aAAa,CAAC,GAAG;QAAE,oBAAoB,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,IAAI;IAkF/I;;;;;;+BAM2B;IAC3B,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IASrD;;;;6DAIyD;IACzD,OAAO,CAAC,iBAAiB;IAazB;;;;uDAImD;IACnD,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,CAAA;KAAO,GAAG,IAAI;IAmC7L,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAMpD,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAE5D,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAE7B;;;oEAGgE;IAChE,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAE5C,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,kBAA2B,GAAG,IAAI;IA0BpF,8DAA8D;IAC9D,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IASlC;mFAC+E;IAC/E,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,IAAI;IA+BjE,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;IAyBvB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IA+DrD,6EAA6E;IAC7E,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI;IAS7D,2EAA2E;IAC3E,OAAO,CAAC,SAAS;IAUjB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IASvF,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAU3J,mDAAmD;IACnD,OAAO,CAAC,WAAW;IAqBnB;;;;;;sCAMkC;IAClC,OAAO,CAAC,cAAc;IAyBtB,qDAAqD;IACrD,YAAY,IAAI,oBAAoB;IAWpC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,UAAU,SAAc,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAChG,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAChE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAc,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAE5F,OAAO,CAAC,MAAM;IAuBd;;;sDAGkD;IAClD,KAAK,IAAI,IAAI;IAYb,QAAQ,IAAI,aAAa,EAAE;IAC3B,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAC/C,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAC3C,OAAO,CAAC,MAAM;CACf"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { addUsageToCostBuckets, cloneCostBuckets, emptyCostBuckets, isDeepSeekOfficialProvider, isPeakHour, priceForModel } from '../deepseekPricing.js';
|
|
2
2
|
import { toolResultPayload } from './compat/messages.js';
|
|
3
|
+
import { toolFailureText } from './channel/transcript.js';
|
|
3
4
|
const MAX_OUTPUT_EVENTS = 160;
|
|
4
5
|
const MAX_OUTPUT_LINES = 160;
|
|
6
|
+
/** Keyed labels parked before their row exists (see `earlyLabels`). */
|
|
7
|
+
const MAX_EARLY_LABELS = 64;
|
|
5
8
|
export class SubagentActivityStore {
|
|
6
9
|
states = new Map();
|
|
7
10
|
sessionToAgent = new Map();
|
|
@@ -13,6 +16,17 @@ export class SubagentActivityStore {
|
|
|
13
16
|
costUnpriced = emptyCostBuckets();
|
|
14
17
|
/** 每个 agent 已消费的最大 durable 事件 seq(同一事件重投不重复计费)。 */
|
|
15
18
|
costSeq = new Map();
|
|
19
|
+
/** 描述的来源。spawn 首帧的描述来自一条**无身份**的 FIFO 队列(并发派发
|
|
20
|
+
* 时可能是别的 child 的),只有 childId-keyed 的权威 label
|
|
21
|
+
* (`subagent/catalog`、子会话 `subagent/descriptor`)能定案:`bound`
|
|
22
|
+
* 之后不再改写,`queue`/`placeholder` 允许被 label 覆盖。 */
|
|
23
|
+
descriptionSource = new Map();
|
|
24
|
+
/** keyed label 可能比它那一行先到:子会话的 `subagent/descriptor` 在会话
|
|
25
|
+
* 链接建立之前就已投递。丢掉它,这一行就只剩队列猜出来的名字,而外部
|
|
26
|
+
* 子代理上游不写 catalog ⇒ 没有第二条 keyed 事实来救,永久错名。先寄存在
|
|
27
|
+
* 这里,建行时直接当描述用:keyed 事实不因到达先后而失效。有界,理由同
|
|
28
|
+
* 队列(没人建行时不能无界增长)。 */
|
|
29
|
+
earlyLabels = new Map();
|
|
16
30
|
commitLine(agentId, kind, text) {
|
|
17
31
|
const state = this.states.get(agentId);
|
|
18
32
|
if (!state)
|
|
@@ -29,11 +43,26 @@ export class SubagentActivityStore {
|
|
|
29
43
|
}
|
|
30
44
|
onSpawned(agentId, provider = 'subagent', model, info = {}) {
|
|
31
45
|
const existing = this.states.get(agentId);
|
|
46
|
+
// A term off the identity-less spawn queue may belong to a concurrent
|
|
47
|
+
// delegation, so it never overrides a description a keyed fact already
|
|
48
|
+
// settled. The caller still consumes (shifts) the term either way — the
|
|
49
|
+
// FIFO has no identity to hand back, and leaving it at the head would only
|
|
50
|
+
// misalign the next spawn.
|
|
51
|
+
const fromQueue = info.descriptionFromQueue === true;
|
|
52
|
+
const description = fromQueue && this.descriptionSource.get(agentId) === 'bound' ? undefined : info.description;
|
|
53
|
+
// A keyed label that outran its row (see `earlyLabels`) carries the same
|
|
54
|
+
// authority as a live one: the row is born settled, and the queue term the
|
|
55
|
+
// same spawn consumed is dropped instead of shown.
|
|
56
|
+
const keyed = this.earlyLabels.get(agentId);
|
|
57
|
+
if (keyed !== undefined)
|
|
58
|
+
this.earlyLabels.delete(agentId);
|
|
59
|
+
const settled = keyed ?? description;
|
|
60
|
+
const source = keyed !== undefined ? 'bound' : description === undefined ? 'placeholder' : fromQueue ? 'queue' : 'bound';
|
|
32
61
|
if (!existing) {
|
|
33
62
|
this.states.set(agentId, {
|
|
34
63
|
agentId,
|
|
35
64
|
runId: info.runId ?? agentId,
|
|
36
|
-
description:
|
|
65
|
+
description: settled ?? `${provider} task`,
|
|
37
66
|
provider,
|
|
38
67
|
model: model ?? info.model ?? provider,
|
|
39
68
|
effort: info.effort,
|
|
@@ -47,6 +76,7 @@ export class SubagentActivityStore {
|
|
|
47
76
|
toolCalls: [],
|
|
48
77
|
...(info.parentAgentId === undefined ? {} : { parentAgentId: info.parentAgentId }),
|
|
49
78
|
});
|
|
79
|
+
this.descriptionSource.set(agentId, source);
|
|
50
80
|
this.notify();
|
|
51
81
|
return;
|
|
52
82
|
}
|
|
@@ -54,7 +84,11 @@ export class SubagentActivityStore {
|
|
|
54
84
|
// new epoch announces a NEW runId (the host's `subagent/start` pairing
|
|
55
85
|
// key). A runId change therefore opens a fresh run: the previous epoch's
|
|
56
86
|
// terminal state, timing, output and tools must not leak into it. The
|
|
57
|
-
//
|
|
87
|
+
// description is the one thing a new epoch does not own *once a keyed
|
|
88
|
+
// label settled it*: that label outranks the queue and survives every
|
|
89
|
+
// epoch (see the guard above), while a row still living on a queue guess
|
|
90
|
+
// takes the new epoch's term like any other fresh run. The same runId
|
|
91
|
+
// re-announced only refreshes display metadata.
|
|
58
92
|
if (info.runId !== undefined && info.runId !== existing.runId) {
|
|
59
93
|
this.streams.delete(agentId);
|
|
60
94
|
existing.runId = info.runId;
|
|
@@ -69,7 +103,9 @@ export class SubagentActivityStore {
|
|
|
69
103
|
existing.outputEvents = [];
|
|
70
104
|
existing.toolCalls = [];
|
|
71
105
|
existing.tokens = undefined;
|
|
72
|
-
existing.description =
|
|
106
|
+
existing.description = settled ?? existing.description;
|
|
107
|
+
if (settled !== undefined)
|
|
108
|
+
this.descriptionSource.set(agentId, source);
|
|
73
109
|
existing.local = info.local ?? existing.local;
|
|
74
110
|
existing.provider = provider;
|
|
75
111
|
existing.model = model ?? existing.model;
|
|
@@ -81,8 +117,10 @@ export class SubagentActivityStore {
|
|
|
81
117
|
else {
|
|
82
118
|
existing.provider = provider;
|
|
83
119
|
existing.model = model ?? existing.model;
|
|
84
|
-
if (
|
|
85
|
-
existing.description =
|
|
120
|
+
if (settled !== undefined) {
|
|
121
|
+
existing.description = settled;
|
|
122
|
+
this.descriptionSource.set(agentId, source);
|
|
123
|
+
}
|
|
86
124
|
if (info.local !== undefined)
|
|
87
125
|
existing.local = info.local;
|
|
88
126
|
if (info.parentAgentId !== undefined && existing.parentAgentId === undefined)
|
|
@@ -90,6 +128,43 @@ export class SubagentActivityStore {
|
|
|
90
128
|
}
|
|
91
129
|
this.notify();
|
|
92
130
|
}
|
|
131
|
+
/** Park a keyed label whose row does not exist yet — a child session's
|
|
132
|
+
* `subagent/descriptor` can be published before the host's spawn edge, and
|
|
133
|
+
* dropping it there would leave the row with the identity-less queue's
|
|
134
|
+
* guess and no second keyed fact to correct it (an external child gets no
|
|
135
|
+
* catalog). `onSpawned` adopts it when the row is created. Bounded: when
|
|
136
|
+
* full, the oldest parked label goes first — the least likely to still be
|
|
137
|
+
* waiting for its row. */
|
|
138
|
+
holdKeyedLabel(agentId, label) {
|
|
139
|
+
if (typeof label !== 'string' || label === '')
|
|
140
|
+
return;
|
|
141
|
+
if (!this.earlyLabels.has(agentId) && this.earlyLabels.size >= MAX_EARLY_LABELS) {
|
|
142
|
+
const oldest = this.earlyLabels.keys().next().value;
|
|
143
|
+
if (oldest !== undefined)
|
|
144
|
+
this.earlyLabels.delete(oldest);
|
|
145
|
+
}
|
|
146
|
+
this.earlyLabels.set(agentId, label);
|
|
147
|
+
}
|
|
148
|
+
/** Bind the authoritative description of one child (a `subagent/catalog`
|
|
149
|
+
* label or a child session's own `subagent/descriptor`). The identity-less
|
|
150
|
+
* spawn queue may have handed this row a concurrent delegation's term, so
|
|
151
|
+
* the keyed fact wins, once, until it is the source of truth for this row.
|
|
152
|
+
* Returns whether the displayed description changed. */
|
|
153
|
+
describeFromLabel(agentId, label) {
|
|
154
|
+
if (typeof label !== 'string' || label === '')
|
|
155
|
+
return false;
|
|
156
|
+
// A row-less call has no display to correct: the projection parks such a
|
|
157
|
+
// label before it gets here (`holdKeyedLabel`) and the row adopts it when
|
|
158
|
+
// it is created.
|
|
159
|
+
const state = this.states.get(agentId);
|
|
160
|
+
if (state === undefined || this.descriptionSource.get(agentId) === 'bound')
|
|
161
|
+
return false;
|
|
162
|
+
this.descriptionSource.set(agentId, 'bound');
|
|
163
|
+
if (state.description === label)
|
|
164
|
+
return false;
|
|
165
|
+
state.description = label;
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
93
168
|
/** Durable discovery (`subagent/catalog`, workflow member events, registry
|
|
94
169
|
* back-fill): register a child WITHOUT disturbing an already-tracked run.
|
|
95
170
|
* `live` marks a child the agents registry currently holds, which keeps the
|
|
@@ -99,16 +174,25 @@ export class SubagentActivityStore {
|
|
|
99
174
|
const existing = this.states.get(agentId);
|
|
100
175
|
if (existing !== undefined) {
|
|
101
176
|
// A bus edge usually created the row first; the durable catalog fact
|
|
102
|
-
// still carries the
|
|
177
|
+
// still carries the two things the edge never knows — the mode, and the
|
|
178
|
+
// childId-keyed label that a queue-derived description only guessed at.
|
|
179
|
+
let changed = false;
|
|
103
180
|
if (info.mode !== undefined && existing.mode === undefined) {
|
|
104
181
|
existing.mode = info.mode;
|
|
105
|
-
|
|
182
|
+
changed = true;
|
|
106
183
|
}
|
|
184
|
+
if (this.describeFromLabel(agentId, info.label))
|
|
185
|
+
changed = true;
|
|
186
|
+
if (changed)
|
|
187
|
+
this.notify();
|
|
107
188
|
return;
|
|
108
189
|
}
|
|
190
|
+
// An empty label is not a fact: the row keeps a visible placeholder that a
|
|
191
|
+
// later real label can still replace.
|
|
192
|
+
const label = typeof info.label === 'string' && info.label !== '' ? info.label : undefined;
|
|
109
193
|
this.states.set(agentId, {
|
|
110
194
|
agentId,
|
|
111
|
-
description:
|
|
195
|
+
description: label ?? `${info.provider ?? 'subagent'} task`,
|
|
112
196
|
provider: info.provider ?? 'subagent',
|
|
113
197
|
model: info.model ?? info.provider,
|
|
114
198
|
status: info.live ? 'running' : 'unknown',
|
|
@@ -119,6 +203,7 @@ export class SubagentActivityStore {
|
|
|
119
203
|
outputEvents: [],
|
|
120
204
|
toolCalls: [],
|
|
121
205
|
});
|
|
206
|
+
this.descriptionSource.set(agentId, label === undefined ? 'placeholder' : 'bound');
|
|
122
207
|
this.notify();
|
|
123
208
|
}
|
|
124
209
|
linkSession(agentId, session) {
|
|
@@ -130,6 +215,11 @@ export class SubagentActivityStore {
|
|
|
130
215
|
}
|
|
131
216
|
getSubagentIdBySession(session) { return this.sessionToAgent.get(session); }
|
|
132
217
|
has(agentId) { return this.states.has(agentId); }
|
|
218
|
+
/** The run key of one tracked child: its current epoch's key, or `undefined`
|
|
219
|
+
* when the row is tracked but has no run fact yet (a durable discovery row
|
|
220
|
+
* carries none). That is the same value an untracked child yields, so a
|
|
221
|
+
* caller that must tell the two apart asks `has()` as well. */
|
|
222
|
+
runIdOf(agentId) { return this.states.get(agentId)?.runId; }
|
|
133
223
|
appendOutput(agentId, text, kind = 'text') {
|
|
134
224
|
const state = this.states.get(agentId);
|
|
135
225
|
if (!state || !text)
|
|
@@ -293,7 +383,7 @@ export class SubagentActivityStore {
|
|
|
293
383
|
tool.status = data.error !== undefined || payload.isError ? 'failed' : 'completed';
|
|
294
384
|
tool.endedAt = Date.now();
|
|
295
385
|
if (data.error !== undefined)
|
|
296
|
-
tool.error =
|
|
386
|
+
tool.error = toolFailureText(data.error, this.previewOf(payload.content) ?? '');
|
|
297
387
|
else if (payload.isError)
|
|
298
388
|
tool.error = this.previewOf(payload.content);
|
|
299
389
|
else {
|
|
@@ -303,6 +393,14 @@ export class SubagentActivityStore {
|
|
|
303
393
|
}
|
|
304
394
|
break;
|
|
305
395
|
}
|
|
396
|
+
case 'subagent/descriptor': {
|
|
397
|
+
// The child session's own durable self-description: the same keyed
|
|
398
|
+
// label the parent catalog carries, usable once the session link
|
|
399
|
+
// exists.
|
|
400
|
+
if (this.describeFromLabel(agentId, data.label))
|
|
401
|
+
this.notify();
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
306
404
|
default:
|
|
307
405
|
break;
|
|
308
406
|
}
|
|
@@ -313,6 +411,9 @@ export class SubagentActivityStore {
|
|
|
313
411
|
if (!state)
|
|
314
412
|
return;
|
|
315
413
|
Object.assign(state, partial);
|
|
414
|
+
// A description handed in directly is authoritative, never a queue guess.
|
|
415
|
+
if (partial.description !== undefined)
|
|
416
|
+
this.descriptionSource.set(agentId, 'bound');
|
|
316
417
|
this.notify();
|
|
317
418
|
}
|
|
318
419
|
/** One-line preview of a tool-result content block (text or item list). */
|
|
@@ -447,6 +548,8 @@ export class SubagentActivityStore {
|
|
|
447
548
|
this.costByModel.clear();
|
|
448
549
|
this.costUnpriced = emptyCostBuckets();
|
|
449
550
|
this.costSeq.clear();
|
|
551
|
+
this.descriptionSource.clear();
|
|
552
|
+
this.earlyLabels.clear();
|
|
450
553
|
this.notify();
|
|
451
554
|
}
|
|
452
555
|
snapshot() { return Array.from(this.states.values()).map(state => ({ ...state, output: [...state.output], outputEvents: [...state.outputEvents], toolCalls: state.toolCalls.map(tool => ({ ...tool })), tokens: state.tokens ? { ...state.tokens } : undefined })); }
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Teams on and off at run time (issue #1241, see
|
|
3
|
+
* docs/agent-teams-design.md「开关机制」).
|
|
4
|
+
*
|
|
5
|
+
* The switch is the upstream team bundle itself: `/team on|off` selects or
|
|
6
|
+
* drops its layer through the host plugin manager (the same write
|
|
7
|
+
* `/plugin enable|disable` makes), which persists to the profile and, with
|
|
8
|
+
* `hmr` mounted, applies at once. The team tool plugin installs into every
|
|
9
|
+
* live root Agent and uninstalls on disposal, so the sessions already running
|
|
10
|
+
* follow. What stays here is the one decision that cannot live in a preset —
|
|
11
|
+
* which legacy delegation tools a request carries — and the `/team` command.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
16
|
+
import type { PromptAssembly } from '@deepseek-ai/dsh-system-prompt';
|
|
17
|
+
import { type PluginManageFlow, type PluginManageSink, type TeamActiveMembers } from './plugin-manage.js';
|
|
18
|
+
/**
|
|
19
|
+
* The install spec the hints name. The team packages ship in lockstep with
|
|
20
|
+
* DSH and pin their DSH peers exactly, so only the bundle of the running
|
|
21
|
+
* kernel's own version installs into this host (npm `latest` and `next`
|
|
22
|
+
* both name other lines).
|
|
23
|
+
* @param kernel - The running DSH version; unknown falls back to the validated line.
|
|
24
|
+
* @returns `<bundle>@<version>`, or undefined on a known kernel that is not a
|
|
25
|
+
* team line: no bundle installs there, DSH has to move to a team line first.
|
|
26
|
+
*/
|
|
27
|
+
export declare function teamBundleSpec(kernel: string | undefined): string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Keep one delegation tool set per request. Presets keep their legacy rows,
|
|
30
|
+
* so whether the team replaces them is decided where the tools are known: an
|
|
31
|
+
* assembly carrying `spawn_teammate` drops `subagent` / `subagent_fork`. This
|
|
32
|
+
* follows a bundle toggled at run time into the sessions already joined (a
|
|
33
|
+
* preset revision cannot), and a team service that never activated leaves the
|
|
34
|
+
* legacy tools in place. The agent loop diffs these final tools against the
|
|
35
|
+
* logged request header, so the model is told about each swap.
|
|
36
|
+
* @param assembly - Fully assembled prompt inputs for one model request.
|
|
37
|
+
* @returns The original assembly, or a copy without the replaced tools.
|
|
38
|
+
*/
|
|
39
|
+
export declare function filterTeamReplacedTools(assembly: PromptAssembly): PromptAssembly;
|
|
40
|
+
/** What `/team` was asked. */
|
|
41
|
+
export type TeamCommand = {
|
|
42
|
+
readonly kind: 'on' | 'off' | 'status';
|
|
43
|
+
} | {
|
|
44
|
+
readonly kind: 'unknown';
|
|
45
|
+
readonly sub: string;
|
|
46
|
+
};
|
|
47
|
+
export declare function parseTeamArgs(args: string): TeamCommand;
|
|
48
|
+
/** What the screen supplies: the plugin flow's sink, plus the team's live state. */
|
|
49
|
+
export interface TeamCommandSink extends PluginManageSink {
|
|
50
|
+
/** Teammates of the bound session, how many are running or provisioning, and how many may be running. */
|
|
51
|
+
readonly members: () => {
|
|
52
|
+
readonly total: number;
|
|
53
|
+
} & TeamActiveMembers;
|
|
54
|
+
}
|
|
55
|
+
/** What one `/team` input turned into. */
|
|
56
|
+
export type TeamCommandOutcome = {
|
|
57
|
+
readonly kind: 'flow';
|
|
58
|
+
readonly flow: PluginManageFlow;
|
|
59
|
+
} | {
|
|
60
|
+
readonly kind: 'lines';
|
|
61
|
+
readonly lines: Promise<readonly string[]>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Wire `/team` to the running composition.
|
|
65
|
+
* @param ctx - Host context of the composition root.
|
|
66
|
+
* @param options - The profile a manual route names, and the running host's
|
|
67
|
+
* DSH version (this package's entry; otherwise the installed one is read).
|
|
68
|
+
* @returns the command entry the screen calls.
|
|
69
|
+
*/
|
|
70
|
+
export declare function createTeamCommandEntry(ctx: Context, options?: {
|
|
71
|
+
readonly profileName?: string | undefined;
|
|
72
|
+
readonly kernelVersion?: string | undefined;
|
|
73
|
+
}): (args: string, sink: TeamCommandSink) => TeamCommandOutcome;
|
|
74
|
+
//# sourceMappingURL=team-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-mode.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/team-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAIpE,OAAO,EAA0B,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAejI;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG7E;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,GAAG,cAAc,CAIhF;AAED,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;CAAE,GAC1C;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,oFAAoF;AACpF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,iBAAiB,CAAA;CACvE;AAED,0CAA0C;AAC1C,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAA;CAAE,CAAA;AAE1E;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAO,GACvG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,KAAK,kBAAkB,CAqE7D"}
|