@deepseek-harness-tui/dsh-tui 0.12.0 → 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 (692) hide show
  1. package/README.md +41 -5
  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 +8 -3
  276. package/cordis.patch.yml +7 -1
  277. package/guide/dsh-tui-guide/configuration.en.md +6 -1
  278. package/guide/dsh-tui-guide/configuration.md +6 -1
  279. package/guide/dsh-tui-guide/getting-started.en.md +6 -3
  280. package/guide/dsh-tui-guide/getting-started.md +4 -2
  281. package/guide/dsh-tui-guide/interaction.en.md +68 -4
  282. package/guide/dsh-tui-guide/interaction.md +49 -3
  283. package/guide/dsh-tui-guide/plugins.en.md +16 -6
  284. package/guide/dsh-tui-guide/plugins.md +14 -6
  285. package/guide/dsh-tui-guide/themes.en.md +7 -2
  286. package/guide/dsh-tui-guide/themes.md +5 -2
  287. package/guide/dsh-tui-guide/user-guide.en.md +124 -21
  288. package/guide/dsh-tui-guide/user-guide.md +96 -16
  289. package/lib/settings.json +215 -1
  290. package/lib/types/adapter/channel/ui-policy.d.ts +6 -2
  291. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  292. package/lib/types/adapter/channel/ui-policy.js +14 -1
  293. package/lib/types/adapter/index.d.ts +1 -1
  294. package/lib/types/adapter/index.js +1 -1
  295. package/lib/types/adapter/kernel/host-facade.d.ts +4 -1
  296. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
  297. package/lib/types/adapter/kernel/host-facade.js +8 -1
  298. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
  299. package/lib/types/adapter/kernel/runtime.js +13 -0
  300. package/lib/types/adapter/kernel/slices/index.d.ts +1 -0
  301. package/lib/types/adapter/kernel/slices/index.d.ts.map +1 -1
  302. package/lib/types/adapter/kernel/slices/index.js +3 -0
  303. package/lib/types/adapter/kernel/slices/panels.d.ts +3 -0
  304. package/lib/types/adapter/kernel/slices/panels.d.ts.map +1 -0
  305. package/lib/types/adapter/kernel/slices/panels.js +14 -0
  306. package/lib/types/adapter/ports/channel-capabilities.d.ts +48 -0
  307. package/lib/types/adapter/ports/channel-capabilities.d.ts.map +1 -0
  308. package/lib/types/adapter/ports/channel-capabilities.js +2 -0
  309. package/lib/types/adapter/ports/channel-catalog.d.ts +7 -0
  310. package/lib/types/adapter/ports/channel-catalog.d.ts.map +1 -1
  311. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  312. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  313. package/lib/types/adapter/ports/channel-ui.d.ts +62 -2
  314. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  315. package/lib/types/adapter/ports/channel-view.d.ts +94 -0
  316. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  317. package/lib/types/adapter/ports/channel.d.ts +1 -1
  318. package/lib/types/adapter/ports/channel.js +1 -1
  319. package/lib/types/adapter/ports/descriptor.d.ts +1 -1
  320. package/lib/types/adapter/ports/descriptor.js +1 -1
  321. package/lib/types/adapter/ports/index.d.ts +1 -1
  322. package/lib/types/adapter/ports/index.js +1 -1
  323. package/lib/types/adapter/ports/panels.d.ts +28 -0
  324. package/lib/types/adapter/ports/panels.d.ts.map +1 -0
  325. package/lib/types/adapter/ports/panels.js +8 -0
  326. package/lib/types/adapter/ports/workspace.d.ts +1 -1
  327. package/lib/types/adapter/ports/workspace.js +1 -1
  328. package/lib/types/adapter/spec/index.d.ts +2 -2
  329. package/lib/types/adapter/spec/index.js +2 -2
  330. package/lib/types/adapter/spec/profile.d.ts +6 -6
  331. package/lib/types/adapter/spec/profile.d.ts.map +1 -1
  332. package/lib/types/adapter/spec/profile.js +6 -6
  333. package/lib/types/adapter/spec/protocol-constants.d.ts +3 -3
  334. package/lib/types/adapter/spec/protocol-constants.d.ts.map +1 -1
  335. package/lib/types/adapter/spec/protocol-constants.js +5 -5
  336. package/lib/types/adapter/spec/tui-contributions.d.ts +4 -4
  337. package/lib/types/adapter/spec/tui-contributions.d.ts.map +1 -1
  338. package/lib/types/adapter/spec/tui-contributions.js +5 -5
  339. package/lib/types/adapter/standard/descriptor.js +1 -1
  340. package/lib/types/adapter/standard/index.d.ts +3 -3
  341. package/lib/types/adapter/standard/index.js +3 -3
  342. package/lib/types/adapter/standard/registry.d.ts +3 -2
  343. package/lib/types/adapter/standard/registry.d.ts.map +1 -1
  344. package/lib/types/adapter/standard/registry.js +6 -5
  345. package/lib/types/adapter/standard/tui-extension.d.ts +1 -1
  346. package/lib/types/adapter/standard/tui-extension.js +1 -1
  347. package/lib/types/adapter/upstream/index.d.ts +1 -0
  348. package/lib/types/adapter/upstream/index.d.ts.map +1 -1
  349. package/lib/types/adapter/upstream/index.js +1 -0
  350. package/lib/types/adapter/upstream/panels-driver.d.ts +18 -0
  351. package/lib/types/adapter/upstream/panels-driver.d.ts.map +1 -0
  352. package/lib/types/adapter/upstream/panels-driver.js +159 -0
  353. package/lib/types/api.d.ts +2 -0
  354. package/lib/types/api.d.ts.map +1 -1
  355. package/lib/types/api.js +3 -1
  356. package/lib/types/commands.d.ts.map +1 -1
  357. package/lib/types/commands.js +12 -4
  358. package/lib/types/components/ActivityLine.d.ts +6 -9
  359. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  360. package/lib/types/components/ActivityLine.js +7 -8
  361. package/lib/types/components/Chat/JobCard.d.ts +18 -1
  362. package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
  363. package/lib/types/components/Chat/JobCard.js +90 -22
  364. package/lib/types/components/Chat/JobGroupHeader.d.ts +27 -0
  365. package/lib/types/components/Chat/JobGroupHeader.d.ts.map +1 -0
  366. package/lib/types/components/Chat/JobGroupHeader.js +62 -0
  367. package/lib/types/components/GoalTodoPanel.d.ts +13 -1
  368. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  369. package/lib/types/components/GoalTodoPanel.js +55 -14
  370. package/lib/types/components/JobsPanel.d.ts +42 -2
  371. package/lib/types/components/JobsPanel.d.ts.map +1 -1
  372. package/lib/types/components/JobsPanel.js +147 -14
  373. package/lib/types/components/LogoV2.d.ts +43 -3
  374. package/lib/types/components/LogoV2.d.ts.map +1 -1
  375. package/lib/types/components/LogoV2.js +42 -15
  376. package/lib/types/components/MessageList.d.ts +8 -2
  377. package/lib/types/components/MessageList.d.ts.map +1 -1
  378. package/lib/types/components/MessageList.js +212 -18
  379. package/lib/types/components/OverlayAbove.d.ts +11 -1
  380. package/lib/types/components/OverlayAbove.d.ts.map +1 -1
  381. package/lib/types/components/OverlayAbove.js +2 -12
  382. package/lib/types/components/PageMargin.d.ts.map +1 -1
  383. package/lib/types/components/PageMargin.js +3 -1
  384. package/lib/types/components/PluginSceneBoundary.d.ts +1 -1
  385. package/lib/types/components/PluginSceneBoundary.js +1 -1
  386. package/lib/types/components/PromptInput.d.ts +20 -22
  387. package/lib/types/components/PromptInput.d.ts.map +1 -1
  388. package/lib/types/components/PromptInput.js +413 -156
  389. package/lib/types/components/SearchBox.d.ts +22 -5
  390. package/lib/types/components/SearchBox.d.ts.map +1 -1
  391. package/lib/types/components/SearchBox.js +17 -13
  392. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  393. package/lib/types/components/SubagentCard.js +17 -2
  394. package/lib/types/components/SubagentDashboard.d.ts +18 -3
  395. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  396. package/lib/types/components/SubagentDashboard.js +53 -5
  397. package/lib/types/components/SubagentDetailScene.d.ts +7 -1
  398. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  399. package/lib/types/components/SubagentDetailScene.js +54 -5
  400. package/lib/types/components/SurfaceEdges.d.ts +21 -0
  401. package/lib/types/components/SurfaceEdges.d.ts.map +1 -0
  402. package/lib/types/components/SurfaceEdges.js +7 -0
  403. package/lib/types/components/ThemePicker.d.ts +9 -0
  404. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  405. package/lib/types/components/ThemePicker.js +74 -10
  406. package/lib/types/components/ThemePreviewPane.d.ts +26 -0
  407. package/lib/types/components/ThemePreviewPane.d.ts.map +1 -0
  408. package/lib/types/components/ThemePreviewPane.js +99 -0
  409. package/lib/types/components/design-system/Divider.d.ts.map +1 -1
  410. package/lib/types/components/design-system/Divider.js +14 -9
  411. package/lib/types/components/launchpadActions.d.ts +73 -0
  412. package/lib/types/components/launchpadActions.d.ts.map +1 -0
  413. package/lib/types/components/launchpadActions.js +111 -0
  414. package/lib/types/components/launchpadLayout.d.ts +62 -0
  415. package/lib/types/components/launchpadLayout.d.ts.map +1 -0
  416. package/lib/types/components/launchpadLayout.js +176 -0
  417. package/lib/types/components/onboardingModel.d.ts +83 -0
  418. package/lib/types/components/onboardingModel.d.ts.map +1 -0
  419. package/lib/types/components/onboardingModel.js +128 -0
  420. package/lib/types/components/sidePanel/InfoPanel.d.ts +17 -0
  421. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -0
  422. package/lib/types/components/sidePanel/InfoPanel.js +124 -0
  423. package/lib/types/components/sidePanel/PanelBar.d.ts +45 -0
  424. package/lib/types/components/sidePanel/PanelBar.d.ts.map +1 -0
  425. package/lib/types/components/sidePanel/PanelBar.js +104 -0
  426. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts +21 -0
  427. package/lib/types/components/sidePanel/PanelErrorBoundary.d.ts.map +1 -0
  428. package/lib/types/components/sidePanel/PanelErrorBoundary.js +30 -0
  429. package/lib/types/components/sidePanel/PanelHost.d.ts +36 -0
  430. package/lib/types/components/sidePanel/PanelHost.d.ts.map +1 -0
  431. package/lib/types/components/sidePanel/PanelHost.js +81 -0
  432. package/lib/types/components/sidePanel/PanelPicker.d.ts +24 -0
  433. package/lib/types/components/sidePanel/PanelPicker.d.ts.map +1 -0
  434. package/lib/types/components/sidePanel/PanelPicker.js +45 -0
  435. package/lib/types/components/sidePanel/PanelStore.d.ts +55 -0
  436. package/lib/types/components/sidePanel/PanelStore.d.ts.map +1 -0
  437. package/lib/types/components/sidePanel/PanelStore.js +109 -0
  438. package/lib/types/components/sidePanel/SidePanelColumn.d.ts +31 -0
  439. package/lib/types/components/sidePanel/SidePanelColumn.d.ts.map +1 -0
  440. package/lib/types/components/sidePanel/SidePanelColumn.js +70 -0
  441. package/lib/types/components/sidePanel/SidePanelLayout.d.ts +54 -0
  442. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -0
  443. package/lib/types/components/sidePanel/SidePanelLayout.js +81 -0
  444. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts +43 -0
  445. package/lib/types/components/sidePanel/SidePanelRuntimeContext.d.ts.map +1 -0
  446. package/lib/types/components/sidePanel/SidePanelRuntimeContext.js +26 -0
  447. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts +7 -0
  448. package/lib/types/components/sidePanel/TrajectoryPanel.d.ts.map +1 -0
  449. package/lib/types/components/sidePanel/TrajectoryPanel.js +263 -0
  450. package/lib/types/components/sidePanel/WorkspacePanel.d.ts +4 -0
  451. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -0
  452. package/lib/types/components/sidePanel/WorkspacePanel.js +171 -0
  453. package/lib/types/components/sidePanel/builtinPanels.d.ts +3 -0
  454. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -0
  455. package/lib/types/components/sidePanel/builtinPanels.js +229 -0
  456. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts +53 -0
  457. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -0
  458. package/lib/types/components/sidePanel/companion/CompanionPanel.js +528 -0
  459. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts +32 -0
  460. package/lib/types/components/sidePanel/companion/SplashMascot.d.ts.map +1 -0
  461. package/lib/types/components/sidePanel/companion/SplashMascot.js +103 -0
  462. package/lib/types/components/sidePanel/companion/deepy.d.ts +75 -0
  463. package/lib/types/components/sidePanel/companion/deepy.d.ts.map +1 -0
  464. package/lib/types/components/sidePanel/companion/deepy.js +222 -0
  465. package/lib/types/components/sidePanel/companion/mood.d.ts +176 -0
  466. package/lib/types/components/sidePanel/companion/mood.d.ts.map +1 -0
  467. package/lib/types/components/sidePanel/companion/mood.js +212 -0
  468. package/lib/types/components/sidePanel/companion/pose.d.ts +43 -0
  469. package/lib/types/components/sidePanel/companion/pose.d.ts.map +1 -0
  470. package/lib/types/components/sidePanel/companion/pose.js +34 -0
  471. package/lib/types/components/sidePanel/companion/skins.d.ts +102 -0
  472. package/lib/types/components/sidePanel/companion/skins.d.ts.map +1 -0
  473. package/lib/types/components/sidePanel/companion/skins.js +408 -0
  474. package/lib/types/components/sidePanel/dimensions.d.ts +60 -0
  475. package/lib/types/components/sidePanel/dimensions.d.ts.map +1 -0
  476. package/lib/types/components/sidePanel/dimensions.js +75 -0
  477. package/lib/types/components/sidePanel/jobsFocusStore.d.ts +21 -0
  478. package/lib/types/components/sidePanel/jobsFocusStore.d.ts.map +1 -0
  479. package/lib/types/components/sidePanel/jobsFocusStore.js +30 -0
  480. package/lib/types/components/sidePanel/panelBridge.d.ts +44 -0
  481. package/lib/types/components/sidePanel/panelBridge.d.ts.map +1 -0
  482. package/lib/types/components/sidePanel/panelBridge.js +55 -0
  483. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts +22 -0
  484. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -0
  485. package/lib/types/components/sidePanel/pluginPanelAdapter.js +148 -0
  486. package/lib/types/components/sidePanel/types.d.ts +110 -0
  487. package/lib/types/components/sidePanel/types.d.ts.map +1 -0
  488. package/lib/types/components/sidePanel/types.js +1 -0
  489. package/lib/types/components/sidePanel/usePanelInput.d.ts +5 -0
  490. package/lib/types/components/sidePanel/usePanelInput.d.ts.map +1 -0
  491. package/lib/types/components/sidePanel/usePanelInput.js +44 -0
  492. package/lib/types/components/sidePanel/useSidePanel.d.ts +47 -0
  493. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -0
  494. package/lib/types/components/sidePanel/useSidePanel.js +284 -0
  495. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +3 -1
  496. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  497. package/lib/types/components/workspaces/HomeWorkspaceRow.js +3 -2
  498. package/lib/types/deepseekPricing.d.ts +10 -9
  499. package/lib/types/deepseekPricing.d.ts.map +1 -1
  500. package/lib/types/deepseekPricing.js +18 -11
  501. package/lib/types/dsh-adapter/channel/attached-context.d.ts +58 -0
  502. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -0
  503. package/lib/types/dsh-adapter/channel/attached-context.js +109 -0
  504. package/lib/types/dsh-adapter/channel/binding-events.d.ts +6 -0
  505. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  506. package/lib/types/dsh-adapter/channel/binding-events.js +43 -0
  507. package/lib/types/dsh-adapter/channel/capabilities.d.ts +82 -0
  508. package/lib/types/dsh-adapter/channel/capabilities.d.ts.map +1 -0
  509. package/lib/types/dsh-adapter/channel/capabilities.js +165 -0
  510. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  511. package/lib/types/dsh-adapter/channel/command-completions.js +8 -0
  512. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +4 -12
  513. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  514. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -4
  515. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +13 -2
  516. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  517. package/lib/types/dsh-adapter/channel/input-delivery.js +18 -1
  518. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +0 -3
  519. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
  520. package/lib/types/dsh-adapter/channel/mode-actions.js +7 -2
  521. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts +8 -1
  522. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
  523. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +0 -1
  524. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  525. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  526. package/lib/types/dsh-adapter/channel/preferences.js +9 -1
  527. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  528. package/lib/types/dsh-adapter/channel/projection.js +42 -37
  529. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
  530. package/lib/types/dsh-adapter/channel/reports.js +13 -4
  531. package/lib/types/dsh-adapter/channel/session-reset.d.ts +5 -1
  532. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  533. package/lib/types/dsh-adapter/channel/session-reset.js +1 -0
  534. package/lib/types/dsh-adapter/channel/state.d.ts +18 -2
  535. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  536. package/lib/types/dsh-adapter/channel/state.js +2 -1
  537. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  538. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  539. package/lib/types/dsh-adapter/channel/usage.d.ts +18 -1
  540. package/lib/types/dsh-adapter/channel/usage.d.ts.map +1 -1
  541. package/lib/types/dsh-adapter/channel/usage.js +97 -2
  542. package/lib/types/dsh-adapter/channel.d.ts +1 -1
  543. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  544. package/lib/types/dsh-adapter/channel.js +56 -3
  545. package/lib/types/dsh-adapter/context-occupancy.d.ts +204 -0
  546. package/lib/types/dsh-adapter/context-occupancy.d.ts.map +1 -0
  547. package/lib/types/dsh-adapter/context-occupancy.js +299 -0
  548. package/lib/types/dsh-adapter/contract.d.ts +14 -0
  549. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  550. package/lib/types/dsh-adapter/contract.js +24 -0
  551. package/lib/types/dsh-adapter/index.d.ts +32 -0
  552. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  553. package/lib/types/dsh-adapter/index.js +20 -1
  554. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -1
  555. package/lib/types/dsh-adapter/migrate/sessionize.js +11 -12
  556. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts +39 -0
  557. package/lib/types/dsh-adapter/panel-runtime-registry.d.ts.map +1 -0
  558. package/lib/types/dsh-adapter/panel-runtime-registry.js +84 -0
  559. package/lib/types/dsh-adapter/panels.d.ts +251 -0
  560. package/lib/types/dsh-adapter/panels.d.ts.map +1 -0
  561. package/lib/types/dsh-adapter/panels.js +407 -0
  562. package/lib/types/dsh-adapter/plugin-host.js +1 -1
  563. package/lib/types/dsh-adapter/plugin.d.ts +17 -1
  564. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  565. package/lib/types/dsh-adapter/plugin.js +169 -32
  566. package/lib/types/dsh-adapter/presets.d.ts +26 -6
  567. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  568. package/lib/types/dsh-adapter/presets.js +29 -7
  569. package/lib/types/dsh-adapter/startup-args.d.ts +8 -0
  570. package/lib/types/dsh-adapter/startup-args.d.ts.map +1 -0
  571. package/lib/types/dsh-adapter/startup-args.js +34 -0
  572. package/lib/types/history.d.ts +24 -7
  573. package/lib/types/history.d.ts.map +1 -1
  574. package/lib/types/history.js +77 -18
  575. package/lib/types/i18n.d.ts +734 -15
  576. package/lib/types/i18n.d.ts.map +1 -1
  577. package/lib/types/i18n.js +302 -6
  578. package/lib/types/ink/components/App.d.ts +14 -1
  579. package/lib/types/ink/components/App.d.ts.map +1 -1
  580. package/lib/types/ink/components/App.js +62 -61
  581. package/lib/types/ink/components/TerminalSizeContext.d.ts +7 -0
  582. package/lib/types/ink/components/TerminalSizeContext.d.ts.map +1 -1
  583. package/lib/types/ink/hooks/use-input.d.ts +11 -0
  584. package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
  585. package/lib/types/ink/hooks/use-input.js +8 -2
  586. package/lib/types/ink/hooks/use-terminal-viewport.d.ts.map +1 -1
  587. package/lib/types/ink/hooks/use-terminal-viewport.js +3 -1
  588. package/lib/types/ink/ink.d.ts +18 -0
  589. package/lib/types/ink/ink.d.ts.map +1 -1
  590. package/lib/types/ink/ink.js +51 -8
  591. package/lib/types/ink/output.d.ts +10 -1
  592. package/lib/types/ink/output.d.ts.map +1 -1
  593. package/lib/types/ink/output.js +3 -3
  594. package/lib/types/ink/parse-keypress.d.ts +36 -3
  595. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  596. package/lib/types/ink/parse-keypress.js +262 -108
  597. package/lib/types/ink/render-node-to-output.d.ts +1 -1
  598. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  599. package/lib/types/ink/render-node-to-output.js +37 -5
  600. package/lib/types/ink/screen.d.ts +26 -1
  601. package/lib/types/ink/screen.d.ts.map +1 -1
  602. package/lib/types/ink/screen.js +96 -1
  603. package/lib/types/ink/selection.d.ts +23 -1
  604. package/lib/types/ink/selection.d.ts.map +1 -1
  605. package/lib/types/ink/selection.js +102 -26
  606. package/lib/types/ink/sixel-codec.d.ts +11 -0
  607. package/lib/types/ink/sixel-codec.d.ts.map +1 -1
  608. package/lib/types/ink/sixel-codec.js +42 -8
  609. package/lib/types/math/renderer.d.ts +2 -0
  610. package/lib/types/math/renderer.d.ts.map +1 -1
  611. package/lib/types/math/renderer.js +4 -0
  612. package/lib/types/onboardingPrefs.d.ts +52 -0
  613. package/lib/types/onboardingPrefs.d.ts.map +1 -0
  614. package/lib/types/onboardingPrefs.js +107 -0
  615. package/lib/types/panels.d.ts +4 -0
  616. package/lib/types/panels.d.ts.map +1 -0
  617. package/lib/types/panels.js +4 -0
  618. package/lib/types/screens/Chat.d.ts +22 -1
  619. package/lib/types/screens/Chat.d.ts.map +1 -1
  620. package/lib/types/screens/Chat.js +1126 -299
  621. package/lib/types/screens/Launchpad.d.ts +194 -0
  622. package/lib/types/screens/Launchpad.d.ts.map +1 -0
  623. package/lib/types/screens/Launchpad.js +607 -0
  624. package/lib/types/screens/Onboarding.d.ts +37 -0
  625. package/lib/types/screens/Onboarding.d.ts.map +1 -0
  626. package/lib/types/screens/Onboarding.js +492 -0
  627. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  628. package/lib/types/screens/SessionSupervisor.js +18 -12
  629. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  630. package/lib/types/screens/StatusLine.js +32 -14
  631. package/lib/types/screens/StatusMetrics.d.ts +22 -0
  632. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  633. package/lib/types/screens/StatusMetrics.js +20 -0
  634. package/lib/types/screens/chatOverlay.d.ts +18 -1
  635. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  636. package/lib/types/screens/chatOverlay.js +3 -0
  637. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -2
  638. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
  639. package/lib/types/screens/sessionSupervisor/model.js +4 -2
  640. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  641. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +7 -3
  642. package/lib/types/settings/definitions.d.ts +93 -0
  643. package/lib/types/settings/definitions.d.ts.map +1 -1
  644. package/lib/types/settings/definitions.js +83 -0
  645. package/lib/types/tips.js +5 -5
  646. package/lib/types/tuiDisplayPrefs.d.ts +42 -2
  647. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  648. package/lib/types/tuiDisplayPrefs.js +74 -0
  649. package/lib/types/update.d.ts +53 -9
  650. package/lib/types/update.d.ts.map +1 -1
  651. package/lib/types/update.js +101 -44
  652. package/lib/types/utils/bmp.d.ts.map +1 -1
  653. package/lib/types/utils/bmp.js +8 -1
  654. package/lib/types/utils/clipboard.d.ts.map +1 -1
  655. package/lib/types/utils/clipboard.js +25 -6
  656. package/lib/types/utils/credentials.d.ts.map +1 -1
  657. package/lib/types/utils/credentials.js +5 -1
  658. package/lib/types/utils/draftWordBoundary.d.ts +23 -0
  659. package/lib/types/utils/draftWordBoundary.d.ts.map +1 -0
  660. package/lib/types/utils/draftWordBoundary.js +161 -0
  661. package/lib/types/utils/fileTarget.d.ts.map +1 -1
  662. package/lib/types/utils/fileTarget.js +7 -9
  663. package/lib/types/utils/inputPaste.d.ts +62 -0
  664. package/lib/types/utils/inputPaste.d.ts.map +1 -0
  665. package/lib/types/utils/inputPaste.js +111 -0
  666. package/lib/types/utils/intl.d.ts +8 -0
  667. package/lib/types/utils/intl.d.ts.map +1 -1
  668. package/lib/types/utils/intl.js +11 -0
  669. package/lib/types/utils/keymap.d.ts +13 -3
  670. package/lib/types/utils/keymap.d.ts.map +1 -1
  671. package/lib/types/utils/keymap.js +27 -5
  672. package/package.json +19 -8
  673. package/{dsh-ecosystem-spec → tui-profile}/registry/README.md +1 -1
  674. package/{dsh-ecosystem-spec → tui-profile}/registry/registry-0.15.json +1 -1
  675. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.d.ts +0 -0
  676. /package/{dsh-ecosystem-spec → tui-profile}/protocols/profile-definitions.js +0 -0
  677. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.d.ts +0 -0
  678. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel-http.js +0 -0
  679. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.d.ts +0 -0
  680. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-channel.js +0 -0
  681. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.d.ts +0 -0
  682. /package/{dsh-ecosystem-spec → tui-profile}/protocols/tui-contributions.js +0 -0
  683. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/decision-events-v1alpha1.json +0 -0
  684. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/scene-v1alpha1.json +0 -0
  685. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/settings-section-v1alpha1.json +0 -0
  686. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/tui-channel-v1alpha1.json +0 -0
  687. /package/{dsh-ecosystem-spec → tui-profile}/registry/contracts/workspace-provider-v1alpha1.json +0 -0
  688. /package/{dsh-ecosystem-spec → tui-profile}/registry/host-descriptor.tui.example.json +0 -0
  689. /package/{dsh-ecosystem-spec → tui-profile}/registry/permissions-0.1.json +0 -0
  690. /package/{dsh-ecosystem-spec → tui-profile}/schemas/conformance-claim.schema.json +0 -0
  691. /package/{dsh-ecosystem-spec → tui-profile}/schemas/effect-ledger-record.schema.json +0 -0
  692. /package/{dsh-ecosystem-spec → tui-profile}/schemas/host-descriptor.schema.json +0 -0
