@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
|
@@ -12,10 +12,13 @@ export function resetSessionProjection(state, rowIds, resetProjector, resetSubag
|
|
|
12
12
|
resetSubagents();
|
|
13
13
|
resetJobs();
|
|
14
14
|
state.todos = [];
|
|
15
|
-
|
|
15
|
+
// Orphaned rows belong to no backend (their session ended or dropped
|
|
16
|
+
// them): they wait in the dock for the user, whichever session is next.
|
|
17
|
+
state.pending = state.pending.filter(item => item.orphaned === true);
|
|
16
18
|
state.goal = undefined;
|
|
17
19
|
state.sessionTitle = '';
|
|
18
20
|
state.sessionColor = '';
|
|
21
|
+
state.workingDirectory = undefined;
|
|
19
22
|
state.tokens = {
|
|
20
23
|
input: 0,
|
|
21
24
|
output: 0,
|
|
@@ -42,6 +45,9 @@ export function resetSessionProjection(state, rowIds, resetProjector, resetSubag
|
|
|
42
45
|
state.lastUsage = undefined;
|
|
43
46
|
// The last turn's ledger belongs to the old session just as much.
|
|
44
47
|
state.turnUsage = undefined;
|
|
48
|
+
// So does the turn's terminal state: replaying the target session
|
|
49
|
+
// re-populates it from that session's own last turn.end.
|
|
50
|
+
state.turnOutcome = undefined;
|
|
45
51
|
// A backend-reported cost belongs to the session that reported it.
|
|
46
52
|
state.costReport = undefined;
|
|
47
53
|
state.attachedContexts = [];
|
|
@@ -19,7 +19,7 @@ export declare function createSessionResumeActions(ctx: Context, state: ResumeSt
|
|
|
19
19
|
model: string;
|
|
20
20
|
}, deps: {
|
|
21
21
|
owner: Pick<ChannelOwner, 'current'>;
|
|
22
|
-
binding: Pick<Binding, 'agent' | 'capture' | 'isCurrent' | 'prepare' | 'abandon' | 'adopt' | 'waitForDisposal'>;
|
|
22
|
+
binding: Pick<Binding, 'agent' | 'session' | 'capture' | 'isCurrent' | 'prepare' | 'abandon' | 'adopt' | 'waitForDisposal'>;
|
|
23
23
|
/**
|
|
24
24
|
* Adopt an agent this process already has live. `/resume` uses it so a
|
|
25
25
|
* target that is already running here is re-attached in place (parking the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-resume.d.ts","sourceRoot":"","sources":["../../../../src/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I,CAAC,CAAA;IACrC,iBAAiB,IAAI,IAAI,CAAA;IACzB;6CACyC;IACzC,iBAAiB,IAAI,IAAI,CAAA;IACzB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,mBAAmB,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,YAAY,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACtG,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,qBAAqB,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChH,OAAO,EAAE,qBAAqB,CAAA;CAC/B;4BA+MoC,MAAM,QAAQ,QAAQ,GAAG,YAAY,eAAe,OAAO,KAAG,OAAO,CAAC,YAAY,CAAC;0BAiDrF,MAAM,KAAG,OAAO,CAAC,YAAY,CAAC;;EAmKlE"}
|
|
@@ -95,6 +95,12 @@ export function createSessionResumeActions(ctx, state, options, deps) {
|
|
|
95
95
|
})));
|
|
96
96
|
}
|
|
97
97
|
catch (error) {
|
|
98
|
+
// 请核: the supported host's writer-lock error.name is SessionAlreadyOwnedError.
|
|
99
|
+
if (error !== null && typeof error === 'object' && 'name' in error && error.name === 'SessionAlreadyOwnedError') {
|
|
100
|
+
const message = t('resume-owned-elsewhere');
|
|
101
|
+
deps.notify(message, { color: 'warning', timeoutMs: 8000 });
|
|
102
|
+
return { ok: false, reason: 'failed', error: message, code: 'owned-elsewhere' };
|
|
103
|
+
}
|
|
98
104
|
const message = error instanceof Error ? error.message : String(error);
|
|
99
105
|
deps.notify(t('resume-failed', { err: message }), { color: 'error', timeoutMs: 8000 });
|
|
100
106
|
return { ok: false, reason: 'failed', error: message };
|
|
@@ -120,7 +126,12 @@ export function createSessionResumeActions(ctx, state, options, deps) {
|
|
|
120
126
|
// normal return is a commit, which is what the outer finally keys on.
|
|
121
127
|
const result = deps.binding.adopt(candidate, adoption, (committedBinding, disposePrevious) => {
|
|
122
128
|
const previousSessionId = String(committedBinding.agent.session.id);
|
|
123
|
-
|
|
129
|
+
// Reopening the screen's own ended session (#1651) is not a switch:
|
|
130
|
+
// the handle it replaces is the disposed one, and parking it would put
|
|
131
|
+
// a dead entry in the background ledger under the id this adoption now
|
|
132
|
+
// owns — the live-adoption lookup prefers that entry over the screen's
|
|
133
|
+
// current handle. Dispose it instead (idempotent).
|
|
134
|
+
const keepPrevious = keepCurrent && previousSessionId !== sessionId && committedBinding.handle !== undefined
|
|
124
135
|
&& (committedBinding.handle.agent.status === 'running' || agentViewHasTurns(snapshotLiveSessionEvents(committedBinding.handle.agent.session)));
|
|
125
136
|
if (keepCurrent && (committedBinding.handle === undefined || keepPrevious))
|
|
126
137
|
deps.parkSubagents(committedBinding.agent);
|
|
@@ -159,8 +170,8 @@ export function createSessionResumeActions(ctx, state, options, deps) {
|
|
|
159
170
|
* Reserve `sessionId` for a disk resume on THIS terminal.
|
|
160
171
|
*
|
|
161
172
|
* Returning a reservation means the caller owns the session in the ledger
|
|
162
|
-
* until it calls `
|
|
163
|
-
* `agents.resume
|
|
173
|
+
* until it calls `settle()` or `abandon()`. That covers the whole attempt,
|
|
174
|
+
* not just `agents.resume`: the awaits in between (veto, compaction, preset and
|
|
164
175
|
* route reads) are exactly the window a publisher beat — or a peer — could
|
|
165
176
|
* otherwise slip into.
|
|
166
177
|
* @param sessionId - Session about to be resumed from disk.
|
|
@@ -269,8 +280,10 @@ export function createSessionResumeActions(ctx, state, options, deps) {
|
|
|
269
280
|
// default disposition disposes the handle that IS running, so a second
|
|
270
281
|
// Enter on the `current` row stopped the live turn while reporting success.
|
|
271
282
|
// `attachToAgent()` has always short-circuited here; this is the same rule
|
|
272
|
-
// for the unified screen's `/resume` path.
|
|
273
|
-
|
|
283
|
+
// for the unified screen's `/resume` path. A disposed foreground (its
|
|
284
|
+
// agent unloaded under the screen, #1651) has nothing running: resuming
|
|
285
|
+
// its own id reopens the log like any other disk resume.
|
|
286
|
+
if (String(sessionId) === String(entrySession.id) && deps.binding.session.status !== 'disposed')
|
|
274
287
|
return { ok: true };
|
|
275
288
|
// Switching away starts disposal without blocking the synchronous commit.
|
|
276
289
|
// Do not adopt that closing Agent (or reopen its still-held JSONL writer).
|
|
@@ -288,40 +301,47 @@ export function createSessionResumeActions(ctx, state, options, deps) {
|
|
|
288
301
|
return reserved.result;
|
|
289
302
|
reservation = reserved.reservation;
|
|
290
303
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
try {
|
|
305
|
+
if (await deps.sessionSwitchVetoed('resume', sessionId)) {
|
|
306
|
+
return { ok: false, reason: 'cancelled' };
|
|
307
|
+
}
|
|
308
|
+
// Settle the transaction of the session being LEFT — the foreground
|
|
309
|
+
// binding, not the target. With one transaction per live agent this is
|
|
310
|
+
// exactly the two behaviors the switch needs: returning to a session that
|
|
311
|
+
// is compacting in the background leaves the fresh foreground (which owns
|
|
312
|
+
// nothing) untouched, so the compaction survives; navigating to a
|
|
313
|
+
// DIFFERENT session still settles the one left behind, so a compaction
|
|
314
|
+
// never keeps running invisibly after a plain switch.
|
|
315
|
+
await deps.settleCompaction();
|
|
316
|
+
if (!deps.binding.isCurrent(adoption) || deps.binding.agent.session !== entrySession) {
|
|
317
|
+
return { ok: false, reason: 'cancelled' };
|
|
318
|
+
}
|
|
319
|
+
// The target was read BEFORE those awaits. Re-read it in BOTH directions:
|
|
320
|
+
// the registry can have replaced or dropped that agent while we yielded
|
|
321
|
+
// (adopting the captured object would hand the screen a session nothing
|
|
322
|
+
// owns any more), and it can also have GROWN one — a peer action mounting
|
|
323
|
+
// this very session here means the disk path below would resume a log this
|
|
324
|
+
// process is already driving. `agent-view-projection.attach` has always made
|
|
325
|
+
// the first check.
|
|
326
|
+
const liveNow = agents.get?.(SessionId(sessionId));
|
|
327
|
+
if (liveNow !== live) {
|
|
328
|
+
return { ok: false, reason: 'cancelled' };
|
|
329
|
+
}
|
|
330
|
+
// A live target is adopted in place — the same path `/agentview` uses, so
|
|
331
|
+
// the session being left is parked rather than disposed of. Only a target
|
|
332
|
+
// with no live agent here goes back to the persistence backend.
|
|
333
|
+
if (live !== undefined)
|
|
334
|
+
return deps.adoptLive(live);
|
|
335
|
+
// The inner transaction now owns cleanup through open/adopt/commit.
|
|
336
|
+
// Until this handoff, every exit (including a throwing veto or recheck)
|
|
337
|
+
// gives the reservation back without waiting for a publisher beat.
|
|
338
|
+
const transferred = reservation;
|
|
339
|
+
reservation = undefined;
|
|
340
|
+
return resume(sessionId, 'agent-view', true, adoption, entrySession, transferred);
|
|
306
341
|
}
|
|
307
|
-
|
|
308
|
-
// the registry can have replaced or dropped that agent while we yielded
|
|
309
|
-
// (adopting the captured object would hand the screen a session nothing
|
|
310
|
-
// owns any more), and it can also have GROWN one — a peer action mounting
|
|
311
|
-
// this very session here means the disk path below would resume a log this
|
|
312
|
-
// process is already driving. `agent-view-projection.attach` has always made
|
|
313
|
-
// the first check.
|
|
314
|
-
const liveNow = agents.get?.(SessionId(sessionId));
|
|
315
|
-
if (liveNow !== live) {
|
|
342
|
+
finally {
|
|
316
343
|
reservation?.abandon();
|
|
317
|
-
return { ok: false, reason: 'cancelled' };
|
|
318
344
|
}
|
|
319
|
-
// A live target is adopted in place — the same path `/agentview` uses, so
|
|
320
|
-
// the session being left is parked rather than disposed of. Only a target
|
|
321
|
-
// with no live agent here goes back to the persistence backend.
|
|
322
|
-
if (live !== undefined)
|
|
323
|
-
return deps.adoptLive(live);
|
|
324
|
-
return resume(sessionId, 'agent-view', true, adoption, entrySession, reservation);
|
|
325
345
|
};
|
|
326
346
|
/**
|
|
327
347
|
* How a DSH `/new` opens its fresh session: the capability shadow gate,
|
|
@@ -9,7 +9,7 @@ type RewindState = Pick<ChannelState, 'working' | 'cwd' | 'provider' | 'model'>;
|
|
|
9
9
|
/** Rewind a selected transcript row into a prepared, binding-owned fork. */
|
|
10
10
|
export declare function createRewindToAction(ctx: Context, state: RewindState, deps: {
|
|
11
11
|
owner: Pick<ChannelOwner, 'current'>;
|
|
12
|
-
binding: Pick<Binding, 'agent' | 'capture' | 'prepare' | 'isCurrent' | 'abandon'>;
|
|
12
|
+
binding: Pick<Binding, 'agent' | 'session' | 'capture' | 'prepare' | 'isCurrent' | 'abandon'>;
|
|
13
13
|
settleCompaction(): Promise<void>;
|
|
14
14
|
notify: ChannelState['notify'];
|
|
15
15
|
adoptForkedAgent(candidate: AgentSession, capture: ReturnType<Binding['capture']>, seed: readonly SessionEvent[], agentPreset: string | undefined, childId: SessionId): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-rewind.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-rewind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAYvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEvD,KAAK,OAAO,GAAG,iBAAiB,CAAA;AAChC,KAAK,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAgB/E,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EACZ,KAAK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AAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,CAAA;IAC9K,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1F,IAEa,KAAK,OAAO,EAAE,OAAM,MAAM,GAAG,IAAW,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmHhF"}
|
|
@@ -33,8 +33,10 @@ export function createRewindToAction(ctx, state, deps) {
|
|
|
33
33
|
}
|
|
34
34
|
const wasWorking = state.working;
|
|
35
35
|
const cancelSeq = liveSessionOffset(deps.binding.agent.session);
|
|
36
|
+
// Through the session: the queue it drops is this client's own discard,
|
|
37
|
+
// not inputs the backend lost (those the channel would keep for the user).
|
|
36
38
|
if (wasWorking)
|
|
37
|
-
deps.binding.
|
|
39
|
+
void deps.binding.session.cancel('switch');
|
|
38
40
|
if (wasWorking && !await waitForTurnEnd(deps.binding.agent.session, cancelSeq, 30000)) {
|
|
39
41
|
deps.notify(t('rewind-settling'), { color: 'error' });
|
|
40
42
|
return null;
|
|
@@ -9,7 +9,7 @@ type TreeRewindState = Pick<ChannelState, 'working' | 'cwd' | 'provider' | 'mode
|
|
|
9
9
|
/** Rewind or fork a selected tree node; loading foreign family logs stays in this persistence adapter seam. */
|
|
10
10
|
export declare function createTreeRewindAction(ctx: Context, state: TreeRewindState, deps: {
|
|
11
11
|
owner: Pick<ChannelOwner, 'current'>;
|
|
12
|
-
binding: Pick<Binding, 'agent' | 'capture' | 'isCurrent' | 'prepare' | 'abandon'>;
|
|
12
|
+
binding: Pick<Binding, 'agent' | 'session' | 'capture' | 'isCurrent' | 'prepare' | 'abandon'>;
|
|
13
13
|
settleCompaction(): Promise<void>;
|
|
14
14
|
notify: ChannelState['notify'];
|
|
15
15
|
adoptForkedAgent(candidate: AgentSession, capture: ReturnType<Binding['capture']>, seed: readonly SessionEvent[], agentPreset: string | undefined, childId: SessionId): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-tree-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAY1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,OAAO,GAAG,iBAAiB,CAAA;AAChC,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAYnF,+GAA+G;AAC/G,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"session-tree-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree-actions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA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 +77,10 @@ export function createTreeRewindAction(ctx, state, deps) {
|
|
|
77
77
|
}
|
|
78
78
|
const wasWorking = state.working;
|
|
79
79
|
const cancelSeq = liveSessionOffset(deps.binding.agent.session);
|
|
80
|
+
// Through the session: the queue it drops is this client's own discard,
|
|
81
|
+
// not inputs the backend lost (those the channel would keep for the user).
|
|
80
82
|
if (wasWorking)
|
|
81
|
-
deps.binding.
|
|
83
|
+
void deps.binding.session.cancel('switch');
|
|
82
84
|
if (wasWorking && !await waitForTurnEnd(deps.binding.agent.session, cancelSeq, 30000)) {
|
|
83
85
|
deps.notify(t('rewind-settling'), { color: 'error' });
|
|
84
86
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-host.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/settings-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,OAAO,KAAK,EAAE,qBAAqB,EAA8C,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;
|
|
1
|
+
{"version":3,"file":"settings-host.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/settings-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAIvD,OAAO,KAAK,EAAE,qBAAqB,EAA8C,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAiBpJ,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,qBAAqB,EAAE,GAAG,kBAAkB,EAAE,CAsG1H;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,EAAE,YAAY,GAAE,MAAM,IAAsB,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,eAAe,GAAG,uBAAuB,GAAG,aAAa,CAAC,CA2VlM"}
|
|
@@ -8,6 +8,13 @@ import { concreteService } from '../host-access.js';
|
|
|
8
8
|
class WebCredentialAuthorization {
|
|
9
9
|
}
|
|
10
10
|
const webCredentialFields = new WeakMap();
|
|
11
|
+
/** The web-search forms share one settings page: provider, fetch route, API
|
|
12
|
+
* route and key are one topic and are edited together. */
|
|
13
|
+
const WEB_SETTINGS_PAGE = Object.freeze({
|
|
14
|
+
id: 'search',
|
|
15
|
+
title: 'Search',
|
|
16
|
+
descriptions: Object.freeze({ zh: '搜索' }),
|
|
17
|
+
});
|
|
11
18
|
/** Forms over the host's web settings; provider selection remains owned by DSH. */
|
|
12
19
|
export function webSettingsSections(ctx, namespaces) {
|
|
13
20
|
const available = new Set(namespaces.map(view => view.ns));
|
|
@@ -43,7 +50,7 @@ export function webSettingsSections(ctx, namespaces) {
|
|
|
43
50
|
const sections = [];
|
|
44
51
|
if (webNs !== undefined)
|
|
45
52
|
sections.push({
|
|
46
|
-
ns: webNs, title: 'Web search', descriptions: { zh: '网页搜索' },
|
|
53
|
+
ns: webNs, title: 'Web search', descriptions: { zh: '网页搜索' }, page: WEB_SETTINGS_PAGE,
|
|
47
54
|
fields: [
|
|
48
55
|
{
|
|
49
56
|
path: ['searchProvider'], label: 'Search', descriptions: { zh: '搜索' }, kind: 'text',
|
|
@@ -84,7 +91,7 @@ export function webSettingsSections(ctx, namespaces) {
|
|
|
84
91
|
});
|
|
85
92
|
sections.push({
|
|
86
93
|
ns: apiNs, title: 'DeepSeek Search / Fetch API',
|
|
87
|
-
descriptions: { zh: 'DeepSeek 搜索 / 抓取 API' },
|
|
94
|
+
descriptions: { zh: 'DeepSeek 搜索 / 抓取 API' }, page: WEB_SETTINGS_PAGE,
|
|
88
95
|
fields: [
|
|
89
96
|
{ path: ['baseURL'], label: 'API base URL', descriptions: { zh: 'API 基础地址' }, kind: 'text',
|
|
90
97
|
hint: 'Include the path prefix, without /search or /fetch.',
|
|
@@ -103,7 +110,7 @@ export function webSettingsSections(ctx, namespaces) {
|
|
|
103
110
|
});
|
|
104
111
|
if (messagesNs !== undefined)
|
|
105
112
|
sections.push({
|
|
106
|
-
ns: messagesNs, title: 'DeepSeek Messages search', descriptions: { zh: 'DeepSeek Messages 搜索' },
|
|
113
|
+
ns: messagesNs, title: 'DeepSeek Messages search', descriptions: { zh: 'DeepSeek Messages 搜索' }, page: WEB_SETTINGS_PAGE,
|
|
107
114
|
fields: [
|
|
108
115
|
{ path: ['baseURL'], label: 'Messages API base URL', descriptions: { zh: 'Messages API 基础地址' }, kind: 'text' },
|
|
109
116
|
{ path: ['maxUses'], label: 'Maximum searches per request', descriptions: { zh: '每次请求的最大搜索次数' }, kind: 'number',
|
|
@@ -191,5 +191,5 @@ export declare function createInitialChannelView(options: ChannelLaunchOptions,
|
|
|
191
191
|
sessionId: string;
|
|
192
192
|
mode: ChannelState['mode'];
|
|
193
193
|
cwdDescription: string;
|
|
194
|
-
}): Pick<ChannelState, 'effortLevels' | 'version' | 'ready' | 'startupFailure' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'modelDisplay' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'jobGroupFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'turnUsageRow' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'brand' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'turnUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
|
|
194
|
+
}): Pick<ChannelState, 'effortLevels' | 'version' | 'ready' | 'startupFailure' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'modelDisplay' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'workingDirectory' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'jobGroupFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'turnUsageRow' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'brand' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'turnUsage' | 'turnOutcome' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
|
|
195
195
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter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ready: options.startup === undefined, startupFailure: undefined, rows: [], selection: undefined, status: 'starting', sessionTitle: '', sessionColor: '',
|
|
28
28
|
agentId: input.agentId, sessionId: input.sessionId, agentBindingGeneration: 0, model: options.model, modelDisplay: undefined, provider: options.provider,
|
|
29
29
|
tokens: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, peak: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, idle: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 } },
|
|
30
|
-
cwd: options.cwd, displayCwd: input.cwdDescription, gitBranch: undefined, working: false,
|
|
30
|
+
cwd: options.cwd, displayCwd: input.cwdDescription, workingDirectory: undefined, gitBranch: undefined, working: false,
|
|
31
31
|
compaction: undefined,
|
|
32
32
|
cancelPending: false, spinnerMode: 'requesting', responseChars: 0, activeToolCount: 0,
|
|
33
33
|
turnStart: 0, lastUserText: '', notifications: [], contextWindow: undefined,
|
|
@@ -44,7 +44,7 @@ export function createInitialChannelView(options, input) {
|
|
|
44
44
|
smoothStreaming: options.smoothStreaming !== false, statusBar: normalizeStatusBar(options.statusBar),
|
|
45
45
|
whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), brand: normalizeBrandSetting(options.brand), minimalUi: options.minimalUi === true, activityEnabled: options.activity !== false,
|
|
46
46
|
contextBarEnabled: options.contextBar !== false, agentPreset: options.agentPreset, goal: undefined,
|
|
47
|
-
todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined, turnUsage: undefined,
|
|
47
|
+
todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined, turnUsage: undefined, turnOutcome: undefined,
|
|
48
48
|
tps: undefined, tpsSamples: [], contextSegments: { system: 0, prompt: 0, assistant: 0, thinking: 0, tools: 0 },
|
|
49
49
|
// 费用估算输入:主会话按模型分桶 + 子代理快照。与 tokens 并行累计,
|
|
50
50
|
// tokens 的既有语义/显示不变(DESIGN D2)。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChannelUi } from '../../adapter/ports/channel-ui.js';
|
|
2
|
-
import type { RawTrajEvent, ChatRow, ToolCallView, ToolResultView, NotificationItem, TodoPanelItem, PendingMessage, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
2
|
+
import type { RawTrajEvent, ChatRow, ToolCallView, ToolResultView, NotificationItem, TodoPanelItem, PendingMessage, StagedImageAdjustment, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
3
3
|
export type { ChatRow, ToolRow, ToolCallView, ToolFileDiff, ToolResultView, SubagentRow, JobGroupRow, JobRow, TokenUsage, TokenBucket, CostTokenBuckets, SessionCostByModel, SubagentCostEntry, NotificationItem, ChannelGoal, TodoPanelItem, LoadedContext, LoadedContextEntry, LoadedContextFile, LoadedContextSkill, LoadedContextTool, PendingMessage, SubagentControl, SubagentTranscriptView, JobControl, StagedImageInput, StagedImageAdjustment, StagedImageHandle, ComposerImageRef, ComposerSubmission, ExternalCommandOutcome, TranscriptImage, ResumeResult, EffortOption, PermissionPresetSnapshot, PermissionPresetAvailability, PermissionPresetOption, PermissionPresetCurrent, PresetOption, SkillInfo, CredentialStatus, AgentViewRow, AgentViewStatus, AgentViewDispatchResult, BackgroundResult, BackendModeOption, BackendChannelOption, TrajectorySource } from '../../adapter/ports/channel-view.js';
|
|
4
4
|
import { type ContentBlock, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
5
5
|
import { type SessionEvent } from '@deepseek-ai/dsh-session';
|
|
@@ -53,6 +53,8 @@ type MutableChannelView = {
|
|
|
53
53
|
};
|
|
54
54
|
/** Internal writable store; command signatures are owned once by ChannelUi. */
|
|
55
55
|
export interface ChannelState extends Omit<MutableChannelView, 'rows' | 'notifications' | 'todos' | 'pending' | 'tpsSamples' | 'subagents' | 'backgroundJobs' | 'pluginScene' | 'traceEvents' | 'trajectorySource'> {
|
|
56
|
+
/** False defers a concrete default until the capability catalog becomes available. */
|
|
57
|
+
setDefaultEffort(id: string | undefined): void | false;
|
|
56
58
|
rows: ChatRow[];
|
|
57
59
|
notifications: NotificationItem[];
|
|
58
60
|
/** Per-turn tps samples (sparkline history), oldest first. */
|
|
@@ -172,5 +174,15 @@ export interface MentionExpansion {
|
|
|
172
174
|
attached: string[];
|
|
173
175
|
/** Mention tokens that failed to resolve (kept literal, warned about). */
|
|
174
176
|
missing: string[];
|
|
177
|
+
/** Store-reported transformations for successfully attached mention images. */
|
|
178
|
+
imageAdjustments?: {
|
|
179
|
+
path: string;
|
|
180
|
+
adjustment: StagedImageAdjustment;
|
|
181
|
+
}[];
|
|
182
|
+
/** Controlled admission refusals, excluding arbitrary filesystem/store errors. */
|
|
183
|
+
imageFailures?: {
|
|
184
|
+
path: string;
|
|
185
|
+
reason: string;
|
|
186
|
+
}[];
|
|
175
187
|
}
|
|
176
188
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAW,YAAY,EAAgB,cAAc,EAAsH,gBAAgB,EAAe,aAAa,EAA+F,cAAc,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAW,YAAY,EAAgB,cAAc,EAAsH,gBAAgB,EAAe,aAAa,EAA+F,cAAc,EAAyE,qBAAqB,EAAuY,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AACz4B,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,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E;IAC3E,MAAM,EAAE,YAAY,EAAE,CAAA;IACtB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,qBAAqB,CAAA;KAAE,EAAE,CAAA;IACxE,kFAAkF;IAClF,aAAa,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACnD"}
|
|
@@ -45,9 +45,9 @@ export interface LiveSessionSeedMetadata {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* Create-time seed ownership fields. Every copied source prefix is inherited
|
|
48
|
-
* state for domain projections
|
|
49
|
-
* `parentSession
|
|
50
|
-
* cut distinguishes copied history from child-owned events. Not every
|
|
48
|
+
* state for domain projections. Copies of an existing conversation also
|
|
49
|
+
* record `parentSession`, so validators can admit ancestor delivery markers.
|
|
50
|
+
* The exact cut distinguishes copied history from child-owned events. Not every
|
|
51
51
|
* projection skips inherited events: newer inbox folds restore pending input
|
|
52
52
|
* from them, so rewind must cancel that work through the child's Inbox API.
|
|
53
53
|
* A child snapshot length cannot reliably be used as the cut because
|
|
@@ -146,9 +146,9 @@ export function sliceLiveSessionSeed(session, boundary) {
|
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Create-time seed ownership fields. Every copied source prefix is inherited
|
|
149
|
-
* state for domain projections
|
|
150
|
-
* `parentSession
|
|
151
|
-
* cut distinguishes copied history from child-owned events. Not every
|
|
149
|
+
* state for domain projections. Copies of an existing conversation also
|
|
150
|
+
* record `parentSession`, so validators can admit ancestor delivery markers.
|
|
151
|
+
* The exact cut distinguishes copied history from child-owned events. Not every
|
|
152
152
|
* projection skips inherited events: newer inbox folds restore pending input
|
|
153
153
|
* from them, so rewind must cancel that work through the child's Inbox API.
|
|
154
154
|
* A child snapshot length cannot reliably be used as the cut because
|
|
@@ -176,7 +176,7 @@ export declare function readSessionEventsFromFile(path: string, maxEvents?: numb
|
|
|
176
176
|
* storage record, not an event, and seq-less rows must not be dropped as if
|
|
177
177
|
* they were headers. The budget counts EXPANDED events, matching the tree's
|
|
178
178
|
* per-event cost. Malformed packed rows throw inside decodeStorageRecord —
|
|
179
|
-
* corrupt storage
|
|
179
|
+
* corrupt storage reports `failed: true`, never silently dropped runs.
|
|
180
180
|
*
|
|
181
181
|
* Torn-tail semantics mirror the backend's own reader: a plain log's
|
|
182
182
|
* unterminated final line (crash mid-append) is uncommitted data and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionLog.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/sessionLog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiB5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAAyC,CAAA;AAKjG;;;;;;;GAOG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CASxC;AAsED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiBxE;
|
|
1
|
+
{"version":3,"file":"sessionLog.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/sessionLog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiB5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAAyC,CAAA;AAKjG;;;;;;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,SAAS,CAI5B;AA4CD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAqC7E;AAED,oEAAoE;AACpE,wBAAgB,sCAAsC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI5F;AA+BD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAkCpD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAChB;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAyBzD;AAyBD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACzB,CAEA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAyB/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAwB7E"}
|
|
@@ -290,6 +290,16 @@ function decodeStorageRecordLocal(value) {
|
|
|
290
290
|
}
|
|
291
291
|
return expandChunkRow(validateChunkRow(value, tag));
|
|
292
292
|
}
|
|
293
|
+
/** Validate before expansion so both the upstream and local decoders share the cap. */
|
|
294
|
+
function storageRecordMemberCount(value) {
|
|
295
|
+
if (!isRecordValue(value))
|
|
296
|
+
return 1;
|
|
297
|
+
const tag = value['type'];
|
|
298
|
+
if (tag !== 'text-chunks' && tag !== 'reasoning-chunks' && tag !== 'tool-call-chunks')
|
|
299
|
+
return 1;
|
|
300
|
+
const row = validateChunkRow(value, tag);
|
|
301
|
+
return (tag === 'tool-call-chunks' ? row.data.args : row.data.texts).length;
|
|
302
|
+
}
|
|
293
303
|
/** I/O slice for streamed log reads. */
|
|
294
304
|
const READ_CHUNK = 64 * 1024;
|
|
295
305
|
/**
|
|
@@ -673,6 +683,12 @@ function readEvents(file, maxEvents, maxScanned, skipBelowSeq) {
|
|
|
673
683
|
if (scanned === 0 && isRecordValue(record) && record['type'] === 'session' && Number.isSafeInteger(record['version'])) {
|
|
674
684
|
formatVersion = record['version'];
|
|
675
685
|
}
|
|
686
|
+
// JSON/frame parsing and validation are physical-row work. Bound the
|
|
687
|
+
// additional logical event allocation BEFORE either decoder expands it.
|
|
688
|
+
if (storageRecordMemberCount(record) > maxScanned - scanned) {
|
|
689
|
+
scanned = maxScanned;
|
|
690
|
+
return result(false);
|
|
691
|
+
}
|
|
676
692
|
for (const event of decodeStorageRecord(record)) {
|
|
677
693
|
// The SCAN budget bounds the real cost drivers — I/O, decompression,
|
|
678
694
|
// JSON.parse — which are paid for EVERY envelope, collected or not.
|
|
@@ -779,7 +795,7 @@ export function readSessionEventsFromFile(path, maxEvents = Number.POSITIVE_INFI
|
|
|
779
795
|
* storage record, not an event, and seq-less rows must not be dropped as if
|
|
780
796
|
* they were headers. The budget counts EXPANDED events, matching the tree's
|
|
781
797
|
* per-event cost. Malformed packed rows throw inside decodeStorageRecord —
|
|
782
|
-
* corrupt storage
|
|
798
|
+
* corrupt storage reports `failed: true`, never silently dropped runs.
|
|
783
799
|
*
|
|
784
800
|
* Torn-tail semantics mirror the backend's own reader: a plain log's
|
|
785
801
|
* unterminated final line (crash mid-append) is uncommitted data and
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/** Primary validated upstream line (newest). */
|
|
2
|
-
export declare const UPSTREAM_VALIDATED_VERSION = "0.2.1-rc.
|
|
2
|
+
export declare const UPSTREAM_VALIDATED_VERSION = "0.2.1-rc.5";
|
|
3
3
|
/**
|
|
4
4
|
* Explicitly supported upstream prerelease lines, oldest first.
|
|
5
5
|
*
|
|
6
|
-
* 0.2.1-rc.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* 0.2.1-rc.5 = primary continuous-CI line; 0.2.1-rc.4/rc.3/rc.2 = earlier
|
|
7
|
+
* prereleases of the same family (published code compared with the primary);
|
|
8
|
+
* 0.2.0-rc.2/rc.1 = previous family (mapped compatibility);
|
|
9
|
+
* 0.1.7-rc.2/rc.1 = previous family (mapped compatibility);
|
|
10
|
+
* 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
9
11
|
* compatibility lines (source-checked when the primary line moves);
|
|
10
12
|
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
11
13
|
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
@@ -17,7 +19,7 @@ export declare const UPSTREAM_VALIDATED_VERSION = "0.2.1-rc.2";
|
|
|
17
19
|
* The peer range in package.json is deliberately wider than this list: an
|
|
18
20
|
* install on an older or newer line is allowed but reports drift at boot.
|
|
19
21
|
*/
|
|
20
|
-
export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0-rc.7", "0.1.0-rc.8", "0.1.1-rc.1", "0.1.1-rc.2", "0.1.2-alpha.3", "0.1.2-alpha.4", "0.1.2-alpha.5", "0.1.2-rc.1", "0.1.3-alpha.2", "0.1.5-alpha.1", "0.1.5-alpha.2", "0.1.5-rc.1", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2", "0.2.1-rc.2"];
|
|
22
|
+
export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0-rc.7", "0.1.0-rc.8", "0.1.1-rc.1", "0.1.1-rc.2", "0.1.2-alpha.3", "0.1.2-alpha.4", "0.1.2-alpha.5", "0.1.2-rc.1", "0.1.3-alpha.2", "0.1.5-alpha.1", "0.1.5-alpha.2", "0.1.5-rc.1", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2", "0.2.1-rc.2", "0.2.1-rc.3", "0.2.1-rc.4", "0.2.1-rc.5"];
|
|
21
23
|
/**
|
|
22
24
|
* Framework packages version on their own lines; the contract validates
|
|
23
25
|
* their MAJOR (breaking surface), not the harness prerelease number.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAmBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAmBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,mUAsB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,wsCAuC5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAoBD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAA;AAEvG,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKl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|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Upstream compatibility contract.
|
|
3
3
|
*
|
|
4
4
|
* The TUI is validated against a set of upstream prerelease lines — the
|
|
5
|
-
* current primary (0.2.1-rc.
|
|
5
|
+
* current primary (0.2.1-rc.5) plus older lines kept in backward
|
|
6
6
|
* compatibility across the 0.2.0, 0.1.7, 0.1.5, 0.1.3, 0.1.2, 0.1.1 and 0.1.0
|
|
7
7
|
* release families.
|
|
8
8
|
* Every official package this adapter touches is blessed here; anything
|
|
@@ -17,13 +17,15 @@ import { readFileSync } from 'node:fs';
|
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
18
|
import { ADAPTER_TYPE_PACKAGES, HOST_TYPE_PACKAGES } from './host-contract.js';
|
|
19
19
|
/** Primary validated upstream line (newest). */
|
|
20
|
-
export const UPSTREAM_VALIDATED_VERSION = '0.2.1-rc.
|
|
20
|
+
export const UPSTREAM_VALIDATED_VERSION = '0.2.1-rc.5';
|
|
21
21
|
/**
|
|
22
22
|
* Explicitly supported upstream prerelease lines, oldest first.
|
|
23
23
|
*
|
|
24
|
-
* 0.2.1-rc.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
24
|
+
* 0.2.1-rc.5 = primary continuous-CI line; 0.2.1-rc.4/rc.3/rc.2 = earlier
|
|
25
|
+
* prereleases of the same family (published code compared with the primary);
|
|
26
|
+
* 0.2.0-rc.2/rc.1 = previous family (mapped compatibility);
|
|
27
|
+
* 0.1.7-rc.2/rc.1 = previous family (mapped compatibility);
|
|
28
|
+
* 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
27
29
|
* compatibility lines (source-checked when the primary line moves);
|
|
28
30
|
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
29
31
|
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
@@ -54,6 +56,9 @@ export const UPSTREAM_VALIDATED_VERSIONS = [
|
|
|
54
56
|
'0.2.0-rc.1',
|
|
55
57
|
'0.2.0-rc.2',
|
|
56
58
|
'0.2.1-rc.2',
|
|
59
|
+
'0.2.1-rc.3',
|
|
60
|
+
'0.2.1-rc.4',
|
|
61
|
+
'0.2.1-rc.5',
|
|
57
62
|
];
|
|
58
63
|
/**
|
|
59
64
|
* Framework packages version on their own lines; the contract validates
|