@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createSessionTreeReader } from './channel/session-tree.js';
|
|
2
2
|
import { createInputDelivery } from './channel/input-delivery.js';
|
|
3
3
|
import { createChannelBinding } from './channel/binding.js';
|
|
4
|
-
import { createChannelActivity } from './channel/activity.js';
|
|
5
4
|
import { createCommandCompletions } from './channel/command-completions.js';
|
|
6
5
|
import { createLocalActions } from './channel/local-actions.js';
|
|
7
6
|
import { createDetachedHandleFactory } from './channel/lifetime-resources.js';
|
|
@@ -32,6 +31,8 @@ import { createSkillCatalog } from './channel/skill-catalog.js';
|
|
|
32
31
|
import { createBackgroundCurrentAction } from './channel/background-action.js';
|
|
33
32
|
import { createSubagentProjection } from './channel/subagent-projection.js';
|
|
34
33
|
import { createChannelNotifications } from './channel/notifications.js';
|
|
34
|
+
import { createSelectionAttachments } from './channel/ide-selection.js';
|
|
35
|
+
import { IdeChannel, ideLockDir } from './ide-channel.js';
|
|
35
36
|
import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
|
|
36
37
|
import { readGrantStore } from '../adapter/standard/grants.js';
|
|
37
38
|
import { isCommandCompletionToken, LOCAL_COMMANDS } from '../commands.js';
|
|
@@ -43,6 +44,7 @@ import { createChannelEmitter } from './channel/emitter.js';
|
|
|
43
44
|
import { createInputActions } from './channel/input-actions.js';
|
|
44
45
|
import { createComposerImages } from './channel/composer-images.js';
|
|
45
46
|
import { snapshotLiveSessionEvents } from './compat/liveSession.js';
|
|
47
|
+
import { runForegroundShell } from './compat/shell.js';
|
|
46
48
|
import { createPermissionModeRoster } from './channel/mode-roster.js';
|
|
47
49
|
import { createPermissionModeActions } from './channel/mode-permission-actions.js';
|
|
48
50
|
import { mentionAttachments } from './channel/mentions.js';
|
|
@@ -233,8 +235,48 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
233
235
|
};
|
|
234
236
|
const bookkeeping = createContextBookkeeping(() => state, (text, options) => notify(text, options), percent => t('context-low-warning', { percent }), CONTEXT_WARNING_BUFFER_TOKENS);
|
|
235
237
|
const { warning: contextWarning, resetContextWarning, checkContextWarning, trackPending, untrackPending } = bookkeeping;
|
|
238
|
+
// IDE selection channel (AC-5): one IdeChannel per channel factory, started
|
|
239
|
+
// in the background against the session cwd — lock discovery needs it, env
|
|
240
|
+
// direct-connect does not but tolerates the extra hint. start() is fully
|
|
241
|
+
// non-throwing and self-degrading, so a missing IDE costs nothing and
|
|
242
|
+
// startup never waits on the loopback dial.
|
|
243
|
+
const ideChannel = new IdeChannel();
|
|
244
|
+
void ideChannel.start(process.env, ideLockDir(), options.cwd).catch(() => { });
|
|
245
|
+
let currentSelection;
|
|
246
|
+
ideChannel.onSelection(snapshot => {
|
|
247
|
+
// The channel already clears empty snapshots internally; mirror that here
|
|
248
|
+
// so consumption reads one consistent variable.
|
|
249
|
+
currentSelection = snapshot.isEmpty ? undefined : snapshot;
|
|
250
|
+
// Live prompt-footer badge: the projection must reach the screen BEFORE
|
|
251
|
+
// the user submits — emit() bumps `version` so the useSyncExternalStore
|
|
252
|
+
// tree re-renders with the new badge immediately.
|
|
253
|
+
state.selection = currentSelection;
|
|
254
|
+
state.emit();
|
|
255
|
+
});
|
|
256
|
+
/**
|
|
257
|
+
* Re-target the IDE selection link when the session's working directory
|
|
258
|
+
* changes (/resume adopts the persisted header cwd, /workspace switches to
|
|
259
|
+
* another directory, a background session is adopted): a selection made in
|
|
260
|
+
* the OLD workspace would otherwise stay projected — the badge shows it and
|
|
261
|
+
* the next submit attaches the wrong file — and the OLD link would keep
|
|
262
|
+
* pushing the old window's selections into the new workspace.
|
|
263
|
+
*
|
|
264
|
+
* rebind() drops the link and rediscovers against the new cwd (env-direct
|
|
265
|
+
* reconnects to the same spawned server; lock scan only ever returns
|
|
266
|
+
* candidates whose workspaceFolders cover the new cwd). Callers set
|
|
267
|
+
* state.cwd BEFORE this runs, so it reads the fresh value (maintainer
|
|
268
|
+
* review round 3: this used to only clear the cached selection and keep
|
|
269
|
+
* the stale connection alive).
|
|
270
|
+
*/
|
|
271
|
+
const resetIdeSelection = () => {
|
|
272
|
+
currentSelection = undefined;
|
|
273
|
+
state.selection = undefined;
|
|
274
|
+
state.emit();
|
|
275
|
+
void ideChannel.rebind(state.cwd).catch(() => { });
|
|
276
|
+
};
|
|
277
|
+
const selectionAttachments = createSelectionAttachments();
|
|
236
278
|
const composer = createComposerImages(ctx, owner, { generation: () => state.agentBindingGeneration });
|
|
237
|
-
const inputDelivery = createInputDelivery(ctx, owner, binding, () => state, (...args) => notify(...args), trackPending, untrackPending, composer);
|
|
279
|
+
const inputDelivery = createInputDelivery(ctx, owner, binding, () => state, (...args) => notify(...args), trackPending, untrackPending, composer, () => currentSelection, (messageId, info) => selectionAttachments.remember(messageId, info));
|
|
238
280
|
const { dispatchUserText, deliverUserText, retireAttachment, withDecisionPending, clearStagedImages } = inputDelivery;
|
|
239
281
|
/**
|
|
240
282
|
* The `tui/session-switch` decision event (pi's `session_before_switch`),
|
|
@@ -363,6 +405,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
363
405
|
},
|
|
364
406
|
...createInitialChannelView(options, {
|
|
365
407
|
agentId: binding.agent.id,
|
|
408
|
+
sessionId: binding.agent.session.id,
|
|
366
409
|
mode: sessionModes[0],
|
|
367
410
|
cwdDescription: workspaceService.describe(options.cwd).description ?? options.cwd,
|
|
368
411
|
}),
|
|
@@ -420,12 +463,20 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
420
463
|
},
|
|
421
464
|
releaseContributions() {
|
|
422
465
|
// Owner cleanup is exhaustive, but it can report an external cleanup
|
|
423
|
-
// failure. The
|
|
466
|
+
// failure. The emitter and the IDE loopback link are both OUTSIDE the
|
|
467
|
+
// owner and must still stop no matter which earlier step throws — a
|
|
468
|
+
// bare trailing ideChannel.stop() used to be skipped whenever
|
|
469
|
+
// owner.dispose() threw, leaking the socket (maintainer review round 3).
|
|
424
470
|
try {
|
|
425
471
|
owner.dispose();
|
|
426
472
|
}
|
|
427
473
|
finally {
|
|
428
|
-
|
|
474
|
+
try {
|
|
475
|
+
emitter.dispose();
|
|
476
|
+
}
|
|
477
|
+
finally {
|
|
478
|
+
ideChannel.stop();
|
|
479
|
+
}
|
|
429
480
|
}
|
|
430
481
|
},
|
|
431
482
|
traceEvents() {
|
|
@@ -555,6 +606,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
555
606
|
checkContextWarning, notify: (...args) => notify(...args),
|
|
556
607
|
tools: ctx.get('tools'), renderer: rendererRuntime,
|
|
557
608
|
attachments: () => ctx.get('attachments'),
|
|
609
|
+
selectionAttached: messageId => selectionAttachments.take(messageId),
|
|
558
610
|
});
|
|
559
611
|
localActions = createLocalActions({
|
|
560
612
|
ctx,
|
|
@@ -570,8 +622,15 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
570
622
|
shell: bash,
|
|
571
623
|
notify,
|
|
572
624
|
});
|
|
573
|
-
// Replay the durable transcript first, then follow live events.
|
|
574
|
-
|
|
625
|
+
// Replay the durable transcript first, then follow live events. The same
|
|
626
|
+
// seed re-populates the subagent dashboard's durable discovery facts
|
|
627
|
+
// (`subagent/catalog`, workflow member edges) so a resumed session keeps
|
|
628
|
+
// its dispatched-children history (issue #966).
|
|
629
|
+
const replaySessionSeed = (events) => {
|
|
630
|
+
projector.replayEvents(events);
|
|
631
|
+
subagentProjection.bootstrapFromLog(events);
|
|
632
|
+
};
|
|
633
|
+
replaySessionSeed(snapshotLiveSessionEvents(binding.agent.session));
|
|
575
634
|
projector.settleStreaming();
|
|
576
635
|
// Attached to an idle agent: any replayed turn/start belongs to a previous
|
|
577
636
|
// session run, so the spinner must not come up on boot.
|
|
@@ -579,8 +638,6 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
579
638
|
state.cancelPending = false;
|
|
580
639
|
state.status = binding.agent.status;
|
|
581
640
|
state.emit();
|
|
582
|
-
// The activity sidecar owns its tracker and interval; it never projects transcript facts.
|
|
583
|
-
const activity = createChannelActivity(ctx, state, owner, options.activity !== false);
|
|
584
641
|
modelActions = createModelActions(ctx, state, {
|
|
585
642
|
owner,
|
|
586
643
|
binding,
|
|
@@ -588,6 +645,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
588
645
|
initialEffort: options.effort,
|
|
589
646
|
agent: () => binding.agent,
|
|
590
647
|
notify,
|
|
648
|
+
checkContextWarning,
|
|
591
649
|
});
|
|
592
650
|
commandCompletions = createCommandCompletions({
|
|
593
651
|
state: () => state,
|
|
@@ -605,7 +663,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
605
663
|
resetProjector: () => projector.reset(),
|
|
606
664
|
resetSubagents: subagentProjection.reset,
|
|
607
665
|
resetJobs: resetJobProjection,
|
|
608
|
-
replay:
|
|
666
|
+
replay: replaySessionSeed,
|
|
609
667
|
settleReplay: projector.settleStreaming,
|
|
610
668
|
bindAgent: () => bindAgent(),
|
|
611
669
|
refreshCommands: refreshCommandList,
|
|
@@ -613,7 +671,6 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
613
671
|
refreshSkillCommands,
|
|
614
672
|
clearStagedImages,
|
|
615
673
|
dropModelCompletion: () => modelActions.dropModelNodeCache(),
|
|
616
|
-
onModelSwitch: model => activity.onModelSwitch(model),
|
|
617
674
|
notify,
|
|
618
675
|
});
|
|
619
676
|
workspaceActions = createWorkspaceActions(state, {
|
|
@@ -642,7 +699,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
642
699
|
owner,
|
|
643
700
|
binding,
|
|
644
701
|
state,
|
|
645
|
-
|
|
702
|
+
seedActivity: options.seedActivity,
|
|
646
703
|
inputConvergence,
|
|
647
704
|
selection,
|
|
648
705
|
modelActions,
|
|
@@ -660,7 +717,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
660
717
|
resetProjector: () => projector.reset(),
|
|
661
718
|
resetSubagents: subagentProjection.reset,
|
|
662
719
|
resetJobs: resetJobProjection,
|
|
663
|
-
replay:
|
|
720
|
+
replay: replaySessionSeed,
|
|
664
721
|
settleReplay: projector.settleStreaming,
|
|
665
722
|
bindAgent,
|
|
666
723
|
refreshCommands: refreshCommandList,
|
|
@@ -677,7 +734,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
677
734
|
resetProjector: () => projector.reset(),
|
|
678
735
|
resetSubagents: subagentProjection.reset,
|
|
679
736
|
resetJobs: resetJobProjection,
|
|
680
|
-
replay:
|
|
737
|
+
replay: replaySessionSeed,
|
|
681
738
|
settleReplay: projector.settleStreaming,
|
|
682
739
|
describeWorkspace: cwd => workspaceService.describe(cwd),
|
|
683
740
|
refreshGitBranch: () => refreshGitBranch(),
|
|
@@ -686,6 +743,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
686
743
|
refreshLoadedContext,
|
|
687
744
|
refreshSkillCommands,
|
|
688
745
|
clearStagedImages,
|
|
746
|
+
resetIdeSelection,
|
|
689
747
|
notifySessionSwitched,
|
|
690
748
|
notifyAgentView: agentView.notify,
|
|
691
749
|
});
|
|
@@ -698,12 +756,16 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
698
756
|
}, {
|
|
699
757
|
owner,
|
|
700
758
|
binding,
|
|
759
|
+
// `/resume` shares the live-adoption path with the session supervisor, so
|
|
760
|
+
// a target already running in this process is re-attached rather than
|
|
761
|
+
// resumed twice from its log (which would mount one log in two places).
|
|
762
|
+
adoptLive: target => adoptLiveAgent(target),
|
|
701
763
|
backgroundHandles,
|
|
702
764
|
rowIds,
|
|
703
765
|
resetProjector: () => projector.reset(),
|
|
704
766
|
resetSubagents: subagentProjection.reset,
|
|
705
767
|
resetJobs: resetJobProjection,
|
|
706
|
-
replay:
|
|
768
|
+
replay: replaySessionSeed,
|
|
707
769
|
settleReplay: projector.settleStreaming,
|
|
708
770
|
describeWorkspace: cwd => workspaceService.describe(cwd),
|
|
709
771
|
refreshGitBranch: () => refreshGitBranch(),
|
|
@@ -712,6 +774,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
712
774
|
refreshLoadedContext,
|
|
713
775
|
refreshSkillCommands,
|
|
714
776
|
clearStagedImages,
|
|
777
|
+
resetIdeSelection,
|
|
715
778
|
settleCompaction: () => settleManualCompaction(),
|
|
716
779
|
sessionSwitchVetoed,
|
|
717
780
|
notify,
|
|
@@ -749,7 +812,6 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
749
812
|
agent: () => binding.agent,
|
|
750
813
|
withDecisionPending,
|
|
751
814
|
notify,
|
|
752
|
-
onComplete: () => activity.onCompact(),
|
|
753
815
|
});
|
|
754
816
|
settleManualCompaction = manualCompaction.settle;
|
|
755
817
|
compactManualSession = manualCompaction.compact;
|
|
@@ -792,6 +854,9 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
792
854
|
resumeTo: resumeToAction,
|
|
793
855
|
newSession: newSessionAction,
|
|
794
856
|
listWorkspaces: workspaceActions.listWorkspaces,
|
|
857
|
+
listWorkspaceRegistry: workspaceActions.listWorkspaceRegistry,
|
|
858
|
+
removeWorkspace: workspaceActions.removeWorkspace,
|
|
859
|
+
renameWorkspaceAt: workspaceActions.renameWorkspaceAt,
|
|
795
860
|
resolveWorkspace: workspaceActions.resolveWorkspace,
|
|
796
861
|
switchWorkspace: workspaceActions.switchWorkspace,
|
|
797
862
|
renameWorkspace: workspaceActions.renameWorkspace,
|
|
@@ -901,12 +966,11 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
901
966
|
// flight refreshes the branch for the NEW cwd, so a late reply from the
|
|
902
967
|
// old workspace must be dropped (statusline staleness, issue #96 review).
|
|
903
968
|
const requestedCwd = state.cwd;
|
|
904
|
-
void bash
|
|
905
|
-
.run(bash.resolve({
|
|
969
|
+
void runForegroundShell(bash, {
|
|
906
970
|
command: 'git branch --show-current',
|
|
907
971
|
workdir: requestedCwd,
|
|
908
972
|
timeoutMs: 3000,
|
|
909
|
-
})
|
|
973
|
+
})
|
|
910
974
|
.then((result) => {
|
|
911
975
|
if (!owner.current() || state.cwd !== requestedCwd)
|
|
912
976
|
return;
|
|
@@ -918,8 +982,6 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
|
|
|
918
982
|
// only show a branch for sessions this install actually used — which
|
|
919
983
|
// is exactly what the column claims.
|
|
920
984
|
noteBranch(binding.agent.session.id, branch);
|
|
921
|
-
// Feed the working line so git tools can show ` · git <branch>`.
|
|
922
|
-
activity.onGitBranch(branch);
|
|
923
985
|
state.emit();
|
|
924
986
|
}
|
|
925
987
|
})
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
* @module @deepseek-harness-tui/dsh-tui/compat
|
|
26
26
|
*/
|
|
27
27
|
export { appendInterruptedTurnEnd, liveSessionCreateOptions, liveSessionListingFields, liveSessionOffset, sliceLiveSessionSeed, snapshotLiveSessionEvents, } from './liveSession.js';
|
|
28
|
-
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readPhysicalHeaderSeedLength, readPhysicalHeaderSeedLengthForSession, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, type SessionLogRead, sessionsRoots, } from './sessionLog.js';
|
|
28
|
+
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readPhysicalHeaderSeedLength, readPhysicalHeaderSeedLengthForSession, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, type SessionLogRead, sessionsRoots, userTitleData, } from './sessionLog.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,sCAAsC,EACtC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,cAAc,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,kBAAkB,EAClB,0BAA0B,EAC1B,4BAA4B,EAC5B,sCAAsC,EACtC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,cAAc,EACnB,aAAa,EACb,aAAa,GACd,MAAM,iBAAiB,CAAA"}
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
* @module @deepseek-harness-tui/dsh-tui/compat
|
|
26
26
|
*/
|
|
27
27
|
export { appendInterruptedTurnEnd, liveSessionCreateOptions, liveSessionListingFields, liveSessionOffset, sliceLiveSessionSeed, snapshotLiveSessionEvents, } from './liveSession.js';
|
|
28
|
-
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readPhysicalHeaderSeedLength, readPhysicalHeaderSeedLengthForSession, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, sessionsRoots, } from './sessionLog.js';
|
|
28
|
+
export { appendSessionTitle, defaultMaxScanned, deleteSessionLog, ensureLegacySessionEventTypes, findSessionLogFile, LEGACY_SESSION_EVENT_TYPES, readPhysicalHeaderSeedLength, readPhysicalHeaderSeedLengthForSession, readSessionEventsFromFile, readSessionEventsFromLog, readSessionTitleFromLog, sessionsRoots, userTitleData, } from './sessionLog.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContentBlock } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
/** 0.1.7 puts tool output on the message; older logs wrap it in one block. */
|
|
3
|
+
export declare function toolResultPayload(message: {
|
|
4
|
+
readonly content?: readonly ContentBlock[];
|
|
5
|
+
readonly isError?: boolean;
|
|
6
|
+
} | undefined): {
|
|
7
|
+
content: readonly ContentBlock[];
|
|
8
|
+
isError: boolean;
|
|
9
|
+
};
|
|
10
|
+
/** Preserve old checkpoints while recognizing the V4 producer-owned source. */
|
|
11
|
+
export declare function isCompactionCheckpointSource(source: {
|
|
12
|
+
kind: string;
|
|
13
|
+
plugin?: string;
|
|
14
|
+
}): boolean;
|
|
15
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG,SAAS,GAAG;IAAE,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAarE;AAED,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAE/F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 0.1.7 puts tool output on the message; older logs wrap it in one block. */
|
|
2
|
+
export function toolResultPayload(message) {
|
|
3
|
+
const first = message?.content?.[0];
|
|
4
|
+
if (first?.type === 'tool-result') {
|
|
5
|
+
return {
|
|
6
|
+
content: Array.isArray(first.content) ? first.content : [],
|
|
7
|
+
isError: first.isError === true,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
return { content: message?.content ?? [], isError: message?.isError === true };
|
|
11
|
+
}
|
|
12
|
+
/** Preserve old checkpoints while recognizing the V4 producer-owned source. */
|
|
13
|
+
export function isCompactionCheckpointSource(source) {
|
|
14
|
+
return source.kind === 'compact-checkpoint' || (source.kind === 'plugin' && source.plugin === 'compact');
|
|
15
|
+
}
|
|
@@ -256,6 +256,24 @@ export declare function readSessionTitleFromLog(sessionId: string): {
|
|
|
256
256
|
title?: string;
|
|
257
257
|
hasUserMessage: boolean;
|
|
258
258
|
} | undefined;
|
|
259
|
+
/**
|
|
260
|
+
* Payload of an explicit user rename — the shape upstream
|
|
261
|
+
* `SessionTitleService.rename()` writes. The strict reader requires BOTH
|
|
262
|
+
* fields on every `session/title` event: `messageSeqs` must be an array, and
|
|
263
|
+
* empty exactly when the user supplied the title (`source.kind === 'user'`).
|
|
264
|
+
* A `{ title }`-only payload makes the whole log unopenable
|
|
265
|
+
* (`title messageSeqs requires an array`, issue #1006). The live `/rename`
|
|
266
|
+
* and this module's offline append share this builder so the two writers
|
|
267
|
+
* cannot drift apart again.
|
|
268
|
+
* @param title - New display title (already trimmed by the caller).
|
|
269
|
+
*/
|
|
270
|
+
export declare function userTitleData(title: string): {
|
|
271
|
+
title: string;
|
|
272
|
+
messageSeqs: number[];
|
|
273
|
+
source: {
|
|
274
|
+
kind: 'user';
|
|
275
|
+
};
|
|
276
|
+
};
|
|
259
277
|
/**
|
|
260
278
|
* Append a `session/title` event to a persisted session's log — the
|
|
261
279
|
* `/resume` picker rename for a NON-LIVE session (the live one goes through
|
|
@@ -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;AAqOD,sDAAsD;AACtD,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;CAC7B;AA+SD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAa3E;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,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AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAwB7E"}
|
|
@@ -1074,6 +1074,20 @@ function firstTextOfContent(content) {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
return undefined;
|
|
1076
1076
|
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Payload of an explicit user rename — the shape upstream
|
|
1079
|
+
* `SessionTitleService.rename()` writes. The strict reader requires BOTH
|
|
1080
|
+
* fields on every `session/title` event: `messageSeqs` must be an array, and
|
|
1081
|
+
* empty exactly when the user supplied the title (`source.kind === 'user'`).
|
|
1082
|
+
* A `{ title }`-only payload makes the whole log unopenable
|
|
1083
|
+
* (`title messageSeqs requires an array`, issue #1006). The live `/rename`
|
|
1084
|
+
* and this module's offline append share this builder so the two writers
|
|
1085
|
+
* cannot drift apart again.
|
|
1086
|
+
* @param title - New display title (already trimmed by the caller).
|
|
1087
|
+
*/
|
|
1088
|
+
export function userTitleData(title) {
|
|
1089
|
+
return { title, messageSeqs: [], source: { kind: 'user' } };
|
|
1090
|
+
}
|
|
1077
1091
|
/**
|
|
1078
1092
|
* Append a `session/title` event to a persisted session's log — the
|
|
1079
1093
|
* `/resume` picker rename for a NON-LIVE session (the live one goes through
|
|
@@ -1106,13 +1120,14 @@ export function appendSessionTitle(sessionId, title) {
|
|
|
1106
1120
|
if (typeof seq === 'number' && seq > maxSeq)
|
|
1107
1121
|
maxSeq = seq;
|
|
1108
1122
|
}
|
|
1109
|
-
// Same
|
|
1110
|
-
//
|
|
1123
|
+
// Same payload a manual /rename appends ({@link userTitleData}); the
|
|
1124
|
+
// strict reader validates the SHAPE of every event, not just the
|
|
1125
|
+
// envelope keys the seed validator asks for.
|
|
1111
1126
|
const event = {
|
|
1112
1127
|
type: 'session/title',
|
|
1113
1128
|
seq: maxSeq + 1,
|
|
1114
1129
|
time: Date.now(),
|
|
1115
|
-
data:
|
|
1130
|
+
data: userTitleData(title),
|
|
1116
1131
|
};
|
|
1117
1132
|
const frame = zstdCompressSync(Buffer.from(JSON.stringify(event) + '\n', 'utf8'));
|
|
1118
1133
|
appendFileSync(file, frame);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
import type Schema from '@deepseek-ai/schemastery';
|
|
3
|
+
/** New Cordis configs wrap editable fields; old hosts pass plain values. */
|
|
4
|
+
export type RuntimeConfig<T> = {
|
|
5
|
+
[K in keyof T]: T[K] | {
|
|
6
|
+
get(): T[K];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
/** Declare only UI preferences as live fields, never the agent/session route. */
|
|
10
|
+
export declare function editableConfig<T>(schema: Schema<T>, keys: readonly (keyof T)[]): Schema<T, RuntimeConfig<T>>;
|
|
11
|
+
/** Settings forms use the Config owner's Loader ID, not the plugin name. */
|
|
12
|
+
export declare function resolveSettingsNamespace(ctx: Context, schema: Pick<Schema, 'dict'>): string;
|
|
13
|
+
/** Snapshot at an operation boundary; retain the host refs for later updates. */
|
|
14
|
+
export declare function configValues<T extends object>(config: RuntimeConfig<T>): T;
|
|
15
|
+
interface SettingsScope<T> {
|
|
16
|
+
get(): T;
|
|
17
|
+
watch(callback: (next: T) => void): () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 0.1.7 owns settings in Config; older hosts still own registered scopes.
|
|
21
|
+
* Pass the Config owner's context, and dispose watch with the consumer's lifecycle.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createSettingsScope<T>(ctx: Context, service: unknown, ns: string, schema: Schema<T>, current: () => T): SettingsScope<T> & {
|
|
24
|
+
legacy: boolean;
|
|
25
|
+
};
|
|
26
|
+
/** New settings forms expose values through describe(), not get(). */
|
|
27
|
+
export declare function settingsValue(settings: {
|
|
28
|
+
get?(ns: string): unknown;
|
|
29
|
+
describe(): readonly {
|
|
30
|
+
ns: string;
|
|
31
|
+
value?: unknown;
|
|
32
|
+
}[];
|
|
33
|
+
}, ns: string): unknown;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAA;AAElD,4EAA4E;AAC5E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAAE,CAAA;AAEzE,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAM5G;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAU3F;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAO1E;AAED,UAAU,aAAa,CAAC,CAAC;IACvB,GAAG,IAAI,CAAC,CAAA;IACR,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;CAC/C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EACjB,OAAO,EAAE,MAAM,CAAC,GACf,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAgBxC;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,QAAQ,EAAE;IACtC,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;IACzB,QAAQ,IAAI,SAAS;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CACvD,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAEtB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Declare only UI preferences as live fields, never the agent/session route. */
|
|
2
|
+
export function editableConfig(schema, keys) {
|
|
3
|
+
for (const key of keys) {
|
|
4
|
+
const field = schema.dict?.[String(key)];
|
|
5
|
+
if (field !== undefined && typeof field.volatile === 'function')
|
|
6
|
+
schema.dict[String(key)] = field.volatile();
|
|
7
|
+
}
|
|
8
|
+
return schema;
|
|
9
|
+
}
|
|
10
|
+
/** Settings forms use the Config owner's Loader ID, not the plugin name. */
|
|
11
|
+
export function resolveSettingsNamespace(ctx, schema) {
|
|
12
|
+
const settings = ctx.get('settings');
|
|
13
|
+
if (!settings || typeof settings.register === 'function')
|
|
14
|
+
return 'dsh-tui';
|
|
15
|
+
if (!Object.values(schema.dict ?? {}).some(field => field.meta.volatile === true)) {
|
|
16
|
+
throw new Error('dsh-tui: profile-backed settings require @deepseek-ai/schemastery >= 3.18.3 with volatile Config support. Update DSH and reinstall the current profile dependencies before starting the TUI.');
|
|
17
|
+
}
|
|
18
|
+
const owner = ctx.fiber;
|
|
19
|
+
const ns = owner.entry?.options.id;
|
|
20
|
+
if (!ns)
|
|
21
|
+
throw new Error('dsh-tui: profile-backed settings require a Loader entry for the Config owner.');
|
|
22
|
+
return ns;
|
|
23
|
+
}
|
|
24
|
+
/** Snapshot at an operation boundary; retain the host refs for later updates. */
|
|
25
|
+
export function configValues(config) {
|
|
26
|
+
return Object.fromEntries(Object.entries(config).map(([key, value]) => [
|
|
27
|
+
key,
|
|
28
|
+
value !== null && typeof value === 'object' && 'get' in value && typeof value.get === 'function'
|
|
29
|
+
? value.get()
|
|
30
|
+
: value,
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 0.1.7 owns settings in Config; older hosts still own registered scopes.
|
|
35
|
+
* Pass the Config owner's context, and dispose watch with the consumer's lifecycle.
|
|
36
|
+
*/
|
|
37
|
+
export function createSettingsScope(ctx, service, ns, schema, current) {
|
|
38
|
+
const settings = service;
|
|
39
|
+
if (typeof settings.register === 'function') {
|
|
40
|
+
const scope = settings.register(ns, schema);
|
|
41
|
+
return { legacy: true, get: () => scope.get(), watch: callback => scope.watch(callback) };
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
legacy: false,
|
|
45
|
+
get: current,
|
|
46
|
+
watch(callback) {
|
|
47
|
+
// The event is absent from the old framework's type map. Cordis owns
|
|
48
|
+
// listener disposal and emits it only to the updated plugin fiber.
|
|
49
|
+
const events = ctx;
|
|
50
|
+
return events.on('loader/volatile-update', () => callback(current()));
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** New settings forms expose values through describe(), not get(). */
|
|
55
|
+
export function settingsValue(settings, ns) {
|
|
56
|
+
return typeof settings.get === 'function' ? settings.get(ns) : settings.describe().find(row => row.ns === ns)?.value;
|
|
57
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Foreground shell seam across the legacy run() and 0.1.7 execute() APIs. */
|
|
2
|
+
export interface ShellRequest {
|
|
3
|
+
command: string;
|
|
4
|
+
workdir?: string;
|
|
5
|
+
timeoutMs: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ShellResult {
|
|
8
|
+
stdout: {
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
stderr: {
|
|
12
|
+
text: string;
|
|
13
|
+
};
|
|
14
|
+
timedOut: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ForegroundShell {
|
|
17
|
+
resolve(request: ShellRequest): unknown;
|
|
18
|
+
run?(spec: unknown): Promise<ShellResult>;
|
|
19
|
+
execute?(spec: unknown): Promise<{
|
|
20
|
+
result(): Promise<ShellResult>;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
/** Resolve through the host so workspace, timeout and sandbox policy survive. */
|
|
24
|
+
export declare function runForegroundShell(shell: ForegroundShell, request: ShellRequest): Promise<ShellResult>;
|
|
25
|
+
//# sourceMappingURL=shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/compat/shell.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACxB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAA;IACvC,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IACzC,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;QAAE,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC,CAAA;CACrE;AAED,iFAAiF;AACjF,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAQ5G"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Resolve through the host so workspace, timeout and sandbox policy survive. */
|
|
2
|
+
export async function runForegroundShell(shell, request) {
|
|
3
|
+
const spec = shell.resolve(request);
|
|
4
|
+
if (typeof shell.execute === 'function') {
|
|
5
|
+
const execution = await shell.execute(spec);
|
|
6
|
+
return execution.result();
|
|
7
|
+
}
|
|
8
|
+
if (typeof shell.run === 'function')
|
|
9
|
+
return shell.run(spec);
|
|
10
|
+
throw new Error('dsh-tui: shell provides neither execute() nor run()');
|
|
11
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/** Primary validated upstream line (newest). */
|
|
2
|
-
export declare const UPSTREAM_VALIDATED_VERSION = "0.1.
|
|
2
|
+
export declare const UPSTREAM_VALIDATED_VERSION = "0.1.7-rc.2";
|
|
3
3
|
/**
|
|
4
4
|
* Explicitly supported upstream prerelease lines, oldest first.
|
|
5
5
|
*
|
|
6
|
-
* 0.1.
|
|
6
|
+
* 0.1.7-rc.2 = primary continuous-CI line; 0.1.7-rc.1 = previous 0.1.7
|
|
7
|
+
* build (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
7
8
|
* compatibility lines (source-checked when the primary line moves);
|
|
8
9
|
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
9
10
|
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
@@ -15,14 +16,14 @@ export declare const UPSTREAM_VALIDATED_VERSION = "0.1.5-rc.1";
|
|
|
15
16
|
* The peer range in package.json is deliberately wider than this list: an
|
|
16
17
|
* install on an older or newer line is allowed but reports drift at boot.
|
|
17
18
|
*/
|
|
18
|
-
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"];
|
|
19
|
+
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"];
|
|
19
20
|
/**
|
|
20
21
|
* Framework packages version on their own lines; the contract validates
|
|
21
22
|
* their MAJOR (breaking surface), not the harness prerelease number.
|
|
22
23
|
*/
|
|
23
24
|
export declare const UPSTREAM_FRAMEWORK_MAJORS: Record<string, number>;
|
|
24
25
|
/** Official packages the adapter consumes at runtime or as types. */
|
|
25
|
-
export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-
|
|
26
|
+
export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-preset-registry", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-ptc-runtime-node", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-cordis-host-runner", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-persona", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-storage", "@deepseek-ai/dsh-storage-domain", "@deepseek-ai/dsh-storage-json", "@deepseek-ai/dsh-workspace", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-terminal", "@deepseek-ai/dsh-terminal-bash", "@deepseek-ai/dsh-tool-ask-user", "@deepseek-ai/dsh-tool-bash-persistent", "@deepseek-ai/dsh-tool-cordis", "@deepseek-ai/dsh-tool-subagent", "@deepseek-ai/dsh-user-approval", "@deepseek-ai/dsh-user-questions"];
|
|
26
27
|
export interface UpstreamDriftEntry {
|
|
27
28
|
package: string;
|
|
28
29
|
installed: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAkBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAkBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,2BAA2B,+OAgB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,o8BA+B5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAUD,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,w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