@dsh-cc/tui 0.5.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 (363) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +144 -0
  3. package/lib/bash-history.d.ts +31 -0
  4. package/lib/bash-history.d.ts.map +1 -0
  5. package/lib/bash-history.js +94 -0
  6. package/lib/bash-history.js.map +1 -0
  7. package/lib/compact-fold.d.ts +35 -0
  8. package/lib/compact-fold.d.ts.map +1 -0
  9. package/lib/compact-fold.js +60 -0
  10. package/lib/compact-fold.js.map +1 -0
  11. package/lib/components/arg-completers.d.ts +22 -0
  12. package/lib/components/arg-completers.d.ts.map +1 -0
  13. package/lib/components/arg-completers.js +75 -0
  14. package/lib/components/arg-completers.js.map +1 -0
  15. package/lib/components/code-theme.d.ts +25 -0
  16. package/lib/components/code-theme.d.ts.map +1 -0
  17. package/lib/components/code-theme.js +137 -0
  18. package/lib/components/code-theme.js.map +1 -0
  19. package/lib/components/completion.d.ts +50 -0
  20. package/lib/components/completion.d.ts.map +1 -0
  21. package/lib/components/completion.js +279 -0
  22. package/lib/components/completion.js.map +1 -0
  23. package/lib/components/diff-card.d.ts +29 -0
  24. package/lib/components/diff-card.d.ts.map +1 -0
  25. package/lib/components/diff-card.js +175 -0
  26. package/lib/components/diff-card.js.map +1 -0
  27. package/lib/components/diff-hunks.d.ts +44 -0
  28. package/lib/components/diff-hunks.d.ts.map +1 -0
  29. package/lib/components/diff-hunks.js +188 -0
  30. package/lib/components/diff-hunks.js.map +1 -0
  31. package/lib/components/editor-history.d.ts +23 -0
  32. package/lib/components/editor-history.d.ts.map +1 -0
  33. package/lib/components/editor-history.js +29 -0
  34. package/lib/components/editor-history.js.map +1 -0
  35. package/lib/components/markdown-theme.d.ts +11 -0
  36. package/lib/components/markdown-theme.d.ts.map +1 -0
  37. package/lib/components/markdown-theme.js +29 -0
  38. package/lib/components/markdown-theme.js.map +1 -0
  39. package/lib/components/masked-input.d.ts +24 -0
  40. package/lib/components/masked-input.d.ts.map +1 -0
  41. package/lib/components/masked-input.js +168 -0
  42. package/lib/components/masked-input.js.map +1 -0
  43. package/lib/components/overlay-host.d.ts +31 -0
  44. package/lib/components/overlay-host.d.ts.map +1 -0
  45. package/lib/components/overlay-host.js +128 -0
  46. package/lib/components/overlay-host.js.map +1 -0
  47. package/lib/components/overlays.d.ts +94 -0
  48. package/lib/components/overlays.d.ts.map +1 -0
  49. package/lib/components/overlays.js +450 -0
  50. package/lib/components/overlays.js.map +1 -0
  51. package/lib/components/provider-box.d.ts +23 -0
  52. package/lib/components/provider-box.d.ts.map +1 -0
  53. package/lib/components/provider-box.js +164 -0
  54. package/lib/components/provider-box.js.map +1 -0
  55. package/lib/components/read-group.d.ts +51 -0
  56. package/lib/components/read-group.d.ts.map +1 -0
  57. package/lib/components/read-group.js +105 -0
  58. package/lib/components/read-group.js.map +1 -0
  59. package/lib/components/root-bash.d.ts +36 -0
  60. package/lib/components/root-bash.d.ts.map +1 -0
  61. package/lib/components/root-bash.js +112 -0
  62. package/lib/components/root-bash.js.map +1 -0
  63. package/lib/components/root-types.d.ts +42 -0
  64. package/lib/components/root-types.d.ts.map +1 -0
  65. package/lib/components/root-types.js +8 -0
  66. package/lib/components/root-types.js.map +1 -0
  67. package/lib/components/root-utils.d.ts +22 -0
  68. package/lib/components/root-utils.d.ts.map +1 -0
  69. package/lib/components/root-utils.js +45 -0
  70. package/lib/components/root-utils.js.map +1 -0
  71. package/lib/components/root.d.ts +25 -0
  72. package/lib/components/root.d.ts.map +1 -0
  73. package/lib/components/root.js +357 -0
  74. package/lib/components/root.js.map +1 -0
  75. package/lib/components/theme.d.ts +61 -0
  76. package/lib/components/theme.d.ts.map +1 -0
  77. package/lib/components/theme.js +99 -0
  78. package/lib/components/theme.js.map +1 -0
  79. package/lib/components/transcript.d.ts +43 -0
  80. package/lib/components/transcript.d.ts.map +1 -0
  81. package/lib/components/transcript.js +203 -0
  82. package/lib/components/transcript.js.map +1 -0
  83. package/lib/components/working-line.d.ts +35 -0
  84. package/lib/components/working-line.d.ts.map +1 -0
  85. package/lib/components/working-line.js +66 -0
  86. package/lib/components/working-line.js.map +1 -0
  87. package/lib/effort-catalog.d.ts +27 -0
  88. package/lib/effort-catalog.d.ts.map +1 -0
  89. package/lib/effort-catalog.js +36 -0
  90. package/lib/effort-catalog.js.map +1 -0
  91. package/lib/export-markdown.d.ts +18 -0
  92. package/lib/export-markdown.d.ts.map +1 -0
  93. package/lib/export-markdown.js +124 -0
  94. package/lib/export-markdown.js.map +1 -0
  95. package/lib/harness/approval-preview.d.ts +33 -0
  96. package/lib/harness/approval-preview.d.ts.map +1 -0
  97. package/lib/harness/approval-preview.js +179 -0
  98. package/lib/harness/approval-preview.js.map +1 -0
  99. package/lib/harness/boot-banner.d.ts +14 -0
  100. package/lib/harness/boot-banner.d.ts.map +1 -0
  101. package/lib/harness/boot-banner.js +89 -0
  102. package/lib/harness/boot-banner.js.map +1 -0
  103. package/lib/harness/driver-agent.d.ts +78 -0
  104. package/lib/harness/driver-agent.d.ts.map +1 -0
  105. package/lib/harness/driver-agent.js +314 -0
  106. package/lib/harness/driver-agent.js.map +1 -0
  107. package/lib/harness/driver-agents.d.ts +20 -0
  108. package/lib/harness/driver-agents.d.ts.map +1 -0
  109. package/lib/harness/driver-agents.js +123 -0
  110. package/lib/harness/driver-agents.js.map +1 -0
  111. package/lib/harness/driver-approvals.d.ts +38 -0
  112. package/lib/harness/driver-approvals.d.ts.map +1 -0
  113. package/lib/harness/driver-approvals.js +277 -0
  114. package/lib/harness/driver-approvals.js.map +1 -0
  115. package/lib/harness/driver-bash.d.ts +15 -0
  116. package/lib/harness/driver-bash.d.ts.map +1 -0
  117. package/lib/harness/driver-bash.js +73 -0
  118. package/lib/harness/driver-bash.js.map +1 -0
  119. package/lib/harness/driver-catalog.d.ts +84 -0
  120. package/lib/harness/driver-catalog.d.ts.map +1 -0
  121. package/lib/harness/driver-catalog.js +256 -0
  122. package/lib/harness/driver-catalog.js.map +1 -0
  123. package/lib/harness/driver-ctx.d.ts +462 -0
  124. package/lib/harness/driver-ctx.d.ts.map +1 -0
  125. package/lib/harness/driver-ctx.js +11 -0
  126. package/lib/harness/driver-ctx.js.map +1 -0
  127. package/lib/harness/driver-hud.d.ts +31 -0
  128. package/lib/harness/driver-hud.d.ts.map +1 -0
  129. package/lib/harness/driver-hud.js +204 -0
  130. package/lib/harness/driver-hud.js.map +1 -0
  131. package/lib/harness/driver-live.d.ts +36 -0
  132. package/lib/harness/driver-live.d.ts.map +1 -0
  133. package/lib/harness/driver-live.js +44 -0
  134. package/lib/harness/driver-live.js.map +1 -0
  135. package/lib/harness/driver-modal.d.ts +52 -0
  136. package/lib/harness/driver-modal.d.ts.map +1 -0
  137. package/lib/harness/driver-modal.js +78 -0
  138. package/lib/harness/driver-modal.js.map +1 -0
  139. package/lib/harness/driver-mode.d.ts +35 -0
  140. package/lib/harness/driver-mode.d.ts.map +1 -0
  141. package/lib/harness/driver-mode.js +84 -0
  142. package/lib/harness/driver-mode.js.map +1 -0
  143. package/lib/harness/driver-pickers.d.ts +48 -0
  144. package/lib/harness/driver-pickers.d.ts.map +1 -0
  145. package/lib/harness/driver-pickers.js +249 -0
  146. package/lib/harness/driver-pickers.js.map +1 -0
  147. package/lib/harness/driver-promote.d.ts +29 -0
  148. package/lib/harness/driver-promote.d.ts.map +1 -0
  149. package/lib/harness/driver-promote.js +36 -0
  150. package/lib/harness/driver-promote.js.map +1 -0
  151. package/lib/harness/driver-queue.d.ts +19 -0
  152. package/lib/harness/driver-queue.d.ts.map +1 -0
  153. package/lib/harness/driver-queue.js +281 -0
  154. package/lib/harness/driver-queue.js.map +1 -0
  155. package/lib/harness/driver-run-local.d.ts +32 -0
  156. package/lib/harness/driver-run-local.d.ts.map +1 -0
  157. package/lib/harness/driver-run-local.js +366 -0
  158. package/lib/harness/driver-run-local.js.map +1 -0
  159. package/lib/harness/driver-sessions.d.ts +28 -0
  160. package/lib/harness/driver-sessions.d.ts.map +1 -0
  161. package/lib/harness/driver-sessions.js +386 -0
  162. package/lib/harness/driver-sessions.js.map +1 -0
  163. package/lib/harness/driver.d.ts +22 -0
  164. package/lib/harness/driver.d.ts.map +1 -0
  165. package/lib/harness/driver.js +459 -0
  166. package/lib/harness/driver.js.map +1 -0
  167. package/lib/harness/preset.d.ts +32 -0
  168. package/lib/harness/preset.d.ts.map +1 -0
  169. package/lib/harness/preset.js +34 -0
  170. package/lib/harness/preset.js.map +1 -0
  171. package/lib/harness/session-list.d.ts +65 -0
  172. package/lib/harness/session-list.d.ts.map +1 -0
  173. package/lib/harness/session-list.js +91 -0
  174. package/lib/harness/session-list.js.map +1 -0
  175. package/lib/harness/shell-output.d.ts +44 -0
  176. package/lib/harness/shell-output.d.ts.map +1 -0
  177. package/lib/harness/shell-output.js +90 -0
  178. package/lib/harness/shell-output.js.map +1 -0
  179. package/lib/harness/statusline-cc-transcript.d.ts +51 -0
  180. package/lib/harness/statusline-cc-transcript.d.ts.map +1 -0
  181. package/lib/harness/statusline-cc-transcript.js +191 -0
  182. package/lib/harness/statusline-cc-transcript.js.map +1 -0
  183. package/lib/harness/statusline-command.d.ts +54 -0
  184. package/lib/harness/statusline-command.d.ts.map +1 -0
  185. package/lib/harness/statusline-command.js +161 -0
  186. package/lib/harness/statusline-command.js.map +1 -0
  187. package/lib/harness/statusline-payload.d.ts +79 -0
  188. package/lib/harness/statusline-payload.d.ts.map +1 -0
  189. package/lib/harness/statusline-payload.js +93 -0
  190. package/lib/harness/statusline-payload.js.map +1 -0
  191. package/lib/harness/statusline-settings.d.ts +47 -0
  192. package/lib/harness/statusline-settings.d.ts.map +1 -0
  193. package/lib/harness/statusline-settings.js +57 -0
  194. package/lib/harness/statusline-settings.js.map +1 -0
  195. package/lib/harness/statusline-wiring.d.ts +45 -0
  196. package/lib/harness/statusline-wiring.d.ts.map +1 -0
  197. package/lib/harness/statusline-wiring.js +247 -0
  198. package/lib/harness/statusline-wiring.js.map +1 -0
  199. package/lib/harness/usage-view.d.ts +84 -0
  200. package/lib/harness/usage-view.d.ts.map +1 -0
  201. package/lib/harness/usage-view.js +199 -0
  202. package/lib/harness/usage-view.js.map +1 -0
  203. package/lib/harness/worktree-exit.d.ts +105 -0
  204. package/lib/harness/worktree-exit.d.ts.map +1 -0
  205. package/lib/harness/worktree-exit.js +168 -0
  206. package/lib/harness/worktree-exit.js.map +1 -0
  207. package/lib/history.d.ts +50 -0
  208. package/lib/history.d.ts.map +1 -0
  209. package/lib/history.js +139 -0
  210. package/lib/history.js.map +1 -0
  211. package/lib/index.d.ts +63 -0
  212. package/lib/index.d.ts.map +1 -0
  213. package/lib/index.js +54 -0
  214. package/lib/index.js.map +1 -0
  215. package/lib/input.d.ts +158 -0
  216. package/lib/input.d.ts.map +1 -0
  217. package/lib/input.js +400 -0
  218. package/lib/input.js.map +1 -0
  219. package/lib/invariant.d.ts +14 -0
  220. package/lib/invariant.d.ts.map +1 -0
  221. package/lib/invariant.js +20 -0
  222. package/lib/invariant.js.map +1 -0
  223. package/lib/mode-cycle.d.ts +22 -0
  224. package/lib/mode-cycle.d.ts.map +1 -0
  225. package/lib/mode-cycle.js +32 -0
  226. package/lib/mode-cycle.js.map +1 -0
  227. package/lib/model-catalog.d.ts +22 -0
  228. package/lib/model-catalog.d.ts.map +1 -0
  229. package/lib/model-catalog.js +45 -0
  230. package/lib/model-catalog.js.map +1 -0
  231. package/lib/packaged-preset.d.ts +32 -0
  232. package/lib/packaged-preset.d.ts.map +1 -0
  233. package/lib/packaged-preset.js +94 -0
  234. package/lib/packaged-preset.js.map +1 -0
  235. package/lib/plugin.d.ts +11 -0
  236. package/lib/plugin.d.ts.map +1 -0
  237. package/lib/plugin.js +88 -0
  238. package/lib/plugin.js.map +1 -0
  239. package/lib/profile.d.ts +4 -0
  240. package/lib/profile.d.ts.map +1 -0
  241. package/lib/profile.js +7 -0
  242. package/lib/profile.js.map +1 -0
  243. package/lib/project-sessions.d.ts +29 -0
  244. package/lib/project-sessions.d.ts.map +1 -0
  245. package/lib/project-sessions.js +60 -0
  246. package/lib/project-sessions.js.map +1 -0
  247. package/lib/project.d.ts +75 -0
  248. package/lib/project.d.ts.map +1 -0
  249. package/lib/project.js +196 -0
  250. package/lib/project.js.map +1 -0
  251. package/lib/provider-actions.d.ts +37 -0
  252. package/lib/provider-actions.d.ts.map +1 -0
  253. package/lib/provider-actions.js +417 -0
  254. package/lib/provider-actions.js.map +1 -0
  255. package/lib/provider-command.d.ts +109 -0
  256. package/lib/provider-command.d.ts.map +1 -0
  257. package/lib/provider-command.js +220 -0
  258. package/lib/provider-command.js.map +1 -0
  259. package/lib/provider-detail.d.ts +15 -0
  260. package/lib/provider-detail.d.ts.map +1 -0
  261. package/lib/provider-detail.js +201 -0
  262. package/lib/provider-detail.js.map +1 -0
  263. package/lib/provider-flow.d.ts +191 -0
  264. package/lib/provider-flow.d.ts.map +1 -0
  265. package/lib/provider-flow.js +192 -0
  266. package/lib/provider-flow.js.map +1 -0
  267. package/lib/provider-presets.d.ts +32 -0
  268. package/lib/provider-presets.d.ts.map +1 -0
  269. package/lib/provider-presets.js +105 -0
  270. package/lib/provider-presets.js.map +1 -0
  271. package/lib/provider-read.d.ts +63 -0
  272. package/lib/provider-read.d.ts.map +1 -0
  273. package/lib/provider-read.js +115 -0
  274. package/lib/provider-read.js.map +1 -0
  275. package/lib/provider-settings.d.ts +30 -0
  276. package/lib/provider-settings.d.ts.map +1 -0
  277. package/lib/provider-settings.js +65 -0
  278. package/lib/provider-settings.js.map +1 -0
  279. package/lib/resume-target.d.ts +59 -0
  280. package/lib/resume-target.d.ts.map +1 -0
  281. package/lib/resume-target.js +143 -0
  282. package/lib/resume-target.js.map +1 -0
  283. package/lib/slash.d.ts +44 -0
  284. package/lib/slash.d.ts.map +1 -0
  285. package/lib/slash.js +81 -0
  286. package/lib/slash.js.map +1 -0
  287. package/lib/state/driver-types.d.ts +505 -0
  288. package/lib/state/driver-types.d.ts.map +1 -0
  289. package/lib/state/driver-types.js +8 -0
  290. package/lib/state/driver-types.js.map +1 -0
  291. package/lib/state/driver-usage-types.d.ts +59 -0
  292. package/lib/state/driver-usage-types.d.ts.map +1 -0
  293. package/lib/state/driver-usage-types.js +8 -0
  294. package/lib/state/driver-usage-types.js.map +1 -0
  295. package/lib/statusline.d.ts +63 -0
  296. package/lib/statusline.d.ts.map +1 -0
  297. package/lib/statusline.js +97 -0
  298. package/lib/statusline.js.map +1 -0
  299. package/lib/store/pickers.d.ts +34 -0
  300. package/lib/store/pickers.d.ts.map +1 -0
  301. package/lib/store/pickers.js +111 -0
  302. package/lib/store/pickers.js.map +1 -0
  303. package/lib/store/provider-panel.d.ts +107 -0
  304. package/lib/store/provider-panel.d.ts.map +1 -0
  305. package/lib/store/provider-panel.js +151 -0
  306. package/lib/store/provider-panel.js.map +1 -0
  307. package/lib/store/question.d.ts +21 -0
  308. package/lib/store/question.d.ts.map +1 -0
  309. package/lib/store/question.js +59 -0
  310. package/lib/store/question.js.map +1 -0
  311. package/lib/store/queue.d.ts +27 -0
  312. package/lib/store/queue.d.ts.map +1 -0
  313. package/lib/store/queue.js +34 -0
  314. package/lib/store/queue.js.map +1 -0
  315. package/lib/store/session.d.ts +73 -0
  316. package/lib/store/session.d.ts.map +1 -0
  317. package/lib/store/session.js +172 -0
  318. package/lib/store/session.js.map +1 -0
  319. package/lib/store/subagents.d.ts +16 -0
  320. package/lib/store/subagents.d.ts.map +1 -0
  321. package/lib/store/subagents.js +44 -0
  322. package/lib/store/subagents.js.map +1 -0
  323. package/lib/store/todos.d.ts +35 -0
  324. package/lib/store/todos.d.ts.map +1 -0
  325. package/lib/store/todos.js +68 -0
  326. package/lib/store/todos.js.map +1 -0
  327. package/lib/store/usage.d.ts +15 -0
  328. package/lib/store/usage.d.ts.map +1 -0
  329. package/lib/store/usage.js +27 -0
  330. package/lib/store/usage.js.map +1 -0
  331. package/lib/store/views.d.ts +419 -0
  332. package/lib/store/views.d.ts.map +1 -0
  333. package/lib/store/views.js +3 -0
  334. package/lib/store/views.js.map +1 -0
  335. package/lib/store.d.ts +19 -0
  336. package/lib/store.d.ts.map +1 -0
  337. package/lib/store.js +10 -0
  338. package/lib/store.js.map +1 -0
  339. package/lib/terminal/lease.d.ts +33 -0
  340. package/lib/terminal/lease.d.ts.map +1 -0
  341. package/lib/terminal/lease.js +99 -0
  342. package/lib/terminal/lease.js.map +1 -0
  343. package/lib/tool-card.d.ts +75 -0
  344. package/lib/tool-card.d.ts.map +1 -0
  345. package/lib/tool-card.js +109 -0
  346. package/lib/tool-card.js.map +1 -0
  347. package/lib/tool-verbs.d.ts +12 -0
  348. package/lib/tool-verbs.d.ts.map +1 -0
  349. package/lib/tool-verbs.js +29 -0
  350. package/lib/tool-verbs.js.map +1 -0
  351. package/lib/transcript.d.ts +40 -0
  352. package/lib/transcript.d.ts.map +1 -0
  353. package/lib/transcript.js +413 -0
  354. package/lib/transcript.js.map +1 -0
  355. package/lib/working-line.d.ts +44 -0
  356. package/lib/working-line.d.ts.map +1 -0
  357. package/lib/working-line.js +56 -0
  358. package/lib/working-line.js.map +1 -0
  359. package/package.json +72 -0
  360. package/presets/cc/.dsh-cc-managed.json +5 -0
  361. package/presets/cc/agent.cordis.yml +524 -0
  362. package/presets/cc/preset.yml +3 -0
  363. package/scripts/stage-preset.mjs +26 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question.js","sourceRoot":"","sources":["../../src/store/question.ts"],"names":[],"mappings":"AAMA,wCAAwC;AACxC,MAAM,UAAU,WAAW,CAAC,KAAe,EAAE,QAAkC;IAC7E,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IAC7C,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAA;AAC9D,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,mBAAmB,CAAC,KAAe,EAAE,KAAa;I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EAAE,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;AACtE,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,gBAAgB,CAAC,KAAe,EAAE,IAAY;IAC5D,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IAC/B,IAAI,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAC7D,OAAO,WAAW,CAAC,KAAK,EAAE;QACxB,GAAG,QAAQ;QACX,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI;QAC9B,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;KACjC,CAAC,CAAA;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,qBAAqB,CAAC,KAAe;IACnD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAA;IAC/B,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IACxE,OAAO,WAAW,CAAC,KAAK,EAAE;QACxB,GAAG,QAAQ;QACX,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;KACjC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Outbox queue reducers: pending steering texts submitted while the agent
