@deepseek-harness-tui/dsh-tui 0.11.0 → 0.11.2
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 +55 -20
- package/assets/whale-girl/whale-girl-dark.png +0 -0
- package/assets/whale-girl/whale-girl-happy.png +0 -0
- package/assets/whale-girl/whale-girl.png +0 -0
- package/bin/dsh-tui.js +63 -3
- package/cordis.patch.yml +43 -20
- package/cordis.yml +6 -4
- package/lib/settings.json +1272 -0
- 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/state.d.ts.map +1 -1
- package/lib/types/adapter/channel/state.js +3 -1
- package/lib/types/adapter/channel/ui-policy.d.ts +9 -2
- package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
- package/lib/types/adapter/channel/ui-policy.js +14 -1
- package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
- package/lib/types/adapter/kernel/replay.js +2 -0
- package/lib/types/adapter/ports/channel-display.d.ts +12 -0
- package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-session.d.ts +38 -0
- package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-settings.d.ts +12 -0
- package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-ui.d.ts +53 -7
- package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
- package/lib/types/adapter/ports/channel-view.d.ts +43 -12
- package/lib/types/adapter/ports/channel-view.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/commands.d.ts.map +1 -1
- package/lib/types/commands.js +2 -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/BalanceReportRow.d.ts +10 -2
- package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
- package/lib/types/components/BalanceReportRow.js +18 -4
- package/lib/types/components/CompactionStatusRow.d.ts +24 -0
- package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
- package/lib/types/components/CompactionStatusRow.js +72 -0
- package/lib/types/components/GoalTodoPanel.js +2 -2
- package/lib/types/components/HelpMenu.d.ts +2 -2
- package/lib/types/components/HelpMenu.d.ts.map +1 -1
- package/lib/types/components/HelpMenu.js +5 -4
- package/lib/types/components/InlineMathParagraph.d.ts +22 -0
- package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
- package/lib/types/components/InlineMathParagraph.js +178 -0
- package/lib/types/components/LogoV2.d.ts +41 -3
- package/lib/types/components/LogoV2.d.ts.map +1 -1
- package/lib/types/components/LogoV2.js +148 -24
- package/lib/types/components/Markdown.d.ts +10 -3
- package/lib/types/components/Markdown.d.ts.map +1 -1
- package/lib/types/components/Markdown.js +47 -14
- package/lib/types/components/MathBlock.d.ts +13 -0
- package/lib/types/components/MathBlock.d.ts.map +1 -0
- package/lib/types/components/MathBlock.js +136 -0
- package/lib/types/components/MessageList.d.ts +10 -1
- package/lib/types/components/MessageList.d.ts.map +1 -1
- package/lib/types/components/MessageList.js +15 -5
- package/lib/types/components/MigratePicker.d.ts +30 -0
- package/lib/types/components/MigratePicker.d.ts.map +1 -0
- package/lib/types/components/MigratePicker.js +38 -0
- package/lib/types/components/PromptInput.d.ts +17 -0
- package/lib/types/components/PromptInput.d.ts.map +1 -1
- package/lib/types/components/PromptInput.js +96 -9
- package/lib/types/components/SplitDiffView.d.ts.map +1 -1
- package/lib/types/components/SplitDiffView.js +3 -1
- package/lib/types/components/StarPrompt.d.ts +53 -0
- package/lib/types/components/StarPrompt.d.ts.map +1 -0
- package/lib/types/components/StarPrompt.js +281 -0
- package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
- package/lib/types/components/StreamingMarkdown.js +20 -3
- 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/TimelineRail.d.ts.map +1 -1
- package/lib/types/components/TimelineRail.js +9 -1
- package/lib/types/components/Whale.d.ts +17 -8
- package/lib/types/components/Whale.d.ts.map +1 -1
- package/lib/types/components/Whale.js +25 -15
- package/lib/types/components/WhaleGirl.d.ts +29 -0
- package/lib/types/components/WhaleGirl.d.ts.map +1 -0
- package/lib/types/components/WhaleGirl.js +32 -0
- package/lib/types/components/WorkingSpinner.d.ts +4 -1
- package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
- package/lib/types/components/WorkingSpinner.js +2 -2
- package/lib/types/components/bigfont.d.ts +47 -18
- package/lib/types/components/bigfont.d.ts.map +1 -1
- package/lib/types/components/bigfont.js +55 -40
- 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/design-system/ThemeProvider.d.ts +6 -0
- package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
- package/lib/types/components/design-system/ThemeProvider.js +40 -1
- package/lib/types/components/maidPortrait.d.ts +44 -0
- package/lib/types/components/maidPortrait.d.ts.map +1 -0
- package/lib/types/components/maidPortrait.js +178 -0
- package/lib/types/components/mathPreview.d.ts +25 -0
- package/lib/types/components/mathPreview.d.ts.map +1 -0
- package/lib/types/components/mathPreview.js +48 -0
- 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 +4 -2
- 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 +31 -26
- package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
- package/lib/types/components/messages/TranscriptImages.js +11 -1
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
- package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
- package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
- package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
- package/lib/types/components/questions/PlanReviewPanel.js +3 -3
- package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
- package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
- package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
- package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
- package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
- package/lib/types/components/sessions/SourceTabs.js +70 -0
- package/lib/types/components/splashEggs.d.ts +56 -0
- package/lib/types/components/splashEggs.d.ts.map +1 -0
- package/lib/types/components/splashEggs.js +67 -0
- package/lib/types/components/splashFonts.d.ts +119 -0
- package/lib/types/components/splashFonts.d.ts.map +1 -0
- package/lib/types/components/splashFonts.js +267 -0
- package/lib/types/components/splashLayout.d.ts +41 -0
- package/lib/types/components/splashLayout.d.ts.map +1 -0
- package/lib/types/components/splashLayout.js +40 -0
- package/lib/types/components/whaleGirlSprite.d.ts +17 -0
- package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
- package/lib/types/components/whaleGirlSprite.js +47 -0
- package/lib/types/deepseekPricing.d.ts +74 -0
- package/lib/types/deepseekPricing.d.ts.map +1 -1
- package/lib/types/deepseekPricing.js +110 -11
- 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/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 +6 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/background-action.js +2 -0
- package/lib/types/dsh-adapter/channel/binding-events.d.ts +15 -14
- package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/binding-events.js +70 -21
- package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -2
- package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/compaction.js +35 -4
- package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
- 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 +6 -2
- package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/paths.js +7 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/preferences.js +16 -0
- package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
- package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/projection.js +127 -17
- package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
- package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/question-record.js +107 -0
- 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-lineage.d.ts +42 -0
- package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
- package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
- package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -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 +10 -3
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-metadata.js +43 -9
- package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts +2 -1
- package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/session-resume.js +5 -2
- package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
- package/lib/types/dsh-adapter/channel/state.d.ts +19 -1
- package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/state.js +8 -3
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +32 -17
- package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
- package/lib/types/dsh-adapter/channel/subagent-projection.js +309 -8
- package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
- package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -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 +34 -18
- 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 +6 -0
- package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/messages.js +9 -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 +2 -0
- package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
- package/lib/types/dsh-adapter/compat/settings.js +14 -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 +9 -5
- package/lib/types/dsh-adapter/index.d.ts +36 -1
- package/lib/types/dsh-adapter/index.d.ts.map +1 -1
- package/lib/types/dsh-adapter/index.js +22 -6
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
- package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
- package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/browse.js +90 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
- package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/cli.js +106 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
- package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
- package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/index.js +107 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
- package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
- package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/picker.js +86 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
- package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
- package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/types.js +11 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
- package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
- package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
- package/lib/types/dsh-adapter/plugin.d.ts +5 -3
- package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
- package/lib/types/dsh-adapter/plugin.js +168 -372
- package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
- package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
- package/lib/types/dsh-adapter/providerWizard.js +254 -66
- package/lib/types/dsh-adapter/questions.d.ts +22 -15
- package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
- package/lib/types/dsh-adapter/questions.js +47 -45
- package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
- package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/digest.js +20 -13
- package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
- package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/frames.js +5 -4
- package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
- package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/list.js +188 -164
- package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
- package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
- package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
- package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
- package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
- package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sessions/store.js +62 -25
- 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/sideQuestion.d.ts +41 -2
- package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
- package/lib/types/dsh-adapter/sideQuestion.js +98 -2
- package/lib/types/dsh-adapter/subagents.d.ts +44 -6
- package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
- package/lib/types/dsh-adapter/subagents.js +163 -26
- package/lib/types/herdr.d.ts +2 -0
- package/lib/types/herdr.d.ts.map +1 -1
- package/lib/types/herdr.js +9 -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/i18n.d.ts +512 -41
- package/lib/types/i18n.d.ts.map +1 -1
- package/lib/types/i18n.js +199 -20
- package/lib/types/ink/components/App.d.ts +2 -2
- package/lib/types/ink/components/App.d.ts.map +1 -1
- package/lib/types/ink/components/App.js +5 -1
- package/lib/types/ink/components/Image.d.ts +14 -1
- package/lib/types/ink/components/Image.d.ts.map +1 -1
- package/lib/types/ink/components/Image.js +2 -2
- package/lib/types/ink/events/input-event.js +3 -3
- package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
- package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
- package/lib/types/ink/hooks/use-terminal-images.js +13 -0
- package/lib/types/ink/ink.d.ts +6 -0
- package/lib/types/ink/ink.d.ts.map +1 -1
- package/lib/types/ink/ink.js +16 -1
- package/lib/types/ink/kitty-graphics.d.ts +44 -3
- package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
- package/lib/types/ink/kitty-graphics.js +184 -23
- 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 +24 -2
- package/lib/types/ink/output.d.ts.map +1 -1
- package/lib/types/ink/output.js +83 -5
- package/lib/types/ink/parse-keypress.d.ts +26 -1
- package/lib/types/ink/parse-keypress.d.ts.map +1 -1
- package/lib/types/ink/parse-keypress.js +156 -13
- package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
- package/lib/types/ink/render-node-to-output.js +8 -1
- package/lib/types/ink/screen.d.ts +24 -0
- package/lib/types/ink/screen.d.ts.map +1 -1
- package/lib/types/ink/screen.js +89 -0
- package/lib/types/ink/selection.d.ts +68 -18
- package/lib/types/ink/selection.d.ts.map +1 -1
- package/lib/types/ink/selection.js +178 -31
- package/lib/types/ink/sixel-codec.d.ts +12 -1
- package/lib/types/ink/sixel-codec.d.ts.map +1 -1
- package/lib/types/ink/sixel-codec.js +29 -5
- package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
- package/lib/types/ink/sixel-graphics.js +5 -3
- package/lib/types/ink/styles.d.ts +9 -0
- package/lib/types/ink/styles.d.ts.map +1 -1
- package/lib/types/ink/terminal-image.d.ts +8 -0
- package/lib/types/ink/terminal-image.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.d.ts +7 -1
- package/lib/types/ink/terminal-querier.d.ts.map +1 -1
- package/lib/types/ink/terminal-querier.js +12 -2
- package/lib/types/ink/timeline-rail.d.ts +5 -0
- package/lib/types/ink/timeline-rail.d.ts.map +1 -1
- package/lib/types/math/inline-layout.d.ts +29 -0
- package/lib/types/math/inline-layout.d.ts.map +1 -0
- package/lib/types/math/inline-layout.js +106 -0
- package/lib/types/math/layout.d.ts +58 -0
- package/lib/types/math/layout.d.ts.map +1 -0
- package/lib/types/math/layout.js +59 -0
- package/lib/types/math/renderer.d.ts +64 -0
- package/lib/types/math/renderer.d.ts.map +1 -0
- package/lib/types/math/renderer.js +256 -0
- package/lib/types/screens/Chat.d.ts +17 -1
- package/lib/types/screens/Chat.d.ts.map +1 -1
- package/lib/types/screens/Chat.js +618 -57
- package/lib/types/screens/SessionSupervisor.d.ts +2 -1
- package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/SessionSupervisor.js +156 -19
- package/lib/types/screens/Settings.d.ts.map +1 -1
- package/lib/types/screens/Settings.js +49 -11
- package/lib/types/screens/StatusLine.d.ts +5 -1
- package/lib/types/screens/StatusLine.d.ts.map +1 -1
- package/lib/types/screens/StatusLine.js +47 -17
- package/lib/types/screens/chatOverlay.d.ts +5 -0
- package/lib/types/screens/chatOverlay.d.ts.map +1 -1
- package/lib/types/screens/chatOverlay.js +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
- package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/model.js +26 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
- package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
- package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
- package/lib/types/sessionHistory.d.ts +2 -2
- package/lib/types/sessionHistory.d.ts.map +1 -1
- package/lib/types/sessionHistory.js +31 -5
- package/lib/types/settings/definitions.d.ts +681 -0
- package/lib/types/settings/definitions.d.ts.map +1 -0
- package/lib/types/settings/definitions.js +511 -0
- package/lib/types/starAction.d.ts +44 -0
- package/lib/types/starAction.d.ts.map +1 -0
- package/lib/types/starAction.js +52 -0
- package/lib/types/terminal-utils/latex.d.ts +10 -0
- package/lib/types/terminal-utils/latex.d.ts.map +1 -0
- package/lib/types/terminal-utils/latex.js +1417 -0
- package/lib/types/terminal-utils/markdown.d.ts +3 -1
- package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
- package/lib/types/terminal-utils/markdown.js +26 -1
- package/lib/types/terminal-utils/math.d.ts +66 -0
- package/lib/types/terminal-utils/math.d.ts.map +1 -0
- package/lib/types/terminal-utils/math.js +337 -0
- package/lib/types/tips.d.ts.map +1 -1
- package/lib/types/tips.js +6 -0
- package/lib/types/tuiDisplayPrefs.d.ts +67 -0
- package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
- package/lib/types/tuiDisplayPrefs.js +59 -0
- package/lib/types/ui.d.ts +1 -1
- package/lib/types/ui.d.ts.map +1 -1
- package/lib/types/ui.js +1 -1
- package/lib/types/usageStats.d.ts +98 -0
- package/lib/types/usageStats.d.ts.map +1 -0
- package/lib/types/usageStats.js +169 -0
- package/lib/types/utils/bmp.d.ts +17 -0
- package/lib/types/utils/bmp.d.ts.map +1 -0
- package/lib/types/utils/bmp.js +154 -0
- package/lib/types/utils/clipboard.d.ts +14 -2
- package/lib/types/utils/clipboard.d.ts.map +1 -1
- package/lib/types/utils/clipboard.js +143 -8
- package/lib/types/utils/fold-long-lines.d.ts +1 -1
- package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
- package/lib/types/utils/fold-long-lines.js +3 -2
- package/lib/types/utils/keymap.d.ts +4 -1
- package/lib/types/utils/keymap.d.ts.map +1 -1
- package/lib/types/utils/keymap.js +8 -0
- package/lib/types/utils/modifiers.d.ts +4 -3
- package/lib/types/utils/modifiers.d.ts.map +1 -1
- package/lib/types/utils/modifiers.js +4 -3
- 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/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
- package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
- package/package.json +117 -99
- 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/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
|
@@ -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';
|
|
@@ -7,6 +7,12 @@ export declare function toolResultPayload(message: {
|
|
|
7
7
|
content: readonly ContentBlock[];
|
|
8
8
|
isError: boolean;
|
|
9
9
|
};
|
|
10
|
+
/** Tool-call ids one message answers: 0.1.7 tool-role messages, or older result blocks. */
|
|
11
|
+
export declare function answeredToolCallIds(message: {
|
|
12
|
+
readonly role: string;
|
|
13
|
+
readonly toolCallId?: string;
|
|
14
|
+
readonly content: readonly ContentBlock[];
|
|
15
|
+
}): string[];
|
|
10
16
|
/** Preserve old checkpoints while recognizing the V4 producer-owned source. */
|
|
11
17
|
export declare function isCompactionCheckpointSource(source: {
|
|
12
18
|
kind: string;
|
|
@@ -1 +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"}
|
|
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,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;CAC1C,GAAG,MAAM,EAAE,CAMX;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"}
|
|
@@ -9,6 +9,15 @@ export function toolResultPayload(message) {
|
|
|
9
9
|
}
|
|
10
10
|
return { content: message?.content ?? [], isError: message?.isError === true };
|
|
11
11
|
}
|
|
12
|
+
/** Tool-call ids one message answers: 0.1.7 tool-role messages, or older result blocks. */
|
|
13
|
+
export function answeredToolCallIds(message) {
|
|
14
|
+
const ids = message.role === 'tool' && typeof message.toolCallId === 'string' ? [message.toolCallId] : [];
|
|
15
|
+
for (const block of message.content) {
|
|
16
|
+
if (block.type === 'tool-result' && typeof block.toolCallId === 'string')
|
|
17
|
+
ids.push(block.toolCallId);
|
|
18
|
+
}
|
|
19
|
+
return ids;
|
|
20
|
+
}
|
|
12
21
|
/** Preserve old checkpoints while recognizing the V4 producer-owned source. */
|
|
13
22
|
export function isCompactionCheckpointSource(source) {
|
|
14
23
|
return source.kind === 'compact-checkpoint' || (source.kind === 'plugin' && source.plugin === 'compact');
|
|
@@ -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;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,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,aAAa,CAyB/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAwB7E"}
|
|
@@ -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);
|
|
@@ -8,6 +8,8 @@ export type RuntimeConfig<T> = {
|
|
|
8
8
|
};
|
|
9
9
|
/** Declare only UI preferences as live fields, never the agent/session route. */
|
|
10
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;
|
|
11
13
|
/** Snapshot at an operation boundary; retain the host refs for later updates. */
|
|
12
14
|
export declare function configValues<T extends object>(config: RuntimeConfig<T>): T;
|
|
13
15
|
interface SettingsScope<T> {
|
|
@@ -1 +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,iFAAiF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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
|
+
}
|
|
10
24
|
/** Snapshot at an operation boundary; retain the host refs for later updates. */
|
|
11
25
|
export function configValues(config) {
|
|
12
26
|
return Object.fromEntries(Object.entries(config).map(([key, value]) => [
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/** Primary validated upstream line (newest). */
|
|
2
|
-
export declare const UPSTREAM_VALIDATED_VERSION = "0.
|
|
2
|
+
export declare const UPSTREAM_VALIDATED_VERSION = "0.2.0-rc.1";
|
|
3
3
|
/**
|
|
4
4
|
* Explicitly supported upstream prerelease lines, oldest first.
|
|
5
5
|
*
|
|
6
|
-
* 0.
|
|
6
|
+
* 0.2.0-rc.1 = primary continuous-CI line; 0.1.7-rc.2/rc.1 = previous
|
|
7
|
+
* family (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.7-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", "0.1.7-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", "0.2.0-rc.1"];
|
|
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-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
|
+
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-scope", "@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,6PAiB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,89BAgC5B,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,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKlG;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAQxF;AAkBD,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,QAA6D,CAAA;AAYlG,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAqB9E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Upstream compatibility contract.
|
|
3
3
|
*
|
|
4
4
|
* The TUI is validated against a set of upstream prerelease lines — the
|
|
5
|
-
* current primary (0.
|
|
6
|
-
* compatibility across the 0.1.5, 0.1.3, 0.1.2, 0.1.1 and 0.1.0
|
|
7
|
-
* families.
|
|
5
|
+
* current primary (0.2.0-rc.1) plus older lines kept in backward
|
|
6
|
+
* compatibility across the 0.1.7, 0.1.5, 0.1.3, 0.1.2, 0.1.1 and 0.1.0
|
|
7
|
+
* release families.
|
|
8
8
|
* Every official package this adapter touches is blessed here; anything
|
|
9
9
|
* else must go through upstream channels or the adapter, never the UI.
|
|
10
10
|
*
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
import { readFileSync } from 'node:fs';
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
18
|
/** Primary validated upstream line (newest). */
|
|
19
|
-
export const UPSTREAM_VALIDATED_VERSION = '0.
|
|
19
|
+
export const UPSTREAM_VALIDATED_VERSION = '0.2.0-rc.1';
|
|
20
20
|
/**
|
|
21
21
|
* Explicitly supported upstream prerelease lines, oldest first.
|
|
22
22
|
*
|
|
23
|
-
* 0.
|
|
23
|
+
* 0.2.0-rc.1 = primary continuous-CI line; 0.1.7-rc.2/rc.1 = previous
|
|
24
|
+
* family (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
|
|
24
25
|
* compatibility lines (source-checked when the primary line moves);
|
|
25
26
|
* 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
|
|
26
27
|
* 0.1.2-rc.1 = previous family (full CI coverage); 0.1.2-alpha.3–alpha.5 =
|
|
@@ -47,6 +48,8 @@ export const UPSTREAM_VALIDATED_VERSIONS = [
|
|
|
47
48
|
'0.1.5-alpha.2',
|
|
48
49
|
'0.1.5-rc.1',
|
|
49
50
|
'0.1.7-rc.1',
|
|
51
|
+
'0.1.7-rc.2',
|
|
52
|
+
'0.2.0-rc.1',
|
|
50
53
|
];
|
|
51
54
|
/**
|
|
52
55
|
* Framework packages version on their own lines; the contract validates
|
|
@@ -71,6 +74,7 @@ export const UPSTREAM_BLESSED_PACKAGES = [
|
|
|
71
74
|
'@deepseek-ai/dsh-llm',
|
|
72
75
|
'@deepseek-ai/dsh-llm-pi-ai',
|
|
73
76
|
'@deepseek-ai/dsh-persona',
|
|
77
|
+
'@deepseek-ai/dsh-scope',
|
|
74
78
|
'@deepseek-ai/dsh-session',
|
|
75
79
|
'@deepseek-ai/dsh-settings',
|
|
76
80
|
'@deepseek-ai/dsh-skill',
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
import type { Context } from '@deepseek-ai/cordis';
|
|
10
10
|
import Schema from '@deepseek-ai/schemastery';
|
|
11
11
|
import type { SessionModeSpec } from '../sessionModes.js';
|
|
12
|
-
import { type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
12
|
+
import { type ImageBacking, type MathImageBacking, type MathImageScale, type MathRendering, type PageMarginSetting, type ScrollGutterMode, type StatusBarConfig, type ToolBackground } from '../tuiDisplayPrefs.js';
|
|
13
13
|
import { type ShortcutActionId } from '../utils/keymap.js';
|
|
14
|
+
import { type SplashFontSetting } from '../components/splashFonts.js';
|
|
14
15
|
import { type RuntimeConfig } from './compat/settings.js';
|
|
15
16
|
export declare const name = "dsh-tui";
|
|
16
17
|
export declare const inject: string[];
|
|
@@ -49,6 +50,13 @@ export interface Config {
|
|
|
49
50
|
/** Show the header whale and its idle animation. */
|
|
50
51
|
whale?: boolean;
|
|
51
52
|
whaleIdle?: boolean;
|
|
53
|
+
/** Big-text face on the header splash (settings `dsh-tui.splashFont`):
|
|
54
|
+
* `daily` (the default) rotates by local date, any other value is a font
|
|
55
|
+
* id from `components/splashFonts.ts` (`bold`/`square`/…) pinning that one
|
|
56
|
+
* face. An unknown value falls back to `daily`. */
|
|
57
|
+
splashFont?: SplashFontSetting;
|
|
58
|
+
/** Swap the header's pixel whale for the static maid portrait. */
|
|
59
|
+
whaleGirl?: boolean;
|
|
52
60
|
/** Reduce decorative header content and colors. */
|
|
53
61
|
minimal?: boolean;
|
|
54
62
|
/** Show the live working line derived in-process from base session events. */
|
|
@@ -125,6 +133,33 @@ export interface Config {
|
|
|
125
133
|
* than the viewport or of an unsupported type keeps the fenced source.
|
|
126
134
|
* On by default; off always shows the source. */
|
|
127
135
|
mermaidDiagrams?: boolean;
|
|
136
|
+
/** LaTeX math (settings `dsh-tui.mathRendering`): `$…$` / `\(…\)` inline
|
|
137
|
+
* and `$$…$$` / `\[…\]` blocks in replies. `auto` (default) uses the best
|
|
138
|
+
* available renderer — today Unicode text: Greek and operator symbols,
|
|
139
|
+
* scripts, fractions and operator limits stacked in display blocks,
|
|
140
|
+
* matrices, cases; `unicode` pins it; `source` always shows the TeX.
|
|
141
|
+
* Unsupported, still-streaming, or too-wide formulas keep their source. */
|
|
142
|
+
mathRendering?: MathRendering;
|
|
143
|
+
/** Display-formula image size (settings `dsh-tui.mathImageScale`), used
|
|
144
|
+
* with `mathRendering: image`: `auto` matches the body text, `large` and
|
|
145
|
+
* `xlarge` set display math bigger — which also hands the terminal more
|
|
146
|
+
* device pixels per stroke, the only sharpness lever a terminal image has.
|
|
147
|
+
* Inline formulas keep the base scale. */
|
|
148
|
+
mathImageScale?: MathImageScale;
|
|
149
|
+
/** Formula-image backing (settings `dsh-tui.mathImageBacking`): `transparent`
|
|
150
|
+
* paints only the formula and lets the terminal background show through;
|
|
151
|
+
* `terminal` composites it onto the terminal's background colour. */
|
|
152
|
+
mathImageBacking?: MathImageBacking;
|
|
153
|
+
/** Transcript-image backing (settings `dsh-tui.imageBacking`): `transparent`
|
|
154
|
+
* floats photos and illustrations on whatever the terminal shows;
|
|
155
|
+
* `terminal` composites them onto the terminal's background colour. */
|
|
156
|
+
imageBacking?: ImageBacking;
|
|
157
|
+
/** @deprecated Use `mathRendering`; `false` still means `source`. */
|
|
158
|
+
latexMath?: boolean;
|
|
159
|
+
/** Auto recap on open (settings `dsh-tui.recapOnOpen`): opening or resuming a
|
|
160
|
+
* session summarizes its recent activity into a dim line at the bottom of
|
|
161
|
+
* the transcript. On by default; off leaves `/recap` as the manual path. */
|
|
162
|
+
recapOnOpen?: boolean;
|
|
128
163
|
/** Status-footer field visibility and compact presentation preferences. */
|
|
129
164
|
statusBar?: Partial<StatusBarConfig>;
|
|
130
165
|
/** Built-in action-shortcut overrides (`paste: 'alt+v'`), keyed by action
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src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;;kDAG8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;mEAG+D;IAC/D,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;sDAKkD;IAClD,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;;;gFAK4E;IAC5E,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;+CAI2C;IAC3C,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B;;0EAEsE;IACtE,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC;;4EAEwE;IACxE,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;iFAE6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACpC;;;;sCAIkC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAA;IACrD;;;yDAGqD;IACrD,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CA8FH,CAAA;AAEtD;;;;;;GAMG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBtF"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Schema from '@deepseek-ai/schemastery';
|
|
2
2
|
import { DEFAULT_STATUS_BAR, normalizePageMargin } from '../tuiDisplayPrefs.js';
|
|
3
3
|
import { SHORTCUT_ACTIONS } from '../utils/keymap.js';
|
|
4
|
+
import { normalizeSplashFont } from '../components/splashFonts.js';
|
|
4
5
|
import { editableConfig } from './compat/settings.js';
|
|
6
|
+
import { EDITABLE_CONFIG_KEYS } from '../settings/definitions.js';
|
|
5
7
|
export const name = 'dsh-tui';
|
|
6
8
|
// `tuiWorkspaces` must stay OUT of this code-level inject (issue #183): the
|
|
7
9
|
// dsh CLI resolves the bundle's cordis.patch.yml from the FIRST copy of this
|
|
@@ -27,6 +29,15 @@ export const Config = editableConfig(Schema.object({
|
|
|
27
29
|
effortDefault: Schema.string().required(false),
|
|
28
30
|
whale: Schema.boolean().default(true),
|
|
29
31
|
whaleIdle: Schema.boolean().default(true),
|
|
32
|
+
// The face registry grows with new releases, so this is a transform rather
|
|
33
|
+
// than a union: any string parses and junk lands on `daily` at parse time
|
|
34
|
+
// (a union would fail the whole boot on a stale id). The `/settings` field
|
|
35
|
+
// offers exactly the registry's ids. The default is deliberately NOT a
|
|
36
|
+
// `.default()` here — the volatile wrapper swallows it (same shape as
|
|
37
|
+
// pageMargin, whose unset value also reads `undefined`), so `daily` comes
|
|
38
|
+
// from `normalizeSplashFont` at every read site.
|
|
39
|
+
splashFont: Schema.transform(Schema.string(), value => normalizeSplashFont(value)),
|
|
40
|
+
whaleGirl: Schema.boolean().default(false),
|
|
30
41
|
minimal: Schema.boolean().default(false),
|
|
31
42
|
activity: Schema.boolean().default(true),
|
|
32
43
|
activityFrames: Schema.string().required(false),
|
|
@@ -48,6 +59,16 @@ export const Config = editableConfig(Schema.object({
|
|
|
48
59
|
expandEditor: Schema.boolean().default(true),
|
|
49
60
|
smoothStreaming: Schema.boolean().default(true),
|
|
50
61
|
mermaidDiagrams: Schema.boolean().default(true),
|
|
62
|
+
mathRendering: Schema.union(['auto', 'image', 'unicode', 'source']),
|
|
63
|
+
mathImageScale: Schema.union(['auto', 'large', 'xlarge']),
|
|
64
|
+
mathImageBacking: Schema.union(['transparent', 'terminal']),
|
|
65
|
+
imageBacking: Schema.union(['transparent', 'terminal']),
|
|
66
|
+
latexMath: Schema.boolean(),
|
|
67
|
+
// No `.default()` on purpose (the volatile wrapper swallows it; same rule as
|
|
68
|
+
// splashFont): an unset key must stay distinguishable from an explicit
|
|
69
|
+
// `false`, and the read site already treats undefined as on
|
|
70
|
+
// (`describe().value.recapOnOpen !== false`, see channel.ts).
|
|
71
|
+
recapOnOpen: Schema.boolean(),
|
|
51
72
|
statusBar: Schema.object({
|
|
52
73
|
compact: Schema.boolean().default(DEFAULT_STATUS_BAR.compact),
|
|
53
74
|
model: Schema.boolean().default(DEFAULT_STATUS_BAR.model),
|
|
@@ -78,12 +99,7 @@ export const Config = editableConfig(Schema.object({
|
|
|
78
99
|
approval: Schema.union(['ask', 'never']).required(false),
|
|
79
100
|
permission: Schema.string().required(false),
|
|
80
101
|
})).required(false),
|
|
81
|
-
}),
|
|
82
|
-
'diffLayout', 'thinkingFold', 'toolBackground', 'scrollGutter', 'pageMargin',
|
|
83
|
-
'foldTerminalCommand', 'promptSessionLabel', 'expandEditor', 'smoothStreaming',
|
|
84
|
-
'mermaidDiagrams', 'effortDefault', 'statusBar', 'whale', 'whaleIdle', 'minimal',
|
|
85
|
-
'lang', 'fullscreen', 'terminalImages', 'shortcuts',
|
|
86
|
-
]);
|
|
102
|
+
}), EDITABLE_CONFIG_KEYS);
|
|
87
103
|
/**
|
|
88
104
|
* Start the interactive TUI front door, delegating to the JSX implementation
|
|
89
105
|
* in `./plugin.tsx` (see its module doc for the full contract).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/migrate/adapters/claude-code.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAmC,gBAAgB,EAA+D,MAAM,aAAa,CAAA;AA8DjJ,eAAO,MAAM,iBAAiB,EAAE,gBA8C/B,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code adapter: `~/.claude/projects/<munged-cwd>/<session>.jsonl`.
|
|
3
|
+
* File discovery lives here; the line format is parsed by the pure
|
|
4
|
+
* claude-code.parse.ts. The browse scan derives each summary from the same
|
|
5
|
+
* parser run over the file's head, plus a tail window for the /rename title
|
|
6
|
+
* (renames append, the last one wins).
|
|
7
|
+
*
|
|
8
|
+
* @module @deepseek-harness-tui/dsh-tui/migrate/adapters/claude-code
|
|
9
|
+
*/
|
|
10
|
+
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
11
|
+
import { homedir } from 'node:os';
|
|
12
|
+
import { basename, dirname, join } from 'node:path';
|
|
13
|
+
import { parseJsonl } from '../parse/jsonl.js';
|
|
14
|
+
import { normalizeTitle } from '../parse/title.js';
|
|
15
|
+
import { parseClaudeTranscript } from './claude-code.parse.js';
|
|
16
|
+
import { countEntries } from './scan.js';
|
|
17
|
+
import { fingerprintOf, loadText, readTail, runScan, walkFiles, withHead } from './scan-fs.js';
|
|
18
|
+
/** Sub-agent transcripts (`<session>/subagents/*.jsonl`) belong to their
|
|
19
|
+
* parent session; they are never conversations of their own. */
|
|
20
|
+
const SUBAGENT_DIR = 'subagents';
|
|
21
|
+
const WALK = { maxDepth: 3, match: name => name.endsWith('.jsonl'), skipDirs: [SUBAGENT_DIR] };
|
|
22
|
+
/** Tail window searched for the latest /rename title. */
|
|
23
|
+
const TITLE_TAIL_BYTES = 64 * 1024;
|
|
24
|
+
/** File name without `.jsonl`: the session's stable source id. */
|
|
25
|
+
const fileStemOf = (path) => basename(path).replace(/\.jsonl$/u, '');
|
|
26
|
+
/** cwd guessed from the project directory name, for logs whose lines record none. */
|
|
27
|
+
const fallbackCwdOf = (path) => unmunge(basename(dirname(path))) ?? homedir();
|
|
28
|
+
/** The last /rename title in a tail window, when there is one. */
|
|
29
|
+
function tailRenameTitle(tail) {
|
|
30
|
+
let title;
|
|
31
|
+
for (const record of parseJsonl(tail).records) {
|
|
32
|
+
if (record.type === 'custom-title' && typeof record.customTitle === 'string' && record.customTitle.trim() !== '')
|
|
33
|
+
title = record.customTitle;
|
|
34
|
+
}
|
|
35
|
+
return title;
|
|
36
|
+
}
|
|
37
|
+
async function summarize({ ref, fp }) {
|
|
38
|
+
const input = { fileStem: fileStemOf(ref), fallbackCwd: fallbackCwdOf(ref) };
|
|
39
|
+
const found = await withHead(ref, fp.size, (raw, whole) => {
|
|
40
|
+
const session = parseClaudeTranscript({ ...input, raw });
|
|
41
|
+
return session === undefined ? undefined : { session, whole };
|
|
42
|
+
});
|
|
43
|
+
if (found === undefined)
|
|
44
|
+
return null;
|
|
45
|
+
const { session, whole } = found;
|
|
46
|
+
const renamed = whole ? undefined : tailRenameTitle(await readTail(ref, TITLE_TAIL_BYTES, fp.size));
|
|
47
|
+
return {
|
|
48
|
+
agentId: 'claude-code',
|
|
49
|
+
sessionKey: session.sourceId,
|
|
50
|
+
ref,
|
|
51
|
+
title: renamed === undefined ? session.title ?? '' : normalizeTitle(renamed),
|
|
52
|
+
cwd: session.cwd,
|
|
53
|
+
lastMessageAt: fp.mtimeMs,
|
|
54
|
+
createdAt: session.startedAt || fp.mtimeMs,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function readOne(path, fallbackCwd) {
|
|
58
|
+
let raw;
|
|
59
|
+
try {
|
|
60
|
+
raw = readFileSync(path, 'utf8');
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
// basename(), not split('/'): join() produces `\` separators on Windows, so
|
|
66
|
+
// splitting on '/' would leave the WHOLE absolute path as the id — and the
|
|
67
|
+
// id is the dedupe key (moving the source store would re-import everything).
|
|
68
|
+
return parseClaudeTranscript({ raw, fileStem: fileStemOf(path), fallbackCwd });
|
|
69
|
+
}
|
|
70
|
+
export const claudeCodeAdapter = {
|
|
71
|
+
id: 'claude-code',
|
|
72
|
+
label: 'Claude Code',
|
|
73
|
+
roots: () => [join(homedir(), '.claude', 'projects')],
|
|
74
|
+
discover() {
|
|
75
|
+
const roots = this.roots();
|
|
76
|
+
const sessions = [];
|
|
77
|
+
const walk = (dir, depth, fallbackCwd) => {
|
|
78
|
+
if (depth > 3)
|
|
79
|
+
return;
|
|
80
|
+
let entries;
|
|
81
|
+
try {
|
|
82
|
+
entries = readdirSync(dir, { withFileTypes: true });
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
for (const entry of entries) {
|
|
88
|
+
const path = join(dir, entry.name);
|
|
89
|
+
if (entry.isDirectory()) {
|
|
90
|
+
if (entry.name !== SUBAGENT_DIR)
|
|
91
|
+
walk(path, depth + 1, unmunge(entry.name) ?? fallbackCwd);
|
|
92
|
+
}
|
|
93
|
+
else if (entry.isFile() && entry.name.endsWith('.jsonl')) {
|
|
94
|
+
try {
|
|
95
|
+
if (statSync(path).size > 64 * 1024 * 1024)
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const session = readOne(path, fallbackCwd);
|
|
102
|
+
if (session !== undefined)
|
|
103
|
+
sessions.push(session);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
for (const root of roots)
|
|
108
|
+
walk(root, 0, homedir());
|
|
109
|
+
return { roots, sessions };
|
|
110
|
+
},
|
|
111
|
+
count() {
|
|
112
|
+
return countEntries(this.roots(), { maxDepth: WALK.maxDepth, fileMatch: WALK.match, skipDirs: WALK.skipDirs });
|
|
113
|
+
},
|
|
114
|
+
walk: WALK,
|
|
115
|
+
async scan(options) {
|
|
116
|
+
const files = walkFiles(this.roots(), { ...WALK, signal: options?.signal });
|
|
117
|
+
return runScan(files, file => file.path, fingerprintOf, options, summarize);
|
|
118
|
+
},
|
|
119
|
+
async load(ref) {
|
|
120
|
+
const raw = await loadText(ref);
|
|
121
|
+
if (typeof raw !== 'string')
|
|
122
|
+
return raw;
|
|
123
|
+
return parseClaudeTranscript({ raw, fileStem: fileStemOf(ref), fallbackCwd: fallbackCwdOf(ref) }) ?? { skip: 'not-a-session' };
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
/** Best-effort inverse of Claude Code's dash-munged directory names. */
|
|
127
|
+
function unmunge(name) {
|
|
128
|
+
if (!name.startsWith('-'))
|
|
129
|
+
return undefined;
|
|
130
|
+
return `/${name.split('-').filter(Boolean).join('/')}`;
|
|
131
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MigrationSession } from '../types.js';
|
|
2
|
+
/** What the adapter knows about a transcript besides its text. */
|
|
3
|
+
export interface ClaudeTranscriptInput {
|
|
4
|
+
readonly raw: string;
|
|
5
|
+
/** File name without `.jsonl` — the session's stable source id. */
|
|
6
|
+
readonly fileStem: string;
|
|
7
|
+
/** cwd derived from the project directory name, used when no line records one. */
|
|
8
|
+
readonly fallbackCwd: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Parse one Claude Code transcript.
|
|
12
|
+
* @returns The session, or undefined when it holds no human prompt or is an
|
|
13
|
+
* auxiliary transcript (its records name another session: only the main
|
|
14
|
+
* `<sessionId>.jsonl` is a conversation of its own).
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseClaudeTranscript(input: ClaudeTranscriptInput): MigrationSession | undefined;
|
|
17
|
+
//# sourceMappingURL=claude-code.parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-code.parse.d.ts","sourceRoot":"","sources":["../../../../../src/dsh-adapter/migrate/adapters/claude-code.parse.ts"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAA4C,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE7F,kEAAkE;AAClE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,kFAAkF;IAClF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAwFD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,GAAG,SAAS,CA+KhG"}
|