@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.
Files changed (484) hide show
  1. package/README.md +55 -20
  2. package/assets/whale-girl/whale-girl-dark.png +0 -0
  3. package/assets/whale-girl/whale-girl-happy.png +0 -0
  4. package/assets/whale-girl/whale-girl.png +0 -0
  5. package/bin/dsh-tui.js +63 -3
  6. package/cordis.patch.yml +43 -20
  7. package/cordis.yml +6 -4
  8. package/lib/settings.json +1272 -0
  9. package/lib/types/activityPrefs.d.ts +24 -0
  10. package/lib/types/activityPrefs.d.ts.map +1 -1
  11. package/lib/types/activityPrefs.js +50 -1
  12. package/lib/types/adapter/channel/state.d.ts.map +1 -1
  13. package/lib/types/adapter/channel/state.js +3 -1
  14. package/lib/types/adapter/channel/ui-policy.d.ts +9 -2
  15. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  16. package/lib/types/adapter/channel/ui-policy.js +14 -1
  17. package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
  18. package/lib/types/adapter/kernel/replay.js +2 -0
  19. package/lib/types/adapter/ports/channel-display.d.ts +12 -0
  20. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  21. package/lib/types/adapter/ports/channel-session.d.ts +38 -0
  22. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  23. package/lib/types/adapter/ports/channel-settings.d.ts +12 -0
  24. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  25. package/lib/types/adapter/ports/channel-ui.d.ts +53 -7
  26. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  27. package/lib/types/adapter/ports/channel-view.d.ts +43 -12
  28. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  29. package/lib/types/adapter/ports/channel.d.ts +4 -1
  30. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  31. package/lib/types/commands.d.ts.map +1 -1
  32. package/lib/types/commands.js +2 -0
  33. package/lib/types/components/ActivityLine.d.ts +7 -2
  34. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  35. package/lib/types/components/ActivityLine.js +0 -8
  36. package/lib/types/components/BalanceReportRow.d.ts +10 -2
  37. package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
  38. package/lib/types/components/BalanceReportRow.js +18 -4
  39. package/lib/types/components/CompactionStatusRow.d.ts +24 -0
  40. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
  41. package/lib/types/components/CompactionStatusRow.js +72 -0
  42. package/lib/types/components/GoalTodoPanel.js +2 -2
  43. package/lib/types/components/HelpMenu.d.ts +2 -2
  44. package/lib/types/components/HelpMenu.d.ts.map +1 -1
  45. package/lib/types/components/HelpMenu.js +5 -4
  46. package/lib/types/components/InlineMathParagraph.d.ts +22 -0
  47. package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
  48. package/lib/types/components/InlineMathParagraph.js +178 -0
  49. package/lib/types/components/LogoV2.d.ts +41 -3
  50. package/lib/types/components/LogoV2.d.ts.map +1 -1
  51. package/lib/types/components/LogoV2.js +148 -24
  52. package/lib/types/components/Markdown.d.ts +10 -3
  53. package/lib/types/components/Markdown.d.ts.map +1 -1
  54. package/lib/types/components/Markdown.js +47 -14
  55. package/lib/types/components/MathBlock.d.ts +13 -0
  56. package/lib/types/components/MathBlock.d.ts.map +1 -0
  57. package/lib/types/components/MathBlock.js +136 -0
  58. package/lib/types/components/MessageList.d.ts +10 -1
  59. package/lib/types/components/MessageList.d.ts.map +1 -1
  60. package/lib/types/components/MessageList.js +15 -5
  61. package/lib/types/components/MigratePicker.d.ts +30 -0
  62. package/lib/types/components/MigratePicker.d.ts.map +1 -0
  63. package/lib/types/components/MigratePicker.js +38 -0
  64. package/lib/types/components/PromptInput.d.ts +17 -0
  65. package/lib/types/components/PromptInput.d.ts.map +1 -1
  66. package/lib/types/components/PromptInput.js +96 -9
  67. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  68. package/lib/types/components/SplitDiffView.js +3 -1
  69. package/lib/types/components/StarPrompt.d.ts +53 -0
  70. package/lib/types/components/StarPrompt.d.ts.map +1 -0
  71. package/lib/types/components/StarPrompt.js +281 -0
  72. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  73. package/lib/types/components/StreamingMarkdown.js +20 -3
  74. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  75. package/lib/types/components/SubagentCard.js +12 -6
  76. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  77. package/lib/types/components/SubagentDetailScene.js +8 -3
  78. package/lib/types/components/TimelineRail.d.ts.map +1 -1
  79. package/lib/types/components/TimelineRail.js +9 -1
  80. package/lib/types/components/Whale.d.ts +17 -8
  81. package/lib/types/components/Whale.d.ts.map +1 -1
  82. package/lib/types/components/Whale.js +25 -15
  83. package/lib/types/components/WhaleGirl.d.ts +29 -0
  84. package/lib/types/components/WhaleGirl.d.ts.map +1 -0
  85. package/lib/types/components/WhaleGirl.js +32 -0
  86. package/lib/types/components/WorkingSpinner.d.ts +4 -1
  87. package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
  88. package/lib/types/components/WorkingSpinner.js +2 -2
  89. package/lib/types/components/bigfont.d.ts +47 -18
  90. package/lib/types/components/bigfont.d.ts.map +1 -1
  91. package/lib/types/components/bigfont.js +55 -40
  92. package/lib/types/components/design-system/HintLine.d.ts +1 -2
  93. package/lib/types/components/design-system/HintLine.d.ts.map +1 -1
  94. package/lib/types/components/design-system/HintLine.js +1 -2
  95. package/lib/types/components/design-system/ThemeProvider.d.ts +6 -0
  96. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
  97. package/lib/types/components/design-system/ThemeProvider.js +40 -1
  98. package/lib/types/components/maidPortrait.d.ts +44 -0
  99. package/lib/types/components/maidPortrait.d.ts.map +1 -0
  100. package/lib/types/components/maidPortrait.js +178 -0
  101. package/lib/types/components/mathPreview.d.ts +25 -0
  102. package/lib/types/components/mathPreview.d.ts.map +1 -0
  103. package/lib/types/components/mathPreview.js +48 -0
  104. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
  105. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  106. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -2
  107. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -2
  108. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  109. package/lib/types/components/messages/AssistantToolUseMessage.js +31 -26
  110. package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
  111. package/lib/types/components/messages/TranscriptImages.js +11 -1
  112. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
  113. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  114. package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
  115. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  116. package/lib/types/components/questions/PlanReviewPanel.js +3 -3
  117. package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
  118. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
  119. package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
  120. package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
  121. package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
  122. package/lib/types/components/sessions/SourceTabs.js +70 -0
  123. package/lib/types/components/splashEggs.d.ts +56 -0
  124. package/lib/types/components/splashEggs.d.ts.map +1 -0
  125. package/lib/types/components/splashEggs.js +67 -0
  126. package/lib/types/components/splashFonts.d.ts +119 -0
  127. package/lib/types/components/splashFonts.d.ts.map +1 -0
  128. package/lib/types/components/splashFonts.js +267 -0
  129. package/lib/types/components/splashLayout.d.ts +41 -0
  130. package/lib/types/components/splashLayout.d.ts.map +1 -0
  131. package/lib/types/components/splashLayout.js +40 -0
  132. package/lib/types/components/whaleGirlSprite.d.ts +17 -0
  133. package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
  134. package/lib/types/components/whaleGirlSprite.js +47 -0
  135. package/lib/types/deepseekPricing.d.ts +74 -0
  136. package/lib/types/deepseekPricing.d.ts.map +1 -1
  137. package/lib/types/deepseekPricing.js +110 -11
  138. package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
  139. package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
  140. package/lib/types/dsh-adapter/activity-store.js +359 -0
  141. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
  142. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
  143. package/lib/types/dsh-adapter/channel/action-readiness.js +6 -1
  144. package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -1
  145. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/channel/background-action.js +2 -0
  147. package/lib/types/dsh-adapter/channel/binding-events.d.ts +15 -14
  148. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/channel/binding-events.js +70 -21
  150. package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -2
  151. package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
  152. package/lib/types/dsh-adapter/channel/compaction.js +35 -4
  153. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
  155. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -2
  156. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  157. package/lib/types/dsh-adapter/channel/model-switch.js +6 -2
  158. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  159. package/lib/types/dsh-adapter/channel/paths.js +7 -1
  160. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  161. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  162. package/lib/types/dsh-adapter/channel/preferences.js +16 -0
  163. package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
  164. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  165. package/lib/types/dsh-adapter/channel/projection.js +127 -17
  166. package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
  167. package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
  168. package/lib/types/dsh-adapter/channel/question-record.js +107 -0
  169. package/lib/types/dsh-adapter/channel/session-adoption.d.ts +1 -1
  170. package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
  171. package/lib/types/dsh-adapter/channel/session-adoption.js +1 -0
  172. package/lib/types/dsh-adapter/channel/session-lineage.d.ts +42 -0
  173. package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
  174. package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
  175. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -1
  176. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/channel/session-live-adoption.js +10 -3
  178. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
  179. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/session-metadata.js +43 -9
  181. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  182. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
  184. package/lib/types/dsh-adapter/channel/session-resume.d.ts +2 -1
  185. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  186. package/lib/types/dsh-adapter/channel/session-resume.js +5 -2
  187. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  188. package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
  189. package/lib/types/dsh-adapter/channel/state.d.ts +19 -1
  190. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/channel/state.js +8 -3
  192. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +32 -17
  193. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  194. package/lib/types/dsh-adapter/channel/subagent-projection.js +309 -8
  195. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  196. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  197. package/lib/types/dsh-adapter/channel.d.ts +1 -1
  198. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel.js +34 -18
  200. package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
  201. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/compat/index.js +1 -1
  203. package/lib/types/dsh-adapter/compat/messages.d.ts +6 -0
  204. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
  205. package/lib/types/dsh-adapter/compat/messages.js +9 -0
  206. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +18 -0
  207. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  208. package/lib/types/dsh-adapter/compat/sessionLog.js +18 -3
  209. package/lib/types/dsh-adapter/compat/settings.d.ts +2 -0
  210. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
  211. package/lib/types/dsh-adapter/compat/settings.js +14 -0
  212. package/lib/types/dsh-adapter/contract.d.ts +5 -4
  213. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  214. package/lib/types/dsh-adapter/contract.js +9 -5
  215. package/lib/types/dsh-adapter/index.d.ts +36 -1
  216. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  217. package/lib/types/dsh-adapter/index.js +22 -6
  218. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
  219. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
  220. package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
  221. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
  222. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
  223. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
  224. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
  225. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
  226. package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
  227. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
  228. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
  229. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
  230. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
  231. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
  232. package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
  233. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
  234. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
  235. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
  236. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
  237. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
  238. package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
  239. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
  240. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
  241. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
  242. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
  243. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
  244. package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
  245. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
  246. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
  247. package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
  248. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
  249. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
  250. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
  251. package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
  252. package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
  253. package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
  254. package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
  255. package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
  256. package/lib/types/dsh-adapter/migrate/browse.js +90 -0
  257. package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
  258. package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
  259. package/lib/types/dsh-adapter/migrate/cli.js +106 -0
  260. package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
  261. package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
  262. package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
  263. package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
  264. package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
  265. package/lib/types/dsh-adapter/migrate/index.js +107 -0
  266. package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
  267. package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
  268. package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
  269. package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
  270. package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
  271. package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
  272. package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
  273. package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
  274. package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
  275. package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
  276. package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
  277. package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
  278. package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
  279. package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
  280. package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
  281. package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
  282. package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
  283. package/lib/types/dsh-adapter/migrate/picker.js +86 -0
  284. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
  285. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
  286. package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
  287. package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
  288. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
  289. package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
  290. package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
  291. package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
  292. package/lib/types/dsh-adapter/migrate/types.js +11 -0
  293. package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
  294. package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
  295. package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
  296. package/lib/types/dsh-adapter/plugin.d.ts +5 -3
  297. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  298. package/lib/types/dsh-adapter/plugin.js +168 -372
  299. package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
  300. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  301. package/lib/types/dsh-adapter/providerWizard.js +254 -66
  302. package/lib/types/dsh-adapter/questions.d.ts +22 -15
  303. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  304. package/lib/types/dsh-adapter/questions.js +47 -45
  305. package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
  306. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
  307. package/lib/types/dsh-adapter/sessions/digest.js +20 -13
  308. package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
  309. package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
  310. package/lib/types/dsh-adapter/sessions/frames.js +5 -4
  311. package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
  312. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
  313. package/lib/types/dsh-adapter/sessions/list.js +188 -164
  314. package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
  315. package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
  316. package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
  317. package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
  318. package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
  319. package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
  320. package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
  321. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
  322. package/lib/types/dsh-adapter/sessions/store.js +62 -25
  323. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  324. package/lib/types/dsh-adapter/settings-sections.js +7 -4
  325. package/lib/types/dsh-adapter/sideQuestion.d.ts +41 -2
  326. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
  327. package/lib/types/dsh-adapter/sideQuestion.js +98 -2
  328. package/lib/types/dsh-adapter/subagents.d.ts +44 -6
  329. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  330. package/lib/types/dsh-adapter/subagents.js +163 -26
  331. package/lib/types/herdr.d.ts +2 -0
  332. package/lib/types/herdr.d.ts.map +1 -1
  333. package/lib/types/herdr.js +9 -3
  334. package/lib/types/history.d.ts +13 -1
  335. package/lib/types/history.d.ts.map +1 -1
  336. package/lib/types/history.js +15 -2
  337. package/lib/types/i18n.d.ts +512 -41
  338. package/lib/types/i18n.d.ts.map +1 -1
  339. package/lib/types/i18n.js +199 -20
  340. package/lib/types/ink/components/App.d.ts +2 -2
  341. package/lib/types/ink/components/App.d.ts.map +1 -1
  342. package/lib/types/ink/components/App.js +5 -1
  343. package/lib/types/ink/components/Image.d.ts +14 -1
  344. package/lib/types/ink/components/Image.d.ts.map +1 -1
  345. package/lib/types/ink/components/Image.js +2 -2
  346. package/lib/types/ink/events/input-event.js +3 -3
  347. package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
  348. package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
  349. package/lib/types/ink/hooks/use-terminal-images.js +13 -0
  350. package/lib/types/ink/ink.d.ts +6 -0
  351. package/lib/types/ink/ink.d.ts.map +1 -1
  352. package/lib/types/ink/ink.js +16 -1
  353. package/lib/types/ink/kitty-graphics.d.ts +44 -3
  354. package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
  355. package/lib/types/ink/kitty-graphics.js +184 -23
  356. package/lib/types/ink/log-update.d.ts.map +1 -1
  357. package/lib/types/ink/log-update.js +19 -1
  358. package/lib/types/ink/output.d.ts +24 -2
  359. package/lib/types/ink/output.d.ts.map +1 -1
  360. package/lib/types/ink/output.js +83 -5
  361. package/lib/types/ink/parse-keypress.d.ts +26 -1
  362. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  363. package/lib/types/ink/parse-keypress.js +156 -13
  364. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  365. package/lib/types/ink/render-node-to-output.js +8 -1
  366. package/lib/types/ink/screen.d.ts +24 -0
  367. package/lib/types/ink/screen.d.ts.map +1 -1
  368. package/lib/types/ink/screen.js +89 -0
  369. package/lib/types/ink/selection.d.ts +68 -18
  370. package/lib/types/ink/selection.d.ts.map +1 -1
  371. package/lib/types/ink/selection.js +178 -31
  372. package/lib/types/ink/sixel-codec.d.ts +12 -1
  373. package/lib/types/ink/sixel-codec.d.ts.map +1 -1
  374. package/lib/types/ink/sixel-codec.js +29 -5
  375. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  376. package/lib/types/ink/sixel-graphics.js +5 -3
  377. package/lib/types/ink/styles.d.ts +9 -0
  378. package/lib/types/ink/styles.d.ts.map +1 -1
  379. package/lib/types/ink/terminal-image.d.ts +8 -0
  380. package/lib/types/ink/terminal-image.d.ts.map +1 -1
  381. package/lib/types/ink/terminal-querier.d.ts +7 -1
  382. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  383. package/lib/types/ink/terminal-querier.js +12 -2
  384. package/lib/types/ink/timeline-rail.d.ts +5 -0
  385. package/lib/types/ink/timeline-rail.d.ts.map +1 -1
  386. package/lib/types/math/inline-layout.d.ts +29 -0
  387. package/lib/types/math/inline-layout.d.ts.map +1 -0
  388. package/lib/types/math/inline-layout.js +106 -0
  389. package/lib/types/math/layout.d.ts +58 -0
  390. package/lib/types/math/layout.d.ts.map +1 -0
  391. package/lib/types/math/layout.js +59 -0
  392. package/lib/types/math/renderer.d.ts +64 -0
  393. package/lib/types/math/renderer.d.ts.map +1 -0
  394. package/lib/types/math/renderer.js +256 -0
  395. package/lib/types/screens/Chat.d.ts +17 -1
  396. package/lib/types/screens/Chat.d.ts.map +1 -1
  397. package/lib/types/screens/Chat.js +618 -57
  398. package/lib/types/screens/SessionSupervisor.d.ts +2 -1
  399. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  400. package/lib/types/screens/SessionSupervisor.js +156 -19
  401. package/lib/types/screens/Settings.d.ts.map +1 -1
  402. package/lib/types/screens/Settings.js +49 -11
  403. package/lib/types/screens/StatusLine.d.ts +5 -1
  404. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  405. package/lib/types/screens/StatusLine.js +47 -17
  406. package/lib/types/screens/chatOverlay.d.ts +5 -0
  407. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  408. package/lib/types/screens/chatOverlay.js +1 -0
  409. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
  410. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
  411. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
  412. package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
  413. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
  414. package/lib/types/screens/sessionSupervisor/model.js +26 -0
  415. package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
  416. package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
  417. package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
  418. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
  419. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  420. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
  421. package/lib/types/sessionHistory.d.ts +2 -2
  422. package/lib/types/sessionHistory.d.ts.map +1 -1
  423. package/lib/types/sessionHistory.js +31 -5
  424. package/lib/types/settings/definitions.d.ts +681 -0
  425. package/lib/types/settings/definitions.d.ts.map +1 -0
  426. package/lib/types/settings/definitions.js +511 -0
  427. package/lib/types/starAction.d.ts +44 -0
  428. package/lib/types/starAction.d.ts.map +1 -0
  429. package/lib/types/starAction.js +52 -0
  430. package/lib/types/terminal-utils/latex.d.ts +10 -0
  431. package/lib/types/terminal-utils/latex.d.ts.map +1 -0
  432. package/lib/types/terminal-utils/latex.js +1417 -0
  433. package/lib/types/terminal-utils/markdown.d.ts +3 -1
  434. package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
  435. package/lib/types/terminal-utils/markdown.js +26 -1
  436. package/lib/types/terminal-utils/math.d.ts +66 -0
  437. package/lib/types/terminal-utils/math.d.ts.map +1 -0
  438. package/lib/types/terminal-utils/math.js +337 -0
  439. package/lib/types/tips.d.ts.map +1 -1
  440. package/lib/types/tips.js +6 -0
  441. package/lib/types/tuiDisplayPrefs.d.ts +67 -0
  442. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  443. package/lib/types/tuiDisplayPrefs.js +59 -0
  444. package/lib/types/ui.d.ts +1 -1
  445. package/lib/types/ui.d.ts.map +1 -1
  446. package/lib/types/ui.js +1 -1
  447. package/lib/types/usageStats.d.ts +98 -0
  448. package/lib/types/usageStats.d.ts.map +1 -0
  449. package/lib/types/usageStats.js +169 -0
  450. package/lib/types/utils/bmp.d.ts +17 -0
  451. package/lib/types/utils/bmp.d.ts.map +1 -0
  452. package/lib/types/utils/bmp.js +154 -0
  453. package/lib/types/utils/clipboard.d.ts +14 -2
  454. package/lib/types/utils/clipboard.d.ts.map +1 -1
  455. package/lib/types/utils/clipboard.js +143 -8
  456. package/lib/types/utils/fold-long-lines.d.ts +1 -1
  457. package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
  458. package/lib/types/utils/fold-long-lines.js +3 -2
  459. package/lib/types/utils/keymap.d.ts +4 -1
  460. package/lib/types/utils/keymap.d.ts.map +1 -1
  461. package/lib/types/utils/keymap.js +8 -0
  462. package/lib/types/utils/modifiers.d.ts +4 -3
  463. package/lib/types/utils/modifiers.d.ts.map +1 -1
  464. package/lib/types/utils/modifiers.js +4 -3
  465. package/lib/types/working-activity.d.ts +10 -9
  466. package/lib/types/working-activity.d.ts.map +1 -1
  467. package/lib/types/working-activity.js +17 -10
  468. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
  469. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
  470. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
  471. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
  472. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
  473. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
  474. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
  475. package/package.json +117 -99
  476. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +0 -19
  477. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +0 -1
  478. package/lib/types/components/design-system/KeyboardShortcutHint.js +0 -14
  479. package/lib/types/dsh-adapter/channel/activity.d.ts +0 -20
  480. package/lib/types/dsh-adapter/channel/activity.d.ts.map +0 -1
  481. package/lib/types/dsh-adapter/channel/activity.js +0 -113
  482. package/lib/types/terminal-utils/terminal.d.ts +0 -18
  483. package/lib/types/terminal-utils/terminal.d.ts.map +0 -1
  484. package/lib/types/terminal-utils/terminal.js +0 -96
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/assets/logo.svg" alt="dsh-TUI - DeepSeek Harness terminal interface" width="560">
2
+ <img src="docs/assets/readme/logo-en.svg" alt="dsh-TUI animated whale logo" width="560">
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -27,9 +27,10 @@
27
27
  - **Pixel whale pet** — three startup intros, click to wake; freezes after the first task.