3
+ * is busy.
4
+ * @module @dsh-cc/tui/store/queue
5
+ */
6
+ import type { TuiState } from './views.ts';
7
+ /** Park a submitted text as pending steering while the agent is busy. */
8
+ export declare function enqueue(state: TuiState, text: string): TuiState;
9
+ /**
10
+ * Remove the FIRST queued entry strictly equal to `text`. No-op (returns the
11
+ * same reference) when the text is absent. Kept for outbox bookkeeping and
12
+ * tests — chip clearing in the live driver is synchronous (flush / Ctrl+S /
13
+ * interrupt / recall), never event-driven.
14
+ */
15
+ export declare function dequeue(state: TuiState, text: string): TuiState;
16
+ /**
17
+ * Remove and return the LAST queued entry — LIFO, so an editor recall hands
18
+ * back the most recent submit. Same reference and `undefined` text on an
19
+ * empty queue; callers treat that as "nothing to recall" and fall through.
20
+ */
21
+ export declare function popQueued(state: TuiState): {
22
+ state: TuiState;
23
+ text: string | undefined;
24
+ };
25
+ /** Drop every queued chip (e.g. on interrupt — matches cancel's inbox clear). */
26
+ export declare function clearQueue(state: TuiState): TuiState;
27
+ //# sourceMappingURL=queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/store/queue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,yEAAyE;AACzE,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAK/D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAGxF;AAED,iFAAiF;AACjF,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAGpD"}
@@ -0,0 +1,34 @@
1
+ /** Park a submitted text as pending steering while the agent is busy. */
2
+ export function enqueue(state, text) {
3
+ return { ...state, queued: [...state.queued, text] };
4
+ }
5
+ /**
6
+ * Remove the FIRST queued entry strictly equal to `text`. No-op (returns the
7
+ * same reference) when the text is absent. Kept for outbox bookkeeping and
8
+ * tests — chip clearing in the live driver is synchronous (flush / Ctrl+S /
9
+ * interrupt / recall), never event-driven.
10
+ */
11
+ export function dequeue(state, text) {
12
+ const index = state.queued.findIndex(entry => entry === text);
13
+ if (index < 0)
14
+ return state;
15
+ const queued = state.queued.slice(0, index).concat(state.queued.slice(index + 1));
16
+ return { ...state, queued };
17
+ }
18
+ /**
19
+ * Remove and return the LAST queued entry — LIFO, so an editor recall hands
20
+ * back the most recent submit. Same reference and `undefined` text on an
21
+ * empty queue; callers treat that as "nothing to recall" and fall through.
22
+ */
23
+ export function popQueued(state) {
24
+ if (state.queued.length === 0)
25
+ return { state, text: undefined };
26
+ return { state: { ...state, queued: state.queued.slice(0, -1) }, text: state.queued.at(-1) };
27
+ }
28
+ /** Drop every queued chip (e.g. on interrupt — matches cancel's inbox clear). */
29
+ export function clearQueue(state) {
30
+ if (state.queued.length === 0)
31
+ return state;
32
+ return { ...state, queued: [] };
33
+ }
34
+ //# sourceMappingURL=queue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/store/queue.ts"],"names":[],"mappings":"AAOA,yEAAyE;AACzE,MAAM,UAAU,OAAO,CAAC,KAAe,EAAE,IAAY;IACnD,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAA;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,KAAe,EAAE,IAAY;IACnD,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;IAC7D,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAA;IACjF,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAA;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAe;IACvC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;IAChE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC9F,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,UAAU,CAAC,KAAe;IACxC,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAC3C,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;AACjC,CAAC"}
@@ -0,0 +1,73 @@
1
+ import type { ApprovalView, HudView, TranscriptRow, TuiState } from './views.ts';
2
+ /** Empty composer + idle agent. */
3
+ export declare function createInitialState(permissionMode?: string): TuiState;
4
+ /**
5
+ * Append or replace a transcript row. Tool rows with the same `callId` are
6
+ * updated in place so start/result share one trail line.
7
+ */
8
+ export declare function upsertRow(state: TuiState, row: TranscriptRow): TuiState;
9
+ /** Replace the composer draft. */
10
+ export declare function setDraft(state: TuiState, draft: string): TuiState;
11
+ /** Mark the agent busy or idle. */
12
+ export declare function setBusy(state: TuiState, busy: boolean): TuiState;
13
+ /**
14
+ * Anchor a newly-running turn for the working line: elapsed time counts from
15
+ * `startedAt`, the output-token delta from `outputBase` (which may be
16
+ * undefined when the HUD was not yet seeded — the driver's tokenUsage
17
+ * rebase pins it later). `verbIndex` is derived deterministically from
18
+ * `startedAt`, so re-anchoring with the same timestamp is snapshot-stable.
19
+ * The anchor object is built fresh with no `stepStartedAt`, so anchoring a
20
+ * new turn also clears the step clock; the pure baseline pin may pass the
21
+ * existing `stepStartedAt` through (the driver's tokenUsage rebase does) so
22
+ * pinning the baseline does not reset a mid-step clock.
23
+ */
24
+ export declare function setTurnActive(state: TuiState, activity: {
25
+ startedAt: number;
26
+ outputBase: number | undefined;
27
+ stepStartedAt?: number | undefined;
28
+ }): TuiState;
29
+ /**
30
+ * Reset the working line's step clock (new tool call, or tool finished and
31
+ * the model is thinking again). Turn-modifying only: with no live turn this
32
+ * returns the same state reference — an idle tool event must never conjure
33
+ * a phantom anchor. Leaves startedAt/outputBase/verbIndex untouched.
34
+ */
35
+ export declare function resetTurnStep(state: TuiState, at: number): TuiState;
36
+ /** Clear the turn anchor (turn ended, interrupted, or session switched). */
37
+ export declare function clearTurn(state: TuiState): TuiState;
38
+ /** Record the live permission-mode footer. */
39
+ export declare function setPermissionMode(state: TuiState, permissionMode: string): TuiState;
40
+ /**
41
+ * Fold the latest `session/title` event into state (last-wins), or clear it
42
+ * on session switch. Same-reference when the value is unchanged so the
43
+ * window-title effect in the root subscriber fires only on real transitions.
44
+ */
45
+ export declare function setSessionTitle(state: TuiState, title: string | undefined): TuiState;
46
+ /** Park or clear an approval prompt. */
47
+ export declare function setApproval(state: TuiState, approval: ApprovalView | undefined): TuiState;
48
+ /** Drop the transcript rows (bind/switch helper; not the `/clear` command). */
49
+ export declare function clearRows(state: TuiState): TuiState;
50
+ /** Set a one-line status notice. */
51
+ export declare function setNotice(state: TuiState, notice: string | undefined): TuiState;
52
+ /**
53
+ * Record the moment of an idle Ctrl+C press (the double-press-to-exit window
54
+ * anchor). Pure state evolution — the window comparison itself lives at the
55
+ * input layer.
56
+ */
57
+ export declare function markExitAttempt(state: TuiState, at: number): TuiState;
58
+ /** Flip the thinking-accordion expansion flag (Ctrl+O). */
59
+ export declare function toggleThinking(state: TuiState): TuiState;
60
+ /**
61
+ * Flip the global collapse state (Ctrl+O): everything expanded collapses,
62
+ * anything else expands. Only the all-expanded state counts as "open" so the
63
+ * toggle is a clean two-way switch between fully expanded and fully
64
+ * collapsed, regardless of how the individual flags got there.
65
+ */
66
+ export declare function toggleGlobalCollapse(state: TuiState): TuiState;
67
+ /**
68
+ * Merge a HUD patch into `state.hud` (fields left undefined keep their
69
+ * current values), or clear the HUD entirely when `patch` is undefined.
70
+ * Returns the same state reference when the clear finds nothing to drop.
71
+ */
72
+ export declare function setHud(state: TuiState, patch: Partial<HudView> | undefined): TuiState;
73
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/store/session.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAEhF,mCAAmC;AACnC,wBAAgB,kBAAkB,CAAC,cAAc,SAAY,GAAG,QAAQ,CAYvE;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,aAAa,GAAG,QAAQ,CAkBvE;AAED,kCAAkC;AAClC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAEjE;AAED,mCAAmC;AACnC,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,CAEhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAClG,QAAQ,CAUV;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAGnE;AAED,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAGnD;AAED,8CAA8C;AAC9C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,GAAG,QAAQ,CAEnF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAOpF;AAED,wCAAwC;AACxC,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,GAAG,SAAS,GAAG,QAAQ,CAGzF;AAED,+EAA+E;AAC/E,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAGnD;AAED,oCAAoC;AACpC,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAG/E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAErE;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAQ9D;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,GAAG,QAAQ,CAcrF"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Core session reducers: transcript rows, composer draft, busy/turn anchors,
3
+ * permission mode, notices, approval parking, HUD merge, and the
4
+ * thinking/tool-output display toggles.
5
+ * @module @dsh-cc/tui/store/session
6
+ */
7
+ import { VERBS } from "../working-line.js";
8
+ /** Empty composer + idle agent. */
9
+ export function createInitialState(permissionMode = 'default') {
10
+ return {
11
+ rows: [],
12
+ draft: '',
13
+ busy: false,
14
+ permissionMode,
15
+ queued: [],
16
+ thinkingExpanded: false,
17
+ toolOutputExpanded: true,
18
+ compactExpanded: false,
19
+ subagents: [],
20
+ };
21
+ }
22
+ /**
23
+ * Append or replace a transcript row. Tool rows with the same `callId` are
24
+ * updated in place so start/result share one trail line.
25
+ */
26
+ export function upsertRow(state, row) {
27
+ if (row.kind === 'tool') {
28
+ const index = state.rows.findIndex(existing => existing.kind === 'tool' && existing.callId === row.callId);
29
+ if (index >= 0) {
30
+ const rows = state.rows.slice();
31
+ rows[index] = row;
32
+ return { ...state, rows };
33
+ }
34
+ }
35
+ if (row.kind === 'assistant' || row.kind === 'thinking') {
36
+ const last = state.rows.at(-1);
37
+ if (last?.kind === row.kind) {
38
+ const rows = state.rows.slice();
39
+ rows[rows.length - 1] = { ...row, text: last.text + row.text };
40
+ return { ...state, rows };
41
+ }
42
+ }
43
+ return { ...state, rows: [...state.rows, row] };
44
+ }
45
+ /** Replace the composer draft. */
46
+ export function setDraft(state, draft) {
47
+ return { ...state, draft };
48
+ }
49
+ /** Mark the agent busy or idle. */
50
+ export function setBusy(state, busy) {
51
+ return { ...state, busy };
52
+ }
53
+ /**
54
+ * Anchor a newly-running turn for the working line: elapsed time counts from
55
+ * `startedAt`, the output-token delta from `outputBase` (which may be
56
+ * undefined when the HUD was not yet seeded — the driver's tokenUsage
57
+ * rebase pins it later). `verbIndex` is derived deterministically from
58
+ * `startedAt`, so re-anchoring with the same timestamp is snapshot-stable.
59
+ * The anchor object is built fresh with no `stepStartedAt`, so anchoring a
60
+ * new turn also clears the step clock; the pure baseline pin may pass the
61
+ * existing `stepStartedAt` through (the driver's tokenUsage rebase does) so
62
+ * pinning the baseline does not reset a mid-step clock.
63
+ */
64
+ export function setTurnActive(state, activity) {
65
+ return {
66
+ ...state,
67
+ turn: {
68
+ startedAt: activity.startedAt,
69
+ outputBase: activity.outputBase,
70
+ verbIndex: activity.startedAt % VERBS.length,
71
+ ...activity.stepStartedAt === undefined ? {} : { stepStartedAt: activity.stepStartedAt },
72
+ },
73
+ };
74
+ }
75
+ /**
76
+ * Reset the working line's step clock (new tool call, or tool finished and
77
+ * the model is thinking again). Turn-modifying only: with no live turn this
78
+ * returns the same state reference — an idle tool event must never conjure
79
+ * a phantom anchor. Leaves startedAt/outputBase/verbIndex untouched.
80
+ */
81
+ export function resetTurnStep(state, at) {
82
+ if (state.turn === undefined)
83
+ return state;
84
+ return { ...state, turn: { ...state.turn, stepStartedAt: at } };
85
+ }
86
+ /** Clear the turn anchor (turn ended, interrupted, or session switched). */
87
+ export function clearTurn(state) {
88
+ const { turn: _dropped, ...rest } = state;
89
+ return rest;
90
+ }
91
+ /** Record the live permission-mode footer. */
92
+ export function setPermissionMode(state, permissionMode) {
93
+ return { ...state, permissionMode };
94
+ }
95
+ /**
96
+ * Fold the latest `session/title` event into state (last-wins), or clear it
97
+ * on session switch. Same-reference when the value is unchanged so the
98
+ * window-title effect in the root subscriber fires only on real transitions.
99
+ */
100
+ export function setSessionTitle(state, title) {
101
+ if (state.title === title)
102
+ return state;
103
+ if (title === undefined) {
104
+ const { title: _dropped, ...rest } = state;
105
+ return rest;
106
+ }
107
+ return { ...state, title };
108
+ }
109
+ /** Park or clear an approval prompt. */
110
+ export function setApproval(state, approval) {
111
+ const { approval: _dropped, ...rest } = state;
112
+ return approval === undefined ? rest : { ...rest, approval };
113
+ }
114
+ /** Drop the transcript rows (bind/switch helper; not the `/clear` command). */
115
+ export function clearRows(state) {
116
+ const { notice: _dropped, ...rest } = state;
117
+ return { ...rest, rows: [] };
118
+ }
119
+ /** Set a one-line status notice. */
120
+ export function setNotice(state, notice) {
121
+ const { notice: _dropped, ...rest } = state;
122
+ return notice === undefined ? rest : { ...rest, notice };
123
+ }
124
+ /**
125
+ * Record the moment of an idle Ctrl+C press (the double-press-to-exit window
126
+ * anchor). Pure state evolution — the window comparison itself lives at the
127
+ * input layer.
128
+ */
129
+ export function markExitAttempt(state, at) {
130
+ return { ...state, lastExitAttemptAt: at };
131
+ }
132
+ /** Flip the thinking-accordion expansion flag (Ctrl+O). */
133
+ export function toggleThinking(state) {
134
+ return { ...state, thinkingExpanded: !state.thinkingExpanded };
135
+ }
136
+ /**
137
+ * Flip the global collapse state (Ctrl+O): everything expanded collapses,
138
+ * anything else expands. Only the all-expanded state counts as "open" so the
139
+ * toggle is a clean two-way switch between fully expanded and fully
140
+ * collapsed, regardless of how the individual flags got there.
141
+ */
142
+ export function toggleGlobalCollapse(state) {
143
+ const allExpanded = state.thinkingExpanded && state.toolOutputExpanded && state.compactExpanded;
144
+ return {
145
+ ...state,
146
+ thinkingExpanded: !allExpanded,
147
+ toolOutputExpanded: !allExpanded,
148
+ compactExpanded: !allExpanded,
149
+ };
150
+ }
151
+ /**
152
+ * Merge a HUD patch into `state.hud` (fields left undefined keep their
153
+ * current values), or clear the HUD entirely when `patch` is undefined.
154
+ * Returns the same state reference when the clear finds nothing to drop.
155
+ */
156
+ export function setHud(state, patch) {
157
+ if (patch === undefined) {
158
+ if (state.hud === undefined)
159
+ return state;
160
+ const { hud: _dropped, ...rest } = state;
161
+ return rest;
162
+ }
163
+ const base = state.hud ?? {};
164
+ const merged = {
165
+ ...base,
166
+ ...patch.contextPercent === undefined ? {} : { contextPercent: patch.contextPercent },
167
+ ...patch.tokens === undefined ? {} : { tokens: patch.tokens },
168
+ ...patch.contextTokens === undefined ? {} : { contextTokens: patch.contextTokens },
169
+ };
170
+ return { ...state, hud: merged };
171
+ }
172
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/store/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAG1C,mCAAmC;AACnC,MAAM,UAAU,kBAAkB,CAAC,cAAc,GAAG,SAAS;IAC3D,OA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EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;QAC7D,GAAG,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;KACnF,CAAA;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,CAAA;AAClC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Subagent-run reducers: capped run list, oldest-settled-first eviction.
3
+ * @module @dsh-cc/tui/store/subagents
4
+ */
5
+ import type { SubagentRunView, TuiState } from './views.ts';
6
+ /**
7
+ * Append or update a subagent run. Resumable rows (`resumable === true`) key
8
+ * on `sessionId` — a cold-resume reuses the parked row even though the run
9
+ * id changes — everything else pairs by `runId` (start then end updates in
10
+ * place). The list is capped at {@link SUBAGENT_CAP}: when over, the oldest
11
+ * non-running entry drops first, then the oldest `running`.
12
+ */
13
+ export declare function upsertSubagent(state: TuiState, view: SubagentRunView): TuiState;
14
+ /** Count runs still in the `running` state (R5 statusline feed). */
15
+ export declare function countRunningSubagents(state: TuiState): number;
16
+ //# sourceMappingURL=subagents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagents.d.ts","sourceRoot":"","sources":["../../src/store/subagents.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAoB3D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,QAAQ,CAe/E;AAED,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAE7D"}
@@ -0,0 +1,44 @@
1
+ /** Maximum subagent runs retained in state; oldest done drops first. */
2
+ const SUBAGENT_CAP = 20;
3
+ /**
4
+ * Drop entries from the front (oldest) until `runs` fits `cap`, preferring
5
+ * to evict non-`running` runs (`done` and `parked` equally) before `running`
6
+ * ones. Mutates a copy; callers pass the already-upserted list.
7
+ */
8
+ function trimSubagents(runs, cap) {
9
+ let result = runs;
10
+ while (result.length > cap) {
11
+ const settledIndex = result.findIndex(run => run.status !== 'running');
12
+ const dropAt = settledIndex >= 0 ? settledIndex : 0;
13
+ result = result.slice(0, dropAt).concat(result.slice(dropAt + 1));
14
+ }
15
+ return result;
16
+ }
17
+ /**
18
+ * Append or update a subagent run. Resumable rows (`resumable === true`) key
19
+ * on `sessionId` — a cold-resume reuses the parked row even though the run
20
+ * id changes — everything else pairs by `runId` (start then end updates in
21
+ * place). The list is capped at {@link SUBAGENT_CAP}: when over, the oldest
22
+ * non-running entry drops first, then the oldest `running`.
23
+ */
24
+ export function upsertSubagent(state, view) {
25
+ const index = view.resumable === true
26
+ ? state.subagents.findIndex(run => run.sessionId === view.sessionId)
27
+ : state.subagents.findIndex(run => run.runId === view.runId);
28
+ const next = index >= 0
29
+ ? (() => {
30
+ const updated = state.subagents.slice();
31
+ updated[index] = view;
32
+ return updated;
33
+ })()
34
+ : [...state.subagents, view];
35
+ if (next.length === state.subagents.length && next.length <= SUBAGENT_CAP) {
36
+ return { ...state, subagents: next };
37
+ }
38
+ return { ...state, subagents: trimSubagents(next, SUBAGENT_CAP) };
39
+ }
40
+ /** Count runs still in the `running` state (R5 statusline feed). */
41
+ export function countRunningSubagents(state) {
42
+ return state.subagents.reduce((count, run) => count + (run.status === 'running' ? 1 : 0), 0);
43
+ }
44
+ //# sourceMappingURL=subagents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagents.js","sourceRoot":"","sources":["../../src/store/subagents.ts"],"names":[],"mappings":"AAMA,wEAAwE;AACxE,MAAM,YAAY,GAAG,EAAE,CAAA;AAEvB;;;;GAIG;AACH,SAAS,aAAa,CAAC,IAAuB,EAAE,GAAW;IACzD,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB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M,IAAI,YAAY,EAAE,CAAC;QAC1E,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,CAAA;IACtC,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAA;AACnE,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,qBAAqB,CAAC,KAAe;IACnD,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAC9F,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Todo reducers: whole-list writes from the projection feed and the Ctrl+T
3
+ * panel overlay.
4
+ * @module @dsh-cc/tui/store/todos
5
+ */
6
+ import type { TodoItemView, TodoPanelView, TuiState } from './views.ts';
7
+ /**
8
+ * Replace the session todo list (whole-list last-wins from the projection
9
+ * feed), or clear it when `todos` is undefined. Returns the same state
10
+ * reference when the clear finds nothing to drop.
11
+ */
12
+ export declare function setTodos(state: TuiState, todos: readonly TodoItemView[] | undefined): TuiState;
13
+ /** Park or clear the Ctrl+T todo panel overlay. */
14
+ export declare function setTodoPanel(state: TuiState, panel: TodoPanelView | undefined): TuiState;
15
+ /** Open the todo panel, focused on the first row (empty list included). */
16
+ export declare function openTodoPanel(state: TuiState): TuiState;
17
+ /** Close the todo panel. */
18
+ export declare function closeTodoPanel(state: TuiState): TuiState;
19
+ /**
20
+ * Move the todo-panel focus by one row, clamped to [0, todos.length-1]
21
+ * (no wrap). A no-op when the panel is closed or the todo list is empty or
22
+ * absent — those return the same state reference.
23
+ */
24
+ export declare function moveTodoPanelFocus(state: TuiState, delta: -1 | 1): TuiState;
25
+ /**
26
+ * Condense `state.todos` for the one-line strip: total count, completed
27
+ * count, and the first in-progress content (`active`, omitted when nothing
28
+ * is running). Undefined when there are no todos to show.
29
+ */
30
+ export declare function todoSummary(state: TuiState): {
31
+ total: number;
32
+ done: number;
33
+ active?: string;
34
+ } | undefined;
35
+ //# sourceMappingURL=todos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.d.ts","sourceRoot":"","sources":["../../src/store/todos.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAEvE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,GAAG,QAAQ,CAO9F;AAED,mDAAmD;AACnD,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,CAOxF;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAEvD;AAED,4BAA4B;AAC5B,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAExD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,QAAQ,CAQ3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAUzG"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Replace the session todo list (whole-list last-wins from the projection
3
+ * feed), or clear it when `todos` is undefined. Returns the same state
4
+ * reference when the clear finds nothing to drop.
5
+ */
6
+ export function setTodos(state, todos) {
7
+ if (todos === undefined) {
8
+ if (state.todos === undefined)
9
+ return state;
10
+ const { todos: _dropped, ...rest } = state;
11
+ return rest;
12
+ }
13
+ return { ...state, todos };
14
+ }
15
+ /** Park or clear the Ctrl+T todo panel overlay. */
16
+ export function setTodoPanel(state, panel) {
17
+ if (panel === undefined) {
18
+ if (state.todoPanel === undefined)
19
+ return state;
20
+ const { todoPanel: _dropped, ...rest } = state;
21
+ return rest;
22
+ }
23
+ return { ...state, todoPanel: panel };
24
+ }
25
+ /** Open the todo panel, focused on the first row (empty list included). */
26
+ export function openTodoPanel(state) {
27
+ return setTodoPanel(state, { focused: 0 });
28
+ }
29
+ /** Close the todo panel. */
30
+ export function closeTodoPanel(state) {
31
+ return setTodoPanel(state, undefined);
32
+ }
33
+ /**
34
+ * Move the todo-panel focus by one row, clamped to [0, todos.length-1]
35
+ * (no wrap). A no-op when the panel is closed or the todo list is empty or
36
+ * absent — those return the same state reference.
37
+ */
38
+ export function moveTodoPanelFocus(state, delta) {
39
+ const panel = state.todoPanel;
40
+ const todos = state.todos;
41
+ if (panel === undefined || todos === undefined || todos.length === 0)
42
+ return state;
43
+ const max = todos.length - 1;
44
+ const focused = Math.max(0, Math.min(panel.focused + delta, max));
45
+ if (focused === panel.focused)
46
+ return state;
47
+ return setTodoPanel(state, { focused });
48
+ }
49
+ /**
50
+ * Condense `state.todos` for the one-line strip: total count, completed
51
+ * count, and the first in-progress content (`active`, omitted when nothing
52
+ * is running). Undefined when there are no todos to show.
53
+ */
54
+ export function todoSummary(state) {
55
+ const todos = state.todos;
56
+ if (todos === undefined || todos.length === 0)
57
+ return undefined;
58
+ let done = 0;
59
+ let active;
60
+ for (const todo of todos) {
61
+ if (todo.status === 'completed')
62
+ done += 1;
63
+ else if (todo.status === 'in_progress' && active === undefined)
64
+ active = todo.content;
65
+ }
66
+ return { total: todos.length, done, ...active === undefined ? {} : { active } };
67
+ }
68
+ //# sourceMappingURL=todos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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AI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAClF,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;IACjE,IAAI,OAAO,KAAK,KAAK,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC3C,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;AACzC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAe;IACzC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAA;IACzB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IAC/D,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,MAA0B,CAAA;IAC9B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW;YAAE,IAAI,IAAI,CAAC,CAAA;aACrC,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM,GAAG,IAAI,CAAC,OAAO,CAAA;IACvF,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;AACjF,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Usage reducers: the live usage snapshot and the /usage panel overlay.
3
+ * @module @dsh-cc/tui/store/usage
4
+ */
5
+ import type { TuiState, UsageView } from './views.ts';
6
+ /**
7
+ * Replace the live usage snapshot, or clear it when `usage` is undefined.
8
+ * Returns the same state reference when the clear finds nothing to drop.
9
+ */
10
+ export declare function setUsage(state: TuiState, usage: UsageView | undefined): TuiState;
11
+ /** Open the `/usage` panel (a same-reference no-op when already open). */
12
+ export declare function openUsagePanel(state: TuiState): TuiState;
13
+ /** Close the `/usage` panel. */
14
+ export declare function closeUsagePanel(state: TuiState): TuiState;
15
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/store/usage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAErD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAOhF;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAGxD;AAED,gCAAgC;AAChC,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,CAIzD"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Replace the live usage snapshot, or clear it when `usage` is undefined.
3
+ * Returns the same state reference when the clear finds nothing to drop.
4
+ */
5
+ export function setUsage(state, usage) {
6
+ if (usage === undefined) {
7
+ if (state.usage === undefined)
8
+ return state;
9
+ const { usage: _dropped, ...rest } = state;
10
+ return rest;
11
+ }
12
+ return { ...state, usage };
13
+ }
14
+ /** Open the `/usage` panel (a same-reference no-op when already open). */
15
+ export function openUsagePanel(state) {
16
+ if (state.usagePanel !== undefined)
17
+ return state;
18
+ return { ...state, usagePanel: {} };
19
+ }
20
+ /** Close the `/usage` panel. */
21
+ export function closeUsagePanel(state) {
22
+ if (state.usagePanel === undefined)
23
+ return state;
24
+ const { usagePanel: _dropped, ...rest } = state;
25
+ return rest;
26
+ }
27
+ //# sourceMappingURL=usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/store/usage.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAe,EAAE,KAA4B;IACpE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,CAAA;QAC3C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAA;AAC5B,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAAC,KAAe;IAC5C,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IAChD,OAAO,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;AACrC,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,eAAe,CAAC,KAAe;IAC7C,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IAChD,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAA;IAC/C,OAAO,IAAI,CAAA;AACb,CAAC"}