@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
@@ -5,11 +5,13 @@ import { createCommandCompletions } from './channel/command-completions.js';
5
5
  import { createLocalActions } from './channel/local-actions.js';
6
6
  import { createDetachedHandleFactory } from './channel/lifetime-resources.js';
7
7
  import { createContextBookkeeping } from './channel/context-bookkeeping.js';
8
+ import { resolveContextOccupancy } from './context-occupancy.js';
8
9
  import { createChannelActionMethods, createChannelActionReadiness } from './channel/action-readiness.js';
9
10
  import { createBindingEvents } from './channel/binding-events.js';
10
11
  import { createInitialChannelView } from './channel/state.js';
11
12
  import { createChannelProjection } from './channel/projection.js';
12
13
  import { createManualCompaction } from './channel/compaction.js';
14
+ import { agentCapabilityEvidence, annotateCommandCapabilities, resolveAgentCapabilities } from './channel/capabilities.js';
13
15
  import { createSessionAdoption } from './channel/session-adoption.js';
14
16
  import { createRewindPromptAction } from './channel/session-actions.js';
15
17
  import { createForkSessionAction } from './channel/session-fork.js';
@@ -32,6 +34,7 @@ import { createSkillCatalog } from './channel/skill-catalog.js';
32
34
  import { createBackgroundCurrentAction } from './channel/background-action.js';
33
35
  import { createSubagentProjection } from './channel/subagent-projection.js';
34
36
  import { createChannelNotifications } from './channel/notifications.js';
37
+ import { createAttachedContextRegistry } from './channel/attached-context.js';
35
38
  import { createSelectionAttachments } from './channel/ide-selection.js';
36
39
  import { IdeChannel, ideLockDir } from './ide-channel.js';
37
40
  import { adapterRuntimeFor } from '../adapter/kernel/runtime-context.js';
@@ -276,8 +279,13 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
276
279
  void ideChannel.rebind(state.cwd).catch(() => { });
277
280
  };
278
281
  const selectionAttachments = createSelectionAttachments();
282
+ // "Send to Chat" (side-panel §6.7): staged panel contexts are a session-scoped
283
+ // projection like the selection above — the registry writes through the live
284
+ // state (so the shared `session-projection reset` clears them with everything
285
+ // else) and the submit path takes them off in one step.
286
+ const contextRegistry = createAttachedContextRegistry(() => state, () => state.emit());
279
287
  const composer = createComposerImages(ctx, owner, { generation: () => state.agentBindingGeneration });
280
- const inputDelivery = createInputDelivery(ctx, owner, binding, () => state, (...args) => notify(...args), trackPending, untrackPending, composer, () => currentSelection, (messageId, info) => selectionAttachments.remember(messageId, info));
288
+ const inputDelivery = createInputDelivery(ctx, owner, binding, () => state, (...args) => notify(...args), trackPending, untrackPending, composer, () => currentSelection, (messageId, info) => selectionAttachments.remember(messageId, info), () => contextRegistry.consume());
281
289
  const { dispatchUserText, deliverUserText, retireAttachment, withDecisionPending, clearStagedImages } = inputDelivery;
282
290
  /**
283
291
  * The `tui/session-switch` decision event (pi's `session_before_switch`),
@@ -391,6 +399,13 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
391
399
  return actionReadiness.getReadyActions();
392
400
  };
393
401
  const actionMethods = createChannelActionMethods(getReadyActions);
402
+ // Capability facts for the bound agent (channel/capabilities.ts). Reads are
403
+ // service lookups, so both consumers may call it freely: the public
404
+ // `capabilities()` accessor and the command-list annotation below.
405
+ const capabilitiesOf = () => resolveAgentCapabilities(agentCapabilityEvidence(ctx, binding.agent));
406
+ // Official occupancy source (absent in compositions without the token meter):
407
+ // `read` is a cached lookup, so the accessor on the state below stays cheap.
408
+ const contextPressure = options.contextPressure;
394
409
  const state = {
395
410
  ...createInputActions(() => state, () => binding.agent, owner, inputConvergence, composer, (text, placement, images) => dispatchUserText(text, placement, images), (command, includeInContext) => getReadyActions().runLocalCommand(command, includeInContext)),
396
411
  subscribe: emitter.subscribe,
@@ -423,7 +438,21 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
423
438
  get minimal() {
424
439
  return state.minimalUi;
425
440
  },
426
- commandList: LOCAL_COMMANDS,
441
+ /**
442
+ * Context occupancy is DERIVED here, not stored: it combines the cached
443
+ * host projection value (a map lookup) with this channel's own fallback
444
+ * sample and capacity. An accessor is what keeps "one source of truth"
445
+ * true without republishing a derived value from every mutation site that
446
+ * can move the window or the sample (replay, resume, model switch, reset).
447
+ */
448
+ get contextOccupancy() {
449
+ return resolveContextOccupancy(contextPressure?.read(state.sessionId), state.lastUsage, state.contextWindow);
450
+ },
451
+ // Annotated from the start: Help and `/` completion read `commandList`
452
+ // before the first skill-catalog refresh publishes a new one, and a command
453
+ // whose capability is missing must never look usable in that window.
454
+ commandList: annotateCommandCapabilities(LOCAL_COMMANDS, capabilitiesOf()),
455
+ capabilities: capabilitiesOf,
427
456
  ...actionMethods,
