@deepseek-harness-tui/dsh-tui 0.11.2 → 0.13.0

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 (786) hide show
  1. package/README.md +60 -8
  2. package/assets/deepy/README.md +60 -0
  3. package/assets/deepy/frames.json +1 -0
  4. package/assets/whale-girl/whale-girl-happy.png +0 -0
  5. package/assets/whaleGirl/README.md +7 -0
  6. package/assets/whaleGirl/frames.json +1 -0
  7. package/assets/whaleGirl/img/building/00.png +0 -0
  8. package/assets/whaleGirl/img/building/01.png +0 -0
  9. package/assets/whaleGirl/img/building/02.png +0 -0
  10. package/assets/whaleGirl/img/building/03.png +0 -0
  11. package/assets/whaleGirl/img/building/04.png +0 -0
  12. package/assets/whaleGirl/img/building/05.png +0 -0
  13. package/assets/whaleGirl/img/building/06.png +0 -0
  14. package/assets/whaleGirl/img/building/07.png +0 -0
  15. package/assets/whaleGirl/img/building/08.png +0 -0
  16. package/assets/whaleGirl/img/building/09.png +0 -0
  17. package/assets/whaleGirl/img/building/10.png +0 -0
  18. package/assets/whaleGirl/img/building/11.png +0 -0
  19. package/assets/whaleGirl/img/building/12.png +0 -0
  20. package/assets/whaleGirl/img/building/13.png +0 -0
  21. package/assets/whaleGirl/img/building/14.png +0 -0
  22. package/assets/whaleGirl/img/building/15.png +0 -0
  23. package/assets/whaleGirl/img/building/16.png +0 -0
  24. package/assets/whaleGirl/img/building/17.png +0 -0
  25. package/assets/whaleGirl/img/building/18.png +0 -0
  26. package/assets/whaleGirl/img/building/19.png +0 -0
  27. package/assets/whaleGirl/img/building/20.png +0 -0
  28. package/assets/whaleGirl/img/building/21.png +0 -0
  29. package/assets/whaleGirl/img/building/22.png +0 -0
  30. package/assets/whaleGirl/img/building/23.png +0 -0
  31. package/assets/whaleGirl/img/carrying/00.png +0 -0
  32. package/assets/whaleGirl/img/carrying/01.png +0 -0
  33. package/assets/whaleGirl/img/carrying/02.png +0 -0
  34. package/assets/whaleGirl/img/carrying/03.png +0 -0
  35. package/assets/whaleGirl/img/carrying/04.png +0 -0
  36. package/assets/whaleGirl/img/carrying/05.png +0 -0
  37. package/assets/whaleGirl/img/carrying/06.png +0 -0
  38. package/assets/whaleGirl/img/carrying/07.png +0 -0
  39. package/assets/whaleGirl/img/compacting/00.png +0 -0
  40. package/assets/whaleGirl/img/compacting/01.png +0 -0
  41. package/assets/whaleGirl/img/compacting/02.png +0 -0
  42. package/assets/whaleGirl/img/compacting/03.png +0 -0
  43. package/assets/whaleGirl/img/compacting/04.png +0 -0
  44. package/assets/whaleGirl/img/compacting/05.png +0 -0
  45. package/assets/whaleGirl/img/compacting/06.png +0 -0
  46. package/assets/whaleGirl/img/compacting/07.png +0 -0
  47. package/assets/whaleGirl/img/compacting/08.png +0 -0
  48. package/assets/whaleGirl/img/compacting/09.png +0 -0
  49. package/assets/whaleGirl/img/conducting/00.png +0 -0
  50. package/assets/whaleGirl/img/conducting/01.png +0 -0
  51. package/assets/whaleGirl/img/conducting/02.png +0 -0
  52. package/assets/whaleGirl/img/conducting/03.png +0 -0
  53. package/assets/whaleGirl/img/conducting/04.png +0 -0
  54. package/assets/whaleGirl/img/conducting/05.png +0 -0
  55. package/assets/whaleGirl/img/conducting/06.png +0 -0
  56. package/assets/whaleGirl/img/conducting/07.png +0 -0
  57. package/assets/whaleGirl/img/conducting/08.png +0 -0
  58. package/assets/whaleGirl/img/conducting/09.png +0 -0
  59. package/assets/whaleGirl/img/conducting/10.png +0 -0
  60. package/assets/whaleGirl/img/conducting/11.png +0 -0
  61. package/assets/whaleGirl/img/drag/00.png +0 -0
  62. package/assets/whaleGirl/img/drag/01.png +0 -0
  63. package/assets/whaleGirl/img/drag/02.png +0 -0
  64. package/assets/whaleGirl/img/drag/03.png +0 -0
  65. package/assets/whaleGirl/img/drag/04.png +0 -0
  66. package/assets/whaleGirl/img/drag/05.png +0 -0
  67. package/assets/whaleGirl/img/drag/06.png +0 -0
  68. package/assets/whaleGirl/img/drag/07.png +0 -0
  69. package/assets/whaleGirl/img/drag/08.png +0 -0
  70. package/assets/whaleGirl/img/drag/09.png +0 -0
  71. package/assets/whaleGirl/img/error/00.png +0 -0
  72. package/assets/whaleGirl/img/error/01.png +0 -0
  73. package/assets/whaleGirl/img/error/02.png +0 -0
  74. package/assets/whaleGirl/img/error/03.png +0 -0
  75. package/assets/whaleGirl/img/error/04.png +0 -0
  76. package/assets/whaleGirl/img/error/05.png +0 -0
  77. package/assets/whaleGirl/img/error/06.png +0 -0
  78. package/assets/whaleGirl/img/error/07.png +0 -0
  79. package/assets/whaleGirl/img/error/08.png +0 -0
  80. package/assets/whaleGirl/img/error/09.png +0 -0
  81. package/assets/whaleGirl/img/happy/00.png +0 -0
  82. package/assets/whaleGirl/img/happy/01.png +0 -0
  83. package/assets/whaleGirl/img/happy/02.png +0 -0
  84. package/assets/whaleGirl/img/happy/03.png +0 -0
  85. package/assets/whaleGirl/img/happy/04.png +0 -0
  86. package/assets/whaleGirl/img/happy/05.png +0 -0
  87. package/assets/whaleGirl/img/happy/06.png +0 -0
  88. package/assets/whaleGirl/img/happy/07.png +0 -0
  89. package/assets/whaleGirl/img/happy/08.png +0 -0
  90. package/assets/whaleGirl/img/happy/09.png +0 -0
  91. package/assets/whaleGirl/img/happy/10.png +0 -0
  92. package/assets/whaleGirl/img/idle/00.png +0 -0
  93. package/assets/whaleGirl/img/idle/01.png +0 -0
  94. package/assets/whaleGirl/img/idle/02.png +0 -0
  95. package/assets/whaleGirl/img/idle/03.png +0 -0
  96. package/assets/whaleGirl/img/idle/04.png +0 -0
  97. package/assets/whaleGirl/img/idle/05.png +0 -0
  98. package/assets/whaleGirl/img/idle/06.png +0 -0
  99. package/assets/whaleGirl/img/idle/07.png +0 -0
  100. package/assets/whaleGirl/img/idle/08.png +0 -0
  101. package/assets/whaleGirl/img/idle/09.png +0 -0
  102. package/assets/whaleGirl/img/idle/10.png +0 -0
  103. package/assets/whaleGirl/img/idle/11.png +0 -0
  104. package/assets/whaleGirl/img/idle/12.png +0 -0
  105. package/assets/whaleGirl/img/idle/13.png +0 -0
  106. package/assets/whaleGirl/img/idle/14.png +0 -0
  107. package/assets/whaleGirl/img/idle/15.png +0 -0
  108. package/assets/whaleGirl/img/idle/16.png +0 -0
  109. package/assets/whaleGirl/img/idle/17.png +0 -0
  110. package/assets/whaleGirl/img/idle/18.png +0 -0
  111. package/assets/whaleGirl/img/idle/19.png +0 -0
  112. package/assets/whaleGirl/img/idle/20.png +0 -0
  113. package/assets/whaleGirl/img/idle-look/00.png +0 -0
  114. package/assets/whaleGirl/img/idle-look/01.png +0 -0
  115. package/assets/whaleGirl/img/idle-look/02.png +0 -0
  116. package/assets/whaleGirl/img/idle-look/03.png +0 -0
  117. package/assets/whaleGirl/img/idle-look/04.png +0 -0
  118. package/assets/whaleGirl/img/idle-look/05.png +0 -0
  119. package/assets/whaleGirl/img/idle-look/06.png +0 -0
  120. package/assets/whaleGirl/img/idle-look/07.png +0 -0
  121. package/assets/whaleGirl/img/idle-look/08.png +0 -0
  122. package/assets/whaleGirl/img/idle-look/09.png +0 -0
  123. package/assets/whaleGirl/img/idle-look/10.png +0 -0
  124. package/assets/whaleGirl/img/idle-look/11.png +0 -0
  125. package/assets/whaleGirl/img/idle-look/12.png +0 -0
  126. package/assets/whaleGirl/img/idle-spout/00.png +0 -0
  127. package/assets/whaleGirl/img/idle-spout/01.png +0 -0
  128. package/assets/whaleGirl/img/idle-spout/02.png +0 -0
  129. package/assets/whaleGirl/img/idle-spout/03.png +0 -0
  130. package/assets/whaleGirl/img/idle-spout/04.png +0 -0
  131. package/assets/whaleGirl/img/idle-spout/05.png +0 -0
  132. package/assets/whaleGirl/img/idle-spout/06.png +0 -0
  133. package/assets/whaleGirl/img/idle-spout/07.png +0 -0
  134. package/assets/whaleGirl/img/idle-spout/08.png +0 -0
  135. package/assets/whaleGirl/img/idle-spout/09.png +0 -0
  136. package/assets/whaleGirl/img/idle-spout/10.png +0 -0
  137. package/assets/whaleGirl/img/music/00.png +0 -0
  138. package/assets/whaleGirl/img/music/01.png +0 -0
  139. package/assets/whaleGirl/img/music/02.png +0 -0
  140. package/assets/whaleGirl/img/music/03.png +0 -0
  141. package/assets/whaleGirl/img/music/04.png +0 -0
  142. package/assets/whaleGirl/img/music/05.png +0 -0
  143. package/assets/whaleGirl/img/music/06.png +0 -0
  144. package/assets/whaleGirl/img/music/07.png +0 -0
  145. package/assets/whaleGirl/img/notification/00.png +0 -0
  146. package/assets/whaleGirl/img/notification/01.png +0 -0
  147. package/assets/whaleGirl/img/notification/02.png +0 -0
  148. package/assets/whaleGirl/img/notification/03.png +0 -0
  149. package/assets/whaleGirl/img/notification/04.png +0 -0
  150. package/assets/whaleGirl/img/notification/05.png +0 -0
  151. package/assets/whaleGirl/img/notification/06.png +0 -0
  152. package/assets/whaleGirl/img/notification/07.png +0 -0
  153. package/assets/whaleGirl/img/poke-left/00.png +0 -0
  154. package/assets/whaleGirl/img/poke-left/01.png +0 -0
  155. package/assets/whaleGirl/img/poke-left/02.png +0 -0
  156. package/assets/whaleGirl/img/poke-left/03.png +0 -0
  157. package/assets/whaleGirl/img/poke-left/04.png +0 -0
  158. package/assets/whaleGirl/img/poke-left/05.png +0 -0
  159. package/assets/whaleGirl/img/poke-left/06.png +0 -0
  160. package/assets/whaleGirl/img/poke-left/07.png +0 -0
  161. package/assets/whaleGirl/img/poke-left/08.png +0 -0
  162. package/assets/whaleGirl/img/poke-left/09.png +0 -0
  163. package/assets/whaleGirl/img/poke-left/10.png +0 -0
  164. package/assets/whaleGirl/img/poke-right/00.png +0 -0
  165. package/assets/whaleGirl/img/poke-right/01.png +0 -0
  166. package/assets/whaleGirl/img/poke-right/02.png +0 -0
  167. package/assets/whaleGirl/img/poke-right/03.png +0 -0
  168. package/assets/whaleGirl/img/poke-right/04.png +0 -0
  169. package/assets/whaleGirl/img/poke-right/05.png +0 -0
  170. package/assets/whaleGirl/img/poke-right/06.png +0 -0
  171. package/assets/whaleGirl/img/poke-right/07.png +0 -0
  172. package/assets/whaleGirl/img/poke-right/08.png +0 -0
  173. package/assets/whaleGirl/img/poke-right/09.png +0 -0
  174. package/assets/whaleGirl/img/poke-right/10.png +0 -0
  175. package/assets/whaleGirl/img/sleeping/00.png +0 -0
  176. package/assets/whaleGirl/img/sleeping/01.png +0 -0
  177. package/assets/whaleGirl/img/sleeping/02.png +0 -0
  178. package/assets/whaleGirl/img/sleeping/03.png +0 -0
  179. package/assets/whaleGirl/img/sleeping/04.png +0 -0
  180. package/assets/whaleGirl/img/sleeping/05.png +0 -0
  181. package/assets/whaleGirl/img/smile-hearts/00.png +0 -0
  182. package/assets/whaleGirl/img/smile-hearts/01.png +0 -0
  183. package/assets/whaleGirl/img/smile-hearts/02.png +0 -0
  184. package/assets/whaleGirl/img/smile-hearts/03.png +0 -0
  185. package/assets/whaleGirl/img/smile-hearts/04.png +0 -0
  186. package/assets/whaleGirl/img/smile-hearts/05.png +0 -0
  187. package/assets/whaleGirl/img/smile-hearts/06.png +0 -0
  188. package/assets/whaleGirl/img/smile-hearts/07.png +0 -0
  189. package/assets/whaleGirl/img/smile-hearts/08.png +0 -0
  190. package/assets/whaleGirl/img/smile-hearts/09.png +0 -0
  191. package/assets/whaleGirl/img/smile-hearts/10.png +0 -0
  192. package/assets/whaleGirl/img/smile-hearts/11.png +0 -0
  193. package/assets/whaleGirl/img/smile-hearts/12.png +0 -0
  194. package/assets/whaleGirl/img/smile-hearts/13.png +0 -0
  195. package/assets/whaleGirl/img/smile-hearts/14.png +0 -0
  196. package/assets/whaleGirl/img/smile-hearts/15.png +0 -0
  197. package/assets/whaleGirl/img/swim/00.png +0 -0
  198. package/assets/whaleGirl/img/swim/01.png +0 -0
  199. package/assets/whaleGirl/img/swim/02.png +0 -0
  200. package/assets/whaleGirl/img/swim/03.png +0 -0
  201. package/assets/whaleGirl/img/swim/04.png +0 -0
  202. package/assets/whaleGirl/img/swim/05.png +0 -0
  203. package/assets/whaleGirl/img/swim/06.png +0 -0
  204. package/assets/whaleGirl/img/swim/07.png +0 -0
  205. package/assets/whaleGirl/img/thinking/00.png +0 -0
  206. package/assets/whaleGirl/img/thinking/01.png +0 -0
  207. package/assets/whaleGirl/img/thinking/02.png +0 -0
  208. package/assets/whaleGirl/img/thinking/03.png +0 -0
  209. package/assets/whaleGirl/img/thinking/04.png +0 -0
  210. package/assets/whaleGirl/img/thinking/05.png +0 -0
  211. package/assets/whaleGirl/img/thinking/06.png +0 -0
  212. package/assets/whaleGirl/img/thinking/07.png +0 -0
  213. package/assets/whaleGirl/img/thinking/08.png +0 -0
  214. package/assets/whaleGirl/img/thinking/09.png +0 -0
  215. package/assets/whaleGirl/img/thinking/10.png +0 -0
  216. package/assets/whaleGirl/img/thinking/11.png +0 -0
  217. package/assets/whaleGirl/img/thinking/12.png +0 -0
  218. package/assets/whaleGirl/img/thinking/13.png +0 -0
  219. package/assets/whaleGirl/img/thinking/14.png +0 -0
  220. package/assets/whaleGirl/img/thinking/15.png +0 -0
  221. package/assets/whaleGirl/img/thinking/16.png +0 -0
  222. package/assets/whaleGirl/img/thumbs-up/00.png +0 -0
  223. package/assets/whaleGirl/img/thumbs-up/01.png +0 -0
  224. package/assets/whaleGirl/img/thumbs-up/02.png +0 -0
  225. package/assets/whaleGirl/img/thumbs-up/03.png +0 -0
  226. package/assets/whaleGirl/img/thumbs-up/04.png +0 -0
  227. package/assets/whaleGirl/img/thumbs-up/05.png +0 -0
  228. package/assets/whaleGirl/img/thumbs-up/06.png +0 -0
  229. package/assets/whaleGirl/img/thumbs-up/07.png +0 -0
  230. package/assets/whaleGirl/img/thumbs-up/08.png +0 -0
  231. package/assets/whaleGirl/img/thumbs-up/09.png +0 -0
  232. package/assets/whaleGirl/img/thumbs-up/10.png +0 -0
  233. package/assets/whaleGirl/img/thumbs-up/11.png +0 -0
  234. package/assets/whaleGirl/img/thumbs-up/12.png +0 -0
  235. package/assets/whaleGirl/img/tickle/00.png +0 -0
  236. package/assets/whaleGirl/img/tickle/01.png +0 -0
  237. package/assets/whaleGirl/img/tickle/02.png +0 -0
  238. package/assets/whaleGirl/img/tickle/03.png +0 -0
  239. package/assets/whaleGirl/img/tickle/04.png +0 -0
  240. package/assets/whaleGirl/img/tickle/05.png +0 -0
  241. package/assets/whaleGirl/img/tickle/06.png +0 -0
  242. package/assets/whaleGirl/img/tickle/07.png +0 -0
  243. package/assets/whaleGirl/img/tickle/08.png +0 -0
  244. package/assets/whaleGirl/img/tickle/09.png +0 -0
  245. package/assets/whaleGirl/img/tickle/10.png +0 -0
  246. package/assets/whaleGirl/img/tickle/11.png +0 -0
  247. package/assets/whaleGirl/img/tickle/12.png +0 -0
  248. package/assets/whaleGirl/img/tickle/13.png +0 -0
  249. package/assets/whaleGirl/img/timings.json +1 -0
  250. package/assets/whaleGirl/img/typing/00.png +0 -0
  251. package/assets/whaleGirl/img/typing/01.png +0 -0
  252. package/assets/whaleGirl/img/typing/02.png +0 -0
  253. package/assets/whaleGirl/img/typing/03.png +0 -0
  254. package/assets/whaleGirl/img/typing/04.png +0 -0
  255. package/assets/whaleGirl/img/typing/05.png +0 -0
  256. package/assets/whaleGirl/img/typing/06.png +0 -0
  257. package/assets/whaleGirl/img/typing/07.png +0 -0
  258. package/assets/whaleGirl/img/typing/08.png +0 -0
  259. package/assets/whaleGirl/img/typing/09.png +0 -0
  260. package/assets/whaleGirl/img/typing/10.png +0 -0
  261. package/assets/whaleGirl/img/typing/11.png +0 -0
  262. package/assets/whaleGirl/img/typing/12.png +0 -0
  263. package/assets/whaleGirl/img/typing/13.png +0 -0
  264. package/assets/whaleGirl/img/waking/00.png +0 -0
  265. package/assets/whaleGirl/img/waking/01.png +0 -0
  266. package/assets/whaleGirl/img/waking/02.png +0 -0
  267. package/assets/whaleGirl/img/waking/03.png +0 -0
  268. package/assets/whaleGirl/img/waking/04.png +0 -0
  269. package/assets/whaleGirl/img/waking/05.png +0 -0
  270. package/assets/whaleGirl/img/waking/06.png +0 -0
  271. package/assets/whaleGirl/img/waking/07.png +0 -0
  272. package/assets/whaleGirl/img/waking/08.png +0 -0
  273. package/assets/whaleGirl/img/waking/09.png +0 -0
  274. package/assets/whaleGirl/img/waking/10.png +0 -0
  275. package/bin/dsh-tui.js +38 -6
  276. package/cordis.patch.yml +31 -6
  277. package/guide/dsh-tui-guide/SKILL.md +37 -0
  278. package/guide/dsh-tui-guide/configuration.en.md +415 -0
  279. package/guide/dsh-tui-guide/configuration.md +354 -0
  280. package/guide/dsh-tui-guide/getting-started.en.md +401 -0
  281. package/guide/dsh-tui-guide/getting-started.md +399 -0
  282. package/guide/dsh-tui-guide/interaction.en.md +738 -0
  283. package/guide/dsh-tui-guide/interaction.md +793 -0
  284. package/guide/dsh-tui-guide/migrate.en.md +166 -0
  285. package/guide/dsh-tui-guide/migrate.md +132 -0
  286. package/guide/dsh-tui-guide/plugins.en.md +78 -0
  287. package/guide/dsh-tui-guide/plugins.md +64 -0
  288. package/guide/dsh-tui-guide/themes.en.md +197 -0
  289. package/guide/dsh-tui-guide/themes.md +188 -0
  290. package/guide/dsh-tui-guide/user-guide.en.md +711 -0
  291. package/guide/dsh-tui-guide/user-guide.md +666 -0
  292. package/guide/dsh-tui-guide/vscode.en.md +301 -0
  293. package/guide/dsh-tui-guide/vscode.md +272 -0
  294. package/lib/settings.json +219 -5
  295. package/lib/types/adapter/channel/ui-policy.d.ts +7 -2
  296. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  297. package/lib/types/adapter/channel/ui-policy.js +18 -1
  298. package/lib/types/adapter/index.d.ts +1 -1
  299. package/lib/types/adapter/index.js +1 -1
  300. package/lib/types/adapter/kernel/host-facade.d.ts +4 -1
  301. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
  302. package/lib/types/adapter/kernel/host-facade.js +8 -1
  303. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
  304. package/lib/types/adapter/kernel/runtime.js +13 -0
  305. package/lib/types/adapter/kernel/slices/index.d.ts +1 -0
  306. package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -1
  307. package/lib/types/adapter/kernel/slices/index.js +3 -0
  308. package/lib/types/adapter/kernel/slices/panels.d.ts +3 -0
  309. package/lib/types/adapter/kernel/slices/panels.d.ts.map +1 -0
  310. package/lib/types/adapter/kernel/slices/panels.js +14 -0
  311. package/lib/types/adapter/ports/channel-capabilities.d.ts +48 -0
  312. package/lib/types/adapter/ports/channel-capabilities.d.ts.map +1 -0
  313. package/lib/types/adapter/ports/channel-capabilities.js +2 -0
  314. package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
  315. package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
  316. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  317. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  318. package/lib/types/adapter/ports/channel-settings.d.ts +2 -1
  319. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  320. package/lib/types/adapter/ports/channel-ui.d.ts +91 -4
  321. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  322. package/lib/types/adapter/ports/channel-view.d.ts +137 -9
  323. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  324. package/lib/types/adapter/ports/channel.d.ts +1 -1
  325. package/lib/types/adapter/ports/channel.js +1 -1
  326. package/lib/types/adapter/ports/descriptor.d.ts +1 -1
  327. package/lib/types/adapter/ports/descriptor.js +1 -1
  328. package/lib/types/adapter/ports/index.d.ts +1 -1
  329. package/lib/types/adapter/ports/index.js +1 -1
  330. package/lib/types/adapter/ports/panels.d.ts +28 -0
  331. package/lib/types/adapter/ports/panels.d.ts.map +1 -0
  332. package/lib/types/adapter/ports/panels.js +8 -0
  333. package/lib/types/adapter/ports/workspace.d.ts +1 -1
  334. package/lib/types/adapter/ports/workspace.js +1 -1
  335. package/lib/types/adapter/spec/index.d.ts +2 -2
  336. package/lib/types/adapter/spec/index.js +2 -2
  337. package/lib/types/adapter/spec/profile.d.ts +6 -6
  338. package/lib/types/adapter/spec/profile.d.ts.map +1 -1
  339. package/lib/types/adapter/spec/profile.js +6 -6
  340. package/lib/types/adapter/spec/protocol-constants.d.ts +3 -3
  341. package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
  342. package/lib/types/adapter/spec/protocol-constants.js +5 -5
  343. package/lib/types/adapter/spec/tui-contributions.d.ts +4 -4
  344. package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
  345. package/lib/types/adapter/spec/tui-contributions.js +5 -5
  346. package/lib/types/adapter/standard/descriptor.js +1 -1
  347. package/lib/types/adapter/standard/index.d.ts +3 -3
  348. package/lib/types/adapter/standard/index.js +3 -3
  349. package/lib/types/adapter/standard/registry.d.ts +3 -2
  350. package/lib/types/adapter/standard/registry.d.ts.map +1 -1
  351. package/lib/types/adapter/standard/registry.js +6 -5
  352. package/lib/types/adapter/standard/tui-extension.d.ts +1 -1
  353. package/lib/types/adapter/standard/tui-extension.js +1 -1
  354. package/lib/types/adapter/upstream/index.d.ts +1 -0
  355. package/lib/types/adapter/upstream/index.d.ts.map +1 -1
  356. package/lib/types/adapter/upstream/index.js +1 -0
  357. package/lib/types/adapter/upstream/panels-driver.d.ts +18 -0
  358. package/lib/types/adapter/upstream/panels-driver.d.ts.map +1 -0
  359. package/lib/types/adapter/upstream/panels-driver.js +159 -0
  360. package/lib/types/api.d.ts +2 -0
  361. package/lib/types/api.d.ts.map +1 -1
  362. package/lib/types/api.js +3 -1
  363. package/lib/types/commands.d.ts.map +1 -1
  364. package/lib/types/commands.js +12 -4
  365. package/lib/types/components/ActivityLine.d.ts +6 -9
  366. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  367. package/lib/types/components/ActivityLine.js +7 -8
  368. package/lib/types/components/Chat/JobCard.d.ts +27 -1
  369. package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
  370. package/lib/types/components/Chat/JobCard.js +128 -33
  371. package/lib/types/components/Chat/JobGroupHeader.d.ts +27 -0
  372. package/lib/types/components/Chat/JobGroupHeader.d.ts.map +1 -0
  373. package/lib/types/components/Chat/JobGroupHeader.js +62 -0
  374. package/lib/types/components/Chat/SubagentMessage.js +6 -6
  375. package/lib/types/components/GoalTodoPanel.d.ts +13 -1
  376. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  377. package/lib/types/components/GoalTodoPanel.js +55 -14
  378. package/lib/types/components/JobsPanel.d.ts +42 -2
  379. package/lib/types/components/JobsPanel.d.ts.map +1 -1
  380. package/lib/types/components/JobsPanel.js +220 -40
  381. package/lib/types/components/LogoV2.d.ts +43 -3
  382. package/lib/types/components/LogoV2.d.ts.map +1 -1
  383. package/lib/types/components/LogoV2.js +42 -15
  384. package/lib/types/components/MessageList.d.ts +8 -2
  385. package/lib/types/components/MessageList.d.ts.map +1 -1
  386. package/lib/types/components/MessageList.js +215 -21
  387. package/lib/types/components/OverlayAbove.d.ts +11 -1
  388. package/lib/types/components/OverlayAbove.d.ts.map +1 -1
  389. package/lib/types/components/OverlayAbove.js +2 -12
  390. package/lib/types/components/PageMargin.d.ts.map +1 -1
  391. package/lib/types/components/PageMargin.js +3 -1
  392. package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
  393. package/lib/types/components/PluginSceneBoundary.js +1 -1
  394. package/lib/types/components/PresetPicker.d.ts +4 -0
  395. package/lib/types/components/PresetPicker.d.ts.map +1 -1
  396. package/lib/types/components/PresetPicker.js +5 -1
  397. package/lib/types/components/PromptInput.d.ts +20 -22
  398. package/lib/types/components/PromptInput.d.ts.map +1 -1
  399. package/lib/types/components/PromptInput.js +425 -157
  400. package/lib/types/components/SearchBox.d.ts +22 -5
  401. package/lib/types/components/SearchBox.d.ts.map +1 -1
  402. package/lib/types/components/SearchBox.js +17 -13
  403. package/lib/types/components/StarPrompt.d.ts +6 -0
  404. package/lib/types/components/StarPrompt.d.ts.map +1 -1
  405. package/lib/types/components/StarPrompt.js +45 -0
  406. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  407. package/lib/types/components/SubagentCard.js +24 -9
  408. package/lib/types/components/SubagentDashboard.d.ts +18 -3
  409. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  410. package/lib/types/components/SubagentDashboard.js +53 -5
  411. package/lib/types/components/SubagentDetailScene.d.ts +7 -1
  412. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  413. package/lib/types/components/SubagentDetailScene.js +160 -13
  414. package/lib/types/components/SurfaceEdges.d.ts +21 -0
  415. package/lib/types/components/SurfaceEdges.d.ts.map +1 -0
  416. package/lib/types/components/SurfaceEdges.js +7 -0
  417. package/lib/types/components/ThemePicker.d.ts +9 -0
  418. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  419. package/lib/types/components/ThemePicker.js +74 -10
  420. package/lib/types/components/ThemePreviewPane.d.ts +26 -0
  421. package/lib/types/components/ThemePreviewPane.d.ts.map +1 -0
  422. package/lib/types/components/ThemePreviewPane.js +99 -0
  423. package/lib/types/components/WhaleGirl.d.ts +6 -0
  424. package/lib/types/components/WhaleGirl.d.ts.map +1 -1
  425. package/lib/types/components/WhaleGirl.js +18 -0
  426. package/lib/types/components/design-system/Divider.d.ts.map +1 -1
  427. package/lib/types/components/design-system/Divider.js +14 -9
  428. package/lib/types/components/launchpadActions.d.ts +73 -0
  429. package/lib/types/components/launchpadActions.d.ts.map +1 -0
  430. package/lib/types/components/launchpadActions.js +111 -0
  431. package/lib/types/components/launchpadLayout.d.ts +62 -0
  432. package/lib/types/components/launchpadLayout.d.ts.map +1 -0
  433. package/lib/types/components/launchpadLayout.js +176 -0
  434. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
  435. package/lib/types/components/onboardingModel.d.ts +83 -0
  436. package/lib/types/components/onboardingModel.d.ts.map +1 -0
  437. package/lib/types/components/onboardingModel.js +128 -0
  438. package/lib/types/components/sidePanel/InfoPanel.d.ts +17 -0
  439. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -0
  440. package/lib/types/components/sidePanel/InfoPanel.js +124 -0
  441. package/lib/types/components/sidePanel/PanelBar.d.ts +45 -0
  442. package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
  443. package/lib/types/components/sidePanel/PanelBar.js +104 -0
  444. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts +21 -0
  445. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts.map +1 -0
  446. package/lib/types/components/sidePanel/PanelErrorBoundary.js +30 -0
  447. package/lib/types/components/sidePanel/PanelHost.d.ts +36 -0
  448. package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -0
  449. package/lib/types/components/sidePanel/PanelHost.js +81 -0
  450. package/lib/types/components/sidePanel/PanelPicker.d.ts +24 -0
  451. package/lib/types/components/sidePanel/PanelPicker.d.ts.map +1 -0
  452. package/lib/types/components/sidePanel/PanelPicker.js +45 -0
  453. package/lib/types/components/sidePanel/PanelStore.d.ts +55 -0
  454. package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
  455. package/lib/types/components/sidePanel/PanelStore.js +109 -0
  456. package/lib/types/components/sidePanel/SidePanelColumn.d.ts +31 -0
  457. package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
  458. package/lib/types/components/sidePanel/SidePanelColumn.js +70 -0
  459. package/lib/types/components/sidePanel/SidePanelLayout.d.ts +54 -0
  460. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -0
  461. package/lib/types/components/sidePanel/SidePanelLayout.js +81 -0
  462. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +43 -0
  463. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -0
  464. package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +26 -0
  465. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts +7 -0
  466. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -0
  467. package/lib/types/components/sidePanel/TrajectoryPanel.js +263 -0
  468. package/lib/types/components/sidePanel/WorkspacePanel.d.ts +4 -0
  469. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -0
  470. package/lib/types/components/sidePanel/WorkspacePanel.js +171 -0
  471. package/lib/types/components/sidePanel/builtinPanels.d.ts +3 -0
  472. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -0
  473. package/lib/types/components/sidePanel/builtinPanels.js +229 -0
  474. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +53 -0
  475. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
  476. package/lib/types/components/sidePanel/companion/CompanionPanel.js +528 -0
  477. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +32 -0
  478. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -0
  479. package/lib/types/components/sidePanel/companion/SplashMascot.js +103 -0
  480. package/lib/types/components/sidePanel/companion/deepy.d.ts +75 -0
  481. package/lib/types/components/sidePanel/companion/deepy.d.ts.map +1 -0
  482. package/lib/types/components/sidePanel/companion/deepy.js +222 -0
  483. package/lib/types/components/sidePanel/companion/mood.d.ts +176 -0
  484. package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
  485. package/lib/types/components/sidePanel/companion/mood.js +212 -0
  486. package/lib/types/components/sidePanel/companion/pose.d.ts +43 -0
  487. package/lib/types/components/sidePanel/companion/pose.d.ts.map +1 -0
  488. package/lib/types/components/sidePanel/companion/pose.js +34 -0
  489. package/lib/types/components/sidePanel/companion/skins.d.ts +102 -0
  490. package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
  491. package/lib/types/components/sidePanel/companion/skins.js +408 -0
  492. package/lib/types/components/sidePanel/dimensions.d.ts +60 -0
  493. package/lib/types/components/sidePanel/dimensions.d.ts.map +1 -0
  494. package/lib/types/components/sidePanel/dimensions.js +75 -0
  495. package/lib/types/components/sidePanel/jobsFocusStore.d.ts +21 -0
  496. package/lib/types/components/sidePanel/jobsFocusStore.d.ts.map +1 -0
  497. package/lib/types/components/sidePanel/jobsFocusStore.js +30 -0
  498. package/lib/types/components/sidePanel/panelBridge.d.ts +44 -0
  499. package/lib/types/components/sidePanel/panelBridge.d.ts.map +1 -0
  500. package/lib/types/components/sidePanel/panelBridge.js +55 -0
  501. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts +22 -0
  502. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -0
  503. package/lib/types/components/sidePanel/pluginPanelAdapter.js +148 -0
  504. package/lib/types/components/sidePanel/types.d.ts +110 -0
  505. package/lib/types/components/sidePanel/types.d.ts.map +1 -0
  506. package/lib/types/components/sidePanel/types.js +1 -0
  507. package/lib/types/components/sidePanel/usePanelInput.d.ts +5 -0
  508. package/lib/types/components/sidePanel/usePanelInput.d.ts.map +1 -0
  509. package/lib/types/components/sidePanel/usePanelInput.js +44 -0
  510. package/lib/types/components/sidePanel/useSidePanel.d.ts +47 -0
  511. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -0
  512. package/lib/types/components/sidePanel/useSidePanel.js +284 -0
  513. package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
  514. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  515. package/lib/types/components/trajectory/MiniWake.js +9 -3
  516. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
  517. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  518. package/lib/types/components/workspaces/HomeWorkspaceRow.js +3 -2
  519. package/lib/types/deepseekPricing.d.ts +10 -9
  520. package/lib/types/deepseekPricing.d.ts.map +1 -1
  521. package/lib/types/deepseekPricing.js +18 -11
  522. package/lib/types/dsh-adapter/channel/attached-context.d.ts +58 -0
  523. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -0
  524. package/lib/types/dsh-adapter/channel/attached-context.js +109 -0
  525. package/lib/types/dsh-adapter/channel/binding-events.d.ts +6 -0
  526. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  527. package/lib/types/dsh-adapter/channel/binding-events.js +43 -0
  528. package/lib/types/dsh-adapter/channel/capabilities.d.ts +82 -0
  529. package/lib/types/dsh-adapter/channel/capabilities.d.ts.map +1 -0
  530. package/lib/types/dsh-adapter/channel/capabilities.js +165 -0
  531. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  532. package/lib/types/dsh-adapter/channel/command-completions.js +8 -0
  533. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +4 -12
  534. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  535. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -4
  536. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
  537. package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
  538. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +13 -2
  539. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  540. package/lib/types/dsh-adapter/channel/input-delivery.js +18 -1
  541. package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
  542. package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
  543. package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
  544. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -3
  545. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
  546. package/lib/types/dsh-adapter/channel/mode-actions.js +55 -9
  547. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +8 -1
  548. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
  549. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -10
  550. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  551. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  552. package/lib/types/dsh-adapter/channel/preferences.js +26 -8
  553. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  554. package/lib/types/dsh-adapter/channel/projection.js +42 -37
  555. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
  556. package/lib/types/dsh-adapter/channel/reports.js +13 -4
  557. package/lib/types/dsh-adapter/channel/session-reset.d.ts +5 -1
  558. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  559. package/lib/types/dsh-adapter/channel/session-reset.js +1 -0
  560. package/lib/types/dsh-adapter/channel/state.d.ts +21 -3
  561. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  562. package/lib/types/dsh-adapter/channel/state.js +3 -2
  563. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  564. package/lib/types/dsh-adapter/channel/subagent-projection.js +5 -0
  565. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  566. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  567. package/lib/types/dsh-adapter/channel/usage.d.ts +18 -1
  568. package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
  569. package/lib/types/dsh-adapter/channel/usage.js +97 -2
  570. package/lib/types/dsh-adapter/channel.d.ts +1 -1
  571. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  572. package/lib/types/dsh-adapter/channel.js +72 -4
  573. package/lib/types/dsh-adapter/context-occupancy.d.ts +204 -0
  574. package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
  575. package/lib/types/dsh-adapter/context-occupancy.js +299 -0
  576. package/lib/types/dsh-adapter/contract.d.ts +19 -4
  577. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  578. package/lib/types/dsh-adapter/contract.js +33 -3
  579. package/lib/types/dsh-adapter/index.d.ts +32 -0
  580. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  581. package/lib/types/dsh-adapter/index.js +20 -1
  582. package/lib/types/dsh-adapter/jobs.d.ts +82 -16
  583. package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
  584. package/lib/types/dsh-adapter/jobs.js +104 -9
  585. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -1
  586. package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
  587. package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
  588. package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
  589. package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
  590. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
  591. package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
  592. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
  593. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
  594. package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
  595. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
  596. package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
  597. package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
  598. package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
  599. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
  600. package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
  601. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
  602. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
  603. package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
  604. package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
  605. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
  606. package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
  607. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
  608. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
  609. package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
  610. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
  611. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
  612. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
  613. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
  614. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
  615. package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
  616. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
  617. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts +39 -0
  618. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts.map +1 -0
  619. package/lib/types/dsh-adapter/panel-runtime-registry.js +84 -0
  620. package/lib/types/dsh-adapter/panels.d.ts +251 -0
  621. package/lib/types/dsh-adapter/panels.d.ts.map +1 -0
  622. package/lib/types/dsh-adapter/panels.js +407 -0
  623. package/lib/types/dsh-adapter/plugin-host.js +1 -1
  624. package/lib/types/dsh-adapter/plugin.d.ts +25 -2
  625. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  626. package/lib/types/dsh-adapter/plugin.js +241 -44
  627. package/lib/types/dsh-adapter/presets.d.ts +26 -4
  628. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  629. package/lib/types/dsh-adapter/presets.js +29 -5
  630. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  631. package/lib/types/dsh-adapter/providerWizard.js +6 -2
  632. package/lib/types/dsh-adapter/startup-args.d.ts +8 -0
  633. package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -0
  634. package/lib/types/dsh-adapter/startup-args.js +34 -0
  635. package/lib/types/dsh-adapter/subagents.d.ts +1 -0
  636. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  637. package/lib/types/dsh-adapter/subagents.js +10 -1
  638. package/lib/types/history.d.ts +24 -7
  639. package/lib/types/history.d.ts.map +1 -1
  640. package/lib/types/history.js +77 -18
  641. package/lib/types/i18n.d.ts +908 -33
  642. package/lib/types/i18n.d.ts.map +1 -1
  643. package/lib/types/i18n.js +355 -17
  644. package/lib/types/ink/components/App.d.ts +14 -1
  645. package/lib/types/ink/components/App.d.ts.map +1 -1
  646. package/lib/types/ink/components/App.js +71 -61
  647. package/lib/types/ink/components/TerminalSizeContext.d.ts +7 -0
  648. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -1
  649. package/lib/types/ink/hooks/use-input.d.ts +11 -0
  650. package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
  651. package/lib/types/ink/hooks/use-input.js +8 -2
  652. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -1
  653. package/lib/types/ink/hooks/use-terminal-viewport.js +3 -1
  654. package/lib/types/ink/ink.d.ts +18 -0
  655. package/lib/types/ink/ink.d.ts.map +1 -1
  656. package/lib/types/ink/ink.js +51 -8
  657. package/lib/types/ink/output.d.ts +10 -1
  658. package/lib/types/ink/output.d.ts.map +1 -1
  659. package/lib/types/ink/output.js +3 -3
  660. package/lib/types/ink/parse-keypress.d.ts +71 -3
  661. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  662. package/lib/types/ink/parse-keypress.js +815 -133
  663. package/lib/types/ink/render-node-to-output.d.ts +1 -1
  664. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  665. package/lib/types/ink/render-node-to-output.js +37 -5
  666. package/lib/types/ink/screen.d.ts +26 -1
  667. package/lib/types/ink/screen.d.ts.map +1 -1
  668. package/lib/types/ink/screen.js +96 -1
  669. package/lib/types/ink/selection.d.ts +23 -1
  670. package/lib/types/ink/selection.d.ts.map +1 -1
  671. package/lib/types/ink/selection.js +102 -26
  672. package/lib/types/ink/sixel-codec.d.ts +11 -0
  673. package/lib/types/ink/sixel-codec.d.ts.map +1 -1
  674. package/lib/types/ink/sixel-codec.js +42 -8
  675. package/lib/types/ink/terminal-querier.d.ts +25 -0
  676. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  677. package/lib/types/ink/terminal-querier.js +42 -0
  678. package/lib/types/ink/update-overflow-guard.d.ts +24 -0
  679. package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
  680. package/lib/types/ink/update-overflow-guard.js +25 -3
  681. package/lib/types/math/renderer.d.ts +2 -0
  682. package/lib/types/math/renderer.d.ts.map +1 -1
  683. package/lib/types/math/renderer.js +4 -0
  684. package/lib/types/minimalUiMode.d.ts +19 -0
  685. package/lib/types/minimalUiMode.d.ts.map +1 -0
  686. package/lib/types/minimalUiMode.js +23 -0
  687. package/lib/types/oauth.d.ts +5 -10
  688. package/lib/types/oauth.d.ts.map +1 -1
  689. package/lib/types/oauth.js +5 -10
  690. package/lib/types/onboardingPrefs.d.ts +52 -0
  691. package/lib/types/onboardingPrefs.d.ts.map +1 -0
  692. package/lib/types/onboardingPrefs.js +107 -0
  693. package/lib/types/panels.d.ts +4 -0
  694. package/lib/types/panels.d.ts.map +1 -0
  695. package/lib/types/panels.js +4 -0
  696. package/lib/types/screens/Chat.d.ts +25 -1
  697. package/lib/types/screens/Chat.d.ts.map +1 -1
  698. package/lib/types/screens/Chat.js +1149 -302
  699. package/lib/types/screens/Launchpad.d.ts +194 -0
  700. package/lib/types/screens/Launchpad.d.ts.map +1 -0
  701. package/lib/types/screens/Launchpad.js +607 -0
  702. package/lib/types/screens/Onboarding.d.ts +37 -0
  703. package/lib/types/screens/Onboarding.d.ts.map +1 -0
  704. package/lib/types/screens/Onboarding.js +492 -0
  705. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  706. package/lib/types/screens/SessionSupervisor.js +18 -12
  707. package/lib/types/screens/StatusLine.d.ts +4 -0
  708. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  709. package/lib/types/screens/StatusLine.js +43 -25
  710. package/lib/types/screens/StatusMetrics.d.ts +22 -0
  711. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  712. package/lib/types/screens/StatusMetrics.js +20 -0
  713. package/lib/types/screens/chatOverlay.d.ts +18 -1
  714. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  715. package/lib/types/screens/chatOverlay.js +3 -0
  716. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -2
  717. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
  718. package/lib/types/screens/sessionSupervisor/model.js +4 -2
  719. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  720. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +7 -3
  721. package/lib/types/settings/definitions.d.ts +93 -0
  722. package/lib/types/settings/definitions.d.ts.map +1 -1
  723. package/lib/types/settings/definitions.js +87 -4
  724. package/lib/types/tips.d.ts.map +1 -1
  725. package/lib/types/tips.js +13 -7
  726. package/lib/types/tuiDisplayPrefs.d.ts +42 -2
  727. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  728. package/lib/types/tuiDisplayPrefs.js +74 -0
  729. package/lib/types/update.d.ts +53 -9
  730. package/lib/types/update.d.ts.map +1 -1
  731. package/lib/types/update.js +103 -46
  732. package/lib/types/utils/bmp.d.ts.map +1 -1
  733. package/lib/types/utils/bmp.js +8 -1
  734. package/lib/types/utils/clipboard.d.ts.map +1 -1
  735. package/lib/types/utils/clipboard.js +25 -6
  736. package/lib/types/utils/credentials.d.ts.map +1 -1
  737. package/lib/types/utils/credentials.js +5 -1
  738. package/lib/types/utils/draftWordBoundary.d.ts +23 -0
  739. package/lib/types/utils/draftWordBoundary.d.ts.map +1 -0
  740. package/lib/types/utils/draftWordBoundary.js +161 -0
  741. package/lib/types/utils/fileTarget.d.ts.map +1 -1
  742. package/lib/types/utils/fileTarget.js +7 -9
  743. package/lib/types/utils/inputPaste.d.ts +62 -0
  744. package/lib/types/utils/inputPaste.d.ts.map +1 -0
  745. package/lib/types/utils/inputPaste.js +111 -0
  746. package/lib/types/utils/intl.d.ts +8 -0
  747. package/lib/types/utils/intl.d.ts.map +1 -1
  748. package/lib/types/utils/intl.js +11 -0
  749. package/lib/types/utils/keymap.d.ts +13 -3
  750. package/lib/types/utils/keymap.d.ts.map +1 -1
  751. package/lib/types/utils/keymap.js +27 -5
  752. package/lib/types/utils/pastedImagePath.d.ts +8 -0
  753. package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
  754. package/lib/types/utils/pastedImagePath.js +29 -5
  755. package/package.json +128 -106
  756. package/presets/liangshen/agent.cordis.yml +4 -1
  757. package/presets/liangshen/preset.yml +1 -1
  758. package/{dsh-ecosystem-spec → tui-profile}/registry/README.md +1 -1
  759. package/{dsh-ecosystem-spec → tui-profile}/registry/registry-0.15.json +1 -1
  760. package/lib/types/minimalMode.d.ts +0 -13
  761. package/lib/types/minimalMode.d.ts.map +0 -1
  762. package/lib/types/minimalMode.js +0 -17
  763. package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
  764. package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
  765. package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
  766. package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
  767. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
  768. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
  769. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.d.ts +0 -0
  770. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.js +0 -0
  771. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.d.ts +0 -0
  772. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.js +0 -0
  773. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.d.ts +0 -0
  774. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.js +0 -0
  775. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.d.ts +0 -0
  776. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.js +0 -0
  777. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/decision-events-v1alpha1.json +0 -0
  778. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/scene-v1alpha1.json +0 -0
  779. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/settings-section-v1alpha1.json +0 -0
  780. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/tui-channel-v1alpha1.json +0 -0
  781. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/workspace-provider-v1alpha1.json +0 -0
  782. /package/{dsh-ecosystem-spec → tui-profile}/registry/host-descriptor.tui.example.json +0 -0
  783. /package/{dsh-ecosystem-spec → tui-profile}/registry/permissions-0.1.json +0 -0
  784. /package/{dsh-ecosystem-spec → tui-profile}/schemas/conformance-claim.schema.json +0 -0
  785. /package/{dsh-ecosystem-spec → tui-profile}/schemas/effect-ledger-record.schema.json +0 -0
  786. /package/{dsh-ecosystem-spec → tui-profile}/schemas/host-descriptor.schema.json +0 -0