28
28
  - **Terminal-native UI** — streaming Markdown, tool cards, `/` and `@` completion, `#L12-14` ranges, history search, zh/en UI.
29
29
  - **Images** — Kitty/Sixel thumbnails, centered preview with zoom and pan, paste-time fitting, text fallback.
30
- - **Mermaid diagrams** — ```` ```mermaid ```` fences drawn as Unicode diagrams.
30
+ - **Mermaid diagrams** — ````mermaid ```` fences drawn as Unicode diagrams.
31
+ - **LaTeX math** — `$…$` and `$$…$$` formulas as Unicode text, fractions and limits stacked in display blocks; `mathRendering: image` typesets block and one-row inline formulas as terminal images on graphics terminals.
31
32
  - **Timeline rail** — every turn clickable; timeline / scrollbar / hidden gutter.
32
- - **Live state** — activity animation, context bar, TPS, cache hit rate, effort, tokens, Git and session metadata.
33
+ - **Live state** — activity animation, context bar, TPS, cache hit rate, effort, tokens, session cost estimate (main + subagents), Git and session metadata.
33
34
  - **One session manager** — `/resume` `/home` `/agentview` `/bg` `⌸`.
34
35
  - **Session workflow** — `/new` `/compact` `/export` `/btw`, model hot-switch, fork, rewind, vim, fullscreen draft editor.
35
36
  - **IDE selection channel** — a VS Code selection lands in the prompt.
@@ -42,20 +43,10 @@ Keys and commands: [Interaction and commands](docs/interaction.en.md). Everythin
42
43
  ## Preview
43
44
 
44
45
  <div align="center">
45
- <table>
46
- <tr>
47
- <td align="center" valign="middle" width="50%">
48
- <img src="screenshots/splash.png" alt="dsh-TUI conversation with the pixel-whale header" width="480">
49
- <br>
50
- <strong>Conversation with the pixel-whale header</strong>
51
- </td>
52
- <td align="center" valign="middle" width="50%">
53
- <img src="screenshots/ide-selection-badge.png" alt="IDE selection badge: live line count under the prompt" width="480">
54
- <br>
55
- <strong>Live IDE selection badge</strong>
56
- </td>
57
- </tr>
58
- </table>
46
+ <picture>
47
+ <source media="(max-width: 640px)" srcset="docs/assets/readme/preview-en-mobile.svg">
48
+ <img src="docs/assets/readme/preview-en.svg" alt="Recorded dsh-TUI session: welcome, completion, help and typing, with animated pixel whale." width="78%">
49
+ </picture>
59
50
  </div>
60
51
 
61
52
  ## Featured & Listed
@@ -92,10 +83,15 @@ Prerequisites: [Node.js](https://nodejs.org/en) and
92
83
  [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness), with
93
84
  `DEEPSEEK_API_KEY` configured.
94
85
 
95
- The primary compatibility target is DSH `0.1.7-rc.1`. This adapter supports its
86
+ The primary compatibility target is DSH `0.2.0-rc.1`. This adapter supports its
96
87
  Shell API, V4 session messages, declarative presets, and profile-backed settings;
97
88
  older supported hosts retain their compatibility paths. See [configuration](docs/configuration.en.md).
98
89
 
90
+ On DSH 0.1.7, `/settings` uses the TUI's actual Loader entry ID, including custom
91
+ IDs. It requires matching profile dependencies with `@deepseek-ai/schemastery`
92
+ 3.18.3 or newer; an incompatible schema stops TUI startup with repair guidance
93
+ instead of showing an uneditable settings page. Older hosts keep their legacy settings scope.
94
+
99
95
  ```sh