428
457
  subagentControl,
429
458
  jobControl,
@@ -434,6 +463,11 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
434
463
  discardStagedImage: composer.discardStagedImage,
435
464
  stagedImage: composer.stagedImage,
436
465
  stagedImageLimits: composer.stagedImageLimits,
466
+ // "Send to Chat" projection + actions (see `contextRegistry` above; its
467
+ // methods close over the registry's own state, so they carry no `this`).
468
+ attachedContexts: [],
469
+ attachContext: contextRegistry.attach,
470
+ detachContext: contextRegistry.detach,
437
471
  /**
438
472
  * The `tui/rewind-prompt` decision event (pi's `session_before_fork`):
439
473
  * fired when the rewind picker confirms a message, before any fork
@@ -503,6 +537,18 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
503
537
  // callback. The renderer lease binds its external authority later, but this
504
538
  // owner already makes teardown and construction failure fail closed.
505
539
  registerChannelOwner(state, owner);
540
+ // The projection's change feed is the only thing that can move occupancy
541
+ // between session events (a compaction rewriting the surface, the prompt
542
+ // growing before the next request); republish so the footer, the status
543
+ // commands and the warning read the fresh value immediately. The store is
544
+ // host-wide, so the emit is unconditional — the accessor already ignores
545
+ // another session's value.
546
+ if (contextPressure !== undefined) {
547
+ owner.own(contextPressure.subscribe(() => {
548
+ if (owner.current())
549
+ state.emit();
550
+ }));
551
+ }
506
552
  // Agent-view is activated after the complete state/action surface exists:
507
553
  // no roster callback or persistence continuation can observe an unbound UI.
508
554
  agentView = createAgentViewProjection(ctx, {
@@ -538,7 +584,13 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
538
584
  commandService,
539
585
  agent: () => binding.agent,
540
586
  cwd: () => state.cwd,
541
- setCommands(commands) { state.commandList = commands; state.emit(); },
587
+ setCommands(commands) {
588
+ // Annotate before publishing: Help and `/` completion both read
589
+ // `commandList`, so a command whose capability is missing says so
590
+ // instead of looking usable and failing on use.
591
+ state.commandList = annotateCommandCapabilities(commands, capabilitiesOf());
592
+ state.emit();
593
+ },
542
594
  commandDescriptions: name => commandTrees?.descriptions(name),
543
595
  // Attached-context pass-through (T03 consumes the third parameter in the
544
596
  // fallback branch): the skill catalog never loses the FIFO/decision fence.
@@ -715,6 +767,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
715
767
  binding,
716
768
  state,
717
769
  seedActivity: options.seedActivity,
770
+ seedContextOccupancy: options.seedContextOccupancy,
718
771
  inputConvergence,
719
772
  selection,
720
773
  modelActions,
@@ -0,0 +1,204 @@
1
+ /**
2
+ * Official context occupancy for the footer, the status commands and the
3
+ * context-low warning.
4
+ *
5
+ * Occupancy answers "how full is the window", which is NOT the question the
6
+ * provider usage of the last settled `assistant/message` answers. That sample
7
+ * has two blind spots this module removes:
8
+ *
9
+ * 1. **It is a sample of a *past* request.** A rejected/overflowed request
10
+ * writes no `assistant/message`, so the sample stays small exactly when the
11
+ * provider says the prompt is too big.
12
+ * 2. **It cannot see a compaction.** A checkpoint replaces the surface without
13
+ * reporting usage of its own.
14
+ *
15
+ * DSH's token meter already projects both away: `contextPressure.projectedTokens`
16
+ * is the provider-anchored sample plus the signed surface movement since it was
17
+ * taken, i.e. the occupancy of the NEXT request. The Web UI reads that value
18
+ * through `ui-conversation`'s `contextOccupancy()`; this module reads the same
19
+ * projection through the same legal seam `activity-store.ts` uses
20
+ * (`ctx.inject(['sessionProjections'])` + the structural registry duck type +
21
+ * a cleanup on the injected fiber).
22
+ *
23
+ * Two properties shape the transport here:
24
+ *
25
+ * 1. **The change feed carries the whole value.** `onChanged` hands one unit's
26
+ * schema-validated wire view (`session-projection/index.d.ts`), so this
27
+ * module never folds history to stay current — only the session BIND reads
28
+ * one snapshot, because a value that has not changed since it was published
29
+ * never arrives again and a resumed session would otherwise show nothing.
30
+ * 2. **Absence is normal.** A bare `cordis.yml` composition has no dsh-base
31
+ * bundle and therefore no token meter; the projection key is simply not
32
+ * registered. The store stays empty and the channel falls back to the
33
+ * last-request sample it has always shown (see `resolveContextOccupancy`).
34
+ * @module dsh-tui/dsh-adapter/context-occupancy
35
+ */
36
+ import type { Context } from '@deepseek-ai/cordis';
37
+ import type { ContextOccupancy } from '../adapter/ports/channel-view.js';
38
+ import type { ProjectionRegistryLike } from './activity-store.js';
39
+ /** The projection key the host token meter publishes. */
40
+ export declare const CONTEXT_PRESSURE_PROJECTION_KEY = "contextPressure";
41
+ /**
42
+ * The official `contextPressure` wire value.
43
+ *
44
+ * Structural copy of `@deepseek-ai/dsh-token-meter`'s `ContextPressureProjection`:
45
+ * the value is host data, so this app declares the shape it reads instead of
46
+ * importing the meter (the same discipline `activity-store.ts` applies to
47
+ * `workingActivity`).
48
+ */
49
+ export interface ContextPressureView {
50
+ /** Provider-reported prompt size (uncached input + cache reads/writes) of the newest request. */
51
+ readonly pressureTokens?: number;
52
+ /** What the NEXT request's prompt would cost: {@link pressureTokens} plus the surface's movement since. */
53
+ readonly projectedTokens?: number;
54
+ /** Newest recorded route capacity, when an adapter advertised one. */
55
+ readonly contextWindow?: number;
56
+ }
57
+ /**
58
+ * The reader the channel gets: a cached lookup plus a change feed.
59
+ *
60
+ * Reading is a map hit (never a fold), so a render may call it freely; the
61
+ * subscription is what lets the channel republish when the projection moves
62
+ * between session events (compaction, surface growth).
63
+ */
64
+ export interface ContextPressureSource {
65
+ read(sessionId: string): ContextPressureView | undefined;
66
+ subscribe(listener: () => void): () => void;
67
+ }
68
+ /**
69
+ * Narrow one projection value: anything that is not a context-pressure view is
70
+ * dropped rather than rendered half-formed.
71
+ *
72
+ * A well-formed value is passed THROUGH (not copied), the same discipline
73
+ * `activity-store.ts` applies: the host reuses the wire object while its state
74
+ * is unchanged, so identity is the store's change test, and a copy would make
75
+ * every read look like a change.
76
+ * @param value - Raw projection value.
77
+ * @returns the value as a context-pressure view, or `undefined`.
78
+ */
79
+ export declare function asContextPressureView(value: unknown): ContextPressureView | undefined;
80
+ /**
81
+ * The official numerator: `projectedTokens ?? pressureTokens`.
82
+ *
83
+ * This is the precedence `ui-conversation/src/client/context-occupancy.ts`
84
+ * uses. `projectedTokens` is preferred because it is the only field that
85
+ * answers for the next request; `pressureTokens` is the bare sample and is all
86
+ * a session whose surface total is unknown can offer.
87
+ * @param view - The projection value.
88
+ * @returns the occupancy numerator, or `undefined` before any provider sample.
89
+ */
90
+ export declare function contextPressureUsedTokens(view: ContextPressureView): number | undefined;
91
+ /**
92
+ * Resolve the ONE occupancy reading the footer, the segmented bar, the working
93
+ * line's pressure prefix, the status commands and the context-low warning share.
94
+ *
95
+ * DIVERGENCE FROM THE OFFICIAL RENDERER (deliberate, see the PR body): the Web
96
+ * UI renders nothing when the projection carries neither pressure nor a window.
97
+ * The TUI keeps its pre-projection sample readout instead, so a bare
98
+ * `cordis.yml` composition (no dsh-base bundle ⇒ no token meter) does not
99
+ * silently lose a number it has always shown; {@link ContextOccupancy.source}
100
+ * names which path answered. A composition WITH a meter — every normal
101
+ * deployment, where the base bundle mounts token-meter on the host plane —
102
+ * takes the projection branch as soon as a request reports usage, and the
103
+ * fallback becomes unreachable.
104
+ * @param projected - Cached `contextPressure` value, `undefined` without a meter.
105
+ * @param sample - Last settled request's billed usage (the fallback numerator).
106
+ * @param requestWindow - `request/context` capacity (the fallback denominator).
107
+ * @returns the reading, or `undefined` when neither path knows anything.
108
+ */
109
+ export declare function resolveContextOccupancy(projected: ContextPressureView | undefined, sample: {
110
+ input: number;
111
+ cacheRead: number;
112
+ cacheWrite: number;
113
+ } | undefined, requestWindow: number | undefined): ContextOccupancy | undefined;
114
+ /**
115
+ * The latest `contextPressure` value for the session on screen.
116
+ *
117
+ * Effectively single-current, mirroring {@link ActivityStore}: binding a
118
+ * session names the one the UI shows, and every other id is dropped — the
119
+ * projection feed is host-wide, and a background session must not overwrite the
120
+ * footer of the session on screen.
121
+ *
122
+ * The store holds VALUES, never sessions to re-read: the feed delivers the
123
+ * whole value, so there is nothing to poll. Only {@link seed} reads a snapshot,
124
+ * and only because a resumed session's value may not have changed (and
125
+ * therefore never been published) since it was last folded.
126
+ */
127
+ export declare class ContextOccupancyStore implements ContextPressureSource {
128
+ private readonly values;
129
+ private readonly listeners;
130
+ /** The session the UI is showing (the last {@link seed}); the only id kept. */
131
+ private currentId;
132
+ /** Session object behind {@link currentId}, so a late registry can still seed. */
133
+ private currentSession;
134
+ /** Host registry, remembered so a bind can read a baseline on demand. */
135
+ private registry;
136
+ /** Read failures are reported once: a broken registry must not spam the log. */
137
+ private warned;
138
+ private readonly warn;
139
+ constructor(warn?: (message: string) => void);
140
+ /**
141
+ * Remember the host registry. A registry that arrives after the session bound
142
+ * is immediately used to read the baseline {@link seed} could not: the unit
143
+ * and its registry are mounted by other plugins, so the order is not ours.
144
+ * @param registry - The host projection registry.
145
+ */
146
+ attachRegistry(registry: ProjectionRegistryLike): void;
147
+ /**
148
+ * Bind one session and read its current projection value once.
149
+ *
150
+ * The bind also defines the session on screen: every other id is pruned, so a
151
+ * later background event can no longer fill this store.
152
+ * @param session - Session being bound.
153
+ */
154
+ seed(session: unknown): void;
155
+ /**
156
+ * Record one value from the projection change feed.
157
+ * @param sessionId - Session the value belongs to.
158
+ * @param value - The published wire value.
159
+ */
160
+ update(sessionId: string, value: unknown): void;
161
+ /** The current value for one session, stable between updates. */
162
+ read(sessionId: string): ContextPressureView | undefined;
163
+ /** Subscribe to value changes; returns the unsubscribe function. */
164
+ subscribe(listener: () => void): () => void;
165
+ /**
166
+ * Report a failed registry read once. The sink is the composition root's
167
+ * logger — this module stays free of cordis types.
168
+ * @param error - What the failed read threw.
169
+ */
170
+ noteReadFailure(error: unknown): void;
171
+ /** Store one already-narrowed value for the current session and emit on change. */
172
+ private remember;
173
+ /** Drop every id that is not the current one; emit when a value went. */
174
+ private pruneToCurrent;
175
+ private emit;
176
+ }
177
+ /**
178
+ * Wire one store to the host's projection registry.
179
+ *
180
+ * Registration is deferred through `inject` because the plugin that *publishes*
181
+ * the unit is mounted alongside this one: the registry may not exist yet, and
182
+ * the unit may not be registered until later still. Both absences are normal —
183
+ * a composition without the token meter simply never fills the store, and the
184
+ * channel falls back to its own sample.
185
+ *
186
+ * The feed is event-driven and carries the whole value, so a change costs one
187
+ * narrow + one map write. A long resumed session (thousands of replayed events)
188
+ * therefore pays O(changes of this unit) and never a per-event fold; rendering
189
+ * pays a map lookup, never a `snapshot()`.
190
+ * @param ctx - Host context of the composition root.
191
+ * @param store - Store to fill.
192
+ */
193
+ export declare function attachContextPressureProjection(ctx: Context, store: ContextOccupancyStore): void;
194
+ /**
195
+ * Create the composition root's occupancy store and wire it to the host.
196
+ *
197
+ * Unlike the activity store there is no config gate: occupancy feeds the
198
+ * footer's ctx field, the segmented bar and the context-low warning, so hiding
199
+ * one surface must not stop the others from being correct.
200
+ * @param ctx - Host context of the composition root.
201
+ * @returns the store the channel reads from.
202
+ */
203
+ export declare function createContextOccupancyStore(ctx: Context): ContextOccupancyStore;
204
+ //# sourceMappingURL=context-occupancy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-occupancy.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/context-occupancy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAGxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,yDAAyD;AACzD,eAAO,MAAM,+BAA+B,oBAAoB,CAAA;AAEhE;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,iGAAiG;IACjG,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC,2GAA2G;IAC3G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAA;IACxD,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;CAC5C;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,SAAS,CAYrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAEvF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,mBAAmB,GAAG,SAAS,EAC1C,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,EAC5E,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,gBAAgB,GAAG,SAAS,CAY9B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAsB,YAAW,qBAAqB;IACjE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAChE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,+EAA+E;IAC/E,OAAO,CAAC,SAAS,CAAoB;IACrC,kFAAkF;IAClF,OAAO,CAAC,cAAc,CAAS;IAC/B,yEAAyE;IACzE,OAAO,CAAC,QAAQ,CAAoC;IACpD,gFAAgF;IAChF,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAyC;gBAElD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAI5C;;;;;OAKG;IACH,cAAc,CAAC,QAAQ,EAAE,sBAAsB,GAAG,IAAI;IAKtD;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAe5B;;;;OAIG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAI/C,iEAAiE;IACjE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAIxD,oEAAoE;IACpE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK3C;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAOrC,mFAAmF;IACnF,OAAO,CAAC,QAAQ;IAiBhB,yEAAyE;IACzE,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,IAAI;CAGb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,qBAAqB,GAAG,IAAI,CAwBhG;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,qBAAqB,CAI/E"}
@@ -0,0 +1,299 @@
1
+ /**
2
+ * Official context occupancy for the footer, the status commands and the
3
+ * context-low warning.
4
+ *
5
+ * Occupancy answers "how full is the window", which is NOT the question the
6
+ * provider usage of the last settled `assistant/message` answers. That sample
7
+ * has two blind spots this module removes:
8
+ *
9
+ * 1. **It is a sample of a *past* request.** A rejected/overflowed request
10
+ * writes no `assistant/message`, so the sample stays small exactly when the
11
+ * provider says the prompt is too big.
12
+ * 2. **It cannot see a compaction.** A checkpoint replaces the surface without
13
+ * reporting usage of its own.
14
+ *
15
+ * DSH's token meter already projects both away: `contextPressure.projectedTokens`
16
+ * is the provider-anchored sample plus the signed surface movement since it was
17
+ * taken, i.e. the occupancy of the NEXT request. The Web UI reads that value
18
+ * through `ui-conversation`'s `contextOccupancy()`; this module reads the same
19
+ * projection through the same legal seam `activity-store.ts` uses
20
+ * (`ctx.inject(['sessionProjections'])` + the structural registry duck type +
21
+ * a cleanup on the injected fiber).
22
+ *
23
+ * Two properties shape the transport here:
24
+ *
25
+ * 1. **The change feed carries the whole value.** `onChanged` hands one unit's
26
+ * schema-validated wire view (`session-projection/index.d.ts`), so this
27
+ * module never folds history to stay current — only the session BIND reads
28
+ * one snapshot, because a value that has not changed since it was published
29
+ * never arrives again and a resumed session would otherwise show nothing.
30
+ * 2. **Absence is normal.** A bare `cordis.yml` composition has no dsh-base
31
+ * bundle and therefore no token meter; the projection key is simply not
32
+ * registered. The store stays empty and the channel falls back to the
33
+ * last-request sample it has always shown (see `resolveContextOccupancy`).
34
+ * @module dsh-tui/dsh-adapter/context-occupancy
35
+ */
36
+ /** The projection key the host token meter publishes. */
37
+ export const CONTEXT_PRESSURE_PROJECTION_KEY = 'contextPressure';
38
+ function finiteNumber(value) {
39
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
40
+ }
41
+ /**
42
+ * Narrow one projection value: anything that is not a context-pressure view is
43
+ * dropped rather than rendered half-formed.
44
+ *
45
+ * A well-formed value is passed THROUGH (not copied), the same discipline
46
+ * `activity-store.ts` applies: the host reuses the wire object while its state
47
+ * is unchanged, so identity is the store's change test, and a copy would make
48
+ * every read look like a change.
49
+ * @param value - Raw projection value.
50
+ * @returns the value as a context-pressure view, or `undefined`.
51
+ */
52
+ export function asContextPressureView(value) {
53
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
54
+ return undefined;
55
+ const record = value;
56
+ const fields = ['pressureTokens', 'projectedTokens', 'contextWindow'];
57
+ let known = false;
58
+ for (const field of fields) {
59
+ const raw = record[field];
60
+ if (raw === undefined)
61
+ continue;
62
+ if (finiteNumber(raw) === undefined)
63
+ return undefined;
64
+ known = true;
65
+ }
66
+ return known ? value : undefined;
67
+ }
68
+ /**
69
+ * The official numerator: `projectedTokens ?? pressureTokens`.
70
+ *
71
+ * This is the precedence `ui-conversation/src/client/context-occupancy.ts`
72
+ * uses. `projectedTokens` is preferred because it is the only field that
73
+ * answers for the next request; `pressureTokens` is the bare sample and is all
74
+ * a session whose surface total is unknown can offer.
75
+ * @param view - The projection value.
76
+ * @returns the occupancy numerator, or `undefined` before any provider sample.
77
+ */
78
+ export function contextPressureUsedTokens(view) {
79
+ return view.projectedTokens ?? view.pressureTokens;
80
+ }
81
+ /**
82
+ * Resolve the ONE occupancy reading the footer, the segmented bar, the working
83
+ * line's pressure prefix, the status commands and the context-low warning share.
84
+ *
85
+ * DIVERGENCE FROM THE OFFICIAL RENDERER (deliberate, see the PR body): the Web
86
+ * UI renders nothing when the projection carries neither pressure nor a window.
87
+ * The TUI keeps its pre-projection sample readout instead, so a bare
88
+ * `cordis.yml` composition (no dsh-base bundle ⇒ no token meter) does not
89
+ * silently lose a number it has always shown; {@link ContextOccupancy.source}
90
+ * names which path answered. A composition WITH a meter — every normal
91
+ * deployment, where the base bundle mounts token-meter on the host plane —
92
+ * takes the projection branch as soon as a request reports usage, and the
93
+ * fallback becomes unreachable.
94
+ * @param projected - Cached `contextPressure` value, `undefined` without a meter.
95
+ * @param sample - Last settled request's billed usage (the fallback numerator).
96
+ * @param requestWindow - `request/context` capacity (the fallback denominator).
97
+ * @returns the reading, or `undefined` when neither path knows anything.
98
+ */
99
+ export function resolveContextOccupancy(projected, sample, requestWindow) {
100
+ const contextWindow = projected?.contextWindow ?? requestWindow;
101
+ const projectedUsed = projected === undefined ? undefined : contextPressureUsedTokens(projected);
102
+ if (projectedUsed !== undefined) {
103
+ return { usedTokens: projectedUsed, contextWindow, source: 'projection' };
104
+ }
105
+ if (sample === undefined)
106
+ return undefined;
107
+ return {
108
+ usedTokens: sample.input + sample.cacheRead + sample.cacheWrite,
109
+ contextWindow,
110
+ source: 'sample',
111
+ };
112
+ }
113
+ /**
114
+ * The latest `contextPressure` value for the session on screen.
115
+ *
116
+ * Effectively single-current, mirroring {@link ActivityStore}: binding a
117
+ * session names the one the UI shows, and every other id is dropped — the
118
+ * projection feed is host-wide, and a background session must not overwrite the
119
+ * footer of the session on screen.
120
+ *
121
+ * The store holds VALUES, never sessions to re-read: the feed delivers the
122
+ * whole value, so there is nothing to poll. Only {@link seed} reads a snapshot,
123
+ * and only because a resumed session's value may not have changed (and
124
+ * therefore never been published) since it was last folded.
125
+ */
126
+ export class ContextOccupancyStore {
127
+ values = new Map();
128
+ listeners = new Set();
129
+ /** The session the UI is showing (the last {@link seed}); the only id kept. */
130
+ currentId;
131
+ /** Session object behind {@link currentId}, so a late registry can still seed. */
132
+ currentSession;
133
+ /** Host registry, remembered so a bind can read a baseline on demand. */
134
+ registry;
135
+ /** Read failures are reported once: a broken registry must not spam the log. */
136
+ warned = false;
137
+ warn;
138
+ constructor(warn) {
139
+ this.warn = warn;
140
+ }
141
+ /**
142
+ * Remember the host registry. A registry that arrives after the session bound
143
+ * is immediately used to read the baseline {@link seed} could not: the unit
144
+ * and its registry are mounted by other plugins, so the order is not ours.
145
+ * @param registry - The host projection registry.
146
+ */
147
+ attachRegistry(registry) {
148
+ this.registry = registry;
149
+ if (this.currentSession !== undefined)
150
+ this.seed(this.currentSession);
151
+ }
152
+ /**
153
+ * Bind one session and read its current projection value once.
154
+ *
155
+ * The bind also defines the session on screen: every other id is pruned, so a
156
+ * later background event can no longer fill this store.
157
+ * @param session - Session being bound.
158
+ */
159
+ seed(session) {
160
+ if (session === null || session === undefined)
161
+ return;
162
+ this.currentId = String(session.id);
163
+ this.currentSession = session;
164
+ this.pruneToCurrent();
165
+ const registry = this.registry;
166
+ if (registry === undefined)
167
+ return;
168
+ try {
169
+ const values = registry.snapshot(session, [CONTEXT_PRESSURE_PROJECTION_KEY]).values;
170
+ this.remember(this.currentId, asContextPressureView(values[CONTEXT_PRESSURE_PROJECTION_KEY]));
171
+ }
172
+ catch (error) {
173
+ this.noteReadFailure(error);
174
+ }
175
+ }
176
+ /**
177
+ * Record one value from the projection change feed.
178
+ * @param sessionId - Session the value belongs to.
179
+ * @param value - The published wire value.
180
+ */
181
+ update(sessionId, value) {
182
+ this.remember(sessionId, asContextPressureView(value));
183
+ }
184
+ /** The current value for one session, stable between updates. */
185
+ read(sessionId) {
186
+ return this.values.get(sessionId);
187
+ }
188
+ /** Subscribe to value changes; returns the unsubscribe function. */
189
+ subscribe(listener) {
190
+ this.listeners.add(listener);
191
+ return () => { this.listeners.delete(listener); };
192
+ }
193
+ /**
194
+ * Report a failed registry read once. The sink is the composition root's
195
+ * logger — this module stays free of cordis types.
196
+ * @param error - What the failed read threw.
197
+ */
198
+ noteReadFailure(error) {
199
+ if (this.warned)
200
+ return;
201
+ this.warned = true;
202
+ const detail = error instanceof Error ? error.message : String(error);
203
+ this.warn?.(`dsh-tui: context-pressure projection read failed: ${detail}`);
204
+ }
205
+ /** Store one already-narrowed value for the current session and emit on change. */
206
+ remember(sessionId, view) {
207
+ if (this.currentId !== undefined && sessionId !== this.currentId)
208
+ return;
209
+ const previous = this.values.get(sessionId);
210
+ if (view === undefined) {
211
+ if (previous === undefined)
212
+ return;
213
+ this.values.delete(sessionId);
214
+ this.emit();
215
+ return;
216
+ }
217
+ // The host reuses the view reference while its state is unchanged
218
+ // (`Object.is` suppression in the registry), so an identity check is the
219
+ // whole change test.
220
+ if (previous === view)
221
+ return;
222
+ this.values.set(sessionId, view);
223
+ this.emit();
224
+ }
225
+ /** Drop every id that is not the current one; emit when a value went. */
226
+ pruneToCurrent() {
227
+ if (this.currentId === undefined)
228
+ return;
229
+ let removed = false;
230
+ for (const id of [...this.values.keys()]) {
231
+ if (id === this.currentId)
232
+ continue;
233
+ this.values.delete(id);
234
+ removed = true;
235
+ }
236
+ if (removed)
237
+ this.emit();
238
+ }
239
+ emit() {
240
+ for (const listener of [...this.listeners])
241
+ listener();
242
+ }
243
+ }
244
+ /**
245
+ * Wire one store to the host's projection registry.
246
+ *
247
+ * Registration is deferred through `inject` because the plugin that *publishes*
248
+ * the unit is mounted alongside this one: the registry may not exist yet, and
249
+ * the unit may not be registered until later still. Both absences are normal —
250
+ * a composition without the token meter simply never fills the store, and the
251
+ * channel falls back to its own sample.
252
+ *
253
+ * The feed is event-driven and carries the whole value, so a change costs one
254
+ * narrow + one map write. A long resumed session (thousands of replayed events)
255
+ * therefore pays O(changes of this unit) and never a per-event fold; rendering
256
+ * pays a map lookup, never a `snapshot()`.
257
+ * @param ctx - Host context of the composition root.
258
+ * @param store - Store to fill.
259
+ */
260
+ export function attachContextPressureProjection(ctx, store) {
261
+ ctx.inject(['sessionProjections'], ((projectionCtx) => {
262
+ const registry = projectionCtx.sessionProjections;
263
+ if (registry === undefined)
264
+ return;
265
+ store.attachRegistry(registry);
266
+ let offFeed;
267
+ try {
268
+ offFeed = registry.onChanged((session, key, value) => {
269
+ if (key !== CONTEXT_PRESSURE_PROJECTION_KEY)
270
+ return;
271
+ store.update(String(session.id), value);
272
+ });
273
+ }
274
+ catch (error) {
275
+ store.noteReadFailure(error);
276
+ }
277
+ // The cleanup belongs to the injected fiber, not the outer ctx: a service
278
+ // re-provide re-runs the callback above, and registering on the outer ctx
279
+ // would stack feed listeners (the old listener's disposer would only run
280
+ // when the whole composition root goes down).
281
+ projectionCtx.effect(() => () => {
282
+ offFeed?.();
283
+ }, 'dsh-tui context-pressure projection feed');
284
+ }));
285
+ }
286
+ /**
287
+ * Create the composition root's occupancy store and wire it to the host.
288
+ *
289
+ * Unlike the activity store there is no config gate: occupancy feeds the
290
+ * footer's ctx field, the segmented bar and the context-low warning, so hiding
291
+ * one surface must not stop the others from being correct.
292
+ * @param ctx - Host context of the composition root.
293
+ * @returns the store the channel reads from.
294
+ */
295
+ export function createContextOccupancyStore(ctx) {
296
+ const store = new ContextOccupancyStore(message => { ctx.logger.warn(message); });
297
+ attachContextPressureProjection(ctx, store);
298
+ return store;
299
+ }
@@ -49,6 +49,20 @@ export declare function installedUpstreamVersions(): Record<string, string | und
49
49
  * have.
