@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
package/lib/types/update.d.ts
CHANGED
|
@@ -313,6 +313,67 @@ export interface ReleaseAgeExcludeOutcome {
|
|
|
313
313
|
* stays the visible fallback.
|
|
314
314
|
*/
|
|
315
315
|
export declare function ensureProfileReleaseAgeExclude(profile: string, version: string): ReleaseAgeExcludeOutcome | undefined;
|
|
316
|
+
/**
|
|
317
|
+
* The @img suffix of the RUNNING platform: musl linux maps to linuxmusl, and
|
|
318
|
+
* FreeBSD — which has no native @img build — maps to the only form it can load.
|
|
319
|
+
* Without that mapping a FreeBSD update would ignore `@img/sharp-freebsd-wasm32`
|
|
320
|
+
* and leave sharp with nothing to load.
|
|
321
|
+
*/
|
|
322
|
+
export declare function sharpCurrentSuffix(platform: string, cpu: string, libc: string): string;
|
|
323
|
+
/**
|
|
324
|
+
* Deliberate omission: sharp's registry matrix (0.35.3) also carries the
|
|
325
|
+
* platform-agnostic `wasm32` fallback (~9MB unpacked) plus
|
|
326
|
+
* `webcontainers-wasm32`. They carry no os constraint, so they resolve on
|
|
327
|
+
* every platform — including architectures with no native @img build at all
|
|
328
|
+
* (loong64 etc.), where wasm is the only working form. They are therefore
|
|
329
|
+
* NOT ignored: updates keep downloading them, trading ~9MB for not breaking
|
|
330
|
+
* sharp on fallback-only architectures.
|
|
331
|
+
*/
|
|
332
|
+
/** Patterns for every @img platform package EXCEPT the running one. */
|
|
333
|
+
export declare function ignoredSharpOptionalPatterns(platform: string, cpu: string, libc: string): string[];
|
|
334
|
+
/**
|
|
335
|
+
* Libc verdict for an explicit platform, so the whole matrix is testable on any
|
|
336
|
+
* host. Node's report wins when present: a stray musl loader (Debian's musl
|
|
337
|
+
* package, cross-compile toolchains) on a glibc system must NOT flip the
|
|
338
|
+
* verdict, or the current platform's own packages would land in the ignore
|
|
339
|
+
* list. The loader-path probe only answers when the report is unavailable (the
|
|
340
|
+
* same fallback sharp's detect-libc uses); a non-Linux platform is always glibc.
|
|
341
|
+
*/
|
|
342
|
+
export declare function detectLibc(platform: string, report: {
|
|
343
|
+
header?: {
|
|
344
|
+
glibcVersionRuntime?: string;
|
|
345
|
+
};
|
|
346
|
+
} | undefined, muslLoaderPresent: boolean): 'glibc' | 'musl';
|
|
347
|
+
/** What ensureProfileSharpPlatformFilter did to the profile workspace file. */
|
|
348
|
+
export interface SharpPlatformFilterOutcome {
|
|
349
|
+
/** The foreign-platform ignore patterns the file now carries. */
|
|
350
|
+
entries: string[];
|
|
351
|
+
/** True when the file was written (filter added or refreshed). */
|
|
352
|
+
changed: boolean;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Keep an `ignoredOptionalDependencies:` block in the profile's
|
|
356
|
+
* pnpm-workspace.yaml listing every non-current-platform @img package, so an
|
|
357
|
+
* update stops downloading the foreign-platform sharp natives. The list is
|
|
358
|
+
* recomputed on every run: it is a fact about the machine running the update,
|
|
359
|
+
* so a profile carried to another platform (WSL, a musl container, a new cpu)
|
|
360
|
+
* gets a fresh list instead of a stale one that would skip the packages that
|
|
361
|
+
* machine needs. Entries this module's own tables cover are rewritten (by
|
|
362
|
+
* package name, so quoted forms, trailing comments and blank lines inside the
|
|
363
|
+
* block all still refresh); every other entry — a user's `fsevents`, a name
|
|
364
|
+
* sharp adds later, a user's own `@img/sharp-wasm32` exemption — is preserved
|
|
365
|
+
* verbatim, same as in {@link ensureProfileAllowBuilds}. Best effort and
|
|
366
|
+
* idempotent: the file is written only when the resulting block actually
|
|
367
|
+
* differs, a missing `ignoredOptionalDependencies:` block is appended, and an
|
|
368
|
+
* absent profile directory resolves to undefined — the update still runs, only
|
|
369
|
+
* the download-size win is lost. A document this function cannot rewrite safely
|
|
370
|
+
* (a flow-style value, a duplicated key, which is already invalid YAML) is left
|
|
371
|
+
* untouched rather than half-rewritten. Residual caveat shared by any persisted
|
|
372
|
+
* machine fact: a second platform using the same profile without running an
|
|
373
|
+
* update keeps this platform's list, so its own binaries stay skipped until the
|
|
374
|
+
* next update there.
|
|
375
|
+
*/
|
|
376
|
+
export declare function ensureProfileSharpPlatformFilter(profile: string): SharpPlatformFilterOutcome | undefined;
|
|
316
377
|
/**
|
|
317
378
|
* The pnpm Windows tmp-rename race signature (issue #225): pnpm swaps a
|
|
318
379
|
* package directory via a `<name>_tmp_<pid>` staging dir, and a file lock or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAKlD,OAAO,EAAE,UAAU,EAAE,CAAA;AAgDrB;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAEnF;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAc3D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAMrD;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,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AsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAkJ3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC,CAiB1B;AAED;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0DhE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC5B;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6HpG"}
|
package/lib/types/update.js
CHANGED
|
@@ -1049,6 +1049,192 @@ function existsSafe(path) {
|
|
|
1049
1049
|
return false;
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
|
+
/**
|
|
1053
|
+
* sharp distributes its native binaries as platform-specific optional
|
|
1054
|
+
* dependencies (@img/sharp-<platform> wrappers plus @img/sharp-libvips-<platform>
|
|
1055
|
+
* runtimes). pnpm's lockfile records EVERY platform's entry by design, and
|
|
1056
|
+
* some pnpm update paths materialize all of them — maintainer-group report
|
|
1057
|
+
* 2026-09-11: a 0.10.0 → 0.10.1 update downloaded ~90MB of win32/darwin/
|
|
1058
|
+
* musl/riscv64/s390x/ppc64 binaries on a linux-x64 box. The fix keeps
|
|
1059
|
+
* `ignoredOptionalDependencies` patterns for every OTHER platform in the
|
|
1060
|
+
* profile: pnpm skips ignored optionals entirely (no download, no node_modules
|
|
1061
|
+
* entry), while the current platform's packages — the only ones sharp loads —
|
|
1062
|
+
* stay untouched. These tables mirror sharp's published platform matrix; a
|
|
1063
|
+
* suffix sharp adds later only costs the saving for that platform, never a
|
|
1064
|
+
* broken install, since an unknown suffix is simply not ignored.
|
|
1065
|
+
*/
|
|
1066
|
+
const SHARP_WRAPPER_SUFFIXES = [
|
|
1067
|
+
'darwin-arm64', 'darwin-x64', 'freebsd-wasm32', 'linux-arm', 'linux-arm64',
|
|
1068
|
+
'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-x64',
|
|
1069
|
+
'linuxmusl-arm64', 'linuxmusl-x64',
|
|
1070
|
+
'win32-arm64', 'win32-ia32', 'win32-x64',
|
|
1071
|
+
];
|
|
1072
|
+
const SHARP_LIBVIPS_SUFFIXES = [
|
|
1073
|
+
'darwin-arm64', 'darwin-x64', 'linux-arm', 'linux-arm64',
|
|
1074
|
+
'linux-ppc64', 'linux-riscv64', 'linux-s390x', 'linux-x64',
|
|
1075
|
+
'linuxmusl-arm64', 'linuxmusl-x64',
|
|
1076
|
+
];
|
|
1077
|
+
/**
|
|
1078
|
+
* The @img suffix of the RUNNING platform: musl linux maps to linuxmusl, and
|
|
1079
|
+
* FreeBSD — which has no native @img build — maps to the only form it can load.
|
|
1080
|
+
* Without that mapping a FreeBSD update would ignore `@img/sharp-freebsd-wasm32`
|
|
1081
|
+
* and leave sharp with nothing to load.
|
|
1082
|
+
*/
|
|
1083
|
+
export function sharpCurrentSuffix(platform, cpu, libc) {
|
|
1084
|
+
if (platform === 'freebsd')
|
|
1085
|
+
return 'freebsd-wasm32';
|
|
1086
|
+
const os = platform === 'linux' && libc === 'musl' ? 'linuxmusl' : platform;
|
|
1087
|
+
return `${os}-${cpu}`;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Deliberate omission: sharp's registry matrix (0.35.3) also carries the
|
|
1091
|
+
* platform-agnostic `wasm32` fallback (~9MB unpacked) plus
|
|
1092
|
+
* `webcontainers-wasm32`. They carry no os constraint, so they resolve on
|
|
1093
|
+
* every platform — including architectures with no native @img build at all
|
|
1094
|
+
* (loong64 etc.), where wasm is the only working form. They are therefore
|
|
1095
|
+
* NOT ignored: updates keep downloading them, trading ~9MB for not breaking
|
|
1096
|
+
* sharp on fallback-only architectures.
|
|
1097
|
+
*/
|
|
1098
|
+
/** Patterns for every @img platform package EXCEPT the running one. */
|
|
1099
|
+
export function ignoredSharpOptionalPatterns(platform, cpu, libc) {
|
|
1100
|
+
const current = sharpCurrentSuffix(platform, cpu, libc);
|
|
1101
|
+
return [
|
|
1102
|
+
...SHARP_WRAPPER_SUFFIXES.filter(s => s !== current).map(s => `@img/sharp-${s}`),
|
|
1103
|
+
...SHARP_LIBVIPS_SUFFIXES.filter(s => s !== current).map(s => `@img/sharp-libvips-${s}`),
|
|
1104
|
+
];
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Libc verdict for an explicit platform, so the whole matrix is testable on any
|
|
1108
|
+
* host. Node's report wins when present: a stray musl loader (Debian's musl
|
|
1109
|
+
* package, cross-compile toolchains) on a glibc system must NOT flip the
|
|
1110
|
+
* verdict, or the current platform's own packages would land in the ignore
|
|
1111
|
+
* list. The loader-path probe only answers when the report is unavailable (the
|
|
1112
|
+
* same fallback sharp's detect-libc uses); a non-Linux platform is always glibc.
|
|
1113
|
+
*/
|
|
1114
|
+
export function detectLibc(platform, report, muslLoaderPresent) {
|
|
1115
|
+
if (platform !== 'linux')
|
|
1116
|
+
return 'glibc';
|
|
1117
|
+
if (report?.header?.glibcVersionRuntime !== undefined)
|
|
1118
|
+
return 'glibc';
|
|
1119
|
+
return muslLoaderPresent ? 'musl' : 'glibc';
|
|
1120
|
+
}
|
|
1121
|
+
/** The running libc, via detectLibc's precedence (report first, paths last). */
|
|
1122
|
+
function isMuslRuntime() {
|
|
1123
|
+
const report = process.report?.getReport();
|
|
1124
|
+
return detectLibc(process.platform, report, existsSafe('/lib/ld-musl-x86_64.so.1') || existsSafe('/lib/ld-musl-aarch64.so.1') || existsSafe('/etc/alpine-release')) === 'musl';
|
|
1125
|
+
}
|
|
1126
|
+
/** Every @img package this module's tables cover (both the wrapper and the libvips matrix). */
|
|
1127
|
+
const SHARP_MANAGED_PATTERNS = new Set([
|
|
1128
|
+
...SHARP_WRAPPER_SUFFIXES.map(s => `@img/sharp-${s}`),
|
|
1129
|
+
...SHARP_LIBVIPS_SUFFIXES.map(s => `@img/sharp-libvips-${s}`),
|
|
1130
|
+
]);
|
|
1131
|
+
/**
|
|
1132
|
+
* The package name a list entry names, whatever spelling pnpm accepts: an
|
|
1133
|
+
* optional leading `-`, either quote style, and a trailing comment outside the
|
|
1134
|
+
* quotes. Returns undefined for a line that carries no scalar (a nested key),
|
|
1135
|
+
* which callers must treat as "not ours". Comparing names rather than raw
|
|
1136
|
+
* lines is what keeps a hand-edited block (`- "@img/sharp-…" # keep`, a blank
|
|
1137
|
+
* line inside the list) from being mistaken for a user entry and preserved —
|
|
1138
|
+
* that mistake would leave THIS platform's own package ignored.
|
|
1139
|
+
*/
|
|
1140
|
+
function optionalDependencyNameOf(line) {
|
|
1141
|
+
const body = line.trim().replace(/^-\s*/u, '');
|
|
1142
|
+
if (body === '')
|
|
1143
|
+
return undefined;
|
|
1144
|
+
const quote = body.startsWith("'") || body.startsWith('"') ? body[0] : undefined;
|
|
1145
|
+
if (quote !== undefined) {
|
|
1146
|
+
const end = body.indexOf(quote, 1);
|
|
1147
|
+
return end === -1 ? undefined : body.slice(1, end);
|
|
1148
|
+
}
|
|
1149
|
+
const commentAt = body.search(/\s#/u);
|
|
1150
|
+
const name = (commentAt === -1 ? body : body.slice(0, commentAt)).trim();
|
|
1151
|
+
return name === '' ? undefined : name;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Keep an `ignoredOptionalDependencies:` block in the profile's
|
|
1155
|
+
* pnpm-workspace.yaml listing every non-current-platform @img package, so an
|
|
1156
|
+
* update stops downloading the foreign-platform sharp natives. The list is
|
|
1157
|
+
* recomputed on every run: it is a fact about the machine running the update,
|
|
1158
|
+
* so a profile carried to another platform (WSL, a musl container, a new cpu)
|
|
1159
|
+
* gets a fresh list instead of a stale one that would skip the packages that
|
|
1160
|
+
* machine needs. Entries this module's own tables cover are rewritten (by
|
|
1161
|
+
* package name, so quoted forms, trailing comments and blank lines inside the
|
|
1162
|
+
* block all still refresh); every other entry — a user's `fsevents`, a name
|
|
1163
|
+
* sharp adds later, a user's own `@img/sharp-wasm32` exemption — is preserved
|
|
1164
|
+
* verbatim, same as in {@link ensureProfileAllowBuilds}. Best effort and
|
|
1165
|
+
* idempotent: the file is written only when the resulting block actually
|
|
1166
|
+
* differs, a missing `ignoredOptionalDependencies:` block is appended, and an
|
|
1167
|
+
* absent profile directory resolves to undefined — the update still runs, only
|
|
1168
|
+
* the download-size win is lost. A document this function cannot rewrite safely
|
|
1169
|
+
* (a flow-style value, a duplicated key, which is already invalid YAML) is left
|
|
1170
|
+
* untouched rather than half-rewritten. Residual caveat shared by any persisted
|
|
1171
|
+
* machine fact: a second platform using the same profile without running an
|
|
1172
|
+
* update keeps this platform's list, so its own binaries stay skipped until the
|
|
1173
|
+
* next update there.
|
|
1174
|
+
*/
|
|
1175
|
+
export function ensureProfileSharpPlatformFilter(profile) {
|
|
1176
|
+
const yamlPath = profileWorkspaceYamlPath(profile);
|
|
1177
|
+
try {
|
|
1178
|
+
if (!existsSafe(dirname(yamlPath)))
|
|
1179
|
+
return undefined;
|
|
1180
|
+
let text = '';
|
|
1181
|
+
try {
|
|
1182
|
+
text = readFileSync(yamlPath, 'utf8');
|
|
1183
|
+
}
|
|
1184
|
+
catch {
|
|
1185
|
+
// Missing file — start from an empty document; writeFileSync creates it.
|
|
1186
|
+
}
|
|
1187
|
+
const lines = text === '' ? [] : text.split(/\r?\n/u);
|
|
1188
|
+
let blockStart = -1;
|
|
1189
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1190
|
+
const line = lines[i];
|
|
1191
|
+
if (line === '' || line !== line.trimStart() || !/^ignoredOptionalDependencies:/u.test(line))
|
|
1192
|
+
continue;
|
|
1193
|
+
// A value on the key line itself (flow style `[a, b]`) is a list this
|
|
1194
|
+
// block rewriter would duplicate rather than refresh, and a second such
|
|
1195
|
+
// key is already invalid YAML — leave both alone, losing only the saving.
|
|
1196
|
+
const rest = line.slice(line.indexOf(':') + 1).trim();
|
|
1197
|
+
if ((rest !== '' && !rest.startsWith('#')) || blockStart !== -1)
|
|
1198
|
+
return undefined;
|
|
1199
|
+
blockStart = i;
|
|
1200
|
+
}
|
|
1201
|
+
const foreign = [];
|
|
1202
|
+
let blockEnd = blockStart === -1 ? -1 : blockStart + 1;
|
|
1203
|
+
if (blockStart !== -1) {
|
|
1204
|
+
for (let i = blockStart + 1; i < lines.length; i += 1) {
|
|
1205
|
+
const line = lines[i];
|
|
1206
|
+
if (line.trim() === '')
|
|
1207
|
+
continue; // blank lines inside a block list don't end it
|
|
1208
|
+
if (line === line.trimStart())
|
|
1209
|
+
break; // dedent = block ends
|
|
1210
|
+
blockEnd = i + 1;
|
|
1211
|
+
const name = optionalDependencyNameOf(line);
|
|
1212
|
+
// Entries from our own tables (possibly computed for another platform)
|
|
1213
|
+
// are dropped here and recomputed below; everything else is preserved.
|
|
1214
|
+
if (name === undefined || !SHARP_MANAGED_PATTERNS.has(name))
|
|
1215
|
+
foreign.push(line);
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
const patterns = ignoredSharpOptionalPatterns(process.platform, process.arch, isMuslRuntime() ? 'musl' : 'glibc');
|
|
1219
|
+
const insert = foreign.concat(patterns.map(p => ` - '${p}'`));
|
|
1220
|
+
if (blockStart !== -1 && lines.slice(blockStart + 1, blockEnd).join('\n') === insert.join('\n')) {
|
|
1221
|
+
return { entries: patterns, changed: false };
|
|
1222
|
+
}
|
|
1223
|
+
if (blockStart !== -1) {
|
|
1224
|
+
lines.splice(blockStart + 1, blockEnd - blockStart - 1, ...insert);
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
if (lines.length > 0 && lines[lines.length - 1] !== '')
|
|
1228
|
+
lines.push('');
|
|
1229
|
+
lines.push('ignoredOptionalDependencies:', ...insert);
|
|
1230
|
+
}
|
|
1231
|
+
writeFileSync(yamlPath, `${lines.join('\n')}\n`);
|
|
1232
|
+
return { entries: patterns, changed: true };
|
|
1233
|
+
}
|
|
1234
|
+
catch {
|
|
1235
|
+
return undefined;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1052
1238
|
/**
|
|
1053
1239
|
* The pnpm Windows tmp-rename race signature (issue #225): pnpm swaps a
|
|
1054
1240
|
* package directory via a `<name>_tmp_<pid>` staging dir, and a file lock or
|
|
@@ -1249,6 +1435,14 @@ export async function updateTui(profile, targetVersion) {
|
|
|
1249
1435
|
process.stderr.write(`dsh-tui: pre-seeded profile pnpm allowBuilds (${allowBuilds.added.join(', ')}) — ` +
|
|
1250
1436
|
'postinstall-only deps are explicitly ignored\n');
|
|
1251
1437
|
}
|
|
1438
|
+
// Foreign-platform @img/sharp-* optionals are pure download waste (~90MB on
|
|
1439
|
+
// the maintainer-group report); keep the profile's ignore list matching THIS
|
|
1440
|
+
// machine (each update recomputes it) so pnpm never fetches them.
|
|
1441
|
+
const sharpFilter = ensureProfileSharpPlatformFilter(profile);
|
|
1442
|
+
if (sharpFilter !== undefined && sharpFilter.changed) {
|
|
1443
|
+
process.stderr.write(`dsh-tui: sharp platform filter updated (${sharpFilter.entries.length} foreign-platform patterns ignored) — ` +
|
|
1444
|
+
`this profile's install keeps only the current platform's natives\n`);
|
|
1445
|
+
}
|
|
1252
1446
|
// pnpm ≥11's minimumReleaseAge (24h by default) refuses installs of
|
|
1253
1447
|
// packages published within the window — on release day that gate rejects
|
|
1254
1448
|
// the exact version /update pins, surfacing as a failed update that heals
|
|
@@ -26,7 +26,7 @@ export type LongLineFold = {
|
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Clip every line of `text` longer than `max` characters, appending an
|
|
29
|
-
* inline
|
|
29
|
+
* inline localized fold marker (`long-line-folded`) to the clipped line.
|
|
30
30
|
*
|
|
31
31
|
* Line boundaries are preserved (never re-flowed, never merged), so the
|
|
32
32
|
* result stays valid input for the markdown renderer and for diff-style
|
|
@@ -28,7 +28,7 @@ function formatCount(value) {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Clip every line of `text` longer than `max` characters, appending an
|
|
31
|
-
* inline
|
|
31
|
+
* inline localized fold marker (`long-line-folded`) to the clipped line.
|
|
32
32
|
*
|
|
33
33
|
* Line boundaries are preserved (never re-flowed, never merged), so the
|
|
34
34
|
* result stays valid input for the markdown renderer and for diff-style
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inbound image adaptation for the composer's staging gate.
|
|
3
|
+
*
|
|
4
|
+
* The upstream attachment store admits images by media type, byte budget,
|
|
5
|
+
* pixel budget and a per-side dimension cap (`maxImageDimension`). Two kinds
|
|
6
|
+
* of paste used to fail with no user-side recourse: one that exceeds the
|
|
7
|
+
* dimension cap, and one whose format the deployment does not accept. This
|
|
8
|
+
* module measures the bytes BEFORE staging and produces an admissible pair
|
|
9
|
+
* (bytes + media type) through sharp — an optionalDependency, absent on
|
|
10
|
+
* minimal installs, which must degrade with a clear error, not a crash.
|
|
11
|
+
*
|
|
12
|
+
* Sizing probe is pure byte inspection (PNG/JPEG/WebP/GIF). Formats the
|
|
13
|
+
* probe cannot identify return null and MUST be forced through an actual
|
|
14
|
+
* decode for measurement — the #432 review gap was letting an
|
|
15
|
+
* "unrecognized but under the byte cap" image through, where a
|
|
16
|
+
* large-resolution small-byte WebP/GIF would sail past the probe and be
|
|
17
|
+
* rejected by upstream afterwards.
|
|
18
|
+
*
|
|
19
|
+
* The single entry point is {@link adaptImageForAdmission}: it decides
|
|
20
|
+
* whether anything has to change (resample, re-encode, or both) and reports
|
|
21
|
+
* exactly what it did, so the caller can tell the user instead of silently
|
|
22
|
+
* rewriting their image.
|
|
23
|
+
*/
|
|
24
|
+
export interface ImageSizeProbe {
|
|
25
|
+
readonly width: number;
|
|
26
|
+
readonly height: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Measure intrinsic pixel dimensions from the encoded bytes alone — no
|
|
30
|
+
* decode, no dependencies. Recognizes PNG / JPEG / WebP (VP8X, VP8,
|
|
31
|
+
* VP8L) / GIF; anything else returns null, which callers MUST treat as
|
|
32
|
+
* "unknown, force a real decode" — never as "small enough".
|
|
33
|
+
*/
|
|
34
|
+
export declare function probeImageSize(bytes: Uint8Array): ImageSizeProbe | null;
|
|
35
|
+
/** The admission limits that matter for resampling decisions. */
|
|
36
|
+
export interface ResizeLimits {
|
|
37
|
+
/** Maximum intrinsic width AND height, per side, in pixels. */
|
|
38
|
+
readonly maxImageDimension: number;
|
|
39
|
+
/** Maximum width × height in pixels. */
|
|
40
|
+
readonly maxImagePixels: number;
|
|
41
|
+
}
|
|
42
|
+
/** Whether a measured image already satisfies the dimension/pixel caps. */
|
|
43
|
+
export declare function withinDimensionLimits(size: ImageSizeProbe, limits: ResizeLimits): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Target dimensions that bring an oversized image inside `limits` while
|
|
46
|
+
* preserving the aspect ratio: scale down by the largest of the three
|
|
47
|
+
* required factors (per-side, per-side, total-pixels).
|
|
48
|
+
*/
|
|
49
|
+
export declare function downscaleTarget(size: ImageSizeProbe, limits: ResizeLimits): ImageSizeProbe;
|
|
50
|
+
export type AdaptOutcome = {
|
|
51
|
+
readonly kind: 'unchanged';
|
|
52
|
+
} | {
|
|
53
|
+
readonly kind: 'adapted';
|
|
54
|
+
readonly data: Uint8Array;
|
|
55
|
+
/** Media type of the produced bytes (equals the source's when accepted). */
|
|
56
|
+
readonly mediaType: string;
|
|
57
|
+
readonly width: number;
|
|
58
|
+
readonly height: number;
|
|
59
|
+
/** The source exceeded the caps and was resampled. */
|
|
60
|
+
readonly resized: boolean;
|
|
61
|
+
/** An alpha channel was composited onto {@link OPAQUE_BACKGROUND}. */
|
|
62
|
+
readonly flattened: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
/** Nothing could be produced. Only `sharp-missing` is a degradation a
|
|
65
|
+
* caller may tolerate (the optional dependency is absent, so nothing could
|
|
66
|
+
* be measured at all); every other reason is a definite refusal that must
|
|
67
|
+
* be reported instead of handed to the store. */
|
|
68
|
+
readonly kind: 'unavailable';
|
|
69
|
+
readonly reason: 'sharp-missing' | 'decode-failed' | 'animated-unsupported';
|
|
70
|
+
readonly detail: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Produce bytes the profile can admit, and report what had to change.
|
|
74
|
+
*
|
|
75
|
+
* Both triggers are size-independent by design: a media type the profile does
|
|
76
|
+
* not accept is converted even when it fits the pixel caps (a small PNG must
|
|
77
|
+
* not be refused while a large one succeeds), and an image the byte probe
|
|
78
|
+
* cannot measure is decoded so its real dimensions decide. The probe still
|
|
79
|
+
* short-circuits the common case — bytes it proves to be inside the caps in an
|
|
80
|
+
* accepted format are returned untouched, with no encoder loaded.
|
|
81
|
+
*
|
|
82
|
+
* Aspect ratio is preserved by {@link downscaleTarget}. An animated source is
|
|
83
|
+
* REFUSED whenever this gate would have to touch its bytes: re-encoding a
|
|
84
|
+
* multi-page image here cannot promise frames, delays and loop survive, and
|
|
85
|
+
* silently returning a still is a data loss the store's own refusal (the
|
|
86
|
+
* behaviour without this gate) never inflicted. Animated images that need no
|
|
87
|
+
* change pass through untouched.
|
|
88
|
+
*/
|
|
89
|
+
export declare function adaptImageForAdmission(bytes: Uint8Array, sourceMediaType: string, limits: ResizeLimits, acceptedMediaTypes: readonly string[]): Promise<AdaptOutcome>;
|
|
90
|
+
//# sourceMappingURL=imageResize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageResize.d.ts","sourceRoot":"","sources":["../../../src/utils/imageResize.ts"],"names":[],"mappings":"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