100
96
  # Install the CLI and this plugin globally (ships the dsh-tui command)
101
97
  npm install -g @deepseek-ai/dsh @deepseek-harness-tui/dsh-tui
@@ -133,7 +129,35 @@ source builds, and troubleshooting, including migration from the former
133
129
  | `dsh-tui safe` | Read-only diagnostics, plugin inventory and repair guidance; `safe --rescue` builds a clean rescue profile |
134
130
  | `dsh-tui version` · `dsh-tui help` | Launcher and profile versions and usage; both work even without a `dsh` install |
135
131
 
136
- Other arguments go to `dsh --profile dsh-tui`. Safe mode: [Getting started](docs/getting-started.en.md).
132
+ Leading DSH options such as `--dump-config` and `--patch <path>` are forwarded
133
+ unchanged; other arguments go to the app in `dsh --profile dsh-tui`. Use
134
+ `dsh-tui -- --resume=sid-1 ./notes` to send `--resume=sid-1 ./notes` as literal
135
+ prompt text, without selecting a session or workspace. When invoking DSH
136
+ directly, use `dsh --profile dsh-tui -- -- --resume=sid-1 ./notes`: the first
137
+ `--` belongs to DSH, the second to the app. Host options can precede a literal
138
+ prompt: `dsh-tui --patch ./overlay.yml -- --resume=sid-1` applies the overlay
139
+ and sends `--resume=sid-1` as prompt text without resuming that session.
140
+ Safe mode: [Getting started](docs/getting-started.en.md).
141
+
142
+ ### Importing conversations from other agents (`dsh-tui migrate`)
143
+
144
+ Bring Claude Code, Codex, OMP, zcode, or Grok Build conversation histories into the DSH session store, then browse and resume them by their original working directory via `/resume`:
145
+
146
+ ```sh
147
+ dsh-tui migrate # list importable counts per agent (writes nothing)
148
+ dsh-tui migrate claude-code # import every Claude Code conversation (likewise codex / omp / zcode / grok-build)
149
+ dsh-tui migrate codex --dry-run # preview what would land, write nothing
150
+ ```
151
+
152
+ - **Read-only source**: migration only reads the foreign agent's local store; artifacts are written through the official `JsonlSessionPersistence` backend, so imported sessions are first-class (openable, continuable).
153
+ - **Idempotent**: one deterministic UUID per source conversation — re-importing skips what is already present instead of stacking duplicates.
154
+ - **Structure preserved**: user/assistant messages, reasoning traces, tool calls with their results, and the source's context compactions (as native compaction checkpoints) are rebuilt turn by turn; harness-injected machine text opens no turn. An imported session can pick the work straight up.
155
+ In-TUI browsing: the session screen (`/resume`) shows a tab per agent that has conversations; picking one imports just that conversation and opens it.
156
+ In-TUI: `/migrate` (optionally `/migrate <agent> [--dry-run]`) runs the same import in a child process and reports through the notification flow.
157
+ CLI alternative: `dsh-tui migrate ...` from any shell runs the same import.
158
+ Full guide: [Session migration](docs/migrate.en.md).
159
+
160
+ - More agents (pi, opencode, …) extend the adapter registry as adapters land; grok-build reads `GROK_HOME` when set.
137
161
 
