@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
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Locate this package's `bin/dsh-tui.js` from a module directory inside it.
3
+ *
4
+ * The TUI's `/migrate` spawns the CLI through the package bin so the import
5
+ * runs in a child process. Callers live at DIFFERENT depths per layout:
6
+ * `src/screens/` at dev time (three levels), `lib/types/screens/` when
7
+ * installed (four levels) — a fixed dirname count lands inside the tree and
8
+ * the spawn fails on every real install (the regression the probe-up walk
9
+ * below replaces; found by the independent test session on a real profile).
10
+ * Probing upward for `bin/dsh-tui.js` matches both layouts without knowing
11
+ * which one we are in — the same spirit as src/update.ts's manifest walk.
12
+ *
13
+ * @module @deepseek-harness-tui/dsh-tui/migrate/bin-path
14
+ */
15
+ import { existsSync } from 'node:fs';
16
+ import { join } from 'node:path';
17
+ /** Upward probe bounds: covers src/screens and lib/types/screens layouts. */
18
+ const PROBE_UP = ['..', '../..', '../../..', '../../../..'];
19
+ /**
20
+ * Resolve `bin/dsh-tui.js` for the package that contains `fromDir`, or
21
+ * undefined when no ancestor within the probe bound carries it.
22
+ */
23
+ export function resolveOwnBin(fromDir) {
24
+ for (const up of PROBE_UP) {
25
+ const candidate = join(fromDir, up, 'bin', 'dsh-tui.js');
26
+ if (existsSync(candidate))
27
+ return candidate;
28
+ }
29
+ return undefined;
30
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Browsing other coding agents' conversations for the session screen's source
3
+ * tabs: which agents have any, what they are, and importing one.
4
+ *
5
+ * Everything that knows how a foreign agent stores its conversations stays in
6
+ * this directory. The channel forwards these three calls unchanged, and the UI
7
+ * sees rows whose `key` it only hands back — never a path, a fingerprint or a
8
+ * source id.
9
+ *
10
+ * Nothing is persisted, and the cost is paid only by the tab that needs it:
11
+ * - opening the session screen probes presence alone — each source's walk
12
+ * stops at its first candidate, a handful of directory reads;
13
+ * - a source is listed when its tab is opened, and within this run an
14
+ * unchanged conversation (same mtime and size) is not read a second time.
15
+ *
16
+ * @module @deepseek-harness-tui/dsh-tui/migrate/browse
17
+ */
18
+ import type { ForeignImportOutcome, ForeignSessionRow, ForeignSource } from '../../adapter/ports/channel-session.js';
19
+ import type { MigrationAdapter } from './types.js';
20
+ /** Whether an adapter can be browsed (summary scan + full load). */
21
+ export declare function isBrowsable(adapter: MigrationAdapter): boolean;
22
+ /**
23
+ * The browser behind one channel.
24
+ * @param persistence - The host's session persistence (imports go through it,
25
+ * so an imported session is immediately visible to resume).
26
+ * @param signal - Aborts in-flight walks when the channel is torn down.
27
+ * @param adapters - Every registered adapter; only browsable ones are used.
28
+ */
29
+ export declare function createForeignBrowser(persistence: () => unknown, signal?: AbortSignal, adapters?: readonly MigrationAdapter[]): {
30
+ /** Sources with at least one candidate, in registry order. */
31
+ listSources(): Promise<readonly ForeignSource[]>;
32
+ /**
33
+ * One source's conversations, newest first. A listing superseded by a
34
+ * newer one of the same source resolves to what is known, without
35
+ * publishing its own result.
36
+ */
37
+ listSessions(agentId: string, onRow?: (row: ForeignSessionRow) => void): Promise<readonly ForeignSessionRow[]>;
38
+ /** Import one listed conversation (or find the copy already imported). */
39
+ importSession(agentId: string, key: string): Promise<ForeignImportOutcome>;
40
+ };
41
+ export type ForeignBrowser = ReturnType<typeof createForeignBrowser>;
42
+ //# sourceMappingURL=browse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browse.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/migrate/browse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAIpH,OAAO,KAAK,EAAsC,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAStF,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAE9D;AAUD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,OAAO,EAC1B,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,GAAE,SAAS,gBAAgB,EAAuB;IAqBxD,8DAA8D;mBACzC,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC;IAKtD;;;;OAIG;0BACyB,MAAM,UAAU,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC;IA2BpH,0EAA0E;2BACnD,MAAM,OAAO,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;EAS7E;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,90 @@
1
+ import { walkFiles } from './adapters/scan-fs.js';
2
+ import { createForeignImporter } from './import-one.js';
3
+ import { MIGRATION_ADAPTERS } from './index.js';
4
+ /** Whether an adapter can be browsed (summary scan + full load). */
5
+ export function isBrowsable(adapter) {
6
+ return adapter.walk !== undefined && adapter.scan !== undefined && adapter.load !== undefined;
7
+ }
8
+ const isAbort = (error) => error instanceof Error && error.name === 'AbortError';
9
+ const newestFirst = (a, b) => b.updatedAt - a.updatedAt;
10
+ function toRow(summary) {
11
+ return { agentId: summary.agentId, key: summary.ref, title: summary.title, cwd: summary.cwd, updatedAt: summary.lastMessageAt };
12
+ }
13
+ /**
14
+ * The browser behind one channel.
15
+ * @param persistence - The host's session persistence (imports go through it,
16
+ * so an imported session is immediately visible to resume).
17
+ * @param signal - Aborts in-flight walks when the channel is torn down.
18
+ * @param adapters - Every registered adapter; only browsable ones are used.
19
+ */
20
+ export function createForeignBrowser(persistence, signal, adapters = MIGRATION_ADAPTERS) {
21
+ const browsable = adapters.filter(isBrowsable);
22
+ const known = new Map();
23
+ const generations = new Map();
24
+ const importer = createForeignImporter(() => persistence());
25
+ const adapterOf = (agentId) => browsable.find(adapter => adapter.id === agentId);
26
+ const rowsOf = (agentId) => {
27
+ const rows = [];
28
+ for (const entry of known.get(agentId)?.values() ?? [])
29
+ if (entry.summary !== null)
30
+ rows.push(toRow(entry.summary));
31
+ return rows.sort(newestFirst);
32
+ };
33
+ /** Whether a source has at least one candidate; the walk stops at the first. */
34
+ const hasCandidate = async (adapter) => {
35
+ for await (const _file of walkFiles(adapter.roots(), { ...adapter.walk, signal }))
36
+ return true;
37
+ return false;
38
+ };
39
+ return {
40
+ /** Sources with at least one candidate, in registry order. */
41
+ async listSources() {
42
+ const present = await Promise.all(browsable.map(adapter => hasCandidate(adapter).catch(() => false)));
43
+ return browsable.filter((_adapter, index) => present[index]).map(adapter => ({ agentId: adapter.id, label: adapter.label }));
44
+ },
45
+ /**
46
+ * One source's conversations, newest first. A listing superseded by a
47
+ * newer one of the same source resolves to what is known, without
48
+ * publishing its own result.
49
+ */
50
+ async listSessions(agentId, onRow) {
51
+ const adapter = adapterOf(agentId);
52
+ if (adapter === undefined)
53
+ return [];
54
+ const generation = (generations.get(agentId) ?? 0) + 1;
55
+ generations.set(agentId, generation);
56
+ const previous = known.get(agentId);
57
+ let scanned;
58
+ try {
59
+ scanned = await adapter.scan({
60
+ signal,
61
+ cached: (ref, fp) => {
62
+ const entry = previous?.get(ref);
63
+ return entry !== undefined && entry.fp.mtimeMs === fp.mtimeMs && entry.fp.size === fp.size ? entry.summary : undefined;
64
+ },
65
+ onEntry: onRow === undefined ? undefined : summary => onRow(toRow(summary)),
66
+ });
67
+ }
68
+ catch (error) {
69
+ // Channel teardown mid-walk: what is known stands.
70
+ if (isAbort(error))
71
+ return rowsOf(agentId);
72
+ throw error;
73
+ }
74
+ if (generations.get(agentId) === generation) {
75
+ known.set(agentId, new Map(scanned.map(entry => [entry.ref, { fp: entry.fp, summary: entry.summary }])));
76
+ }
77
+ return rowsOf(agentId);
78
+ },
79
+ /** Import one listed conversation (or find the copy already imported). */
80
+ importSession(agentId, key) {
81
+ const adapter = adapterOf(agentId);
82
+ if (adapter === undefined)
83
+ return Promise.resolve({ kind: 'failed', reason: 'unknown-source' });
84
+ // A key this run never listed still imports: with no known identity the
85
+ // existence check misses, and the id is derived from what is loaded.
86
+ const summary = known.get(agentId)?.get(key)?.summary ?? undefined;
87
+ return importer.import(adapter, { sessionKey: summary?.sessionKey ?? '', ref: key, cwd: summary?.cwd ?? '' });
88
+ },
89
+ };
90
+ }
@@ -0,0 +1,9 @@
1
+ /** Exit code for "nothing to do / unknown agent". */
2
+ export declare const MIGRATE_CLI_USAGE_EXIT = 2;
3
+ /**
4
+ * Run one migration CLI invocation.
5
+ * @param argv - Arguments after the `migrate` word.
6
+ * @returns Process exit code.
7
+ */
8
+ export declare function cliMigrate(argv: readonly string[]): Promise<number>;
9
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/migrate/cli.ts"],"names":[],"mappings":"AAwBA,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,IAAI,CAAA;AAQvC;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAUzE"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * CLI surface for migration, reached via `dsh-tui migrate ...` (the bin
3
+ * launcher delegates here exactly like it delegates `update`; the TUI's
4
+ * `/migrate` command spawns this same CLI in a child process).
5
+ *
6
+ * Usage:
7
+ * dsh-tui migrate # list agents and discoverable counts (writes nothing)
8
+ * dsh-tui migrate <agent> # import every conversation found from that agent
9
+ * dsh-tui migrate <agent> --dry-run # show what would land, write nothing
10
+ *
11
+ * One agent per run, and `--dry-run` always names one: both are usage errors
12
+ * rather than silent fallbacks, matching the TUI's `/migrate` entry points.
13
+ *
14
+ * Every string that originated OUTSIDE this machine (source ids, cwds, error
15
+ * text embedding them) passes through cleanRenderText before printing: a
16
+ * hostile session file must not be able to drive terminal escape sequences
17
+ * through the preview/report paths (deep-review M2).
18
+ *
19
+ * @module @deepseek-harness-tui/dsh-tui/migrate/cli
20
+ */
21
+ import { cleanRenderText } from '../sanitize.js';
22
+ import { messageCount } from './parse/role-turns.js';
23
+ import { MIGRATION_ADAPTERS, defaultSessionRoot, importSessions } from './index.js';
24
+ /** Exit code for "nothing to do / unknown agent". */
25
+ export const MIGRATE_CLI_USAGE_EXIT = 2;
26
+ /** Bound for one cleaned external string in CLI output (display cells). */
27
+ const RENDER_CELL_BUDGET = 200;
28
+ /** One external-origin string, sanitized to display-safe text. */
29
+ const safe = (value) => cleanRenderText(value, RENDER_CELL_BUDGET);
30
+ /**
31
+ * Run one migration CLI invocation.
32
+ * @param argv - Arguments after the `migrate` word.
33
+ * @returns Process exit code.
34
+ */
35
+ export async function cliMigrate(argv) {
36
+ try {
37
+ return await cliMigrateInner(argv);
38
+ }
39
+ catch (error) {
40
+ // A top-level failure (e.g. persistence never becomes ready because the
41
+ // target root is unwritable) must land as one CLI-style summary line,
42
+ // not a bare Node stack trace (deep-review i1).
43
+ process.stderr.write(`dsh-tui migrate: ${error instanceof Error ? safe(error.message) : String(error)}\n`);
44
+ return 1;
45
+ }
46
+ }
47
+ async function cliMigrateInner(argv) {
48
+ const dryRun = argv.includes('--dry-run');
49
+ const words = argv.filter(word => word !== '--dry-run');
50
+ if (words.length > 1) {
51
+ process.stderr.write('usage: dsh-tui migrate [<agent>] [--dry-run]\n');
52
+ return MIGRATE_CLI_USAGE_EXIT;
53
+ }
54
+ const wanted = words[0];
55
+ if (wanted === undefined) {
56
+ // `--dry-run` previews ONE source, so it needs one named: without this the
57
+ // flag fell through to the listing below and was silently ignored (the
58
+ // TUI's `/migrate --dry-run` says the same thing).
59
+ if (dryRun) {
60
+ process.stderr.write('usage: dsh-tui migrate <agent> --dry-run\n');
61
+ return MIGRATE_CLI_USAGE_EXIT;
62
+ }
63
+ // Bare `migrate` only reports; importing requires an explicit agent.
64
+ for (const adapter of MIGRATION_ADAPTERS) {
65
+ // Name-only count when the adapter offers one: list mode must not pay
66
+ // a full parse of every foreign file (deep-review M3). The count is
67
+ // scan candidates; import filters unreadable/empty ones, so it may
68
+ // land slightly above the imported total.
69
+ const available = adapter.count !== undefined ? adapter.count() : adapter.discover().sessions.length;
70
+ console.log(`[${adapter.id}] ${available} session file(s) to scan (run \`dsh-tui migrate ${adapter.id}\` to import)`);
71
+ }
72
+ return 0;
73
+ }
74
+ const agent = MIGRATION_ADAPTERS.find(adapter => adapter.id === wanted);
75
+ if (agent === undefined) {
76
+ process.stderr.write(`dsh-tui migrate: unknown agent "${safe(wanted)}"; known: ${MIGRATION_ADAPTERS.map(adapter => adapter.id).join(', ')}\n`);
77
+ return MIGRATE_CLI_USAGE_EXIT;
78
+ }
79
+ const found = agent.discover();
80
+ if (found.sessions.length === 0) {
81
+ console.log(`[${agent.id}] no conversations found`);
82
+ return 0;
83
+ }
84
+ if (dryRun) {
85
+ console.log(`[${agent.id}] ${found.sessions.length} conversation(s) would be imported into ${defaultSessionRoot()} (dry run)`);
86
+ for (const session of found.sessions.slice(0, 5)) {
87
+ console.log(` · ${safe(session.sourceId)} (${messageCount(session)} messages · cwd ${safe(session.cwd)})`);
88
+ }
89
+ if (found.sessions.length > 5)
90
+ console.log(` … and ${found.sessions.length - 5} more`);
91
+ return 0;
92
+ }
93
+ console.log(`[${agent.id}] importing ${found.sessions.length} conversation(s) into ${defaultSessionRoot()}`);
94
+ const run = await importSessions(agent, defaultSessionRoot(), found.sessions);
95
+ const parts = [`imported ${run.imported}`];
96
+ if (run.existing > 0)
97
+ parts.push(`already present ${run.existing}`);
98
+ if (run.failed > 0)
99
+ parts.push(`failed ${run.failed}`);
100
+ console.log(`[${agent.id}] ${parts.join(' · ')}`);
101
+ for (const failure of run.failures.slice(0, 10))
102
+ console.log(` ✗ ${safe(failure)}`);
103
+ if (run.failures.length > 10)
104
+ console.log(` … and ${run.failures.length - 10} more`);
105
+ return run.failed > 0 ? 1 : 0;
106
+ }
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Import ONE foreign conversation through the host's persistence service —
3
+ * the session screen's "select to start" path (the CLI batch keeps
4
+ * importSessions, which mounts its own backend).
5
+ *
6
+ * Order is chosen so a failure never leaves a half-written log that the
7
+ * next click would take for "already imported":
8
+ * 1. the deterministic id already exists → open it, nothing is written;
9
+ * 2. the working directory must exist (resuming into a missing cwd fails
10
+ * later and less clearly);
11
+ * 3. the whole conversation is parsed and sessionized in memory;
12
+ * 4. only then create → append → flush → close; a write failure removes
13
+ * what was written, best effort — except a create that lost to a
14
+ * concurrent writer of the same deterministic id: that log is the
15
+ * winner's, and the import simply opens it.
16
+ *
17
+ * @module @deepseek-harness-tui/dsh-tui/migrate/import-one
18
+ */
19
+ import { SessionId, type SessionEvent, type SessionHeader } from '@deepseek-ai/dsh-session';
20
+ import type { LoadSkip, MigrationAdapter, MigrationSession } from './types.js';
21
+ /** Structural slice of the persistence service a single import needs. */
22
+ export interface ImportPersistence {
23
+ create(header: SessionHeader): Promise<ImportWriteHandle>;
24
+ /** Present on current backends: one session's snapshot, undefined when absent. */
25
+ stat?(id: SessionId): Promise<unknown>;
26
+ list(): Promise<readonly {
27
+ header: {
28
+ id: string;
29
+ };
30
+ }[]>;
31
+ }
32
+ export interface ImportWriteHandle {
33
+ append(events: readonly SessionEvent[]): Promise<void>;
34
+ flush(): Promise<void>;
35
+ close(): Promise<void>;
36
+ }
37
+ /** Outcome of one import request. */
38
+ export type ForeignImportResult = {
39
+ readonly kind: 'ready';
40
+ readonly sessionId: string;
41
+ readonly created: boolean;
42
+ } | {
43
+ readonly kind: 'cwd-missing';
44
+ readonly cwd: string;
45
+ } | {
46
+ readonly kind: 'failed';
47
+ readonly reason: LoadSkip['skip'] | 'write-failed';
48
+ readonly detail?: string;
49
+ };
50
+ /** Deterministic DSH session id of one foreign conversation (same as /migrate). */
51
+ export declare function foreignSessionId(agentId: string, sourceId: string): SessionId;
52
+ /**
53
+ * Write one sessionized conversation (the CLI batch path; the single import
54
+ * phases create/append itself so a create race stays out of its cleanup).
55
+ * Both paths produce byte-identical logs: sessionize is deterministic in
56
+ * the id and the events.
57
+ */
58
+ export declare function writeImportedSession(persistence: Pick<ImportPersistence, 'create'>, id: SessionId, agentId: string, session: MigrationSession): Promise<void>;
59
+ export interface ImportRequest {
60
+ /** The listed conversation's stable source id (ForeignSessionSummary.sessionKey). */
61
+ readonly sessionKey: string;
62
+ readonly ref: string;
63
+ /** The listed cwd; '' when the summary did not know it. */
64
+ readonly cwd: string;
65
+ }
66
+ export interface ImportDeps {
67
+ readonly cwdExists?: (path: string) => boolean;
68
+ /** Best-effort removal of a partially written log. */
69
+ readonly discard?: (sessionId: string) => void;
70
+ }
71
+ /**
72
+ * Import one conversation unless it is already present.
73
+ * @returns ready (with whether it was written now), cwd-missing, or failed.
74
+ */
75
+ export declare function importForeignSession(persistence: ImportPersistence, adapter: MigrationAdapter, request: ImportRequest, deps?: ImportDeps): Promise<ForeignImportResult>;
76
+ /**
77
+ * One importer per host: a second request for a conversation already being
78
+ * imported joins the running one instead of starting another write.
79
+ *
80
+ * Requests are keyed by the conversation's IDENTITY (the id it will be written
81
+ * under), not by its locator: two artifacts of one source can carry the same
82
+ * source id (a Claude session continued in another project directory), and
83
+ * two concurrent writes to one id would have the loser's cleanup delete the
84
+ * winner's log. The locator is the key only when the identity is not known yet.
85
+ */
86
+ export declare function createForeignImporter(persistence: () => ImportPersistence | undefined, deps?: ImportDeps): {
87
+ import(adapter: MigrationAdapter, request: ImportRequest): Promise<ForeignImportResult>;
88
+ };
89
+ //# sourceMappingURL=import-one.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import-one.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/migrate/import-one.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAI3F,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG9E,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IACzD,kFAAkF;IAClF,IAAI,CAAC,CAAC,EAAE,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACtC,IAAI,IAAI,OAAO,CAAC,SAAS;QAAE,MAAM,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,EAAE,CAAC,CAAA;CACvD;AACD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACtB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED,qCAAqC;AACrC,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GACjF;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7G,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAE7E;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,EAC9C,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAWf;AAOD,MAAM,WAAW,aAAa;IAC5B,qFAAqF;IACrF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IAC9C,sDAAsD;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,iBAAiB,EAC9B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,aAAa,EACtB,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,mBAAmB,CAAC,CAqC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,iBAAiB,GAAG,SAAS,EAAE,IAAI,GAAE,UAAe;oBAGzF,gBAAgB,WAAW,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC;EAe1F"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Import ONE foreign conversation through the host's persistence service —
3
+ * the session screen's "select to start" path (the CLI batch keeps
4
+ * importSessions, which mounts its own backend).
5
+ *
6
+ * Order is chosen so a failure never leaves a half-written log that the
7
+ * next click would take for "already imported":
8
+ * 1. the deterministic id already exists → open it, nothing is written;
9
+ * 2. the working directory must exist (resuming into a missing cwd fails
10
+ * later and less clearly);
11
+ * 3. the whole conversation is parsed and sessionized in memory;
12
+ * 4. only then create → append → flush → close; a write failure removes
13
+ * what was written, best effort — except a create that lost to a
14
+ * concurrent writer of the same deterministic id: that log is the
15
+ * winner's, and the import simply opens it.
16
+ *
17
+ * @module @deepseek-harness-tui/dsh-tui/migrate/import-one
18
+ */
19
+ import { SessionId } from '@deepseek-ai/dsh-session';
20
+ import { existsSync } from 'node:fs';
21
+ import { deleteSessionLog } from '../compat/index.js';
22
+ import { sessionize } from './sessionize.js';
23
+ import { migrationUuid } from './uuid.js';
24
+ /** Deterministic DSH session id of one foreign conversation (same as /migrate). */
25
+ export function foreignSessionId(agentId, sourceId) {
26
+ return SessionId(migrationUuid(`${agentId}:${sourceId}`));
27
+ }
28
+ /**
29
+ * Write one sessionized conversation (the CLI batch path; the single import
30
+ * phases create/append itself so a create race stays out of its cleanup).
31
+ * Both paths produce byte-identical logs: sessionize is deterministic in
32
+ * the id and the events.
33
+ */
34
+ export async function writeImportedSession(persistence, id, agentId, session) {
35
+ const { header, events } = sessionize(id, agentId, session);
36
+ const handle = await persistence.create(header);
37
+ try {
38
+ await handle.append(events);
39
+ await handle.flush();
40
+ }
41
+ finally {
42
+ // A close failure must not mask an append/flush error, nor (on the
43
+ // single-import path) turn a completed write into a cleanup candidate.
44
+ await handle.close().catch(() => { });
45
+ }
46
+ }
47
+ async function exists(persistence, id) {
48
+ if (persistence.stat !== undefined)
49
+ return (await persistence.stat(id)) !== undefined;
50
+ return (await persistence.list()).some(entry => entry.header.id === id);
51
+ }
52
+ /**
53
+ * Import one conversation unless it is already present.
54
+ * @returns ready (with whether it was written now), cwd-missing, or failed.
55
+ */
56
+ export async function importForeignSession(persistence, adapter, request, deps = {}) {
57
+ const cwdExists = deps.cwdExists ?? existsSync;
58
+ let id = foreignSessionId(adapter.id, request.sessionKey);
59
+ if (await exists(persistence, id))
60
+ return { kind: 'ready', sessionId: id, created: false };
61
+ if (request.cwd !== '' && !cwdExists(request.cwd))
62
+ return { kind: 'cwd-missing', cwd: request.cwd };
63
+ if (adapter.load === undefined)
64
+ return { kind: 'failed', reason: 'not-a-session' };
65
+ const loaded = await adapter.load(request.ref);
66
+ if ('skip' in loaded)
67
+ return { kind: 'failed', reason: loaded.skip };
68
+ if (!cwdExists(loaded.cwd))
69
+ return { kind: 'cwd-missing', cwd: loaded.cwd };
70
+ // The artifact may have changed identity since it was listed; the id always
71
+ // follows what is actually imported, exactly as /migrate derives it.
72
+ if (loaded.sourceId !== request.sessionKey) {
73
+ id = foreignSessionId(adapter.id, loaded.sourceId);
74
+ if (await exists(persistence, id))
75
+ return { kind: 'ready', sessionId: id, created: false };
76
+ }
77
+ // create is its own phase: losing the race for the deterministic id to a
78
+ // concurrent writer (the /migrate batch, another TUI) means the log that is
79
+ // already there is theirs — complete or becoming complete — and never this
80
+ // failure's to delete. Any other create failure wrote nothing at all.
81
+ const { header, events } = sessionize(id, adapter.id, loaded);
82
+ let handle;
83
+ try {
84
+ handle = await persistence.create(header);
85
+ }
86
+ catch (error) {
87
+ if (await exists(persistence, id))
88
+ return { kind: 'ready', sessionId: id, created: false };
89
+ return { kind: 'failed', reason: 'write-failed', detail: error instanceof Error ? error.message : String(error) };
90
+ }
91
+ try {
92
+ await handle.append(events);
93
+ await handle.flush();
94
+ }
95
+ catch (error) {
96
+ await handle.close().catch(() => { });
97
+ (deps.discard ?? deleteSessionLog)(id);
98
+ return { kind: 'failed', reason: 'write-failed', detail: error instanceof Error ? error.message : String(error) };
99
+ }
100
+ await handle.close().catch(() => { });
101
+ return { kind: 'ready', sessionId: id, created: true };
102
+ }
103
+ /**
104
+ * One importer per host: a second request for a conversation already being
105
+ * imported joins the running one instead of starting another write.
106
+ *
107
+ * Requests are keyed by the conversation's IDENTITY (the id it will be written
108
+ * under), not by its locator: two artifacts of one source can carry the same
109
+ * source id (a Claude session continued in another project directory), and
110
+ * two concurrent writes to one id would have the loser's cleanup delete the
111
+ * winner's log. The locator is the key only when the identity is not known yet.
112
+ */
113
+ export function createForeignImporter(persistence, deps = {}) {
114
+ const inFlight = new Map();
115
+ return {
116
+ import(adapter, request) {
117
+ const key = request.sessionKey !== ''
118
+ ? `id:${foreignSessionId(adapter.id, request.sessionKey)}`
119
+ : `ref:${adapter.id}|${request.ref}`;
120
+ const running = inFlight.get(key);
121
+ if (running !== undefined)
122
+ return running;
123
+ const service = persistence();
124
+ if (service === undefined)
125
+ return Promise.resolve({ kind: 'failed', reason: 'write-failed', detail: 'session persistence unavailable' });
126
+ const started = importForeignSession(service, adapter, request, deps)
127
+ .catch((error) => ({ kind: 'failed', reason: 'write-failed', detail: error instanceof Error ? error.message : String(error) }))
128
+ .finally(() => inFlight.delete(key));
129
+ inFlight.set(key, started);
130
+ return started;
131
+ },
132
+ };
133
+ }
@@ -0,0 +1,35 @@
1
+ import { SessionId } from '@deepseek-ai/dsh-session';
2
+ import type { MigrationAdapter, MigrationSession } from './types.js';
3
+ export declare const MIGRATION_ADAPTERS: readonly MigrationAdapter[];
4
+ /**
5
+ * The default import target: the shared DSH session store, resolved exactly
6
+ * like the persistence backend's root (cordis.patch.yml): an explicit
7
+ * `DSH_TUI_SESSION_ROOT` first, then `$DSH_HOME/sessions`, then
8
+ * `~/.dsh/sessions`. Resolving it any other way would let the CLI import into
9
+ * a store the TUI (and the source tabs) never read.
10
+ */
11
+ export declare function defaultSessionRoot(): string;
12
+ /** Deterministic session id for one foreign conversation. */
13
+ export declare function migrationSessionId(adapter: MigrationAdapter, session: MigrationSession): SessionId;
14
+ export interface ImportRun {
15
+ readonly imported: number;
16
+ readonly existing: number;
17
+ readonly failed: number;
18
+ /** One-line cause per failed conversation, for the CLI summary. */
19
+ readonly failures: readonly string[];
20
+ }
21
+ /**
22
+ * Import every discovered conversation of one adapter into the DSH store.
23
+ *
24
+ * The persistence backend is mounted ONCE per run (one Context, one plugin
25
+ * lifecycle) and disposed after the loop; sessions already present (same
26
+ * deterministic id) are skipped, and a failed conversation never aborts the
27
+ * batch — both properties the retired-store migration established first.
28
+ *
29
+ * @param adapter - the foreign agent to import from.
30
+ * @param root - the DSH session root to write into.
31
+ * @param sessions - the conversations to import (usually adapter.discover()).
32
+ * @returns the per-run counters.
33
+ */
34
+ export declare function importSessions(adapter: MigrationAdapter, root: string, sessions: readonly MigrationSession[]): Promise<ImportRun>;
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/migrate/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AASpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEpE,eAAO,MAAM,kBAAkB,EAAE,SAAS,gBAAgB,EAMzD,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAK3C;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAElG;AAuBD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CACrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACpC,OAAO,CAAC,SAAS,CAAC,CAkCpB"}