@askdkc/dsh-cli 0.11.3

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 (1978) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +321 -0
  3. package/bin/dsh-tui.js +1366 -0
  4. package/cordis.patch.yml +482 -0
  5. package/cordis.yml +250 -0
  6. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -0
  7. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -0
  8. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -0
  9. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -0
  10. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -0
  11. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -0
  12. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -0
  13. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -0
  14. package/dsh-ecosystem-spec/registry/README.md +14 -0
  15. package/dsh-ecosystem-spec/registry/contracts/decision-events-v1alpha1.json +13 -0
  16. package/dsh-ecosystem-spec/registry/contracts/scene-v1alpha1.json +13 -0
  17. package/dsh-ecosystem-spec/registry/contracts/settings-section-v1alpha1.json +13 -0
  18. package/dsh-ecosystem-spec/registry/contracts/tui-channel-v1alpha1.json +30 -0
  19. package/dsh-ecosystem-spec/registry/contracts/workspace-provider-v1alpha1.json +6 -0
  20. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -0
  21. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -0
  22. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -0
  23. package/dsh-ecosystem-spec/schemas/conformance-claim.schema.json +15 -0
  24. package/dsh-ecosystem-spec/schemas/effect-ledger-record.schema.json +16 -0
  25. package/dsh-ecosystem-spec/schemas/host-descriptor.schema.json +26 -0
  26. package/lib/types/activityPrefs.d.ts +63 -0
  27. package/lib/types/activityPrefs.d.ts.map +1 -0
  28. package/lib/types/activityPrefs.js +126 -0
  29. package/lib/types/adapter/channel/actions.d.ts +17 -0
  30. package/lib/types/adapter/channel/actions.d.ts.map +1 -0
  31. package/lib/types/adapter/channel/actions.js +28 -0
  32. package/lib/types/adapter/channel/consumer.d.ts +34 -0
  33. package/lib/types/adapter/channel/consumer.d.ts.map +1 -0
  34. package/lib/types/adapter/channel/consumer.js +87 -0
  35. package/lib/types/adapter/channel/features.d.ts +12 -0
  36. package/lib/types/adapter/channel/features.d.ts.map +1 -0
  37. package/lib/types/adapter/channel/features.js +41 -0
  38. package/lib/types/adapter/channel/host-registry.d.ts +40 -0
  39. package/lib/types/adapter/channel/host-registry.d.ts.map +1 -0
  40. package/lib/types/adapter/channel/host-registry.js +120 -0
  41. package/lib/types/adapter/channel/index.d.ts +22 -0
  42. package/lib/types/adapter/channel/index.d.ts.map +1 -0
  43. package/lib/types/adapter/channel/index.js +21 -0
  44. package/lib/types/adapter/channel/internal-token.d.ts +12 -0
  45. package/lib/types/adapter/channel/internal-token.d.ts.map +1 -0
  46. package/lib/types/adapter/channel/internal-token.js +11 -0
  47. package/lib/types/adapter/channel/plugins.d.ts +17 -0
  48. package/lib/types/adapter/channel/plugins.d.ts.map +1 -0
  49. package/lib/types/adapter/channel/plugins.js +47 -0
  50. package/lib/types/adapter/channel/projection.d.ts +15 -0
  51. package/lib/types/adapter/channel/projection.d.ts.map +1 -0
  52. package/lib/types/adapter/channel/projection.js +59 -0
  53. package/lib/types/adapter/channel/provider.d.ts +52 -0
  54. package/lib/types/adapter/channel/provider.d.ts.map +1 -0
  55. package/lib/types/adapter/channel/provider.js +231 -0
  56. package/lib/types/adapter/channel/read-view.d.ts +4 -0
  57. package/lib/types/adapter/channel/read-view.d.ts.map +1 -0
  58. package/lib/types/adapter/channel/read-view.js +132 -0
  59. package/lib/types/adapter/channel/session-projection.d.ts +56 -0
  60. package/lib/types/adapter/channel/session-projection.d.ts.map +1 -0
  61. package/lib/types/adapter/channel/session-projection.js +249 -0
  62. package/lib/types/adapter/channel/state.d.ts +11 -0
  63. package/lib/types/adapter/channel/state.d.ts.map +1 -0
  64. package/lib/types/adapter/channel/state.js +57 -0
  65. package/lib/types/adapter/channel/transcript.d.ts +15 -0
  66. package/lib/types/adapter/channel/transcript.d.ts.map +1 -0
  67. package/lib/types/adapter/channel/transcript.js +22 -0
  68. package/lib/types/adapter/channel/ui-policy.d.ts +109 -0
  69. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -0
  70. package/lib/types/adapter/channel/ui-policy.js +170 -0
  71. package/lib/types/adapter/channel/ui.d.ts +16 -0
  72. package/lib/types/adapter/channel/ui.d.ts.map +1 -0
  73. package/lib/types/adapter/channel/ui.js +173 -0
  74. package/lib/types/adapter/index.d.ts +20 -0
  75. package/lib/types/adapter/index.d.ts.map +1 -0
  76. package/lib/types/adapter/index.js +19 -0
  77. package/lib/types/adapter/kernel/contract-catalog.d.ts +12 -0
  78. package/lib/types/adapter/kernel/contract-catalog.d.ts.map +1 -0
  79. package/lib/types/adapter/kernel/contract-catalog.js +11 -0
  80. package/lib/types/adapter/kernel/diagnostics.d.ts +18 -0
  81. package/lib/types/adapter/kernel/diagnostics.d.ts.map +1 -0
  82. package/lib/types/adapter/kernel/diagnostics.js +16 -0
  83. package/lib/types/adapter/kernel/driver-types.d.ts +16 -0
  84. package/lib/types/adapter/kernel/driver-types.d.ts.map +1 -0
  85. package/lib/types/adapter/kernel/driver-types.js +8 -0
  86. package/lib/types/adapter/kernel/host-facade.d.ts +65 -0
  87. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -0
  88. package/lib/types/adapter/kernel/host-facade.js +216 -0
  89. package/lib/types/adapter/kernel/host-probe-access.d.ts +71 -0
  90. package/lib/types/adapter/kernel/host-probe-access.d.ts.map +1 -0
  91. package/lib/types/adapter/kernel/host-probe-access.js +121 -0
  92. package/lib/types/adapter/kernel/index.d.ts +20 -0
  93. package/lib/types/adapter/kernel/index.d.ts.map +1 -0
  94. package/lib/types/adapter/kernel/index.js +19 -0
  95. package/lib/types/adapter/kernel/kernel-runtime.d.ts +138 -0
  96. package/lib/types/adapter/kernel/kernel-runtime.d.ts.map +1 -0
  97. package/lib/types/adapter/kernel/kernel-runtime.js +572 -0
  98. package/lib/types/adapter/kernel/ledger.d.ts +55 -0
  99. package/lib/types/adapter/kernel/ledger.d.ts.map +1 -0
  100. package/lib/types/adapter/kernel/ledger.js +33 -0
  101. package/lib/types/adapter/kernel/legacy-facade.d.ts +22 -0
  102. package/lib/types/adapter/kernel/legacy-facade.d.ts.map +1 -0
  103. package/lib/types/adapter/kernel/legacy-facade.js +34 -0
  104. package/lib/types/adapter/kernel/lifecycle.d.ts +38 -0
  105. package/lib/types/adapter/kernel/lifecycle.d.ts.map +1 -0
  106. package/lib/types/adapter/kernel/lifecycle.js +53 -0
  107. package/lib/types/adapter/kernel/replay-isolation.d.ts +27 -0
  108. package/lib/types/adapter/kernel/replay-isolation.d.ts.map +1 -0
  109. package/lib/types/adapter/kernel/replay-isolation.js +45 -0
  110. package/lib/types/adapter/kernel/replay.d.ts +132 -0
  111. package/lib/types/adapter/kernel/replay.d.ts.map +1 -0
  112. package/lib/types/adapter/kernel/replay.js +428 -0
  113. package/lib/types/adapter/kernel/runtime-context.d.ts +15 -0
  114. package/lib/types/adapter/kernel/runtime-context.d.ts.map +1 -0
  115. package/lib/types/adapter/kernel/runtime-context.js +24 -0
  116. package/lib/types/adapter/kernel/runtime.d.ts +70 -0
  117. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -0
  118. package/lib/types/adapter/kernel/runtime.js +327 -0
  119. package/lib/types/adapter/kernel/slices/channel.d.ts +3 -0
  120. package/lib/types/adapter/kernel/slices/channel.d.ts.map +1 -0
  121. package/lib/types/adapter/kernel/slices/channel.js +8 -0
  122. package/lib/types/adapter/kernel/slices/decisions.d.ts +3 -0
  123. package/lib/types/adapter/kernel/slices/decisions.d.ts.map +1 -0
  124. package/lib/types/adapter/kernel/slices/decisions.js +10 -0
  125. package/lib/types/adapter/kernel/slices/extensions.d.ts +8 -0
  126. package/lib/types/adapter/kernel/slices/extensions.d.ts.map +1 -0
  127. package/lib/types/adapter/kernel/slices/extensions.js +43 -0
  128. package/lib/types/adapter/kernel/slices/index.d.ts +19 -0
  129. package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -0
  130. package/lib/types/adapter/kernel/slices/index.js +36 -0
  131. package/lib/types/adapter/kernel/slices/presentation.d.ts +3 -0
  132. package/lib/types/adapter/kernel/slices/presentation.d.ts.map +1 -0
  133. package/lib/types/adapter/kernel/slices/presentation.js +14 -0
  134. package/lib/types/adapter/kernel/slices/scenes.d.ts +3 -0
  135. package/lib/types/adapter/kernel/slices/scenes.d.ts.map +1 -0
  136. package/lib/types/adapter/kernel/slices/scenes.js +14 -0
  137. package/lib/types/adapter/kernel/slices/settings.d.ts +3 -0
  138. package/lib/types/adapter/kernel/slices/settings.d.ts.map +1 -0
  139. package/lib/types/adapter/kernel/slices/settings.js +12 -0
  140. package/lib/types/adapter/kernel/slices/types.d.ts +20 -0
  141. package/lib/types/adapter/kernel/slices/types.d.ts.map +1 -0
  142. package/lib/types/adapter/kernel/slices/types.js +12 -0
  143. package/lib/types/adapter/kernel/slices/workspace.d.ts +3 -0
  144. package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -0
  145. package/lib/types/adapter/kernel/slices/workspace.js +16 -0
  146. package/lib/types/adapter/ports/channel-catalog.d.ts +90 -0
  147. package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -0
  148. package/lib/types/adapter/ports/channel-catalog.js +2 -0
  149. package/lib/types/adapter/ports/channel-display.d.ts +90 -0
  150. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -0
  151. package/lib/types/adapter/ports/channel-display.js +2 -0
  152. package/lib/types/adapter/ports/channel-session.d.ts +229 -0
  153. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -0
  154. package/lib/types/adapter/ports/channel-session.js +2 -0
  155. package/lib/types/adapter/ports/channel-settings.d.ts +279 -0
  156. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -0
  157. package/lib/types/adapter/ports/channel-settings.js +1 -0
  158. package/lib/types/adapter/ports/channel-ui.d.ts +593 -0
  159. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -0
  160. package/lib/types/adapter/ports/channel-ui.js +1 -0
  161. package/lib/types/adapter/ports/channel-view.d.ts +663 -0
  162. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -0
  163. package/lib/types/adapter/ports/channel-view.js +2 -0
  164. package/lib/types/adapter/ports/channel-workspace.d.ts +68 -0
  165. package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -0
  166. package/lib/types/adapter/ports/channel-workspace.js +2 -0
  167. package/lib/types/adapter/ports/channel.d.ts +148 -0
  168. package/lib/types/adapter/ports/channel.d.ts.map +1 -0
  169. package/lib/types/adapter/ports/channel.js +22 -0
  170. package/lib/types/adapter/ports/decisions.d.ts +18 -0
  171. package/lib/types/adapter/ports/decisions.d.ts.map +1 -0
  172. package/lib/types/adapter/ports/decisions.js +9 -0
  173. package/lib/types/adapter/ports/descriptor.d.ts +25 -0
  174. package/lib/types/adapter/ports/descriptor.d.ts.map +1 -0
  175. package/lib/types/adapter/ports/descriptor.js +11 -0
  176. package/lib/types/adapter/ports/extensions.d.ts +86 -0
  177. package/lib/types/adapter/ports/extensions.d.ts.map +1 -0
  178. package/lib/types/adapter/ports/extensions.js +9 -0
  179. package/lib/types/adapter/ports/index.d.ts +23 -0
  180. package/lib/types/adapter/ports/index.d.ts.map +1 -0
  181. package/lib/types/adapter/ports/index.js +14 -0
  182. package/lib/types/adapter/ports/owner.d.ts +19 -0
  183. package/lib/types/adapter/ports/owner.d.ts.map +1 -0
  184. package/lib/types/adapter/ports/owner.js +9 -0
  185. package/lib/types/adapter/ports/presentation.d.ts +81 -0
  186. package/lib/types/adapter/ports/presentation.d.ts.map +1 -0
  187. package/lib/types/adapter/ports/presentation.js +10 -0
  188. package/lib/types/adapter/ports/scenes.d.ts +24 -0
  189. package/lib/types/adapter/ports/scenes.d.ts.map +1 -0
  190. package/lib/types/adapter/ports/scenes.js +8 -0
  191. package/lib/types/adapter/ports/settings.d.ts +44 -0
  192. package/lib/types/adapter/ports/settings.d.ts.map +1 -0
  193. package/lib/types/adapter/ports/settings.js +9 -0
  194. package/lib/types/adapter/ports/workspace.d.ts +62 -0
  195. package/lib/types/adapter/ports/workspace.d.ts.map +1 -0
  196. package/lib/types/adapter/ports/workspace.js +8 -0
  197. package/lib/types/adapter/spec/index.d.ts +11 -0
  198. package/lib/types/adapter/spec/index.d.ts.map +1 -0
  199. package/lib/types/adapter/spec/index.js +10 -0
  200. package/lib/types/adapter/spec/profile.d.ts +10 -0
  201. package/lib/types/adapter/spec/profile.d.ts.map +1 -0
  202. package/lib/types/adapter/spec/profile.js +9 -0
  203. package/lib/types/adapter/spec/protocol-constants.d.ts +60 -0
  204. package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -0
  205. package/lib/types/adapter/spec/protocol-constants.js +129 -0
  206. package/lib/types/adapter/spec/tui-contributions.d.ts +18 -0
  207. package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -0
  208. package/lib/types/adapter/spec/tui-contributions.js +19 -0
  209. package/lib/types/adapter/standard/admission.d.ts +11 -0
  210. package/lib/types/adapter/standard/admission.d.ts.map +1 -0
  211. package/lib/types/adapter/standard/admission.js +10 -0
  212. package/lib/types/adapter/standard/descriptor.d.ts +74 -0
  213. package/lib/types/adapter/standard/descriptor.d.ts.map +1 -0
  214. package/lib/types/adapter/standard/descriptor.js +356 -0
  215. package/lib/types/adapter/standard/grants.d.ts +30 -0
  216. package/lib/types/adapter/standard/grants.d.ts.map +1 -0
  217. package/lib/types/adapter/standard/grants.js +219 -0
  218. package/lib/types/adapter/standard/index.d.ts +25 -0
  219. package/lib/types/adapter/standard/index.d.ts.map +1 -0
  220. package/lib/types/adapter/standard/index.js +24 -0
  221. package/lib/types/adapter/standard/negotiate.d.ts +11 -0
  222. package/lib/types/adapter/standard/negotiate.d.ts.map +1 -0
  223. package/lib/types/adapter/standard/negotiate.js +97 -0
  224. package/lib/types/adapter/standard/permission-scope.d.ts +27 -0
  225. package/lib/types/adapter/standard/permission-scope.d.ts.map +1 -0
  226. package/lib/types/adapter/standard/permission-scope.js +68 -0
  227. package/lib/types/adapter/standard/protocols.d.ts +12 -0
  228. package/lib/types/adapter/standard/protocols.d.ts.map +1 -0
  229. package/lib/types/adapter/standard/protocols.js +11 -0
  230. package/lib/types/adapter/standard/registry.d.ts +23 -0
  231. package/lib/types/adapter/standard/registry.d.ts.map +1 -0
  232. package/lib/types/adapter/standard/registry.js +240 -0
  233. package/lib/types/adapter/standard/schema-check.d.ts +17 -0
  234. package/lib/types/adapter/standard/schema-check.d.ts.map +1 -0
  235. package/lib/types/adapter/standard/schema-check.js +167 -0
  236. package/lib/types/adapter/standard/tui-extension.d.ts +25 -0
  237. package/lib/types/adapter/standard/tui-extension.d.ts.map +1 -0
  238. package/lib/types/adapter/standard/tui-extension.js +45 -0
  239. package/lib/types/adapter/standard/types.d.ts +108 -0
  240. package/lib/types/adapter/standard/types.d.ts.map +1 -0
  241. package/lib/types/adapter/standard/types.js +10 -0
  242. package/lib/types/adapter/standard/validate.d.ts +21 -0
  243. package/lib/types/adapter/standard/validate.d.ts.map +1 -0
  244. package/lib/types/adapter/standard/validate.js +139 -0
  245. package/lib/types/adapter/upstream/channel-driver.d.ts +22 -0
  246. package/lib/types/adapter/upstream/channel-driver.d.ts.map +1 -0
  247. package/lib/types/adapter/upstream/channel-driver.js +424 -0
  248. package/lib/types/adapter/upstream/decisions-driver.d.ts +15 -0
  249. package/lib/types/adapter/upstream/decisions-driver.d.ts.map +1 -0
  250. package/lib/types/adapter/upstream/decisions-driver.js +141 -0
  251. package/lib/types/adapter/upstream/detection.d.ts +26 -0
  252. package/lib/types/adapter/upstream/detection.d.ts.map +1 -0
  253. package/lib/types/adapter/upstream/detection.js +9 -0
  254. package/lib/types/adapter/upstream/driver.d.ts +50 -0
  255. package/lib/types/adapter/upstream/driver.d.ts.map +1 -0
  256. package/lib/types/adapter/upstream/driver.js +8 -0
  257. package/lib/types/adapter/upstream/extensions-driver.d.ts +24 -0
  258. package/lib/types/adapter/upstream/extensions-driver.d.ts.map +1 -0
  259. package/lib/types/adapter/upstream/extensions-driver.js +697 -0
  260. package/lib/types/adapter/upstream/host-descriptor-driver.d.ts +45 -0
  261. package/lib/types/adapter/upstream/host-descriptor-driver.d.ts.map +1 -0
  262. package/lib/types/adapter/upstream/host-descriptor-driver.js +606 -0
  263. package/lib/types/adapter/upstream/index.d.ts +18 -0
  264. package/lib/types/adapter/upstream/index.d.ts.map +1 -0
  265. package/lib/types/adapter/upstream/index.js +15 -0
  266. package/lib/types/adapter/upstream/presentation-driver.d.ts +17 -0
  267. package/lib/types/adapter/upstream/presentation-driver.d.ts.map +1 -0
  268. package/lib/types/adapter/upstream/presentation-driver.js +129 -0
  269. package/lib/types/adapter/upstream/scenes-driver.d.ts +18 -0
  270. package/lib/types/adapter/upstream/scenes-driver.d.ts.map +1 -0
  271. package/lib/types/adapter/upstream/scenes-driver.js +170 -0
  272. package/lib/types/adapter/upstream/settings-driver.d.ts +20 -0
  273. package/lib/types/adapter/upstream/settings-driver.d.ts.map +1 -0
  274. package/lib/types/adapter/upstream/settings-driver.js +173 -0
  275. package/lib/types/adapter/upstream/workspace-driver.d.ts +19 -0
  276. package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -0
  277. package/lib/types/adapter/upstream/workspace-driver.js +198 -0
  278. package/lib/types/api.d.ts +7 -0
  279. package/lib/types/api.d.ts.map +1 -0
  280. package/lib/types/api.js +1 -0
  281. package/lib/types/bootstrap/state.d.ts +11 -0
  282. package/lib/types/bootstrap/state.d.ts.map +1 -0
  283. package/lib/types/bootstrap/state.js +10 -0
  284. package/lib/types/command-trees.d.ts +4 -0
  285. package/lib/types/command-trees.d.ts.map +1 -0
  286. package/lib/types/command-trees.js +4 -0
  287. package/lib/types/commands.d.ts +87 -0
  288. package/lib/types/commands.d.ts.map +1 -0
  289. package/lib/types/commands.js +218 -0
  290. package/lib/types/components/ActivityLine.d.ts +34 -0
  291. package/lib/types/components/ActivityLine.d.ts.map +1 -0
  292. package/lib/types/components/ActivityLine.js +39 -0
  293. package/lib/types/components/ActivityPicker.d.ts +16 -0
  294. package/lib/types/components/ActivityPicker.d.ts.map +1 -0
  295. package/lib/types/components/ActivityPicker.js +23 -0
  296. package/lib/types/components/AutoRecapRow.d.ts +23 -0
  297. package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
  298. package/lib/types/components/AutoRecapRow.js +23 -0
  299. package/lib/types/components/BalanceReportRow.d.ts +24 -0
  300. package/lib/types/components/BalanceReportRow.d.ts.map +1 -0
  301. package/lib/types/components/BalanceReportRow.js +87 -0
  302. package/lib/types/components/BtwPanel.d.ts +16 -0
  303. package/lib/types/components/BtwPanel.d.ts.map +1 -0
  304. package/lib/types/components/BtwPanel.js +47 -0
  305. package/lib/types/components/Chat/JobCard.d.ts +23 -0
  306. package/lib/types/components/Chat/JobCard.d.ts.map +1 -0
  307. package/lib/types/components/Chat/JobCard.js +93 -0
  308. package/lib/types/components/Chat/SubagentMessage.d.ts +20 -0
  309. package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -0
  310. package/lib/types/components/Chat/SubagentMessage.js +83 -0
  311. package/lib/types/components/ColorPicker.d.ts +17 -0
  312. package/lib/types/components/ColorPicker.d.ts.map +1 -0
  313. package/lib/types/components/ColorPicker.js +20 -0
  314. package/lib/types/components/CommandSuggestions.d.ts +34 -0
  315. package/lib/types/components/CommandSuggestions.d.ts.map +1 -0
  316. package/lib/types/components/CommandSuggestions.js +61 -0
  317. package/lib/types/components/ContextBarView.d.ts +41 -0
  318. package/lib/types/components/ContextBarView.d.ts.map +1 -0
  319. package/lib/types/components/ContextBarView.js +50 -0
  320. package/lib/types/components/EffortChargeGlyph.d.ts +26 -0
  321. package/lib/types/components/EffortChargeGlyph.d.ts.map +1 -0
  322. package/lib/types/components/EffortChargeGlyph.js +70 -0
  323. package/lib/types/components/EffortInputBorder.d.ts +47 -0
  324. package/lib/types/components/EffortInputBorder.d.ts.map +1 -0
  325. package/lib/types/components/EffortInputBorder.js +90 -0
  326. package/lib/types/components/EffortSlider.d.ts +18 -0
  327. package/lib/types/components/EffortSlider.d.ts.map +1 -0
  328. package/lib/types/components/EffortSlider.js +19 -0
  329. package/lib/types/components/EffortTierBadge.d.ts +26 -0
  330. package/lib/types/components/EffortTierBadge.d.ts.map +1 -0
  331. package/lib/types/components/EffortTierBadge.js +97 -0
  332. package/lib/types/components/ExtensionDialog.d.ts +40 -0
  333. package/lib/types/components/ExtensionDialog.d.ts.map +1 -0
  334. package/lib/types/components/ExtensionDialog.js +253 -0
  335. package/lib/types/components/FileActionsPanel.d.ts +22 -0
  336. package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
  337. package/lib/types/components/FileActionsPanel.js +28 -0
  338. package/lib/types/components/FileSuggestions.d.ts +18 -0
  339. package/lib/types/components/FileSuggestions.d.ts.map +1 -0
  340. package/lib/types/components/FileSuggestions.js +78 -0
  341. package/lib/types/components/GoalTodoPanel.d.ts +38 -0
  342. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -0
  343. package/lib/types/components/GoalTodoPanel.js +131 -0
  344. package/lib/types/components/HelpMenu.d.ts +29 -0
  345. package/lib/types/components/HelpMenu.d.ts.map +1 -0
  346. package/lib/types/components/HelpMenu.js +39 -0
  347. package/lib/types/components/HistorySearchDialog.d.ts +18 -0
  348. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -0
  349. package/lib/types/components/HistorySearchDialog.js +47 -0
  350. package/lib/types/components/ImagePreviewOverlay.d.ts +51 -0
  351. package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -0
  352. package/lib/types/components/ImagePreviewOverlay.js +269 -0
  353. package/lib/types/components/JobsPanel.d.ts +17 -0
  354. package/lib/types/components/JobsPanel.d.ts.map +1 -0
  355. package/lib/types/components/JobsPanel.js +111 -0
  356. package/lib/types/components/LangPicker.d.ts +14 -0
  357. package/lib/types/components/LangPicker.d.ts.map +1 -0
  358. package/lib/types/components/LangPicker.js +17 -0
  359. package/lib/types/components/LoadedContextPanel.d.ts +20 -0
  360. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -0
  361. package/lib/types/components/LoadedContextPanel.js +32 -0
  362. package/lib/types/components/LogoV2.d.ts +48 -0
  363. package/lib/types/components/LogoV2.d.ts.map +1 -0
  364. package/lib/types/components/LogoV2.js +239 -0
  365. package/lib/types/components/Markdown.d.ts +46 -0
  366. package/lib/types/components/Markdown.d.ts.map +1 -0
  367. package/lib/types/components/Markdown.js +178 -0
  368. package/lib/types/components/MarkdownTable.d.ts +13 -0
  369. package/lib/types/components/MarkdownTable.d.ts.map +1 -0
  370. package/lib/types/components/MarkdownTable.js +155 -0
  371. package/lib/types/components/MermaidDiagram.d.ts +13 -0
  372. package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
  373. package/lib/types/components/MermaidDiagram.js +61 -0
  374. package/lib/types/components/MessageList.d.ts +144 -0
  375. package/lib/types/components/MessageList.d.ts.map +1 -0
  376. package/lib/types/components/MessageList.js +1170 -0
  377. package/lib/types/components/MigratePicker.d.ts +30 -0
  378. package/lib/types/components/MigratePicker.d.ts.map +1 -0
  379. package/lib/types/components/MigratePicker.js +38 -0
  380. package/lib/types/components/ModelPicker.d.ts +42 -0
  381. package/lib/types/components/ModelPicker.d.ts.map +1 -0
  382. package/lib/types/components/ModelPicker.js +51 -0
  383. package/lib/types/components/OverlayAbove.d.ts +48 -0
  384. package/lib/types/components/OverlayAbove.d.ts.map +1 -0
  385. package/lib/types/components/OverlayAbove.js +98 -0
  386. package/lib/types/components/PageMargin.d.ts +58 -0
  387. package/lib/types/components/PageMargin.d.ts.map +1 -0
  388. package/lib/types/components/PageMargin.js +38 -0
  389. package/lib/types/components/PermissionsPicker.d.ts +20 -0
  390. package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
  391. package/lib/types/components/PermissionsPicker.js +33 -0
  392. package/lib/types/components/PlanPicker.d.ts +15 -0
  393. package/lib/types/components/PlanPicker.d.ts.map +1 -0
  394. package/lib/types/components/PlanPicker.js +18 -0
  395. package/lib/types/components/PluginSceneBoundary.d.ts +31 -0
  396. package/lib/types/components/PluginSceneBoundary.d.ts.map +1 -0
  397. package/lib/types/components/PluginSceneBoundary.js +29 -0
  398. package/lib/types/components/PluginStatusViewBoundary.d.ts +26 -0
  399. package/lib/types/components/PluginStatusViewBoundary.d.ts.map +1 -0
  400. package/lib/types/components/PluginStatusViewBoundary.js +22 -0
  401. package/lib/types/components/PresetPicker.d.ts +20 -0
  402. package/lib/types/components/PresetPicker.d.ts.map +1 -0
  403. package/lib/types/components/PresetPicker.js +24 -0
  404. package/lib/types/components/PromptEditor.d.ts +48 -0
  405. package/lib/types/components/PromptEditor.d.ts.map +1 -0
  406. package/lib/types/components/PromptEditor.js +75 -0
  407. package/lib/types/components/PromptInput.d.ts +163 -0
  408. package/lib/types/components/PromptInput.d.ts.map +1 -0
  409. package/lib/types/components/PromptInput.js +3503 -0
  410. package/lib/types/components/RecapPanel.d.ts +25 -0
  411. package/lib/types/components/RecapPanel.d.ts.map +1 -0
  412. package/lib/types/components/RecapPanel.js +55 -0
  413. package/lib/types/components/RewindPicker.d.ts +37 -0
  414. package/lib/types/components/RewindPicker.d.ts.map +1 -0
  415. package/lib/types/components/RewindPicker.js +66 -0
  416. package/lib/types/components/ScrollbarGutter.d.ts +43 -0
  417. package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
  418. package/lib/types/components/ScrollbarGutter.js +197 -0
  419. package/lib/types/components/SearchBox.d.ts +24 -0
  420. package/lib/types/components/SearchBox.d.ts.map +1 -0
  421. package/lib/types/components/SearchBox.js +132 -0
  422. package/lib/types/components/Select.d.ts +29 -0
  423. package/lib/types/components/Select.d.ts.map +1 -0
  424. package/lib/types/components/Select.js +21 -0
  425. package/lib/types/components/SkillsPicker.d.ts +21 -0
  426. package/lib/types/components/SkillsPicker.d.ts.map +1 -0
  427. package/lib/types/components/SkillsPicker.js +52 -0
  428. package/lib/types/components/Spinner/GlimmerMessage.d.ts +16 -0
  429. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -0
  430. package/lib/types/components/Spinner/GlimmerMessage.js +57 -0
  431. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +33 -0
  432. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts.map +1 -0
  433. package/lib/types/components/Spinner/SpinnerAnimationRow.js +168 -0
  434. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +16 -0
  435. package/lib/types/components/Spinner/SpinnerGlyph.d.ts.map +1 -0
  436. package/lib/types/components/Spinner/SpinnerGlyph.js +36 -0
  437. package/lib/types/components/Spinner/spinnerMode.d.ts +2 -0
  438. package/lib/types/components/Spinner/spinnerMode.d.ts.map +1 -0
  439. package/lib/types/components/Spinner/spinnerMode.js +1 -0
  440. package/lib/types/components/Spinner/spinnerUtils.d.ts +36 -0
  441. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -0
  442. package/lib/types/components/Spinner/spinnerUtils.js +94 -0
  443. package/lib/types/components/Spinner/useStalledAnimation.d.ts +16 -0
  444. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -0
  445. package/lib/types/components/Spinner/useStalledAnimation.js +52 -0
  446. package/lib/types/components/SplitDiffView.d.ts +25 -0
  447. package/lib/types/components/SplitDiffView.d.ts.map +1 -0
  448. package/lib/types/components/SplitDiffView.js +279 -0
  449. package/lib/types/components/StreamingMarkdown.d.ts +6 -0
  450. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -0
  451. package/lib/types/components/StreamingMarkdown.js +279 -0
  452. package/lib/types/components/SubagentCard.d.ts +10 -0
  453. package/lib/types/components/SubagentCard.d.ts.map +1 -0
  454. package/lib/types/components/SubagentCard.js +39 -0
  455. package/lib/types/components/SubagentDashboard.d.ts +17 -0
  456. package/lib/types/components/SubagentDashboard.d.ts.map +1 -0
  457. package/lib/types/components/SubagentDashboard.js +58 -0
  458. package/lib/types/components/SubagentDetailScene.d.ts +16 -0
  459. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -0
  460. package/lib/types/components/SubagentDetailScene.js +147 -0
  461. package/lib/types/components/SuggestionCard.d.ts +65 -0
  462. package/lib/types/components/SuggestionCard.d.ts.map +1 -0
  463. package/lib/types/components/SuggestionCard.js +77 -0
  464. package/lib/types/components/SyntaxText.d.ts +15 -0
  465. package/lib/types/components/SyntaxText.d.ts.map +1 -0
  466. package/lib/types/components/SyntaxText.js +34 -0
  467. package/lib/types/components/ThemePicker.d.ts +27 -0
  468. package/lib/types/components/ThemePicker.d.ts.map +1 -0
  469. package/lib/types/components/ThemePicker.js +55 -0
  470. package/lib/types/components/ThinkingToggle.d.ts +13 -0
  471. package/lib/types/components/ThinkingToggle.d.ts.map +1 -0
  472. package/lib/types/components/ThinkingToggle.js +25 -0
  473. package/lib/types/components/TimelineRail.d.ts +53 -0
  474. package/lib/types/components/TimelineRail.d.ts.map +1 -0
  475. package/lib/types/components/TimelineRail.js +197 -0
  476. package/lib/types/components/TipsPanel.d.ts +14 -0
  477. package/lib/types/components/TipsPanel.d.ts.map +1 -0
  478. package/lib/types/components/TipsPanel.js +37 -0
  479. package/lib/types/components/ToolUseLoader.d.ts +18 -0
  480. package/lib/types/components/ToolUseLoader.d.ts.map +1 -0
  481. package/lib/types/components/ToolUseLoader.js +51 -0
  482. package/lib/types/components/Tooltip.d.ts +67 -0
  483. package/lib/types/components/Tooltip.d.ts.map +1 -0
  484. package/lib/types/components/Tooltip.js +266 -0
  485. package/lib/types/components/TurnInterruptedRow.d.ts +6 -0
  486. package/lib/types/components/TurnInterruptedRow.d.ts.map +1 -0
  487. package/lib/types/components/TurnInterruptedRow.js +9 -0
  488. package/lib/types/components/Whale.d.ts +42 -0
  489. package/lib/types/components/Whale.d.ts.map +1 -0
  490. package/lib/types/components/Whale.js +108 -0
  491. package/lib/types/components/WorkingSpinner.d.ts +26 -0
  492. package/lib/types/components/WorkingSpinner.d.ts.map +1 -0
  493. package/lib/types/components/WorkingSpinner.js +67 -0
  494. package/lib/types/components/WorkspaceFlowPicker.d.ts +20 -0
  495. package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
  496. package/lib/types/components/WorkspaceFlowPicker.js +21 -0
  497. package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
  498. package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
  499. package/lib/types/components/WorkspaceMenuPicker.js +19 -0
  500. package/lib/types/components/WorkspacePicker.d.ts +12 -0
  501. package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
  502. package/lib/types/components/WorkspacePicker.js +13 -0
  503. package/lib/types/components/activityFrames.d.ts +23 -0
  504. package/lib/types/components/activityFrames.d.ts.map +1 -0
  505. package/lib/types/components/activityFrames.js +31 -0
  506. package/lib/types/components/approvals/ApprovalPanel.d.ts +24 -0
  507. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -0
  508. package/lib/types/components/approvals/ApprovalPanel.js +53 -0
  509. package/lib/types/components/bigfont.d.ts +28 -0
  510. package/lib/types/components/bigfont.d.ts.map +1 -0
  511. package/lib/types/components/bigfont.js +91 -0
  512. package/lib/types/components/design-system/Byline.d.ts +14 -0
  513. package/lib/types/components/design-system/Byline.d.ts.map +1 -0
  514. package/lib/types/components/design-system/Byline.js +17 -0
  515. package/lib/types/components/design-system/Divider.d.ts +61 -0
  516. package/lib/types/components/design-system/Divider.d.ts.map +1 -0
  517. package/lib/types/components/design-system/Divider.js +115 -0
  518. package/lib/types/components/design-system/HintLine.d.ts +11 -0
  519. package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
  520. package/lib/types/components/design-system/HintLine.js +14 -0
  521. package/lib/types/components/design-system/ListItem.d.ts +42 -0
  522. package/lib/types/components/design-system/ListItem.d.ts.map +1 -0
  523. package/lib/types/components/design-system/ListItem.js +84 -0
  524. package/lib/types/components/design-system/LoadingState.d.ts +19 -0
  525. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -0
  526. package/lib/types/components/design-system/LoadingState.js +22 -0
  527. package/lib/types/components/design-system/Pane.d.ts +17 -0
  528. package/lib/types/components/design-system/Pane.d.ts.map +1 -0
  529. package/lib/types/components/design-system/Pane.js +15 -0
  530. package/lib/types/components/design-system/ProgressBar.d.ts +21 -0
  531. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -0
  532. package/lib/types/components/design-system/ProgressBar.js +26 -0
  533. package/lib/types/components/design-system/StatusIcon.d.ts +15 -0
  534. package/lib/types/components/design-system/StatusIcon.d.ts.map +1 -0
  535. package/lib/types/components/design-system/StatusIcon.js +20 -0
  536. package/lib/types/components/design-system/ThemeProvider.d.ts +21 -0
  537. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -0
  538. package/lib/types/components/design-system/ThemeProvider.js +256 -0
  539. package/lib/types/components/design-system/ThemedBox.d.ts +60 -0
  540. package/lib/types/components/design-system/ThemedBox.d.ts.map +1 -0
  541. package/lib/types/components/design-system/ThemedBox.js +29 -0
  542. package/lib/types/components/design-system/ThemedText.d.ts +61 -0
  543. package/lib/types/components/design-system/ThemedText.d.ts.map +1 -0
  544. package/lib/types/components/design-system/ThemedText.js +42 -0
  545. package/lib/types/components/listWindow.d.ts +26 -0
  546. package/lib/types/components/listWindow.d.ts.map +1 -0
  547. package/lib/types/components/listWindow.js +47 -0
  548. package/lib/types/components/messages/AssistantTextMessage.d.ts +20 -0
  549. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -0
  550. package/lib/types/components/messages/AssistantTextMessage.js +18 -0
  551. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +40 -0
  552. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -0
  553. package/lib/types/components/messages/AssistantThinkingMessage.js +84 -0
  554. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +72 -0
  555. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -0
  556. package/lib/types/components/messages/AssistantToolUseMessage.js +517 -0
  557. package/lib/types/components/messages/MessageMetadata.d.ts +14 -0
  558. package/lib/types/components/messages/MessageMetadata.d.ts.map +1 -0
  559. package/lib/types/components/messages/MessageMetadata.js +19 -0
  560. package/lib/types/components/messages/TranscriptImages.d.ts +21 -0
  561. package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -0
  562. package/lib/types/components/messages/TranscriptImages.js +83 -0
  563. package/lib/types/components/messages/UserPromptMessage.d.ts +18 -0
  564. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -0
  565. package/lib/types/components/messages/UserPromptMessage.js +28 -0
  566. package/lib/types/components/messages/imageInspection.d.ts +33 -0
  567. package/lib/types/components/messages/imageInspection.d.ts.map +1 -0
  568. package/lib/types/components/messages/imageInspection.js +107 -0
  569. package/lib/types/components/messages/originalImage.d.ts +5 -0
  570. package/lib/types/components/messages/originalImage.d.ts.map +1 -0
  571. package/lib/types/components/messages/originalImage.js +56 -0
  572. package/lib/types/components/messages/transcriptImageDecode.d.ts +9 -0
  573. package/lib/types/components/messages/transcriptImageDecode.d.ts.map +1 -0
  574. package/lib/types/components/messages/transcriptImageDecode.js +144 -0
  575. package/lib/types/components/messages/useImageInspection.d.ts +10 -0
  576. package/lib/types/components/messages/useImageInspection.d.ts.map +1 -0
  577. package/lib/types/components/messages/useImageInspection.js +91 -0
  578. package/lib/types/components/overlayBudget.d.ts +39 -0
  579. package/lib/types/components/overlayBudget.d.ts.map +1 -0
  580. package/lib/types/components/overlayBudget.js +43 -0
  581. package/lib/types/components/promptDraftCache.d.ts +102 -0
  582. package/lib/types/components/promptDraftCache.d.ts.map +1 -0
  583. package/lib/types/components/promptDraftCache.js +76 -0
  584. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +94 -0
  585. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -0
  586. package/lib/types/components/questions/AskUserQuestionPanel.js +527 -0
  587. package/lib/types/components/questions/PlanReviewPanel.d.ts +55 -0
  588. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -0
  589. package/lib/types/components/questions/PlanReviewPanel.js +351 -0
  590. package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
  591. package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
  592. package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
  593. package/lib/types/components/sessions/SessionListRow.d.ts +58 -0
  594. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -0
  595. package/lib/types/components/sessions/SessionListRow.js +108 -0
  596. package/lib/types/components/sessions/SessionPreview.d.ts +25 -0
  597. package/lib/types/components/sessions/SessionPreview.d.ts.map +1 -0
  598. package/lib/types/components/sessions/SessionPreview.js +62 -0
  599. package/lib/types/components/sessions/WorkspaceListRow.d.ts +17 -0
  600. package/lib/types/components/sessions/WorkspaceListRow.d.ts.map +1 -0
  601. package/lib/types/components/sessions/WorkspaceListRow.js +27 -0
  602. package/lib/types/components/shimmer.d.ts +35 -0
  603. package/lib/types/components/shimmer.d.ts.map +1 -0
  604. package/lib/types/components/shimmer.js +43 -0
  605. package/lib/types/components/smoothReveal.d.ts +57 -0
  606. package/lib/types/components/smoothReveal.d.ts.map +1 -0
  607. package/lib/types/components/smoothReveal.js +305 -0
  608. package/lib/types/components/trajectory/HotspotView.d.ts +20 -0
  609. package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
  610. package/lib/types/components/trajectory/HotspotView.js +89 -0
  611. package/lib/types/components/trajectory/Inspector.d.ts +31 -0
  612. package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
  613. package/lib/types/components/trajectory/Inspector.js +67 -0
  614. package/lib/types/components/trajectory/Ledger.d.ts +28 -0
  615. package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
  616. package/lib/types/components/trajectory/Ledger.js +130 -0
  617. package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
  618. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
  619. package/lib/types/components/trajectory/MiniWake.js +99 -0
  620. package/lib/types/components/trajectory/WaveBand.d.ts +42 -0
  621. package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
  622. package/lib/types/components/trajectory/WaveBand.js +150 -0
  623. package/lib/types/components/whaleFrames.d.ts +81 -0
  624. package/lib/types/components/whaleFrames.d.ts.map +1 -0
  625. package/lib/types/components/whaleFrames.js +768 -0
  626. package/lib/types/components/whaleIdle.d.ts +66 -0
  627. package/lib/types/components/whaleIdle.d.ts.map +1 -0
  628. package/lib/types/components/whaleIdle.js +174 -0
  629. package/lib/types/components/whaleLayers.d.ts +28 -0
  630. package/lib/types/components/whaleLayers.d.ts.map +1 -0
  631. package/lib/types/components/whaleLayers.js +90 -0
  632. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
  633. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
  634. package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
  635. package/lib/types/customTheme.d.ts +108 -0
  636. package/lib/types/customTheme.d.ts.map +1 -0
  637. package/lib/types/customTheme.js +281 -0
  638. package/lib/types/deepseekBalance.d.ts +19 -0
  639. package/lib/types/deepseekBalance.d.ts.map +1 -0
  640. package/lib/types/deepseekBalance.js +72 -0
  641. package/lib/types/deepseekPricing.d.ts +83 -0
  642. package/lib/types/deepseekPricing.d.ts.map +1 -0
  643. package/lib/types/deepseekPricing.js +140 -0
  644. package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
  645. package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
  646. package/lib/types/dsh-adapter/activity-store.js +359 -0
  647. package/lib/types/dsh-adapter/agent-view.d.ts +66 -0
  648. package/lib/types/dsh-adapter/agent-view.d.ts.map +1 -0
  649. package/lib/types/dsh-adapter/agent-view.js +153 -0
  650. package/lib/types/dsh-adapter/approvals.d.ts +225 -0
  651. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
  652. package/lib/types/dsh-adapter/approvals.js +465 -0
  653. package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
  654. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
  655. package/lib/types/dsh-adapter/bundled-presets.js +80 -0
  656. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +20 -0
  657. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -0
  658. package/lib/types/dsh-adapter/channel/action-readiness.js +86 -0
  659. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +64 -0
  660. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -0
  661. package/lib/types/dsh-adapter/channel/agent-view-projection.js +312 -0
  662. package/lib/types/dsh-adapter/channel/background-action.d.ts +41 -0
  663. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -0
  664. package/lib/types/dsh-adapter/channel/background-action.js +110 -0
  665. package/lib/types/dsh-adapter/channel/binding-events.d.ts +67 -0
  666. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -0
  667. package/lib/types/dsh-adapter/channel/binding-events.js +170 -0
  668. package/lib/types/dsh-adapter/channel/binding.d.ts +58 -0
  669. package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -0
  670. package/lib/types/dsh-adapter/channel/binding.js +287 -0
  671. package/lib/types/dsh-adapter/channel/command-completions.d.ts +29 -0
  672. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -0
  673. package/lib/types/dsh-adapter/channel/command-completions.js +94 -0
  674. package/lib/types/dsh-adapter/channel/commands.d.ts +8 -0
  675. package/lib/types/dsh-adapter/channel/commands.d.ts.map +1 -0
  676. package/lib/types/dsh-adapter/channel/commands.js +9 -0
  677. package/lib/types/dsh-adapter/channel/compaction.d.ts +18 -0
  678. package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -0
  679. package/lib/types/dsh-adapter/channel/compaction.js +114 -0
  680. package/lib/types/dsh-adapter/channel/composer-images.d.ts +62 -0
  681. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -0
  682. package/lib/types/dsh-adapter/channel/composer-images.js +316 -0
  683. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts +15 -0
  684. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -0
  685. package/lib/types/dsh-adapter/channel/composer-mentions.js +200 -0
  686. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +34 -0
  687. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -0
  688. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +31 -0
  689. package/lib/types/dsh-adapter/channel/decisions.d.ts +19 -0
  690. package/lib/types/dsh-adapter/channel/decisions.d.ts.map +1 -0
  691. package/lib/types/dsh-adapter/channel/decisions.js +90 -0
  692. package/lib/types/dsh-adapter/channel/emitter.d.ts +10 -0
  693. package/lib/types/dsh-adapter/channel/emitter.d.ts.map +1 -0
  694. package/lib/types/dsh-adapter/channel/emitter.js +71 -0
  695. package/lib/types/dsh-adapter/channel/external-commands.d.ts +31 -0
  696. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -0
  697. package/lib/types/dsh-adapter/channel/external-commands.js +187 -0
  698. package/lib/types/dsh-adapter/channel/file-actions.d.ts +20 -0
  699. package/lib/types/dsh-adapter/channel/file-actions.d.ts.map +1 -0
  700. package/lib/types/dsh-adapter/channel/file-actions.js +45 -0
  701. package/lib/types/dsh-adapter/channel/ide-selection.d.ts +58 -0
  702. package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
  703. package/lib/types/dsh-adapter/channel/ide-selection.js +226 -0
  704. package/lib/types/dsh-adapter/channel/input-actions.d.ts +13 -0
  705. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -0
  706. package/lib/types/dsh-adapter/channel/input-actions.js +135 -0
  707. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +42 -0
  708. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -0
  709. package/lib/types/dsh-adapter/channel/input-delivery.js +313 -0
  710. package/lib/types/dsh-adapter/channel/job-projection.d.ts +28 -0
  711. package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -0
  712. package/lib/types/dsh-adapter/channel/job-projection.js +150 -0
  713. package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts +9 -0
  714. package/lib/types/dsh-adapter/channel/lifetime-resources.d.ts.map +1 -0
  715. package/lib/types/dsh-adapter/channel/lifetime-resources.js +33 -0
  716. package/lib/types/dsh-adapter/channel/loaded-context.d.ts +40 -0
  717. package/lib/types/dsh-adapter/channel/loaded-context.d.ts.map +1 -0
  718. package/lib/types/dsh-adapter/channel/loaded-context.js +62 -0
  719. package/lib/types/dsh-adapter/channel/local-actions.d.ts +54 -0
  720. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -0
  721. package/lib/types/dsh-adapter/channel/local-actions.js +109 -0
  722. package/lib/types/dsh-adapter/channel/mentions.d.ts +29 -0
  723. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -0
  724. package/lib/types/dsh-adapter/channel/mentions.js +235 -0
  725. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +30 -0
  726. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -0
  727. package/lib/types/dsh-adapter/channel/mode-actions.js +247 -0
  728. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +35 -0
  729. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -0
  730. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +199 -0
  731. package/lib/types/dsh-adapter/channel/mode-permission.d.ts +58 -0
  732. package/lib/types/dsh-adapter/channel/mode-permission.d.ts.map +1 -0
  733. package/lib/types/dsh-adapter/channel/mode-permission.js +240 -0
  734. package/lib/types/dsh-adapter/channel/mode-roster.d.ts +51 -0
  735. package/lib/types/dsh-adapter/channel/mode-roster.d.ts.map +1 -0
  736. package/lib/types/dsh-adapter/channel/mode-roster.js +119 -0
  737. package/lib/types/dsh-adapter/channel/model-actions.d.ts +49 -0
  738. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -0
  739. package/lib/types/dsh-adapter/channel/model-actions.js +351 -0
  740. package/lib/types/dsh-adapter/channel/model-switch.d.ts +31 -0
  741. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -0
  742. package/lib/types/dsh-adapter/channel/model-switch.js +116 -0
  743. package/lib/types/dsh-adapter/channel/notifications.d.ts +9 -0
  744. package/lib/types/dsh-adapter/channel/notifications.d.ts.map +1 -0
  745. package/lib/types/dsh-adapter/channel/notifications.js +24 -0
  746. package/lib/types/dsh-adapter/channel/owner.d.ts +18 -0
  747. package/lib/types/dsh-adapter/channel/owner.d.ts.map +1 -0
  748. package/lib/types/dsh-adapter/channel/owner.js +73 -0
  749. package/lib/types/dsh-adapter/channel/paths.d.ts +31 -0
  750. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -0
  751. package/lib/types/dsh-adapter/channel/paths.js +147 -0
  752. package/lib/types/dsh-adapter/channel/permissions.d.ts +40 -0
  753. package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -0
  754. package/lib/types/dsh-adapter/channel/permissions.js +187 -0
  755. package/lib/types/dsh-adapter/channel/preferences.d.ts +3 -0
  756. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -0
  757. package/lib/types/dsh-adapter/channel/preferences.js +103 -0
  758. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts +13 -0
  759. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -0
  760. package/lib/types/dsh-adapter/channel/projection-helpers.js +63 -0
  761. package/lib/types/dsh-adapter/channel/projection.d.ts +44 -0
  762. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -0
  763. package/lib/types/dsh-adapter/channel/projection.js +1031 -0
  764. package/lib/types/dsh-adapter/channel/reports.d.ts +32 -0
  765. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -0
  766. package/lib/types/dsh-adapter/channel/reports.js +163 -0
  767. package/lib/types/dsh-adapter/channel/session-actions.d.ts +13 -0
  768. package/lib/types/dsh-adapter/channel/session-actions.d.ts.map +1 -0
  769. package/lib/types/dsh-adapter/channel/session-actions.js +29 -0
  770. package/lib/types/dsh-adapter/channel/session-adoption.d.ts +32 -0
  771. package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -0
  772. package/lib/types/dsh-adapter/channel/session-adoption.js +36 -0
  773. package/lib/types/dsh-adapter/channel/session-fork.d.ts +19 -0
  774. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -0
  775. package/lib/types/dsh-adapter/channel/session-fork.js +109 -0
  776. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +35 -0
  777. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -0
  778. package/lib/types/dsh-adapter/channel/session-live-adoption.js +64 -0
  779. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +91 -0
  780. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -0
  781. package/lib/types/dsh-adapter/channel/session-metadata.js +220 -0
  782. package/lib/types/dsh-adapter/channel/session-reset.d.ts +11 -0
  783. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -0
  784. package/lib/types/dsh-adapter/channel/session-reset.js +43 -0
  785. package/lib/types/dsh-adapter/channel/session-resume.d.ts +65 -0
  786. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -0
  787. package/lib/types/dsh-adapter/channel/session-resume.js +438 -0
  788. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +19 -0
  789. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -0
  790. package/lib/types/dsh-adapter/channel/session-rewind.js +146 -0
  791. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +19 -0
  792. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -0
  793. package/lib/types/dsh-adapter/channel/session-tree-actions.js +154 -0
  794. package/lib/types/dsh-adapter/channel/session-tree.d.ts +10 -0
  795. package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -0
  796. package/lib/types/dsh-adapter/channel/session-tree.js +503 -0
  797. package/lib/types/dsh-adapter/channel/settings-host.d.ts +4 -0
  798. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -0
  799. package/lib/types/dsh-adapter/channel/settings-host.js +257 -0
  800. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts +33 -0
  801. package/lib/types/dsh-adapter/channel/skill-catalog.d.ts.map +1 -0
  802. package/lib/types/dsh-adapter/channel/skill-catalog.js +215 -0
  803. package/lib/types/dsh-adapter/channel/state.d.ts +51 -0
  804. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -0
  805. package/lib/types/dsh-adapter/channel/state.js +31 -0
  806. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +67 -0
  807. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -0
  808. package/lib/types/dsh-adapter/channel/subagent-projection.js +307 -0
  809. package/lib/types/dsh-adapter/channel/transcript.d.ts +73 -0
  810. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -0
  811. package/lib/types/dsh-adapter/channel/transcript.js +306 -0
  812. package/lib/types/dsh-adapter/channel/types.d.ts +167 -0
  813. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -0
  814. package/lib/types/dsh-adapter/channel/types.js +1 -0
  815. package/lib/types/dsh-adapter/channel/usage.d.ts +13 -0
  816. package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -0
  817. package/lib/types/dsh-adapter/channel/usage.js +48 -0
  818. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +23 -0
  819. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -0
  820. package/lib/types/dsh-adapter/channel/workspace-actions.js +96 -0
  821. package/lib/types/dsh-adapter/channel-facade-actions.d.ts +25 -0
  822. package/lib/types/dsh-adapter/channel-facade-actions.d.ts.map +1 -0
  823. package/lib/types/dsh-adapter/channel-facade-actions.js +55 -0
  824. package/lib/types/dsh-adapter/channel-scene-outlet.d.ts +6 -0
  825. package/lib/types/dsh-adapter/channel-scene-outlet.d.ts.map +1 -0
  826. package/lib/types/dsh-adapter/channel-scene-outlet.js +13 -0
  827. package/lib/types/dsh-adapter/channel-ui.d.ts +9 -0
  828. package/lib/types/dsh-adapter/channel-ui.d.ts.map +1 -0
  829. package/lib/types/dsh-adapter/channel-ui.js +128 -0
  830. package/lib/types/dsh-adapter/channel.d.ts +23 -0
  831. package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
  832. package/lib/types/dsh-adapter/channel.js +999 -0
  833. package/lib/types/dsh-adapter/childStderr.d.ts +63 -0
  834. package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
  835. package/lib/types/dsh-adapter/childStderr.js +180 -0
  836. package/lib/types/dsh-adapter/command-attribution.d.ts +51 -0
  837. package/lib/types/dsh-adapter/command-attribution.d.ts.map +1 -0
  838. package/lib/types/dsh-adapter/command-attribution.js +93 -0
  839. package/lib/types/dsh-adapter/command-errors.d.ts +42 -0
  840. package/lib/types/dsh-adapter/command-errors.d.ts.map +1 -0
  841. package/lib/types/dsh-adapter/command-errors.js +63 -0
  842. package/lib/types/dsh-adapter/command-trees.d.ts +34 -0
  843. package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
  844. package/lib/types/dsh-adapter/command-trees.js +111 -0
  845. package/lib/types/dsh-adapter/compat/index.d.ts +29 -0
  846. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
  847. package/lib/types/dsh-adapter/compat/index.js +28 -0
  848. package/lib/types/dsh-adapter/compat/liveSession.d.ts +79 -0
  849. package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -0
  850. package/lib/types/dsh-adapter/compat/liveSession.js +223 -0
  851. package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
  852. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
  853. package/lib/types/dsh-adapter/compat/messages.js +15 -0
  854. package/lib/types/dsh-adapter/compat/persistence.d.ts +21 -0
  855. package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -0
  856. package/lib/types/dsh-adapter/compat/persistence.js +17 -0
  857. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +309 -0
  858. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
  859. package/lib/types/dsh-adapter/compat/sessionLog.js +1177 -0
  860. package/lib/types/dsh-adapter/compat/settings.d.ts +35 -0
  861. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
  862. package/lib/types/dsh-adapter/compat/settings.js +57 -0
  863. package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
  864. package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
  865. package/lib/types/dsh-adapter/compat/shell.js +11 -0
  866. package/lib/types/dsh-adapter/component-identity.d.ts +33 -0
  867. package/lib/types/dsh-adapter/component-identity.d.ts.map +1 -0
  868. package/lib/types/dsh-adapter/component-identity.js +108 -0
  869. package/lib/types/dsh-adapter/contract.d.ts +91 -0
  870. package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
  871. package/lib/types/dsh-adapter/contract.js +276 -0
  872. package/lib/types/dsh-adapter/credentialRefGuard.d.ts +40 -0
  873. package/lib/types/dsh-adapter/credentialRefGuard.d.ts.map +1 -0
  874. package/lib/types/dsh-adapter/credentialRefGuard.js +43 -0
  875. package/lib/types/dsh-adapter/decision-guard.d.ts +128 -0
  876. package/lib/types/dsh-adapter/decision-guard.d.ts.map +1 -0
  877. package/lib/types/dsh-adapter/decision-guard.js +460 -0
  878. package/lib/types/dsh-adapter/dialogs.d.ts +145 -0
  879. package/lib/types/dsh-adapter/dialogs.d.ts.map +1 -0
  880. package/lib/types/dsh-adapter/dialogs.js +329 -0
  881. package/lib/types/dsh-adapter/effect-ledger.d.ts +96 -0
  882. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -0
  883. package/lib/types/dsh-adapter/effect-ledger.js +290 -0
  884. package/lib/types/dsh-adapter/extension-events.d.ts +186 -0
  885. package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -0
  886. package/lib/types/dsh-adapter/extension-events.js +187 -0
  887. package/lib/types/dsh-adapter/extensions.d.ts +36 -0
  888. package/lib/types/dsh-adapter/extensions.d.ts.map +1 -0
  889. package/lib/types/dsh-adapter/extensions.js +51 -0
  890. package/lib/types/dsh-adapter/host-access.d.ts +37 -0
  891. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -0
  892. package/lib/types/dsh-adapter/host-access.js +652 -0
  893. package/lib/types/dsh-adapter/host-grants.d.ts +23 -0
  894. package/lib/types/dsh-adapter/host-grants.d.ts.map +1 -0
  895. package/lib/types/dsh-adapter/host-grants.js +45 -0
  896. package/lib/types/dsh-adapter/ide-channel.d.ts +224 -0
  897. package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
  898. package/lib/types/dsh-adapter/ide-channel.js +556 -0
  899. package/lib/types/dsh-adapter/index.d.ts +151 -0
  900. package/lib/types/dsh-adapter/index.d.ts.map +1 -0
  901. package/lib/types/dsh-adapter/index.js +119 -0
  902. package/lib/types/dsh-adapter/inject-channel.d.ts +108 -0
  903. package/lib/types/dsh-adapter/inject-channel.d.ts.map +1 -0
  904. package/lib/types/dsh-adapter/inject-channel.js +247 -0
  905. package/lib/types/dsh-adapter/invariant.d.ts +20 -0
  906. package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
  907. package/lib/types/dsh-adapter/invariant.js +26 -0
  908. package/lib/types/dsh-adapter/jobs.d.ts +101 -0
  909. package/lib/types/dsh-adapter/jobs.d.ts.map +1 -0
  910. package/lib/types/dsh-adapter/jobs.js +177 -0
  911. package/lib/types/dsh-adapter/message-observer.d.ts +186 -0
  912. package/lib/types/dsh-adapter/message-observer.d.ts.map +1 -0
  913. package/lib/types/dsh-adapter/message-observer.js +682 -0
  914. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
  915. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
  916. package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +191 -0
  917. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
  918. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
  919. package/lib/types/dsh-adapter/migrate/adapters/codex.js +133 -0
  920. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
  921. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
  922. package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +175 -0
  923. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
  924. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
  925. package/lib/types/dsh-adapter/migrate/adapters/omp.js +132 -0
  926. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +6 -0
  927. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
  928. package/lib/types/dsh-adapter/migrate/adapters/scan.js +38 -0
  929. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
  930. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
  931. package/lib/types/dsh-adapter/migrate/adapters/zcode.js +107 -0
  932. package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
  933. package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
  934. package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
  935. package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
  936. package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
  937. package/lib/types/dsh-adapter/migrate/cli.js +105 -0
  938. package/lib/types/dsh-adapter/migrate/index.d.ts +29 -0
  939. package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
  940. package/lib/types/dsh-adapter/migrate/index.js +108 -0
  941. package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
  942. package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
  943. package/lib/types/dsh-adapter/migrate/picker.js +86 -0
  944. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
  945. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
  946. package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
  947. package/lib/types/dsh-adapter/migrate/sessionize.d.ts +19 -0
  948. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
  949. package/lib/types/dsh-adapter/migrate/sessionize.js +101 -0
  950. package/lib/types/dsh-adapter/migrate/types.d.ts +52 -0
  951. package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
  952. package/lib/types/dsh-adapter/migrate/types.js +11 -0
  953. package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
  954. package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
  955. package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
  956. package/lib/types/dsh-adapter/packaged-presets.d.ts +22 -0
  957. package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -0
  958. package/lib/types/dsh-adapter/packaged-presets.js +94 -0
  959. package/lib/types/dsh-adapter/plugin-host.d.ts +205 -0
  960. package/lib/types/dsh-adapter/plugin-host.d.ts.map +1 -0
  961. package/lib/types/dsh-adapter/plugin-host.js +762 -0
  962. package/lib/types/dsh-adapter/plugin-storage.d.ts +118 -0
  963. package/lib/types/dsh-adapter/plugin-storage.d.ts.map +1 -0
  964. package/lib/types/dsh-adapter/plugin-storage.js +536 -0
  965. package/lib/types/dsh-adapter/plugin.d.ts +70 -0
  966. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
  967. package/lib/types/dsh-adapter/plugin.js +2140 -0
  968. package/lib/types/dsh-adapter/plugins-info.d.ts +43 -0
  969. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -0
  970. package/lib/types/dsh-adapter/plugins-info.js +293 -0
  971. package/lib/types/dsh-adapter/preset-resolution.d.ts +57 -0
  972. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -0
  973. package/lib/types/dsh-adapter/preset-resolution.js +52 -0
  974. package/lib/types/dsh-adapter/presets.d.ts +110 -0
  975. package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
  976. package/lib/types/dsh-adapter/presets.js +161 -0
  977. package/lib/types/dsh-adapter/promptDebug.d.ts +4 -0
  978. package/lib/types/dsh-adapter/promptDebug.d.ts.map +1 -0
  979. package/lib/types/dsh-adapter/promptDebug.js +163 -0
  980. package/lib/types/dsh-adapter/providerGuard.d.ts +75 -0
  981. package/lib/types/dsh-adapter/providerGuard.d.ts.map +1 -0
  982. package/lib/types/dsh-adapter/providerGuard.js +104 -0
  983. package/lib/types/dsh-adapter/providerWizard.d.ts +42 -0
  984. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
  985. package/lib/types/dsh-adapter/providerWizard.js +921 -0
  986. package/lib/types/dsh-adapter/questions-answerer.d.ts +51 -0
  987. package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -0
  988. package/lib/types/dsh-adapter/questions-answerer.js +64 -0
  989. package/lib/types/dsh-adapter/questions.d.ts +130 -0
  990. package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
  991. package/lib/types/dsh-adapter/questions.js +282 -0
  992. package/lib/types/dsh-adapter/recap.d.ts +41 -0
  993. package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
  994. package/lib/types/dsh-adapter/recap.js +111 -0
  995. package/lib/types/dsh-adapter/renderers.d.ts +58 -0
  996. package/lib/types/dsh-adapter/renderers.d.ts.map +1 -0
  997. package/lib/types/dsh-adapter/renderers.js +198 -0
  998. package/lib/types/dsh-adapter/sanitize.d.ts +45 -0
  999. package/lib/types/dsh-adapter/sanitize.d.ts.map +1 -0
  1000. package/lib/types/dsh-adapter/sanitize.js +84 -0
  1001. package/lib/types/dsh-adapter/scenes.d.ts +87 -0
  1002. package/lib/types/dsh-adapter/scenes.d.ts.map +1 -0
  1003. package/lib/types/dsh-adapter/scenes.js +223 -0
  1004. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
  1005. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
  1006. package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
  1007. package/lib/types/dsh-adapter/sessionTree.d.ts +232 -0
  1008. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
  1009. package/lib/types/dsh-adapter/sessionTree.js +984 -0
  1010. package/lib/types/dsh-adapter/sessions/digest.d.ts +54 -0
  1011. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -0
  1012. package/lib/types/dsh-adapter/sessions/digest.js +478 -0
  1013. package/lib/types/dsh-adapter/sessions/frames.d.ts +103 -0
  1014. package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -0
  1015. package/lib/types/dsh-adapter/sessions/frames.js +263 -0
  1016. package/lib/types/dsh-adapter/sessions/header.d.ts +56 -0
  1017. package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -0
  1018. package/lib/types/dsh-adapter/sessions/header.js +85 -0
  1019. package/lib/types/dsh-adapter/sessions/index.d.ts +17 -0
  1020. package/lib/types/dsh-adapter/sessions/index.d.ts.map +1 -0
  1021. package/lib/types/dsh-adapter/sessions/index.js +15 -0
  1022. package/lib/types/dsh-adapter/sessions/list.d.ts +64 -0
  1023. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -0
  1024. package/lib/types/dsh-adapter/sessions/list.js +331 -0
  1025. package/lib/types/dsh-adapter/sessions/recovery.d.ts +17 -0
  1026. package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
  1027. package/lib/types/dsh-adapter/sessions/recovery.js +109 -0
  1028. package/lib/types/dsh-adapter/sessions/store.d.ts +60 -0
  1029. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -0
  1030. package/lib/types/dsh-adapter/sessions/store.js +221 -0
  1031. package/lib/types/dsh-adapter/sessions/types.d.ts +21 -0
  1032. package/lib/types/dsh-adapter/sessions/types.d.ts.map +1 -0
  1033. package/lib/types/dsh-adapter/sessions/types.js +1 -0
  1034. package/lib/types/dsh-adapter/settings-sections.d.ts +48 -0
  1035. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -0
  1036. package/lib/types/dsh-adapter/settings-sections.js +253 -0
  1037. package/lib/types/dsh-adapter/settingsEditor.d.ts +100 -0
  1038. package/lib/types/dsh-adapter/settingsEditor.d.ts.map +1 -0
  1039. package/lib/types/dsh-adapter/settingsEditor.js +238 -0
  1040. package/lib/types/dsh-adapter/sharp.d.ts +10 -0
  1041. package/lib/types/dsh-adapter/sharp.d.ts.map +1 -0
  1042. package/lib/types/dsh-adapter/sharp.js +59 -0
  1043. package/lib/types/dsh-adapter/shortcuts.d.ts +82 -0
  1044. package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -0
  1045. package/lib/types/dsh-adapter/shortcuts.js +252 -0
  1046. package/lib/types/dsh-adapter/sideQuestion.d.ts +36 -0
  1047. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
  1048. package/lib/types/dsh-adapter/sideQuestion.js +59 -0
  1049. package/lib/types/dsh-adapter/status.d.ts +148 -0
  1050. package/lib/types/dsh-adapter/status.d.ts.map +1 -0
  1051. package/lib/types/dsh-adapter/status.js +435 -0
  1052. package/lib/types/dsh-adapter/subagents.d.ts +64 -0
  1053. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -0
  1054. package/lib/types/dsh-adapter/subagents.js +366 -0
  1055. package/lib/types/dsh-adapter/themes.d.ts +52 -0
  1056. package/lib/types/dsh-adapter/themes.d.ts.map +1 -0
  1057. package/lib/types/dsh-adapter/themes.js +307 -0
  1058. package/lib/types/dsh-adapter/toast.d.ts +80 -0
  1059. package/lib/types/dsh-adapter/toast.d.ts.map +1 -0
  1060. package/lib/types/dsh-adapter/toast.js +171 -0
  1061. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +47 -0
  1062. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
  1063. package/lib/types/dsh-adapter/trajectory/aggregate.js +208 -0
  1064. package/lib/types/dsh-adapter/trajectory/guards.d.ts +196 -0
  1065. package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
  1066. package/lib/types/dsh-adapter/trajectory/guards.js +273 -0
  1067. package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
  1068. package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
  1069. package/lib/types/dsh-adapter/trajectory/index.js +15 -0
  1070. package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
  1071. package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
  1072. package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
  1073. package/lib/types/dsh-adapter/trajectory/projection.d.ts +146 -0
  1074. package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
  1075. package/lib/types/dsh-adapter/trajectory/projection.js +710 -0
  1076. package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
  1077. package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
  1078. package/lib/types/dsh-adapter/trajectory/types.js +70 -0
  1079. package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
  1080. package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
  1081. package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
  1082. package/lib/types/dsh-adapter/transcript-images.d.ts +17 -0
  1083. package/lib/types/dsh-adapter/transcript-images.d.ts.map +1 -0
  1084. package/lib/types/dsh-adapter/transcript-images.js +96 -0
  1085. package/lib/types/dsh-adapter/types.d.ts +23 -0
  1086. package/lib/types/dsh-adapter/types.d.ts.map +1 -0
  1087. package/lib/types/dsh-adapter/types.js +1 -0
  1088. package/lib/types/dsh-adapter/workspace.d.ts +22 -0
  1089. package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
  1090. package/lib/types/dsh-adapter/workspace.js +16 -0
  1091. package/lib/types/dsh-adapter/workspaces.d.ts +125 -0
  1092. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
  1093. package/lib/types/dsh-adapter/workspaces.js +543 -0
  1094. package/lib/types/effortPrefs.d.ts +48 -0
  1095. package/lib/types/effortPrefs.d.ts.map +1 -0
  1096. package/lib/types/effortPrefs.js +95 -0
  1097. package/lib/types/extensions.d.ts +18 -0
  1098. package/lib/types/extensions.d.ts.map +1 -0
  1099. package/lib/types/extensions.js +27 -0
  1100. package/lib/types/force-production-react.d.ts +1 -0
  1101. package/lib/types/force-production-react.d.ts.map +1 -0
  1102. package/lib/types/force-production-react.js +12 -0
  1103. package/lib/types/herdr.d.ts +28 -0
  1104. package/lib/types/herdr.d.ts.map +1 -0
  1105. package/lib/types/herdr.js +133 -0
  1106. package/lib/types/history.d.ts +39 -0
  1107. package/lib/types/history.d.ts.map +1 -0
  1108. package/lib/types/history.js +177 -0
  1109. package/lib/types/homePrefs.d.ts +15 -0
  1110. package/lib/types/homePrefs.d.ts.map +1 -0
  1111. package/lib/types/homePrefs.js +53 -0
  1112. package/lib/types/hooks/useBlink.d.ts +10 -0
  1113. package/lib/types/hooks/useBlink.d.ts.map +1 -0
  1114. package/lib/types/hooks/useBlink.js +19 -0
  1115. package/lib/types/hooks/useExternalVersion.d.ts +32 -0
  1116. package/lib/types/hooks/useExternalVersion.d.ts.map +1 -0
  1117. package/lib/types/hooks/useExternalVersion.js +53 -0
  1118. package/lib/types/hooks/useRevealVersion.d.ts +21 -0
  1119. package/lib/types/hooks/useRevealVersion.d.ts.map +1 -0
  1120. package/lib/types/hooks/useRevealVersion.js +33 -0
  1121. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts +10 -0
  1122. package/lib/types/hooks/useRuntimeThemeSnapshot.d.ts.map +1 -0
  1123. package/lib/types/hooks/useRuntimeThemeSnapshot.js +32 -0
  1124. package/lib/types/i18n.d.ts +4433 -0
  1125. package/lib/types/i18n.d.ts.map +1 -0
  1126. package/lib/types/i18n.js +1493 -0
  1127. package/lib/types/index.d.ts +3 -0
  1128. package/lib/types/index.d.ts.map +1 -0
  1129. package/lib/types/index.js +4 -0
  1130. package/lib/types/ink/Ansi.d.ts +9 -0
  1131. package/lib/types/ink/Ansi.d.ts.map +1 -0
  1132. package/lib/types/ink/Ansi.js +45 -0
  1133. package/lib/types/ink/bidi.d.ts +18 -0
  1134. package/lib/types/ink/bidi.d.ts.map +1 -0
  1135. package/lib/types/ink/bidi.js +119 -0
  1136. package/lib/types/ink/clearTerminal.d.ts +22 -0
  1137. package/lib/types/ink/clearTerminal.d.ts.map +1 -0
  1138. package/lib/types/ink/clearTerminal.js +72 -0
  1139. package/lib/types/ink/colorize.d.ts +43 -0
  1140. package/lib/types/ink/colorize.d.ts.map +1 -0
  1141. package/lib/types/ink/colorize.js +233 -0
  1142. package/lib/types/ink/components/AlternateScreen.d.ts +8 -0
  1143. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -0
  1144. package/lib/types/ink/components/AlternateScreen.js +29 -0
  1145. package/lib/types/ink/components/App.d.ts +149 -0
  1146. package/lib/types/ink/components/App.d.ts.map +1 -0
  1147. package/lib/types/ink/components/App.js +1027 -0
  1148. package/lib/types/ink/components/AppContext.d.ts +17 -0
  1149. package/lib/types/ink/components/AppContext.d.ts.map +1 -0
  1150. package/lib/types/ink/components/AppContext.js +12 -0
  1151. package/lib/types/ink/components/Box.d.ts +85 -0
  1152. package/lib/types/ink/components/Box.d.ts.map +1 -0
  1153. package/lib/types/ink/components/Box.js +22 -0
  1154. package/lib/types/ink/components/Button.d.ts +37 -0
  1155. package/lib/types/ink/components/Button.d.ts.map +1 -0
  1156. package/lib/types/ink/components/Button.js +23 -0
  1157. package/lib/types/ink/components/ClockContext.d.ts +17 -0
  1158. package/lib/types/ink/components/ClockContext.d.ts.map +1 -0
  1159. package/lib/types/ink/components/ClockContext.js +99 -0
  1160. package/lib/types/ink/components/CursorDeclarationContext.d.ts +30 -0
  1161. package/lib/types/ink/components/CursorDeclarationContext.d.ts.map +1 -0
  1162. package/lib/types/ink/components/CursorDeclarationContext.js +6 -0
  1163. package/lib/types/ink/components/ErrorOverview.d.ts +7 -0
  1164. package/lib/types/ink/components/ErrorOverview.d.ts.map +1 -0
  1165. package/lib/types/ink/components/ErrorOverview.js +49 -0
  1166. package/lib/types/ink/components/Image.d.ts +28 -0
  1167. package/lib/types/ink/components/Image.d.ts.map +1 -0
  1168. package/lib/types/ink/components/Image.js +44 -0
  1169. package/lib/types/ink/components/Link.d.ts +8 -0
  1170. package/lib/types/ink/components/Link.d.ts.map +1 -0
  1171. package/lib/types/ink/components/Link.js +7 -0
  1172. package/lib/types/ink/components/Newline.d.ts +7 -0
  1173. package/lib/types/ink/components/Newline.d.ts.map +1 -0
  1174. package/lib/types/ink/components/Newline.js +5 -0
  1175. package/lib/types/ink/components/NoSelect.d.ts +9 -0
  1176. package/lib/types/ink/components/NoSelect.d.ts.map +1 -0
  1177. package/lib/types/ink/components/NoSelect.js +6 -0
  1178. package/lib/types/ink/components/RawAnsi.d.ts +9 -0
  1179. package/lib/types/ink/components/RawAnsi.d.ts.map +1 -0
  1180. package/lib/types/ink/components/RawAnsi.js +7 -0
  1181. package/lib/types/ink/components/ScrollBox.d.ts +78 -0
  1182. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -0
  1183. package/lib/types/ink/components/ScrollBox.js +309 -0
  1184. package/lib/types/ink/components/Spacer.d.ts +4 -0
  1185. package/lib/types/ink/components/Spacer.d.ts.map +1 -0
  1186. package/lib/types/ink/components/Spacer.js +6 -0
  1187. package/lib/types/ink/components/StdinContext.d.ts +32 -0
  1188. package/lib/types/ink/components/StdinContext.d.ts.map +1 -0
  1189. package/lib/types/ink/components/StdinContext.js +16 -0
  1190. package/lib/types/ink/components/TerminalFocusContext.d.ts +11 -0
  1191. package/lib/types/ink/components/TerminalFocusContext.d.ts.map +1 -0
  1192. package/lib/types/ink/components/TerminalFocusContext.js +11 -0
  1193. package/lib/types/ink/components/TerminalSizeContext.d.ts +6 -0
  1194. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -0
  1195. package/lib/types/ink/components/TerminalSizeContext.js +2 -0
  1196. package/lib/types/ink/components/Text.d.ts +64 -0
  1197. package/lib/types/ink/components/Text.d.ts.map +1 -0
  1198. package/lib/types/ink/components/Text.js +19 -0
  1199. package/lib/types/ink/constants.d.ts +12 -0
  1200. package/lib/types/ink/constants.d.ts.map +1 -0
  1201. package/lib/types/ink/constants.js +11 -0
  1202. package/lib/types/ink/cursor.d.ts +11 -0
  1203. package/lib/types/ink/cursor.d.ts.map +1 -0
  1204. package/lib/types/ink/cursor.js +1 -0
  1205. package/lib/types/ink/devtools.d.ts +7 -0
  1206. package/lib/types/ink/devtools.d.ts.map +1 -0
  1207. package/lib/types/ink/devtools.js +1 -0
  1208. package/lib/types/ink/dom.d.ts +194 -0
  1209. package/lib/types/ink/dom.d.ts.map +1 -0
  1210. package/lib/types/ink/dom.js +424 -0
  1211. package/lib/types/ink/events/click-event.d.ts +23 -0
  1212. package/lib/types/ink/events/click-event.d.ts.map +1 -0
  1213. package/lib/types/ink/events/click-event.js +33 -0
  1214. package/lib/types/ink/events/context-menu-event.d.ts +19 -0
  1215. package/lib/types/ink/events/context-menu-event.d.ts.map +1 -0
  1216. package/lib/types/ink/events/context-menu-event.js +20 -0
  1217. package/lib/types/ink/events/dispatcher.d.ts +63 -0
  1218. package/lib/types/ink/events/dispatcher.d.ts.map +1 -0
  1219. package/lib/types/ink/events/dispatcher.js +194 -0
  1220. package/lib/types/ink/events/drag-event.d.ts +44 -0
  1221. package/lib/types/ink/events/drag-event.d.ts.map +1 -0
  1222. package/lib/types/ink/events/drag-event.js +39 -0
  1223. package/lib/types/ink/events/emitter.d.ts +20 -0
  1224. package/lib/types/ink/events/emitter.d.ts.map +1 -0
  1225. package/lib/types/ink/events/emitter.js +43 -0
  1226. package/lib/types/ink/events/event-handlers.d.ts +65 -0
  1227. package/lib/types/ink/events/event-handlers.d.ts.map +1 -0
  1228. package/lib/types/ink/events/event-handlers.js +40 -0
  1229. package/lib/types/ink/events/event.d.ts +19 -0
  1230. package/lib/types/ink/events/event.d.ts.map +1 -0
  1231. package/lib/types/ink/events/event.js +22 -0
  1232. package/lib/types/ink/events/focus-event.d.ts +19 -0
  1233. package/lib/types/ink/events/focus-event.d.ts.map +1 -0
  1234. package/lib/types/ink/events/focus-event.js +21 -0
  1235. package/lib/types/ink/events/input-event.d.ts +72 -0
  1236. package/lib/types/ink/events/input-event.d.ts.map +1 -0
  1237. package/lib/types/ink/events/input-event.js +185 -0
  1238. package/lib/types/ink/events/keyboard-event.d.ts +40 -0
  1239. package/lib/types/ink/events/keyboard-event.d.ts.map +1 -0
  1240. package/lib/types/ink/events/keyboard-event.js +65 -0
  1241. package/lib/types/ink/events/paste-event.d.ts +11 -0
  1242. package/lib/types/ink/events/paste-event.d.ts.map +1 -0
  1243. package/lib/types/ink/events/paste-event.js +13 -0
  1244. package/lib/types/ink/events/pointer-event.d.ts +61 -0
  1245. package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
  1246. package/lib/types/ink/events/pointer-event.js +61 -0
  1247. package/lib/types/ink/events/resize-event.d.ts +13 -0
  1248. package/lib/types/ink/events/resize-event.d.ts.map +1 -0
  1249. package/lib/types/ink/events/resize-event.js +16 -0
  1250. package/lib/types/ink/events/terminal-event.d.ts +112 -0
  1251. package/lib/types/ink/events/terminal-event.d.ts.map +1 -0
  1252. package/lib/types/ink/events/terminal-event.js +131 -0
  1253. package/lib/types/ink/events/terminal-focus-event.d.ts +21 -0
  1254. package/lib/types/ink/events/terminal-focus-event.d.ts.map +1 -0
  1255. package/lib/types/ink/events/terminal-focus-event.js +18 -0
  1256. package/lib/types/ink/events/wheel-event.d.ts +17 -0
  1257. package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
  1258. package/lib/types/ink/events/wheel-event.js +20 -0
  1259. package/lib/types/ink/flush-tick.d.ts +26 -0
  1260. package/lib/types/ink/flush-tick.d.ts.map +1 -0
  1261. package/lib/types/ink/flush-tick.js +31 -0
  1262. package/lib/types/ink/focus.d.ts +74 -0
  1263. package/lib/types/ink/focus.d.ts.map +1 -0
  1264. package/lib/types/ink/focus.js +188 -0
  1265. package/lib/types/ink/frame.d.ts +128 -0
  1266. package/lib/types/ink/frame.d.ts.map +1 -0
  1267. package/lib/types/ink/frame.js +43 -0
  1268. package/lib/types/ink/geometry-trace.d.ts +51 -0
  1269. package/lib/types/ink/geometry-trace.d.ts.map +1 -0
  1270. package/lib/types/ink/geometry-trace.js +83 -0
  1271. package/lib/types/ink/get-max-width.d.ts +12 -0
  1272. package/lib/types/ink/get-max-width.d.ts.map +1 -0
  1273. package/lib/types/ink/get-max-width.js +12 -0
  1274. package/lib/types/ink/hit-test.d.ts +181 -0
  1275. package/lib/types/ink/hit-test.d.ts.map +1 -0
  1276. package/lib/types/ink/hit-test.js +540 -0
  1277. package/lib/types/ink/hooks/use-animation-frame.d.ts +27 -0
  1278. package/lib/types/ink/hooks/use-animation-frame.d.ts.map +1 -0
  1279. package/lib/types/ink/hooks/use-animation-frame.js +48 -0
  1280. package/lib/types/ink/hooks/use-app.d.ts +7 -0
  1281. package/lib/types/ink/hooks/use-app.d.ts.map +1 -0
  1282. package/lib/types/ink/hooks/use-app.js +7 -0
  1283. package/lib/types/ink/hooks/use-copy-on-select.d.ts +26 -0
  1284. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -0
  1285. package/lib/types/ink/hooks/use-copy-on-select.js +54 -0
  1286. package/lib/types/ink/hooks/use-declared-cursor.d.ts +31 -0
  1287. package/lib/types/ink/hooks/use-declared-cursor.d.ts.map +1 -0
  1288. package/lib/types/ink/hooks/use-declared-cursor.js +65 -0
  1289. package/lib/types/ink/hooks/use-input.d.ts +41 -0
  1290. package/lib/types/ink/hooks/use-input.d.ts.map +1 -0
  1291. package/lib/types/ink/hooks/use-input.js +81 -0
  1292. package/lib/types/ink/hooks/use-interval.d.ts +23 -0
  1293. package/lib/types/ink/hooks/use-interval.d.ts.map +1 -0
  1294. package/lib/types/ink/hooks/use-interval.js +58 -0
  1295. package/lib/types/ink/hooks/use-search-highlight.d.ts +34 -0
  1296. package/lib/types/ink/hooks/use-search-highlight.d.ts.map +1 -0
  1297. package/lib/types/ink/hooks/use-search-highlight.js +35 -0
  1298. package/lib/types/ink/hooks/use-selection.d.ts +44 -0
  1299. package/lib/types/ink/hooks/use-selection.d.ts.map +1 -0
  1300. package/lib/types/ink/hooks/use-selection.js +64 -0
  1301. package/lib/types/ink/hooks/use-stdin.d.ts +8 -0
  1302. package/lib/types/ink/hooks/use-stdin.d.ts.map +1 -0
  1303. package/lib/types/ink/hooks/use-stdin.js +8 -0
  1304. package/lib/types/ink/hooks/use-tab-status.d.ts +18 -0
  1305. package/lib/types/ink/hooks/use-tab-status.d.ts.map +1 -0
  1306. package/lib/types/ink/hooks/use-tab-status.js +58 -0
  1307. package/lib/types/ink/hooks/use-terminal-focus.d.ts +11 -0
  1308. package/lib/types/ink/hooks/use-terminal-focus.d.ts.map +1 -0
  1309. package/lib/types/ink/hooks/use-terminal-focus.js +15 -0
  1310. package/lib/types/ink/hooks/use-terminal-images.d.ts +14 -0
  1311. package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -0
  1312. package/lib/types/ink/hooks/use-terminal-images.js +22 -0
  1313. package/lib/types/ink/hooks/use-terminal-size.d.ts +6 -0
  1314. package/lib/types/ink/hooks/use-terminal-size.d.ts.map +1 -0
  1315. package/lib/types/ink/hooks/use-terminal-size.js +12 -0
  1316. package/lib/types/ink/hooks/use-terminal-title.d.ts +14 -0
  1317. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -0
  1318. package/lib/types/ink/hooks/use-terminal-title.js +30 -0
  1319. package/lib/types/ink/hooks/use-terminal-viewport.d.ts +32 -0
  1320. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -0
  1321. package/lib/types/ink/hooks/use-terminal-viewport.js +79 -0
  1322. package/lib/types/ink/ink.d.ts +571 -0
  1323. package/lib/types/ink/ink.d.ts.map +1 -0
  1324. package/lib/types/ink/ink.js +2818 -0
  1325. package/lib/types/ink/input-suppression.d.ts +20 -0
  1326. package/lib/types/ink/input-suppression.d.ts.map +1 -0
  1327. package/lib/types/ink/input-suppression.js +26 -0
  1328. package/lib/types/ink/instances.d.ts +10 -0
  1329. package/lib/types/ink/instances.d.ts.map +1 -0
  1330. package/lib/types/ink/instances.js +13 -0
  1331. package/lib/types/ink/kitty-graphics.d.ts +41 -0
  1332. package/lib/types/ink/kitty-graphics.d.ts.map +1 -0
  1333. package/lib/types/ink/kitty-graphics.js +229 -0
  1334. package/lib/types/ink/layout/engine.d.ts +7 -0
  1335. package/lib/types/ink/layout/engine.d.ts.map +1 -0
  1336. package/lib/types/ink/layout/engine.js +8 -0
  1337. package/lib/types/ink/layout/geometry.d.ts +86 -0
  1338. package/lib/types/ink/layout/geometry.d.ts.map +1 -0
  1339. package/lib/types/ink/layout/geometry.js +95 -0
  1340. package/lib/types/ink/layout/node.d.ts +153 -0
  1341. package/lib/types/ink/layout/node.d.ts.map +1 -0
  1342. package/lib/types/ink/layout/node.js +72 -0
  1343. package/lib/types/ink/layout/yoga.d.ts +70 -0
  1344. package/lib/types/ink/layout/yoga.d.ts.map +1 -0
  1345. package/lib/types/ink/layout/yoga.js +252 -0
  1346. package/lib/types/ink/line-width-cache.d.ts +9 -0
  1347. package/lib/types/ink/line-width-cache.d.ts.map +1 -0
  1348. package/lib/types/ink/line-width-cache.js +45 -0
  1349. package/lib/types/ink/log-update.d.ts +57 -0
  1350. package/lib/types/ink/log-update.d.ts.map +1 -0
  1351. package/lib/types/ink/log-update.js +1000 -0
  1352. package/lib/types/ink/measure-element.d.ts +19 -0
  1353. package/lib/types/ink/measure-element.d.ts.map +1 -0
  1354. package/lib/types/ink/measure-element.js +10 -0
  1355. package/lib/types/ink/measure-text.d.ts +13 -0
  1356. package/lib/types/ink/measure-text.d.ts.map +1 -0
  1357. package/lib/types/ink/measure-text.js +38 -0
  1358. package/lib/types/ink/node-cache.d.ts +54 -0
  1359. package/lib/types/ink/node-cache.d.ts.map +1 -0
  1360. package/lib/types/ink/node-cache.js +45 -0
  1361. package/lib/types/ink/optimizer.d.ts +18 -0
  1362. package/lib/types/ink/optimizer.d.ts.map +1 -0
  1363. package/lib/types/ink/optimizer.js +83 -0
  1364. package/lib/types/ink/output.d.ts +300 -0
  1365. package/lib/types/ink/output.d.ts.map +1 -0
  1366. package/lib/types/ink/output.js +1205 -0
  1367. package/lib/types/ink/parse-keypress.d.ts +217 -0
  1368. package/lib/types/ink/parse-keypress.d.ts.map +1 -0
  1369. package/lib/types/ink/parse-keypress.js +1550 -0
  1370. package/lib/types/ink/reconciler.d.ts +43 -0
  1371. package/lib/types/ink/reconciler.d.ts.map +1 -0
  1372. package/lib/types/ink/reconciler.js +414 -0
  1373. package/lib/types/ink/render-border.d.ts +41 -0
  1374. package/lib/types/ink/render-border.d.ts.map +1 -0
  1375. package/lib/types/ink/render-border.js +159 -0
  1376. package/lib/types/ink/render-node-to-output.d.ts +199 -0
  1377. package/lib/types/ink/render-node-to-output.d.ts.map +1 -0
  1378. package/lib/types/ink/render-node-to-output.js +1758 -0
  1379. package/lib/types/ink/render-to-screen.d.ts +65 -0
  1380. package/lib/types/ink/render-to-screen.d.ts.map +1 -0
  1381. package/lib/types/ink/render-to-screen.js +189 -0
  1382. package/lib/types/ink/renderer.d.ts +34 -0
  1383. package/lib/types/ink/renderer.d.ts.map +1 -0
  1384. package/lib/types/ink/renderer.js +181 -0
  1385. package/lib/types/ink/root.d.ts +109 -0
  1386. package/lib/types/ink/root.d.ts.map +1 -0
  1387. package/lib/types/ink/root.js +96 -0
  1388. package/lib/types/ink/screen.d.ts +545 -0
  1389. package/lib/types/ink/screen.d.ts.map +1 -0
  1390. package/lib/types/ink/screen.js +1607 -0
  1391. package/lib/types/ink/selection.d.ts +529 -0
  1392. package/lib/types/ink/selection.d.ts.map +1 -0
  1393. package/lib/types/ink/selection.js +1292 -0
  1394. package/lib/types/ink/sixel-codec.d.ts +41 -0
  1395. package/lib/types/ink/sixel-codec.d.ts.map +1 -0
  1396. package/lib/types/ink/sixel-codec.js +128 -0
  1397. package/lib/types/ink/sixel-graphics.d.ts +74 -0
  1398. package/lib/types/ink/sixel-graphics.d.ts.map +1 -0
  1399. package/lib/types/ink/sixel-graphics.js +498 -0
  1400. package/lib/types/ink/sixel-worker.d.ts +2 -0
  1401. package/lib/types/ink/sixel-worker.d.ts.map +1 -0
  1402. package/lib/types/ink/sixel-worker.js +12 -0
  1403. package/lib/types/ink/squash-text-nodes.d.ts +30 -0
  1404. package/lib/types/ink/squash-text-nodes.d.ts.map +1 -0
  1405. package/lib/types/ink/squash-text-nodes.js +63 -0
  1406. package/lib/types/ink/stringWidth.d.ts +3 -0
  1407. package/lib/types/ink/stringWidth.d.ts.map +1 -0
  1408. package/lib/types/ink/stringWidth.js +248 -0
  1409. package/lib/types/ink/styles.d.ts +346 -0
  1410. package/lib/types/ink/styles.d.ts.map +1 -0
  1411. package/lib/types/ink/styles.js +307 -0
  1412. package/lib/types/ink/supports-hyperlinks.d.ts +20 -0
  1413. package/lib/types/ink/supports-hyperlinks.d.ts.map +1 -0
  1414. package/lib/types/ink/supports-hyperlinks.js +44 -0
  1415. package/lib/types/ink/tabstops.d.ts +10 -0
  1416. package/lib/types/ink/tabstops.d.ts.map +1 -0
  1417. package/lib/types/ink/tabstops.js +47 -0
  1418. package/lib/types/ink/terminal-focus-state.d.ts +35 -0
  1419. package/lib/types/ink/terminal-focus-state.d.ts.map +1 -0
  1420. package/lib/types/ink/terminal-focus-state.js +57 -0
  1421. package/lib/types/ink/terminal-image-protocol.d.ts +4 -0
  1422. package/lib/types/ink/terminal-image-protocol.d.ts.map +1 -0
  1423. package/lib/types/ink/terminal-image-protocol.js +8 -0
  1424. package/lib/types/ink/terminal-image.d.ts +102 -0
  1425. package/lib/types/ink/terminal-image.d.ts.map +1 -0
  1426. package/lib/types/ink/terminal-image.js +223 -0
  1427. package/lib/types/ink/terminal-querier.d.ts +203 -0
  1428. package/lib/types/ink/terminal-querier.d.ts.map +1 -0
  1429. package/lib/types/ink/terminal-querier.js +286 -0
  1430. package/lib/types/ink/terminal.d.ts +192 -0
  1431. package/lib/types/ink/terminal.d.ts.map +1 -0
  1432. package/lib/types/ink/terminal.js +436 -0
  1433. package/lib/types/ink/termio/ansi.d.ts +75 -0
  1434. package/lib/types/ink/termio/ansi.d.ts.map +1 -0
  1435. package/lib/types/ink/termio/ansi.js +79 -0
  1436. package/lib/types/ink/termio/csi.d.ts +263 -0
  1437. package/lib/types/ink/termio/csi.d.ts.map +1 -0
  1438. package/lib/types/ink/termio/csi.js +367 -0
  1439. package/lib/types/ink/termio/dec.d.ts +61 -0
  1440. package/lib/types/ink/termio/dec.d.ts.map +1 -0
  1441. package/lib/types/ink/termio/dec.js +76 -0
  1442. package/lib/types/ink/termio/esc.d.ts +15 -0
  1443. package/lib/types/ink/termio/esc.d.ts.map +1 -0
  1444. package/lib/types/ink/termio/esc.js +57 -0
  1445. package/lib/types/ink/termio/osc.d.ts +198 -0
  1446. package/lib/types/ink/termio/osc.d.ts.map +1 -0
  1447. package/lib/types/ink/termio/osc.js +475 -0
  1448. package/lib/types/ink/termio/parser.d.ts +46 -0
  1449. package/lib/types/ink/termio/parser.d.ts.map +1 -0
  1450. package/lib/types/ink/termio/parser.js +366 -0
  1451. package/lib/types/ink/termio/sgr.d.ts +17 -0
  1452. package/lib/types/ink/termio/sgr.d.ts.map +1 -0
  1453. package/lib/types/ink/termio/sgr.js +300 -0
  1454. package/lib/types/ink/termio/tokenize.d.ts +56 -0
  1455. package/lib/types/ink/termio/tokenize.d.ts.map +1 -0
  1456. package/lib/types/ink/termio/tokenize.js +290 -0
  1457. package/lib/types/ink/termio/types.d.ts +211 -0
  1458. package/lib/types/ink/termio/types.d.ts.map +1 -0
  1459. package/lib/types/ink/termio/types.js +68 -0
  1460. package/lib/types/ink/termio.d.ts +25 -0
  1461. package/lib/types/ink/termio.d.ts.map +1 -0
  1462. package/lib/types/ink/termio.js +24 -0
  1463. package/lib/types/ink/timeline-rail.d.ts +134 -0
  1464. package/lib/types/ink/timeline-rail.d.ts.map +1 -0
  1465. package/lib/types/ink/timeline-rail.js +175 -0
  1466. package/lib/types/ink/transcript-highlight.d.ts +25 -0
  1467. package/lib/types/ink/transcript-highlight.d.ts.map +1 -0
  1468. package/lib/types/ink/transcript-highlight.js +82 -0
  1469. package/lib/types/ink/truncateToWidth.d.ts +7 -0
  1470. package/lib/types/ink/truncateToWidth.d.ts.map +1 -0
  1471. package/lib/types/ink/truncateToWidth.js +18 -0
  1472. package/lib/types/ink/update-overflow-guard.d.ts +62 -0
  1473. package/lib/types/ink/update-overflow-guard.d.ts.map +1 -0
  1474. package/lib/types/ink/update-overflow-guard.js +164 -0
  1475. package/lib/types/ink/useTerminalNotification.d.ts +45 -0
  1476. package/lib/types/ink/useTerminalNotification.d.ts.map +1 -0
  1477. package/lib/types/ink/useTerminalNotification.js +70 -0
  1478. package/lib/types/ink/warn.d.ts +7 -0
  1479. package/lib/types/ink/warn.d.ts.map +1 -0
  1480. package/lib/types/ink/warn.js +15 -0
  1481. package/lib/types/ink/widest-line.d.ts +7 -0
  1482. package/lib/types/ink/widest-line.d.ts.map +1 -0
  1483. package/lib/types/ink/widest-line.js +19 -0
  1484. package/lib/types/ink/wrap-text.d.ts +10 -0
  1485. package/lib/types/ink/wrap-text.d.ts.map +1 -0
  1486. package/lib/types/ink/wrap-text.js +103 -0
  1487. package/lib/types/ink/wrapAnsi.d.ts +17 -0
  1488. package/lib/types/ink/wrapAnsi.d.ts.map +1 -0
  1489. package/lib/types/ink/wrapAnsi.js +38 -0
  1490. package/lib/types/jsx-runtime.d.ts +2 -0
  1491. package/lib/types/jsx-runtime.d.ts.map +1 -0
  1492. package/lib/types/jsx-runtime.js +13 -0
  1493. package/lib/types/migrationPrefs.d.ts +60 -0
  1494. package/lib/types/migrationPrefs.d.ts.map +1 -0
  1495. package/lib/types/migrationPrefs.js +97 -0
  1496. package/lib/types/minimalMode.d.ts +13 -0
  1497. package/lib/types/minimalMode.d.ts.map +1 -0
  1498. package/lib/types/minimalMode.js +17 -0
  1499. package/lib/types/modelGroups.d.ts +72 -0
  1500. package/lib/types/modelGroups.d.ts.map +1 -0
  1501. package/lib/types/modelGroups.js +97 -0
  1502. package/lib/types/modelPrefs.d.ts +37 -0
  1503. package/lib/types/modelPrefs.d.ts.map +1 -0
  1504. package/lib/types/modelPrefs.js +66 -0
  1505. package/lib/types/modelRecents.d.ts +39 -0
  1506. package/lib/types/modelRecents.d.ts.map +1 -0
  1507. package/lib/types/modelRecents.js +97 -0
  1508. package/lib/types/modelRoute.d.ts +87 -0
  1509. package/lib/types/modelRoute.d.ts.map +1 -0
  1510. package/lib/types/modelRoute.js +125 -0
  1511. package/lib/types/native-ts/yoga-layout/enums.d.ts +183 -0
  1512. package/lib/types/native-ts/yoga-layout/enums.d.ts.map +1 -0
  1513. package/lib/types/native-ts/yoga-layout/enums.js +150 -0
  1514. package/lib/types/native-ts/yoga-layout/index.d.ts +804 -0
  1515. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -0
  1516. package/lib/types/native-ts/yoga-layout/index.js +2614 -0
  1517. package/lib/types/oauth.d.ts +15 -0
  1518. package/lib/types/oauth.d.ts.map +1 -0
  1519. package/lib/types/oauth.js +14 -0
  1520. package/lib/types/plugin-host.d.ts +14 -0
  1521. package/lib/types/plugin-host.d.ts.map +1 -0
  1522. package/lib/types/plugin-host.js +19 -0
  1523. package/lib/types/presetPrefs.d.ts +30 -0
  1524. package/lib/types/presetPrefs.d.ts.map +1 -0
  1525. package/lib/types/presetPrefs.js +66 -0
  1526. package/lib/types/reload.d.ts +109 -0
  1527. package/lib/types/reload.d.ts.map +1 -0
  1528. package/lib/types/reload.js +118 -0
  1529. package/lib/types/scenes.d.ts +4 -0
  1530. package/lib/types/scenes.d.ts.map +1 -0
  1531. package/lib/types/scenes.js +4 -0
  1532. package/lib/types/screens/Chat.d.ts +82 -0
  1533. package/lib/types/screens/Chat.d.ts.map +1 -0
  1534. package/lib/types/screens/Chat.js +4299 -0
  1535. package/lib/types/screens/SessionSupervisor.d.ts +84 -0
  1536. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
  1537. package/lib/types/screens/SessionSupervisor.js +350 -0
  1538. package/lib/types/screens/SessionTree.d.ts +27 -0
  1539. package/lib/types/screens/SessionTree.d.ts.map +1 -0
  1540. package/lib/types/screens/SessionTree.js +583 -0
  1541. package/lib/types/screens/Settings.d.ts +22 -0
  1542. package/lib/types/screens/Settings.d.ts.map +1 -0
  1543. package/lib/types/screens/Settings.js +592 -0
  1544. package/lib/types/screens/StatusLine.d.ts +48 -0
  1545. package/lib/types/screens/StatusLine.d.ts.map +1 -0
  1546. package/lib/types/screens/StatusLine.js +453 -0
  1547. package/lib/types/screens/StatusMetrics.d.ts +176 -0
  1548. package/lib/types/screens/StatusMetrics.d.ts.map +1 -0
  1549. package/lib/types/screens/StatusMetrics.js +372 -0
  1550. package/lib/types/screens/TrajectoryScene.d.ts +16 -0
  1551. package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
  1552. package/lib/types/screens/TrajectoryScene.js +374 -0
  1553. package/lib/types/screens/chatOverlay.d.ts +267 -0
  1554. package/lib/types/screens/chatOverlay.d.ts.map +1 -0
  1555. package/lib/types/screens/chatOverlay.js +132 -0
  1556. package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
  1557. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
  1558. package/lib/types/screens/sessionSupervisor/model.js +69 -0
  1559. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
  1560. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
  1561. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +639 -0
  1562. package/lib/types/sessionHistory.d.ts +59 -0
  1563. package/lib/types/sessionHistory.d.ts.map +1 -0
  1564. package/lib/types/sessionHistory.js +223 -0
  1565. package/lib/types/sessionModes.d.ts +83 -0
  1566. package/lib/types/sessionModes.d.ts.map +1 -0
  1567. package/lib/types/sessionModes.js +141 -0
  1568. package/lib/types/sessionMounts.d.ts +272 -0
  1569. package/lib/types/sessionMounts.d.ts.map +1 -0
  1570. package/lib/types/sessionMounts.js +706 -0
  1571. package/lib/types/sessionPins.d.ts +33 -0
  1572. package/lib/types/sessionPins.d.ts.map +1 -0
  1573. package/lib/types/sessionPins.js +181 -0
  1574. package/lib/types/sessions/format.d.ts +125 -0
  1575. package/lib/types/sessions/format.d.ts.map +1 -0
  1576. package/lib/types/sessions/format.js +276 -0
  1577. package/lib/types/sessions/resumeFailure.d.ts +38 -0
  1578. package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
  1579. package/lib/types/sessions/resumeFailure.js +58 -0
  1580. package/lib/types/sessions/view.d.ts +162 -0
  1581. package/lib/types/sessions/view.d.ts.map +1 -0
  1582. package/lib/types/sessions/view.js +350 -0
  1583. package/lib/types/settings-sections.d.ts +4 -0
  1584. package/lib/types/settings-sections.d.ts.map +1 -0
  1585. package/lib/types/settings-sections.js +4 -0
  1586. package/lib/types/terminal-utils/cliHighlight.d.ts +20 -0
  1587. package/lib/types/terminal-utils/cliHighlight.d.ts.map +1 -0
  1588. package/lib/types/terminal-utils/cliHighlight.js +53 -0
  1589. package/lib/types/terminal-utils/figures.d.ts +26 -0
  1590. package/lib/types/terminal-utils/figures.d.ts.map +1 -0
  1591. package/lib/types/terminal-utils/figures.js +36 -0
  1592. package/lib/types/terminal-utils/format.d.ts +35 -0
  1593. package/lib/types/terminal-utils/format.d.ts.map +1 -0
  1594. package/lib/types/terminal-utils/format.js +63 -0
  1595. package/lib/types/terminal-utils/hash.d.ts +25 -0
  1596. package/lib/types/terminal-utils/hash.d.ts.map +1 -0
  1597. package/lib/types/terminal-utils/hash.js +41 -0
  1598. package/lib/types/terminal-utils/hyperlink.d.ts +27 -0
  1599. package/lib/types/terminal-utils/hyperlink.d.ts.map +1 -0
  1600. package/lib/types/terminal-utils/hyperlink.js +70 -0
  1601. package/lib/types/terminal-utils/markdown.d.ts +58 -0
  1602. package/lib/types/terminal-utils/markdown.d.ts.map +1 -0
  1603. package/lib/types/terminal-utils/markdown.js +441 -0
  1604. package/lib/types/terminal-utils/mermaid.d.ts +44 -0
  1605. package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
  1606. package/lib/types/terminal-utils/mermaid.js +83 -0
  1607. package/lib/types/terminal-utils/sessionColors.d.ts +27 -0
  1608. package/lib/types/terminal-utils/sessionColors.d.ts.map +1 -0
  1609. package/lib/types/terminal-utils/sessionColors.js +39 -0
  1610. package/lib/types/terminal-utils/spinnerVerbs.d.ts +3 -0
  1611. package/lib/types/terminal-utils/spinnerVerbs.d.ts.map +1 -0
  1612. package/lib/types/terminal-utils/spinnerVerbs.js +21 -0
  1613. package/lib/types/terminal-utils/syntaxRuns.d.ts +16 -0
  1614. package/lib/types/terminal-utils/syntaxRuns.d.ts.map +1 -0
  1615. package/lib/types/terminal-utils/syntaxRuns.js +79 -0
  1616. package/lib/types/terminal-utils/syntaxTheme.d.ts +12 -0
  1617. package/lib/types/terminal-utils/syntaxTheme.d.ts.map +1 -0
  1618. package/lib/types/terminal-utils/syntaxTheme.js +76 -0
  1619. package/lib/types/theme.d.ts +201 -0
  1620. package/lib/types/theme.d.ts.map +1 -0
  1621. package/lib/types/theme.js +525 -0
  1622. package/lib/types/themeCatalog.d.ts +36 -0
  1623. package/lib/types/themeCatalog.d.ts.map +1 -0
  1624. package/lib/types/themeCatalog.js +159 -0
  1625. package/lib/types/themePrefs.d.ts +28 -0
  1626. package/lib/types/themePrefs.d.ts.map +1 -0
  1627. package/lib/types/themePrefs.js +59 -0
  1628. package/lib/types/tips.d.ts +30 -0
  1629. package/lib/types/tips.d.ts.map +1 -0
  1630. package/lib/types/tips.js +899 -0
  1631. package/lib/types/trajectory/effortIgnition.d.ts +66 -0
  1632. package/lib/types/trajectory/effortIgnition.d.ts.map +1 -0
  1633. package/lib/types/trajectory/effortIgnition.js +142 -0
  1634. package/lib/types/trajectory/format.d.ts +100 -0
  1635. package/lib/types/trajectory/format.d.ts.map +1 -0
  1636. package/lib/types/trajectory/format.js +213 -0
  1637. package/lib/types/trajectory/motion.d.ts +99 -0
  1638. package/lib/types/trajectory/motion.d.ts.map +1 -0
  1639. package/lib/types/trajectory/motion.js +143 -0
  1640. package/lib/types/trajectory/query.d.ts +83 -0
  1641. package/lib/types/trajectory/query.d.ts.map +1 -0
  1642. package/lib/types/trajectory/query.js +187 -0
  1643. package/lib/types/trajectoryPrefs.d.ts +36 -0
  1644. package/lib/types/trajectoryPrefs.d.ts.map +1 -0
  1645. package/lib/types/trajectoryPrefs.js +65 -0
  1646. package/lib/types/tuiDisplayPrefs.d.ts +49 -0
  1647. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -0
  1648. package/lib/types/tuiDisplayPrefs.js +168 -0
  1649. package/lib/types/ui.d.ts +29 -0
  1650. package/lib/types/ui.d.ts.map +1 -0
  1651. package/lib/types/ui.js +25 -0
  1652. package/lib/types/update.d.ts +550 -0
  1653. package/lib/types/update.d.ts.map +1 -0
  1654. package/lib/types/update.js +1751 -0
  1655. package/lib/types/utils/clipboard.d.ts +122 -0
  1656. package/lib/types/utils/clipboard.d.ts.map +1 -0
  1657. package/lib/types/utils/clipboard.js +577 -0
  1658. package/lib/types/utils/credentials.d.ts +13 -0
  1659. package/lib/types/utils/credentials.d.ts.map +1 -0
  1660. package/lib/types/utils/credentials.js +41 -0
  1661. package/lib/types/utils/debug.d.ts +18 -0
  1662. package/lib/types/utils/debug.d.ts.map +1 -0
  1663. package/lib/types/utils/debug.js +37 -0
  1664. package/lib/types/utils/earlyInput.d.ts +6 -0
  1665. package/lib/types/utils/earlyInput.d.ts.map +1 -0
  1666. package/lib/types/utils/earlyInput.js +5 -0
  1667. package/lib/types/utils/env.d.ts +8 -0
  1668. package/lib/types/utils/env.d.ts.map +1 -0
  1669. package/lib/types/utils/env.js +7 -0
  1670. package/lib/types/utils/envUtils.d.ts +8 -0
  1671. package/lib/types/utils/envUtils.d.ts.map +1 -0
  1672. package/lib/types/utils/envUtils.js +13 -0
  1673. package/lib/types/utils/execFileNoThrow.d.ts +17 -0
  1674. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -0
  1675. package/lib/types/utils/execFileNoThrow.js +65 -0
  1676. package/lib/types/utils/externalEditor.d.ts +116 -0
  1677. package/lib/types/utils/externalEditor.d.ts.map +1 -0
  1678. package/lib/types/utils/externalEditor.js +270 -0
  1679. package/lib/types/utils/fileSuggestions.d.ts +12 -0
  1680. package/lib/types/utils/fileSuggestions.d.ts.map +1 -0
  1681. package/lib/types/utils/fileSuggestions.js +40 -0
  1682. package/lib/types/utils/fileTarget.d.ts +46 -0
  1683. package/lib/types/utils/fileTarget.d.ts.map +1 -0
  1684. package/lib/types/utils/fileTarget.js +178 -0
  1685. package/lib/types/utils/fold-long-lines.d.ts +38 -0
  1686. package/lib/types/utils/fold-long-lines.d.ts.map +1 -0
  1687. package/lib/types/utils/fold-long-lines.js +91 -0
  1688. package/lib/types/utils/fullscreen.d.ts +7 -0
  1689. package/lib/types/utils/fullscreen.d.ts.map +1 -0
  1690. package/lib/types/utils/fullscreen.js +9 -0
  1691. package/lib/types/utils/imageResize.d.ts +90 -0
  1692. package/lib/types/utils/imageResize.d.ts.map +1 -0
  1693. package/lib/types/utils/imageResize.js +272 -0
  1694. package/lib/types/utils/intl.d.ts +7 -0
  1695. package/lib/types/utils/intl.d.ts.map +1 -0
  1696. package/lib/types/utils/intl.js +9 -0
  1697. package/lib/types/utils/keymap.d.ts +138 -0
  1698. package/lib/types/utils/keymap.d.ts.map +1 -0
  1699. package/lib/types/utils/keymap.js +351 -0
  1700. package/lib/types/utils/loaded-context.d.ts +25 -0
  1701. package/lib/types/utils/loaded-context.d.ts.map +1 -0
  1702. package/lib/types/utils/loaded-context.js +72 -0
  1703. package/lib/types/utils/log.d.ts +7 -0
  1704. package/lib/types/utils/log.d.ts.map +1 -0
  1705. package/lib/types/utils/log.js +9 -0
  1706. package/lib/types/utils/mentions.d.ts +53 -0
  1707. package/lib/types/utils/mentions.d.ts.map +1 -0
  1708. package/lib/types/utils/mentions.js +133 -0
  1709. package/lib/types/utils/modifiers.d.ts +43 -0
  1710. package/lib/types/utils/modifiers.d.ts.map +1 -0
  1711. package/lib/types/utils/modifiers.js +45 -0
  1712. package/lib/types/utils/narration.d.ts +11 -0
  1713. package/lib/types/utils/narration.d.ts.map +1 -0
  1714. package/lib/types/utils/narration.js +16 -0
  1715. package/lib/types/utils/openExternal.d.ts +50 -0
  1716. package/lib/types/utils/openExternal.d.ts.map +1 -0
  1717. package/lib/types/utils/openExternal.js +170 -0
  1718. package/lib/types/utils/pastedImagePath.d.ts +51 -0
  1719. package/lib/types/utils/pastedImagePath.d.ts.map +1 -0
  1720. package/lib/types/utils/pastedImagePath.js +194 -0
  1721. package/lib/types/utils/paths.d.ts +16 -0
  1722. package/lib/types/utils/paths.d.ts.map +1 -0
  1723. package/lib/types/utils/paths.js +19 -0
  1724. package/lib/types/utils/semver.d.ts +9 -0
  1725. package/lib/types/utils/semver.d.ts.map +1 -0
  1726. package/lib/types/utils/semver.js +24 -0
  1727. package/lib/types/utils/shellQuote.d.ts +14 -0
  1728. package/lib/types/utils/shellQuote.d.ts.map +1 -0
  1729. package/lib/types/utils/shellQuote.js +39 -0
  1730. package/lib/types/utils/sliceAnsi.d.ts +12 -0
  1731. package/lib/types/utils/sliceAnsi.d.ts.map +1 -0
  1732. package/lib/types/utils/sliceAnsi.js +79 -0
  1733. package/lib/types/utils/truncateMiddle.d.ts +9 -0
  1734. package/lib/types/utils/truncateMiddle.d.ts.map +1 -0
  1735. package/lib/types/utils/truncateMiddle.js +28 -0
  1736. package/lib/types/utils/urlGuard.d.ts +28 -0
  1737. package/lib/types/utils/urlGuard.d.ts.map +1 -0
  1738. package/lib/types/utils/urlGuard.js +21 -0
  1739. package/lib/types/utils/workspaceRoot.d.ts +21 -0
  1740. package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
  1741. package/lib/types/utils/workspaceRoot.js +47 -0
  1742. package/lib/types/working-activity.d.ts +32 -0
  1743. package/lib/types/working-activity.d.ts.map +1 -0
  1744. package/lib/types/working-activity.js +38 -0
  1745. package/lib/types/workspaces.d.ts +5 -0
  1746. package/lib/types/workspaces.d.ts.map +1 -0
  1747. package/lib/types/workspaces.js +4 -0
  1748. package/node_modules/@askdkc/dsh-auth/LICENSE +21 -0
  1749. package/node_modules/@askdkc/dsh-auth/README.ja.md +164 -0
  1750. package/node_modules/@askdkc/dsh-auth/README.md +163 -0
  1751. package/node_modules/@askdkc/dsh-auth/cordis.patch.yml +11 -0
  1752. package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +44 -0
  1753. package/node_modules/@askdkc/dsh-auth/lib/command.d.ts +14 -0
  1754. package/node_modules/@askdkc/dsh-auth/lib/command.js +70 -0
  1755. package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +63 -0
  1756. package/node_modules/@askdkc/dsh-auth/lib/credentials.js +204 -0
  1757. package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.d.ts +26 -0
  1758. package/node_modules/@askdkc/dsh-auth/lib/custom-profiles.js +142 -0
  1759. package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +96 -0
  1760. package/node_modules/@askdkc/dsh-auth/lib/index.js +263 -0
  1761. package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +68 -0
  1762. package/node_modules/@askdkc/dsh-auth/lib/interaction.js +193 -0
  1763. package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.d.ts +5 -0
  1764. package/node_modules/@askdkc/dsh-auth/lib/nous-oauth.js +112 -0
  1765. package/node_modules/@askdkc/dsh-auth/lib/opener.d.ts +32 -0
  1766. package/node_modules/@askdkc/dsh-auth/lib/opener.js +101 -0
  1767. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.d.ts +23 -0
  1768. package/node_modules/@askdkc/dsh-auth/lib/pi-ai.js +27 -0
  1769. package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +45 -0
  1770. package/node_modules/@askdkc/dsh-auth/lib/profiles.js +110 -0
  1771. package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +80 -0
  1772. package/node_modules/@askdkc/dsh-auth/lib/service.js +224 -0
  1773. package/node_modules/@askdkc/dsh-auth/package.json +70 -0
  1774. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -0
  1775. package/node_modules/@dsh-std/command/LICENSE +21 -0
  1776. package/node_modules/@dsh-std/command/README.md +26 -0
  1777. package/node_modules/@dsh-std/command/README.zh.md +28 -0
  1778. package/node_modules/@dsh-std/command/lib/index.d.ts +144 -0
  1779. package/node_modules/@dsh-std/command/lib/index.d.ts.map +1 -0
  1780. package/node_modules/@dsh-std/command/lib/index.js +252 -0
  1781. package/node_modules/@dsh-std/command/lib/index.js.map +1 -0
  1782. package/node_modules/@dsh-std/command/package.json +22 -0
  1783. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1784. package/node_modules/@dsh-std/connection/LICENSE +21 -0
  1785. package/node_modules/@dsh-std/connection/README.md +42 -0
  1786. package/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1787. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1788. package/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1789. package/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1790. package/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1791. package/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1792. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1793. package/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1794. package/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1795. package/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1796. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1797. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1798. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1799. package/node_modules/@dsh-std/connection/package.json +20 -0
  1800. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1801. package/node_modules/@dsh-std/core/LICENSE +21 -0
  1802. package/node_modules/@dsh-std/core/README.md +13 -0
  1803. package/node_modules/@dsh-std/core/README.zh.md +13 -0
  1804. package/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1805. package/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1806. package/node_modules/@dsh-std/core/lib/index.js +424 -0
  1807. package/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1808. package/node_modules/@dsh-std/core/package.json +21 -0
  1809. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  1810. package/node_modules/@dsh-std/manifest/LICENSE +21 -0
  1811. package/node_modules/@dsh-std/manifest/README.md +5 -0
  1812. package/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  1813. package/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  1814. package/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  1815. package/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  1816. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  1817. package/node_modules/@dsh-std/manifest/package.json +20 -0
  1818. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  1819. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -0
  1820. package/node_modules/@dsh-std/messages/LICENSE +21 -0
  1821. package/node_modules/@dsh-std/messages/README.md +5 -0
  1822. package/node_modules/@dsh-std/messages/README.zh.md +7 -0
  1823. package/node_modules/@dsh-std/messages/lib/index.d.ts +50 -0
  1824. package/node_modules/@dsh-std/messages/lib/index.d.ts.map +1 -0
  1825. package/node_modules/@dsh-std/messages/lib/index.js +151 -0
  1826. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -0
  1827. package/node_modules/@dsh-std/messages/package.json +20 -0
  1828. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -0
  1829. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  1830. package/node_modules/@dsh-std/presentation/LICENSE +21 -0
  1831. package/node_modules/@dsh-std/presentation/README.md +27 -0
  1832. package/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  1833. package/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  1834. package/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  1835. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  1836. package/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  1837. package/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  1838. package/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  1839. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  1840. package/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  1841. package/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  1842. package/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  1843. package/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  1844. package/node_modules/@dsh-std/presentation/package.json +25 -0
  1845. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -0
  1846. package/node_modules/@dsh-std/storage/LICENSE +21 -0
  1847. package/node_modules/@dsh-std/storage/README.md +5 -0
  1848. package/node_modules/@dsh-std/storage/README.zh.md +7 -0
  1849. package/node_modules/@dsh-std/storage/lib/index.d.ts +48 -0
  1850. package/node_modules/@dsh-std/storage/lib/index.d.ts.map +1 -0
  1851. package/node_modules/@dsh-std/storage/lib/index.js +104 -0
  1852. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -0
  1853. package/node_modules/@dsh-std/storage/package.json +20 -0
  1854. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -0
  1855. package/package.json +492 -0
  1856. package/presets/liangshen/.dsh-tui-managed.json +5 -0
  1857. package/presets/liangshen/agent.cordis.yml +425 -0
  1858. package/presets/liangshen/compaction-epoch.mjs +83 -0
  1859. package/presets/liangshen/custom-bash.mjs +301 -0
  1860. package/presets/liangshen/instruction-hint.mjs +190 -0
  1861. package/presets/liangshen/preset.yml +3 -0
  1862. package/presets/liangshen/session-events.mjs +8 -0
  1863. package/presets/liangshen/skill-search.mjs +141 -0
  1864. package/presets/liangshen/tool-bootstrap.mjs +300 -0
  1865. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1866. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -0
  1867. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -0
  1868. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1869. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1870. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1871. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1872. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1873. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1874. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1875. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1876. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1877. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1878. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1879. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1880. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1881. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -0
  1882. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1883. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -0
  1884. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -0
  1885. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -0
  1886. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1887. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1888. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js +424 -0
  1889. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1890. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -0
  1891. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -0
  1892. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -0
  1893. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -0
  1894. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -0
  1895. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts +182 -0
  1896. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.d.ts.map +1 -0
  1897. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js +625 -0
  1898. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -0
  1899. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -0
  1900. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -0
  1901. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -0
  1902. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -0
  1903. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -0
  1904. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -0
  1905. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.d.ts +2 -0
  1906. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js +179 -0
  1907. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -0
  1908. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts +262 -0
  1909. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.d.ts.map +1 -0
  1910. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js +550 -0
  1911. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -0
  1912. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.d.ts +2 -0
  1913. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/interaction.js +2 -0
  1914. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.d.ts +2 -0
  1915. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/operations.js +2 -0
  1916. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -0
  1917. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1918. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -0
  1919. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -0
  1920. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -0
  1921. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1922. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1923. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js +424 -0
  1924. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1925. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -0
  1926. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1927. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -0
  1928. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -0
  1929. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -0
  1930. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1931. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1932. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js +424 -0
  1933. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1934. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -0
  1935. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1936. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -0
  1937. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -0
  1938. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -0
  1939. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1940. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1941. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js +424 -0
  1942. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1943. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -0
  1944. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -0
  1945. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -0
  1946. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -0
  1947. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -0
  1948. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts +125 -0
  1949. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/connection-CdGcSQnu.d.ts.map +1 -0
  1950. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts +89 -0
  1951. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.d.ts.map +1 -0
  1952. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js +158 -0
  1953. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -0
  1954. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts +24 -0
  1955. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.d.ts.map +1 -0
  1956. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js +258 -0
  1957. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -0
  1958. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js +226 -0
  1959. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -0
  1960. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -0
  1961. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1962. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -0
  1963. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -0
  1964. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -0
  1965. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1966. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1967. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js +424 -0
  1968. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1969. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -0
  1970. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -0
  1971. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -0
  1972. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -0
  1973. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -0
  1974. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts +112 -0
  1975. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.d.ts.map +1 -0
  1976. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js +424 -0
  1977. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -0
  1978. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -0
