@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
@@ -1 +1 @@
1
- {"version":3,"file":"ink.d.ts","sourceRoot":"","sources":["../../../src/ink/ink.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc9C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAIhC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAarE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAA4B,KAAK,aAAa,EAAiB,MAAM,uBAAuB,CAAC;AAIpG,OAAO,EAAqG,KAAK,SAAS,EAAqH,KAAK,cAAc,EAA4L,MAAM,gBAAgB,CAAC;AAqCrd,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CA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B;;;;OAIG;IACH,OAAO,CAAC,yBAAyB,CAK/B;IACF,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IAe7B,OAAO,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI;IAmHtC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAOpC,cAAc,IAAI,IAAI;IAYtB;;;;;;;OAOG;IACH,UAAU,IAAI,IAAI;IAalB,YAAY,IAAI,MAAM,IAAI;IAqB1B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;CAmDpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wBAAgB,UAAU,CAAC,KAAK,GAAE,MAAM,CAAC,UAA0B,GAAG,IAAI,CAsDzE"}
@@ -97,6 +97,7 @@ export default class Ink {
97
97
  getSnapshot: () => this.altScreenActive && (this.kittyGraphicsSupported || this.sixelGraphicsSupported) &&
98
98
  !this.isPaused && !this.terminalQueriesSuspended && !this.isUnmounted,
99
99
  getCellSize: () => this.measuredImageCellSize,
100
+ getProtocol: () => !this.terminalImages.getSnapshot() ? undefined : this.kittyGraphicsSupported ? 'kitty' : 'sixel',
100
101
  request: () => {
101
102
  if (this.isUnmounted)
102
103
  return noop;
@@ -845,7 +846,7 @@ export default class Ink {
845
846
  if (this.altScreenActive) {
846
847
  selActive = hasSelection(this.selection);
847
848
  if (selActive) {
848
- applySelectionOverlay(frame.screen, this.selection, this.stylePool);
849
+ applySelectionOverlay(frame.screen, this.selection, this.stylePool, frame.images);
849
850
  }
850
851
  // Commit-consistency guard: hash the rows under the highlight on the
851
852
  // frame the copy would actually read. An uncoordinated change since
@@ -2484,7 +2485,21 @@ export default class Ink {
2484
2485
  };
2485
2486
  setAppRef(app) {
2486
2487
  this.app = app;
2488
+ if (app !== null)
2489
+ app.querier.onUnsolicited = this.handleUnsolicitedResponse;
2487
2490
  }
2491
+ /**
2492
+ * Kitty placements report failures; an ENOENT means the terminal evicted a
2493
+ * dormant image under a quota smaller than our retention budget. Repaint so
2494
+ * the next reconcile uploads it again.
2495
+ */
2496
+ handleUnsolicitedResponse = (response) => {
2497
+ if (response.type !== 'kittyGraphics' || this.isUnmounted)
2498
+ return;
2499
+ if (this.kittyGraphicsManager.handleResponse(response.imageId, response.status)) {
2500
+ this.scheduleRender();
2501
+ }
2502
+ };
2488
2503
  render(node) {
2489
2504
  this.currentNode = node;
2490
2505
  const tree = _jsx(App, { ref: this.setAppRef, stdin: this.options.stdin, stdout: this.options.stdout, stderr: this.options.stderr, exitOnCtrlC: this.options.exitOnCtrlC, onExit: this.unmount, terminalColumns: this.terminalColumns, terminalRows: this.terminalRows, selection: this.selection, onSelectionChange: this.notifySelectionChange, onClickAt: this.dispatchClick, onContextMenuAt: this.dispatchContextMenu, onHoverAt: this.dispatchHover, onWheelAt: this.dispatchWheelAt, getHyperlinkAt: this.getHyperlinkAt, onOpenHyperlink: this.openHyperlink, onMultiClick: this.handleMultiClick, onSelectionDrag: this.handleSelectionDrag, onDragTargetAt: this.findDragTargetAt, onDragDispatch: this.dispatchDrag, onPointerGestureChange: this.setPointerGestureActive, onProtocolCandidateChange: this.setProtocolCandidateActive, onReleaseTail: this.drainReleaseTail, onClickProbe: this.clickProbeAtBatchTail, onStdinResume: this.reassertTerminalModes, onTerminalFocus: this.handleTerminalFocusProbe, onCursorDeclaration: this.setCursorDeclaration, dispatchKeyboardEvent: this.dispatchKeyboardEvent, children: _jsx(TerminalWriteProvider, { value: this.writeRaw, children: _jsx(TerminalImagesContext.Provider, { value: this.terminalImages, children: node }) }) });
@@ -1,29 +1,70 @@
1
1
  import { type TerminalCellSize, type TerminalImagePlacement, type TerminalImageSource } from './terminal-image.js';
2
+ /** Pixel rectangle of the uploaded raster to show (Kitty `x,y,w,h`). */
3
+ export type KittySourceRect = {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ readonly width: number;
7
+ readonly height: number;
8
+ };
2
9
  export interface KittyGraphicsManagerOptions {
3
10
  /** Deterministic seed used by protocol tests; production chooses a random range. */
4
11
  readonly firstImageId?: number;
5
12
  /** Physical pixels per cell; defaults to a conventional 8×16 cell. */
6
13
  readonly cellSize?: TerminalCellSize;
14
+ /** Clock for the re-upload failure window; protocol tests pin it. */
15
+ readonly now?: () => number;
7
16
  }
8
17
  /**
9
18
  * Reconcile renderer image requests with Kitty image/placement state.
10
19
  *
11
20
  * Pixel content owns an image id while each DOM node owns a placement id.
12
21
  * Equal immutable RGBA content is uploaded once and can back several nodes;
13
- * geometry changes replace only that node's placement without flicker.
22
+ * geometry changes replace only that node's placement without flicker. An
23
+ * image no node places stays uploaded (dormant) within the retention budget,
24
+ * so content that scrolls back into view is re-placed, not re-sent.
14
25
  */
15
26
  export declare class KittyGraphicsManager {
16
27
  private readonly images;
17
28
  private readonly placements;
29
+ /**
30
+ * Ids given up by a re-upload. The ENOENT that triggered it may be stale
31
+ * (the id was re-sent in between), so the terminal can still hold data
32
+ * under the old id; it is deleted on the next frame (or at exit).
33
+ */
34
+ private readonly retiredImageIds;
18
35
  private readonly contentHashes;
19
36
  private nextImageId;
20
37
  private nextPlacementId;
21
38
  private cellSize;
39
+ private pass;
40
+ private readonly now;
22
41
  constructor(options?: KittyGraphicsManagerOptions);
23
42
  /** Update the physical cell ratio used by future image variants. */
24
43
  setCellSize(cellSize: TerminalCellSize): boolean;
25
44
  reconcile(placements: readonly TerminalImagePlacement[]): string;
26
- /** A clear/screen swap invalidated terminal-side data; resend next frame. */
45
+ /**
46
+ * Forget images no node placed this pass once they are unusable (fitted for
47
+ * another cell geometry) or past the retention budget, oldest first.
48
+ */
49
+ private evictDormant;
50
+ /**
51
+ * Handle a Kitty graphics reply the renderer did not ask for. ENOENT for
52
+ * one of our images means the terminal evicted its data (its own quota is
53
+ * smaller than our retention budget): upload it again and re-place every
54
+ * node showing it on the next frame. A second ENOENT within
55
+ * REUPLOAD_FAILURE_WINDOW_MS of that re-upload means the terminal refuses
56
+ * the image outright, so it is left as is (never an upload loop); a new
57
+ * content or size variant is a new image and tries again. The re-upload
58
+ * takes a fresh image id: every placement of the old id may still answer
59
+ * ENOENT, and those late replies must not count as the re-upload failing.
60
+ * Returns whether a repaint is needed.
61
+ */
62
+ handleResponse(imageId: number, status: string): boolean;
63
+ /**
64
+ * A clear/screen swap invalidated terminal-side data; resend next frame.
65
+ * The terminal state an abandoned image was judged against is gone too, so
66
+ * it gets a fresh ENOENT budget; one clear still buys at most one retry.
67
+ */
27
68
  invalidateAll(): void;
28
69
  /** Delete every image owned by this renderer and forget their ids. */
29
70
  deleteAll(): string;
@@ -34,7 +75,7 @@ export declare class KittyGraphicsManager {
34
75
  }
35
76
  /** Zlib-compressed direct RGBA split into protocol-compliant base64 chunks. */
36
77
  export declare function transmitKittyRgba(imageId: number, source: TerminalImageSource): string;
37
- export declare function kittyPlacement(imageId: number, placementId: number, x: number, y: number, columns: number, rows: number, zIndex?: number): string;
78
+ export declare function kittyPlacement(imageId: number, placementId: number, x: number, y: number, columns: number, rows: number, zIndex?: number, source?: KittySourceRect): string;
38
79
  export declare function deleteKittyPlacement(imageId: number, placementId: number): string;
39
80
  export declare function deleteKittyImage(imageId: number): string;
40
81
  export declare function kittyCommand(control: string, payload?: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"kitty-graphics.d.ts","sourceRoot":"","sources":["../../../src/ink/kitty-graphics.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAA;AAkC5B,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAC9B,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;CACrC;AAED;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgC;IACvD,OAAO,CAAC,QAAQ,CAAC,UAA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,IAAI,MAAM;IASnB,OAAO,CAAC,QAAQ;IAoChB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,mBAAmB;CAQ5B;AAyCD,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,GAC1B,MAAM,CAER;AAoCD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,MAAM,SAAgB,EACtB,MAAM,CAAC,EAAE,eAAe,GACvB,MAAM,CAUR;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,MAAM,CAER;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,SAAK,GAAG,MAAM,CAElE"}
@@ -9,23 +9,54 @@ const ID_MAX_EXCLUSIVE = 0x7fffffff;
9
9
  const PLACEMENT_ID_MAX_EXCLUSIVE = 0x40000000;
10
10
  // Keep raster content behind terminal text and explicit panel backgrounds.
11
11
  const IMAGE_Z_INDEX = -0x80000000;
12
+ /**
13
+ * Retention for uploaded images that no node places this frame. Leaving the
14
+ * viewport deletes only the placement (`d=i`), so scrolling back re-places
15
+ * the terminal-side data with one `a=p` instead of re-fitting, re-compressing
16
+ * and re-sending the whole raster — the protocol's intended use, and what
17
+ * mature terminal UIs do. Dormant images are evicted least-recently-used past
18
+ * either bound. The byte bound counts decoded RGBA (what the terminal keeps)
19
+ * and stays a small fraction of default terminal image quotas. A terminal
20
+ * configured with a smaller quota may still evict a dormant image, so
21
+ * placements report failures (`q=1`): an ENOENT reply marks the image for
22
+ * re-upload (see handleResponse).
23
+ */
24
+ const DORMANT_MAX_IMAGES = 128;
25
+ const RETAINED_MAX_BYTES = 64 * 1024 * 1024;
26
+ /**
27
+ * An ENOENT this soon after re-uploading the same image means the terminal
28
+ * cannot keep it at all (e.g. the image exceeds its whole quota and the
29
+ * upload was refused): stop re-uploading instead of looping.
30
+ */
31
+ const REUPLOAD_FAILURE_WINDOW_MS = 5000;
12
32
  /**
13
33
  * Reconcile renderer image requests with Kitty image/placement state.
14
34
  *
15
35
  * Pixel content owns an image id while each DOM node owns a placement id.
16
36
  * Equal immutable RGBA content is uploaded once and can back several nodes;
17
- * geometry changes replace only that node's placement without flicker.
37
+ * geometry changes replace only that node's placement without flicker. An
38
+ * image no node places stays uploaded (dormant) within the retention budget,
39
+ * so content that scrolls back into view is re-placed, not re-sent.
18
40
  */
19
41
  export class KittyGraphicsManager {
20
42
  images = new Map();
21
43
  placements = new Map();
44
+ /**
45
+ * Ids given up by a re-upload. The ENOENT that triggered it may be stale
46
+ * (the id was re-sent in between), so the terminal can still hold data
47
+ * under the old id; it is deleted on the next frame (or at exit).
48
+ */
49
+ retiredImageIds = [];
22
50
  contentHashes = new WeakMap();
23
51
  nextImageId;
24
52
  nextPlacementId = 1;
25
53
  cellSize;
54
+ pass = 0;
55
+ now;
26
56
  constructor(options = {}) {
27
57
  this.nextImageId = normalizeFirstId(options.firstImageId ?? randomInt(ID_MIN, ID_MAX_EXCLUSIVE));
28
58
  this.cellSize = normalizeTerminalCellSize(options.cellSize ?? DEFAULT_TERMINAL_CELL_SIZE);
59
+ this.now = options.now ?? Date.now;
29
60
  }
30
61
  /** Update the physical cell ratio used by future image variants. */
31
62
  setCellSize(cellSize) {
@@ -38,15 +69,17 @@ export class KittyGraphicsManager {
38
69
  return true;
39
70
  }
40
71
  reconcile(placements) {
72
+ this.pass += 1;
41
73
  const desiredNodes = new Set();
42
74
  const desiredImages = new Set();
43
75
  const desired = [];
44
- const output = [];
76
+ const output = this.retiredImageIds.splice(0).map(deleteKittyImage);
45
77
  for (const placement of placements) {
46
78
  if (desiredNodes.has(placement.node))
47
79
  continue;
48
80
  desiredNodes.add(placement.node);
49
81
  const image = this.imageFor(placement);
82
+ image.lastUsed = this.pass;
50
83
  desiredImages.add(image);
51
84
  desired.push({ placement, image });
52
85
  }
@@ -64,6 +97,7 @@ export class KittyGraphicsManager {
64
97
  y: -1,
65
98
  columns: 0,
66
99
  rows: 0,
100
+ crop: '',
67
101
  };
68
102
  this.placements.set(placement.node, state);
69
103
  }
@@ -79,16 +113,22 @@ export class KittyGraphicsManager {
79
113
  output.push(transmitPreparedKittyRgba(image.imageId, image.payload));
80
114
  image.uploaded = true;
81
115
  }
82
- const moved = state.x !== placement.x ||
83
- state.y !== placement.y ||
84
- state.columns !== placement.columns ||
85
- state.rows !== placement.rows;
116
+ const visible = visiblePlacement(placement, image.payload);
117
+ const crop = visible.source === undefined
118
+ ? ''
119
+ : `${visible.source.x},${visible.source.y},${visible.source.width},${visible.source.height}`;
120
+ const moved = state.x !== visible.x ||
121
+ state.y !== visible.y ||
122
+ state.columns !== visible.columns ||
123
+ state.rows !== visible.rows ||
124
+ state.crop !== crop;
86
125
  if (!state.placed || moved) {
87
- output.push(kittyPlacement(image.imageId, state.placementId, placement.x, placement.y, placement.columns, placement.rows, state.zIndex));
88
- state.x = placement.x;
89
- state.y = placement.y;
90
- state.columns = placement.columns;
91
- state.rows = placement.rows;
126
+ output.push(kittyPlacement(image.imageId, state.placementId, visible.x, visible.y, visible.columns, visible.rows, state.zIndex, visible.source));
127
+ state.x = visible.x;
128
+ state.y = visible.y;
129
+ state.columns = visible.columns;
130
+ state.rows = visible.rows;
131
+ state.crop = crop;
92
132
  state.placed = true;
93
133
  }
94
134
  }
@@ -101,31 +141,111 @@ export class KittyGraphicsManager {
101
141
  });
102
142
  this.placements.delete(node);
103
143
  }
144
+ // Deleting an image's data also removes its placements, so an evicted
145
+ // image needs no separate placement delete.
146
+ const evicted = this.evictDormant(desiredImages);
104
147
  for (const obsolete of obsoletePlacements) {
105
- if (!desiredImages.has(obsolete.image))
148
+ if (evicted.has(obsolete.image))
106
149
  continue;
107
150
  output.push(deleteKittyPlacement(obsolete.image.imageId, obsolete.placementId));
108
151
  }
109
- for (const [key, image] of this.images) {
110
- if (desiredImages.has(image))
111
- continue;
152
+ for (const image of evicted)
112
153
  output.push(deleteKittyImage(image.imageId));
113
- this.images.delete(key);
114
- }
115
154
  return output.join('');
116
155
  }
117
- /** A clear/screen swap invalidated terminal-side data; resend next frame. */
156
+ /**
157
+ * Forget images no node placed this pass once they are unusable (fitted for
158
+ * another cell geometry) or past the retention budget, oldest first.
159
+ */
160
+ evictDormant(desiredImages) {
161
+ const evicted = new Set();
162
+ const dormant = [];
163
+ let retainedBytes = 0;
164
+ for (const entry of this.images) {
165
+ const image = entry[1];
166
+ if (desiredImages.has(image)) {
167
+ retainedBytes += image.retainedBytes;
168
+ }
169
+ else if (image.cellSize.width !== this.cellSize.width ||
170
+ image.cellSize.height !== this.cellSize.height) {
171
+ evicted.add(image);
172
+ }
173
+ else {
174
+ retainedBytes += image.retainedBytes;
175
+ dormant.push(entry);
176
+ }
177
+ }
178
+ dormant.sort((a, b) => a[1].lastUsed - b[1].lastUsed);
179
+ let index = 0;
180
+ while (index < dormant.length &&
181
+ (dormant.length - index > DORMANT_MAX_IMAGES || retainedBytes > RETAINED_MAX_BYTES)) {
182
+ const image = dormant[index][1];
183
+ evicted.add(image);
184
+ retainedBytes -= image.retainedBytes;
185
+ index += 1;
186
+ }
187
+ for (const [key, image] of this.images) {
188
+ if (evicted.has(image))
189
+ this.images.delete(key);
190
+ }
191
+ return evicted;
192
+ }
193
+ /**
194
+ * Handle a Kitty graphics reply the renderer did not ask for. ENOENT for
195
+ * one of our images means the terminal evicted its data (its own quota is
196
+ * smaller than our retention budget): upload it again and re-place every
197
+ * node showing it on the next frame. A second ENOENT within
198
+ * REUPLOAD_FAILURE_WINDOW_MS of that re-upload means the terminal refuses
199
+ * the image outright, so it is left as is (never an upload loop); a new
200
+ * content or size variant is a new image and tries again. The re-upload
201
+ * takes a fresh image id: every placement of the old id may still answer
202
+ * ENOENT, and those late replies must not count as the re-upload failing.
203
+ * Returns whether a repaint is needed.
204
+ */
205
+ handleResponse(imageId, status) {
206
+ if (!status.startsWith('ENOENT'))
207
+ return false;
208
+ let image;
209
+ for (const candidate of this.images.values()) {
210
+ if (candidate.imageId === imageId)
211
+ image = candidate;
212
+ }
213
+ if (image === undefined || !image.uploaded || image.abandoned)
214
+ return false;
215
+ const now = this.now();
216
+ if (image.reuploadedAt !== 0 && now - image.reuploadedAt < REUPLOAD_FAILURE_WINDOW_MS) {
217
+ image.abandoned = true;
218
+ return false;
219
+ }
220
+ image.reuploadedAt = now;
221
+ this.retiredImageIds.push(image.imageId);
222
+ image.imageId = this.allocateImageId();
223
+ image.uploaded = false;
224
+ for (const state of this.placements.values()) {
225
+ if (state.image === image)
226
+ state.placed = false;
227
+ }
228
+ return true;
229
+ }
230
+ /**
231
+ * A clear/screen swap invalidated terminal-side data; resend next frame.
232
+ * The terminal state an abandoned image was judged against is gone too, so
233
+ * it gets a fresh ENOENT budget; one clear still buys at most one retry.
234
+ */
118
235
  invalidateAll() {
119
- for (const image of this.images.values())
236
+ for (const image of this.images.values()) {
120
237
  image.uploaded = false;
238
+ image.abandoned = false;
239
+ image.reuploadedAt = 0;
240
+ }
121
241
  for (const state of this.placements.values()) {
122
242
  state.placed = false;
123
243
  }
124
244
  }
125
245
  /** Delete every image owned by this renderer and forget their ids. */
126
246
  deleteAll() {
127
- const output = [...this.images.values()]
128
- .map(image => deleteKittyImage(image.imageId))
247
+ const output = [...this.retiredImageIds.splice(0), ...[...this.images.values()].map(image => image.imageId)]
248
+ .map(deleteKittyImage)
129
249
  .join('');
130
250
  this.images.clear();
131
251
  this.placements.clear();
@@ -150,7 +270,12 @@ export class KittyGraphicsManager {
150
270
  const image = {
151
271
  imageId: this.allocateImageId(),
152
272
  payload: prepareKittyRgba(fitted),
273
+ retainedBytes: fitted.width * fitted.height * 4,
274
+ cellSize: this.cellSize,
153
275
  uploaded: false,
276
+ lastUsed: this.pass,
277
+ reuploadedAt: 0,
278
+ abandoned: false,
154
279
  };
155
280
  this.images.set(key, image);
156
281
  return image;
@@ -179,6 +304,39 @@ export class KittyGraphicsManager {
179
304
  return id;
180
305
  }
181
306
  }
307
+ /**
308
+ * The cells a placement actually occupies and, when it is clipped, the part
309
+ * of the uploaded raster behind them. The raster has the full cell box's
310
+ * exact physical aspect (see fitTerminalImageSource), so a cell edge maps to
311
+ * a pixel edge proportionally; the start rounds down and the end up, so a
312
+ * partially covered pixel row is shown rather than dropped.
313
+ */
314
+ function visiblePlacement(placement, payload) {
315
+ const clip = placement.clip;
316
+ if (clip === undefined ||
317
+ (clip.x === placement.x && clip.y === placement.y &&
318
+ clip.columns === placement.columns && clip.rows === placement.rows)) {
319
+ return { x: placement.x, y: placement.y, columns: placement.columns, rows: placement.rows };
320
+ }
321
+ const left = clip.x - placement.x;
322
+ const top = clip.y - placement.y;
323
+ const sourceX = Math.floor((payload.width * left) / placement.columns);
324
+ const sourceY = Math.floor((payload.height * top) / placement.rows);
325
+ const sourceRight = Math.min(payload.width, Math.ceil((payload.width * (left + clip.columns)) / placement.columns));
326
+ const sourceBottom = Math.min(payload.height, Math.ceil((payload.height * (top + clip.rows)) / placement.rows));
327
+ return {
328
+ x: clip.x,
329
+ y: clip.y,
330
+ columns: clip.columns,
331
+ rows: clip.rows,
332
+ source: {
333
+ x: sourceX,
334
+ y: sourceY,
335
+ width: Math.max(1, sourceRight - sourceX),
336
+ height: Math.max(1, sourceBottom - sourceY),
337
+ },
338
+ };
339
+ }
182
340
  /** Zlib-compressed direct RGBA split into protocol-compliant base64 chunks. */
183
341
  export function transmitKittyRgba(imageId, source) {
184
342
  return transmitPreparedKittyRgba(imageId, prepareKittyRgba(source));
@@ -208,9 +366,12 @@ function transmitPreparedKittyRgba(imageId, payload) {
208
366
  })
209
367
  .join('');
210
368
  }
211
- export function kittyPlacement(imageId, placementId, x, y, columns, rows, zIndex = IMAGE_Z_INDEX) {
369
+ export function kittyPlacement(imageId, placementId, x, y, columns, rows, zIndex = IMAGE_Z_INDEX, source) {
370
+ const crop = source === undefined
371
+ ? ''
372
+ : `,x=${source.x},y=${source.y},w=${source.width},h=${source.height}`;
212
373
  return (`\u001b[${y + 1};${x + 1}H` +
213
- kittyCommand(`a=p,i=${imageId},p=${placementId},c=${columns},r=${rows},z=${zIndex},C=1,q=2`));
374
+ kittyCommand(`a=p,i=${imageId},p=${placementId},c=${columns},r=${rows}${crop},z=${zIndex},C=1,q=1`));
214
375
  }
215
376
  export function deleteKittyPlacement(imageId, placementId) {
216
377
  return kittyCommand(`a=d,d=i,i=${imageId},p=${placementId},q=2`);
@@ -1 +1 @@
1
- {"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAIf,MAAM,aAAa,CAAA;AA4BpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAQ7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;CA6gBR"}
1
+ {"version":3,"file":"log-update.d.ts","sourceRoot":"","sources":["../../../src/ink/log-update.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAiB,KAAK,EAAE,MAAM,YAAY,CAAA;AAE5D,OAAO,EASL,KAAK,SAAS,EAIf,MAAM,aAAa,CAAA;AA4BpB,KAAK,OAAO,GAAG;IACb,KAAK,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AAKD;;;GAGG;AACH,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,KAAK,CAAO;gBAES,OAAO,EAAE,OAAO;IAQ7C;;;;;;;;;;;;;;;;;OAiBG;IACH,uBAAuB,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,+BAA+B,CAAC,SAAS,EAAE,KAAK,GAAG,IAAI;IASvD,+HAA+H;IAC/H,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,eAAe;IAiDvB,OAAO,CAAC,mBAAmB;IAS3B;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,KAAK,EACX,SAAS,UAAQ,EACjB,WAAW,UAAO,GACjB,IAAI;CAwhBR"}
@@ -472,10 +472,21 @@ export class LogUpdate {
472
472
  // Main screen: if cursor needs to be past the last line of content
473
473
  // (typical: cursor.y = screen.height), emit \n to create that line
474
474
  // since cursor movement can't create new lines.
475
+ //
476
+ // LFs are only for CREATING rows: past the viewport bottom they scroll a
477
+ // row into scrollback, which is what grows the transcript. A target row
478
+ // that is still on screen (cursor.y < viewport.height) is reachable by
479
+ // plain cursor movement, and LF-ing to it instead scrolls the terminal
480
+ // one row per LF for no content gain — the idle-repaint churn: a settled
481
+ // session whose header only animates wrote 9-22 LF per frame (5 frames/s,
482
+ // ~73 LF/s measured) for a screen that changed nothing visible, refilling
483
+ // a 1000-row phone scrollback window with duplicate viewports in seconds.
484
+ // Same destination, no scroll: fall through to moveCursorTo.
475
485
  if (altScreen) {
476
486
  // no-op; next frame's CSI H anchors cursor
477
487
  }
478
- else if (next.cursor.y >= next.screen.height) {
488
+ else if (next.cursor.y >= next.viewport.height) {
489
+ // Target row is below the visible viewport: only LF can create it.
479
490
  // Move to column 0 of current line, then emit newlines to reach target row
480
491
  screen.txn(prev => {
481
492
  const rowsToCreate = next.cursor.y - prev.y;
@@ -910,6 +921,13 @@ function moveCursorTo(screen, targetX, targetY) {
910
921
  const dx = targetX - prev.x;
911
922
  const dy = targetY - prev.y;
912
923
  const inPendingWrap = prev.x >= screen.viewportWidth;
924
+ // Already there (and not in pending wrap): nothing to emit. Without this
925
+ // the patch below is returned for a zero-length move, which is a non-empty
926
+ // diff — it costs a content-free write on every frame that only re-parks
927
+ // the cursor (exactly what the inline idle tail now does, see #995), and it
928
+ // breaks fixtures that assert on the final stdout chunk.
929
+ if (!inPendingWrap && dx === 0 && dy === 0)
930
+ return [[], { dx: 0, dy: 0 }];
913
931
  // If we're in pending wrap state (cursor.x >= width), use CR
914
932
  // to reset to column 0 on the current line without advancing
915
933
  // to the next line, then issue the cursor movement.
@@ -85,7 +85,7 @@ type Options = {
85
85
  previousImages?: readonly TerminalImagePlacement[];
86
86
  };
87
87
  /** A queued paint operation: write, clip, unclip, blit, clear, shade, noSelect, or shift. */
88
- export type Operation = WriteOperation | ClipOperation | UnclipOperation | BlitOperation | ClearOperation | ShadeOperation | NoSelectOperation | ShiftOperation;
88
+ export type Operation = WriteOperation | ClipOperation | UnclipOperation | BlitOperation | ClearOperation | ShadeOperation | NoSelectOperation | CopyRegionOperation | SoftWrapRowOperation | ShiftOperation;
89
89
  /**
90
90
  * Restyle the cells already in the region at this point of the paint
91
91
  * order: a modal layer's backdrop. Applied in sequence like a write, so
@@ -108,7 +108,8 @@ type WriteOperation = {
108
108
  * means line i is a continuation of line i-1 (the `\n` before it was
109
109
  * inserted by word-wrap, not in the source). Index 0 is always false.
110
110
  * Undefined means the producer didn't track wrapping (e.g. fills,
111
- * raw-ansi) — the screen's per-row bitmap is left untouched.
111
+ * raw-ansi): the rows it paints are marked "not a continuation", since it
112
+ * replaced whatever was there — see the write case in `get()`.
112
113
  */
113
114
  softWrap?: boolean[];
114
115
  };
@@ -156,6 +157,19 @@ type NoSelectOperation = {
156
157
  type: 'noSelect';
157
158
  region: Rectangle;
158
159
  };
160
+ /** Row `y` continues the row above, whose content ends at `contentEnd`. */
161
+ type SoftWrapRowOperation = {
162
+ type: 'softWrapRow';
163
+ y: number;
164
+ contentEnd: number;
165
+ };
166
+ /** A region that copies as `text` (see Screen.copyRegion); paints nothing. */
167
+ type CopyRegionOperation = {
168
+ type: 'copyRegion';
169
+ region: Rectangle;
170
+ text: string;
171
+ id: number;
172
+ };
159
173
  /**
160
174
  * Collects write/blit/clear/clip operations from the render tree, then
161
175
  * applies them to a Screen buffer in get(). The Screen is what gets
@@ -250,6 +264,8 @@ export default class Output {
250
264
  * the mark wins regardless of what's blitted into the region.
251
265
  * @param region - the region to mark.
252
266
  */
267
+ /** Mark row `y` as a wrap continuation (see Styles.softWrapContinuation). */
268
+ softWrapRow(y: number, contentEnd: number): void;
253
269
  noSelect(region: Rectangle): void;
254
270
  /**
255
271
  * Record a fully visible, frame-budgeted image request. Rejected placements
@@ -272,6 +288,12 @@ export default class Output {
272
288
  getImages(): readonly TerminalImagePlacement[];
273
289
  /** Pixel ownership is determined by paint order, not just final text values. */
274
290
  imageBacking(node: DOMElement): void;
291
+ /**
292
+ * The admitted placement's backing colour, or undefined when the raster
293
+ * composites transparently: its cells are then blanks, not a painted
294
+ * surface, so whatever the terminal shows behind the UI stays visible.
295
+ */
296
+ imagePlacementBackground(node: DOMElement): string | undefined;
275
297
  /**
276
298
  * Queue a text write at a position, split across lines on newlines.
277
299
  * @param x - the left column.
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/ink/output.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAA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