50
50
  */
51
51
  export declare function installedUpstreamVersion(packageName: string): UpstreamVersionTuple | undefined;
52
+ /**
53
+ * 内核(dsh)版本的铭牌来源(第七版:落地页右下角双版本号)。
54
+ *
55
+ * 真实来源两级,都不造假:
56
+ * 1. **宿主 CLI** `@deepseek-ai/dsh` 的 package.json——TUI 作为插件跑在 dsh
57
+ * 宿主进程里时它一定可解析(`bin/dsh-tui.js` 委托 `dsh --profile` 启动);
58
+ * 孤立回归/源码 checkout 里解析不到就落到第 2 级。
59
+ * 2. **内核线包** `@deepseek-ai/dsh-agent`(与内核同线发版、由本仓直接依赖,
60
+ * `installedUpstreamVersions` 的既有清单成员)的已装版本——它就是
61
+ * upstreamDriftSummary 用来判定「内核在不在验证线」的同一份数据。
62
+ *
63
+ * 两级都读不到 → undefined(调用方只画 TUI 版本,不编造)。
64
+ */
65
+ export declare function installedKernelVersion(): string | undefined;
52
66
  /**
53
67
  * Whether the installed version of `packageName` is at or beyond `minimum`
54
68
  * (a literal like `'0.1.0-rc.8'`). Unparseable or older installs return
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAkBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,2BAA2B,2QAkB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,siCAkC5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAYD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAA;AAEvG,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKlG;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAQxF;AAkBD,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,QAA6D,CAAA;AAYlG,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAqB9E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAkBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,2BAA2B,2QAkB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,siCAkC5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAYD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAA;AAEvG,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,oBAAoB,GAAG,SAAS,CAKlG;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,EAAE,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAQxF;AAkBD,sEAAsE;AACtE,eAAO,MAAM,wBAAwB,QAA6D,CAAA;AAYlG,wBAAgB,yBAAyB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAqB9E;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAE9F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,SAAS,CAQ3D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}