@@ -1,7 +1,7 @@
1
1
  import type { DOMElement } from './dom.js';
2
2
  import type { Rectangle } from './layout/geometry.js';
3
3
  import type Output from './output.js';
4
- import type { Screen } from './screen.js';
4
+ import { type Screen } from './screen.js';
5
5
  import { type StyledSegment } from './squash-text-nodes.js';
6
6
  import type { Color } from './styles.js';
7
7
  /** Reset the per-frame layout-shift flag. */
@@ -1 +1 @@
1
- {"version":3,"file":"render-node-to-output.d.ts","sourceRoot":"","sources":["../../../src/ink/render-node-to-output.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAIrD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAErC,OAAO,K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;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,cAAc,EAAE,CAIzD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,EAAE,CAIpD;AAoFD;;;;;GAKG;AACH,iBAAS,qBAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE,CASlE;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,wBAAwB,CAC/B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,aAAa,EAAE,EACzB,aAAa,EAAE,MAAM,EAAE,EACvB,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,OAAe,GAC3B,MAAM,CA0GR;AA+DD;;;;;;;;;GASG;AACH,iBAAS,kBAAkB,CACzB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAM9B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,wBAAwB,CAAC,EAAE,KAAK,CAAA;CACjC,GACA,IAAI,CA4tCN;AA2OD,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAA;AAE1D,eAAe,kBAAkB,CAAA"}
@@ -5,6 +5,7 @@ import getMaxWidth from './get-max-width.js';
5
5
  import { LayoutDisplay, LayoutEdge } from './layout/node.js';
6
6
  import { nodeCache, pendingClears, textPaintCache } from './node-cache.js';
7
7
  import renderBorder from './render-border.js';
8
+ import { countPaintedFlankColumns } from './screen.js';
8
9
  import { squashTextNodesToSegments, } from './squash-text-nodes.js';
9
10
  import { isXtermJs } from './terminal.js';
10
11
  import { terminalImageSourceFromAttributes } from './terminal-image.js';
@@ -35,6 +36,14 @@ export function resetLayoutShifted() {
35
36
  export function didLayoutShift() {
36
37
  return layoutShifted;
37
38
  }
39
+ /**
40
+ * How many painted columns may live outside a scroll container's x-range
41
+ * (within the shifted rows) before the DECSTBM fast path is rejected in
42
+ * favor of the box-clipped full path: the hardware scroll displaces those
43
+ * columns and the diff must write every displaced cell back. Blank margins
44
+ * and the 1-2 column gutter rail qualify; a sibling split column does not.
45
+ */
46
+ const DECSTBM_MAX_FLANK_COLUMNS = 4;
38
47
  let scrollHint = null;
39
48
  // Rects of position:absolute nodes from the PREVIOUS frame, used by
40
49
  // ScrollBox's blit+shift third-pass repair (see usage site). Recorded at
@@ -673,7 +682,7 @@ function renderNodeToOutput(node, output, options) {
673
682
  // The sibling-overlap check is load-bearing: Yoga's pixel-grid rounding
674
683
  // can give a box h=0 while still leaving a row for it (next sibling at
675
684
  // y+1, not y). HelpV2's third shortcuts column hits this — skipping
676
- // unconditionally drops "ctrl + z to suspend" from /help output.
685
+ // unconditionally drops its last row from /help output.
677
686
  if (height === 0 && siblingSharesY(node, yogaNode)) {
678
687
  nodeCache.set(node, { x, y, width, height, top: yogaTop, opaque: paintsOwnRect(node) });
679
688
  node.dirty = false;
@@ -1210,14 +1219,35 @@ function renderNodeToOutput(node, output, options) {
1210
1219
  const delta = contentCached.y - contentY;
1211
1220
  const regionTop = Math.floor(y + contentYoga.getComputedTop());
1212
1221
  const regionBottom = regionTop + innerHeight - 1;
1213
- if (cached?.y === y &&
1222
+ // DECSTBM + SU/SD scroll WHOLE terminal rows — ANSI has no
1223
+ // column-scoped hardware scroll — while this fast path's edge
1224
+ // repaint covers only the box's own x-range. The model-side
1225
+ // shift below is therefore COLUMN-SCOPED to the box: the flanks
1226
+ // keep their correct cells in next.screen, log-update simulates
1227
+ // the hardware scroll on the previous frame full-width, and the
1228
+ // shift op's full-width damage makes the frame diff compare the
1229
+ // flank cells and write them back to the terminal. (Before that
1230
+ // scoping the model shift was full-width too, so prev and next
1231
+ // agreed on the displaced flanks, nothing repaired them, and the
1232
+ // damage stuck — the reported "scrolling the agents panel breaks
1233
+ // the divider seam and the chat column".) The flank repair costs
1234
+ // O(painted flank cells), so the hardware path is only worth it
1235
+ // while the flanks are near-empty (blank page margins, the 1-2
1236
+ // column gutter rail); a wide painted flank (a sibling column
1237
+ // while split) takes the full path below, which repaints the box
1238
+ // clipped to its own bounds.
1239
+ const flankColumns = prevScreen
1240
+ ? countPaintedFlankColumns(prevScreen, regionTop, regionBottom, Math.floor(x), Math.floor(x) + Math.floor(width))
1241
+ : Number.MAX_SAFE_INTEGER;
1242
+ const inBoxScroll = cached?.y === y &&
1214
1243
  cached.height === height &&
1215
1244
  innerHeight > 0 &&
1216
- Math.abs(delta) < innerHeight) {
1245
+ Math.abs(delta) < innerHeight;
1246
+ if (inBoxScroll && flankColumns <= DECSTBM_MAX_FLANK_COLUMNS) {
1217
1247
  hint = { top: regionTop, bottom: regionBottom, delta };
1218
1248
  scrollHint = hint;
1219
1249
  }
1220
- else {
1250
+ else if (!inBoxScroll) {
1221
1251
  layoutShifted = true;
1222
1252
  }
1223
1253
  }
@@ -1270,7 +1300,9 @@ function renderNodeToOutput(node, output, options) {
1270
1300
  const { top, bottom, delta } = hint;
1271
1301
  const w = Math.floor(width);
1272
1302
  output.blit(prevScreen, Math.floor(x), top, w, bottom - top + 1);
1273
- output.shift(top, bottom, delta);
1303
+ // Column-scoped: see the gate comment above. The terminal still
1304
+ // scrolls whole rows; the diff repairs the flanks.
1305
+ output.shift(top, bottom, delta, Math.floor(x), w);
1274
1306
  // Edge rows: new content entering the viewport.
1275
1307
  const edgeTop = delta > 0 ? bottom - delta + 1 : top;
1276
1308
  const edgeBottom = delta > 0 ? bottom : top - delta - 1;
@@ -465,18 +465,43 @@ export declare function blitRegion(dst: Screen, src: Screen, regionX: number, re
465
465
  * @param regionHeight - the region height in rows.
466
466
  */
467
467
  export declare function clearRegion(screen: Screen, regionX: number, regionY: number, regionWidth: number, regionHeight: number): void;
468
+ /**
469
+ * Count the DISTINCT columns outside [x1, x2) that hold any non-empty cell
470
+ * in rows [top, bottom] — the "flank" a full-width row shift would displace.
471
+ * The DECSTBM scroll fast path uses this to decide whether the hardware
472
+ * scroll is worth the diff repair it forces on those columns (blank page
473
+ * margins and the 1-2 column gutter rail are cheap; a whole sibling column
474
+ * is not). Short-circuits per column on the first painted cell.
475
+ * @param screen - the screen to inspect.
476
+ * @param top - the first row (inclusive).
477
+ * @param bottom - the last row (inclusive).
478
+ * @param x1 - the start (inclusive) of the excluded column range.
479
+ * @param x2 - the end (exclusive) of the excluded column range.
480
+ */
481
+ export declare function countPaintedFlankColumns(screen: Screen, top: number, bottom: number, x1: number, x2: number): number;
468
482
  /**
469
483
  * Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n.
470
484
  * n > 0 shifts UP (simulating CSI n S); n < 0 shifts DOWN (CSI n T).
471
485
  * Vacated rows are cleared. Does NOT update damage. Both cells and the
472
486
  * noSelect bitmap are shifted so text-selection markers stay aligned when
473
487
  * this is applied to next.screen during scroll fast path.
488
+ *
489
+ * With columnX/columnWidth the shift applies only to that column slice of
490
+ * each row (the DECSTBM fast path for a scroll container narrower than the
491
+ * screen: the terminal's hardware scroll moves WHOLE rows, so the previous
492
+ * frame is simulated full-width by the caller, while this model-side shift
493
+ * keeps the columns outside the box at their correct places — the frame
494
+ * diff then repairs them on the terminal). A column-scoped shift leaves the
495
+ * per-row softWrap flags alone: they describe the whole row and the flanks'
496
+ * wrap state is still live.
474
497
  * @param screen - the screen to shift.
475
498
  * @param top - the first row of the shifted range (inclusive).
476
499
  * @param bottom - the last row of the shifted range (inclusive).
477
500
  * @param n - the shift in rows; positive shifts up, negative shifts down.
501
+ * @param columnX - optional start column (inclusive) of a column-scoped shift.
502
+ * @param columnWidth - optional width of the column-scoped slice.
478
503
  */
479
- export declare function shiftRows(screen: Screen, top: number, bottom: number, n: number): void;
504
+ export declare function shiftRows(screen: Screen, top: number, bottom: number, n: number, columnX?: number, columnWidth?: number): void;
480
505
  /**
481
506
  * The OSC 8 hyperlink escape prefix (`ESC ] 8 ;`) used for cheap pre-checks
482
507
  * before running the full OSC 8 regex.
@@ -1 +1 @@
1
- {"version":3,"file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AEnB;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,YAAY,GACf,OAAO,CA8CT;AAqQD;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,IAAI,CAUN;AAED,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAI/F;AAED,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAWnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CASN;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CAyBN"}
@@ -1231,21 +1231,116 @@ export function clearRegion(screen, regionX, regionY, regionWidth, regionHeight)
1231
1231
  screen.damage = regionRect;
1232
1232
  }
1233
1233
  }
1234
+ /**
1235
+ * Count the DISTINCT columns outside [x1, x2) that hold any non-empty cell
1236
+ * in rows [top, bottom] — the "flank" a full-width row shift would displace.
1237
+ * The DECSTBM scroll fast path uses this to decide whether the hardware
1238
+ * scroll is worth the diff repair it forces on those columns (blank page
1239
+ * margins and the 1-2 column gutter rail are cheap; a whole sibling column
1240
+ * is not). Short-circuits per column on the first painted cell.
1241
+ * @param screen - the screen to inspect.
1242
+ * @param top - the first row (inclusive).
1243
+ * @param bottom - the last row (inclusive).
1244
+ * @param x1 - the start (inclusive) of the excluded column range.
1245
+ * @param x2 - the end (exclusive) of the excluded column range.
1246
+ */
1247
+ export function countPaintedFlankColumns(screen, top, bottom, x1, x2) {
1248
+ const y1 = Math.max(0, top);
1249
+ const y2 = Math.min(screen.height - 1, bottom);
1250
+ if (y2 < y1)
1251
+ return 0;
1252
+ const left = Math.max(0, x1);
1253
+ const right = Math.min(screen.width, x2);
1254
+ let count = 0;
1255
+ for (let x = 0; x < left; x += 1) {
1256
+ for (let y = y1; y <= y2; y += 1) {
1257
+ if (!isEmptyCellAt(screen, x, y)) {
1258
+ count += 1;
1259
+ break;
1260
+ }
1261
+ }
1262
+ }
1263
+ for (let x = right; x < screen.width; x += 1) {
1264
+ for (let y = y1; y <= y2; y += 1) {
1265
+ if (!isEmptyCellAt(screen, x, y)) {
1266
+ count += 1;
1267
+ break;
1268
+ }
1269
+ }
1270
+ }
1271
+ return count;
1272
+ }
1234
1273
  /**
1235
1274
  * Shift full-width rows within [top, bottom] (inclusive, 0-indexed) by n.
1236
1275
  * n > 0 shifts UP (simulating CSI n S); n < 0 shifts DOWN (CSI n T).
1237
1276
  * Vacated rows are cleared. Does NOT update damage. Both cells and the
1238
1277
  * noSelect bitmap are shifted so text-selection markers stay aligned when
1239
1278
  * this is applied to next.screen during scroll fast path.
1279
+ *
1280
+ * With columnX/columnWidth the shift applies only to that column slice of
1281
+ * each row (the DECSTBM fast path for a scroll container narrower than the
1282
+ * screen: the terminal's hardware scroll moves WHOLE rows, so the previous
1283
+ * frame is simulated full-width by the caller, while this model-side shift
1284
+ * keeps the columns outside the box at their correct places — the frame
1285
+ * diff then repairs them on the terminal). A column-scoped shift leaves the
1286
+ * per-row softWrap flags alone: they describe the whole row and the flanks'
1287
+ * wrap state is still live.
1240
1288
  * @param screen - the screen to shift.
1241
1289
  * @param top - the first row of the shifted range (inclusive).
1242
1290
  * @param bottom - the last row of the shifted range (inclusive).
1243
1291
  * @param n - the shift in rows; positive shifts up, negative shifts down.
1292
+ * @param columnX - optional start column (inclusive) of a column-scoped shift.
1293
+ * @param columnWidth - optional width of the column-scoped slice.
1244
1294
  */
1245
- export function shiftRows(screen, top, bottom, n) {
1295
+ export function shiftRows(screen, top, bottom, n, columnX, columnWidth) {
1246
1296
  if (n === 0 || top < 0 || bottom >= screen.height || top > bottom)
1247
1297
  return;
1248
1298
  const w = screen.width;
1299
+ if (columnX !== undefined || columnWidth !== undefined) {
1300
+ const x1 = Math.max(0, Math.floor(columnX ?? 0));
1301
+ const x2 = Math.min(w, x1 + Math.floor(columnWidth ?? w));
1302
+ if (x2 <= x1)
1303
+ return;
1304
+ const cells64 = screen.cells64;
1305
+ const noSel = screen.noSelect;
1306
+ const copy = screen.copyRegion;
1307
+ const span = x2 - x1;
1308
+ const absN = Math.abs(n);
1309
+ const clearSlice = (r) => {
1310
+ const base = r * w + x1;
1311
+ cells64.fill(EMPTY_CELL_VALUE, base, base + span);
1312
+ noSel.fill(0, base, base + span);
1313
+ copy?.fill(0, base, base + span);
1314
+ };
1315
+ if (absN > bottom - top) {
1316
+ for (let r = top; r <= bottom; r += 1)
1317
+ clearSlice(r);
1318
+ return;
1319
+ }
1320
+ if (n > 0) {
1321
+ for (let r = top; r <= bottom - n; r += 1) {
1322
+ const dst = r * w + x1;
1323
+ const src = (r + n) * w + x1;
1324
+ cells64.copyWithin(dst, src, src + span);
1325
+ noSel.copyWithin(dst, src, src + span);
1326
+ copy?.copyWithin(dst, src, src + span);
1327
+ }
1328
+ for (let r = bottom - n + 1; r <= bottom; r += 1)
1329
+ clearSlice(r);
1330
+ }
1331
+ else {
1332
+ for (let r = bottom; r >= top - n; r -= 1) {
1333
+ const dst = r * w + x1;
1334
+ const src = (r + n) * w + x1;
1335
+ cells64.copyWithin(dst, src, src + span);
1336
+ noSel.copyWithin(dst, src, src + span);
1337
+ copy?.copyWithin(dst, src, src + span);
1338
+ }
1339
+ for (let r = top; r < top - n; r += 1)
1340
+ clearSlice(r);
1341
+ }
1342
+ return;
1343
+ }
1249
1344
  const cells64 = screen.cells64;
1250
1345
  const noSel = screen.noSelect;
1251
1346
  const copy = screen.copyRegion;
@@ -129,6 +129,24 @@ export type SelectionState = {
129
129
  * Commit-time copy (copySelectionNoClear) refuses and clears instead
130
130
  * of shipping the replaced text. Cleared on start/clear. */
131
131
  stale: boolean;
132
+ /** Direction-aware noSelect fence. True when THIS gesture anchored on a
133
+ * noSelect cell (e.g. a drag that starts inside the side-panel column):
134
+ * for that gesture only, noSelect cells participate in the highlight,
135
+ * word bounds, and copy text — panel text becomes selectable/copyable.
136
+ * Gestures anchored anywhere else keep the exclusion verbatim, so a
137
+ * chat-origin drag still never captures panel glyphs (design doc §4.6).
138
+ * Set once per gesture by startSelection from the anchor cell's bit;
139
+ * reset by clearSelection. */
140
+ includeNoSelectCells: boolean;
141
+ /** The column run of noSelect cells containing the anchor (same gesture
142
+ * class as includeNoSelectCells): the selection rectangle is clamped to
143
+ * it, so a panel-origin drag that moves vertically selects only the
144
+ * panel's columns on every covered row — the chat column on intermediate
145
+ * rows is never captured. Undefined for gestures without the fence. */
146
+ fence?: {
147
+ colStart: number;
148
+ colEnd: number;
149
+ };
132
150
  };
133
151
  /**
134
152
  * Create a new selection state with no active selection.
@@ -142,8 +160,12 @@ export declare function createSelectionState(): SelectionState;
142
160
  * @param s - the selection state to mutate.
143
161
  * @param col - anchor column in screen-buffer coordinates.
144
162
  * @param row - anchor row in screen-buffer coordinates.
163
+ * @param screen - the current frame's screen, when the caller has it: the
164
+ * anchor cell's noSelect bit seeds includeNoSelectCells (the direction
165
+ * fence — see SelectionState). Omitted by tests that drive the state
166
+ * directly against a hand-built screen; the flag then stays false.
145
167
  */
146
- export declare function startSelection(s: SelectionState, col: number, row: number): void;
168
+ export declare function startSelection(s: SelectionState, col: number, row: number, screen?: Screen): void;
147
169
  /**
148
170
  * Track the drag position: update focus to (col, row). No-op while not
149
171
  * dragging, and the first motion at the anchor cell is ignored so a bare
@@ -1 +1 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/ink/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAGjE,KAAK,KAAK,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;+CAE2C;IAC3C,QAAQ,CAAC,EAAE,EAAE,OAAO,CAAA;IACpB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;CAC7C,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6DAA6D;IAC7D,MAAM,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,oEAAoE;IACpE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAA;IACnB;;;;4EAIwE;IACxE,UAAU,EAAE;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,EAAE,EAAE,KAAK,C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EAAE,cAAc,EACjB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,OAAO,CAQT;AA2HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,2BAA2B,CACzC,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,OAAO,GACnB,OAAO,CAkIT;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CA+BzE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,cAAc,EACjB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,GAAG,OAAO,EACvB,eAAe,SAAI,GAClB,IAAI,CAoDN;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,SAAS,EACpB,MAAM,GAAE,SAAS,sBAAsB,EAAO,GAC7C,IAAI,CAkCN"}
@@ -28,6 +28,7 @@ export function createSelectionState() {
28
28
  coveredText: null,
29
29
  coveredGeometry: null,
30
30
  stale: false,
31
+ includeNoSelectCells: false,
31
32
  };
32
33
  }
33
34
  /**
@@ -37,9 +38,41 @@ export function createSelectionState() {
37
38
  * @param s - the selection state to mutate.
38
39
  * @param col - anchor column in screen-buffer coordinates.
39
40
  * @param row - anchor row in screen-buffer coordinates.
41
+ * @param screen - the current frame's screen, when the caller has it: the
42
+ * anchor cell's noSelect bit seeds includeNoSelectCells (the direction
43
+ * fence — see SelectionState). Omitted by tests that drive the state
44
+ * directly against a hand-built screen; the flag then stays false.
40
45
  */
41
- export function startSelection(s, col, row) {
46
+ export function startSelection(s, col, row, screen) {
42
47
  s.anchor = { col, row };
48
+ // Direction fence: anchoring ON a noSelect cell means this gesture is
49
+ // selecting inside an excluded region (the side-panel column) — its cells
50
+ // must participate for the drag to highlight/copy anything at all.
51
+ // Anchoring elsewhere keeps the exclusion (§4.6: a chat-origin drag never
52
+ // captures panel glyphs).
53
+ s.includeNoSelectCells =
54
+ screen !== undefined &&
55
+ row >= 0 &&
56
+ row < screen.height &&
57
+ col >= 0 &&
58
+ col < screen.width &&
59
+ screen.noSelect[row * screen.width + col] === 1;
60
+ // Column fence: the contiguous noSelect run around the anchor. Clamps the
61
+ // selection rectangle (see selectionBounds) so a vertical panel drag never
62
+ // captures the chat column on intermediate rows.
63
+ if (s.includeNoSelectCells && screen !== undefined) {
64
+ const rowOff = row * screen.width;
65
+ let colStart = col;
66
+ while (colStart > 0 && screen.noSelect[rowOff + colStart - 1] === 1)
67
+ colStart -= 1;
68
+ let colEnd = col;
69
+ while (colEnd + 1 < screen.width && screen.noSelect[rowOff + colEnd + 1] === 1)
70
+ colEnd += 1;
71
+ s.fence = { colStart, colEnd };
72
+ }
73
+ else {
74
+ s.fence = undefined;
75
+ }
43
76
  // Focus is not set until the first drag motion. A click-release with no
44
77
  // drag leaves focus null → hasSelection/selectionBounds return false/null
45
78
  // via the `!s.focus` check, so a bare click never highlights a cell.
@@ -126,6 +159,8 @@ export function clearSelection(s) {
126
159
  s.coveredText = null;
127
160
  s.coveredGeometry = null;
128
161
  s.stale = false;
162
+ s.includeNoSelectCells = false;
163
+ s.fence = undefined;
129
164
  }
130
165
  // Unicode-aware word character matcher: letters (any script), digits,
131
166
  // and the punctuation set iTerm2 treats as word-part by default.
@@ -153,7 +188,7 @@ function charClass(c) {
153
188
  * null if the click is out of bounds or lands on a noSelect cell. Used by
154
189
  * selectWordAt (initial double-click) and extendWordSelection (drag).
155
190
  */
156
- function wordBoundsAt(screen, col, row) {
191
+ function wordBoundsAt(screen, col, row, includeNoSelect = false) {
157
192
  if (row < 0 || row >= screen.height)
158
193
  return null;
159
194
  const width = screen.width;
@@ -167,7 +202,7 @@ function wordBoundsAt(screen, col, row) {
167
202
  if (cell && cell.width === 2 /* CellWidth.SpacerTail */)
168
203
  c -= 1;
169
204
  }
170
- if (c < 0 || c >= width || noSelect[rowOff + c] === 1)
205
+ if (c < 0 || c >= width || (!includeNoSelect && noSelect[rowOff + c] === 1))
171
206
  return null;
172
207
  const startCell = cellAt(screen, c, row);
173
208
  if (!startCell)
@@ -179,14 +214,14 @@ function wordBoundsAt(screen, col, row) {
179
214
  let lo = c;
180
215
  while (lo > 0) {
181
216
  const prev = lo - 1;
182
- if (noSelect[rowOff + prev] === 1)
217
+ if (!includeNoSelect && noSelect[rowOff + prev] === 1)
183
218
  break;
184
219
  const pc = cellAt(screen, prev, row);
185
220
  if (!pc)
186
221
  break;
187
222
  if (pc.width === 2 /* CellWidth.SpacerTail */) {
188
223
  // Step over the spacer to the wide-char head
189
- if (prev === 0 || noSelect[rowOff + prev - 1] === 1)
224
+ if (prev === 0 || (!includeNoSelect && noSelect[rowOff + prev - 1] === 1))
190
225
  break;
191
226
  const head = cellAt(screen, prev - 1, row);
192
227
  if (!head || charClass(head.char) !== cls)
@@ -202,7 +237,7 @@ function wordBoundsAt(screen, col, row) {
202
237
  let hi = c;
203
238
  while (hi < width - 1) {
204
239
  const next = hi + 1;
205
- if (noSelect[rowOff + next] === 1)
240
+ if (!includeNoSelect && noSelect[rowOff + next] === 1)
206
241
  break;
207
242
  const nc = cellAt(screen, next, row);
208
243
  if (!nc)
@@ -239,7 +274,7 @@ function comparePoints(a, b) {
239
274
  * @param row - click row.
240
275
  */
241
276
  export function selectWordAt(s, screen, col, row) {
242
- const b = wordBoundsAt(screen, col, row);
277
+ const b = wordBoundsAt(screen, col, row, s.includeNoSelectCells);
243
278
  if (!b)
244
279
  return;
245
280
  const lo = { col: b.lo, row };
@@ -401,7 +436,7 @@ export function extendSelection(s, screen, col, row) {
401
436
  let mLo;
402
437
  let mHi;
403
438
  if (span.kind === 'word') {
404
- const b = wordBoundsAt(screen, col, row);
439
+ const b = wordBoundsAt(screen, col, row, s.includeNoSelectCells);
405
440
  mLo = { col: b ? b.lo : col, row };
406
441
  mHi = { col: b ? b.hi : col, row };
407
442
  }
@@ -902,9 +937,20 @@ export function hasSelection(s) {
902
937
  export function selectionBounds(s) {
903
938
  if (!s.anchor || !s.focus)
904
939
  return null;
905
- return comparePoints(s.anchor, s.focus) <= 0
906
- ? { start: s.anchor, end: s.focus }
907
- : { start: s.focus, end: s.anchor };
940
+ const start = comparePoints(s.anchor, s.focus) <= 0 ? s.anchor : s.focus;
941
+ const end = comparePoints(s.anchor, s.focus) <= 0 ? s.focus : s.anchor;
942
+ // Fence clamp (panel-origin gestures): restrict the rectangle to the
943
+ // anchor's noSelect column run on EVERY row — a vertical drag inside the
944
+ // side panel selects only panel columns, never the chat column that
945
+ // shares the intermediate rows.
946
+ if (s.fence !== undefined) {
947
+ const colStart = Math.max(start.col, s.fence.colStart);
948
+ const colEnd = Math.min(end.col, s.fence.colEnd);
949
+ if (colStart > colEnd)
950
+ return null;
951
+ return { start: { col: colStart, row: start.row }, end: { col: colEnd, row: end.row } };
952
+ }
953
+ return { start, end };
908
954
  }
909
955
  /**
910
956
  * Check if a cell at (col, row) is within the current selection range.
@@ -932,7 +978,7 @@ export function isCellSelected(s, col, row) {
932
978
  * clamp to that content-end column and skip the trailing trim so the
933
979
  * word-separator space survives the join. See Screen.softWrap for why the
934
980
  * clamp is necessary. */
935
- function extractRowText(screen, row, colStart, colEnd) {
981
+ function extractRowText(screen, row, colStart, colEnd, includeNoSelect = false) {
936
982
  const noSelect = screen.noSelect;
937
983
  const copyRegion = screen.copyRegion;
938
984
  const rowOff = row * screen.width;
@@ -942,9 +988,11 @@ function extractRowText(screen, row, colStart, colEnd) {
942
988
  const regions = [];
943
989
  let lastRegion = 0;
944
990
  for (let col = colStart; col <= lastCol; col++) {
945
- // Skip cells marked noSelect (gutters, line numbers, diff sigils).
946
- // Check before cellAt to avoid the decode cost for excluded cells.
947
- if (noSelect[rowOff + col] === 1)
991
+ // Skip cells marked noSelect (gutters, line numbers, diff sigils) unless
992
+ // this gesture anchored inside a noSelect region (the direction fence:
993
+ // a panel-origin drag selects panel text). Check before cellAt to avoid
994
+ // the decode cost for excluded cells.
995
+ if (!includeNoSelect && noSelect[rowOff + col] === 1)
948
996
  continue;
949
997
  // A copy region (a formula image) contributes one entry per run of its
950
998
  // cells: the text it stands for, at the offset those cells occupy here.
@@ -1126,15 +1174,25 @@ export function refreshSelectionFingerprint(s, screen, coordinated) {
1126
1174
  // covered row OUTSIDE the selected column range (stable head selected,
1127
1175
  // live tail still writing) must not latch stale — the copy would not
1128
1176
  // read those columns anyway.
1129
- const colStart = row === b.start.row ? b.start.col : 0;
1130
- const colEnd = row === b.end.row ? b.end.col : width - 1;
1177
+ let colStart = row === b.start.row ? b.start.col : 0;
1178
+ let colEnd = row === b.end.row ? b.end.col : width - 1;
1179
+ // Mirrors getSelectedText's fence intersection (same flag, same rows):
1180
+ // the hash must cover exactly the cells the copy would read.
1181
+ if (s.fence !== undefined) {
1182
+ colStart = Math.max(colStart, s.fence.colStart);
1183
+ colEnd = Math.min(colEnd, s.fence.colEnd);
1184
+ if (colStart > colEnd)
1185
+ continue;
1186
+ }
1131
1187
  for (let col = colStart; col <= colEnd; col++) {
1132
1188
  const ci = (rowOff + col) * 2;
1133
1189
  // word1's low 2 bits are the cell width; SpacerTail/SpacerHead carry
1134
1190
  // no text of their own.
1135
1191
  if ((cells[ci + 1] & 3) >= 2 /* CellWidth.SpacerTail */)
1136
1192
  continue;
1137
- if (noSelect[rowOff + col] === 1)
1193
+ // Mirrors extractRowText's noSelect skip (same fence flag): the hash
1194
+ // must cover exactly the cells the copy would read.
1195
+ if (noSelect[rowOff + col] === 1 && !s.includeNoSelectCells)
1138
1196
  continue;
1139
1197
  // A copy region (a formula image) is content too: its cells are blank,
1140
1198
  // so without this term a formula swapped under a stationary highlight
@@ -1246,9 +1304,17 @@ export function getSelectedText(s, screen) {
1246
1304
  rows.push(s.scrolledOffAbove[i]);
1247
1305
  }
1248
1306
  for (let row = start.row; row <= end.row; row++) {
1249
- const rowStart = row === start.row ? start.col : 0;
1250
- const rowEnd = row === end.row ? end.col : screen.width - 1;
1251
- rows.push(extractRowText(screen, row, rowStart, rowEnd));
1307
+ let rowStart = row === start.row ? start.col : 0;
1308
+ let rowEnd = row === end.row ? end.col : screen.width - 1;
1309
+ // Fence (panel-origin gestures) applies to EVERY row, not just the
1310
+ // endpoints: intermediate rows must not span into the chat column.
1311
+ if (s.fence !== undefined) {
1312
+ rowStart = Math.max(rowStart, s.fence.colStart);
1313
+ rowEnd = Math.min(rowEnd, s.fence.colEnd);
1314
+ if (rowStart > rowEnd)
1315
+ continue;
1316
+ }
1317
+ rows.push(extractRowText(screen, row, rowStart, rowEnd, s.includeNoSelectCells));
1252
1318
  }
1253
1319
  for (let i = 0; i < s.scrolledOffBelow.length; i++) {
1254
1320
  rows.push(s.scrolledOffBelow[i]);
@@ -1295,7 +1361,7 @@ export function captureScrolledRows(s, screen, firstRow, lastRow, side, screenRo
1295
1361
  const colStart = row === start.row ? start.col : 0;
1296
1362
  const colEnd = row === end.row ? end.col : width - 1;
1297
1363
  const screenRow = row - screenRowOffset;
1298
- captured.push(extractRowText(screen, screenRow, colStart, colEnd));
1364
+ captured.push(extractRowText(screen, screenRow, colStart, colEnd, s.includeNoSelectCells));
1299
1365
  }
1300
1366
  if (side === 'above') {
1301
1367
  // Newest rows go at the bottom of the above-accumulator (closest to
@@ -1360,15 +1426,25 @@ export function applySelectionOverlay(screen, selection, stylePool, images = [])
1360
1426
  const noSelect = screen.noSelect;
1361
1427
  const covered = imageCoveredCells(images, width, screen.height);
1362
1428
  for (let row = start.row; row <= end.row && row < screen.height; row++) {
1363
- const colStart = row === start.row ? start.col : 0;
1364
- const colEnd = row === end.row ? Math.min(end.col, width - 1) : width - 1;
1429
+ let colStart = row === start.row ? start.col : 0;
1430
+ let colEnd = row === end.row ? Math.min(end.col, width - 1) : width - 1;
1431
+ // Fence (panel-origin gestures) clips every row to the anchor's noSelect
1432
+ // column run — intermediate rows never highlight the chat column.
1433
+ if (selection.fence !== undefined) {
1434
+ colStart = Math.max(colStart, selection.fence.colStart);
1435
+ colEnd = Math.min(colEnd, selection.fence.colEnd);
1436
+ if (colStart > colEnd)
1437
+ continue;
1438
+ }
1365
1439
  const rowOff = row * width;
1366
1440
  for (let col = colStart; col <= colEnd; col++) {
1367
1441
  const idx = rowOff + col;
1368
1442
  // Skip noSelect cells — gutters stay visually unchanged so it's
1369
1443
  // clear they're not part of the copy. Surrounding selectable cells
1370
- // still highlight so the selection extent remains visible.
1371
- if (noSelect[idx] === 1)
1444
+ // still highlight so the selection extent remains visible. A gesture
1445
+ // that ANCHORED on a noSelect cell (the direction fence) inverts this:
1446
+ // those cells are the selection's subject, so they must highlight.
1447
+ if (noSelect[idx] === 1 && !selection.includeNoSelectCells)
1372
1448
  continue;
1373
1449
  // Skip cells a terminal image is painted over: Kitty draws images
1374
1450
  // below cells with a non-default background, so a highlighted cell
@@ -1,4 +1,15 @@
1
1
  import type { TerminalImageSource } from './terminal-image.js';
2
+ /**
3
+ * Paint decision for one transparent-raster pixel: 0.25·255 = 63.75 keeps the
4
+ * historical "below 25% never paints" bias, 160 (= 62.5%·255 + 1) makes
5
+ * everything above the band solid (≥75% always paints by contract), and the
6
+ * band between resolves by position so constant mid coverage alternates in a
7
+ * checkerboard. Exported for the mask regression (gradient/const fills).
8
+ */
9
+ export declare function sixelCoveragePaints(alpha: number, x: number, y: number): boolean;
10
+ /** The pre-dither decision (single 25% threshold), kept for the mask
11
+ * regression's before/after comparison. */
12
+ export declare function sixelCoveragePaintsThreshold(alpha: number): boolean;
2
13
  export interface SixelCrop {
3
14
  readonly left: number;
4
15
  readonly top: number;