@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,1607 @@
1
+ import { ansiCodesToString, diffAnsiCodes, } from '@alcalzone/ansi-tokenize';
2
+ import { unionRect, } from './layout/geometry.js';
3
+ import { BEL, ESC, SEP } from './termio/ansi.js';
4
+ import * as warn from './warn.js';
5
+ // --- Shared Pools (interning for memory efficiency) ---
6
+ /**
7
+ * Pool of character strings shared across all screens.
8
+ * With a shared pool, interned char IDs are valid across screens, so
9
+ * blitRegion can copy IDs directly (no re-interning) and diffEach can
10
+ * compare IDs as integers (no string lookup).
11
+ */
12
+ export class CharPool {
13
+ strings = [' ', '']; // Index 0 = space, 1 = empty (spacer)
14
+ stringMap = new Map([
15
+ [' ', 0],
16
+ ['', 1],
17
+ ]);
18
+ ascii = initCharAscii(); // charCode → index, -1 = not interned
19
+ /**
20
+ * Intern a character string and return its stable pool index.
21
+ * @param char - the character string to intern.
22
+ * @returns the pool index for the string.
23
+ */
24
+ intern(char) {
25
+ // ASCII fast-path: direct array lookup instead of Map.get
26
+ if (char.length === 1) {
27
+ const code = char.charCodeAt(0);
28
+ if (code < 128) {
29
+ const cached = this.ascii[code];
30
+ if (cached !== -1)
31
+ return cached;
32
+ const index = this.strings.length;
33
+ this.strings.push(char);
34
+ this.ascii[code] = index;
35
+ return index;
36
+ }
37
+ }
38
+ const existing = this.stringMap.get(char);
39
+ if (existing !== undefined)
40
+ return existing;
41
+ const index = this.strings.length;
42
+ this.strings.push(char);
43
+ this.stringMap.set(char, index);
44
+ return index;
45
+ }
46
+ /**
47
+ * Return the character string for a pool index, or a space for an
48
+ * out-of-range index.
49
+ * @param index - the pool index to look up.
50
+ * @returns the interned string.
51
+ */
52
+ get(index) {
53
+ return this.strings[index] ?? ' ';
54
+ }
55
+ }
56
+ /**
57
+ * Pool of hyperlink strings shared across all screens.
58
+ * Index 0 represents "no hyperlink".
59
+ */
60
+ export class HyperlinkPool {
61
+ strings = ['']; // Index 0 = no hyperlink
62
+ stringMap = new Map();
63
+ /**
64
+ * Intern a hyperlink string and return its stable pool index.
65
+ * @param hyperlink - the hyperlink to intern; undefined or empty maps to 0.
66
+ * @returns the pool index for the hyperlink.
67
+ */
68
+ intern(hyperlink) {
69
+ if (!hyperlink)
70
+ return 0;
71
+ let id = this.stringMap.get(hyperlink);
72
+ if (id === undefined) {
73
+ id = this.strings.length;
74
+ this.strings.push(hyperlink);
75
+ this.stringMap.set(hyperlink, id);
76
+ }
77
+ return id;
78
+ }
79
+ /**
80
+ * Return the hyperlink string for a pool index.
81
+ * @param id - the pool index to look up.
82
+ * @returns the interned hyperlink, or undefined for index 0.
83
+ */
84
+ get(id) {
85
+ return id === 0 ? undefined : this.strings[id];
86
+ }
87
+ }
88
+ // SGR 7 (inverse) as an AnsiCode. endCode '\x1b[27m' flags VISIBLE_ON_SPACE
89
+ // so bit 0 of the resulting styleId is set → renderer won't skip inverted
90
+ // spaces as invisible.
91
+ const INVERSE_CODE = {
92
+ type: 'ansi',
93
+ code: '\x1b[7m',
94
+ endCode: '\x1b[27m',
95
+ };
96
+ // Bold (SGR 1) — stacks cleanly, no reflow in monospace. endCode 22
97
+ // also cancels dim (SGR 2); transitionAnsiCodes re-applies whichever
98
+ // intensity the target style keeps.
99
+ const BOLD_CODE = {
100
+ type: 'ansi',
101
+ code: '\x1b[1m',
102
+ endCode: '\x1b[22m',
103
+ };
104
+ // Faint (SGR 2): the backdrop shade behind a modal layer. Terminal-native
105
+ // (every mainstream emulator renders it by blending the foreground toward
106
+ // its own background), so it needs no knowledge of the terminal palette.
107
+ const DIM_CODE = {
108
+ type: 'ansi',
109
+ code: '\x1b[2m',
110
+ endCode: '\x1b[22m',
111
+ };
112
+ const INTENSITY_END = '\x1b[22m';
113
+ /** How far a shaded explicit colour moves toward the shade target. */
114
+ const SHADE_BLEND = 0.5;
115
+ /** The xterm 256-colour palette entry `n` as RGB (16–231 cube, 232–255
116
+ * greys, 0–15 the conventional defaults). */
117
+ function ansi256ToRgb(n) {
118
+ if (n >= 232) {
119
+ const v = 8 + (n - 232) * 10;
120
+ return { r: v, g: v, b: v };
121
+ }
122
+ if (n >= 16) {
123
+ const i = n - 16;
124
+ const levels = [0, 95, 135, 175, 215, 255];
125
+ return {
126
+ r: levels[Math.floor(i / 36) % 6],
127
+ g: levels[Math.floor(i / 6) % 6],
128
+ b: levels[i % 6],
129
+ };
130
+ }
131
+ const basic = [
132
+ { r: 0, g: 0, b: 0 }, { r: 205, g: 0, b: 0 }, { r: 0, g: 205, b: 0 }, { r: 205, g: 205, b: 0 },
133
+ { r: 0, g: 0, b: 238 }, { r: 205, g: 0, b: 205 }, { r: 0, g: 205, b: 205 }, { r: 229, g: 229, b: 229 },
134
+ { r: 127, g: 127, b: 127 }, { r: 255, g: 0, b: 0 }, { r: 0, g: 255, b: 0 }, { r: 255, g: 255, b: 0 },
135
+ { r: 92, g: 92, b: 255 }, { r: 255, g: 0, b: 255 }, { r: 0, g: 255, b: 255 }, { r: 255, g: 255, b: 255 },
136
+ ];
137
+ return basic[Math.max(0, Math.min(15, n))];
138
+ }
139
+ /** A truecolor (`38;2` / `48;2`) or 256-colour (`38;5` / `48;5`) SGR as a
140
+ * plane + RGB; null for anything else (basic ANSI colours included — the
141
+ * terminal's palette for those is unknown, so they take the faint path). */
142
+ function parseSgrColor(code) {
143
+ const match = /^\x1b\[(38|48);(2|5);(\d+)(?:;(\d+);(\d+))?m$/u.exec(code);
144
+ if (match === null)
145
+ return null;
146
+ const plane = match[1] === '38' ? 'fg' : 'bg';
147
+ if (match[2] === '5')
148
+ return { plane, rgb: ansi256ToRgb(Number(match[3])) };
149
+ if (match[4] === undefined || match[5] === undefined)
150
+ return null;
151
+ return { plane, rgb: { r: Number(match[3]), g: Number(match[4]), b: Number(match[5]) } };
152
+ }
153
+ function sgrColor(plane, rgb) {
154
+ const clamp = (value) => Number.isFinite(value) ? Math.max(0, Math.min(255, Math.round(value))) : 0;
155
+ return {
156
+ type: 'ansi',
157
+ code: `\x1b[${plane === 'fg' ? 38 : 48};2;${clamp(rgb.r)};${clamp(rgb.g)};${clamp(rgb.b)}m`,
158
+ endCode: plane === 'fg' ? '\x1b[39m' : '\x1b[49m',
159
+ };
160
+ }
161
+ function mixRgb(from, to, amount) {
162
+ const channel = (a, b) => Math.round(a + (b - a) * amount);
163
+ return { r: channel(from.r, to.r), g: channel(from.g, to.g), b: channel(from.b, to.b) };
164
+ }
165
+ /**
166
+ * The SGR codes that move a cell from style `from` to style `to`.
167
+ * `diffAnsiCodes` undoes a dropped intensity code with SGR 22, which
168
+ * cancels BOTH bold and dim, and does not re-apply the intensity `to`
169
+ * keeps (bold+dim → bold lost the bold). Every emitter goes through this
170
+ * wrapper so a shaded bold word returns to plain bold when the shade lifts.
171
+ * @param from - the current style stack.
172
+ * @param to - the target style stack.
173
+ * @returns the codes to emit, undo codes first.
174
+ */
175
+ export function transitionAnsiCodes(from, to) {
176
+ const diff = diffAnsiCodes(from, to);
177
+ if (!diff.some(code => code.code === INTENSITY_END))
178
+ return diff;
179
+ const emitted = new Set(diff.map(code => code.code));
180
+ for (const code of to) {
181
+ if (code.endCode === INTENSITY_END && !emitted.has(code.code))
182
+ diff.push(code);
183
+ }
184
+ return diff;
185
+ }
186
+ // Underline (SGR 4). Kept alongside yellow+bold — the underline is the
187
+ // unambiguous visible-on-any-theme marker. Yellow-bg-via-inverse can
188
+ // clash with existing bg colors (user-prompt style, tool chrome, syntax
189
+ // bg). If you see underline but no yellow, the yellow is being lost in
190
+ // the existing cell styling — the overlay IS finding the match.
191
+ const UNDERLINE_CODE = {
192
+ type: 'ansi',
193
+ code: '\x1b[4m',
194
+ endCode: '\x1b[24m',
195
+ };
196
+ // fg→yellow (SGR 33). With inverse already in the stack, the terminal
197
+ // swaps fg↔bg at render — so yellow-fg becomes yellow-BG. Original bg
198
+ // becomes fg (readable on most themes: dark-bg → dark-text on yellow).
199
+ // endCode 39 is 'default fg' — cancels any prior fg color cleanly.
200
+ const YELLOW_FG_CODE = {
201
+ type: 'ansi',
202
+ code: '\x1b[33m',
203
+ endCode: '\x1b[39m',
204
+ };
205
+ /**
206
+ * Pool of interned ANSI style stacks. Each style maps to an ID whose bit 0
207
+ * encodes whether the style is visible on space characters; IDs are valid
208
+ * across all screens sharing this pool.
209
+ */
210
+ export class StylePool {
211
+ ids = new Map();
212
+ styles = [];
213
+ transitionCache = new Map();
214
+ /** Style ID of the empty style stack, used as the empty-cell style. */
215
+ none;
216
+ constructor() {
217
+ this.none = this.intern([]);
218
+ }
219
+ /**
220
+ * Intern a style and return its ID. Bit 0 of the ID encodes whether the
221
+ * style has a visible effect on space characters (background, inverse,
222
+ * underline, etc.). Foreground-only styles get even IDs; styles visible
223
+ * on spaces get odd IDs. This lets the renderer skip invisible spaces
224
+ * with a single bitmask check on the packed word.
225
+ * @param styles - the ANSI code stack to intern.
226
+ * @returns the interned style ID.
227
+ */
228
+ intern(styles) {
229
+ const key = styles.length === 0 ? '' : styles.map(s => s.code).join('\0');
230
+ return this.internWithKey(styles, key);
231
+ }
232
+ internWithKey(styles, key) {
233
+ let id = this.ids.get(key);
234
+ if (id === undefined) {
235
+ const rawId = this.styles.length;
236
+ this.styles.push(styles.length === 0 ? [] : styles);
237
+ id =
238
+ (rawId << 1) |
239
+ (styles.length > 0 && hasVisibleSpaceEffect(styles) ? 1 : 0);
240
+ this.ids.set(key, id);
241
+ }
242
+ return id;
243
+ }
244
+ /**
245
+ * Recover the style stack from an encoded ID. Strips the bit-0 flag via
246
+ * `>>> 1`.
247
+ * @param id - the encoded style ID.
248
+ * @returns the interned ANSI code stack, or an empty array for an unknown ID.
249
+ */
250
+ get(id) {
251
+ return this.styles[id >>> 1] ?? [];
252
+ }
253
+ /**
254
+ * Returns the pre-serialized ANSI string to transition from one style to
255
+ * another. Cached by (fromId, toId) — zero allocations after first call
256
+ * for a given pair.
257
+ * @param fromId - the style ID to transition from.
258
+ * @param toId - the style ID to transition to.
259
+ * @returns the ANSI escape sequence applying the difference, or an empty
260
+ * string when both styles are equal.
261
+ */
262
+ transition(fromId, toId) {
263
+ if (fromId === toId)
264
+ return '';
265
+ const key = fromId * 0x100000 + toId;
266
+ let str = this.transitionCache.get(key);
267
+ if (str === undefined) {
268
+ str = ansiCodesToString(transitionAnsiCodes(this.get(fromId), this.get(toId)));
269
+ this.transitionCache.set(key, str);
270
+ }
271
+ return str;
272
+ }
273
+ /**
274
+ * Intern a style that is `base + inverse`. Cached by base ID so
275
+ * repeated calls for the same underlying style don't re-scan the
276
+ * AnsiCode[] array. Used by the selection overlay.
277
+ */
278
+ inverseCache = new Map();
279
+ /**
280
+ * Intern a style that is `base + inverse`, reusing the base style when it
281
+ * is already inverted to avoid stacking SGR 7.
282
+ * @param baseId - the style ID to overlay inverse onto.
283
+ * @returns the ID of the inverted style.
284
+ */
285
+ withInverse(baseId) {
286
+ let id = this.inverseCache.get(baseId);
287
+ if (id === undefined) {
288
+ const baseCodes = this.get(baseId);
289
+ // If already inverted, use as-is (avoids SGR 7 stacking)
290
+ const hasInverse = baseCodes.some(c => c.endCode === '\x1b[27m');
291
+ id = hasInverse ? baseId : this.intern([...baseCodes, INVERSE_CODE]);
292
+ this.inverseCache.set(baseId, id);
293
+ }
294
+ return id;
295
+ }
296
+ /** Inverse + bold + yellow-bg-via-fg-swap for the CURRENT search match.
297
+ * OTHER matches are plain inverse — bg inherits from the theme. Current
298
+ * gets a distinct yellow bg (via fg-then-inverse swap) plus bold weight
299
+ * so it stands out in a sea of inverse. Underline was too subtle. Zero
300
+ * reflow risk: all pure SGR overlays, per-cell, post-layout. The yellow
301
+ * overrides any existing fg (syntax highlighting) on those cells — fine,
302
+ * the "you are here" signal IS the point, syntax color can yield. */
303
+ currentMatchCache = new Map();
304
+ /**
305
+ * Intern a style marking the current search match: inverse plus bold and
306
+ * a yellow background (via fg-then-inverse swap), distinct from the plain
307
+ * inverse used for other matches.
308
+ * @param baseId - the style ID to overlay match markers onto.
309
+ * @returns the ID of the match style.
310
+ */
311
+ withCurrentMatch(baseId) {
312
+ let id = this.currentMatchCache.get(baseId);
313
+ if (id === undefined) {
314
+ const baseCodes = this.get(baseId);
315
+ // Filter BOTH fg + bg so yellow-via-inverse is unambiguous.
316
+ // User-prompt cells have an explicit bg (grey box); with that bg
317
+ // still set, inverse swaps yellow-fg↔grey-bg → grey-on-yellow on
318
+ // SOME terminals, yellow-on-grey on others (inverse semantics vary
319
+ // when both colors are explicit). Filtering both gives clean
320
+ // yellow-bg + terminal-default-fg everywhere. Bold/dim/italic
321
+ // coexist — keep those.
322
+ const codes = baseCodes.filter(c => c.endCode !== '\x1b[39m' && c.endCode !== '\x1b[49m');
323
+ // fg-yellow FIRST so inverse swaps it to bg. Bold after inverse is
324
+ // fine — SGR 1 is fg-attribute-only, order-independent vs 7.
325
+ codes.push(YELLOW_FG_CODE);
326
+ if (!baseCodes.some(c => c.endCode === '\x1b[27m'))
327
+ codes.push(INVERSE_CODE);
328
+ if (!baseCodes.some(c => c.endCode === '\x1b[22m'))
329
+ codes.push(BOLD_CODE);
330
+ // Underline as the unambiguous marker — yellow-bg can clash with
331
+ // existing bg styling (user-prompt bg, syntax bg). If you see
332
+ // underline but no yellow on a match, the overlay IS finding it;
333
+ // the yellow is just losing a styling fight.
334
+ if (!baseCodes.some(c => c.endCode === '\x1b[24m'))
335
+ codes.push(UNDERLINE_CODE);
336
+ id = this.intern(codes);
337
+ this.currentMatchCache.set(baseId, id);
338
+ }
339
+ return id;
340
+ }
341
+ /**
342
+ * The colour a backdrop shade fades explicit colours toward: the
343
+ * terminal's background (OSC 11), or black/white by the active theme's
344
+ * lightness when it is unknown. Null keeps every colour and shades with
345
+ * faint alone. Changing it drops the shade caches.
346
+ * @param rgb - the shade target, or null.
347
+ */
348
+ shadeTarget = null;
349
+ setShadeTarget(rgb) {
350
+ const current = this.shadeTarget;
351
+ if (current === rgb || (current !== null && rgb !== null
352
+ && current.r === rgb.r && current.g === rgb.g && current.b === rgb.b))
353
+ return;
354
+ this.shadeTarget = rgb;
355
+ this.dimCache.clear();
356
+ }
357
+ /**
358
+ * Backdrop shade. Explicit truecolor / 256-colour foregrounds AND
359
+ * backgrounds move halfway toward the shade target, so a half-block
360
+ * pixel (`▀` with the upper pixel in the fg and the lower in the bg)
361
+ * fades as one pixel pair instead of losing only its upper half; a cell
362
+ * with no such foreground gets faint (SGR 2) so the terminal blends its
363
+ * default text colour toward its own background. Derived IDs retain
364
+ * their source style, so a cell blitted from prevScreen is shaded once,
365
+ * even after the target changes. Equal ANSI colours painted separately
366
+ * must not share that provenance.
367
+ * @param baseId - the cell's current style ID.
368
+ * @returns the shaded style ID, reused for the same source and shade.
369
+ */
370
+ dimCache = new Map();
371
+ shadedBaseIds = new Map();
372
+ withDim(baseId) {
373
+ baseId = this.shadedBaseIds.get(baseId) ?? baseId;
374
+ let id = this.dimCache.get(baseId);
375
+ if (id === undefined) {
376
+ const baseCodes = this.get(baseId);
377
+ const target = this.shadeTarget;
378
+ const codes = [];
379
+ let fgBlended = false;
380
+ for (const code of baseCodes) {
381
+ const parsed = target === null ? null : parseSgrColor(code.code);
382
+ if (parsed === null || target === null) {
383
+ codes.push(code);
384
+ continue;
385
+ }
386
+ codes.push(sgrColor(parsed.plane, mixRgb(parsed.rgb, target, SHADE_BLEND)));
387
+ if (parsed.plane === 'fg')
388
+ fgBlended = true;
389
+ }
390
+ if (!fgBlended && !baseCodes.some(c => c.code === DIM_CODE.code))
391
+ codes.push(DIM_CODE);
392
+ // Keep shades separate from ordinary ANSI interning: e.g. shaded
393
+ // rgb(200,200,200) and independently painted rgb(100,100,100).
394
+ // Including the source also preserves it when two shades coincide.
395
+ id = this.internWithKey(codes, `shade:${baseId}:${codes.map(c => c.code).join('\0')}`);
396
+ this.shadedBaseIds.set(id, baseId);
397
+ this.dimCache.set(baseId, id);
398
+ }
399
+ return id;
400
+ }
401
+ /**
402
+ * Selection overlay: REPLACE the cell's background with a solid color
403
+ * while preserving its foreground (color, bold, italic, dim, underline).
404
+ * Matches native terminal selection — a dedicated bg color, not SGR-7
405
+ * inverse. Inverse swaps fg/bg per-cell, which fragments visually over
406
+ * syntax-highlighted text (every fg color becomes a different bg stripe).
407
+ *
408
+ * Strips any existing bg (endCode 49m — REPLACES, so diff-added green
409
+ * etc. don't bleed through) and any existing inverse (endCode 27m —
410
+ * inverse on top of a solid bg would re-swap and look wrong).
411
+ *
412
+ * bg is set via setSelectionBg(); null → fallback to withInverse() so the
413
+ * overlay still works before theme wiring sets a color (tests, first frame).
414
+ * Cache is keyed by baseId only — setSelectionBg() clears it on change.
415
+ */
416
+ selectionBgCode = null;
417
+ selectionBgCache = new Map();
418
+ /**
419
+ * Set the background color used by the selection overlay and clear the
420
+ * overlay cache so the new color takes effect.
421
+ * @param bg - the background ANSI code, or null to fall back to inverse.
422
+ */
423
+ setSelectionBg(bg) {
424
+ if (this.selectionBgCode?.code === bg?.code)
425
+ return;
426
+ this.selectionBgCode = bg;
427
+ this.selectionBgCache.clear();
428
+ }
429
+ /**
430
+ * Intern a style with the selection background replacing the cell's own
431
+ * background and inverse, preserving foreground attributes. Falls back to
432
+ * withInverse() when no selection background is set.
433
+ * @param baseId - the style ID to overlay the selection background onto.
434
+ * @returns the ID of the selection style.
435
+ */
436
+ withSelectionBg(baseId) {
437
+ const bg = this.selectionBgCode;
438
+ if (bg === null)
439
+ return this.withInverse(baseId);
440
+ let id = this.selectionBgCache.get(baseId);
441
+ if (id === undefined) {
442
+ // Keep everything except bg (49m) and inverse (27m). Fg, bold, dim,
443
+ // italic, underline, strikethrough all preserved.
444
+ const kept = this.get(baseId).filter(c => c.endCode !== '\x1b[49m' && c.endCode !== '\x1b[27m');
445
+ kept.push(bg);
446
+ id = this.intern(kept);
447
+ this.selectionBgCache.set(baseId, id);
448
+ }
449
+ return id;
450
+ }
451
+ }
452
+ // endCodes that produce visible effects on space characters
453
+ const VISIBLE_ON_SPACE = new Set([
454
+ '\x1b[49m', // background color
455
+ '\x1b[27m', // inverse
456
+ '\x1b[24m', // underline
457
+ '\x1b[29m', // strikethrough
458
+ '\x1b[55m', // overline
459
+ ]);
460
+ function hasVisibleSpaceEffect(styles) {
461
+ for (const style of styles) {
462
+ if (VISIBLE_ON_SPACE.has(style.endCode))
463
+ return true;
464
+ }
465
+ return false;
466
+ }
467
+ // Constants for empty/spacer cells to enable fast comparisons
468
+ // These are indices into the charStrings table, not codepoints
469
+ const EMPTY_CHAR_INDEX = 0; // ' ' (space)
470
+ const SPACER_CHAR_INDEX = 1; // '' (empty string for spacer cells)
471
+ // Unwritten cells are [EMPTY_CHAR_INDEX=0, packWord1(emptyStyleId=0,0,0)=0].
472
+ // Since StylePool.none is always 0 (first intern), unwritten cells are
473
+ // indistinguishable from explicitly-cleared cells in the packed array.
474
+ // This is intentional: diffEach can compare raw ints with zero normalization.
475
+ // isEmptyCellByIndex checks if both words are 0 to identify "never visually written" cells.
476
+ function initCharAscii() {
477
+ const table = new Int32Array(128);
478
+ table.fill(-1);
479
+ table[32] = EMPTY_CHAR_INDEX; // ' ' (space)
480
+ return table;
481
+ }
482
+ // --- Packed cell layout ---
483
+ // Each cell is 2 consecutive Int32 elements in the cells array:
484
+ // word0 (cells[ci]): charId (full 32 bits)
485
+ // word1 (cells[ci + 1]): styleId[31:17] | hyperlinkId[16:2] | width[1:0]
486
+ const STYLE_SHIFT = 17;
487
+ const HYPERLINK_SHIFT = 2;
488
+ const HYPERLINK_MASK = 0x7fff; // 15 bits
489
+ const WIDTH_MASK = 3; // 2 bits
490
+ // Pack styleId, hyperlinkId, and width into a single Int32
491
+ function packWord1(styleId, hyperlinkId, width) {
492
+ return (styleId << STYLE_SHIFT) | (hyperlinkId << HYPERLINK_SHIFT) | width;
493
+ }
494
+ // Unwritten cell as BigInt64 — both words are 0, so the 64-bit value is 0n.
495
+ // Used by BigInt64Array.fill() for bulk clears (resetScreen, clearRegion).
496
+ // Not used for comparison — BigInt element reads cause heap allocation.
497
+ const EMPTY_CELL_VALUE = 0n;
498
+ function isEmptyCellByIndex(screen, index) {
499
+ // An empty/unwritten cell has both words === 0:
500
+ // word0 = EMPTY_CHAR_INDEX (0), word1 = packWord1(emptyStyleId=0, 0, 0) = 0.
501
+ const ci = index << 1;
502
+ return screen.cells[ci] === 0 && screen.cells[ci | 1] === 0;
503
+ }
504
+ /**
505
+ * Return whether the cell at a position is empty or unwritten, treating
506
+ * out-of-bounds positions as empty.
507
+ * @param screen - the screen to read.
508
+ * @param x - the cell column.
509
+ * @param y - the cell row.
510
+ * @returns true when the cell is empty or out of bounds.
511
+ */
512
+ export function isEmptyCellAt(screen, x, y) {
513
+ if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
514
+ return true;
515
+ return isEmptyCellByIndex(screen, y * screen.width + x);
516
+ }
517
+ /**
518
+ * Check if a Cell (view object) represents an empty cell.
519
+ * @param screen - the screen the cell belongs to, for its empty style ID.
520
+ * @param cell - the cell view to inspect.
521
+ * @returns true when the cell is a space with the empty style, narrow
522
+ * width, and no hyperlink.
523
+ */
524
+ export function isCellEmpty(screen, cell) {
525
+ // Check if cell looks like an empty cell (space, empty style, narrow, no link).
526
+ // Note: After cellAt mapping, unwritten cells have emptyStyleId, so this
527
+ // returns true for both unwritten AND cleared cells. Use isEmptyCellAt
528
+ // for the internal distinction.
529
+ return (cell.char === ' ' &&
530
+ cell.styleId === screen.emptyStyleId &&
531
+ cell.width === 0 /* CellWidth.Narrow */ &&
532
+ !cell.hyperlink);
533
+ }
534
+ // Intern a hyperlink string and return its ID (0 = no hyperlink)
535
+ function internHyperlink(screen, hyperlink) {
536
+ return screen.hyperlinkPool.intern(hyperlink);
537
+ }
538
+ // ---
539
+ /**
540
+ * Create a new screen with packed cell storage backed by the given shared
541
+ * pools. Non-integer or negative dimensions are clamped to valid integers.
542
+ * @param width - the screen width in cells.
543
+ * @param height - the screen height in rows.
544
+ * @param styles - the shared style pool; its `none` ID becomes the empty style.
545
+ * @param charPool - the shared character pool.
546
+ * @param hyperlinkPool - the shared hyperlink pool.
547
+ * @returns the new empty screen.
548
+ */
549
+ export function createScreen(width, height, styles, charPool, hyperlinkPool) {
550
+ // Warn if dimensions are not valid integers (likely bad yoga layout output)
551
+ warn.ifNotInteger(width, 'createScreen width');
552
+ warn.ifNotInteger(height, 'createScreen height');
553
+ // Ensure width and height are valid integers to prevent crashes
554
+ if (!Number.isInteger(width) || width < 0) {
555
+ width = Math.max(0, Math.floor(width) || 0);
556
+ }
557
+ if (!Number.isInteger(height) || height < 0) {
558
+ height = Math.max(0, Math.floor(height) || 0);
559
+ }
560
+ const size = width * height;
561
+ // Allocate one buffer, two views: Int32Array for per-word access,
562
+ // BigInt64Array for bulk fill in resetScreen/clearRegion.
563
+ // ArrayBuffer is zero-filled, which is exactly the empty cell value:
564
+ // [EMPTY_CHAR_INDEX=0, packWord1(emptyStyleId=0,0,0)=0].
565
+ const buf = new ArrayBuffer(size << 3); // 8 bytes per cell
566
+ const cells = new Int32Array(buf);
567
+ const cells64 = new BigInt64Array(buf);
568
+ return {
569
+ width,
570
+ height,
571
+ cells,
572
+ cells64,
573
+ charPool,
574
+ hyperlinkPool,
575
+ emptyStyleId: styles.none,
576
+ damage: undefined,
577
+ noSelect: new Uint8Array(size),
578
+ softWrap: new Int32Array(height),
579
+ };
580
+ }
581
+ /**
582
+ * Reset an existing screen for reuse, avoiding allocation of new typed arrays.
583
+ * Resizes if needed and clears all cells to empty/unwritten state.
584
+ *
585
+ * For double-buffering, this allows swapping between front and back buffers
586
+ * without allocating new Screen objects each frame.
587
+ * @param screen - the screen to reset and resize.
588
+ * @param width - the new width in cells.
589
+ * @param height - the new height in rows.
590
+ */
591
+ export function resetScreen(screen, width, height) {
592
+ // Warn if dimensions are not valid integers
593
+ warn.ifNotInteger(width, 'resetScreen width');
594
+ warn.ifNotInteger(height, 'resetScreen height');
595
+ // Ensure width and height are valid integers to prevent crashes
596
+ if (!Number.isInteger(width) || width < 0) {
597
+ width = Math.max(0, Math.floor(width) || 0);
598
+ }
599
+ if (!Number.isInteger(height) || height < 0) {
600
+ height = Math.max(0, Math.floor(height) || 0);
601
+ }
602
+ const size = width * height;
603
+ // Resize if needed (only grow, to avoid reallocations)
604
+ if (screen.cells64.length < size) {
605
+ const buf = new ArrayBuffer(size << 3);
606
+ screen.cells = new Int32Array(buf);
607
+ screen.cells64 = new BigInt64Array(buf);
608
+ screen.noSelect = new Uint8Array(size);
609
+ }
610
+ if (screen.softWrap.length < height) {
611
+ screen.softWrap = new Int32Array(height);
612
+ }
613
+ // Reset all cells — single fill call, no loop
614
+ screen.cells64.fill(EMPTY_CELL_VALUE, 0, size);
615
+ screen.noSelect.fill(0, 0, size);
616
+ screen.softWrap.fill(0, 0, height);
617
+ // Update dimensions
618
+ screen.width = width;
619
+ screen.height = height;
620
+ // Shared pools accumulate — no clearing needed. Unique char/hyperlink sets are bounded.
621
+ // Clear damage tracking
622
+ screen.damage = undefined;
623
+ }
624
+ /**
625
+ * Re-intern a screen's char and hyperlink IDs into new pools.
626
+ * Used for generational pool reset — after migrating, the screen's
627
+ * typed arrays contain valid IDs for the new pools, and the old pools
628
+ * can be GC'd.
629
+ *
630
+ * O(width * height) but only called occasionally (e.g., between conversation turns).
631
+ * @param screen - the screen whose char and hyperlink IDs to migrate.
632
+ * @param charPool - the new character pool.
633
+ * @param hyperlinkPool - the new hyperlink pool.
634
+ */
635
+ export function migrateScreenPools(screen, charPool, hyperlinkPool) {
636
+ const oldCharPool = screen.charPool;
637
+ const oldHyperlinkPool = screen.hyperlinkPool;
638
+ if (oldCharPool === charPool && oldHyperlinkPool === hyperlinkPool)
639
+ return;
640
+ const size = screen.width * screen.height;
641
+ const cells = screen.cells;
642
+ // Re-intern chars and hyperlinks in a single pass, stride by 2
643
+ for (let ci = 0; ci < size << 1; ci += 2) {
644
+ // Re-intern charId (word0)
645
+ const oldCharId = cells[ci];
646
+ cells[ci] = charPool.intern(oldCharPool.get(oldCharId));
647
+ // Re-intern hyperlinkId (packed in word1)
648
+ const word1 = cells[ci + 1];
649
+ const oldHyperlinkId = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
650
+ if (oldHyperlinkId !== 0) {
651
+ const oldStr = oldHyperlinkPool.get(oldHyperlinkId);
652
+ const newHyperlinkId = hyperlinkPool.intern(oldStr);
653
+ // Repack word1 with new hyperlinkId, preserving styleId and width
654
+ const styleId = word1 >>> STYLE_SHIFT;
655
+ const width = word1 & WIDTH_MASK;
656
+ cells[ci + 1] = packWord1(styleId, newHyperlinkId, width);
657
+ }
658
+ }
659
+ screen.charPool = charPool;
660
+ screen.hyperlinkPool = hyperlinkPool;
661
+ }
662
+ /**
663
+ * Get a Cell view at the given position. Returns a new object each call -
664
+ * this is intentional as cells are stored packed, not as objects.
665
+ * @param screen - the screen to read.
666
+ * @param x - the cell column.
667
+ * @param y - the cell row.
668
+ * @returns the cell view, or undefined when the position is out of bounds.
669
+ */
670
+ export function cellAt(screen, x, y) {
671
+ if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
672
+ return undefined;
673
+ return cellAtIndex(screen, y * screen.width + x);
674
+ }
675
+ /**
676
+ * Get a Cell view by pre-computed array index. Skips bounds checks and
677
+ * index computation — caller must ensure index is valid.
678
+ * @param screen - the screen to read.
679
+ * @param index - the linear cell index (row * width + column).
680
+ * @returns the cell view.
681
+ */
682
+ export function cellAtIndex(screen, index) {
683
+ const ci = index << 1;
684
+ const word1 = screen.cells[ci + 1];
685
+ const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
686
+ return {
687
+ // Unwritten cells have charIndex=0 (EMPTY_CHAR_INDEX); charPool.get(0) returns ' '
688
+ char: screen.charPool.get(screen.cells[ci]),
689
+ styleId: word1 >>> STYLE_SHIFT,
690
+ width: word1 & WIDTH_MASK,
691
+ hyperlink: hid === 0 ? undefined : screen.hyperlinkPool.get(hid),
692
+ };
693
+ }
694
+ /**
695
+ * Get a Cell at the given index, or undefined if it has no visible content.
696
+ * Returns undefined for spacer cells (charId 1), empty unstyled spaces, and
697
+ * fg-only styled spaces that match lastRenderedStyleId (cursor-forward
698
+ * produces an identical visual result, avoiding a Cell allocation).
699
+ *
700
+ * @param cells - the packed cell words to read (2 Int32s per cell).
701
+ * @param charPool - the character pool to resolve char IDs.
702
+ * @param hyperlinkPool - the hyperlink pool to resolve hyperlink IDs.
703
+ * @param index - the linear cell index (row * width + column).
704
+ * @param lastRenderedStyleId - styleId of the last rendered cell on this
705
+ * line, or -1 if none yet.
706
+ * @returns the cell view, or undefined when the cell has no visible content.
707
+ */
708
+ export function visibleCellAtIndex(cells, charPool, hyperlinkPool, index, lastRenderedStyleId) {
709
+ const ci = index << 1;
710
+ const charId = cells[ci];
711
+ if (charId === 1)
712
+ return undefined; // spacer
713
+ const word1 = cells[ci + 1];
714
+ // For spaces: 0x3fffc masks bits 2-17 (hyperlinkId + styleId visibility
715
+ // bit). If zero, the space has no hyperlink and at most a fg-only style.
716
+ // Then word1 >>> STYLE_SHIFT is the foreground style — skip if it's zero
717
+ // (truly invisible) or matches the last rendered style on this line.
718
+ if (charId === 0 && (word1 & 0x3fffc) === 0) {
719
+ const fgStyle = word1 >>> STYLE_SHIFT;
720
+ if (fgStyle === 0 || fgStyle === lastRenderedStyleId)
721
+ return undefined;
722
+ }
723
+ const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
724
+ return {
725
+ char: charPool.get(charId),
726
+ styleId: word1 >>> STYLE_SHIFT,
727
+ width: word1 & WIDTH_MASK,
728
+ hyperlink: hid === 0 ? undefined : hyperlinkPool.get(hid),
729
+ };
730
+ }
731
+ /**
732
+ * Write cell data into an existing Cell object to avoid allocation.
733
+ * Caller must ensure index is valid.
734
+ */
735
+ function cellAtCI(screen, ci, out) {
736
+ const w1 = ci | 1;
737
+ const word1 = screen.cells[w1];
738
+ out.char = screen.charPool.get(screen.cells[ci]);
739
+ out.styleId = word1 >>> STYLE_SHIFT;
740
+ out.width = word1 & WIDTH_MASK;
741
+ const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
742
+ out.hyperlink = hid === 0 ? undefined : screen.hyperlinkPool.get(hid);
743
+ }
744
+ /**
745
+ * Return the character at a position without building a Cell view.
746
+ * @param screen - the screen to read.
747
+ * @param x - the cell column.
748
+ * @param y - the cell row.
749
+ * @returns the character string, or undefined when out of bounds.
750
+ */
751
+ export function charInCellAt(screen, x, y) {
752
+ if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
753
+ return undefined;
754
+ const ci = (y * screen.width + x) << 1;
755
+ return screen.charPool.get(screen.cells[ci]);
756
+ }
757
+ /**
758
+ * Set a cell, optionally creating a spacer for wide characters.
759
+ *
760
+ * Wide characters (CJK, emoji) occupy 2 cells in the buffer:
761
+ * 1. First cell: Contains the actual character with width = Wide
762
+ * 2. Second cell: Spacer cell with width = SpacerTail (empty, not rendered)
763
+ *
764
+ * If the cell has width = Wide, this function automatically creates the
765
+ * corresponding SpacerTail when the next column is in bounds. This two-cell
766
+ * model keeps the buffer aligned to visual columns for cursor positioning.
767
+ *
768
+ * This function does not wrap across rows. output.ts explicitly writes a
769
+ * SpacerHead when a wide character cannot fit at the right edge.
770
+ * @param screen - the screen to write into.
771
+ * @param x - the cell column.
772
+ * @param y - the cell row.
773
+ * @param cell - the cell data to write.
774
+ */
775
+ export function setCellAt(screen, x, y, cell) {
776
+ if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
777
+ return;
778
+ const ci = (y * screen.width + x) << 1;
779
+ const cells = screen.cells;
780
+ // When a Wide char is overwritten by a Narrow char, its SpacerTail remains
781
+ // as a ghost cell that the diff/render pipeline skips, causing stale content
782
+ // to leak through from previous frames.
783
+ const prevWidth = cells[ci + 1] & WIDTH_MASK;
784
+ if (prevWidth === 1 /* CellWidth.Wide */ && cell.width !== 1 /* CellWidth.Wide */) {
785
+ const spacerX = x + 1;
786
+ if (spacerX < screen.width) {
787
+ const spacerCI = ci + 2;
788
+ if ((cells[spacerCI + 1] & WIDTH_MASK) === 2 /* CellWidth.SpacerTail */) {
789
+ cells[spacerCI] = EMPTY_CHAR_INDEX;
790
+ cells[spacerCI + 1] = packWord1(screen.emptyStyleId, 0, 0 /* CellWidth.Narrow */);
791
+ }
792
+ }
793
+ }
794
+ // Track cleared Wide position for damage expansion below
795
+ let clearedWideX = -1;
796
+ if (prevWidth === 2 /* CellWidth.SpacerTail */ &&
797
+ cell.width !== 2 /* CellWidth.SpacerTail */) {
798
+ // Overwriting a SpacerTail: clear the orphaned Wide char at (x-1).
799
+ // Keeping the wide character with Narrow width would cause the terminal
800
+ // to still render it with width 2, desyncing the cursor model.
801
+ if (x > 0) {
802
+ const wideCI = ci - 2;
803
+ if ((cells[wideCI + 1] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
804
+ cells[wideCI] = EMPTY_CHAR_INDEX;
805
+ cells[wideCI + 1] = packWord1(screen.emptyStyleId, 0, 0 /* CellWidth.Narrow */);
806
+ clearedWideX = x - 1;
807
+ }
808
+ }
809
+ }
810
+ // Pack cell data into cells array
811
+ cells[ci] = internCharString(screen, cell.char);
812
+ cells[ci + 1] = packWord1(cell.styleId, internHyperlink(screen, cell.hyperlink), cell.width);
813
+ // Track damage - expand bounds in place instead of allocating new objects
814
+ // Include the main cell position and any cleared orphan cells
815
+ const minX = clearedWideX >= 0 ? Math.min(x, clearedWideX) : x;
816
+ const damage = screen.damage;
817
+ if (damage) {
818
+ const right = damage.x + damage.width;
819
+ const bottom = damage.y + damage.height;
820
+ if (minX < damage.x) {
821
+ damage.width += damage.x - minX;
822
+ damage.x = minX;
823
+ }
824
+ else if (x >= right) {
825
+ damage.width = x - damage.x + 1;
826
+ }
827
+ if (y < damage.y) {
828
+ damage.height += damage.y - y;
829
+ damage.y = y;
830
+ }
831
+ else if (y >= bottom) {
832
+ damage.height = y - damage.y + 1;
833
+ }
834
+ }
835
+ else {
836
+ screen.damage = { x: minX, y, width: x - minX + 1, height: 1 };
837
+ }
838
+ // If this is a wide character, create a spacer in the next column
839
+ if (cell.width === 1 /* CellWidth.Wide */) {
840
+ const spacerX = x + 1;
841
+ if (spacerX < screen.width) {
842
+ const spacerCI = ci + 2;
843
+ // If the cell we're overwriting with our SpacerTail is itself Wide,
844
+ // clear ITS SpacerTail at x+2 too. Otherwise the orphan SpacerTail
845
+ // makes diffEach report it as `added` and log-update's skip-spacer
846
+ // rule prevents clearing whatever prev content was at that column.
847
+ // Scenario: [a, 💻, spacer] → [本, spacer, ORPHAN spacer] when
848
+ // yoga squishes a💻 to height 0 and 本 renders at the same y.
849
+ if ((cells[spacerCI + 1] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
850
+ const orphanCI = spacerCI + 2;
851
+ if (spacerX + 1 < screen.width &&
852
+ (cells[orphanCI + 1] & WIDTH_MASK) === 2 /* CellWidth.SpacerTail */) {
853
+ cells[orphanCI] = EMPTY_CHAR_INDEX;
854
+ cells[orphanCI + 1] = packWord1(screen.emptyStyleId, 0, 0 /* CellWidth.Narrow */);
855
+ }
856
+ }
857
+ cells[spacerCI] = SPACER_CHAR_INDEX;
858
+ cells[spacerCI + 1] = packWord1(screen.emptyStyleId, 0, 2 /* CellWidth.SpacerTail */);
859
+ // Expand damage to include SpacerTail so diff() scans it
860
+ const d = screen.damage;
861
+ if (d && spacerX >= d.x + d.width) {
862
+ d.width = spacerX - d.x + 1;
863
+ }
864
+ }
865
+ }
866
+ }
867
+ /** Begin recording a run for the given screen. */
868
+ export function createCellRun(screen) {
869
+ return {
870
+ charPool: screen.charPool,
871
+ emptyStyleId: screen.emptyStyleId,
872
+ gaps: [],
873
+ charIdxs: [],
874
+ word1s: [],
875
+ baseX: -1,
876
+ lastX: -1,
877
+ };
878
+ }
879
+ /** Record the cell the slow path is about to write at column x. */
880
+ export function recordCellRunEntry(run, screen, x, cell) {
881
+ if (run.baseX < 0)
882
+ run.baseX = x;
883
+ run.gaps.push(run.lastX < 0 ? 0 : x - run.lastX);
884
+ run.charIdxs.push(internCharString(screen, cell.char));
885
+ run.word1s.push(packWord1(cell.styleId, internHyperlink(screen, cell.hyperlink), cell.width));
886
+ run.lastX = x;
887
+ }
888
+ /** Record the deterministic SpacerTail that setCellAt writes after a wide
889
+ * char at column x (only when x < screen.width - 1). */
890
+ export function recordSpacerRunEntry(run, x) {
891
+ run.gaps.push(x - run.lastX);
892
+ run.charIdxs.push(SPACER_CHAR_INDEX);
893
+ run.word1s.push(packWord1(run.emptyStyleId, 0, 2 /* CellWidth.SpacerTail */));
894
+ run.lastX = x;
895
+ }
896
+ /**
897
+ * Replay a recorded run at (x, y): plain two-word stores, with the damage
898
+ * rect extended over the written span. Mirrors setCellAt's guard-fire
899
+ * conditions exactly — a replay is only valid when none of the three
900
+ * state-dependent fixups (wide-overwrite spacer cleanup, spacer-tail
901
+ * orphan cleanup, wide's next-cell orphan cleanup) would trigger; any
902
+ * other width transition is a plain overwrite. Returns false so the
903
+ * caller falls back to the slow path when a guard WOULD fire.
904
+ */
905
+ export function replayCellRun(screen, x, y, run) {
906
+ if (x < 0 || y < 0 || y >= screen.height || x >= screen.width)
907
+ return false;
908
+ // Defensive: an empty run has no cells and no span — its damage math
909
+ // would be NaN. Callers never cache empty runs, but a future one might.
910
+ if (run.gaps.length === 0)
911
+ return false;
912
+ const cells = screen.cells;
913
+ const width = screen.width;
914
+ let ox = x;
915
+ const gaps = run.gaps;
916
+ for (let i = 0; i < gaps.length; i++) {
917
+ ox += gaps[i];
918
+ if (ox >= width)
919
+ return false;
920
+ const ci = ((y * width) + ox) << 1;
921
+ const w1 = run.word1s[i];
922
+ const newW = w1 & WIDTH_MASK;
923
+ const prevW = cells[ci + 1] & WIDTH_MASK;
924
+ if (newW === 0 /* CellWidth.Narrow */) {
925
+ // G1 (prev Wide → narrow overwrite cleans the spacer at x+1) and
926
+ // G2 (prev SpacerTail → clears the orphan wide at x-1) would fire.
927
+ if (prevW !== 0 /* CellWidth.Narrow */)
928
+ return false;
929
+ }
930
+ else if (newW === 1 /* CellWidth.Wide */) {
931
+ // G2: a SpacerTail under a Wide write clears the orphan at x-1.
932
+ if (prevW === 2 /* CellWidth.SpacerTail */)
933
+ return false;
934
+ // G3: the spacer this write puts at x+1 would stomp a Wide cell
935
+ // and needs its orphan cleanup.
936
+ if (ox + 1 < width && (cells[ci + 3] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
937
+ return false;
938
+ }
939
+ }
940
+ else {
941
+ // SpacerTail: G1 fires when it overwrites a Wide cell; G2's
942
+ // SpacerHead variant (prev SpacerTail under a non-SpacerTail write)
943
+ // can't occur in a recorded run — SpacerHead is never recorded — but
944
+ // keep the guard honest for that day soft-wrap starts recording it.
945
+ if (prevW === 1 /* CellWidth.Wide */ ||
946
+ (newW !== 2 /* CellWidth.SpacerTail */ && prevW === 2 /* CellWidth.SpacerTail */)) {
947
+ return false;
948
+ }
949
+ }
950
+ cells[ci] = run.charIdxs[i];
951
+ cells[ci + 1] = w1;
952
+ }
953
+ // Damage: the full written span, matching what per-cell updates in
954
+ // setCellAt would have accumulated.
955
+ const firstX = x + gaps[0];
956
+ const endX = ox + 1;
957
+ const damage = screen.damage;
958
+ if (damage !== undefined) {
959
+ const right = damage.x + damage.width;
960
+ if (firstX < damage.x) {
961
+ damage.width += damage.x - firstX;
962
+ damage.x = firstX;
963
+ }
964
+ else if (endX > right) {
965
+ damage.width += endX - right;
966
+ }
967
+ if (y < damage.y) {
968
+ damage.height += damage.y - y;
969
+ damage.y = y;
970
+ }
971
+ else if (y >= damage.y + damage.height) {
972
+ damage.height = y - damage.y + 1;
973
+ }
974
+ }
975
+ else {
976
+ screen.damage = { x: firstX, y, width: endX - firstX, height: 1 };
977
+ }
978
+ return true;
979
+ }
980
+ /** Column just past the last written cell — the run's content end. */
981
+ export function cellRunSpan(run) {
982
+ return run.lastX - run.baseX + 1;
983
+ }
984
+ /**
985
+ * Replace the styleId of a cell in-place without disturbing char, width,
986
+ * or hyperlink. Preserves empty cells as-is (char stays ' '). Tracks damage
987
+ * for the cell so diffEach picks up the change.
988
+ * @param screen - the screen to update.
989
+ * @param x - the cell column.
990
+ * @param y - the cell row.
991
+ * @param styleId - the new style ID.
992
+ */
993
+ export function setCellStyleId(screen, x, y, styleId) {
994
+ if (x < 0 || y < 0 || x >= screen.width || y >= screen.height)
995
+ return;
996
+ const ci = (y * screen.width + x) << 1;
997
+ const cells = screen.cells;
998
+ const word1 = cells[ci + 1];
999
+ const width = word1 & WIDTH_MASK;
1000
+ // Skip spacer cells — inverse on the head cell visually covers both columns
1001
+ if (width === 2 /* CellWidth.SpacerTail */ || width === 3 /* CellWidth.SpacerHead */)
1002
+ return;
1003
+ const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
1004
+ cells[ci + 1] = packWord1(styleId, hid, width);
1005
+ // Expand damage so diffEach scans this cell
1006
+ const d = screen.damage;
1007
+ if (d) {
1008
+ screen.damage = unionRect(d, { x, y, width: 1, height: 1 });
1009
+ }
1010
+ else {
1011
+ screen.damage = { x, y, width: 1, height: 1 };
1012
+ }
1013
+ }
1014
+ /**
1015
+ * Intern a character string via the screen's shared CharPool.
1016
+ * Supports grapheme clusters like family emoji.
1017
+ */
1018
+ function internCharString(screen, char) {
1019
+ return screen.charPool.intern(char);
1020
+ }
1021
+ /**
1022
+ * Bulk-copy a rectangular region from src to dst using TypedArray.set().
1023
+ * Single cells.set() call per row (or one call for contiguous blocks).
1024
+ * Damage is computed once for the whole region.
1025
+ *
1026
+ * Clamps negative regionX/regionY to 0 (matching clearRegion) — absolute-
1027
+ * positioned overlays in tiny terminals can compute negative screen coords.
1028
+ * maxX/maxY should already be clamped to both screen bounds by the caller.
1029
+ * @param dst - the destination screen.
1030
+ * @param src - the source screen.
1031
+ * @param regionX - the source region's left column.
1032
+ * @param regionY - the source region's top row.
1033
+ * @param maxX - the exclusive right edge of the region.
1034
+ * @param maxY - the exclusive bottom edge of the region.
1035
+ */
1036
+ export function blitRegion(dst, src, regionX, regionY, maxX, maxY) {
1037
+ regionX = Math.max(0, regionX);
1038
+ regionY = Math.max(0, regionY);
1039
+ if (regionX >= maxX || regionY >= maxY)
1040
+ return;
1041
+ const rowLen = maxX - regionX;
1042
+ const srcStride = src.width << 1;
1043
+ const dstStride = dst.width << 1;
1044
+ const rowBytes = rowLen << 1; // 2 Int32s per cell
1045
+ const srcCells = src.cells;
1046
+ const dstCells = dst.cells;
1047
+ const srcNoSel = src.noSelect;
1048
+ const dstNoSel = dst.noSelect;
1049
+ // softWrap is per-row — copy the row range regardless of stride/width.
1050
+ // Partial-width blits still carry the row's wrap provenance since the
1051
+ // blitted content (a cached ink-text node) is what set the bit.
1052
+ dst.softWrap.set(src.softWrap.subarray(regionY, maxY), regionY);
1053
+ // Fast path: contiguous memory when copying full-width rows at same stride
1054
+ if (regionX === 0 && maxX === src.width && src.width === dst.width) {
1055
+ const srcStart = regionY * srcStride;
1056
+ const totalBytes = (maxY - regionY) * srcStride;
1057
+ dstCells.set(srcCells.subarray(srcStart, srcStart + totalBytes), srcStart);
1058
+ // noSelect is 1 byte/cell vs cells' 8 — same region, different scale
1059
+ const nsStart = regionY * src.width;
1060
+ const nsLen = (maxY - regionY) * src.width;
1061
+ dstNoSel.set(srcNoSel.subarray(nsStart, nsStart + nsLen), nsStart);
1062
+ }
1063
+ else {
1064
+ // Per-row copy for partial-width or mismatched-stride regions
1065
+ let srcRowCI = regionY * srcStride + (regionX << 1);
1066
+ let dstRowCI = regionY * dstStride + (regionX << 1);
1067
+ let srcRowNS = regionY * src.width + regionX;
1068
+ let dstRowNS = regionY * dst.width + regionX;
1069
+ for (let y = regionY; y < maxY; y++) {
1070
+ dstCells.set(srcCells.subarray(srcRowCI, srcRowCI + rowBytes), dstRowCI);
1071
+ dstNoSel.set(srcNoSel.subarray(srcRowNS, srcRowNS + rowLen), dstRowNS);
1072
+ srcRowCI += srcStride;
1073
+ dstRowCI += dstStride;
1074
+ srcRowNS += src.width;
1075
+ dstRowNS += dst.width;
1076
+ }
1077
+ }
1078
+ // Compute damage once for the whole region
1079
+ const regionRect = {
1080
+ x: regionX,
1081
+ y: regionY,
1082
+ width: rowLen,
1083
+ height: maxY - regionY,
1084
+ };
1085
+ if (dst.damage) {
1086
+ dst.damage = unionRect(dst.damage, regionRect);
1087
+ }
1088
+ else {
1089
+ dst.damage = regionRect;
1090
+ }
1091
+ // Handle wide char at right edge: spacer might be outside blit region
1092
+ // but still within dst bounds. Per-row check only at the boundary column.
1093
+ if (maxX < dst.width) {
1094
+ let srcLastCI = (regionY * src.width + (maxX - 1)) << 1;
1095
+ let dstSpacerCI = (regionY * dst.width + maxX) << 1;
1096
+ let wroteSpacerOutsideRegion = false;
1097
+ for (let y = regionY; y < maxY; y++) {
1098
+ if ((srcCells[srcLastCI + 1] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
1099
+ dstCells[dstSpacerCI] = SPACER_CHAR_INDEX;
1100
+ dstCells[dstSpacerCI + 1] = packWord1(dst.emptyStyleId, 0, 2 /* CellWidth.SpacerTail */);
1101
+ wroteSpacerOutsideRegion = true;
1102
+ }
1103
+ srcLastCI += srcStride;
1104
+ dstSpacerCI += dstStride;
1105
+ }
1106
+ // Expand damage to include SpacerTail column if we wrote any
1107
+ if (wroteSpacerOutsideRegion && dst.damage) {
1108
+ const rightEdge = dst.damage.x + dst.damage.width;
1109
+ if (rightEdge === maxX) {
1110
+ dst.damage = { ...dst.damage, width: dst.damage.width + 1 };
1111
+ }
1112
+ }
1113
+ }
1114
+ }
1115
+ /**
1116
+ * Bulk-clear a rectangular region of the screen.
1117
+ * Uses BigInt64Array.fill() for fast row clears.
1118
+ * Handles wide character boundary cleanup at region edges.
1119
+ * @param screen - the screen to clear.
1120
+ * @param regionX - the region's left column.
1121
+ * @param regionY - the region's top row.
1122
+ * @param regionWidth - the region width in cells.
1123
+ * @param regionHeight - the region height in rows.
1124
+ */
1125
+ export function clearRegion(screen, regionX, regionY, regionWidth, regionHeight) {
1126
+ const startX = Math.max(0, regionX);
1127
+ const startY = Math.max(0, regionY);
1128
+ const maxX = Math.min(regionX + regionWidth, screen.width);
1129
+ const maxY = Math.min(regionY + regionHeight, screen.height);
1130
+ if (startX >= maxX || startY >= maxY)
1131
+ return;
1132
+ const cells = screen.cells;
1133
+ const cells64 = screen.cells64;
1134
+ const screenWidth = screen.width;
1135
+ const rowBase = startY * screenWidth;
1136
+ let damageMinX = startX;
1137
+ let damageMaxX = maxX;
1138
+ // EMPTY_CELL_VALUE (0n) matches the zero-initialized state:
1139
+ // word0=EMPTY_CHAR_INDEX(0), word1=packWord1(0,0,0)=0
1140
+ if (startX === 0 && maxX === screenWidth) {
1141
+ // Full-width: single fill, no boundary checks needed
1142
+ cells64.fill(EMPTY_CELL_VALUE, rowBase, rowBase + (maxY - startY) * screenWidth);
1143
+ }
1144
+ else {
1145
+ // Partial-width: single loop handles boundary cleanup and fill per row.
1146
+ const stride = screenWidth << 1; // 2 Int32s per cell
1147
+ const rowLen = maxX - startX;
1148
+ const checkLeft = startX > 0;
1149
+ const checkRight = maxX < screenWidth;
1150
+ let leftEdge = (rowBase + startX) << 1;
1151
+ let rightEdge = (rowBase + maxX - 1) << 1;
1152
+ let fillStart = rowBase + startX;
1153
+ for (let y = startY; y < maxY; y++) {
1154
+ // Left boundary: if cell at startX is a SpacerTail, the Wide char
1155
+ // at startX-1 (outside the region) will be orphaned. Clear it.
1156
+ if (checkLeft) {
1157
+ // leftEdge points to word0 of cell at startX; +1 is its word1
1158
+ if ((cells[leftEdge + 1] & WIDTH_MASK) === 2 /* CellWidth.SpacerTail */) {
1159
+ // word1 of cell at startX-1 is leftEdge-1; word0 is leftEdge-2
1160
+ const prevW1 = leftEdge - 1;
1161
+ if ((cells[prevW1] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
1162
+ cells[prevW1 - 1] = EMPTY_CHAR_INDEX;
1163
+ cells[prevW1] = packWord1(screen.emptyStyleId, 0, 0 /* CellWidth.Narrow */);
1164
+ damageMinX = startX - 1;
1165
+ }
1166
+ }
1167
+ }
1168
+ // Right boundary: if cell at maxX-1 is Wide, its SpacerTail at maxX
1169
+ // (outside the region) will be orphaned. Clear it.
1170
+ if (checkRight) {
1171
+ // rightEdge points to word0 of cell at maxX-1; +1 is its word1
1172
+ if ((cells[rightEdge + 1] & WIDTH_MASK) === 1 /* CellWidth.Wide */) {
1173
+ // word1 of cell at maxX is rightEdge+3 (+2 to next word0, +1 to word1)
1174
+ const nextW1 = rightEdge + 3;
1175
+ if ((cells[nextW1] & WIDTH_MASK) === 2 /* CellWidth.SpacerTail */) {
1176
+ cells[nextW1 - 1] = EMPTY_CHAR_INDEX;
1177
+ cells[nextW1] = packWord1(screen.emptyStyleId, 0, 0 /* CellWidth.Narrow */);
1178
+ damageMaxX = maxX + 1;
1179
+ }
1180
+ }
1181
+ }
1182
+ cells64.fill(EMPTY_CELL_VALUE, fillStart, fillStart + rowLen);
1183
+ leftEdge += stride;
1184
+ rightEdge += stride;
1185
+ fillStart += screenWidth;
1186
+ }
1187
+ }
1188
+ // Update damage once for the whole region
1189
+ const regionRect = {
1190
+ x: damageMinX,
1191
+ y: startY,
1192
+ width: damageMaxX - damageMinX,
1193
+ height: maxY - startY,
1194
+ };
1195
+ if (screen.damage) {
1196
+ screen.damage = unionRect(screen.damage, regionRect);
1197
+ }
1198
+ else {
1199
+ screen.damage = regionRect;
1200
+ }
1201
+ }
1202
+ /**
1203
+ * Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n.
1204
+ * n > 0 shifts UP (simulating CSI n S); n < 0 shifts DOWN (CSI n T).
1205
+ * Vacated rows are cleared. Does NOT update damage. Both cells and the
1206
+ * noSelect bitmap are shifted so text-selection markers stay aligned when
1207
+ * this is applied to next.screen during scroll fast path.
1208
+ * @param screen - the screen to shift.
1209
+ * @param top - the first row of the shifted range (inclusive).
1210
+ * @param bottom - the last row of the shifted range (inclusive).
1211
+ * @param n - the shift in rows; positive shifts up, negative shifts down.
1212
+ */
1213
+ export function shiftRows(screen, top, bottom, n) {
1214
+ if (n === 0 || top < 0 || bottom >= screen.height || top > bottom)
1215
+ return;
1216
+ const w = screen.width;
1217
+ const cells64 = screen.cells64;
1218
+ const noSel = screen.noSelect;
1219
+ const sw = screen.softWrap;
1220
+ const absN = Math.abs(n);
1221
+ if (absN > bottom - top) {
1222
+ cells64.fill(EMPTY_CELL_VALUE, top * w, (bottom + 1) * w);
1223
+ noSel.fill(0, top * w, (bottom + 1) * w);
1224
+ sw.fill(0, top, bottom + 1);
1225
+ return;
1226
+ }
1227
+ if (n > 0) {
1228
+ // SU: row top+n..bottom → top..bottom-n; clear bottom-n+1..bottom
1229
+ cells64.copyWithin(top * w, (top + n) * w, (bottom + 1) * w);
1230
+ noSel.copyWithin(top * w, (top + n) * w, (bottom + 1) * w);
1231
+ sw.copyWithin(top, top + n, bottom + 1);
1232
+ cells64.fill(EMPTY_CELL_VALUE, (bottom - n + 1) * w, (bottom + 1) * w);
1233
+ noSel.fill(0, (bottom - n + 1) * w, (bottom + 1) * w);
1234
+ sw.fill(0, bottom - n + 1, bottom + 1);
1235
+ }
1236
+ else {
1237
+ // SD: row top..bottom+n → top-n..bottom; clear top..top-n-1
1238
+ cells64.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w);
1239
+ noSel.copyWithin((top - n) * w, top * w, (bottom + n + 1) * w);
1240
+ sw.copyWithin(top - n, top, bottom + n + 1);
1241
+ cells64.fill(EMPTY_CELL_VALUE, top * w, (top - n) * w);
1242
+ noSel.fill(0, top * w, (top - n) * w);
1243
+ sw.fill(0, top, top - n);
1244
+ }
1245
+ }
1246
+ // Matches OSC 8 ; ; URI BEL
1247
+ const OSC8_REGEX = new RegExp(`^${ESC}\\]8${SEP}${SEP}([^${BEL}]*)${BEL}$`);
1248
+ /**
1249
+ * The OSC 8 hyperlink escape prefix (`ESC ] 8 ;`) used for cheap pre-checks
1250
+ * before running the full OSC 8 regex.
1251
+ */
1252
+ export const OSC8_PREFIX = `${ESC}]8${SEP}`;
1253
+ /**
1254
+ * Extract the hyperlink URI from the first OSC 8 style in a style stack.
1255
+ * @param styles - the ANSI code stack to scan.
1256
+ * @returns the hyperlink URI, or null when no OSC 8 style is present.
1257
+ */
1258
+ export function extractHyperlinkFromStyles(styles) {
1259
+ for (const style of styles) {
1260
+ const code = style.code;
1261
+ if (code.length < 5 || !code.startsWith(OSC8_PREFIX))
1262
+ continue;
1263
+ const match = code.match(OSC8_REGEX);
1264
+ if (match) {
1265
+ return match[1] || null;
1266
+ }
1267
+ }
1268
+ return null;
1269
+ }
1270
+ /**
1271
+ * Return the style stack with all OSC 8 hyperlink styles removed.
1272
+ *
1273
+ * Any code with the OSC 8 prefix is dropped, including variants the
1274
+ * OSC8_REGEX does not recognize (an `id=` params field, or the ST `\e\\`
1275
+ * terminator kitty/WezTerm/iTerm2 accept): keeping those interned in the
1276
+ * style pool replays them verbatim on serialization (log-update's
1277
+ * ansiCodesToString), smuggling arbitrary-scheme links — and anything else
1278
+ * hiding in the raw sequence — past the sanitized link() rebuild channel.
1279
+ * @param styles - the ANSI code stack to filter.
1280
+ * @returns a new stack without hyperlink styles.
1281
+ */
1282
+ export function filterOutHyperlinkStyles(styles) {
1283
+ return styles.filter(style => !style.code.startsWith(OSC8_PREFIX));
1284
+ }
1285
+ // ---
1286
+ /**
1287
+ * Returns an array of all changes between two screens. Used by tests.
1288
+ * Production code should use diffEach() to avoid allocations.
1289
+ * @param prev - the previous screen state.
1290
+ * @param next - the next screen state.
1291
+ * @returns one entry per changed cell: the point plus the removed and added
1292
+ * cell views (undefined when that side has no cell).
1293
+ */
1294
+ export function diff(prev, next) {
1295
+ const output = [];
1296
+ diffEach(prev, next, (x, y, removed, added) => {
1297
+ // Copy cells since diffEach reuses the objects
1298
+ output.push([
1299
+ { x, y },
1300
+ removed ? { ...removed } : undefined,
1301
+ added ? { ...added } : undefined,
1302
+ ]);
1303
+ });
1304
+ return output;
1305
+ }
1306
+ /**
1307
+ * Like diff(), but calls a callback for each change instead of building an array.
1308
+ * Reuses two Cell objects to avoid per-change allocations. The callback must not
1309
+ * retain references to the Cell objects — their contents are overwritten each call.
1310
+ *
1311
+ * Returns true if the callback ever returned true (early exit signal).
1312
+ * @param prev - the previous screen state.
1313
+ * @param next - the next screen state.
1314
+ * @param cb - the per-change callback; returning true stops iteration.
1315
+ * @returns true when the callback requested an early exit.
1316
+ */
1317
+ export function diffEach(prev, next, cb) {
1318
+ const prevWidth = prev.width;
1319
+ const nextWidth = next.width;
1320
+ const prevHeight = prev.height;
1321
+ const nextHeight = next.height;
1322
+ let region;
1323
+ if (prevWidth === 0 && prevHeight === 0) {
1324
+ region = { x: 0, y: 0, width: nextWidth, height: nextHeight };
1325
+ }
1326
+ else if (next.damage) {
1327
+ region = next.damage;
1328
+ if (prev.damage) {
1329
+ region = unionRect(region, prev.damage);
1330
+ }
1331
+ }
1332
+ else if (prev.damage) {
1333
+ region = prev.damage;
1334
+ }
1335
+ else {
1336
+ region = { x: 0, y: 0, width: 0, height: 0 };
1337
+ }
1338
+ if (prevHeight > nextHeight) {
1339
+ region = unionRect(region, {
1340
+ x: 0,
1341
+ y: nextHeight,
1342
+ width: prevWidth,
1343
+ height: prevHeight - nextHeight,
1344
+ });
1345
+ }
1346
+ if (prevWidth > nextWidth) {
1347
+ region = unionRect(region, {
1348
+ x: nextWidth,
1349
+ y: 0,
1350
+ width: prevWidth - nextWidth,
1351
+ height: prevHeight,
1352
+ });
1353
+ }
1354
+ const maxHeight = Math.max(prevHeight, nextHeight);
1355
+ const maxWidth = Math.max(prevWidth, nextWidth);
1356
+ const endY = Math.min(region.y + region.height, maxHeight);
1357
+ const endX = Math.min(region.x + region.width, maxWidth);
1358
+ if (prevWidth === nextWidth) {
1359
+ return diffSameWidth(prev, next, region.x, endX, region.y, endY, cb);
1360
+ }
1361
+ return diffDifferentWidth(prev, next, region.x, endX, region.y, endY, cb);
1362
+ }
1363
+ /**
1364
+ * Scan for the next cell that differs between two Int32Arrays.
1365
+ * Returns the number of matching cells before the first difference,
1366
+ * or `count` if all cells match. Tiny and pure for JIT inlining.
1367
+ */
1368
+ function findNextDiff(a, b, w0, count) {
1369
+ for (let i = 0; i < count; i++, w0 += 2) {
1370
+ const w1 = w0 | 1;
1371
+ if (a[w0] !== b[w0] || a[w1] !== b[w1])
1372
+ return i;
1373
+ }
1374
+ return count;
1375
+ }
1376
+ /**
1377
+ * Diff one row where both screens are in bounds.
1378
+ * Scans for differences with findNextDiff, unpacks and calls cb for each.
1379
+ */
1380
+ function diffRowBoth(prevCells, nextCells, prev, next, ci, y, startX, endX, prevCell, nextCell, cb) {
1381
+ let x = startX;
1382
+ while (x < endX) {
1383
+ const skip = findNextDiff(prevCells, nextCells, ci, endX - x);
1384
+ x += skip;
1385
+ ci += skip << 1;
1386
+ if (x >= endX)
1387
+ break;
1388
+ cellAtCI(prev, ci, prevCell);
1389
+ cellAtCI(next, ci, nextCell);
1390
+ if (cb(x, y, prevCell, nextCell))
1391
+ return true;
1392
+ x++;
1393
+ ci += 2;
1394
+ }
1395
+ return false;
1396
+ }
1397
+ /**
1398
+ * Emit removals for a row that only exists in prev (height shrank).
1399
+ * Cannot skip empty cells — the terminal still has content from the
1400
+ * previous frame that needs to be cleared.
1401
+ */
1402
+ function diffRowRemoved(prev, ci, y, startX, endX, prevCell, cb) {
1403
+ for (let x = startX; x < endX; x++, ci += 2) {
1404
+ cellAtCI(prev, ci, prevCell);
1405
+ if (cb(x, y, prevCell, undefined))
1406
+ return true;
1407
+ }
1408
+ return false;
1409
+ }
1410
+ /**
1411
+ * Emit additions for a row that only exists in next (height grew).
1412
+ * Skips empty/unwritten cells.
1413
+ */
1414
+ function diffRowAdded(nextCells, next, ci, y, startX, endX, nextCell, cb) {
1415
+ for (let x = startX; x < endX; x++, ci += 2) {
1416
+ if (nextCells[ci] === 0 && nextCells[ci | 1] === 0)
1417
+ continue;
1418
+ cellAtCI(next, ci, nextCell);
1419
+ if (cb(x, y, undefined, nextCell))
1420
+ return true;
1421
+ }
1422
+ return false;
1423
+ }
1424
+ /**
1425
+ * Diff two screens with identical width.
1426
+ * Dispatches each row to a small, JIT-friendly function.
1427
+ */
1428
+ function diffSameWidth(prev, next, startX, endX, startY, endY, cb) {
1429
+ const prevCells = prev.cells;
1430
+ const nextCells = next.cells;
1431
+ const width = prev.width;
1432
+ const prevHeight = prev.height;
1433
+ const nextHeight = next.height;
1434
+ const stride = width << 1;
1435
+ const prevCell = {
1436
+ char: ' ',
1437
+ styleId: 0,
1438
+ width: 0 /* CellWidth.Narrow */,
1439
+ hyperlink: undefined,
1440
+ };
1441
+ const nextCell = {
1442
+ char: ' ',
1443
+ styleId: 0,
1444
+ width: 0 /* CellWidth.Narrow */,
1445
+ hyperlink: undefined,
1446
+ };
1447
+ const rowEndX = Math.min(endX, width);
1448
+ let rowCI = (startY * width + startX) << 1;
1449
+ for (let y = startY; y < endY; y++) {
1450
+ const prevIn = y < prevHeight;
1451
+ const nextIn = y < nextHeight;
1452
+ if (prevIn && nextIn) {
1453
+ if (diffRowBoth(prevCells, nextCells, prev, next, rowCI, y, startX, rowEndX, prevCell, nextCell, cb))
1454
+ return true;
1455
+ }
1456
+ else if (prevIn) {
1457
+ if (diffRowRemoved(prev, rowCI, y, startX, rowEndX, prevCell, cb))
1458
+ return true;
1459
+ }
1460
+ else if (nextIn) {
1461
+ if (diffRowAdded(nextCells, next, rowCI, y, startX, rowEndX, nextCell, cb))
1462
+ return true;
1463
+ }
1464
+ rowCI += stride;
1465
+ }
1466
+ return false;
1467
+ }
1468
+ /**
1469
+ * Fallback: diff two screens with different widths (resize).
1470
+ * Separate indices for prev and next cells arrays.
1471
+ */
1472
+ function diffDifferentWidth(prev, next, startX, endX, startY, endY, cb) {
1473
+ const prevWidth = prev.width;
1474
+ const nextWidth = next.width;
1475
+ const prevCells = prev.cells;
1476
+ const nextCells = next.cells;
1477
+ const prevCell = {
1478
+ char: ' ',
1479
+ styleId: 0,
1480
+ width: 0 /* CellWidth.Narrow */,
1481
+ hyperlink: undefined,
1482
+ };
1483
+ const nextCell = {
1484
+ char: ' ',
1485
+ styleId: 0,
1486
+ width: 0 /* CellWidth.Narrow */,
1487
+ hyperlink: undefined,
1488
+ };
1489
+ const prevStride = prevWidth << 1;
1490
+ const nextStride = nextWidth << 1;
1491
+ let prevRowCI = (startY * prevWidth + startX) << 1;
1492
+ let nextRowCI = (startY * nextWidth + startX) << 1;
1493
+ for (let y = startY; y < endY; y++) {
1494
+ const prevIn = y < prev.height;
1495
+ const nextIn = y < next.height;
1496
+ const prevEndX = prevIn ? Math.min(endX, prevWidth) : startX;
1497
+ const nextEndX = nextIn ? Math.min(endX, nextWidth) : startX;
1498
+ const bothEndX = Math.min(prevEndX, nextEndX);
1499
+ let prevCI = prevRowCI;
1500
+ let nextCI = nextRowCI;
1501
+ for (let x = startX; x < bothEndX; x++) {
1502
+ if (prevCells[prevCI] === nextCells[nextCI] &&
1503
+ prevCells[prevCI + 1] === nextCells[nextCI + 1]) {
1504
+ prevCI += 2;
1505
+ nextCI += 2;
1506
+ continue;
1507
+ }
1508
+ cellAtCI(prev, prevCI, prevCell);
1509
+ cellAtCI(next, nextCI, nextCell);
1510
+ prevCI += 2;
1511
+ nextCI += 2;
1512
+ if (cb(x, y, prevCell, nextCell))
1513
+ return true;
1514
+ }
1515
+ if (prevEndX > bothEndX) {
1516
+ prevCI = prevRowCI + ((bothEndX - startX) << 1);
1517
+ for (let x = bothEndX; x < prevEndX; x++) {
1518
+ cellAtCI(prev, prevCI, prevCell);
1519
+ prevCI += 2;
1520
+ if (cb(x, y, prevCell, undefined))
1521
+ return true;
1522
+ }
1523
+ }
1524
+ if (nextEndX > bothEndX) {
1525
+ nextCI = nextRowCI + ((bothEndX - startX) << 1);
1526
+ for (let x = bothEndX; x < nextEndX; x++) {
1527
+ if (nextCells[nextCI] === 0 && nextCells[nextCI | 1] === 0) {
1528
+ nextCI += 2;
1529
+ continue;
1530
+ }
1531
+ cellAtCI(next, nextCI, nextCell);
1532
+ nextCI += 2;
1533
+ if (cb(x, y, undefined, nextCell))
1534
+ return true;
1535
+ }
1536
+ }
1537
+ prevRowCI += prevStride;
1538
+ nextRowCI += nextStride;
1539
+ }
1540
+ return false;
1541
+ }
1542
+ /**
1543
+ * Mark a rectangular region as noSelect (exclude from text selection).
1544
+ * Clamps to screen bounds. Called from output.ts when a <NoSelect> box
1545
+ * renders. No damage tracking — noSelect doesn't affect terminal output,
1546
+ * only getSelectedText/applySelectionOverlay which read it directly.
1547
+ * @param screen - the screen to update.
1548
+ * @param x - the region's left column.
1549
+ * @param y - the region's top row.
1550
+ * @param width - the region width in cells.
1551
+ * @param height - the region height in rows.
1552
+ */
1553
+ export function markNoSelectRegion(screen, x, y, width, height) {
1554
+ const maxX = Math.min(x + width, screen.width);
1555
+ const maxY = Math.min(y + height, screen.height);
1556
+ const noSel = screen.noSelect;
1557
+ const stride = screen.width;
1558
+ for (let row = Math.max(0, y); row < maxY; row++) {
1559
+ const rowStart = row * stride;
1560
+ noSel.fill(1, rowStart + Math.max(0, x), rowStart + maxX);
1561
+ }
1562
+ }
1563
+ /**
1564
+ * Shade a region: every painted cell there gets its shaded style
1565
+ * (StylePool.withDim). A space with no visible style is skipped — nothing
1566
+ * to fade, and restyling it would only make the diff rewrite blank runs —
1567
+ * but a space carrying a background (a solid pixel, a card fill) is shaded
1568
+ * like a glyph; spacer tails have no style of their own. The mapping is
1569
+ * derived from each style's original source, so blitted cells never stack
1570
+ * shades. Damage covers the region so the diff scans it.
1571
+ * @param screen - the screen being composed.
1572
+ * @param styles - the pool the screen's style IDs belong to.
1573
+ * @param x - the region's left column.
1574
+ * @param y - the region's top row.
1575
+ * @param width - the region's width in cells.
1576
+ * @param height - the region's height in rows.
1577
+ */
1578
+ export function shadeRegion(screen, styles, x, y, width, height) {
1579
+ const startX = Math.max(0, x);
1580
+ const startY = Math.max(0, y);
1581
+ const maxX = Math.min(x + width, screen.width);
1582
+ const maxY = Math.min(y + height, screen.height);
1583
+ if (startX >= maxX || startY >= maxY)
1584
+ return;
1585
+ const cells = screen.cells;
1586
+ const stride = screen.width;
1587
+ for (let row = startY; row < maxY; row++) {
1588
+ for (let col = startX; col < maxX; col++) {
1589
+ const ci = (row * stride + col) << 1;
1590
+ const word1 = cells[ci + 1];
1591
+ const styleId = word1 >>> STYLE_SHIFT;
1592
+ // Bit 0 of a style ID: visible on a space (background, inverse, …).
1593
+ if (cells[ci] === EMPTY_CHAR_INDEX && (styleId & 1) === 0)
1594
+ continue;
1595
+ const cellWidth = word1 & WIDTH_MASK;
1596
+ if (cellWidth === 2 /* CellWidth.SpacerTail */)
1597
+ continue;
1598
+ const shaded = styles.withDim(styleId);
1599
+ if (shaded === styleId)
1600
+ continue;
1601
+ const hid = (word1 >>> HYPERLINK_SHIFT) & HYPERLINK_MASK;
1602
+ cells[ci + 1] = packWord1(shaded, hid, cellWidth);
1603
+ }
1604
+ }
1605
+ const rect = { x: startX, y: startY, width: maxX - startX, height: maxY - startY };
1606
+ screen.damage = screen.damage ? unionRect(screen.damage, rect) : rect;
1607
+ }