@@ -1,9 +1,11 @@
1
- import type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig } from './adapter/ports/channel-display.js';
2
- export type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig } from './adapter/ports/channel-display.js';
1
+ import type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig, JobGroupFoldMode } from './adapter/ports/channel-display.js';
2
+ export type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig, JobGroupFoldMode } from './adapter/ports/channel-display.js';
3
3
  /** Defaults keep the essential route/context information visible. */
4
4
  export declare const DEFAULT_STATUS_BAR: Readonly<StatusBarConfig>;
5
5
  /** Normalize untrusted/config-layer values without mutating the input. */
6
6
  export declare function normalizeToolBackground(value: unknown): ToolBackground;
7
+ /** Same normalize contract as toolBackground; `auto` is the default. */
8
+ export declare function normalizeJobGroupFold(value: unknown): JobGroupFoldMode;
7
9
  /** Same normalize contract as toolBackground; `timeline` is the default. */
8
10
  export declare function normalizeScrollGutter(value: unknown): ScrollGutterMode;
9
11
  /** Merge a partial settings value over the stable status-bar defaults. */
@@ -113,4 +115,42 @@ export declare function normalizeImageBacking(value: unknown): ImageBacking;
113
115
  export declare const subscribeImageBacking: (listener: () => void) => () => void;