138
162
  **VS Code**: use the integrated terminal or the `dsh-tui-vscode` extension. See [VS Code guide](docs/vscode.en.md). **Herdr**: run `dsh-tui` in a [Herdr](https://herdr.dev) pane; `idle` / `working` / `blocked` are reported through its local integration API.
139
163
 
@@ -143,14 +167,24 @@ Other arguments go to `dsh --profile dsh-tui`. Safe mode: [Getting started](docs
143
167
 
144
168
  While the model is working: `Enter` steers, `Tab` queues a follow-up, `Ctrl+Enter` interrupts and sends.
145
169
 
170
+ On native Windows, fragmented Win32 input records are reassembled across short input delays instead of appearing as numeric protocol text. The platform check only reports that this machine might run the private mode (win32-input-mode); a bare `ESC[` fragment is held only after one record has actually been decoded, while a fragment whose own shape is already record-specific holds on its own (which is how even the first record can survive a split). Windows terminals that never enter the mode (mintty, GitBash) therefore keep the classic VT path: a lone `Esc` keeps its normal response time, and a letter typed after a timed-out `ESC[` is not swallowed.
171
+
172
+ Incomplete records are held for a bounded recovery window (1 second from first capture, never extended by later input; 64 bytes max); past either bound the hold ends and input is handled as before. Unrecognized complete CSI sequences are not inserted as text; after a damaged CSI prefix, a bare ASCII letter can be consumed as its terminator, while normal Win32 key records and bracketed-paste text retain their own boundaries.
173
+
174
+ A session's very first record can still leave residue if it is split before its record-specific shape forms; once any record has been decoded, every split position is covered. Inside the recovery window, literal input starting with `[digit;…` cannot be told apart from a protocol prefix — it may be held, or re-joined to a preceding `Esc`. To type it, wait for the window to close, or avoid that shape right after `Esc`.
175
+
146
176
  Mouse (fullscreen): drag to select and copy, double/triple click to select a word or line, click tool cards, timeline ticks and `[Image #N]` previews.
147
177
 
178
+ **Pasting**: native and bracketed paste keeps ordinary text and newlines, and never submits itself on arrival. On Windows terminals that deliver a paste as win32-input-mode key records, the residue is stripped at the entry point (a multi-line paste no longer leaves stray `_`) and pasted CRLF collapses to a single newline; genuine underscores and bracketed-paste text are untouched.
179
+
148
180
  Full reference: [Interaction and commands](docs/interaction.en.md).
149
181
 
150
182
  ## Built-in Commands
151
183
 
152
184
  `/resume` · `/home` · `/agentview` · `/bg` · `⌸` open the same session manager: workspace rail, live state, filter, ★ pins. Also `/model` `/new` `/compact` `/export` `/btw` `/tree` `/fork` `/rewind` `/settings` `/status` `/cost` `/jobs` `/skills` `/mcp` `/login` `/update`.
153
185
 
186
+ The session manager paints the last successful list immediately while it checks the persistence store for changes. Titles that require a deeper log scan appear first with a fallback name and update in place when recovery finishes.
187
+
154
188
  **Background sessions**: `/bg` or `←` on an empty prompt; `Esc` returns. They run in this process and stop when the TUI exits. Logs survive.
155
189
 
156
190
  Full commands: [Interaction and commands](docs/interaction.en.md).
@@ -173,10 +207,11 @@ Runtime path, module boundaries, performance notes and persistence locations: [A
173
207
  ## Known Limitations
174
208
 
175
209
  - Injected plugin context has no standalone display; it counts into the context segments.
176
- - `/model` switches by forking the session; the old session stays in `/resume`.
210
+ - `/model` switches by forking the session; the old session stays in `/resume` (a session nobody has typed into records no branch, so your first prompt there still gets a generated title).
177
211
  - `Ctrl+V` needs platform clipboard tools; unsupported bitmap formats are rejected.
178
212
  - A background session lives inside this process and stops when the TUI exits.
179
213
  - `/thinking` is not persisted; `/compact` is unavailable under the `minimal` preset; `/update` needs a `dsh --profile` launch and is refused while a turn is running.
214
+ - The status-bar `≈¥` and `/cost` are session estimates that include subagent usage (priced per each agent's model × peak/idle × cache components); unofficial or unlisted models show tokens only and are marked unpriced. **The platform bill is authoritative.**
180
215
 
181
216
  Full list: [Architecture and limitations → Known limitations](docs/architecture.en.md#known-limitations).
182
217
 
Binary file
package/bin/dsh-tui.js CHANGED
@@ -432,11 +432,20 @@ const MSG = {
432
432
  `[dsh-tui] \`update\` 需要 profile 的编译产物,但它缺失或版本过旧、不含 CLI 入口。\n` +
433
433
  `请改用手工升级:\n dsh plugin --profile ${PROFILE} add ${PACKAGE}@latest`,
434
434
  },
435
+ migrateUnavailable: {
436
+ en:
437
+ `[dsh-tui] \`migrate\` needs the profile's compiled copy, but it is missing or too old to carry the CLI entry.\n` +
438
+ `Update first:\n dsh-tui update`,
439
+ zh:
440
+ `[dsh-tui] \`migrate\` 需要 profile 的编译产物,但它缺失或版本过旧、不含 CLI 入口。\n` +
441
+ `请先升级:\n dsh-tui update`,
442
+ },
435
443
  helpText: {
436
444
  en:
437
445
  `Usage: dsh-tui|dst [command] [options] [path|url]\n\n` +
438
446
  `Commands:\n` +
439
447
  ` update Update the ${PROFILE} profile to the latest release\n` +
448
+ ` migrate [agent] Import conversations from claude-code/codex/omp/zcode/grok-build (--dry-run to preview)\n` +
440
449
  ` doctor Pre-flight environment checks (dsh/pnpm/profile/key)\n` +
441
450
  ` safe Safe mode: read-only diagnostics, inventory, repair guidance\n` +
442
451
  ` safe --rescue Create/verify the clean rescue profile (starts it in a terminal)\n` +
@@ -445,12 +454,15 @@ const MSG = {
445
454
  `Options:\n` +
446
455
  ` --resume [id] Resume the last (or the given) session\n` +
447
456
  ` -c, --continue Same as --resume\n` +
457
+ ` -- <prompt...> Treat the remaining arguments as literal prompt text\n` +
448
458
  ` <path|url> Open with the given workspace target\n\n` +
449
- `Any other argument is forwarded to \`dsh --profile ${PROFILE}\`.`,
459
+ `Leading DSH options (e.g. --dump-config, --patch <path>) are forwarded unchanged.\n` +
460
+ `Other arguments go to the app in \`dsh --profile ${PROFILE}\`.`,
450
461
  zh:
451
462
  `用法:dsh-tui|dst [命令] [选项] [路径|URL]\n\n` +
452
463
  `命令:\n` +
453
464
  ` update 将 ${PROFILE} profile 升级到最新版本\n` +
465
+ ` migrate [agent] 迁移 claude-code/codex/omp/zcode/grok-build 的对话(--dry-run 预览)\n` +
454
466
  ` doctor 启动前环境诊断(dsh/pnpm/profile/密钥)\n` +
455
467
  ` safe 安全模式:只读诊断、插件清单与修复指引\n` +
456
468
  ` safe --rescue 创建/校验干净的救援 profile(有终端时随即启动它)\n` +
@@ -459,8 +471,10 @@ const MSG = {
459
471
  `选项:\n` +
460
472
  ` --resume [id] 恢复上次(或指定 id 的)会话\n` +
461
473
  ` -c, --continue 同 --resume\n` +
474
+ ` -- <提示词...> 将剩余参数作为字面提示词\n` +
462
475
  ` <路径|URL> 以指定工作区目标启动\n\n` +
463
- `其余参数原样转发给 \`dsh --profile ${PROFILE}\`。`,
476
+ `前置 DSH 选项(如 --dump-config、--patch <路径>)原样转发。\n` +
477
+ `其余参数交给 \`dsh --profile ${PROFILE}\` 中的应用。`,
464
478
  },
465
479
  }
466
480
  const msg = key => MSG[key][lang]
@@ -1234,6 +1248,26 @@ if (subcommand === 'update') {
1234
1248
  process.exit(await cliUpdate(PROFILE))
1235
1249
  }
1236
1250
 
1251
+ // ─── 子命令:migrate ─────────────────────────────────────────────────────────
1252
+ // 跨代理会话迁移(claude-code / codex / omp → DSH sessions)。与 update 同
1253
+ // 一条委托路径:动态 import **profile 的**编译产物(瘦壳零 lib 依赖不变),
1254
+ // 落盘走上游官方 JsonlSessionPersistence(见 src/dsh-adapter/migrate/)。
1255
+ // profile 未初始化时先自举;产物缺失或旧版无 cliMigrate 导出给升级指引。
1256
+ if (subcommand === 'migrate') {
1257
+ if (!profileReady()) bootstrapProfile()
1258
+ let cliMigrate
1259
+ try {
1260
+ ;({ cliMigrate } = await import(pathToFileURL(join(profilePkgDir, 'lib', 'types', 'dsh-adapter', 'migrate', 'cli.js')).href))
1261
+ } catch {
1262
+ cliMigrate = undefined
1263
+ }
1264
+ if (typeof cliMigrate !== 'function') {
1265
+ console.error(msg('migrateUnavailable'))
1266
+ process.exit(1)
1267
+ }
1268
+ process.exit(await cliMigrate(process.argv.slice(3)))
1269
+ }
1270
+
1237
1271
  // ─── 全局副本:瘦壳角色 ───────────────────────────────────────────────────────
1238
1272
  // DSH_TUI_NO_DELEGATE=1 是测试/调试逃生口:强制走完整逻辑(verify-launcher
1239
1273
  // 的沙箱用它直接驱动全量路径;现场排查委托链时同样可用)。
@@ -1302,10 +1336,34 @@ if (!runningInsideProfile && ownVersion !== undefined && process.env.DSH_TUI_NO_
1302
1336
  }
1303
1337
  return ''
1304
1338
  }
1339
+ // Launcher-owned options from DSH apps/cli/src/args.ts. Only classify the
1340
+ // leading prefix here; DSH still owns validation and execution. Keep this
1341
+ // inline: migrated global launchers must not depend on lib/ or other files.
1342
+ const dshValueFlags = new Set(['--profile', '--from-default-profile', '--patch'])
1343
+ const dshSwitches = new Set(['--dump-config', '--dump-default-config', '--dump-config-schema', '-V', '--version'])
1344
+ const hostArgs = []
1305
1345
  const args = []
1306
1346
  const argv = process.argv.slice(2)
1307
1347
  for (let i = 0; i < argv.length; i++) {
1308
1348
  const a = argv[i]
1349
+ if (a === '--') {
1350
+ args.push(...argv.slice(i))
1351
+ break
1352
+ }
1353
+ if (args.length === 0) {
1354
+ const flag = a.split('=', 1)[0]
1355
+ if (dshValueFlags.has(flag)) {
1356
+ hostArgs.push(a)
1357
+ // Required host values are raw tokens, even when flag-shaped. Never
1358
+ // intercept them as a resume flag or an existing workspace path.
1359
+ if (a === flag && argv[i + 1] !== undefined) hostArgs.push(argv[++i])
1360
+ continue
1361
+ }
1362
+ if (dshSwitches.has(a)) {
1363
+ hostArgs.push(a)
1364
+ continue
1365
+ }
1366
+ }
1309
1367
  if (a === '--resume' || a === '-c' || a === '--continue' || a.startsWith('--resume=')) {
1310
1368
  let sessionId = ''
1311
1369
  if (a.startsWith('--resume=')) {
@@ -1331,6 +1389,8 @@ if (!runningInsideProfile && ownVersion !== undefined && process.env.DSH_TUI_NO_
1331
1389
  process.env.DSH_TUI_LAUNCHER_VERSION = ownVersion
1332
1390
  }
1333
1391
 
1334
- const firstArgs = args
1392
+ // DSH consumes its own --; only the app tail belongs behind it. Preserve
1393
+ // the app-level separator too, and replay this same argv on a safe retry.
1394
+ const firstArgs = [...hostArgs, ...(args.length > 0 ? ['--', ...args] : [])]
1335
1395
  settleFirstResult(await startDshSession(firstArgs), firstArgs)
1336
1396
  }
package/cordis.patch.yml CHANGED
@@ -57,20 +57,43 @@
57
57
  # Preserve the TUI's opt-in privacy stance across the 0.1.2 base default
58
58
  # change to FEEDBACK_ONLY. An explicit DSH_TELEMETRY_MODE still wins. This
59
59
  # restates the whole 0.1.2 config because include patches replace config
60
- # objects rather than merging them.
60
+ # objects rather than merging them. The 0.2.0 base moved the collector to
61
+ # dsh-otel-collector and added maxRequestBytes; older cohorts keep the
62
+ # endpoint (and the key set) their base shipped, so both follow the
63
+ # installed package version.
61
64
  - id: session-telemetry-otel
62
- config:
63
- mode: !!js process.env.DSH_TELEMETRY_MODE || 'DISABLED'
64
- shutdownTimeoutMillis: 3000
65
- exporter:
66
- url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
67
- compression: gzip
68
- timeoutMillis: 1000
69
- processor:
70
- scheduledDelayMillis: 10000
71
- maxQueueSize: 2048
72
- maxExportBatchSize: 2048
73
- exportTimeoutMillis: 1500
65
+ config: !!js >-
66
+ (() => {
67
+ let url = 'https://dsh-otel-collector.deepseeksvc.com/v1/logs'
68
+ let modern = false
69
+ try {
70
+ const require = process.getBuiltinModule('node:module').createRequire(ctx.baseUrl)
71
+ const fs = process.getBuiltinModule('node:fs')
72
+ const manifest = require.resolve('@deepseek-ai/dsh-session-telemetry-otel/package.json')
73
+ const version = String(JSON.parse(fs.readFileSync(manifest, 'utf8')).version ?? '')
74
+ const match = /^(\d+)\.(\d+)\./u.exec(version)
75
+ modern = match === null || Number(match[1]) > 0 || Number(match[2]) >= 2
76
+ if (!modern) url = 'https://harness-telemetry.deepseeksvc.com/v1/logs'
77
+ } catch {}
78
+ return {
79
+ mode: process.env.DSH_TELEMETRY_MODE || 'DISABLED',
80
+ shutdownTimeoutMillis: 3000,
81
+ // 0.2.0's base config caps one request at 4 MB; the older plugin's
82
+ // schema has no such key, so only a probed 0.2+ host gets it.
83
+ ...(modern ? { maxRequestBytes: 4000000 } : {}),
84
+ exporter: {
85
+ url: process.env.DSH_TELEMETRY_OTLP_URL ?? url,
86
+ compression: 'gzip',
87
+ timeoutMillis: 1000,
88
+ },
89
+ processor: {
90
+ scheduledDelayMillis: 10000,
91
+ maxQueueSize: 2048,
92
+ maxExportBatchSize: 2048,
93
+ exportTimeoutMillis: 1500,
94
+ },
95
+ }
96
+ })()
74
97
 
75
98
  # The 0.1.2 base sends the active Loader package inventory on official
76
99
  # DeepSeek requests by default. TUI keeps that diagnostic metadata opt-in.
@@ -427,13 +450,12 @@
427
450
  # 想退回 inline 主屏(终端原生滚动/选择):/settings 全屏开关或 cordis.yml
428
451
  # `fullscreen: false`——显式选择始终优先于默认。
429
452
  fullscreen: true
430
- # 在支持的终端预览图片;/settings 可关闭,重启生效。
453
+ # 以下为 /settings 可改的显示设置;每项说明与默认值见应用内 /settings 屏。
431
454
  terminalImages: true
432
- # Edit/Write diff 呈现:auto(≥110 列双栏对照,窄屏统一式)/
433
- # split(强制双栏)/ unified(强制统一式)。/settings 屏可实时改。
434
455
  # diffLayout: auto
435
- # 回复中的 ```mermaid 代码块画成字符图;false 保留源码。/settings 可实时改。
436
456
  # mermaidDiagrams: true
457
+ # 回复中 LaTeX 公式的显示方式:auto(默认,目前为 Unicode)/ image(支持图形的终端里块级公式显示为图片)/ unicode / source(保留源码)。/settings 可实时改。
458
+ # mathRendering: auto
437
459
  # 每个请求实际生效的推理强度,按当前路由的 adapter 档位校验
438
460
  #(deepseek: off/low/high/max);非法值回落 adapter 默认。
439
461
  effort: max
@@ -471,9 +493,10 @@
471
493
  # dependency into the profile root (npm's flat layout hid this), so the
472
494
  # bare name died with ERR_MODULE_NOT_FOUND and disposed the whole app at
473
495
  # boot (#60).
474
- # The plugin stays mounted for its narration/system-prompt features. The
475
- # TUI derives its working line in-process from the base session stream;
476
- # never persist activity/status, so the shared log remains Web-readable.
496
+ # The plugin stays mounted for its narration/system-prompt features and
497
+ # publishes the `workingActivity` session projection, which is where the
498
+ # TUI's working line comes from; never persist activity/status, so the
499
+ # shared log remains Web-readable.
477
500
  - id: working-activity
478
501
  name: '@deepseek-harness-tui/dsh-tui/working-activity'
479
502
  config:
package/cordis.yml CHANGED
@@ -61,10 +61,11 @@
61
61
  # wl-copy/xclip/xsel 兜底)、滚轮滚动、双击选词/三击选行。false 则退回
62
62
  # inline 渲染, 鼠标交给终端模拟器原生选择。
63
63
  fullscreen: true
64
- # 在支持的终端预览图片;/settings 可关闭,重启生效。
64
+ # 以下为 /settings 可改的显示设置;每项说明与默认值见应用内 /settings 屏。
65
65
  terminalImages: true
66
- # 回复中的 ```mermaid 代码块画成字符图;false 保留源码。/settings 可实时改。
67
66
  # mermaidDiagrams: true
67
+ # 回复中 LaTeX 公式的显示方式:auto(默认,目前为 Unicode)/ image(支持图形的终端里块级公式显示为图片)/ unicode / source(保留源码)。/settings 可实时改。
68
+ # mathRendering: auto
68
69
  # Reasoning effort applied to every request, validated against the live
69
70
  # route's adapter levels. An unlisted level falls back to the adapter
70
71
  # default; this wins over the persisted /effort choice and seeds the
@@ -207,8 +208,9 @@
207
208
  - id: command-goal
208
209
  name: '@deepseek-ai/dsh-command-goal'
209
210
 
210
- # Live working line narration support. dsh-tui computes the visible status
211
- # in-process from base session events; activity/status is never persisted.
211
+ # Working line plugin: folds the session stream into the `workingActivity`
212
+ # session projection (≥0.5.0), which the TUI reads as its working-status
213
+ # line; activity/status events are never persisted.
212
214
  # Mounted through @deepseek-harness-tui/dsh-tui's `./working-activity`
213
215
  # re-export (not the bare `dsh-working-activity` name) so the row resolves
214
216
  # from install layouts that never link transitive dependencies into the