@@ -0,0 +1,1758 @@
1
+ import indentString from 'indent-string';
2
+ import { applyTextStyles } from './colorize.js';
3
+ import { GEOMETRY_TRACE_ENABLED, noteScrollGeometry } from './geometry-trace.js';
4
+ import getMaxWidth from './get-max-width.js';
5
+ import { LayoutDisplay, LayoutEdge } from './layout/node.js';
6
+ import { nodeCache, pendingClears, textPaintCache } from './node-cache.js';
7
+ import renderBorder from './render-border.js';
8
+ import { squashTextNodesToSegments, } from './squash-text-nodes.js';
9
+ import { isXtermJs } from './terminal.js';
10
+ import { terminalImageSourceFromAttributes } from './terminal-image.js';
11
+ import { widestLine } from './widest-line.js';
12
+ import wrapText from './wrap-text.js';
13
+ // Matches detectXtermJsWheel() in ScrollKeybindingHandler.tsx — the curve
14
+ // and drain must agree on terminal detection. TERM_PROGRAM check is the sync
15
+ // fallback; isXtermJs() is the authoritative XTVERSION-probe result.
16
+ function isXtermJsHost() {
17
+ return process.env.TERM_PROGRAM === 'vscode' || isXtermJs();
18
+ }
19
+ // Per-frame scratch: set when any node's yoga position/size differs from
20
+ // its cached value, or a child was removed. Read by ink.tsx to decide
21
+ // whether the full-damage sledgehammer (PR #20120) is needed this frame.
22
+ // Applies on both alt-screen and main-screen. Steady-state frames
23
+ // (spinner tick, clock tick, text append into a fixed-height box) don't
24
+ // shift layout → narrow damage bounds → O(changed cells) diff instead of
25
+ // O(rows×cols).
26
+ let layoutShifted = false;
27
+ /** Reset the per-frame layout-shift flag. */
28
+ export function resetLayoutShifted() {
29
+ layoutShifted = false;
30
+ }
31
+ /**
32
+ * Whether any node's layout position or size shifted this frame, or a child was removed.
33
+ * @returns true when the full-damage path is needed this frame.
34
+ */
35
+ export function didLayoutShift() {
36
+ return layoutShifted;
37
+ }
38
+ let scrollHint = null;
39
+ // Rects of position:absolute nodes from the PREVIOUS frame, used by
40
+ // ScrollBox's blit+shift third-pass repair (see usage site). Recorded at
41
+ // three paths — full-render nodeCache.set, node-level blit early-return,
42
+ // blitEscapingAbsoluteDescendants — so clean-overlay consecutive scrolls
43
+ // still have the rect.
44
+ let absoluteRectsPrev = [];
45
+ let absoluteRectsCur = [];
46
+ let absoluteHitList = [];
47
+ let occlusionSurfacesPrev = [];
48
+ let occlusionSurfacesCur = [];
49
+ /**
50
+ * The current frame's absolute-positioned nodes in paint order.
51
+ * @returns read-only list; reverse-iterate for topmost-first hit-testing.
52
+ */
53
+ export function getAbsoluteHitList() {
54
+ return absoluteHitList;
55
+ }
56
+ /** Reset the scroll hint for the next frame and rotate the per-frame buffers. */
57
+ export function resetScrollHint() {
58
+ scrollHint = null;
59
+ absoluteRectsPrev = absoluteRectsCur;
60
+ absoluteRectsCur = [];
61
+ absoluteHitList = [];
62
+ occlusionSurfacesPrev = occlusionSurfacesCur;
63
+ occlusionSurfacesCur = [];
64
+ }
65
+ /** A node fills every cell of its rect when it has its own background or
66
+ * is declared `opaque`; anything else leaves gaps to the layer below. */
67
+ function paintsOwnRect(node) {
68
+ return node.style.opaque === true || node.style.backgroundColor !== undefined;
69
+ }
70
+ /** Whether a ready terminal-image placement overlaps the given screen rect
71
+ * — the paint condition for `occlusionColor`. Consults the previous
72
+ * frame's placements (the overlay may cover an image rendered in an
73
+ * earlier tree position that has not painted yet this frame) and the
74
+ * current frame's (an image may appear behind an already-open overlay);
75
+ * same intersection and graphicsReady semantics as
76
+ * Output.hasPreviousImageInRegion. */
77
+ function terminalImageBehindRect(output, x, y, width, height) {
78
+ const left = Math.floor(x);
79
+ const top = Math.floor(y);
80
+ const occlusionWidth = Math.floor(width);
81
+ const occlusionHeight = Math.floor(height);
82
+ if (output.hasPreviousImageInRegion(left, top, occlusionWidth, occlusionHeight)) {
83
+ return true;
84
+ }
85
+ const right = left + occlusionWidth;
86
+ const bottom = top + occlusionHeight;
87
+ return output.getImages().some(placement => placement.graphicsReady !== false &&
88
+ placement.x < right &&
89
+ placement.x + placement.columns > left &&
90
+ placement.y < bottom &&
91
+ placement.y + placement.rows > top);
92
+ }
93
+ function sameRect(a, b) {
94
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
95
+ }
96
+ /** Whether a READY placement from the CURRENT frame's registrations overlaps
97
+ * the rect — the frame-end truth for getOcclusionMismatchNodes. Unlike the
98
+ * walk-time check it does not consult the previous frame: a cover that
99
+ * outlived its image must be corrected, and reuseImages keeps every
100
+ * still-valid placement in the current set even under clean-subtree blits.
101
+ * Coordinates are pre-floored (OcclusionSurface records). */
102
+ function currentImageBehindRect(images, x, y, width, height) {
103
+ const right = x + width;
104
+ const bottom = y + height;
105
+ return images.some(placement => placement.graphicsReady !== false &&
106
+ placement.x < right &&
107
+ placement.x + placement.columns > x &&
108
+ placement.y < bottom &&
109
+ placement.y + placement.rows > y);
110
+ }
111
+ /**
112
+ * Frame-end check: did any PREVIOUS frame's absolute overlay vacate cells
113
+ * that no CURRENT overlay rect covers (the overlay shrank or moved)?
114
+ *
115
+ * Opaque/filled absolute overlays (OverlayAbove pickers above the input,
116
+ * tooltips) paint over non-sibling subtrees (e.g. the transcript ScrollBox,
117
+ * which rendered EARLIER in tree order). When such a rect shrinks, the cells
118
+ * it vacated exist in prevScreen only as the overlay's own pixels; the
119
+ * underlying subtree is clean, so its blit would restore those stale pixels
120
+ * and the diff never clears them (real-machine report: the slash menu keeps
121
+ * its old rows after a filter narrows it, until any unrelated repaint).
122
+ * DOM removal covers the CLOSE case (consumeAbsoluteRemovedFlag); this check
123
+ * covers shrink/move: the caller poisons the NEXT frame (renders without
124
+ * prevScreen) so the vacated cells are re-derived from the real tree.
125
+ * Growth is fine — a current rect that fully contains the previous rect
126
+ * repaints the whole area itself this frame — but only when that current
127
+ * node is opaque (own background or `opaque`). A transparent absolute node
128
+ * (a click-catcher spanning the transcript) paints nothing of its own, so
129
+ * it cannot stand in for the cells an opaque sibling card vacated when it
130
+ * shrank: the clean subtree underneath would blit the old card's pixels
131
+ * back from prevScreen (real-machine report: switching the image preview to
132
+ * a smaller image left the wider card's borders and title on screen).
133
+ */
134
+ export function hasOverlayVacatedCells() {
135
+ if (absoluteRectsPrev.length === 0)
136
+ return false;
137
+ outer: for (const prev of absoluteRectsPrev) {
138
+ if (prev.width <= 0 || prev.height <= 0)
139
+ continue;
140
+ for (const cur of absoluteRectsCur) {
141
+ // A node that kept its exact rect vacated nothing, opaque or not.
142
+ // Without this the transparent click-catcher spanning the transcript
143
+ // was never "covered" and poisoned every frame while a preview was
144
+ // open (full re-render instead of the blit fast path).
145
+ if (cur.opaque !== true && !sameRect(cur, prev))
146
+ continue;
147
+ if (cur.x <= prev.x &&
148
+ cur.y <= prev.y &&
149
+ cur.x + cur.width >= prev.x + prev.width &&
150
+ cur.y + cur.height >= prev.y + prev.height) {
151
+ // A current overlay still covers this previous rect completely.
152
+ continue outer;
153
+ }
154
+ }
155
+ return true;
156
+ }
157
+ return false;
158
+ }
159
+ /**
160
+ * Frame-end check: occlusion surfaces whose recorded cover decision no
161
+ * longer matches the frame's terminal-image placements.
162
+ *
163
+ * Two paths leave a surface stale: (1) it painted before a same-frame
164
+ * image that registers later in walk order — output.getImages() had not
165
+ * admitted the placement yet and the previous frame had none; (2) a
166
+ * clean-subtree blit skipped the surface entirely, restoring its old
167
+ * cells while an image behind it appeared, moved, or was removed. The
168
+ * caller re-walks each stale surface (markDirty) and schedules a frame
169
+ * so the cover follows image changes even with no pending React commit.
170
+ * @param output - the output whose previous/current placements re-decide.
171
+ * @returns surfaces (nodes) whose recorded decision mismatches; may be empty.
172
+ */
173
+ export function getOcclusionMismatchNodes(output) {
174
+ const stale = [];
175
+ const walked = new Set();
176
+ // One snapshot for every surface: getImages() rescans the operation
177
+ // stream per placement, so calling it per surface would be quadratic.
178
+ const images = output.getImages();
179
+ for (const surface of occlusionSurfacesCur) {
180
+ walked.add(surface.node);
181
+ if (currentImageBehindRect(images, surface.x, surface.y, surface.width, surface.height) !==
182
+ surface.filled) {
183
+ stale.push(surface.node);
184
+ }
185
+ }
186
+ for (const surface of occlusionSurfacesPrev) {
187
+ if (walked.has(surface.node))
188
+ continue;
189
+ if (currentImageBehindRect(images, surface.x, surface.y, surface.width, surface.height) !==
190
+ surface.filled) {
191
+ stale.push(surface.node);
192
+ }
193
+ }
194
+ return stale;
195
+ }
196
+ /**
197
+ * The scroll hint captured this frame, or null.
198
+ * @returns the scroll hint, or null when none was captured.
199
+ */
200
+ export function getScrollHint() {
201
+ return scrollHint;
202
+ }
203
+ // The ScrollBox DOM node (if any) with pendingScrollDelta left after this
204
+ // frame's drain. renderer.ts calls markDirty(it) post-render so the NEXT
205
+ // frame's root blit check fails and we descend to continue draining.
206
+ // Without this, after the render pass clears the scrollbox's dirty flag,
207
+ // the next frame blits root and never reaches the scrollbox — drain stalls.
208
+ let scrollDrainNode = null;
209
+ /** Clear the pending scroll drain node for the next frame. */
210
+ export function resetScrollDrainNode() {
211
+ scrollDrainNode = null;
212
+ }
213
+ /**
214
+ * The ScrollBox node still draining pending scroll delta, or null.
215
+ * @returns the draining ScrollBox node, or null.
216
+ */
217
+ export function getScrollDrainNode() {
218
+ return scrollDrainNode;
219
+ }
220
+ let followScrolls = [];
221
+ let viewportResizes = [];
222
+ /**
223
+ * Classify a viewport edge change without consulting scroll state. A valid
224
+ * same-height range whose two edges move by the same non-zero amount is a
225
+ * screen-space translation; every other change is an edge resize. Invalid
226
+ * ranges deliberately stay on the resize path so its collapse guards can
227
+ * clear or preserve selection safely.
228
+ * @param prevTop - previous viewport top row.
229
+ * @param prevBottom - previous viewport bottom row.
230
+ * @param top - current viewport top row.
231
+ * @param bottom - current viewport bottom row.
232
+ * @returns the geometry kind for the viewport event.
233
+ */
234
+ export function classifyViewportChange(prevTop, prevBottom, top, bottom) {
235
+ const valid = (lo, hi) => Number.isFinite(lo) && Number.isFinite(hi) && lo <= hi;
236
+ if (!valid(prevTop, prevBottom) || !valid(top, bottom))
237
+ return 'edge-resize';
238
+ const topDelta = top - prevTop;
239
+ const bottomDelta = bottom - prevBottom;
240
+ return topDelta !== 0 && topDelta === bottomDelta ? 'translate' : 'edge-resize';
241
+ }
242
+ /**
243
+ * Read and clear this frame's viewport-resize events. At most one per
244
+ * ScrollBox per frame; empty unless some box's edges moved.
245
+ * @returns this frame's viewport-resize events; empty when none.
246
+ */
247
+ export function consumeViewportResizes() {
248
+ const v = viewportResizes;
249
+ viewportResizes = [];
250
+ return v;
251
+ }
252
+ /**
253
+ * Read and clear the follow-scroll events recorded this frame. At most one
254
+ * per ScrollBox (a box that follows AND drains reports only the follow —
255
+ * the follow branch clears pendingScrollDelta before the drain runs);
256
+ * several boxes may each report when they scroll in the same frame.
257
+ * @returns this frame's follow-scroll events; empty when none.
258
+ */
259
+ export function consumeFollowScroll() {
260
+ const f = followScrolls;
261
+ followScrolls = [];
262
+ return f;
263
+ }
264
+ // ── Native terminal drain (iTerm2/Ghostty/etc. — proportional events) ──
265
+ // Minimum rows applied per frame. Above this, drain is proportional (~3/4
266
+ // of remaining) so big bursts catch up in log₄ frames while the tail
267
+ // decelerates smoothly. Hard cap is innerHeight-1 so DECSTBM hint fires.
268
+ const SCROLL_MIN_PER_FRAME = 4;
269
+ // ── xterm.js (VS Code) smooth drain ──
270
+ // Low pending (≤5) drains ALL in one frame — slow wheel clicks should be
271
+ // instant (click → visible jump → done), not micro-stutter 1-row frames.
272
+ // Higher pending drains at a small fixed step so fast-scroll animation
273
+ // stays smooth (no big jumps). Pending >MAX snaps excess.
274
+ const SCROLL_INSTANT_THRESHOLD = 5; // ≤ this: drain all at once
275
+ const SCROLL_HIGH_PENDING = 12; // threshold for HIGH step
276
+ const SCROLL_STEP_MED = 2; // pending (INSTANT, HIGH): catch-up
277
+ const SCROLL_STEP_HIGH = 3; // pending ≥ HIGH: fast flick
278
+ const SCROLL_MAX_PENDING = 30; // snap excess beyond this
279
+ // xterm.js adaptive drain. Returns rows applied; mutates pendingScrollDelta.
280
+ function drainAdaptive(node, pending, innerHeight) {
281
+ const sign = pending > 0 ? 1 : -1;
282
+ let abs = Math.abs(pending);
283
+ let applied = 0;
284
+ // Snap excess beyond animation window so big flicks don't coast.
285
+ if (abs > SCROLL_MAX_PENDING) {
286
+ applied += sign * (abs - SCROLL_MAX_PENDING);
287
+ abs = SCROLL_MAX_PENDING;
288
+ }
289
+ // ≤5: drain all (slow click = instant). Above: small fixed step.
290
+ const step = abs <= SCROLL_INSTANT_THRESHOLD
291
+ ? abs
292
+ : abs < SCROLL_HIGH_PENDING
293
+ ? SCROLL_STEP_MED
294
+ : SCROLL_STEP_HIGH;
295
+ applied += sign * step;
296
+ const rem = abs - step;
297
+ // Cap total at innerHeight-1 so DECSTBM blit+shift fast path fires
298
+ // (matches drainProportional). Excess stays in pendingScrollDelta.
299
+ const cap = Math.max(1, innerHeight - 1);
300
+ const totalAbs = Math.abs(applied);
301
+ if (totalAbs > cap) {
302
+ const excess = totalAbs - cap;
303
+ node.pendingScrollDelta = sign * (rem + excess);
304
+ return sign * cap;
305
+ }
306
+ node.pendingScrollDelta = rem > 0 ? sign * rem : undefined;
307
+ return applied;
308
+ }
309
+ // Native proportional drain. step = max(MIN, floor(abs*3/4)), capped at
310
+ // innerHeight-1 so DECSTBM + blit+shift fast path fire.
311
+ function drainProportional(node, pending, innerHeight) {
312
+ const abs = Math.abs(pending);
313
+ const cap = Math.max(1, innerHeight - 1);
314
+ const step = Math.min(cap, Math.max(SCROLL_MIN_PER_FRAME, (abs * 3) >> 2));
315
+ if (abs <= step) {
316
+ node.pendingScrollDelta = undefined;
317
+ return pending;
318
+ }
319
+ const applied = pending > 0 ? step : -step;
320
+ node.pendingScrollDelta = pending - applied;
321
+ return applied;
322
+ }
323
+ // OSC 8 hyperlink escape sequences. Empty params (;;) — ansi-tokenize only
324
+ // recognizes this exact prefix. The id= param (for grouping wrapped lines)
325
+ // is added at terminal-output time in termio/osc.ts link().
326
+ const OSC = '\u001B]';
327
+ const BEL = '\u0007';
328
+ function wrapWithOsc8Link(text, url) {
329
+ return `${OSC}8;;${url}${BEL}${text}${OSC}8;;${BEL}`;
330
+ }
331
+ /**
332
+ * Build a mapping from each character position in the plain text to its segment index.
333
+ * Returns an array where charToSegment[i] is the segment index for character i.
334
+ * @param segments - the styled segments whose characters to map.
335
+ * @returns an array mapping each plain-text character index to its segment index.
336
+ */
337
+ function buildCharToSegmentMap(segments) {
338
+ const map = [];
339
+ for (let i = 0; i < segments.length; i++) {
340
+ const len = segments[i].text.length;
341
+ for (let j = 0; j < len; j++) {
342
+ map.push(i);
343
+ }
344
+ }
345
+ return map;
346
+ }
347
+ /**
348
+ * Apply styles to wrapped text by mapping each character back to its original segment.
349
+ * This preserves per-segment styles even when text wraps across lines.
350
+ * @param wrappedPlain - the wrapped plain text to style.
351
+ * @param segments - the original styled segments.
352
+ * @param charToSegment - character-to-segment index map for the original plain text.
353
+ * @param originalPlain - the original unwrapped plain text.
354
+ * @param trimEnabled - Whether whitespace trimming is enabled (wrap-trim mode).
355
+ * When true, we skip whitespace in the original that was trimmed from the output.
356
+ * When false (wrap mode), all whitespace is preserved so no skipping is needed.
357
+ * @returns the styled wrapped text.
358
+ */
359
+ function applyStylesToWrappedText(wrappedPlain, segments, charToSegment, originalPlain, trimEnabled = false) {
360
+ const lines = wrappedPlain.split('\n');
361
+ const resultLines = [];
362
+ let charIndex = 0;
363
+ for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
364
+ const line = lines[lineIdx];
365
+ // In trim mode, skip leading whitespace that was trimmed from this line.
366
+ // Only skip if the original has whitespace but the output line doesn't start
367
+ // with whitespace (meaning it was trimmed). If both have whitespace, the
368
+ // whitespace was preserved and we shouldn't skip.
369
+ if (trimEnabled && line.length > 0) {
370
+ const lineStartsWithWhitespace = /\s/.test(line[0]);
371
+ const originalHasWhitespace = charIndex < originalPlain.length && /\s/.test(originalPlain[charIndex]);
372
+ // Only skip if original has whitespace but line doesn't
373
+ if (originalHasWhitespace && !lineStartsWithWhitespace) {
374
+ while (charIndex < originalPlain.length &&
375
+ /\s/.test(originalPlain[charIndex])) {
376
+ charIndex++;
377
+ }
378
+ }
379
+ }
380
+ let styledLine = '';
381
+ let runStart = 0;
382
+ let runSegmentIndex = charToSegment[charIndex] ?? 0;
383
+ for (let i = 0; i < line.length; i++) {
384
+ const currentSegmentIndex = charToSegment[charIndex] ?? runSegmentIndex;
385
+ if (currentSegmentIndex !== runSegmentIndex) {
386
+ // Flush the current run
387
+ const runText = line.slice(runStart, i);
388
+ const segment = segments[runSegmentIndex];
389
+ if (segment) {
390
+ let styled = applyTextStyles(runText, segment.styles);
391
+ if (segment.hyperlink) {
392
+ styled = wrapWithOsc8Link(styled, segment.hyperlink);
393
+ }
394
+ styledLine += styled;
395
+ }
396
+ else {
397
+ styledLine += runText;
398
+ }
399
+ runStart = i;
400
+ runSegmentIndex = currentSegmentIndex;
401
+ }
402
+ charIndex++;
403
+ }
404
+ // Flush the final run
405
+ const runText = line.slice(runStart);
406
+ const segment = segments[runSegmentIndex];
407
+ if (segment) {
408
+ let styled = applyTextStyles(runText, segment.styles);
409
+ if (segment.hyperlink) {
410
+ styled = wrapWithOsc8Link(styled, segment.hyperlink);
411
+ }
412
+ styledLine += styled;
413
+ }
414
+ else {
415
+ styledLine += runText;
416
+ }
417
+ resultLines.push(styledLine);
418
+ // Skip newline character in original that corresponds to this line break.
419
+ // This is needed when the original text contains actual newlines (not just
420
+ // wrapping-inserted newlines). Without this, charIndex gets out of sync
421
+ // because the newline is in originalPlain/charToSegment but not in the
422
+ // split lines.
423
+ if (charIndex < originalPlain.length && originalPlain[charIndex] === '\n') {
424
+ charIndex++;
425
+ }
426
+ // In trim mode, skip whitespace that was replaced by newline when wrapping.
427
+ // We skip whitespace in the original until we reach a character that matches
428
+ // the first character of the next line. This handles cases like:
429
+ // - "AB \tD" wrapped to "AB\n\tD" - skip spaces until we hit the tab
430
+ // In non-trim mode, whitespace is preserved so no skipping is needed.
431
+ if (trimEnabled && lineIdx < lines.length - 1) {
432
+ const nextLine = lines[lineIdx + 1];
433
+ const nextLineFirstChar = nextLine.length > 0 ? nextLine[0] : null;
434
+ // Skip whitespace until we hit a char that matches the next line's first char
435
+ while (charIndex < originalPlain.length &&
436
+ /\s/.test(originalPlain[charIndex])) {
437
+ // Stop if we found the character that starts the next line
438
+ if (nextLineFirstChar !== null &&
439
+ originalPlain[charIndex] === nextLineFirstChar) {
440
+ break;
441
+ }
442
+ charIndex++;
443
+ }
444
+ }
445
+ }
446
+ return resultLines.join('\n');
447
+ }
448
+ /**
449
+ * Wrap text and record which output lines are soft-wrap continuations
450
+ * (i.e. the `\n` before them was inserted by word-wrap, not in the
451
+ * source). wrapAnsi already processes each input line independently, so
452
+ * wrapping per-input-line here gives identical output to a single
453
+ * whole-string wrap while letting us mark per-piece provenance.
454
+ * Truncate modes never add newlines (cli-truncate is whole-string) so
455
+ * they fall through with softWrap undefined — no tracking, no behavior
456
+ * change from the pre-softWrap path.
457
+ */
458
+ function wrapWithSoftWrap(plainText, maxWidth, textWrap) {
459
+ if (textWrap !== 'wrap' && textWrap !== 'wrap-trim') {
460
+ return {
461
+ wrapped: wrapText(plainText, maxWidth, textWrap),
462
+ softWrap: undefined,
463
+ };
464
+ }
465
+ const origLines = plainText.split('\n');
466
+ const outLines = [];
467
+ const softWrap = [];
468
+ for (const orig of origLines) {
469
+ const pieces = wrapText(orig, maxWidth, textWrap).split('\n');
470
+ for (let i = 0; i < pieces.length; i++) {
471
+ outLines.push(pieces[i]);
472
+ softWrap.push(i > 0);
473
+ }
474
+ }
475
+ return { wrapped: outLines.join('\n'), softWrap };
476
+ }
477
+ // If parent container is `<Box>`, text nodes will be treated as separate nodes in
478
+ // the tree and will have their own coordinates in the layout.
479
+ // To ensure text nodes are aligned correctly, take X and Y of the first text node
480
+ // and use it as offset for the rest of the nodes
481
+ // Only first node is taken into account, because other text nodes can't have margin or padding,
482
+ // so their coordinates will be relative to the first node anyway
483
+ function applyPaddingToText(node, text, softWrap) {
484
+ const yogaNode = node.childNodes[0]?.yogaNode;
485
+ if (yogaNode) {
486
+ const offsetX = yogaNode.getComputedLeft();
487
+ const offsetY = yogaNode.getComputedTop();
488
+ text = '\n'.repeat(offsetY) + indentString(text, offsetX);
489
+ if (softWrap && offsetY > 0) {
490
+ // Prepend `false` for each padding line so indices stay aligned
491
+ // with text.split('\n'). Mutate in place — caller owns the array.
492
+ softWrap.unshift(...Array(offsetY).fill(false));
493
+ }
494
+ }
495
+ return text;
496
+ }
497
+ /**
498
+ * Render a laid-out node subtree into the output buffer.
499
+ * After yoga lays out the tree, each node is painted to the output object,
500
+ * which later gets written to the terminal.
501
+ * @param node - the DOM node to render.
502
+ * @param output - the output buffer receiving paint operations.
503
+ * @param options - render options: the child coordinate offset, the
504
+ * previous frame's screen for blitting, whether to skip the node's own
505
+ * blit, and the inherited background color.
506
+ */
507
+ function renderNodeToOutput(node, output, options) {
508
+ const { offsetX = 0, offsetY = 0, prevScreen, skipSelfBlit = false, inheritedBackgroundColor, } = options;
509
+ const { yogaNode } = node;
510
+ if (yogaNode) {
511
+ if (yogaNode.getDisplay() === LayoutDisplay.None) {
512
+ // Clear old position if node was visible before becoming hidden
513
+ if (node.dirty) {
514
+ const cached = nodeCache.get(node);
515
+ if (cached) {
516
+ output.clear({
517
+ x: Math.floor(cached.x),
518
+ y: Math.floor(cached.y),
519
+ width: Math.floor(cached.width),
520
+ height: Math.floor(cached.height),
521
+ });
522
+ // Drop descendants' cache too — hideInstance's markDirty walks UP
523
+ // only, so descendants' .dirty stays false. Their nodeCache entries
524
+ // survive with pre-hide rects. On unhide, if position didn't shift,
525
+ // the clean-subtree blit check passes and copies EMPTY cells from
526
+ // prevScreen (cleared here) → content vanishes.
527
+ dropSubtreeCache(node);
528
+ layoutShifted = true;
529
+ }
530
+ }
531
+ return;
532
+ }
533
+ // Left and top positions in Yoga are relative to their parent node
534
+ const x = offsetX + yogaNode.getComputedLeft();
535
+ const yogaTop = yogaNode.getComputedTop();
536
+ let y = offsetY + yogaTop;
537
+ const width = yogaNode.getComputedWidth();
538
+ const height = yogaNode.getComputedHeight();
539
+ const imageSource = node.nodeName === 'ink-image'
540
+ ? terminalImageSourceFromAttributes(node.attributes)
541
+ : undefined;
542
+ const imageAdmitted = imageSource === undefined
543
+ ? false
544
+ : output.image(node, x, y, width, height, imageSource, node.style.backgroundColor ?? inheritedBackgroundColor);
545
+ // Absolute-positioned overlays anchored above their parent
546
+ // (bottom='100%') compute negative screen y when their content is
547
+ // taller than the space above the anchor. Do NOT clamp y to 0 here:
548
+ // shifting the node down breaks the bottom-anchoring contract — the
549
+ // panel's BOTTOM would overflow past the anchor and paint over the
550
+ // composer/status rows below it (small-terminal overlay reports).
551
+ // Instead let the y<0 rows clip naturally: setCellAt drops cells above
552
+ // row 0 and blitRegion clamps in screen space, so the panel keeps its
553
+ // bottom pinned at the anchor and only loses its topmost rows — the
554
+ // same semantics as CSS clipping above the containing block. Producers
555
+ // prevent the case entirely by maxHeight-ing the overlay to the actual
556
+ // space above the anchor (OverlayAbove), so clipping is the last
557
+ // resort, not the layout.
558
+ // Check if we can skip this subtree (clean node with unchanged layout).
559
+ // Blit cells from previous screen instead of re-rendering.
560
+ const cached = nodeCache.get(node);
561
+ // The node's EFFECTIVE background = its own + the inherited one. When it
562
+ // changed since the last frame (hover on/off toggles a row's
563
+ // backgroundColor, a parent's bg swap changes every child's inherited
564
+ // value), prevScreen still holds the OLD background — a clean child
565
+ // blitting it would resurrect the stale color (stuck hover highlights:
566
+ // the row's fill is skipped once the bg is removed, its clean children
567
+ // then blit the previous bg'd cells, the frame equals prevScreen, the
568
+ // diff finds nothing, and the highlight never clears). Compare against
569
+ // the value recorded at the previous render and refuse the blit when it
570
+ // moved.
571
+ // `occlusionColor` promotes to a real background only while a
572
+ // terminal image sits behind this node's rect (see the Styles doc):
573
+ // transparent overlay surfaces in the common frame, covered image
574
+ // placements otherwise.
575
+ const occlusionBackground = node.style.backgroundColor === undefined &&
576
+ node.style.occlusionColor !== undefined &&
577
+ terminalImageBehindRect(output, x, y, width, height)
578
+ ? node.style.occlusionColor
579
+ : undefined;
580
+ if (node.style.occlusionColor !== undefined &&
581
+ node.style.backgroundColor === undefined) {
582
+ occlusionSurfacesCur.push({
583
+ node,
584
+ x: Math.floor(x),
585
+ y: Math.floor(y),
586
+ width: Math.floor(width),
587
+ height: Math.floor(height),
588
+ filled: occlusionBackground !== undefined,
589
+ });
590
+ }
591
+ const effectiveBg = node.style.backgroundColor ?? occlusionBackground ?? inheritedBackgroundColor;
592
+ const bgChanged = cached?.bg !== effectiveBg;
593
+ const imageBackingChanged = node.nodeName === 'ink-image' &&
594
+ output.terminalImagesEnabled &&
595
+ imageAdmitted !== output.hadPreviousImage(node);
596
+ if (!node.dirty &&
597
+ !skipSelfBlit &&
598
+ // A backdrop node re-emits its shade every frame: the cells beneath it
599
+ // may have been rewritten by an earlier sibling (streaming text), and
600
+ // only a shade placed at this node's point in the paint order dims
601
+ // them without touching the card painted after it.
602
+ node.style.backdrop === undefined &&
603
+ node.pendingScrollDelta === undefined &&
604
+ cached &&
605
+ cached.x === x &&
606
+ cached.y === y &&
607
+ cached.width === width &&
608
+ cached.height === height &&
609
+ !bgChanged &&
610
+ !imageBackingChanged &&
611
+ prevScreen) {
612
+ const fx = Math.floor(x);
613
+ const fy = Math.floor(y);
614
+ const fw = Math.floor(width);
615
+ const fh = Math.floor(height);
616
+ if (output.reuseImages(node)) {
617
+ output.blit(prevScreen, fx, fy, fw, fh);
618
+ if (node.style.position === 'absolute') {
619
+ absoluteRectsCur.push(cached);
620
+ absoluteHitList.push({ node, rect: cached });
621
+ }
622
+ // Absolute descendants can paint outside this node's layout bounds
623
+ // (e.g. a slash menu with position='absolute' bottom='100%' floats
624
+ // above). If a dirty clipped sibling re-rendered and overwrote those
625
+ // cells, the blit above only restored this node's own rect — the
626
+ // absolute descendants' cells are lost. Re-blit them from prevScreen
627
+ // so the overlays survive.
628
+ blitEscapingAbsoluteDescendants(node, output, prevScreen, fx, fy, fw, fh);
629
+ return;
630
+ }
631
+ }
632
+ // Clear stale content from the old position when re-rendering.
633
+ // Dirty: content changed. Moved: position/size changed (e.g., sibling
634
+ // above changed height), old cells still on the terminal.
635
+ const positionChanged = cached !== undefined &&
636
+ (cached.x !== x ||
637
+ cached.y !== y ||
638
+ cached.width !== width ||
639
+ cached.height !== height);
640
+ if (positionChanged) {
641
+ layoutShifted = true;
642
+ }
643
+ if (cached && (node.dirty || positionChanged)) {
644
+ output.clear({
645
+ x: Math.floor(cached.x),
646
+ y: Math.floor(cached.y),
647
+ width: Math.floor(cached.width),
648
+ height: Math.floor(cached.height),
649
+ }, node.style.position === 'absolute');
650
+ }
651
+ // Read before deleting — hasRemovedChild disables prevScreen blitting
652
+ // for siblings to prevent stale overflow content from being restored.
653
+ const clears = pendingClears.get(node);
654
+ const hasRemovedChild = clears !== undefined;
655
+ if (hasRemovedChild) {
656
+ layoutShifted = true;
657
+ for (const rect of clears) {
658
+ output.clear({
659
+ x: Math.floor(rect.x),
660
+ y: Math.floor(rect.y),
661
+ width: Math.floor(rect.width),
662
+ height: Math.floor(rect.height),
663
+ });
664
+ }
665
+ pendingClears.delete(node);
666
+ }
667
+ // Yoga squeezed this node to zero height (overflow in a height-constrained
668
+ // parent) AND a sibling lands at the same y. Skip rendering — both would
669
+ // write to the same row; if the sibling's content is shorter, this node's
670
+ // tail chars ghost (e.g. "false" + "true" = "truee"). The clear above
671
+ // already handled the visible→squeezed transition.
672
+ //
673
+ // The sibling-overlap check is load-bearing: Yoga's pixel-grid rounding
674
+ // can give a box h=0 while still leaving a row for it (next sibling at
675
+ // y+1, not y). HelpV2's third shortcuts column hits this — skipping
676
+ // unconditionally drops "ctrl + z to suspend" from /help output.
677
+ if (height === 0 && siblingSharesY(node, yogaNode)) {
678
+ nodeCache.set(node, { x, y, width, height, top: yogaTop, opaque: paintsOwnRect(node) });
679
+ node.dirty = false;
680
+ return;
681
+ }
682
+ // Text is a paint leaf: unlike boxes, it cannot own an escaping overlay.
683
+ // Keep the old-position cleanup above, but cull before squash/wrap/style.
684
+ if (node.nodeName === 'ink-text' && width > 0 && height > 0 && !output.isRectVisible(x, y, width, height)) {
685
+ nodeCache.delete(node);
686
+ node.dirty = false;
687
+ return;
688
+ }
689
+ if (node.nodeName === 'ink-raw-ansi') {
690
+ // Pre-rendered ANSI content. The producer already wrapped to width and
691
+ // emitted terminal-ready escape codes. Skip squash, measure, wrap, and
692
+ // style re-application — output.write() parses ANSI directly into cells.
693
+ const text = node.attributes['rawText'];
694
+ if (text) {
695
+ output.write(x, y, text);
696
+ }
697
+ }
698
+ else if (node.nodeName === 'ink-text') {
699
+ // A partially visible long block moves on every scroll/stream frame.
700
+ // Node blits cannot reuse it at a new y, but its prepared lines can.
701
+ // Keep one current preparation, independent of the shared wrap LRU
702
+ // (a single large tool/code block can overflow that cache by itself).
703
+ const maxWidth = Math.min(getMaxWidth(yogaNode), output.width - x);
704
+ const paddingNode = node.childNodes[0]?.yogaNode;
705
+ const paddingLeft = paddingNode?.getComputedLeft() ?? 0;
706
+ const paddingTop = paddingNode?.getComputedTop() ?? 0;
707
+ const prepared = textPaintCache.get(node);
708
+ if (prepared !== undefined &&
709
+ prepared.maxWidth === maxWidth &&
710
+ prepared.background === inheritedBackgroundColor &&
711
+ prepared.paddingLeft === paddingLeft &&
712
+ prepared.paddingTop === paddingTop) {
713
+ output.write(x, y, prepared.text, prepared.softWrap, prepared.lines);
714
+ }
715
+ else {
716
+ const segments = squashTextNodesToSegments(node, inheritedBackgroundColor
717
+ ? { backgroundColor: inheritedBackgroundColor }
718
+ : undefined);
719
+ // First, get plain text to check if wrapping is needed
720
+ const plainText = segments.map(s => s.text).join('');
721
+ if (plainText.length > 0) {
722
+ // Use the same content constraint as measurement, not the rounded
723
+ // pixel-grid box. Offscreen overflow still clips at the terminal edge.
724
+ const textWrap = node.style.textWrap ?? 'wrap';
725
+ // Check if wrapping is needed
726
+ const needsWrapping = widestLine(plainText) > maxWidth;
727
+ let text;
728
+ let softWrap;
729
+ if (needsWrapping && segments.length === 1) {
730
+ // Single segment: wrap plain text first, then apply styles to each line
731
+ const segment = segments[0];
732
+ const w = wrapWithSoftWrap(plainText, maxWidth, textWrap);
733
+ softWrap = w.softWrap;
734
+ text = w.wrapped
735
+ .split('\n')
736
+ .map(line => {
737
+ let styled = applyTextStyles(line, segment.styles);
738
+ // Apply OSC 8 hyperlink per-line so each line is independently
739
+ // clickable. output.ts splits on newlines and tokenizes each
740
+ // line separately, so a single wrapper around the whole block
741
+ // would only apply the hyperlink to the first line.
742
+ if (segment.hyperlink) {
743
+ styled = wrapWithOsc8Link(styled, segment.hyperlink);
744
+ }
745
+ return styled;
746
+ })
747
+ .join('\n');
748
+ }
749
+ else if (needsWrapping) {
750
+ // Multiple segments with wrapping: wrap plain text first, then re-apply
751
+ // each segment's styles based on character positions. This preserves
752
+ // per-segment styles even when text wraps across lines.
753
+ const w = wrapWithSoftWrap(plainText, maxWidth, textWrap);
754
+ softWrap = w.softWrap;
755
+ const charToSegment = buildCharToSegmentMap(segments);
756
+ text = applyStylesToWrappedText(w.wrapped, segments, charToSegment, plainText, textWrap === 'wrap-trim');
757
+ // Hyperlinks are handled per-run in applyStylesToWrappedText via
758
+ // wrapWithOsc8Link, similar to how styles are applied per-run.
759
+ }
760
+ else {
761
+ // No wrapping needed: apply styles directly
762
+ text = segments
763
+ .map(segment => {
764
+ let styledText = applyTextStyles(segment.text, segment.styles);
765
+ if (segment.hyperlink) {
766
+ styledText = wrapWithOsc8Link(styledText, segment.hyperlink);
767
+ }
768
+ return styledText;
769
+ })
770
+ .join('');
771
+ }
772
+ text = applyPaddingToText(node, text, softWrap);
773
+ const lines = text.split('\n');
774
+ textPaintCache.set(node, {
775
+ maxWidth, background: inheritedBackgroundColor, paddingLeft, paddingTop,
776
+ text, lines, softWrap,
777
+ });
778
+ output.write(x, y, text, softWrap, lines);
779
+ }
780
+ }
781
+ }
782
+ else if (node.nodeName === 'ink-image' &&
783
+ imageAdmitted &&
784
+ output.terminalImagesEnabled) {
785
+ // Kitty placements use an extreme negative z-index so later terminal
786
+ // cells can cover them. A colored ancestor has already filled this
787
+ // rect, though, and those non-default-background cells would also hide
788
+ // the image itself. Replace only the image-owned cells with default-
789
+ // background spaces; layout and surrounding inherited color stay intact.
790
+ //
791
+ // Sixel paints the raster OVER the cells instead, so its backing may
792
+ // (and must) carry the surface background: the raster covers those
793
+ // cells anyway, and terminal-default blanks would show as black holes
794
+ // wherever the raster misses a cell — aspect rounding at the right
795
+ // edge, or a suppressed placement whose cells the frame no longer
796
+ // repaints.
797
+ const imageWidth = Math.floor(width);
798
+ const imageHeight = Math.floor(height);
799
+ const backingColor = output.opaqueImageBacking
800
+ ? node.style.backgroundColor ?? inheritedBackgroundColor
801
+ : undefined;
802
+ const imageLine = ' '.repeat(imageWidth);
803
+ const fillLine = backingColor === undefined
804
+ ? imageLine
805
+ : applyTextStyles(imageLine, { backgroundColor: backingColor });
806
+ output.write(Math.floor(x), Math.floor(y), Array(imageHeight).fill(fillLine).join('\n'));
807
+ output.imageBacking(node);
808
+ for (const child of node.childNodes) {
809
+ if (child.nodeName !== '#text')
810
+ dropSubtreeCache(child);
811
+ }
812
+ }
813
+ else if (node.nodeName === 'ink-box' || node.nodeName === 'ink-image') {
814
+ const boxBackgroundColor = node.style.backgroundColor ?? occlusionBackground ?? inheritedBackgroundColor;
815
+ // Mark this box's region as non-selectable (fullscreen text
816
+ // selection). noSelect ops are applied AFTER blits/writes in
817
+ // output.get(), so this wins regardless of what's rendered into
818
+ // the region. On the clean-subtree path, blitRegion preserves the
819
+ // noSelect bitmap alongside cells copied from prevScreen.
820
+ //
821
+ // 'from-left-edge' extends the exclusion from col 0 so any
822
+ // upstream indentation (tool prefix, tree lines) is covered too
823
+ // — a multi-row drag over a diff gutter shouldn't pick up the
824
+ // ` ⎿ ` prefix on row 0 or the blank cells under it on row 1+.
825
+ if (node.style.noSelect) {
826
+ const boxX = Math.floor(x);
827
+ const fromEdge = node.style.noSelect === 'from-left-edge';
828
+ output.noSelect({
829
+ x: fromEdge ? 0 : boxX,
830
+ y: Math.floor(y),
831
+ width: fromEdge ? boxX + Math.floor(width) : Math.floor(width),
832
+ height: Math.floor(height),
833
+ });
834
+ }
835
+ const overflowX = node.style.overflowX ?? node.style.overflow;
836
+ const overflowY = node.style.overflowY ?? node.style.overflow;
837
+ const clipHorizontally = overflowX === 'hidden' || overflowX === 'scroll';
838
+ const clipVertically = overflowY === 'hidden' || overflowY === 'scroll';
839
+ const isScrollY = overflowY === 'scroll';
840
+ const needsClip = clipHorizontally || clipVertically;
841
+ let y1;
842
+ let y2;
843
+ if (needsClip) {
844
+ const x1 = clipHorizontally
845
+ ? x + yogaNode.getComputedBorder(LayoutEdge.Left)
846
+ : undefined;
847
+ const x2 = clipHorizontally
848
+ ? x +
849
+ yogaNode.getComputedWidth() -
850
+ yogaNode.getComputedBorder(LayoutEdge.Right)
851
+ : undefined;
852
+ y1 = clipVertically
853
+ ? y + yogaNode.getComputedBorder(LayoutEdge.Top)
854
+ : undefined;
855
+ y2 = clipVertically
856
+ ? y +
857
+ yogaNode.getComputedHeight() -
858
+ yogaNode.getComputedBorder(LayoutEdge.Bottom)
859
+ : undefined;
860
+ output.clip({ x1, x2, y1, y2 });
861
+ }
862
+ if (isScrollY) {
863
+ // Scroll containers follow the ScrollBox component structure:
864
+ // a single content-wrapper child with flexShrink:0 (doesn't shrink
865
+ // to fit), whose children are the scrollable items. scrollHeight
866
+ // comes from the wrapper's intrinsic Yoga height. The wrapper is
867
+ // rendered with its Y translated by -scrollTop; its children are
868
+ // culled against the visible window.
869
+ const padTop = yogaNode.getComputedPadding(LayoutEdge.Top);
870
+ const innerHeight = Math.max(0, (y2 ?? y + height) -
871
+ (y1 ?? y) -
872
+ padTop -
873
+ yogaNode.getComputedPadding(LayoutEdge.Bottom));
874
+ const content = node.childNodes.find(c => c.yogaNode);
875
+ const contentYoga = content?.yogaNode;
876
+ // scrollHeight is the intrinsic height of the content wrapper.
877
+ // Do NOT add getComputedTop() — that's the wrapper's offset
878
+ // within the viewport (equal to the scroll container's
879
+ // paddingTop), and innerHeight already subtracts padding, so
880
+ // including it double-counts padding and inflates maxScroll.
881
+ let scrollHeight = contentYoga?.getComputedHeight() ?? 0;
882
+ // Defensive extent floor: the wrapper's Yoga height can land ONE LINE
883
+ // short of its children's laid-out extent (the engine's flex-basis
884
+ // measure cache and the child's final subtree layout can disagree by
885
+ // a row — measured on resume of a long session: wrapper 286 while the
886
+ // last row's bottom sat at 287, stable across forced re-layouts). A
887
+ // short scrollHeight clamps maxScroll below the real bottom, so the
888
+ // sticky pin parks the viewport a line up and the tail line culls
889
+ // against the viewport edge — permanently invisible AND unreachable
890
+ // (no scroll position ever shows it; the user loses the newest
891
+ // message). The children's real extent is the authoritative floor.
892
+ // O(direct children) — the windowed list keeps this tiny, and the
893
+ // painter walks the same nodes right below.
894
+ if (content !== undefined) {
895
+ for (const child of content.childNodes) {
896
+ const childYoga = child.yogaNode;
897
+ if (childYoga === undefined)
898
+ continue;
899
+ const bottom = childYoga.getComputedTop() + childYoga.getComputedHeight();
900
+ if (bottom > scrollHeight)
901
+ scrollHeight = bottom;
902
+ }
903
+ }
904
+ // Capture previous scroll bounds BEFORE overwriting — the at-bottom
905
+ // follow check compares against last frame's max.
906
+ const prevScrollHeight = node.scrollHeight ?? scrollHeight;
907
+ const prevViewportHeight = node.scrollViewportHeight;
908
+ const prevInnerHeight = prevViewportHeight ?? innerHeight;
909
+ const prevViewportTop = node.scrollViewportTop;
910
+ node.scrollHeight = scrollHeight;
911
+ node.scrollViewportHeight = innerHeight;
912
+ // Viewport-height change is the one geometry move no scroll notify
913
+ // covers: chrome above/below the box mounts or unmounts (pill,
914
+ // pinned header, recap row) or the terminal changes row count —
915
+ // the viewport resizes with no scroll delta and no sticky flip,
916
+ // while subscribers that paint from the handle's bounds still hold
917
+ // the previous pass's geometry. Fire only on a real transition
918
+ // between two passes: a first frame (`undefined`) observed no
919
+ // change, and scrollTop/scrollViewportTop motion is excluded on
920
+ // purpose (see DOMElement.onViewportHeightChange). Called in the
921
+ // render pass like onStickyRestore below.
922
+ if (prevViewportHeight !== undefined &&
923
+ prevViewportHeight !== innerHeight) {
924
+ node.onViewportHeightChange?.();
925
+ }
926
+ // Absolute screen-buffer row where the scrollable area (inside
927
+ // padding) begins. Exposed via ScrollBoxHandle.getViewportTop() so
928
+ // drag-to-scroll can detect when the drag leaves the scroll viewport.
929
+ node.scrollViewportTop = (y1 ?? y) + padTop;
930
+ // Viewport-edges change with no scroll delta (chrome mount/unmount
931
+ // around the box) — recorded for the selection translate in ink.tsx.
932
+ // prevViewportTop defined ⇒ a previous frame wrote both bounds, so
933
+ // prevInnerHeight is that frame's real height (the ?? fallback only
934
+ // fires on the first frame, which the prevViewportTop check skips).
935
+ const viewportBottom = node.scrollViewportTop + innerHeight - 1;
936
+ const screenRowOffset = prevViewportTop !== undefined &&
937
+ classifyViewportChange(prevViewportTop, prevViewportTop + prevInnerHeight - 1, node.scrollViewportTop, viewportBottom) === 'translate'
938
+ ? node.scrollViewportTop - prevViewportTop
939
+ : 0;
940
+ if (prevViewportTop !== undefined &&
941
+ (node.scrollViewportTop !== prevViewportTop ||
942
+ viewportBottom !== prevViewportTop + prevInnerHeight - 1)) {
943
+ const prevViewportBottom = prevViewportTop + prevInnerHeight - 1;
944
+ const kind = classifyViewportChange(prevViewportTop, prevViewportBottom, node.scrollViewportTop, viewportBottom);
945
+ viewportResizes.push({
946
+ delta: 0,
947
+ viewportTop: prevViewportTop,
948
+ viewportBottom: prevViewportBottom,
949
+ kind,
950
+ rowDelta: kind === 'translate' ? node.scrollViewportTop - prevViewportTop : 0,
951
+ prevTop: prevViewportTop,
952
+ prevBottom: prevViewportBottom,
953
+ top: node.scrollViewportTop,
954
+ bottom: viewportBottom,
955
+ });
956
+ }
957
+ const maxScroll = Math.max(0, scrollHeight - innerHeight);
958
+ // scrollAnchor: scroll so the anchored element's top is at the
959
+ // viewport top (plus offset). Yoga is FRESH — same calculateLayout
960
+ // pass that just produced scrollHeight. Deterministic alternative
961
+ // to scrollTo(N) which bakes a number that's stale by the throttled
962
+ // render; the element ref defers the read to now. One-shot snap.
963
+ // A prior eased-seek version (proportional drain over ~5 frames)
964
+ // moved scrollTop without firing React's notify → parent's quantized
965
+ // store snapshot never updated → StickyTracker got stale range props
966
+ // → firstVisible wrong. Also: SCROLL_MIN_PER_FRAME=4 with snap-at-1
967
+ // ping-ponged forever at delta=2. Smooth needs drain-end notify
968
+ // plumbing; shipping instant first. stickyScroll overrides.
969
+ if (node.scrollAnchor) {
970
+ const anchorTop = node.scrollAnchor.el.yogaNode?.getComputedTop();
971
+ if (anchorTop != null) {
972
+ node.scrollTop = anchorTop + node.scrollAnchor.offset;
973
+ node.pendingScrollDelta = undefined;
974
+ }
975
+ node.scrollAnchor = undefined;
976
+ }
977
+ // At-bottom follow. Positional: if scrollTop was at (or past) the
978
+ // previous max, pin to the new max. Scroll away → stop following;
979
+ // scroll back (or scrollToBottom/sticky attr) → resume. The sticky
980
+ // flag is OR'd in for cold start (scrollTop=0 before first layout)
981
+ // and scrollToBottom-from-far-away (flag set before scrollTop moves)
982
+ // — the imperative field takes precedence over the attribute so
983
+ // scrollTo/scrollBy can break stickiness. pendingDelta<0 guard:
984
+ // don't cancel an in-flight scroll-up when content races in.
985
+ // Capture scrollTop before follow so ink.tsx can translate any
986
+ // active text selection by the same delta (native terminal behavior:
987
+ // view keeps scrolling, highlight walks up with the text).
988
+ const scrollTopBeforeFollow = node.scrollTop ?? 0;
989
+ const sticky = node.stickyScroll ?? Boolean(node.attributes['stickyScroll']);
990
+ const prevMaxScroll = node.scrollPrevMax ?? Math.max(0, prevScrollHeight - prevInnerHeight);
991
+ // Positional check only valid when content grew — virtualization can
992
+ // transiently SHRINK scrollHeight (tail unmount + stale heightCache
993
+ // spacer) making scrollTop >= prevMaxScroll true by artifact, not
994
+ // because the user was at bottom.
995
+ const grew = scrollHeight >= prevScrollHeight;
996
+ // A shrink frame is a MEASUREMENT artifact, not real content loss:
997
+ // following it (or clamping to its smaller maxScroll) would yank an
998
+ // explicitly scrolled-away view up — all the way to 0 when the
999
+ // transient measurement drops below the viewport. Freeze the
1000
+ // position for that frame; the next growth frame re-validates it.
1001
+ const shrunk = scrollHeight < prevScrollHeight;
1002
+ // Only real growth (or a settled measurement) refreshes the trusted
1003
+ // maxScroll used by the positional at-bottom check — otherwise the
1004
+ // frame AFTER an artifact shrink compares against the shrunken
1005
+ // maxScroll and yanks a mid-scroll view to the bottom (opentui #709:
1006
+ // content-size changes must not reset the manual-scroll state).
1007
+ if (!shrunk)
1008
+ node.scrollPrevMax = maxScroll;
1009
+ // Positional at-bottom also fires on NO-GROWTH frames when the
1010
+ // scroll position already sits at maxScroll: a wheel-down that
1011
+ // lands exactly on the bottom re-pins the follow (and restores
1012
+ // stickyScroll below) so the "N new messages" pill clears once the
1013
+ // user scrolls home — otherwise sticky stays broken until the next
1014
+ // content growth, and an idle stream leaves the pill stuck.
1015
+ const atBottom = sticky ||
1016
+ (scrollTopBeforeFollow >= prevMaxScroll &&
1017
+ (grew || scrollTopBeforeFollow >= maxScroll));
1018
+ if (atBottom && (node.pendingScrollDelta ?? 0) >= 0 && !shrunk) {
1019
+ node.scrollTop = maxScroll;
1020
+ node.pendingScrollDelta = undefined;
1021
+ // Sync flag so useVirtualScroll's isSticky() agrees with positional
1022
+ // state — sticky-broken-but-at-bottom (wheel tremor, click-select
1023
+ // at max) otherwise leaves useVirtualScroll's clamp holding the
1024
+ // viewport short of new streaming content. scrollTo/scrollBy set
1025
+ // false; this restores true, same as scrollToBottom() would.
1026
+ // Only restore when (a) positionally at bottom and (b) the flag
1027
+ // was explicitly broken (===false) by scrollTo/scrollBy. When
1028
+ // undefined (never set by user action) leave it alone — setting it
1029
+ // would make the sticky flag sticky-by-default and lock out
1030
+ // direct scrollTop writes (e.g. the alt-screen-perf test).
1031
+ if (node.stickyScroll === false &&
1032
+ scrollTopBeforeFollow >= prevMaxScroll) {
1033
+ node.stickyScroll = true;
1034
+ node.onStickyRestore?.();
1035
+ }
1036
+ }
1037
+ const followDelta = (node.scrollTop ?? 0) - scrollTopBeforeFollow;
1038
+ if (followDelta > 0) {
1039
+ const vpTop = node.scrollViewportTop ?? 0;
1040
+ followScrolls.push({
1041
+ delta: followDelta,
1042
+ viewportTop: vpTop,
1043
+ viewportBottom: vpTop + innerHeight - 1,
1044
+ screenRowOffset,
1045
+ });
1046
+ }
1047
+ // Drain pendingScrollDelta. Native terminals (proportional burst
1048
+ // events) use proportional drain; xterm.js (VS Code, sparse events +
1049
+ // app-side accel curve) uses adaptive small-step drain. isXtermJs()
1050
+ // depends on the async XTVERSION probe, but by the time this runs
1051
+ // (pendingScrollDelta is only set by wheel events, >>50ms after
1052
+ // startup) the probe has resolved — same timing guarantee the
1053
+ // wheel-accel curve relies on.
1054
+ let cur = node.scrollTop ?? 0;
1055
+ const pending = node.pendingScrollDelta;
1056
+ const cMin = node.scrollClampMin;
1057
+ const cMax = node.scrollClampMax;
1058
+ // Single-sided clamps are valid: sticky virtualization sets only the
1059
+ // min (scroll-up protection during the sticky->manual transition)
1060
+ // and leaves the max open for bottom-follow.
1061
+ if (pending !== undefined && pending !== 0) {
1062
+ // Drain continues even past the clamp — the render-clamp below
1063
+ // holds the VISUAL at the mounted edge regardless. Hard-stopping
1064
+ // here caused stop-start jutter: drain hits edge → pause → React
1065
+ // commits → clamp widens → drain resumes → edge again. Letting
1066
+ // scrollTop advance smoothly while the clamp lags gives continuous
1067
+ // visual scroll at React's commit rate (the clamp catches up each
1068
+ // commit). But THROTTLE the drain when already past the clamp so
1069
+ // scrollTop doesn't race 5000 rows ahead of the mounted range
1070
+ // (slide-cap would then take 200 commits to catch up = long
1071
+ // perceived stall at the edge). Past-clamp drain caps at ~4 rows/
1072
+ // frame, roughly matching React's slide rate so the gap stays
1073
+ // bounded and catch-up is quick once input stops.
1074
+ const pastClamp = (pending < 0 && cMin !== undefined && cur < cMin) ||
1075
+ (pending > 0 && cMax !== undefined && cur > cMax);
1076
+ const eff = pastClamp ? Math.min(4, innerHeight >> 3) : innerHeight;
1077
+ cur += isXtermJsHost()
1078
+ ? drainAdaptive(node, pending, eff)
1079
+ : drainProportional(node, pending, eff);
1080
+ }
1081
+ else if (pending === 0) {
1082
+ // Opposite scrollBy calls cancelled to zero — clear so we don't
1083
+ // schedule an infinite loop of no-op drain frames.
1084
+ node.pendingScrollDelta = undefined;
1085
+ }
1086
+ // Keep the pre-frame position on a shrink frame (measurement
1087
+ // artifact) instead of clamping to the shrunken maxScroll — the
1088
+ // clamp would persist the yank even after content grows back.
1089
+ // Exception: a STICKY view must stay pinned to the bottom. A width
1090
+ // change clears MessageList's row-height cache, collapsing the
1091
+ // estimated scrollHeight; freezing the pre-shrink scrollTop then
1092
+ // parks it PAST the whole shrunken content — every child culls and
1093
+ // the frame paints only the bottom chrome. With the resize erase
1094
+ // (needsEraseBeforePaint) that lands as a pure blank screen with
1095
+ // just the input box, and an idle app produces no follow-up frame
1096
+ // to heal it (user-reported full-screen loss on pane-width jitter —
1097
+ // issue #421; repro-resize-blank). Clamping a sticky view to the shrunken
1098
+ // maxScroll is exactly its contract — show the bottom.
1099
+ let scrollTop = shrunk && !sticky ? cur : Math.max(0, Math.min(cur, maxScroll));
1100
+ // Virtual-scroll clamp: if scrollTop raced past the currently-mounted
1101
+ // range (burst PageUp before React re-renders), render at the EDGE of
1102
+ // the mounted children instead of blank spacer. Do NOT write back to
1103
+ // node.scrollTop — the clamped value is for this paint only; the real
1104
+ // scrollTop stays so React's next commit sees the target and mounts
1105
+ // the right range. Not scheduling scrollDrainNode here keeps the
1106
+ // clamp passive — React's commit → resetAfterCommit → onRender will
1107
+ // paint again with fresh bounds.
1108
+ // Cap both bounds at maxScroll: the clamp bounds come from
1109
+ // MessageList's height ESTIMATES while maxScroll comes from the
1110
+ // frame's actual Yoga height. A width change resets the estimates
1111
+ // (row-height cache clear), and a stale bound can point PAST the
1112
+ // shrunken content bottom — the painted viewport then sits entirely
1113
+ // below the content and every child culls to blank (the sticky
1114
+ // full-screen loss — issue #421; repro-resize-blank). Nothing renderable exists
1115
+ // below maxScroll regardless of what the estimates claim.
1116
+ const clamped = Math.max(Math.min(cMin ?? -Infinity, maxScroll), Math.min(scrollTop, Math.min(cMax ?? Infinity, maxScroll)));
1117
+ node.scrollTop = scrollTop;
1118
+ // Clamp hitting top/bottom consumes any remainder. Set drainPending
1119
+ // only after clamp so a wasted no-op frame isn't scheduled.
1120
+ if (scrollTop !== cur)
1121
+ node.pendingScrollDelta = undefined;
1122
+ if (node.pendingScrollDelta !== undefined)
1123
+ scrollDrainNode = node;
1124
+ // Geometry forensics (#421/#433): everything that decides where this
1125
+ // viewport painted — captured AFTER all clamps so the trace shows the
1126
+ // final renderScrollTop, not the requested one.
1127
+ if (GEOMETRY_TRACE_ENABLED) {
1128
+ noteScrollGeometry({
1129
+ sticky,
1130
+ shrunk,
1131
+ grew,
1132
+ atBottom,
1133
+ scrollTopBeforeFollow,
1134
+ cur,
1135
+ scrollTop,
1136
+ renderScrollTop: clamped,
1137
+ scrollHeight,
1138
+ prevScrollHeight,
1139
+ innerHeight,
1140
+ maxScroll,
1141
+ prevMaxScroll,
1142
+ clampMin: cMin ?? null,
1143
+ clampMax: cMax ?? null,
1144
+ });
1145
+ }
1146
+ // Wheel-drain selection translate (#438): the drain moved content
1147
+ // by (scrollTop - scrollTopBeforeFollow) rows this frame, minus
1148
+ // what at-bottom follow already reported above (followDelta is 0
1149
+ // unless the follow branch fired — and when it did, it cleared
1150
+ // pendingScrollDelta, so the drain contributed nothing). Record
1151
+ // the remainder as a follow-scroll event with a SIGNED delta so
1152
+ // ink.tsx re-anchors any active selection to the text. Without
1153
+ // this, wheel scrolling leaves the highlight pinned to screen
1154
+ // rows and copy-on-select grabs whatever scrolled under it.
1155
+ // scrollTo/scrollToElement jumps never contribute: they write
1156
+ // scrollTop before scrollTopBeforeFollow is captured. Multi-frame
1157
+ // drains record per-frame portions; the selection's virtual-row
1158
+ // tracking accumulates the clamp overshoot across frames. Multiple
1159
+ // boxes may each record; ink.tsx attributes by viewport containment.
1160
+ const wheelDelta = scrollTop - scrollTopBeforeFollow - followDelta;
1161
+ if (wheelDelta !== 0) {
1162
+ const wheelVpTop = node.scrollViewportTop ?? 0;
1163
+ followScrolls.push({
1164
+ delta: wheelDelta,
1165
+ viewportTop: wheelVpTop,
1166
+ viewportBottom: wheelVpTop + innerHeight - 1,
1167
+ screenRowOffset,
1168
+ });
1169
+ }
1170
+ // A manual scroll that lands exactly on the bottom re-pins sticky
1171
+ // IMMEDIATELY on this frame — the follow-block restore above only
1172
+ // fires when a later frame happens, but an idle stream (turn done,
1173
+ // no ticks) produces none, leaving sticky broken and the
1174
+ // new-messages pill stuck at its peak count. Only restores a flag
1175
+ // that was explicitly broken by scrollTo/scrollBy (=== false);
1176
+ // shrink-artifact frames and still-draining scrolls are excluded.
1177
+ if (!shrunk &&
1178
+ node.stickyScroll === false &&
1179
+ node.pendingScrollDelta === undefined &&
1180
+ scrollTop >= maxScroll) {
1181
+ node.stickyScroll = true;
1182
+ node.onStickyRestore?.();
1183
+ }
1184
+ scrollTop = clamped;
1185
+ if (content && contentYoga) {
1186
+ // Compute content wrapper's absolute render position with scroll
1187
+ // offset applied, then render its children with culling.
1188
+ const contentX = x + contentYoga.getComputedLeft();
1189
+ const contentY = y + contentYoga.getComputedTop() - scrollTop;
1190
+ // layoutShifted detection gap: when scrollTop moves by >= viewport
1191
+ // height (batched PageUps, fast wheel), every visible child gets
1192
+ // culled (cache dropped) and every newly-visible child has no
1193
+ // cache — so the children's positionChanged check can't fire.
1194
+ // The content wrapper's cached y (which encodes -scrollTop) is
1195
+ // the only node that survives to witness the scroll.
1196
+ const contentCached = nodeCache.get(content);
1197
+ let hint = null;
1198
+ if (contentCached && contentCached.y !== contentY) {
1199
+ // delta = newScrollTop - oldScrollTop (positive = scrolled down).
1200
+ // Capture a DECSTBM hint if the container itself didn't move
1201
+ // and the shift fits within the viewport — otherwise the full
1202
+ // rewrite is needed anyway, and layoutShifted stays the fallback.
1203
+ const delta = contentCached.y - contentY;
1204
+ const regionTop = Math.floor(y + contentYoga.getComputedTop());
1205
+ const regionBottom = regionTop + innerHeight - 1;
1206
+ if (cached?.y === y &&
1207
+ cached.height === height &&
1208
+ innerHeight > 0 &&
1209
+ Math.abs(delta) < innerHeight) {
1210
+ hint = { top: regionTop, bottom: regionBottom, delta };
1211
+ scrollHint = hint;
1212
+ }
1213
+ else {
1214
+ layoutShifted = true;
1215
+ }
1216
+ }
1217
+ // Fast path: scroll (hint captured) with usable prevScreen.
1218
+ // Blit prevScreen's scroll region into next.screen, shift in-place
1219
+ // by delta (mirrors DECSTBM), then render ONLY the edge rows. The
1220
+ // nested clip keeps child writes out of stable rows — a tall child
1221
+ // that spans edge+stable still renders but stable cells are
1222
+ // clipped, preserving the blit. Avoids re-rendering every visible
1223
+ // child (expensive for long syntax-highlighted transcripts).
1224
+ //
1225
+ // When content.dirty (e.g. streaming text at the bottom of the
1226
+ // scroll), we still use the fast path — the dirty child is almost
1227
+ // always in the edge rows (the bottom, where new content appears).
1228
+ // After edge rendering, any dirty children in stable rows are
1229
+ // re-rendered in a second pass to avoid showing stale blitted
1230
+ // content.
1231
+ //
1232
+ // Guard: the fast path only handles pure scroll or bottom-append.
1233
+ // Child removal/insertion changes the content height in a way that
1234
+ // doesn't match the scroll delta — fall back to the full path so
1235
+ // removed children don't leave stale cells and shifted siblings
1236
+ // render at their new positions.
1237
+ const scrollHeight = contentYoga.getComputedHeight();
1238
+ const prevHeight = contentCached?.height ?? scrollHeight;
1239
+ const heightDelta = scrollHeight - prevHeight;
1240
+ // NOTE: scroll-up + streaming growth (delta < 0, heightDelta > 0)
1241
+ // deliberately stays OUT of the fast path. Virtualization moves the
1242
+ // topPad spacer on the same frame (every mounted row's yogaTop
1243
+ // shifts), so the appended-content screen mapping is not derivable
1244
+ // from prevHeight - a widened edge region misses rows and leaves
1245
+ // blitted stale copies next to the new ones (content duplication).
1246
+ // Upstream observed the same class of bug ("content bleeding
1247
+ // through during scroll-up + streaming") and chose the full path.
1248
+ const safeForFastPath = !hint ||
1249
+ heightDelta === 0 ||
1250
+ (hint.delta > 0 && heightDelta === hint.delta);
1251
+ const graphicsInScrollRegion = hint !== null &&
1252
+ output.hasPreviousImageInRegion(Math.floor(x), hint.top, Math.floor(width), hint.bottom - hint.top + 1);
1253
+ // scrollHint is set above when hint is captured. If safeForFastPath
1254
+ // is false the full path renders a next.screen that doesn't match
1255
+ // the DECSTBM shift — emitting DECSTBM leaves stale rows (seen as
1256
+ // content bleeding through during scroll-up + streaming). Clear it.
1257
+ if (!safeForFastPath || graphicsInScrollRegion)
1258
+ scrollHint = null;
1259
+ if (hint &&
1260
+ prevScreen &&
1261
+ safeForFastPath &&
1262
+ !graphicsInScrollRegion) {
1263
+ const { top, bottom, delta } = hint;
1264
+ const w = Math.floor(width);
1265
+ output.blit(prevScreen, Math.floor(x), top, w, bottom - top + 1);
1266
+ output.shift(top, bottom, delta);
1267
+ // Edge rows: new content entering the viewport.
1268
+ const edgeTop = delta > 0 ? bottom - delta + 1 : top;
1269
+ const edgeBottom = delta > 0 ? bottom : top - delta - 1;
1270
+ output.clear({
1271
+ x: Math.floor(x),
1272
+ y: edgeTop,
1273
+ width: w,
1274
+ height: edgeBottom - edgeTop + 1,
1275
+ });
1276
+ output.clip({
1277
+ x1: undefined,
1278
+ x2: undefined,
1279
+ y1: edgeTop,
1280
+ y2: edgeBottom + 1,
1281
+ });
1282
+ // Snapshot dirty children before the first pass — the first
1283
+ // pass clears dirty flags, and edge-spanning children would be
1284
+ // missed by the second pass without this snapshot.
1285
+ const dirtyChildren = content.dirty
1286
+ ? new Set(content.childNodes.filter(c => c.dirty))
1287
+ : null;
1288
+ renderScrolledChildren(content, output, contentX, contentY, hasRemovedChild, undefined,
1289
+ // Cull to edge in child-local coords (inverse of contentY offset).
1290
+ edgeTop - contentY, edgeBottom + 1 - contentY, boxBackgroundColor, true);
1291
+ output.unclip();
1292
+ // Second pass: re-render children in stable rows whose screen
1293
+ // position doesn't match where the shift put their old pixels.
1294
+ // Covers TWO cases:
1295
+ // 1. Dirty children — their content changed, blitted pixels are
1296
+ // stale regardless of position.
1297
+ // 2. Clean children BELOW a middle-growth point — when a dirty
1298
+ // sibling above them grows, their yogaTop increases but
1299
+ // scrollTop increases by the same amount (sticky), so their
1300
+ // screenY is CONSTANT. The shift moved their old pixels to
1301
+ // screenY-delta (wrong); they should stay at screenY. Without
1302
+ // this, the spinner/tmux-monitor ghost at shifted positions
1303
+ // during streaming (e.g. triple spinner, pill duplication).
1304
+ // For bottom-append (the common case), all clean children are
1305
+ // ABOVE the growth point; their screenY decreased by delta and
1306
+ // the shift put them at the right place — skipped here, fast
1307
+ // path preserved.
1308
+ if (dirtyChildren) {
1309
+ const edgeTopLocal = edgeTop - contentY;
1310
+ const edgeBottomLocal = edgeBottom + 1 - contentY;
1311
+ const spaces = ' '.repeat(w);
1312
+ // Track cumulative height change of children iterated so far.
1313
+ // A clean child's yogaTop is unchanged iff this is zero (no
1314
+ // sibling above it grew/shrank/mounted). When zero, the skip
1315
+ // check cached.y−delta === screenY reduces to delta === delta
1316
+ // (tautology) → skip without yoga reads. Restores O(dirty)
1317
+ // that #24536 traded away: for bottom-append the dirty child
1318
+ // is last (all clean children skip); for virtual-scroll range
1319
+ // shift the topSpacer shrink + new-item heights self-balance
1320
+ // to zero before reaching the clean block. Middle-growth
1321
+ // leaves shift non-zero → clean children after the growth
1322
+ // point fall through to yoga + the fine-grained check below,
1323
+ // preserving the ghost-box fix.
1324
+ let cumHeightShift = 0;
1325
+ for (const childNode of content.childNodes) {
1326
+ const childElem = childNode;
1327
+ const isDirty = dirtyChildren.has(childNode);
1328
+ if (!isDirty && cumHeightShift === 0) {
1329
+ if (nodeCache.has(childElem))
1330
+ continue;
1331
+ // Uncached = culled last frame, now re-entering. blit
1332
+ // never painted it → fall through to yoga + render.
1333
+ // Height unchanged (clean), so cumHeightShift stays 0.
1334
+ }
1335
+ const cy = childElem.yogaNode;
1336
+ if (!cy)
1337
+ continue;
1338
+ const childTop = cy.getComputedTop();
1339
+ const childH = cy.getComputedHeight();
1340
+ const childBottom = childTop + childH;
1341
+ if (isDirty) {
1342
+ const prev = nodeCache.get(childElem);
1343
+ cumHeightShift += childH - (prev ? prev.height : 0);
1344
+ }
1345
+ // Skip culled children (outside viewport)
1346
+ if (childBottom <= scrollTop ||
1347
+ childTop >= scrollTop + innerHeight)
1348
+ continue;
1349
+ // Skip children entirely within edge rows (already rendered)
1350
+ if (childTop >= edgeTopLocal && childBottom <= edgeBottomLocal)
1351
+ continue;
1352
+ const screenY = Math.floor(contentY + childTop);
1353
+ // Clean children reaching here have cumHeightShift ≠ 0 OR
1354
+ // no cache. Re-check precisely: cached.y − delta is where
1355
+ // the shift left old pixels; if it equals new screenY the
1356
+ // blit is correct (shift re-balanced at this child, or
1357
+ // yogaTop happens to net out). No cache → blit never
1358
+ // painted it → render.
1359
+ if (!isDirty) {
1360
+ const childCached = nodeCache.get(childElem);
1361
+ if (childCached &&
1362
+ Math.floor(childCached.y) - delta === screenY) {
1363
+ continue;
1364
+ }
1365
+ }
1366
+ // Wipe this child's region with spaces to overwrite stale
1367
+ // blitted content — output.clear() only expands damage and
1368
+ // cannot zero cells that the blit already wrote.
1369
+ const screenBottom = Math.min(Math.floor(contentY + childBottom), Math.floor((y1 ?? y) + padTop + innerHeight));
1370
+ const fillTop = Math.max(screenY, top);
1371
+ if (fillTop < screenBottom) {
1372
+ const fill = Array(screenBottom - fillTop)
1373
+ .fill(spaces)
1374
+ .join('\n');
1375
+ output.write(Math.floor(x), fillTop, fill);
1376
+ output.clip({
1377
+ x1: undefined,
1378
+ x2: undefined,
1379
+ y1: screenY,
1380
+ y2: screenBottom,
1381
+ });
1382
+ renderNodeToOutput(childElem, output, {
1383
+ offsetX: contentX,
1384
+ offsetY: contentY,
1385
+ prevScreen: undefined,
1386
+ inheritedBackgroundColor: boxBackgroundColor,
1387
+ });
1388
+ output.unclip();
1389
+ }
1390
+ }
1391
+ }
1392
+ // Third pass: repair rows where shifted copies of absolute
1393
+ // overlays landed. The blit copied prevScreen cells INCLUDING
1394
+ // overlay pixels (overlays render AFTER this ScrollBox so they
1395
+ // painted into prevScreen's scroll region). After shift, those
1396
+ // pixels sit at (rect.y - delta) — neither edge render nor the
1397
+ // overlay's own re-render covers them. Wipe and re-render
1398
+ // ScrollBox content so the diff writes correct cells.
1399
+ const spaces = absoluteRectsPrev.length ? ' '.repeat(w) : '';
1400
+ for (const r of absoluteRectsPrev) {
1401
+ if (r.y >= bottom + 1 || r.y + r.height <= top)
1402
+ continue;
1403
+ const shiftedTop = Math.max(top, Math.floor(r.y) - delta);
1404
+ const shiftedBottom = Math.min(bottom + 1, Math.floor(r.y + r.height) - delta);
1405
+ // Skip if entirely within edge rows (already rendered).
1406
+ if (shiftedTop >= edgeTop && shiftedBottom <= edgeBottom + 1)
1407
+ continue;
1408
+ if (shiftedTop >= shiftedBottom)
1409
+ continue;
1410
+ const fill = Array(shiftedBottom - shiftedTop)
1411
+ .fill(spaces)
1412
+ .join('\n');
1413
+ output.write(Math.floor(x), shiftedTop, fill);
1414
+ output.clip({
1415
+ x1: undefined,
1416
+ x2: undefined,
1417
+ y1: shiftedTop,
1418
+ y2: shiftedBottom,
1419
+ });
1420
+ renderScrolledChildren(content, output, contentX, contentY, hasRemovedChild, undefined, shiftedTop - contentY, shiftedBottom - contentY, boxBackgroundColor, true);
1421
+ output.unclip();
1422
+ }
1423
+ }
1424
+ else {
1425
+ // Full path. Two sub-cases:
1426
+ //
1427
+ // Scrolled without a usable hint (big jump, container moved):
1428
+ // child positions in prevScreen are stale. Clear the viewport
1429
+ // and disable blit so children don't restore shifted content.
1430
+ //
1431
+ // No scroll (spinner tick, content edit): child positions in
1432
+ // prevScreen are still valid. Skip the viewport clear and pass
1433
+ // prevScreen so unchanged children blit. Dirty children already
1434
+ // self-clear via their own cached-rect clear. Without this, a
1435
+ // spinner inside ScrollBox forces a full-content rewrite every
1436
+ // frame — on wide terminals over tmux (no BSU/ESU) the
1437
+ // bandwidth crosses the chunk boundary and the frame tears.
1438
+ const scrolled = contentCached && contentCached.y !== contentY;
1439
+ if (scrolled && y1 !== undefined && y2 !== undefined) {
1440
+ output.clear({
1441
+ x: Math.floor(x),
1442
+ y: Math.floor(y1),
1443
+ width: Math.floor(width),
1444
+ height: Math.floor(y2 - y1),
1445
+ });
1446
+ }
1447
+ // positionChanged (ScrollBox height shrunk — pill mount) means a
1448
+ // child spanning the old bottom edge would blit its full cached
1449
+ // rect past the new clip. output.ts clips blits now, but also
1450
+ // disable prevScreen here so the partial-row child re-renders at
1451
+ // correct bounds instead of blitting a clipped (truncated) old
1452
+ // rect.
1453
+ renderScrolledChildren(content, output, contentX, contentY, hasRemovedChild, scrolled || positionChanged ? undefined : prevScreen, scrollTop, scrollTop + innerHeight, boxBackgroundColor);
1454
+ }
1455
+ nodeCache.set(content, {
1456
+ x: contentX,
1457
+ y: contentY,
1458
+ width: contentYoga.getComputedWidth(),
1459
+ height: contentYoga.getComputedHeight(),
1460
+ });
1461
+ content.dirty = false;
1462
+ }
1463
+ }
1464
+ else {
1465
+ // Fill interior with background color before rendering children.
1466
+ // This covers padding areas and empty space; child text inherits
1467
+ // the color via inheritedBackgroundColor so written cells also
1468
+ // get the background.
1469
+ // Disable prevScreen for children: the fill overwrites the entire
1470
+ // interior each render, so child blits from prevScreen would restore
1471
+ // stale cells (wrong bg if it changed) on top of the fresh fill.
1472
+ // Backdrop: shade whatever earlier nodes painted under this rect
1473
+ // before this node's own fill and children go on top.
1474
+ if (node.style.backdrop !== undefined) {
1475
+ output.shade({ x: Math.floor(x), y: Math.floor(y), width: Math.floor(width), height: Math.floor(height) });
1476
+ }
1477
+ const ownBackgroundColor = node.style.backgroundColor ?? occlusionBackground;
1478
+ // A Sixel image node owns cells the raster normally paints over. When
1479
+ // no placement is admitted — the modal suppressed graphics, the decode
1480
+ // is still pending, or it failed — those cells must still read as the
1481
+ // enclosing surface: the admitted branch above painted them with the
1482
+ // same inherited color, so leaving them unwritten would diff them back
1483
+ // to terminal-default blanks and punch black holes in the card.
1484
+ const imageSurfaceColor = output.opaqueImageBacking && node.nodeName === 'ink-image'
1485
+ ? ownBackgroundColor ?? inheritedBackgroundColor
1486
+ : undefined;
1487
+ const fillColor = ownBackgroundColor ?? imageSurfaceColor;
1488
+ if (fillColor || node.style.opaque) {
1489
+ const borderLeft = yogaNode.getComputedBorder(LayoutEdge.Left);
1490
+ const borderRight = yogaNode.getComputedBorder(LayoutEdge.Right);
1491
+ const borderTop = yogaNode.getComputedBorder(LayoutEdge.Top);
1492
+ const borderBottom = yogaNode.getComputedBorder(LayoutEdge.Bottom);
1493
+ const innerWidth = Math.floor(width) - borderLeft - borderRight;
1494
+ const innerHeight = Math.floor(height) - borderTop - borderBottom;
1495
+ if (innerWidth > 0 && innerHeight > 0) {
1496
+ const spaces = ' '.repeat(innerWidth);
1497
+ const fillLine = fillColor
1498
+ ? applyTextStyles(spaces, { backgroundColor: fillColor })
1499
+ : spaces;
1500
+ const fill = Array(innerHeight).fill(fillLine).join('\n');
1501
+ output.write(x + borderLeft, y + borderTop, fill);
1502
+ }
1503
+ }
1504
+ renderChildren(node, output, x, y, hasRemovedChild,
1505
+ // backgroundColor and opaque both disable child blit: the fill
1506
+ // overwrites the entire interior each render, so any child whose
1507
+ // layout position shifted would blit stale cells from prevScreen
1508
+ // on top of the fresh fill. bgChanged (effective background moved,
1509
+ // e.g. a hover highlight removed) must disable child blit for the
1510
+ // same reason: the old fill lives in prevScreen and the children's
1511
+ // blits would resurrect it — the frame then equals prevScreen and
1512
+ // the diff never clears the stale highlight.
1513
+ node.nodeName === 'ink-image' ||
1514
+ ownBackgroundColor ||
1515
+ node.style.opaque ||
1516
+ bgChanged
1517
+ ? undefined
1518
+ : prevScreen, boxBackgroundColor);
1519
+ }
1520
+ if (needsClip) {
1521
+ output.unclip();
1522
+ }
1523
+ // Render border AFTER children to ensure it's not overwritten by child
1524
+ // clearing operations. When a child shrinks, it clears its old area,
1525
+ // which may overlap with where the parent's border now is.
1526
+ // A border's cells belong to the surface it frames: pass the node's
1527
+ // effective background so they never fall back to the terminal default
1528
+ // (a black frame around a colored surface, and a black hole where a
1529
+ // Sixel raster is otherwise exposed by a border row or column).
1530
+ renderBorder(x, y, node, output, node.style.backgroundColor ?? occlusionBackground ?? inheritedBackgroundColor);
1531
+ }
1532
+ else if (node.nodeName === 'ink-root') {
1533
+ renderChildren(node, output, x, y, hasRemovedChild, prevScreen, inheritedBackgroundColor);
1534
+ }
1535
+ // Cache layout bounds for dirty tracking
1536
+ const rect = {
1537
+ x,
1538
+ y,
1539
+ width,
1540
+ height,
1541
+ top: yogaTop,
1542
+ bg: effectiveBg,
1543
+ opaque: paintsOwnRect(node),
1544
+ };
1545
+ nodeCache.set(node, rect);
1546
+ if (node.style.position === 'absolute') {
1547
+ absoluteRectsCur.push(rect);
1548
+ absoluteHitList.push({ node, rect });
1549
+ }
1550
+ node.dirty = false;
1551
+ }
1552
+ }
1553
+ // Overflow contamination: content overflows right/down, so clean siblings
1554
+ // AFTER a dirty/removed sibling can contain stale overflow in prevScreen.
1555
+ // Disable blit for siblings after a dirty child — but still pass prevScreen
1556
+ // TO the dirty child itself so its clean descendants can blit. The dirty
1557
+ // child's own blit check already fails (node.dirty=true, set by markDirty
1558
+ // in dom.ts), so
1559
+ // passing prevScreen only benefits its subtree.
1560
+ // For removed children we don't know their original position, so
1561
+ // conservatively disable blit for all.
1562
+ //
1563
+ // Clipped children (overflow hidden/scroll on both axes) cannot overflow
1564
+ // onto later siblings — their content is confined to their layout bounds.
1565
+ // Skip the contamination guard for them so later siblings can still blit.
1566
+ // Without this, a spinner inside a ScrollBox dirties the wrapper on every
1567
+ // tick and the bottom prompt section never blits → 100% writes every frame.
1568
+ //
1569
+ // Exception: absolute-positioned clipped children may have layout bounds
1570
+ // that overlap arbitrary siblings, so the clipping does not help.
1571
+ //
1572
+ // Overlap contamination (seenDirtyClipped): a later ABSOLUTE sibling whose
1573
+ // rect sits inside a dirty clipped child's bounds would blit stale cells
1574
+ // from prevScreen — the clipped child just rewrote those cells this frame.
1575
+ // The clipsBothAxes skip only protects against OVERFLOW (clipped child
1576
+ // painting outside its bounds), not overlap (absolute sibling painting
1577
+ // inside them). For non-opaque absolute siblings, skipSelfBlit forces
1578
+ // descent (the full-width rect has transparent gaps → stale blit) while
1579
+ // still passing prevScreen so opaque descendants can blit their narrower
1580
+ // rects (NewMessagesPill's inner Text with backgroundColor). Opaque
1581
+ // absolute siblings fill their entire rect — direct blit is safe.
1582
+ function renderChildren(node, output, offsetX, offsetY, hasRemovedChild, prevScreen, inheritedBackgroundColor) {
1583
+ let seenDirtyChild = false;
1584
+ let seenDirtyClipped = false;
1585
+ for (const childNode of node.childNodes) {
1586
+ const childElem = childNode;
1587
+ // Capture dirty before rendering — renderNodeToOutput clears the flag
1588
+ const wasDirty = childElem.dirty;
1589
+ const isAbsolute = childElem.style.position === 'absolute';
1590
+ renderNodeToOutput(childElem, output, {
1591
+ offsetX,
1592
+ offsetY,
1593
+ prevScreen: hasRemovedChild || seenDirtyChild ? undefined : prevScreen,
1594
+ // Short-circuits on seenDirtyClipped (false in the common case) so
1595
+ // the opaque/bg reads don't happen per-child per-frame.
1596
+ skipSelfBlit: seenDirtyClipped &&
1597
+ isAbsolute &&
1598
+ !childElem.style.opaque &&
1599
+ childElem.style.backgroundColor === undefined,
1600
+ inheritedBackgroundColor,
1601
+ });
1602
+ if (wasDirty && !seenDirtyChild) {
1603
+ if (!clipsBothAxes(childElem) || isAbsolute) {
1604
+ seenDirtyChild = true;
1605
+ }
1606
+ else {
1607
+ seenDirtyClipped = true;
1608
+ }
1609
+ }
1610
+ }
1611
+ }
1612
+ function clipsBothAxes(node) {
1613
+ const ox = node.style.overflowX ?? node.style.overflow;
1614
+ const oy = node.style.overflowY ?? node.style.overflow;
1615
+ return ((ox === 'hidden' || ox === 'scroll') && (oy === 'hidden' || oy === 'scroll'));
1616
+ }
1617
+ // When Yoga squeezes a box to h=0, the ghost only happens if a sibling
1618
+ // lands at the same computed top — then both write to that row and the
1619
+ // shorter content leaves the longer's tail visible. Yoga's pixel-grid
1620
+ // rounding can give h=0 while still advancing the next sibling's top
1621
+ // (HelpV2's third shortcuts column), so h=0 alone isn't sufficient.
1622
+ function siblingSharesY(node, yogaNode) {
1623
+ const parent = node.parentNode;
1624
+ if (!parent)
1625
+ return false;
1626
+ const myTop = yogaNode.getComputedTop();
1627
+ const siblings = parent.childNodes;
1628
+ const idx = siblings.indexOf(node);
1629
+ for (let i = idx + 1; i < siblings.length; i++) {
1630
+ const sib = siblings[i].yogaNode;
1631
+ if (!sib)
1632
+ continue;
1633
+ return sib.getComputedTop() === myTop;
1634
+ }
1635
+ // No next sibling with a yoga node — check previous. A run of h=0 boxes
1636
+ // at the tail would all share y with each other.
1637
+ for (let i = idx - 1; i >= 0; i--) {
1638
+ const sib = siblings[i].yogaNode;
1639
+ if (!sib)
1640
+ continue;
1641
+ return sib.getComputedTop() === myTop;
1642
+ }
1643
+ return false;
1644
+ }
1645
+ // When a node blits, its absolute-positioned descendants that paint outside
1646
+ // the node's layout bounds are NOT covered by the blit (which only copies
1647
+ // the node's own rect). If a dirty sibling re-rendered and overwrote those
1648
+ // cells, we must re-blit them from prevScreen so the overlays survive.
1649
+ // Example: CommandSuggestions' slash menu uses position='absolute' bottom='100%'
1650
+ // to float above the prompt; a spinner tick in the ScrollBox above re-renders
1651
+ // and overwrites those cells. Without this, the menu vanishes on the next frame.
1652
+ function blitEscapingAbsoluteDescendants(node, output, prevScreen, px, py, pw, ph) {
1653
+ const pr = px + pw;
1654
+ const pb = py + ph;
1655
+ for (const child of node.childNodes) {
1656
+ if (child.nodeName === '#text')
1657
+ continue;
1658
+ const elem = child;
1659
+ if (elem.style.position === 'absolute') {
1660
+ const cached = nodeCache.get(elem);
1661
+ if (cached) {
1662
+ absoluteRectsCur.push(cached);
1663
+ absoluteHitList.push({ node: elem, rect: cached });
1664
+ const cx = Math.floor(cached.x);
1665
+ const cy = Math.floor(cached.y);
1666
+ const cw = Math.floor(cached.width);
1667
+ const ch = Math.floor(cached.height);
1668
+ // Only blit rects that extend outside the parent's layout bounds —
1669
+ // cells within the parent rect are already covered by the parent blit.
1670
+ if (cx < px || cy < py || cx + cw > pr || cy + ch > pb) {
1671
+ output.blit(prevScreen, cx, cy, cw, ch);
1672
+ }
1673
+ }
1674
+ }
1675
+ // Recurse — absolute descendants can be nested arbitrarily deep
1676
+ blitEscapingAbsoluteDescendants(elem, output, prevScreen, px, py, pw, ph);
1677
+ }
1678
+ }
1679
+ // Render children of a scroll container with viewport culling.
1680
+ // scrollTopY..scrollBottomY are the visible window in CHILD-LOCAL Yoga coords
1681
+ // (i.e. what getComputedTop() returns). Children entirely outside this window
1682
+ // are skipped; their nodeCache entry is deleted so if they re-enter the
1683
+ // viewport later they don't emit a stale clear for a position now occupied
1684
+ // by a sibling.
1685
+ function renderScrolledChildren(node, output, offsetX, offsetY, hasRemovedChild, prevScreen, scrollTopY, scrollBottomY, inheritedBackgroundColor,
1686
+ // When true (DECSTBM fast path), culled children keep their cache —
1687
+ // the blit+shift put stable rows in next.screen so stale cache is
1688
+ // never read. Avoids walking O(total_children * subtree_depth) per frame.
1689
+ preserveCulledCache = false) {
1690
+ let seenDirtyChild = false;
1691
+ // Track cumulative height shift of dirty children iterated so far. When
1692
+ // zero, a clean child's yogaTop is unchanged (no sibling above it grew),
1693
+ // so cached.top is fresh and the cull check skips yoga. Bottom-append
1694
+ // has the dirty child last → all prior clean children hit cache →
1695
+ // O(dirty) not O(mounted). Middle-growth leaves shift non-zero after
1696
+ // the dirty child → subsequent children yoga-read (needed for correct
1697
+ // culling since their yogaTop shifted).
1698
+ let cumHeightShift = 0;
1699
+ for (const childNode of node.childNodes) {
1700
+ const childElem = childNode;
1701
+ const cy = childElem.yogaNode;
1702
+ if (cy) {
1703
+ const cached = nodeCache.get(childElem);
1704
+ let top;
1705
+ let height;
1706
+ if (cached?.top !== undefined &&
1707
+ !childElem.dirty &&
1708
+ cumHeightShift === 0) {
1709
+ top = cached.top;
1710
+ height = cached.height;
1711
+ }
1712
+ else {
1713
+ top = cy.getComputedTop();
1714
+ height = cy.getComputedHeight();
1715
+ if (childElem.dirty) {
1716
+ cumHeightShift += height - (cached ? cached.height : 0);
1717
+ }
1718
+ // Refresh cached top so next frame's cumShift===0 path stays
1719
+ // correct. For culled children with preserveCulledCache=true this
1720
+ // is the ONLY refresh point — without it, a middle-growth frame
1721
+ // leaves stale tops that misfire next frame.
1722
+ if (cached)
1723
+ cached.top = top;
1724
+ }
1725
+ const bottom = top + height;
1726
+ if (bottom <= scrollTopY || top >= scrollBottomY) {
1727
+ // Culled — outside visible window. Drop stale cache entries from
1728
+ // the subtree so when this child re-enters it doesn't fire clears
1729
+ // at positions now occupied by siblings. The viewport-clear on
1730
+ // scroll-change handles the visible-area repaint.
1731
+ if (!preserveCulledCache)
1732
+ dropSubtreeCache(childElem);
1733
+ continue;
1734
+ }
1735
+ }
1736
+ const wasDirty = childElem.dirty;
1737
+ renderNodeToOutput(childElem, output, {
1738
+ offsetX,
1739
+ offsetY,
1740
+ prevScreen: hasRemovedChild || seenDirtyChild ? undefined : prevScreen,
1741
+ inheritedBackgroundColor,
1742
+ });
1743
+ if (wasDirty) {
1744
+ seenDirtyChild = true;
1745
+ }
1746
+ }
1747
+ }
1748
+ function dropSubtreeCache(node) {
1749
+ nodeCache.delete(node);
1750
+ for (const child of node.childNodes) {
1751
+ if (child.nodeName !== '#text') {
1752
+ dropSubtreeCache(child);
1753
+ }
1754
+ }
1755
+ }
1756
+ // Exported for testing
1757
+ export { buildCharToSegmentMap, applyStylesToWrappedText };
1758
+ export default renderNodeToOutput;