114
116
  export declare const getImageBacking: () => ImageBacking;
115
117
  export declare const applyImageBacking: (value: unknown) => ImageBacking;
118
+ /** Panel id grammar (plugins register under a `plugin:sub` namespace). */
119
+ export declare const SIDE_PANEL_ID_PATTERN: RegExp;
120
+ export declare const DEFAULT_SIDE_PANEL_IDS = "todo,jobs,agents";
121
+ /** Chat fraction of the content width; junk collapses to the default and
122
+ * the value is sanity-clamped (geometry clamps further per width). */
123
+ export declare function normalizeSidePanelRatio(value: unknown): number;
124
+ /** Comma-separated enabled-panel ids: tokens that fail the id grammar are
125
+ * dropped (a typo must never wedge the layout); unknown-but-well-formed
126
+ * ids survive — a plugin may register them later in the session. */
127
+ export declare function normalizeSidePanelPanels(value: unknown): string;
128
+ /** Enabled panel ids in PanelBar order. */
129
+ export declare function parseSidePanelIds(value: string): readonly string[];
130
+ export declare const subscribeSidePanelSplitEnabled: (listener: () => void) => () => void;
131
+ export declare const getSidePanelSplitEnabled: () => boolean;
132
+ export declare const applySidePanelSplitEnabled: (value: unknown) => boolean;
133
+ export declare const subscribeSidePanelOpen: (listener: () => void) => () => void;
134
+ export declare const getSidePanelOpen: () => boolean;
135
+ export declare const applySidePanelOpen: (value: unknown) => boolean;
136
+ export declare const subscribeSidePanelRatio: (listener: () => void) => () => void;
137
+ export declare const getSidePanelRatio: () => number;
138
+ export declare const applySidePanelRatio: (value: unknown) => number;
139
+ export declare const subscribeSidePanelPanels: (listener: () => void) => () => void;
140
+ export declare const getSidePanelPanels: () => string;
141
+ export declare const applySidePanelPanels: (value: unknown) => string;
142
+ /**
143
+ * Companion 皮肤(设置 `dsh-tui.companion.skin`):内置 'deepy'(默认,
144
+ * assets/deepy 素材包)、'whaleGirl'(用户提供的鲸娘素材包,assets/
145
+ * whaleGirl)与 'whale'(开屏像素鲸鱼同款分层动画);插件
146
+ * 皮肤 id('plugin:sub' 命名空间)随 Phase 7 开放注册后同样可写——
147
+ * 未注册/未知的 id 一律回退 deepy,不阻断启动。
148
+ */
149
+ export type CompanionSkinSetting = string;
150
+ export declare const COMPANION_SKIN_IDS: readonly ["deepy", "whaleGirl", "whale"];
151
+ export declare const DEFAULT_COMPANION_SKIN: CompanionSkinSetting;
152
+ export declare function normalizeCompanionSkin(value: unknown): CompanionSkinSetting;
153
+ export declare const subscribeCompanionSkin: (listener: () => void) => () => void;
154
+ export declare const getCompanionSkin: () => string;
155
+ export declare const applyCompanionSkin: (value: unknown) => string;
116
156
  //# sourceMappingURL=tuiDisplayPrefs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tuiDisplayPrefs.d.ts","sourceRoot":"","sources":["../../src/tuiDisplayPrefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAC9J,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAG9J,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,eAAe,CAuBvD,CAAA;AAMF,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAItE;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAItE;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CASlE;AASD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,OAAO,UAAO,GACb,MAAM,GAAG,SAAS,CASpB;AAED;;4CAE4C;AAC5C,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAK3G,CAAA;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAyB,CAAA;AAE3D;4CAC4C;AAC5C,eAA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utHint: false,
