@deepseek-harness-tui/dsh-tui 0.10.2 → 0.11.1
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 +175 -123
- package/bin/dsh-tui.js +748 -22
- package/cordis.patch.yml +42 -13
- package/cordis.yml +5 -2
- package/lib/types/activityPrefs.d.ts +24 -0
- package/lib/types/activityPrefs.d.ts.map +1 -1
- package/lib/types/activityPrefs.js +50 -1
- package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
- package/lib/types/adapter/channel/session-projection.js +2 -0
- package/lib/types/adapter/channel/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +3 -1
- package/lib/types/adapter/channel/ui-policy.d.ts +4 -1
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +6 -2
- package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
- package/lib/types/adapter/kernel/host-facade.js +1 -0
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
- package/lib/types/adapter/kernel/replay.js +3 -0
- package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
- package/lib/types/adapter/kernel/runtime.js +2 -0
- package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -1
- package/lib/types/adapter/kernel/slices/workspace.js +1 -0
- package/lib/types/adapter/ports/channel-ui.d.ts +29 -5
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +66 -12
- package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-workspace.d.ts +23 -0
- package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel.d.ts +4 -1
- package/lib/types/adapter/ports/channel.d.ts.map +1 -1
- package/lib/types/adapter/ports/workspace.d.ts +2 -0
- package/lib/types/adapter/ports/workspace.d.ts.map +1 -1
- package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -1
- package/lib/types/adapter/upstream/workspace-driver.js +10 -2
- package/lib/types/commands.d.ts.map +1 -1
- package/lib/types/commands.js +1 -0
- package/lib/types/components/ActivityLine.d.ts +7 -2
- package/lib/types/components/ActivityLine.d.ts.map +1 -1
- package/lib/types/components/ActivityLine.js +0 -8
- package/lib/types/components/ContextBarView.d.ts +15 -7
- package/lib/types/components/ContextBarView.d.ts.map +1 -1
- package/lib/types/components/ContextBarView.js +26 -22
- package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -1
- package/lib/types/components/ImagePreviewOverlay.js +11 -5
- package/lib/types/components/Markdown.d.ts +11 -1
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +20 -2
- package/lib/types/components/MermaidDiagram.d.ts +13 -0
- package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
- package/lib/types/components/MermaidDiagram.js +61 -0
- package/lib/types/components/MessageList.d.ts +26 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +74 -8
- package/lib/types/components/PageMargin.d.ts +1 -1
- package/lib/types/components/PromptInput.d.ts +37 -1
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +291 -30
- package/lib/types/components/ScrollbarGutter.d.ts +20 -5
- package/lib/types/components/ScrollbarGutter.d.ts.map +1 -1
- package/lib/types/components/ScrollbarGutter.js +88 -10
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +2 -1
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +30 -28
- package/lib/types/components/SubagentCard.d.ts.map +1 -1
- package/lib/types/components/SubagentCard.js +12 -6
- package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
- package/lib/types/components/SubagentDetailScene.js +8 -3
- package/lib/types/components/Tooltip.d.ts.map +1 -1
- package/lib/types/components/Tooltip.js +45 -7
- package/lib/types/components/design-system/HintLine.d.ts +1 -2
- package/lib/types/components/design-system/HintLine.d.ts.map +1 -1
- package/lib/types/components/design-system/HintLine.js +1 -2
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
- package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantThinkingMessage.js +2 -1
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -2
- package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
- package/lib/types/components/messages/AssistantToolUseMessage.js +30 -26
- package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
- package/lib/types/components/messages/UserPromptMessage.js +5 -7
- package/lib/types/components/messages/useImageInspection.d.ts.map +1 -1
- package/lib/types/components/messages/useImageInspection.js +19 -9
- package/lib/types/components/promptDraftCache.d.ts +102 -0
- package/lib/types/components/promptDraftCache.d.ts.map +1 -0
- package/lib/types/components/promptDraftCache.js +76 -0
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +17 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +40 -7
- package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
- package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
- package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
- package/lib/types/components/sessions/SessionListRow.d.ts +23 -1
- package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
- package/lib/types/components/sessions/SessionListRow.js +52 -5
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
- package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
- package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
- package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
- package/lib/types/dsh-adapter/activity-store.js +359 -0
- package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
- package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
- package/lib/types/dsh-adapter/bundled-presets.js +80 -0
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/action-readiness.js +3 -0
- 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 +19 -2
- package/lib/types/dsh-adapter/channel/background-action.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +53 -29
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +8 -6
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +5 -4
- package/lib/types/dsh-adapter/channel/binding.d.ts +19 -2
- package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding.js +78 -18
- package/lib/types/dsh-adapter/channel/compaction.d.ts +0 -1
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +0 -2
- package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
- package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/composer-images.js +105 -6
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +8 -0
- package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/context-bookkeeping.js +3 -2
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts +58 -0
- package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/ide-selection.js +226 -0
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts +6 -1
- package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/input-delivery.js +9 -1
- package/lib/types/dsh-adapter/channel/local-actions.d.ts +3 -19
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +2 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
- package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-actions.js +82 -6
- package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/model-switch.js +49 -31
- package/lib/types/dsh-adapter/channel/projection.d.ts +4 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +29 -19
- package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/reports.js +4 -12
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-adoption.js +1 -0
- package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-fork.js +26 -2
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +4 -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 +2 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +10 -0
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +6 -4
- 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 +0 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +12 -3
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +292 -94
- package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-rewind.js +34 -16
- package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-tree-actions.js +19 -3
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +4 -3
- package/lib/types/dsh-adapter/channel/state.d.ts +6 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +3 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +21 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +173 -6
- package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/transcript.js +6 -12
- package/lib/types/dsh-adapter/channel/types.d.ts +6 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +4 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/workspace-actions.js +41 -1
- package/lib/types/dsh-adapter/channel.d.ts +1 -1
- package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel.js +82 -20
- package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
- package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/index.js +1 -1
- package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/messages.js +15 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts +18 -0
- package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/sessionLog.js +18 -3
- package/lib/types/dsh-adapter/compat/settings.d.ts +35 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/settings.js +57 -0
- package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
- package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
- package/lib/types/dsh-adapter/compat/shell.js +11 -0
- package/lib/types/dsh-adapter/contract.d.ts +5 -4
- package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
- package/lib/types/dsh-adapter/contract.js +17 -6
- package/lib/types/dsh-adapter/ide-channel.d.ts +224 -0
- package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
- package/lib/types/dsh-adapter/ide-channel.js +556 -0
- package/lib/types/dsh-adapter/index.d.ts +18 -3
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +32 -5
- package/lib/types/dsh-adapter/plugin.d.ts +4 -1
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +197 -49
- package/lib/types/dsh-adapter/preset-resolution.d.ts +8 -0
- package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
- package/lib/types/dsh-adapter/preset-resolution.js +10 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
- package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
- package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessionTree.js +3 -2
- package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
- package/lib/types/dsh-adapter/settings-sections.js +7 -4
- package/lib/types/dsh-adapter/subagents.d.ts +16 -3
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +92 -29
- package/lib/types/dsh-adapter/workspaces.d.ts +46 -3
- package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
- package/lib/types/dsh-adapter/workspaces.js +116 -0
- package/lib/types/effortPrefs.d.ts +15 -3
- package/lib/types/effortPrefs.d.ts.map +1 -1
- package/lib/types/effortPrefs.js +37 -3
- package/lib/types/history.d.ts +13 -1
- package/lib/types/history.d.ts.map +1 -1
- package/lib/types/history.js +15 -2
- package/lib/types/homePrefs.d.ts +15 -0
- package/lib/types/homePrefs.d.ts.map +1 -0
- package/lib/types/homePrefs.js +53 -0
- package/lib/types/i18n.d.ts +347 -297
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +133 -85
- package/lib/types/ink/colorize.d.ts +10 -0
- package/lib/types/ink/colorize.d.ts.map +1 -1
- package/lib/types/ink/colorize.js +21 -0
- package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
- package/lib/types/ink/components/ScrollBox.js +12 -1
- 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-copy-on-select.d.ts +5 -1
- package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-copy-on-select.js +15 -1
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +36 -1
- package/lib/types/ink/log-update.d.ts.map +1 -1
- package/lib/types/ink/log-update.js +19 -1
- package/lib/types/ink/output.d.ts +10 -1
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +109 -17
- package/lib/types/ink/render-border.d.ts +6 -1
- package/lib/types/ink/render-border.d.ts.map +1 -1
- package/lib/types/ink/render-border.js +25 -9
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +48 -6
- package/lib/types/ink/renderer.d.ts +6 -0
- package/lib/types/ink/renderer.d.ts.map +1 -1
- package/lib/types/ink/renderer.js +2 -1
- package/lib/types/ink/selection.d.ts +88 -0
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +164 -0
- package/lib/types/ink/sixel-graphics.d.ts +19 -1
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +124 -12
- package/lib/types/ink/terminal-image.d.ts +18 -1
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal.d.ts +17 -0
- package/lib/types/ink/terminal.d.ts.map +1 -1
- package/lib/types/ink/terminal.js +20 -1
- package/lib/types/screens/Chat.d.ts +20 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +296 -76
- package/lib/types/screens/SessionSupervisor.d.ts +84 -0
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
- package/lib/types/screens/SessionSupervisor.js +350 -0
- package/lib/types/screens/SessionTree.js +2 -2
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +32 -9
- package/lib/types/screens/StatusLine.d.ts +18 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +38 -19
- package/lib/types/screens/StatusMetrics.d.ts +79 -22
- package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
- package/lib/types/screens/StatusMetrics.js +153 -88
- package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/model.js +69 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +593 -0
- package/lib/types/sessionMounts.d.ts +272 -0
- package/lib/types/sessionMounts.d.ts.map +1 -0
- package/lib/types/sessionMounts.js +706 -0
- package/lib/types/sessions/format.d.ts.map +1 -1
- package/lib/types/sessions/format.js +4 -1
- package/lib/types/sessions/resumeFailure.d.ts +38 -0
- package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
- package/lib/types/sessions/resumeFailure.js +58 -0
- package/lib/types/terminal-utils/mermaid.d.ts +44 -0
- package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
- package/lib/types/terminal-utils/mermaid.js +83 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +175 -19
- package/lib/types/tuiDisplayPrefs.d.ts +7 -9
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +31 -28
- package/lib/types/update.d.ts +61 -0
- package/lib/types/update.d.ts.map +1 -1
- package/lib/types/update.js +194 -0
- package/lib/types/utils/fold-long-lines.d.ts +1 -1
- package/lib/types/utils/fold-long-lines.js +1 -1
- package/lib/types/utils/imageResize.d.ts +90 -0
- package/lib/types/utils/imageResize.d.ts.map +1 -0
- package/lib/types/utils/imageResize.js +272 -0
- package/lib/types/utils/keymap.d.ts +5 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +23 -0
- package/lib/types/working-activity.d.ts +10 -9
- package/lib/types/working-activity.d.ts.map +1 -1
- package/lib/types/working-activity.js +17 -10
- package/lib/types/workspaces.d.ts +2 -1
- package/lib/types/workspaces.d.ts.map +1 -1
- package/lib/types/workspaces.js +1 -1
- package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
- package/package.json +126 -105
- package/presets/liangshen/.dsh-tui-managed.json +1 -1
- package/presets/liangshen/agent.cordis.yml +15 -0
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +0 -19
- package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +0 -1
- package/lib/types/components/design-system/KeyboardShortcutHint.js +0 -14
- package/lib/types/dsh-adapter/channel/activity.d.ts +0 -20
- package/lib/types/dsh-adapter/channel/activity.d.ts.map +0 -1
- package/lib/types/dsh-adapter/channel/activity.js +0 -113
- package/lib/types/screens/AgentView.d.ts +0 -23
- package/lib/types/screens/AgentView.d.ts.map +0 -1
- package/lib/types/screens/AgentView.js +0 -546
- package/lib/types/screens/SessionBrowser.d.ts +0 -42
- package/lib/types/screens/SessionBrowser.d.ts.map +0 -1
- package/lib/types/screens/SessionBrowser.js +0 -911
- package/lib/types/terminal-utils/terminal.d.ts +0 -18
- package/lib/types/terminal-utils/terminal.d.ts.map +0 -1
- package/lib/types/terminal-utils/terminal.js +0 -96
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publishes this TUI process's mounted-session set to the cross-process
|
|
3
|
+
* ledger ({@link ../../sessionMounts.js}).
|
|
4
|
+
*
|
|
5
|
+
* A TUI terminal hosts several agent sessions at once — the attached one plus
|
|
6
|
+
* every parked background session — and two processes driving the same
|
|
7
|
+
* session log would interleave writes into one append-only transcript. The
|
|
8
|
+
* ledger is what lets another TUI see "this session is already mounted" and
|
|
9
|
+
* refuse it, so the published set has to cover EVERY live agent in this
|
|
10
|
+
* process, not just the attached one.
|
|
11
|
+
*
|
|
12
|
+
* Reading the agent registry is what makes that automatic, and the small timer
|
|
13
|
+
* is what keeps it honest: agents are created from more than seven paths
|
|
14
|
+
* (`/new`, `/resume`, `/bg`, fork, rewind, model switch, boot attach), so an
|
|
15
|
+
* announce-at-each-call-site design would silently drop a session the day
|
|
16
|
+
* someone adds an eighth. Deriving the set from the registry has exactly one
|
|
17
|
+
* place to be right.
|
|
18
|
+
*
|
|
19
|
+
* Publishing is NOT a liveness witness: {@link ../../sessionMounts.js} decides
|
|
20
|
+
* liveness from the owner's pid alone, so a late or missed publish cannot keep
|
|
21
|
+
* a dead process's claim alive and there is no timestamp here to expire. The
|
|
22
|
+
* timer's only job is to keep the published SET current, and it is deliberately
|
|
23
|
+
* unref'd: it must never be the reason a quitting TUI stays alive. Teardown
|
|
24
|
+
* removes the record outright so a clean exit frees its sessions immediately.
|
|
25
|
+
*
|
|
26
|
+
* Registered through the host's single teardown funnel by the caller, so both
|
|
27
|
+
* the interval and the ledger record are released exactly once.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
32
|
+
/**
|
|
33
|
+
* Collect the session ids this process currently has mounted: every live agent
|
|
34
|
+
* the registry knows about, minus sub-agent runs.
|
|
35
|
+
*
|
|
36
|
+
* Sub-agents are excluded because they are not independently mountable: they
|
|
37
|
+
* are a parent session's own work, they never appear as `/resume` rows, and
|
|
38
|
+
* claiming their ids would make the parent look occupied to a TUI that only
|
|
39
|
+
* wants to read the parent.
|
|
40
|
+
* @param ctx - The plugin context, for the agent registry.
|
|
41
|
+
* @returns Session ids as strings.
|
|
42
|
+
*/
|
|
43
|
+
export declare function mountedSessionIds(ctx: Context): string[];
|
|
44
|
+
/**
|
|
45
|
+
* Start publishing this process's mounted sessions.
|
|
46
|
+
*
|
|
47
|
+
* The first publish runs synchronously so a session mounted during boot is
|
|
48
|
+
* claimed before the user can reach a second terminal.
|
|
49
|
+
* @param ctx - The plugin context, for the agent registry.
|
|
50
|
+
* @returns A disposer that stops publishing and releases the claim.
|
|
51
|
+
*/
|
|
52
|
+
export declare function startSessionMountHeartbeat(ctx: Context): () => void;
|
|
53
|
+
//# sourceMappingURL=session-mount-heartbeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-mount-heartbeat.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/session-mount-heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAelD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CASxD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,IAAI,CA6BnE"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publishes this TUI process's mounted-session set to the cross-process
|
|
3
|
+
* ledger ({@link ../../sessionMounts.js}).
|
|
4
|
+
*
|
|
5
|
+
* A TUI terminal hosts several agent sessions at once — the attached one plus
|
|
6
|
+
* every parked background session — and two processes driving the same
|
|
7
|
+
* session log would interleave writes into one append-only transcript. The
|
|
8
|
+
* ledger is what lets another TUI see "this session is already mounted" and
|
|
9
|
+
* refuse it, so the published set has to cover EVERY live agent in this
|
|
10
|
+
* process, not just the attached one.
|
|
11
|
+
*
|
|
12
|
+
* Reading the agent registry is what makes that automatic, and the small timer
|
|
13
|
+
* is what keeps it honest: agents are created from more than seven paths
|
|
14
|
+
* (`/new`, `/resume`, `/bg`, fork, rewind, model switch, boot attach), so an
|
|
15
|
+
* announce-at-each-call-site design would silently drop a session the day
|
|
16
|
+
* someone adds an eighth. Deriving the set from the registry has exactly one
|
|
17
|
+
* place to be right.
|
|
18
|
+
*
|
|
19
|
+
* Publishing is NOT a liveness witness: {@link ../../sessionMounts.js} decides
|
|
20
|
+
* liveness from the owner's pid alone, so a late or missed publish cannot keep
|
|
21
|
+
* a dead process's claim alive and there is no timestamp here to expire. The
|
|
22
|
+
* timer's only job is to keep the published SET current, and it is deliberately
|
|
23
|
+
* unref'd: it must never be the reason a quitting TUI stays alive. Teardown
|
|
24
|
+
* removes the record outright so a clean exit frees its sessions immediately.
|
|
25
|
+
*
|
|
26
|
+
* Registered through the host's single teardown funnel by the caller, so both
|
|
27
|
+
* the interval and the ledger record are released exactly once.
|
|
28
|
+
*
|
|
29
|
+
* @module
|
|
30
|
+
*/
|
|
31
|
+
import { clearOwnMounts, publishMounts } from '../sessionMounts.js';
|
|
32
|
+
/**
|
|
33
|
+
* How often the mounted set is republished. One small file write, not tied to
|
|
34
|
+
* any render frame; it bounds how long a peer can read a set that predates a
|
|
35
|
+
* session this process just mounted.
|
|
36
|
+
*/
|
|
37
|
+
const PUBLISH_INTERVAL_MS = 15_000;
|
|
38
|
+
/**
|
|
39
|
+
* Collect the session ids this process currently has mounted: every live agent
|
|
40
|
+
* the registry knows about, minus sub-agent runs.
|
|
41
|
+
*
|
|
42
|
+
* Sub-agents are excluded because they are not independently mountable: they
|
|
43
|
+
* are a parent session's own work, they never appear as `/resume` rows, and
|
|
44
|
+
* claiming their ids would make the parent look occupied to a TUI that only
|
|
45
|
+
* wants to read the parent.
|
|
46
|
+
* @param ctx - The plugin context, for the agent registry.
|
|
47
|
+
* @returns Session ids as strings.
|
|
48
|
+
*/
|
|
49
|
+
export function mountedSessionIds(ctx) {
|
|
50
|
+
const roster = ctx.get('agents');
|
|
51
|
+
const ids = [];
|
|
52
|
+
for (const agent of roster?.list?.() ?? []) {
|
|
53
|
+
if (agent.session.header.origin === 'subagent')
|
|
54
|
+
continue;
|
|
55
|
+
const id = String(agent.id);
|
|
56
|
+
if (id.length > 0)
|
|
57
|
+
ids.push(id);
|
|
58
|
+
}
|
|
59
|
+
return ids;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Start publishing this process's mounted sessions.
|
|
63
|
+
*
|
|
64
|
+
* The first publish runs synchronously so a session mounted during boot is
|
|
65
|
+
* claimed before the user can reach a second terminal.
|
|
66
|
+
* @param ctx - The plugin context, for the agent registry.
|
|
67
|
+
* @returns A disposer that stops publishing and releases the claim.
|
|
68
|
+
*/
|
|
69
|
+
export function startSessionMountHeartbeat(ctx) {
|
|
70
|
+
let stopped = false;
|
|
71
|
+
const beat = () => {
|
|
72
|
+
if (stopped)
|
|
73
|
+
return;
|
|
74
|
+
try {
|
|
75
|
+
publishMounts(mountedSessionIds(ctx));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
// PUBLISHING is best-effort; DECIDING is not. A beat that cannot write
|
|
79
|
+
// costs announcement until the next one, and must not disturb this
|
|
80
|
+
// session — while the paths that grant a mount refuse outright when they
|
|
81
|
+
// cannot read the ledger, because that is the one error nothing can
|
|
82
|
+
// repair afterwards.
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
beat();
|
|
86
|
+
const timer = setInterval(beat, PUBLISH_INTERVAL_MS);
|
|
87
|
+
// Never let the publisher hold the process open: quitting the TUI must not
|
|
88
|
+
// wait for a timer that exists only to describe a process that is leaving.
|
|
89
|
+
timer.unref?.();
|
|
90
|
+
return () => {
|
|
91
|
+
stopped = true;
|
|
92
|
+
clearInterval(timer);
|
|
93
|
+
try {
|
|
94
|
+
clearOwnMounts();
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
// A leftover record is ignored once this pid is gone.
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionTree.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sessionTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAiE,MAAM,qCAAqC,CAAA;AAC9J,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC9J;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"sessionTree.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/sessionTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAiE,MAAM,qCAAqC,CAAA;AAC9J,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AAC9J;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CA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gBjF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,EAAE,CAqK9F;AAcD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,SAAS,aAAa,EAAE,EAClC,aAAa,EAAE,MAAM,EACrB,SAAS,UAAQ,GAChB,eAAe,CAoQjB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,EAAE,CA0F/F;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,GACZ,QAAQ,EAAE,CA+FZ;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,SAAS,QAAQ,EAAE,EAC5B,IAAI,EAAE,SAAS,QAAQ,EAAE,EACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,MAAM,CAaR"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isCompactionCheckpointSource, toolResultPayload } from './compat/messages.js';
|
|
1
2
|
export const TREE_FILTERS = ['default', 'no-tools', 'user-only', 'all'];
|
|
2
3
|
/**
|
|
3
4
|
* Confirm-time preview for a USER-message pick: how much of its branch the
|
|
@@ -345,7 +346,7 @@ export function extractEntries(sessionId, events) {
|
|
|
345
346
|
switch (event.type) {
|
|
346
347
|
case 'user/message': {
|
|
347
348
|
const source = event.data.source;
|
|
348
|
-
if (source
|
|
349
|
+
if (isCompactionCheckpointSource(source)) {
|
|
349
350
|
const summary = textOf(event.data.content);
|
|
350
351
|
push({
|
|
351
352
|
seq: event.seq,
|
|
@@ -408,7 +409,7 @@ export function extractEntries(sessionId, events) {
|
|
|
408
409
|
const entry = entries[index];
|
|
409
410
|
entries[index] = {
|
|
410
411
|
...entry,
|
|
411
|
-
toolStatus: event.data.error
|
|
412
|
+
toolStatus: event.data.error !== undefined || toolResultPayload(event.data.message).isError ? 'error' : 'ok',
|
|
412
413
|
};
|
|
413
414
|
openTools.delete(event.data.message.source.callId);
|
|
414
415
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-sections.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/settings-sections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAA2G,MAAM,sCAAsC,CAAA;AACvL,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AACvL;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAWtD,6EAA6E;AAC7E,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI,CAAA;IACjD,IAAI,IAAI,SAAS,kBAAkB,EAAE,CAAA;IACrC,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAA;IACnD,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C;AAED,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,mBAAmB,EAAE,0BAA0B,CAAA;KAChD;CACF;AAED,eAAO,MAAM,IAAI,8BAA8B,CAAA;AAE/C;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,OAAO;gBACzC,GAAG,EAAE,OAAO;IAsBxB,QAAQ,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI;IAuBjD,iDAAiD;IACjD,IAAI,IAAI,SAAS,kBAAkB,E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OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;CAU5C;AA6FD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,GAAG,uBAAuB,GAAG,SAAS,CAO5H;AAiDD,wBAAgB,4BAA4B,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAiBnF;AAED,eAAe,0BAA0B,CAAA"}
|
|
@@ -33,7 +33,7 @@ export class TuiSettingsSectionsRuntime extends Service {
|
|
|
33
33
|
return [...settingsSectionStateFor(runtime).sections.values()];
|
|
34
34
|
},
|
|
35
35
|
section(ns) {
|
|
36
|
-
return settingsSectionStateFor(runtime).sections.get(ns
|
|
36
|
+
return settingsSectionStateFor(runtime).sections.get(ns);
|
|
37
37
|
},
|
|
38
38
|
subscribe(listener) {
|
|
39
39
|
return subscribeSections(runtime, listener);
|
|
@@ -104,9 +104,12 @@ function settingsSectionStateFor(runtime) {
|
|
|
104
104
|
}
|
|
105
105
|
function registerSection(runtime, section, owner) {
|
|
106
106
|
const state = isSectionState(runtime) ? runtime : settingsSectionStateFor(runtime);
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
// Host sections use opaque Loader IDs; rewriting them breaks settings.mutate.
|
|
108
|
+
// Plugin-owned sections retain their existing namespace validation.
|
|
109
|
+
const ns = owner === undefined ? section.ns : section.ns.trim();
|
|
110
|
+
if (!ns || (owner !== undefined && !/^[a-z][a-z0-9_-]*$/u.test(ns))) {
|
|
109
111
|
throw new TypeError(`invalid TUI settings-section namespace: ${section.ns}`);
|
|
112
|
+
}
|
|
110
113
|
if (state.sections.has(ns))
|
|
111
114
|
throw new Error(`TUI settings section "${ns}" is already registered`);
|
|
112
115
|
const groupIds = new Set();
|
|
@@ -239,7 +242,7 @@ export function getLocalSettingsSectionsHost(ctx) {
|
|
|
239
242
|
return [...state.sections.values()];
|
|
240
243
|
},
|
|
241
244
|
section(ns) {
|
|
242
|
-
return state.sections.get(ns
|
|
245
|
+
return state.sections.get(ns);
|
|
243
246
|
},
|
|
244
247
|
subscribe(listener) {
|
|
245
248
|
return subscribeSections(state, listener);
|
|
@@ -9,8 +9,21 @@ export declare class SubagentActivityStore {
|
|
|
9
9
|
private commitLine;
|
|
10
10
|
private pushLine;
|
|
11
11
|
onSpawned(agentId: string, provider?: string, model?: string, info?: Partial<SubagentState>): void;
|
|
12
|
+
/** Durable discovery (`subagent/catalog`, workflow member events, registry
|
|
13
|
+
* back-fill): register a child WITHOUT disturbing an already-tracked run.
|
|
14
|
+
* `live` marks a child the agents registry currently holds, which keeps the
|
|
15
|
+
* row running; an idle historical child shows as `unknown` (the parent log
|
|
16
|
+
* alone cannot prove how its last epoch ended). */
|
|
17
|
+
onDiscovered(agentId: string, info?: {
|
|
18
|
+
label?: string;
|
|
19
|
+
childCreatedAt?: number;
|
|
20
|
+
live?: boolean;
|
|
21
|
+
provider?: string;
|
|
22
|
+
model?: string;
|
|
23
|
+
}): void;
|
|
12
24
|
linkSession(agentId: string, session: unknown): void;
|
|
13
25
|
getSubagentIdBySession(session: unknown): string | undefined;
|
|
26
|
+
has(agentId: string): boolean;
|
|
14
27
|
appendOutput(agentId: string, text: string, kind?: SubagentOutputKind): void;
|
|
15
28
|
/** Mark the streaming tail line complete (run settlement). */
|
|
16
29
|
flushOutput(agentId: string): void;
|
|
@@ -35,9 +48,9 @@ export declare class SubagentActivityStore {
|
|
|
35
48
|
total?: number;
|
|
36
49
|
context?: number;
|
|
37
50
|
}): void;
|
|
38
|
-
onCompleted(agentId: string, summary?: string, stopReason?: string): void;
|
|
39
|
-
onFailed(agentId: string, error: string): void;
|
|
40
|
-
onCancelled(agentId: string, reason?: string, summary?: string): void;
|
|
51
|
+
onCompleted(agentId: string, summary?: string, stopReason?: string, endedAt?: number): void;
|
|
52
|
+
onFailed(agentId: string, error: string, endedAt?: number): void;
|
|
53
|
+
onCancelled(agentId: string, reason?: string, summary?: string, endedAt?: number): void;
|
|
41
54
|
private finish;
|
|
42
55
|
/** Drop all tracked subagents and session links (session swap: the old
|
|
43
56
|
* session's children were disposed with their parent — nothing may keep
|
|
@@ -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;AAElE,OAAO,KAAK,EAAE,aAAa,EAAsC,kBAAkB,EAAE,gBAAgB,EAAsB,MAAM,kCAAkC,CAAA;AACnK,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAiBnK,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,SAAS,CAAwB;IACzC,OAAO,CAAC,OAAO,CAA2C;IAE1D,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,CAAM,GAAG,IAAI;IAsD1G;;;;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,CAAA;KAAO,GAAG,IAAI;IAiB9I,WAAW,C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AAC,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;;sEAEkE;IAClE,KAAK,IAAI,IAAI;IAOb,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,3 +1,4 @@
|
|
|
1
|
+
import { toolResultPayload } from './compat/messages.js';
|
|
1
2
|
const MAX_OUTPUT_EVENTS = 160;
|
|
2
3
|
const MAX_OUTPUT_LINES = 160;
|
|
3
4
|
export class SubagentActivityStore {
|
|
@@ -21,28 +22,80 @@ export class SubagentActivityStore {
|
|
|
21
22
|
}
|
|
22
23
|
onSpawned(agentId, provider = 'subagent', model, info = {}) {
|
|
23
24
|
const existing = this.states.get(agentId);
|
|
24
|
-
|
|
25
|
+
if (!existing) {
|
|
26
|
+
this.states.set(agentId, {
|
|
27
|
+
agentId,
|
|
28
|
+
runId: info.runId ?? agentId,
|
|
29
|
+
description: info.description ?? `${provider} task`,
|
|
30
|
+
provider,
|
|
31
|
+
model: model ?? info.model ?? provider,
|
|
32
|
+
effort: info.effort,
|
|
33
|
+
status: 'running',
|
|
34
|
+
startedAt: info.startedAt ?? Date.now(),
|
|
35
|
+
local: info.local,
|
|
36
|
+
parentSessionId: info.parentSessionId,
|
|
37
|
+
sessionId: info.sessionId,
|
|
38
|
+
output: [],
|
|
39
|
+
outputEvents: [],
|
|
40
|
+
toolCalls: [],
|
|
41
|
+
});
|
|
42
|
+
this.notify();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
// Continuable children re-use one agent id across residency epochs, and a
|
|
46
|
+
// new epoch announces a NEW runId (the host's `subagent/start` pairing
|
|
47
|
+
// key). A runId change therefore opens a fresh run: the previous epoch's
|
|
48
|
+
// terminal state, timing, output and tools must not leak into it. The
|
|
49
|
+
// same runId re-announced only refreshes display metadata.
|
|
50
|
+
if (info.runId !== undefined && info.runId !== existing.runId) {
|
|
51
|
+
this.streams.delete(agentId);
|
|
52
|
+
existing.runId = info.runId;
|
|
53
|
+
existing.status = 'running';
|
|
54
|
+
existing.startedAt = info.startedAt ?? Date.now();
|
|
55
|
+
existing.completedAt = undefined;
|
|
56
|
+
existing.endedAt = undefined;
|
|
57
|
+
existing.stopReason = undefined;
|
|
58
|
+
existing.summary = undefined;
|
|
59
|
+
existing.error = undefined;
|
|
60
|
+
existing.output = [];
|
|
61
|
+
existing.outputEvents = [];
|
|
62
|
+
existing.toolCalls = [];
|
|
63
|
+
existing.tokens = undefined;
|
|
64
|
+
existing.description = info.description ?? existing.description;
|
|
65
|
+
existing.local = info.local ?? existing.local;
|
|
66
|
+
existing.provider = provider;
|
|
67
|
+
existing.model = model ?? existing.model;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
existing.provider = provider;
|
|
71
|
+
existing.model = model ?? existing.model;
|
|
72
|
+
if (info.description !== undefined)
|
|
73
|
+
existing.description = info.description;
|
|
74
|
+
if (info.local !== undefined)
|
|
75
|
+
existing.local = info.local;
|
|
76
|
+
}
|
|
77
|
+
this.notify();
|
|
78
|
+
}
|
|
79
|
+
/** Durable discovery (`subagent/catalog`, workflow member events, registry
|
|
80
|
+
* back-fill): register a child WITHOUT disturbing an already-tracked run.
|
|
81
|
+
* `live` marks a child the agents registry currently holds, which keeps the
|
|
82
|
+
* row running; an idle historical child shows as `unknown` (the parent log
|
|
83
|
+
* alone cannot prove how its last epoch ended). */
|
|
84
|
+
onDiscovered(agentId, info = {}) {
|
|
85
|
+
if (this.states.has(agentId))
|
|
86
|
+
return;
|
|
87
|
+
this.states.set(agentId, {
|
|
25
88
|
agentId,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
provider,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
startedAt: info.startedAt ?? Date.now(),
|
|
33
|
-
local: info.local,
|
|
34
|
-
parentSessionId: info.parentSessionId,
|
|
35
|
-
sessionId: info.sessionId,
|
|
89
|
+
description: info.label ?? `${info.provider ?? 'subagent'} task`,
|
|
90
|
+
provider: info.provider ?? 'subagent',
|
|
91
|
+
model: info.model ?? info.provider,
|
|
92
|
+
status: info.live ? 'running' : 'unknown',
|
|
93
|
+
startedAt: info.childCreatedAt ?? Date.now(),
|
|
94
|
+
sessionId: agentId,
|
|
36
95
|
output: [],
|
|
37
96
|
outputEvents: [],
|
|
38
97
|
toolCalls: [],
|
|
39
|
-
};
|
|
40
|
-
if (existing) {
|
|
41
|
-
Object.assign(existing, info, { provider, model: model ?? existing.model, status: existing.status === 'completed' ? existing.status : 'running' });
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.states.set(agentId, state);
|
|
45
|
-
}
|
|
98
|
+
});
|
|
46
99
|
this.notify();
|
|
47
100
|
}
|
|
48
101
|
linkSession(agentId, session) {
|
|
@@ -53,6 +106,7 @@ export class SubagentActivityStore {
|
|
|
53
106
|
state.sessionId = session;
|
|
54
107
|
}
|
|
55
108
|
getSubagentIdBySession(session) { return this.sessionToAgent.get(session); }
|
|
109
|
+
has(agentId) { return this.states.has(agentId); }
|
|
56
110
|
appendOutput(agentId, text, kind = 'text') {
|
|
57
111
|
const state = this.states.get(agentId);
|
|
58
112
|
if (!state || !text)
|
|
@@ -208,15 +262,15 @@ export class SubagentActivityStore {
|
|
|
208
262
|
const state = this.states.get(agentId);
|
|
209
263
|
const tool = callId !== undefined ? state?.toolCalls.find(entry => entry.id === callId) : undefined;
|
|
210
264
|
if (tool) {
|
|
211
|
-
|
|
265
|
+
const payload = toolResultPayload(data.message);
|
|
266
|
+
tool.status = data.error !== undefined || payload.isError ? 'failed' : 'completed';
|
|
212
267
|
tool.endedAt = Date.now();
|
|
213
268
|
if (data.error !== undefined)
|
|
214
269
|
tool.error = String(data.error);
|
|
270
|
+
else if (payload.isError)
|
|
271
|
+
tool.error = this.previewOf(payload.content);
|
|
215
272
|
else {
|
|
216
|
-
|
|
217
|
-
tool.resultPreview = block !== undefined && block.type === 'tool-result'
|
|
218
|
-
? this.previewOf(block.content)
|
|
219
|
-
: undefined;
|
|
273
|
+
tool.resultPreview = this.previewOf(payload.content);
|
|
220
274
|
}
|
|
221
275
|
this.notify();
|
|
222
276
|
}
|
|
@@ -266,18 +320,27 @@ export class SubagentActivityStore {
|
|
|
266
320
|
state.tokens = { ...state.tokens, input, output, total: usage.total ?? ((input ?? 0) + (output ?? 0) || undefined) };
|
|
267
321
|
this.notify();
|
|
268
322
|
}
|
|
269
|
-
onCompleted(agentId, summary, stopReason = 'completed') { this.finish(agentId, 'completed', stopReason, summary); }
|
|
270
|
-
onFailed(agentId, error) { this.finish(agentId, 'failed', error, undefined); }
|
|
271
|
-
onCancelled(agentId, reason = 'cancelled', summary) { this.finish(agentId, 'cancelled', reason, summary); }
|
|
272
|
-
finish(agentId, status, reason, summary) {
|
|
323
|
+
onCompleted(agentId, summary, stopReason = 'completed', endedAt) { this.finish(agentId, 'completed', stopReason, summary, endedAt); }
|
|
324
|
+
onFailed(agentId, error, endedAt) { this.finish(agentId, 'failed', error, undefined, endedAt); }
|
|
325
|
+
onCancelled(agentId, reason = 'cancelled', summary, endedAt) { this.finish(agentId, 'cancelled', reason, summary, endedAt); }
|
|
326
|
+
finish(agentId, status, reason, summary, endedAt) {
|
|
273
327
|
const state = this.states.get(agentId);
|
|
274
|
-
|
|
328
|
+
// `unknown` rows (durable discovery: catalog children, workflow members
|
|
329
|
+
// folded from the log) accept their settlement edge the same as live
|
|
330
|
+
// rows — a terminal edge is authoritative regardless of how the row was
|
|
331
|
+
// born. Already-settled rows keep their first outcome.
|
|
332
|
+
if (!state || (state.status !== 'running' && state.status !== 'starting' && state.status !== 'unknown'))
|
|
275
333
|
return;
|
|
334
|
+
// A discovered row settling from `unknown` closes at the durable event's
|
|
335
|
+
// wall time (`agent-end` stamps it), falling back to startedAt when even
|
|
336
|
+
// that is missing: completedAt must stay a number so the row projection's
|
|
337
|
+
// durationMs never ticks on a settled row.
|
|
338
|
+
const discovered = state.status === 'unknown';
|
|
276
339
|
const stream = this.streams.get(agentId);
|
|
277
340
|
if (stream !== undefined)
|
|
278
341
|
this.restoreAttempt(agentId, stream);
|
|
279
342
|
state.status = status;
|
|
280
|
-
state.completedAt = Date.now();
|
|
343
|
+
state.completedAt = discovered ? endedAt ?? state.startedAt : Date.now();
|
|
281
344
|
state.endedAt = state.completedAt;
|
|
282
345
|
state.stopReason = reason;
|
|
283
346
|
if (summary)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TuiWorkspaceTarget, TuiWorkspaceCommand, TuiWorkspaceCommandResult } from '../adapter/ports/channel-workspace.js';
|
|
2
|
-
export type { TuiWorkspaceTarget, TuiWorkspaceKind, TuiWorkspaceCommand, TuiWorkspaceCommandResult, TuiWorkspaceChoice } from '../adapter/ports/channel-workspace.js';
|
|
1
|
+
import type { TuiWorkspaceTarget, TuiWorkspaceCommand, TuiWorkspaceCommandResult, TuiWorkspaceEntry } from '../adapter/ports/channel-workspace.js';
|
|
2
|
+
export type { TuiWorkspaceTarget, TuiWorkspaceKind, TuiWorkspaceCommand, TuiWorkspaceCommandResult, TuiWorkspaceChoice, TuiWorkspaceEntry } from '../adapter/ports/channel-workspace.js';
|
|
3
3
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
4
4
|
export interface TuiCommandShell {
|
|
5
5
|
resolve(request: {
|
|
@@ -45,9 +45,39 @@ export interface TuiWorkspaceHost {
|
|
|
45
45
|
describe(cwd: string): TuiWorkspaceTarget;
|
|
46
46
|
commandShell(cwd: string): Promise<TuiCommandShell | undefined>;
|
|
47
47
|
rename(cwd: string, title: string): Promise<TuiWorkspaceTarget>;
|
|
48
|
+
/** Drop a workspace registration (never the directory or its session logs). */
|
|
49
|
+
remove(cwd: string): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* The durable ledger's own listing, in its own order.
|
|
52
|
+
*
|
|
53
|
+
* Unlike `list`, this merges nothing and appends nothing: it is the set of
|
|
54
|
+
* registrations the sidebar manages, including entries with no sessions and
|
|
55
|
+
* entries whose directory has disappeared.
|
|
56
|
+
*/
|
|
57
|
+
listRegistry(): Promise<readonly TuiWorkspaceEntry[]>;
|
|
48
58
|
commands(): readonly Pick<TuiWorkspaceCommand, 'name' | 'aliases' | 'description'>[];
|
|
49
59
|
runCommand(name: string, input: string, cwd: string, signal?: AbortSignal): Promise<TuiWorkspaceCommandResult | undefined>;
|
|
50
60
|
}
|
|
61
|
+
/** Registry-backed list surface for the workspace home screen. */
|
|
62
|
+
type RegistryWorkspaceEntry = TuiWorkspaceEntry;
|
|
63
|
+
/**
|
|
64
|
+
* Enumerate the durable workspace registry, in its own display order.
|
|
65
|
+
*
|
|
66
|
+
* The sidebar needs the *registry* (every workspace the user ever registered,
|
|
67
|
+
* including ones with no sessions yet), not the session-derived grouping the
|
|
68
|
+
* `/resume` browser builds. Order, ids and titles come from the ledger;
|
|
69
|
+
* `sessionCount` is filled in by the caller (the adapter holds no session
|
|
70
|
+
* index), and `present` is derived here.
|
|
71
|
+
*/
|
|
72
|
+
export declare function listRegistryWorkspaces(runtime: TuiWorkspaceRuntime | undefined): Promise<readonly RegistryWorkspaceEntry[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Remove a workspace registration by path. Sessions and the directory survive:
|
|
75
|
+
* only the ledger entry goes away, so the sessions reappear as ungrouped.
|
|
76
|
+
*
|
|
77
|
+
* @returns True when a record was removed, false when no record owned `cwd`
|
|
78
|
+
* (or the ledger is unmounted).
|
|
79
|
+
*/
|
|
80
|
+
export declare function removeRegistryWorkspace(runtime: TuiWorkspaceRuntime | undefined, cwd: string, owner?: object): Promise<boolean>;
|
|
51
81
|
declare module '@deepseek-ai/cordis' {
|
|
52
82
|
interface Context {
|
|
53
83
|
tuiWorkspaces: TuiWorkspaceRuntime;
|
|
@@ -66,6 +96,19 @@ export declare class TuiWorkspaceRuntime extends Service {
|
|
|
66
96
|
describe(cwd: string): TuiWorkspaceTarget;
|
|
67
97
|
commandShell(cwd: string): Promise<TuiCommandShell | undefined>;
|
|
68
98
|
rename(cwd: string, title: string): Promise<TuiWorkspaceTarget>;
|
|
99
|
+
/**
|
|
100
|
+
* Drop a workspace registration; the directory and session logs survive.
|
|
101
|
+
*
|
|
102
|
+
* Plugin-facing, and therefore bound by the SAME rule as {@link rename}: a
|
|
103
|
+
* live calling activation is required, and the target must be a cwd one of
|
|
104
|
+
* that activation's own providers vouches for. Without both, a plugin that
|
|
105
|
+
* never owned the workspace 鈥?including one whose fiber was already disposed
|
|
106
|
+
* and whose caller context is a retained handle 鈥?could delete a host
|
|
107
|
+
* registration. Shadow policy alone is not caller authentication.
|
|
108
|
+
*/
|
|
109
|
+
remove(cwd: string): Promise<boolean>;
|
|
110
|
+
/** The durable ledger's own listing, in its own order. */
|
|
111
|
+
listRegistry(): Promise<readonly TuiWorkspaceEntry[]>;
|
|
69
112
|
commands(): readonly Pick<TuiWorkspaceCommand, 'name' | 'aliases' | 'description'>[];
|
|
70
113
|
runCommand(name: string, input: string, cwd: string, signal?: AbortSignal): Promise<TuiWorkspaceCommandResult | undefined>;
|
|
71
114
|
private notifyProviderWaiters;
|
|
@@ -74,7 +117,7 @@ export declare class TuiWorkspaceRuntime extends Service {
|
|
|
74
117
|
export declare function getHostWorkspaceRuntime(runtime: TuiWorkspaceRuntime | undefined): TuiWorkspaceHost | undefined;
|
|
75
118
|
/** Local-only fallback for direct embedders that call createChannel() without
|
|
76
119
|
* mounting the optional workspace registry/provider service. */
|
|
77
|
-
export declare function createLocalWorkspaceRuntime(): Pick<TuiWorkspaceRuntime, 'list' | 'resolve' | 'describe' | 'commandShell' | 'rename' | 'commands' | 'runCommand'>;
|
|
120
|
+
export declare function createLocalWorkspaceRuntime(): Pick<TuiWorkspaceRuntime, 'list' | 'resolve' | 'describe' | 'commandShell' | 'rename' | 'remove' | 'listRegistry' | 'commands' | 'runCommand'>;
|
|
78
121
|
export declare function localWorkspaceUri(path: string): string;
|
|
79
122
|
/** Resolve a native absolute path or the standard file URL form. */
|
|
80
123
|
export declare function parseLocalWorkspaceReference(reference: string): TuiWorkspaceTarget | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAoB,mBAAmB,EAAE,yBAAyB,EAAsB,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAoB,mBAAmB,EAAE,yBAAyB,EAAsB,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACxL,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAUxL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQtD,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,OAAO,EAAE;QACf,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,GAAG,OAAO,CAAA;IACX,GAAG,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;QAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;QACvB,M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