25
25
  });
26
26
  const TOOL_BACKGROUNDS = new Set(['none', 'subtle', 'strong']);
27
+ const JOB_GROUP_FOLDS = new Set(['auto', 'always', 'never']);
27
28
  const SCROLL_GUTTERS = new Set(['timeline', 'scrollbar', 'hidden']);
28
29
  const STATUS_BAR_KEYS = Object.keys(DEFAULT_STATUS_BAR);
29
30
  /** Normalize untrusted/config-layer values without mutating the input. */
@@ -32,6 +33,12 @@ export function normalizeToolBackground(value) {
32
33
  ? value
33
34
  : 'none';
34
35
  }
36
+ /** Same normalize contract as toolBackground; `auto` is the default. */
37
+ export function normalizeJobGroupFold(value) {
38
+ return typeof value === 'string' && JOB_GROUP_FOLDS.has(value)
39
+ ? value
40
+ : 'auto';
41
+ }
35
42
  /** Same normalize contract as toolBackground; `timeline` is the default. */
36
43
  export function normalizeScrollGutter(value) {
37
44
  return typeof value === 'string' && SCROLL_GUTTERS.has(value)
@@ -225,3 +232,70 @@ const imageBackingStore = createLiveSetting('transparent', normalizeImageBacking
225
232
  export const subscribeImageBacking = imageBackingStore.subscribe;
226
233
  export const getImageBacking = imageBackingStore.get;
227
234
  export const applyImageBacking = imageBackingStore.apply;
235
+ // ── Side panel (侧栏) ────────────────────────────────────────────────
236
+ // Settings `dsh-tui.sidePanel.*`. These are module-level live stores (not
237
+ // channel state): the layout needs them above the channel's version bump —
238
+ // a Ctrl+B toggle must re-render Chat even though nothing about the
239
+ // session changed — and /settings + cordis.yml write through the same
240
+ // apply* functions (plugin's applyDisplay mirrors them here, exactly like
241
+ // pageMargin). Key toggles are session-level: they move the live store but
242
+ // never write the user settings layer, so a restart returns to the
243
+ // configured default.
244
+ /** Panel id grammar (plugins register under a `plugin:sub` namespace). */
245
+ export const SIDE_PANEL_ID_PATTERN = /^[a-z][a-z0-9_-]*(:[a-z][a-z0-9_-]*)*$/;
246
+ export const DEFAULT_SIDE_PANEL_IDS = 'todo,jobs,agents';
247
+ function normalizeBoolean(value, fallback) {
248
+ return typeof value === 'boolean' ? value : fallback;
249
+ }
250
+ /** Chat fraction of the content width; junk collapses to the default and
251
+ * the value is sanity-clamped (geometry clamps further per width). */
252
+ export function normalizeSidePanelRatio(value) {
253
+ if (typeof value !== 'number' || !Number.isFinite(value))
254
+ return 0.68;
255
+ return Math.min(0.95, Math.max(0.1, value));
256
+ }
257
+ /** Comma-separated enabled-panel ids: tokens that fail the id grammar are
258
+ * dropped (a typo must never wedge the layout); unknown-but-well-formed
259
+ * ids survive — a plugin may register them later in the session. */
260
+ export function normalizeSidePanelPanels(value) {
261
+ if (typeof value !== 'string')
262
+ return DEFAULT_SIDE_PANEL_IDS;
263
+ const seen = new Set();
264
+ for (const token of value.split(',')) {
265
+ const id = token.trim().toLowerCase();
266
+ if (id !== '' && SIDE_PANEL_ID_PATTERN.test(id))
267
+ seen.add(id);
268
+ }
269
+ return seen.size > 0 ? [...seen].join(',') : DEFAULT_SIDE_PANEL_IDS;
270
+ }
271
+ /** Enabled panel ids in PanelBar order. */
272
+ export function parseSidePanelIds(value) {
273
+ return normalizeSidePanelPanels(value).split(',');
274
+ }
275
+ const sidePanelSplitEnabledStore = createLiveSetting(true, value => normalizeBoolean(value, true));
276
+ export const subscribeSidePanelSplitEnabled = sidePanelSplitEnabledStore.subscribe;
277
+ export const getSidePanelSplitEnabled = sidePanelSplitEnabledStore.get;
278
+ export const applySidePanelSplitEnabled = sidePanelSplitEnabledStore.apply;
279
+ const sidePanelOpenStore = createLiveSetting(false, value => normalizeBoolean(value, false));
280
+ export const subscribeSidePanelOpen = sidePanelOpenStore.subscribe;
281
+ export const getSidePanelOpen = sidePanelOpenStore.get;
282
+ export const applySidePanelOpen = sidePanelOpenStore.apply;
283
+ const sidePanelRatioStore = createLiveSetting(0.68, normalizeSidePanelRatio);
284
+ export const subscribeSidePanelRatio = sidePanelRatioStore.subscribe;
285
+ export const getSidePanelRatio = sidePanelRatioStore.get;
286
+ export const applySidePanelRatio = sidePanelRatioStore.apply;
287
+ const sidePanelPanelsStore = createLiveSetting(DEFAULT_SIDE_PANEL_IDS, normalizeSidePanelPanels);
288
+ export const subscribeSidePanelPanels = sidePanelPanelsStore.subscribe;
289
+ export const getSidePanelPanels = sidePanelPanelsStore.get;
290
+ export const applySidePanelPanels = sidePanelPanelsStore.apply;
291
+ export const COMPANION_SKIN_IDS = ['deepy', 'whaleGirl', 'whale'];
292
+ export const DEFAULT_COMPANION_SKIN = 'deepy';
293
+ export function normalizeCompanionSkin(value) {
294
+ if (typeof value === 'string' && COMPANION_SKIN_IDS.includes(value))
295
+ return value;
296
+ return DEFAULT_COMPANION_SKIN;
297
+ }
298
+ const companionSkinStore = createLiveSetting(DEFAULT_COMPANION_SKIN, normalizeCompanionSkin);
299
+ export const subscribeCompanionSkin = companionSkinStore.subscribe;
300
+ export const getCompanionSkin = companionSkinStore.get;
301
+ export const applyCompanionSkin = companionSkinStore.apply;
@@ -303,16 +303,38 @@ export interface ReleaseAgeExcludeOutcome {
303
303
  * (24h by default) — on release day that gate refuses the very version
304
304
  * `/update` is installing (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION), which
305
305
  * reads to the user as a broken update until the window passes. Pre-seed the
306
- * profile's pnpm-workspace.yaml with a release-age exclusion scoped to this
307
- * package at the exact target version — the same best-effort, idempotent
308
- * pattern as {@link ensureProfileAllowBuilds}: foreign entries are preserved,
309
- * an existing entry for this package is replaced (one entry tracks the current
310
- * target instead of accumulating), a missing `minimumReleaseAgeExclude` block
311
- * is appended, a missing file is created, and an absent profile directory
312
- * resolves to undefined — the caller still runs pnpm, whose own diagnostic
313
- * stays the visible fallback.
306
+ * profile's pnpm-workspace.yaml with release-age exclusions scoped to this
307
+ * package at the exact versions pnpm verifies before it can swap the package:
308
+ * the target version itself, plus `alsoExempt` — the pre-update `updatedFrom`,
309
+ * read from the running package's own manifest (normally the version the
310
+ * profile lockfile pins). Two releases inside the 24h window leave the OLD
311
+ * lockfile entry inside it too, and pnpm fails the whole policy check on that
312
+ * entry before replacing the package (issue #1205), so exempting only the
313
+ * target is not enough. Same best-effort,
314
+ * idempotent pattern as {@link ensureProfileAllowBuilds}: entries for this
315
+ * package track exactly the versions the current update needs (older own
316
+ * entries are dropped instead of accumulating), foreign entries are
317
+ * preserved, a missing `minimumReleaseAgeExclude` block is appended, a
318
+ * missing file is created, and an absent profile directory resolves to
319
+ * undefined — the caller still runs pnpm, whose own diagnostic stays the
320
+ * visible fallback. Own entries are re-rendered target-first on every
321
+ * rewrite: pnpm 11.7.x honours only the FIRST entry per package (later
322
+ * entries for the same package are ignored against the real registry), and
323
+ * 11.21.x applies every entry in any order, so the target — the version the
324
+ * swap itself has to resolve, and published by construction while a
325
+ * dev-built `updatedFrom` need not be — takes the slot older pnpm still
326
+ * reads. Both exemptions come from the manifest, not from `pnpm-lock.yaml`:
327
+ * a profile whose manifest and lockfile diverged keeps the lockfile's entry
328
+ * unexempted. The 11.7.x `--frozen-lockfile` policy check reads that first
329
+ * entry only, so a two-entry list does not clear it there; the `pnpm add`
330
+ * path `/update` runs resolves the target and does pass.
331
+ *
332
+ * @param profile - The dsh profile whose workspace file is seeded.
333
+ * @param version - The update target (exact version).
334
+ * @param alsoExempt - Optional second version to keep exempt, normally the
335
+ * pre-update `updatedFrom`; ignored when empty or equal to `version`.
314
336
  */
315
- export declare function ensureProfileReleaseAgeExclude(profile: string, version: string): ReleaseAgeExcludeOutcome | undefined;
337
+ export declare function ensureProfileReleaseAgeExclude(profile: string, version: string, alsoExempt?: string): ReleaseAgeExcludeOutcome | undefined;
316
338
  /**
317
339
  * The @img suffix of the RUNNING platform: musl linux maps to linuxmusl, and
318
340
  * FreeBSD — which has no native @img build — maps to the only form it can load.
@@ -497,6 +519,28 @@ export declare function updateTuiAndRestart(sessionId: string, profile: string,
497
519
  * @returns Process exit code: 0 on success or already-latest, 1 otherwise.
498
520
  */
499
521
  export declare function cliUpdate(profile: string): Promise<number>;
522
+ /**
523
+ * Release the shared console for the replacement without resetting it.
524
+ *
525
+ * A pty's termios is per-DEVICE: destroying this stream would write this
526
+ * process's saved cooked/ECHO mode back over the replacement's raw mode
527
+ * (libuv restores orig_termios on tty close; verified on Node 24 — mouse
528
+ * reports then echo as `^[[<…M` and keys wait for a newline). Detaching —
529
+ * no readers, paused, unref'd — keeps the mode untouched.
530
+ *
531
+ * Two deliberate trade-offs vs the old destroy():
532
+ * - destroy() doubled as a permanent gate ("a destroyed stream can never be
533
+ * resumed"). Readers removed + paused already keep this process out of the
534
+ * console's key path (#284/#307), and after the handoff only the
535
+ * child-exit listener remains here — nothing re-attaches a reader.
536
+ * - On exit Node still writes the saved cooked mode back once (atexit
537
+ * uv_tty_reset_mode). Fine in the normal order — this process outlives the
538
+ * replacement, and the shell wants cooked back anyway; it only bites if
539
+ * this process dies while the replacement is still running.
540
+ *
541
+ * @param stdin - Console stream to detach; injectable for the regression.
542
+ */
543
+ export declare function detachHandoffStdin(stdin?: Pick<NodeJS.ReadStream, 'removeAllListeners' | 'pause' | 'unref'>): void;
500
544
  /**
501
545
  * Restart the running TUI in place and resume the active session — the
502
546
  * `/update` restart path minus the pnpm step, for `/restart`. Spawns the
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAKlD,OAAO,EAAE,UAAU,EAAE,CAAA;AAgDrB;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAEnF;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAc3D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAMrD;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,E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ACnB,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,gBAAgB,CAAC,CA0J3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC,CAiB1B;AAED;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0DhE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,GAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,oBAAoB,GAAG,OAAO,GAAG,OAAO,CAAiB,GACvF,IAAI,CAKN;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC5B;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqHpG"}
@@ -966,16 +966,38 @@ export function ensureProfileAllowBuilds(profile) {
966
966
  * (24h by default) — on release day that gate refuses the very version
967
967
  * `/update` is installing (ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION), which
968
968
  * reads to the user as a broken update until the window passes. Pre-seed the
969
- * profile's pnpm-workspace.yaml with a release-age exclusion scoped to this
970
- * package at the exact target version — the same best-effort, idempotent
971
- * pattern as {@link ensureProfileAllowBuilds}: foreign entries are preserved,
972
- * an existing entry for this package is replaced (one entry tracks the current
973
- * target instead of accumulating), a missing `minimumReleaseAgeExclude` block
974
- * is appended, a missing file is created, and an absent profile directory
975
- * resolves to undefined — the caller still runs pnpm, whose own diagnostic
976
- * stays the visible fallback.
969
+ * profile's pnpm-workspace.yaml with release-age exclusions scoped to this
970
+ * package at the exact versions pnpm verifies before it can swap the package:
971
+ * the target version itself, plus `alsoExempt` — the pre-update `updatedFrom`,
972
+ * read from the running package's own manifest (normally the version the
973
+ * profile lockfile pins). Two releases inside the 24h window leave the OLD
974
+ * lockfile entry inside it too, and pnpm fails the whole policy check on that
975
+ * entry before replacing the package (issue #1205), so exempting only the
976
+ * target is not enough. Same best-effort,
977
+ * idempotent pattern as {@link ensureProfileAllowBuilds}: entries for this
978
+ * package track exactly the versions the current update needs (older own
979
+ * entries are dropped instead of accumulating), foreign entries are
980
+ * preserved, a missing `minimumReleaseAgeExclude` block is appended, a
981
+ * missing file is created, and an absent profile directory resolves to
982
+ * undefined — the caller still runs pnpm, whose own diagnostic stays the
983
+ * visible fallback. Own entries are re-rendered target-first on every
984
+ * rewrite: pnpm 11.7.x honours only the FIRST entry per package (later
985
+ * entries for the same package are ignored against the real registry), and
986
+ * 11.21.x applies every entry in any order, so the target — the version the
987
+ * swap itself has to resolve, and published by construction while a
988
+ * dev-built `updatedFrom` need not be — takes the slot older pnpm still
989
+ * reads. Both exemptions come from the manifest, not from `pnpm-lock.yaml`:
990
+ * a profile whose manifest and lockfile diverged keeps the lockfile's entry
991
+ * unexempted. The 11.7.x `--frozen-lockfile` policy check reads that first
992
+ * entry only, so a two-entry list does not clear it there; the `pnpm add`
993
+ * path `/update` runs resolves the target and does pass.
994
+ *
995
+ * @param profile - The dsh profile whose workspace file is seeded.
996
+ * @param version - The update target (exact version).
997
+ * @param alsoExempt - Optional second version to keep exempt, normally the
998
+ * pre-update `updatedFrom`; ignored when empty or equal to `version`.
977
999
  */
978
- export function ensureProfileReleaseAgeExclude(profile, version) {
1000
+ export function ensureProfileReleaseAgeExclude(profile, version, alsoExempt) {
979
1001
  const yamlPath = profileWorkspaceYamlPath(profile);
980
1002
  try {
981
1003
  if (!existsSafe(dirname(yamlPath)))
@@ -988,6 +1010,10 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
988
1010
  // Missing file — start from an empty document; writeFileSync creates it.
989
1011
  }
990
1012
  const entry = `${PACKAGE_NAME}@${version}`;
1013
+ const alsoEntry = alsoExempt !== undefined && alsoExempt !== '' && alsoExempt !== version
1014
+ ? `${PACKAGE_NAME}@${alsoExempt}`
1015
+ : undefined;
1016
+ const keep = alsoEntry === undefined ? [entry] : [entry, alsoEntry];
991
1017
  const lines = text.split(/\r?\n/u);
992
1018
  let blockStart = -1;
993
1019
  for (let i = 0; i < lines.length; i += 1) {
@@ -999,9 +1025,12 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
999
1025
  }
1000
1026
  /** Item text of a list line, unquoted (`- 'x@1'` / `- x@1` → `x@1`). */
1001
1027
  const itemOf = (line) => line.trim().replace(/^-\s*/u, '').replace(/^'(.*)'$/u, '$1');
1002
- const foreign = [];
1028
+ /** Foreign exclusion lines, preserved verbatim and in file order. */
1029
+ const foreignLines = [];
1030
+ /** Keep-set entries already present in the block. */
1031
+ const present = [];
1032
+ let droppedStale = false;
1003
1033
  let blockEnd = -1;
1004
- let alreadyCurrent = false;
1005
1034
  if (blockStart !== -1) {
1006
1035
  blockEnd = blockStart + 1;
1007
1036
  for (let i = blockStart + 1; i < lines.length; i += 1) {
@@ -1010,21 +1039,27 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
1010
1039
  break; // dedent = block ends
1011
1040
  blockEnd = i + 1;
1012
1041
  const item = itemOf(line);
1013
- if (item === entry) {
1014
- alreadyCurrent = true;
1015
- foreign.push(line);
1042
+ if (!item.startsWith(`${PACKAGE_NAME}@`)) {
1043
+ foreignLines.push(line);
1016
1044
  }
1017
- else if (!item.startsWith(`${PACKAGE_NAME}@`)) {
1018
- foreign.push(line);
1045
+ else if (keep.includes(item)) {
1046
+ present.push(item);
1047
+ }
1048
+ else {
1049
+ // Own entries for older targets: dropped (no accumulation).
1050
+ droppedStale = true;
1019
1051
  }
1020
- // Stale entries for THIS package (older targets) are dropped above.
1021
1052
  }
1022
1053
  }
1023
- if (alreadyCurrent) {
1024
- const entries = [entry, ...lines.slice(blockStart + 1, blockEnd).map(itemOf)];
1025
- return { entries, changed: false };
1054
+ const missing = keep.filter(item => !present.includes(item));
1055
+ if (!droppedStale && missing.length === 0) {
1056
+ return { entries: [...foreignLines.map(itemOf), ...present], changed: false };
1026
1057
  }
1027
- const insert = foreign.concat(` - '${entry}'`);
1058
+ // Own entries are re-rendered in keep order (target first) instead of
1059
+ // copied as found: pnpm 11.7.x honours only the first entry per package
1060
+ // (11.21.x applies them all, order-independent), and the target is the
1061
+ // version the swap must resolve, so it takes that first slot.
1062
+ const insert = foreignLines.concat(keep.map(item => ` - '${item}'`));
1028
1063
  if (blockStart !== -1) {
1029
1064
  lines.splice(blockStart + 1, blockEnd - blockStart - 1, ...insert);
1030
1065
  }
@@ -1034,7 +1069,7 @@ export function ensureProfileReleaseAgeExclude(profile, version) {
1034
1069
  lines.push('minimumReleaseAgeExclude:', ...insert);
1035
1070
  }
1036
1071
  writeFileSync(yamlPath, `${lines.join('\n')}\n`);
1037
- return { entries: [...foreign.map(itemOf), entry], changed: true };
1072
+ return { entries: insert.map(itemOf), changed: true };
1038
1073
  }
1039
1074
  catch {
1040
1075
  return undefined;
@@ -1446,13 +1481,17 @@ export async function updateTui(profile, targetVersion) {
1446
1481
  // pnpm ≥11's minimumReleaseAge (24h by default) refuses installs of
1447
1482
  // packages published within the window — on release day that gate rejects
1448
1483
  // the exact version /update pins, surfacing as a failed update that heals
1449
- // itself a day later. Scope-exempt this package at the exact target before
1450
- // pnpm runs (release-day /update parity with the allowBuilds seed above).
1484
+ // itself a day later. Two releases inside the window (issue #1205) trip the
1485
+ // same gate on the OLD lockfile entry pnpm verifies before the swap, so
1486
+ // both the target and the still-installed updatedFrom are exempted.
1451
1487
  if (targetVersion !== undefined) {
1452
- const releaseAge = ensureProfileReleaseAgeExclude(profile, targetVersion);
1488
+ const releaseAge = ensureProfileReleaseAgeExclude(profile, targetVersion, updatedFrom === '' ? undefined : updatedFrom);
1453
1489
  if (releaseAge !== undefined && releaseAge.changed) {
1454
- process.stderr.write(`dsh-tui: pre-seeded profile release-age exclusion (${PACKAGE_NAME}@${targetVersion}) — ` +
1455
- 'a freshly published version installs without the 24h supply-chain delay\n');
1490
+ const exempted = updatedFrom !== '' && updatedFrom !== targetVersion
1491
+ ? `${PACKAGE_NAME}@${targetVersion} + ${PACKAGE_NAME}@${updatedFrom}`
1492
+ : `${PACKAGE_NAME}@${targetVersion}`;
1493
+ process.stderr.write(`dsh-tui: pre-seeded profile release-age exclusion (${exempted}) — ` +
1494
+ 'freshly published versions install without the 24h supply-chain delay\n');
1456
1495
  }
1457
1496
  }
1458
1497
  let updateStderr = '';
@@ -1622,6 +1661,33 @@ export async function cliUpdate(profile) {
1622
1661
  }
1623
1662
  return outcome.code;
1624
1663
  }
1664
+ /**
1665
+ * Release the shared console for the replacement without resetting it.
1666
+ *
1667
+ * A pty's termios is per-DEVICE: destroying this stream would write this
1668
+ * process's saved cooked/ECHO mode back over the replacement's raw mode
1669
+ * (libuv restores orig_termios on tty close; verified on Node 24 — mouse
1670
+ * reports then echo as `^[[<…M` and keys wait for a newline). Detaching —
1671
+ * no readers, paused, unref'd — keeps the mode untouched.
1672
+ *
1673
+ * Two deliberate trade-offs vs the old destroy():
1674
+ * - destroy() doubled as a permanent gate ("a destroyed stream can never be
1675
+ * resumed"). Readers removed + paused already keep this process out of the
1676
+ * console's key path (#284/#307), and after the handoff only the
1677
+ * child-exit listener remains here — nothing re-attaches a reader.
1678
+ * - On exit Node still writes the saved cooked mode back once (atexit
1679
+ * uv_tty_reset_mode). Fine in the normal order — this process outlives the
1680
+ * replacement, and the shell wants cooked back anyway; it only bites if
1681
+ * this process dies while the replacement is still running.
1682
+ *
1683
+ * @param stdin - Console stream to detach; injectable for the regression.
1684
+ */
1685
+ export function detachHandoffStdin(stdin = process.stdin) {
1686
+ stdin.removeAllListeners('readable');
1687
+ stdin.removeAllListeners('data');
1688
+ stdin.pause();
1689
+ stdin.unref();
1690
+ }
1625
1691
  export async function restartTui(sessionId, options = {}) {
1626
1692
  const kind = options.kind ?? 'restart';
1627
1693
  const tag = kind === 'update' ? 'update-restart' : 'restart';
@@ -1661,10 +1727,12 @@ export async function restartTui(sessionId, options = {}) {
1661
1727
  // 1. SAMPLE this process's stdin state every second — if anything
1662
1728
  // re-attaches a reader after the funnel's detachStdinForHandoff, the
1663
1729
  // sample (taken before the re-assert below) shows it in the log.
1664
- // 2. RE-ASSERT the detach and finally destroy the stream: this process
1665
- // must never read the shared console again — every keypress belongs
1666
- // to the replacement, and a resumed pump here is exactly the
1667
- // "restarted TUI sees dropped or swallowed input" failure (#284/#307).
1730
+ // 2. RE-ASSERT the detach — never DESTROY the stream: destroying it
1731
+ // resets the shared pty and stomps the replacement's raw mode (see
1732
+ // detachHandoffStdin for the mechanism and trade-offs). This process
1733
+ // must never read the shared console again — every keypress belongs to
1734
+ // the replacement, and a resumed pump here is exactly the "restarted
1735
+ // TUI sees dropped or swallowed input" failure (#284/#307).
1668
1736
  let watchdogTicks = 0;
1669
1737
  const watchdog = setInterval(() => {
1670
1738
  watchdogTicks += 1;
@@ -1678,25 +1746,14 @@ export async function restartTui(sessionId, options = {}) {
1678
1746
  buffered: stdin.readableLength,
1679
1747
  });
1680
1748
  try {
1681
- stdin.removeAllListeners('readable');
1682
- stdin.removeAllListeners('data');
1683
- stdin.pause();
1749
+ detachHandoffStdin(stdin);
1684
1750
  }
1685
1751
  catch {
1686
1752
  // Diagnosis/mitigation only.
1687
1753
  }
1688
1754
  if (watchdogTicks === 15) {
1689
1755
  clearInterval(watchdog);
1690
- try {
1691
- // Terminal safeguard: a destroyed stream can never be resumed by
1692
- // any late re-attachment. The child holds its own inherited
1693
- // handle, so closing ours does not affect it.
1694
- process.stdin.destroy();
1695
- logRestartEvent('parent: stdin destroyed after watchdog');
1696
- }
1697
- catch {
1698
- // Best effort.
1699
- }
1756
+ logRestartEvent('parent: stdin detached after watchdog (kept raw, not destroyed)');
1700
1757
  }
1701
1758
  }, 1000);
1702
1759
  watchdog.unref();
@@ -1 +1 @@
1
- {"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8DH;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuFlE"}
1
+ {"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/utils/bmp.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8DH;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4FlE"}
@@ -74,6 +74,10 @@ export async function bmpToPng(bmp) {
74
74
  return null;
75
75
  if (bpp !== 24 && bpp !== 32)
76
76
  return null;
77
+ // High-colour DIBs may still carry a colour table. Without a file header
78
+ // its length is ambiguous; a BMP file instead locates pixels via bfOffBits.
79
+ if (!hasFileHeader && bmp.readUInt32LE(dib + 32) !== 0)
80
+ return null; // biClrUsed
77
81
  if (compression !== BI_RGB && compression !== BI_BITFIELDS && compression !== BI_ALPHABITFIELDS)
78
82
  return null;
79
83
  if (bpp === 24 && compression !== BI_RGB)
@@ -100,7 +104,10 @@ export async function bmpToPng(bmp) {
100
104
  if (bpp === 32 && (redMask === 0 || greenMask === 0 || blueMask === 0))
101
105
  return null;
102
106
  const declaredOffset = hasFileHeader ? bmp.readUInt32LE(10) : 0;
103
- const pixelOffset = declaredOffset > 0 ? declaredOffset : dib + headerSize + maskBytes;
107
+ const minimumOffset = dib + headerSize + maskBytes;
108
+ if (hasFileHeader && declaredOffset < minimumOffset)
109
+ return null;
110
+ const pixelOffset = hasFileHeader ? declaredOffset : minimumOffset;
104
111
  const stride = Math.floor((bpp * width + 31) / 32) * 4;
105
112
  if (pixelOffset + stride * height > bmp.length)
106
113
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../src/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAeH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAA;AAE5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BtD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAIvE;AAWD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYtE;AAiDD;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAS9C;AAoeD;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAStD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,I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AI,IAAI,CAG5C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,IAAI,CAEhE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAcvE"}
@@ -239,8 +239,18 @@ function spawnForBuffer(file, args, timeout = CLIPBOARD_TIMEOUT) {
239
239
  const child = spawn(file, [...args], { timeout });
240
240
  const chunks = [];
241
241
  child.stdout.on('data', (chunk) => chunks.push(chunk));
242
- child.on('error', () => resolve({ code: 1, stdout: Buffer.concat(chunks) }));
243
- child.on('close', code => resolve({ code, stdout: Buffer.concat(chunks) }));
242
+ child.stderr.resume(); // A full stderr pipe must not block the child.
243
+ // Node's spawn timeout sends SIGTERM only; an uncooperative helper can
244
+ // otherwise keep the paste Promise pending forever.
245
+ const hardKill = setTimeout(() => child.kill('SIGKILL'), timeout + 1000);
246
+ child.on('error', () => {
247
+ clearTimeout(hardKill);
248
+ resolve({ code: 1, stdout: Buffer.concat(chunks) });
249
+ });
250
+ child.on('close', code => {
251
+ clearTimeout(hardKill);
252
+ resolve({ code, stdout: Buffer.concat(chunks) });
253
+ });
244
254
  child.stdin.end();
245
255
  });
246
256
  }
@@ -490,12 +500,15 @@ function buildWslPsScript() {
490
500
  return [
491
501
  "$ErrorActionPreference='SilentlyContinue'",
492
502
  '[Console]::OutputEncoding=[System.Text.Encoding]::UTF8',
503
+ // Only CLIPBRD_E_CANT_OPEN is retryable. A missing format or empty
504
+ // clipboard is not a reason to cold-start PowerShell three times.
505
+ 'function Test-ClipboardBusy($e){while($e){if($e.HResult -eq -2147221040){return $true};$e=$e.InnerException};return $false}',
493
506
  '$files=$null',
494
- 'try { $files = Get-Clipboard -Format FileDropList -ErrorAction Stop } catch {}',
507
+ 'try { $files = Get-Clipboard -Format FileDropList -ErrorAction Stop } catch { if(Test-ClipboardBusy $_.Exception){exit 75} }',
495
508
  'if($files){foreach($f in $files){Write-Output ("FILE:"+$f.FullName)}}',
496
509
  '$saved=$false',
497
- 'if(-not $files){try { Add-Type -AssemblyName System.Drawing; $img=Get-Clipboard -Format Image -ErrorAction Stop; if($img){$ms=New-Object System.IO.MemoryStream; $img.Save($ms,[System.Drawing.Imaging.ImageFormat]::Png); $img.Dispose(); Write-Output ("IMAGE64:"+[Convert]::ToBase64String($ms.ToArray())); $saved=$true} } catch {} }',
498
- 'if(-not $files -and -not $saved){$t=Get-Clipboard -Raw; if($null -ne $t){Write-Output ("TEXT64:"+[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($t)))}}',
510
+ 'if(-not $files){try { Add-Type -AssemblyName System.Drawing; $img=Get-Clipboard -Format Image -ErrorAction Stop; if($img){$ms=New-Object System.IO.MemoryStream; $img.Save($ms,[System.Drawing.Imaging.ImageFormat]::Png); $img.Dispose(); Write-Output ("IMAGE64:"+[Convert]::ToBase64String($ms.ToArray())); $saved=$true} } catch { if(Test-ClipboardBusy $_.Exception){exit 75} } }',
511
+ 'if(-not $files -and -not $saved){try { $t=Get-Clipboard -Raw -ErrorAction Stop; if($null -ne $t){Write-Output ("TEXT64:"+[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($t)))} } catch { if(Test-ClipboardBusy $_.Exception){exit 75} } }',
499
512
  ].join('; ');
500
513
  }
501
514
  /**
@@ -505,7 +518,13 @@ function buildWslPsScript() {
505
518
  * clipboard holds nothing usable.
506
519
  */
507
520
  async function readClipboardWsl() {
508
- const result = await spawnForBuffer('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', buildWslPsScript()], WSL_POWERSHELL_TIMEOUT);
521
+ let result;
522
+ for (let attempt = 0;; attempt += 1) {
523
+ result = await spawnForBuffer('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', buildWslPsScript()], WSL_POWERSHELL_TIMEOUT);
524
+ if (result.code !== 75 || attempt >= 2)
525
+ break;
526
+ await new Promise(resolve => setTimeout(resolve, 150));
527
+ }
509
528
  if (result.code !== 0)
510
529
  return null;
511
530
  const files = [];
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"AAgBA,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB,GAAG,OAAO,CAUxF"}
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../../src/utils/credentials.ts"],"names":[],"mappings":"AAgBA,kFAAkF;AAClF,wBAAgB,UAAU,IAAI,MAAM,CAMnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB,GAAG,OAAO,CAUxF"}
@@ -15,7 +15,11 @@ import { homedir } from 'node:os';
15
15
  import { join } from 'node:path';
16
16
  /** The DSH home that owns the credential store, following the launcher's rule. */
17
17
  export function dshHomeDir() {
18
- return process.env.DSH_HOME ?? join(homedir(), '.dsh');
18
+ // `||`, not `??`: the launcher resolves the same root as
19
+ // `process.env.DSH_HOME || join(homedir(), '.dsh')` (bin/dsh-tui.js), so an
20
+ // empty `DSH_HOME=` — a common way to spell "unset" in scripts — must fall
21
+ // back here too instead of turning every path into a relative one.
22
+ return process.env.DSH_HOME || join(homedir(), '.dsh');
19
23
  }
20
24
  /**
21
25
  * Whether the DSH credential store declares a reference by this name.