@linghun/tui 0.1.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/LICENSE +190 -0
  2. package/dist/agent-completion-finalizer.d.ts +31 -0
  3. package/dist/agent-completion-finalizer.d.ts.map +1 -0
  4. package/dist/agent-completion-finalizer.js +20 -0
  5. package/dist/agent-handoff-safety.d.ts +13 -0
  6. package/dist/agent-handoff-safety.d.ts.map +1 -0
  7. package/dist/agent-handoff-safety.js +43 -0
  8. package/dist/agent-workflow-registry.d.ts +45 -0
  9. package/dist/agent-workflow-registry.d.ts.map +1 -0
  10. package/dist/agent-workflow-registry.js +12 -0
  11. package/dist/architecture-boundary.d.ts +151 -0
  12. package/dist/architecture-boundary.d.ts.map +1 -0
  13. package/dist/architecture-boundary.js +24 -0
  14. package/dist/architecture-runtime.d.ts +56 -0
  15. package/dist/architecture-runtime.d.ts.map +1 -0
  16. package/dist/architecture-runtime.js +18 -0
  17. package/dist/background-control-runtime.d.ts +29 -0
  18. package/dist/background-control-runtime.d.ts.map +1 -0
  19. package/dist/background-control-runtime.js +148 -0
  20. package/dist/bash-subcommand-parser.d.ts +34 -0
  21. package/dist/bash-subcommand-parser.d.ts.map +1 -0
  22. package/dist/bash-subcommand-parser.js +8 -0
  23. package/dist/batch-tool-confirmation.d.ts +18 -0
  24. package/dist/batch-tool-confirmation.d.ts.map +1 -0
  25. package/dist/batch-tool-confirmation.js +100 -0
  26. package/dist/break-cache-runtime.d.ts +40 -0
  27. package/dist/break-cache-runtime.d.ts.map +1 -0
  28. package/dist/break-cache-runtime.js +17 -0
  29. package/dist/btw-runtime.d.ts +45 -0
  30. package/dist/btw-runtime.d.ts.map +1 -0
  31. package/dist/btw-runtime.js +14 -0
  32. package/dist/cache-command-runtime.d.ts +22 -0
  33. package/dist/cache-command-runtime.d.ts.map +1 -0
  34. package/dist/cache-command-runtime.js +33 -0
  35. package/dist/cache-freshness.d.ts +26 -0
  36. package/dist/cache-freshness.d.ts.map +1 -0
  37. package/dist/cache-freshness.js +14 -0
  38. package/dist/capability-runtime.d.ts +75 -0
  39. package/dist/capability-runtime.d.ts.map +1 -0
  40. package/dist/capability-runtime.js +97 -0
  41. package/dist/chunk-2FVEKTKN.js +86 -0
  42. package/dist/chunk-2YL5VKJ5.js +531 -0
  43. package/dist/chunk-3AKXDMVS.js +85 -0
  44. package/dist/chunk-3GCIXKCI.js +221 -0
  45. package/dist/chunk-3LT6OWQ2.js +258 -0
  46. package/dist/chunk-3XNUDLOM.js +91 -0
  47. package/dist/chunk-4EIC5BCT.js +475 -0
  48. package/dist/chunk-4EP3TUFF.js +238 -0
  49. package/dist/chunk-4I2NWBOM.js +117 -0
  50. package/dist/chunk-4K6UB524.js +443 -0
  51. package/dist/chunk-4T5DJW54.js +88 -0
  52. package/dist/chunk-4WHZ6JKD.js +8105 -0
  53. package/dist/chunk-5H7RRF7C.js +6 -0
  54. package/dist/chunk-64MJP6FK.js +558 -0
  55. package/dist/chunk-66BNE332.js +1617 -0
  56. package/dist/chunk-6CI6TKLN.js +50 -0
  57. package/dist/chunk-6RJVTUWI.js +16 -0
  58. package/dist/chunk-6SMM5CMP.js +100 -0
  59. package/dist/chunk-6USL33ZO.js +289 -0
  60. package/dist/chunk-7ZE5JFAZ.js +760 -0
  61. package/dist/chunk-AKPXMCVF.js +1373 -0
  62. package/dist/chunk-AO4CXI37.js +284 -0
  63. package/dist/chunk-APJIC2O5.js +150 -0
  64. package/dist/chunk-B4GQTZMT.js +607 -0
  65. package/dist/chunk-BFVPLGAC.js +93 -0
  66. package/dist/chunk-BOV4K7FP.js +588 -0
  67. package/dist/chunk-CFMSB6ST.js +59 -0
  68. package/dist/chunk-CFXB5SE5.js +502 -0
  69. package/dist/chunk-CRQORMFF.js +32 -0
  70. package/dist/chunk-CRSLDQOA.js +146 -0
  71. package/dist/chunk-CRW3636S.js +214 -0
  72. package/dist/chunk-D3UTL2QX.js +86 -0
  73. package/dist/chunk-D7TCSOAZ.js +331 -0
  74. package/dist/chunk-DDXS2RDZ.js +228 -0
  75. package/dist/chunk-DICVLZHH.js +144 -0
  76. package/dist/chunk-DNQN74CC.js +1186 -0
  77. package/dist/chunk-DTK5NBTV.js +912 -0
  78. package/dist/chunk-E72U7WW7.js +50 -0
  79. package/dist/chunk-EBACIBJP.js +356 -0
  80. package/dist/chunk-ECFLCY5V.js +530 -0
  81. package/dist/chunk-EORRZP3F.js +109 -0
  82. package/dist/chunk-F43AMWLZ.js +115 -0
  83. package/dist/chunk-F46N43MG.js +56 -0
  84. package/dist/chunk-F6TVBCZV.js +51 -0
  85. package/dist/chunk-FRIMDSRU.js +242 -0
  86. package/dist/chunk-FTAEPAVY.js +314 -0
  87. package/dist/chunk-GC55DMZV.js +156 -0
  88. package/dist/chunk-GCMH5P4W.js +422 -0
  89. package/dist/chunk-GDQQNPBP.js +251 -0
  90. package/dist/chunk-GKZYTPN2.js +279 -0
  91. package/dist/chunk-GLWTWEGX.js +272 -0
  92. package/dist/chunk-GMUCSNUD.js +586 -0
  93. package/dist/chunk-GTP2KPLY.js +167 -0
  94. package/dist/chunk-GW5YDCRZ.js +42 -0
  95. package/dist/chunk-H3T4EF5F.js +87 -0
  96. package/dist/chunk-HAEU6OTS.js +381 -0
  97. package/dist/chunk-HQIJGQYU.js +172 -0
  98. package/dist/chunk-HW2TBXVK.js +34 -0
  99. package/dist/chunk-HWD22O6F.js +94 -0
  100. package/dist/chunk-I3NTAIMF.js +280 -0
  101. package/dist/chunk-IN42UISW.js +372 -0
  102. package/dist/chunk-IWUIOLMF.js +82 -0
  103. package/dist/chunk-J7ZE2JKP.js +283 -0
  104. package/dist/chunk-JBLVBO3U.js +109 -0
  105. package/dist/chunk-JDWXC2OQ.js +800 -0
  106. package/dist/chunk-JGDIO2NF.js +74 -0
  107. package/dist/chunk-JHGWGH2C.js +182 -0
  108. package/dist/chunk-JLCPHVBN.js +42 -0
  109. package/dist/chunk-JO5ANTMR.js +6027 -0
  110. package/dist/chunk-JPXSFZFC.js +100 -0
  111. package/dist/chunk-JQCRCDOC.js +1195 -0
  112. package/dist/chunk-K4FSYBSY.js +41 -0
  113. package/dist/chunk-K56D3X7S.js +1225 -0
  114. package/dist/chunk-KI7C6ZOD.js +92 -0
  115. package/dist/chunk-KO64OFSG.js +58 -0
  116. package/dist/chunk-KQJHVJZB.js +227 -0
  117. package/dist/chunk-KTWV5JC5.js +59 -0
  118. package/dist/chunk-L4XXW6Y5.js +374 -0
  119. package/dist/chunk-L5GOCMZP.js +18 -0
  120. package/dist/chunk-LDABZV5V.js +278 -0
  121. package/dist/chunk-LHHKPGLX.js +903 -0
  122. package/dist/chunk-LL7LBRDL.js +60 -0
  123. package/dist/chunk-LQTVYUT3.js +421 -0
  124. package/dist/chunk-LVIM2PA7.js +663 -0
  125. package/dist/chunk-M4AIK2SP.js +215 -0
  126. package/dist/chunk-MLUIOBKL.js +420 -0
  127. package/dist/chunk-MOJL4X4L.js +47 -0
  128. package/dist/chunk-MVONSJEN.js +300 -0
  129. package/dist/chunk-N7G2X2LK.js +709 -0
  130. package/dist/chunk-NKFKOEYX.js +146 -0
  131. package/dist/chunk-NMNOAFFT.js +167 -0
  132. package/dist/chunk-NSIKYD3X.js +74 -0
  133. package/dist/chunk-O7EFPSMC.js +60 -0
  134. package/dist/chunk-O7S3HYE6.js +210 -0
  135. package/dist/chunk-OEYW3JE3.js +262 -0
  136. package/dist/chunk-OF3K3CU5.js +159 -0
  137. package/dist/chunk-OMZYPQVA.js +298 -0
  138. package/dist/chunk-OZMX3E35.js +248 -0
  139. package/dist/chunk-P277M7Z5.js +303 -0
  140. package/dist/chunk-P4CPRJLI.js +65 -0
  141. package/dist/chunk-PBIPV4LD.js +494 -0
  142. package/dist/chunk-PGNALDEH.js +2003 -0
  143. package/dist/chunk-PGWW3DVE.js +157 -0
  144. package/dist/chunk-QB4VWH7W.js +515 -0
  145. package/dist/chunk-QBCGAIU7.js +120 -0
  146. package/dist/chunk-QIU3FJPC.js +99 -0
  147. package/dist/chunk-QLRTQHTR.js +744 -0
  148. package/dist/chunk-QTDGRZMZ.js +171 -0
  149. package/dist/chunk-RBOQJFIZ.js +183 -0
  150. package/dist/chunk-RDGM4RUE.js +178 -0
  151. package/dist/chunk-RM5JDRCW.js +71 -0
  152. package/dist/chunk-RM5QMOFY.js +189 -0
  153. package/dist/chunk-RMLTVKOY.js +588 -0
  154. package/dist/chunk-RVY34HK4.js +79 -0
  155. package/dist/chunk-S3YWTBXL.js +43 -0
  156. package/dist/chunk-SJOS5PM6.js +64 -0
  157. package/dist/chunk-SOPYWTFV.js +90 -0
  158. package/dist/chunk-SQIBPLLV.js +15 -0
  159. package/dist/chunk-SRZIA6B4.js +136 -0
  160. package/dist/chunk-SYBNJZEL.js +250 -0
  161. package/dist/chunk-TFZEFIQT.js +17 -0
  162. package/dist/chunk-THZBFYAH.js +136 -0
  163. package/dist/chunk-TJLC3QAS.js +83 -0
  164. package/dist/chunk-TYF4GJR3.js +598 -0
  165. package/dist/chunk-UDQT5CWK.js +252 -0
  166. package/dist/chunk-UOHZQIVL.js +168 -0
  167. package/dist/chunk-URNQUECO.js +187 -0
  168. package/dist/chunk-UT2TYK2A.js +148 -0
  169. package/dist/chunk-UT5BOJKU.js +190 -0
  170. package/dist/chunk-V7GDHHBL.js +526 -0
  171. package/dist/chunk-VCSRBS47.js +133 -0
  172. package/dist/chunk-VIBENDE3.js +152 -0
  173. package/dist/chunk-VTQL23UM.js +302 -0
  174. package/dist/chunk-W3KHJNSH.js +281 -0
  175. package/dist/chunk-W6NU7ZAV.js +52 -0
  176. package/dist/chunk-WHFDDZHY.js +407 -0
  177. package/dist/chunk-WJWYRBWH.js +48 -0
  178. package/dist/chunk-WKMBK5UP.js +145 -0
  179. package/dist/chunk-WQMSRO4D.js +489 -0
  180. package/dist/chunk-WV6YJGZR.js +81 -0
  181. package/dist/chunk-WVAQYKGL.js +269 -0
  182. package/dist/chunk-X7A22JHP.js +106 -0
  183. package/dist/chunk-XFPNU42I.js +59 -0
  184. package/dist/chunk-YH6UIHNF.js +161 -0
  185. package/dist/chunk-YPQFSFYK.js +19 -0
  186. package/dist/chunk-YTQFOZRZ.js +110 -0
  187. package/dist/chunk-ZJK25VFP.js +506 -0
  188. package/dist/chunk-ZOSK2UEU.js +1555 -0
  189. package/dist/chunk-ZYSN7AWW.js +336 -0
  190. package/dist/chunk-ZZ2CNCXJ.js +282 -0
  191. package/dist/command-panel-runtime.d.ts +33 -0
  192. package/dist/command-panel-runtime.d.ts.map +1 -0
  193. package/dist/command-panel-runtime.js +80 -0
  194. package/dist/compact-cache-command-runtime.d.ts +38 -0
  195. package/dist/compact-cache-command-runtime.d.ts.map +1 -0
  196. package/dist/compact-cache-command-runtime.js +146 -0
  197. package/dist/compact-context.d.ts +35 -0
  198. package/dist/compact-context.d.ts.map +1 -0
  199. package/dist/compact-context.js +16 -0
  200. package/dist/compact-preflight-runtime.d.ts +46 -0
  201. package/dist/compact-preflight-runtime.d.ts.map +1 -0
  202. package/dist/compact-preflight-runtime.js +62 -0
  203. package/dist/connector-runtime.d.ts +72 -0
  204. package/dist/connector-runtime.d.ts.map +1 -0
  205. package/dist/connector-runtime.js +88 -0
  206. package/dist/context-estimator.d.ts +20 -0
  207. package/dist/context-estimator.d.ts.map +1 -0
  208. package/dist/context-estimator.js +18 -0
  209. package/dist/context-window-runtime.d.ts +12 -0
  210. package/dist/context-window-runtime.d.ts.map +1 -0
  211. package/dist/context-window-runtime.js +10 -0
  212. package/dist/deep-compact-runtime.d.ts +53 -0
  213. package/dist/deep-compact-runtime.d.ts.map +1 -0
  214. package/dist/deep-compact-runtime.js +35 -0
  215. package/dist/deferred-tools-catalog.d.ts +52 -0
  216. package/dist/deferred-tools-catalog.d.ts.map +1 -0
  217. package/dist/deferred-tools-catalog.js +42 -0
  218. package/dist/details-status-runtime.d.ts +48 -0
  219. package/dist/details-status-runtime.d.ts.map +1 -0
  220. package/dist/details-status-runtime.js +102 -0
  221. package/dist/evidence-runtime.d.ts +48 -0
  222. package/dist/evidence-runtime.d.ts.map +1 -0
  223. package/dist/evidence-runtime.js +92 -0
  224. package/dist/extension-command-runtime.d.ts +63 -0
  225. package/dist/extension-command-runtime.d.ts.map +1 -0
  226. package/dist/extension-command-runtime.js +67 -0
  227. package/dist/extension-slash-runtime.d.ts +11 -0
  228. package/dist/extension-slash-runtime.d.ts.map +1 -0
  229. package/dist/extension-slash-runtime.js +79 -0
  230. package/dist/external-editor-runtime.d.ts +32 -0
  231. package/dist/external-editor-runtime.d.ts.map +1 -0
  232. package/dist/external-editor-runtime.js +71 -0
  233. package/dist/failure-learning-command-runtime.d.ts +10 -0
  234. package/dist/failure-learning-command-runtime.d.ts.map +1 -0
  235. package/dist/failure-learning-command-runtime.js +78 -0
  236. package/dist/failure-learning-presenter.d.ts +6 -0
  237. package/dist/failure-learning-presenter.d.ts.map +1 -0
  238. package/dist/failure-learning-presenter.js +12 -0
  239. package/dist/failure-learning-runtime.d.ts +39 -0
  240. package/dist/failure-learning-runtime.d.ts.map +1 -0
  241. package/dist/failure-learning-runtime.js +39 -0
  242. package/dist/feature-flag-runtime.d.ts +8 -0
  243. package/dist/feature-flag-runtime.d.ts.map +1 -0
  244. package/dist/feature-flag-runtime.js +12 -0
  245. package/dist/feishu-long-connection-runtime.d.ts +12 -0
  246. package/dist/feishu-long-connection-runtime.d.ts.map +1 -0
  247. package/dist/feishu-long-connection-runtime.js +7 -0
  248. package/dist/final-answer-gate.d.ts +24 -0
  249. package/dist/final-answer-gate.d.ts.map +1 -0
  250. package/dist/final-answer-gate.js +26 -0
  251. package/dist/ghost-text.d.ts +16 -0
  252. package/dist/ghost-text.d.ts.map +1 -0
  253. package/dist/ghost-text.js +8 -0
  254. package/dist/git-branch-runtime.d.ts +14 -0
  255. package/dist/git-branch-runtime.d.ts.map +1 -0
  256. package/dist/git-branch-runtime.js +68 -0
  257. package/dist/git-command-runtime.d.ts +22 -0
  258. package/dist/git-command-runtime.d.ts.map +1 -0
  259. package/dist/git-command-runtime.js +89 -0
  260. package/dist/git-operation-runtime.d.ts +188 -0
  261. package/dist/git-operation-runtime.d.ts.map +1 -0
  262. package/dist/git-operation-runtime.js +45 -0
  263. package/dist/git-runtime.d.ts +113 -0
  264. package/dist/git-runtime.d.ts.map +1 -0
  265. package/dist/git-runtime.js +16 -0
  266. package/dist/git-slash-runtime.d.ts +38 -0
  267. package/dist/git-slash-runtime.d.ts.map +1 -0
  268. package/dist/git-slash-runtime.js +18 -0
  269. package/dist/git-tool-dispatch-runtime.d.ts +108 -0
  270. package/dist/git-tool-dispatch-runtime.d.ts.map +1 -0
  271. package/dist/git-tool-dispatch-runtime.js +25 -0
  272. package/dist/git-tool-runtime.d.ts +64 -0
  273. package/dist/git-tool-runtime.d.ts.map +1 -0
  274. package/dist/git-tool-runtime.js +36 -0
  275. package/dist/guard-wiring.d.ts +67 -0
  276. package/dist/guard-wiring.d.ts.map +1 -0
  277. package/dist/guard-wiring.js +21 -0
  278. package/dist/handoff-session-runtime.d.ts +11 -0
  279. package/dist/handoff-session-runtime.d.ts.map +1 -0
  280. package/dist/handoff-session-runtime.js +36 -0
  281. package/dist/index-result-presenter.d.ts +14 -0
  282. package/dist/index-result-presenter.d.ts.map +1 -0
  283. package/dist/index-result-presenter.js +28 -0
  284. package/dist/index-runtime.d.ts +64 -0
  285. package/dist/index-runtime.d.ts.map +1 -0
  286. package/dist/index-runtime.js +28 -0
  287. package/dist/index-tool-runtime.d.ts +44 -0
  288. package/dist/index-tool-runtime.d.ts.map +1 -0
  289. package/dist/index-tool-runtime.js +24 -0
  290. package/dist/index.d.ts +57 -0
  291. package/dist/index.d.ts.map +1 -0
  292. package/dist/index.js +2346 -0
  293. package/dist/job-agent-command-runtime.d.ts +127 -0
  294. package/dist/job-agent-command-runtime.d.ts.map +1 -0
  295. package/dist/job-agent-command-runtime.js +138 -0
  296. package/dist/job-runner-presenter.d.ts +32 -0
  297. package/dist/job-runner-presenter.d.ts.map +1 -0
  298. package/dist/job-runner-presenter.js +30 -0
  299. package/dist/job-runtime.d.ts +65 -0
  300. package/dist/job-runtime.d.ts.map +1 -0
  301. package/dist/job-runtime.js +88 -0
  302. package/dist/keybinding-runtime.d.ts +29 -0
  303. package/dist/keybinding-runtime.d.ts.map +1 -0
  304. package/dist/keybinding-runtime.js +14 -0
  305. package/dist/log-artifact.d.ts +55 -0
  306. package/dist/log-artifact.d.ts.map +1 -0
  307. package/dist/log-artifact.js +10 -0
  308. package/dist/mcp-index-command-runtime.d.ts +21 -0
  309. package/dist/mcp-index-command-runtime.d.ts.map +1 -0
  310. package/dist/mcp-index-command-runtime.js +18 -0
  311. package/dist/mcp-index-runtime.d.ts +106 -0
  312. package/dist/mcp-index-runtime.d.ts.map +1 -0
  313. package/dist/mcp-index-runtime.js +142 -0
  314. package/dist/mcp-sse-runtime.d.ts +13 -0
  315. package/dist/mcp-sse-runtime.d.ts.map +1 -0
  316. package/dist/mcp-sse-runtime.js +8 -0
  317. package/dist/mcp-stdio-runtime.d.ts +37 -0
  318. package/dist/mcp-stdio-runtime.d.ts.map +1 -0
  319. package/dist/mcp-stdio-runtime.js +15 -0
  320. package/dist/memory-command-runtime.d.ts +37 -0
  321. package/dist/memory-command-runtime.d.ts.map +1 -0
  322. package/dist/memory-command-runtime.js +88 -0
  323. package/dist/memory-eviction-runtime.d.ts +7 -0
  324. package/dist/memory-eviction-runtime.d.ts.map +1 -0
  325. package/dist/memory-eviction-runtime.js +12 -0
  326. package/dist/memory-extraction-runtime.d.ts +40 -0
  327. package/dist/memory-extraction-runtime.d.ts.map +1 -0
  328. package/dist/memory-extraction-runtime.js +20 -0
  329. package/dist/memory-rules-runtime.d.ts +15 -0
  330. package/dist/memory-rules-runtime.d.ts.map +1 -0
  331. package/dist/memory-rules-runtime.js +14 -0
  332. package/dist/meta-scheduler-complexity.d.ts +16 -0
  333. package/dist/meta-scheduler-complexity.d.ts.map +1 -0
  334. package/dist/meta-scheduler-complexity.js +37 -0
  335. package/dist/meta-scheduler-runtime.d.ts +288 -0
  336. package/dist/meta-scheduler-runtime.d.ts.map +1 -0
  337. package/dist/meta-scheduler-runtime.js +17 -0
  338. package/dist/model-command-runtime.d.ts +12 -0
  339. package/dist/model-command-runtime.d.ts.map +1 -0
  340. package/dist/model-command-runtime.js +84 -0
  341. package/dist/model-doctor-runtime.d.ts +81 -0
  342. package/dist/model-doctor-runtime.d.ts.map +1 -0
  343. package/dist/model-doctor-runtime.js +46 -0
  344. package/dist/model-loop-runtime.d.ts +189 -0
  345. package/dist/model-loop-runtime.d.ts.map +1 -0
  346. package/dist/model-loop-runtime.js +141 -0
  347. package/dist/model-prompt-runtime.d.ts +25 -0
  348. package/dist/model-prompt-runtime.d.ts.map +1 -0
  349. package/dist/model-prompt-runtime.js +33 -0
  350. package/dist/model-setup-runtime.d.ts +28 -0
  351. package/dist/model-setup-runtime.d.ts.map +1 -0
  352. package/dist/model-setup-runtime.js +26 -0
  353. package/dist/model-stream-runtime.d.ts +47 -0
  354. package/dist/model-stream-runtime.d.ts.map +1 -0
  355. package/dist/model-stream-runtime.js +136 -0
  356. package/dist/model-tool-runtime.d.ts +114 -0
  357. package/dist/model-tool-runtime.d.ts.map +1 -0
  358. package/dist/model-tool-runtime.js +144 -0
  359. package/dist/natural-command-bridge.d.ts +158 -0
  360. package/dist/natural-command-bridge.d.ts.map +1 -0
  361. package/dist/natural-command-bridge.js +36 -0
  362. package/dist/pending-details-presenter.d.ts +8 -0
  363. package/dist/pending-details-presenter.d.ts.map +1 -0
  364. package/dist/pending-details-presenter.js +12 -0
  365. package/dist/permission-approval-runtime.d.ts +28 -0
  366. package/dist/permission-approval-runtime.d.ts.map +1 -0
  367. package/dist/permission-approval-runtime.js +136 -0
  368. package/dist/permission-continuation-runtime.d.ts +90 -0
  369. package/dist/permission-continuation-runtime.d.ts.map +1 -0
  370. package/dist/permission-continuation-runtime.js +68 -0
  371. package/dist/permission-policy-engine.d.ts +51 -0
  372. package/dist/permission-policy-engine.d.ts.map +1 -0
  373. package/dist/permission-policy-engine.js +12 -0
  374. package/dist/permission-presenter.d.ts +13 -0
  375. package/dist/permission-presenter.d.ts.map +1 -0
  376. package/dist/permission-presenter.js +8 -0
  377. package/dist/persistent-history.d.ts +18 -0
  378. package/dist/persistent-history.d.ts.map +1 -0
  379. package/dist/persistent-history.js +126 -0
  380. package/dist/platform-security.d.ts +4 -0
  381. package/dist/platform-security.d.ts.map +1 -0
  382. package/dist/platform-security.js +10 -0
  383. package/dist/process-command-runtime.d.ts +9 -0
  384. package/dist/process-command-runtime.d.ts.map +1 -0
  385. package/dist/process-command-runtime.js +11 -0
  386. package/dist/process-guard.d.ts +56 -0
  387. package/dist/process-guard.d.ts.map +1 -0
  388. package/dist/process-guard.js +22 -0
  389. package/dist/prompt-command-runtime.d.ts +12 -0
  390. package/dist/prompt-command-runtime.d.ts.map +1 -0
  391. package/dist/prompt-command-runtime.js +10 -0
  392. package/dist/prompt-stash.d.ts +15 -0
  393. package/dist/prompt-stash.d.ts.map +1 -0
  394. package/dist/prompt-stash.js +8 -0
  395. package/dist/provider-circuit-breaker.d.ts +132 -0
  396. package/dist/provider-circuit-breaker.d.ts.map +1 -0
  397. package/dist/provider-circuit-breaker.js +31 -0
  398. package/dist/provider-loop-runtime.d.ts +18 -0
  399. package/dist/provider-loop-runtime.d.ts.map +1 -0
  400. package/dist/provider-loop-runtime.js +16 -0
  401. package/dist/remote-command-runtime.d.ts +47 -0
  402. package/dist/remote-command-runtime.d.ts.map +1 -0
  403. package/dist/remote-command-runtime.js +125 -0
  404. package/dist/remote-inbound-bridge-runtime.d.ts +152 -0
  405. package/dist/remote-inbound-bridge-runtime.d.ts.map +1 -0
  406. package/dist/remote-inbound-bridge-runtime.js +44 -0
  407. package/dist/remote-mcp-presenter.d.ts +5 -0
  408. package/dist/remote-mcp-presenter.d.ts.map +1 -0
  409. package/dist/remote-mcp-presenter.js +10 -0
  410. package/dist/remote-repl-bridge-runtime.d.ts +134 -0
  411. package/dist/remote-repl-bridge-runtime.d.ts.map +1 -0
  412. package/dist/remote-repl-bridge-runtime.js +20 -0
  413. package/dist/remote-transport.d.ts +50 -0
  414. package/dist/remote-transport.d.ts.map +1 -0
  415. package/dist/remote-transport.js +14 -0
  416. package/dist/request-lifecycle-presenter.d.ts +25 -0
  417. package/dist/request-lifecycle-presenter.d.ts.map +1 -0
  418. package/dist/request-lifecycle-presenter.js +22 -0
  419. package/dist/runner-runtime.d.ts +41 -0
  420. package/dist/runner-runtime.d.ts.map +1 -0
  421. package/dist/runner-runtime.js +35 -0
  422. package/dist/runtime-budget.d.ts +38 -0
  423. package/dist/runtime-budget.d.ts.map +1 -0
  424. package/dist/runtime-budget.js +78 -0
  425. package/dist/runtime-path-marker.d.ts +112 -0
  426. package/dist/runtime-path-marker.d.ts.map +1 -0
  427. package/dist/runtime-path-marker.js +18 -0
  428. package/dist/runtime-status-presenter.d.ts +22 -0
  429. package/dist/runtime-status-presenter.d.ts.map +1 -0
  430. package/dist/runtime-status-presenter.js +15 -0
  431. package/dist/runtime-status-snapshot.d.ts +52 -0
  432. package/dist/runtime-status-snapshot.d.ts.map +1 -0
  433. package/dist/runtime-status-snapshot.js +11 -0
  434. package/dist/runtime-utils.d.ts +2 -0
  435. package/dist/runtime-utils.d.ts.map +1 -0
  436. package/dist/runtime-utils.js +6 -0
  437. package/dist/shell/clipboard.d.ts +23 -0
  438. package/dist/shell/clipboard.d.ts.map +1 -0
  439. package/dist/shell/clipboard.js +8 -0
  440. package/dist/shell/components/AgentProgressTree.d.ts +9 -0
  441. package/dist/shell/components/AgentProgressTree.d.ts.map +1 -0
  442. package/dist/shell/components/AgentProgressTree.js +9 -0
  443. package/dist/shell/components/BackgroundTaskOverlay.d.ts +8 -0
  444. package/dist/shell/components/BackgroundTaskOverlay.d.ts.map +1 -0
  445. package/dist/shell/components/BackgroundTaskOverlay.js +8 -0
  446. package/dist/shell/components/BtwPanel.d.ts +16 -0
  447. package/dist/shell/components/BtwPanel.d.ts.map +1 -0
  448. package/dist/shell/components/BtwPanel.js +8 -0
  449. package/dist/shell/components/CommandPanel.d.ts +11 -0
  450. package/dist/shell/components/CommandPanel.d.ts.map +1 -0
  451. package/dist/shell/components/CommandPanel.js +8 -0
  452. package/dist/shell/components/Composer.d.ts +187 -0
  453. package/dist/shell/components/Composer.d.ts.map +1 -0
  454. package/dist/shell/components/Composer.js +99 -0
  455. package/dist/shell/components/ConfigPanel.d.ts +11 -0
  456. package/dist/shell/components/ConfigPanel.d.ts.map +1 -0
  457. package/dist/shell/components/ConfigPanel.js +8 -0
  458. package/dist/shell/components/CtrlOToExpand.d.ts +30 -0
  459. package/dist/shell/components/CtrlOToExpand.d.ts.map +1 -0
  460. package/dist/shell/components/CtrlOToExpand.js +16 -0
  461. package/dist/shell/components/HelpPanel.d.ts +19 -0
  462. package/dist/shell/components/HelpPanel.d.ts.map +1 -0
  463. package/dist/shell/components/HelpPanel.js +8 -0
  464. package/dist/shell/components/HistorySearchPanel.d.ts +14 -0
  465. package/dist/shell/components/HistorySearchPanel.d.ts.map +1 -0
  466. package/dist/shell/components/HistorySearchPanel.js +104 -0
  467. package/dist/shell/components/MessageMarkdown.d.ts +34 -0
  468. package/dist/shell/components/MessageMarkdown.d.ts.map +1 -0
  469. package/dist/shell/components/MessageMarkdown.js +18 -0
  470. package/dist/shell/components/MessageResponse.d.ts +14 -0
  471. package/dist/shell/components/MessageResponse.d.ts.map +1 -0
  472. package/dist/shell/components/MessageResponse.js +6 -0
  473. package/dist/shell/components/MouseInputRouter.d.ts +28 -0
  474. package/dist/shell/components/MouseInputRouter.d.ts.map +1 -0
  475. package/dist/shell/components/MouseInputRouter.js +84 -0
  476. package/dist/shell/components/NotificationStack.d.ts +19 -0
  477. package/dist/shell/components/NotificationStack.d.ts.map +1 -0
  478. package/dist/shell/components/NotificationStack.js +6 -0
  479. package/dist/shell/components/OutputLine.d.ts +19 -0
  480. package/dist/shell/components/OutputLine.d.ts.map +1 -0
  481. package/dist/shell/components/OutputLine.js +38 -0
  482. package/dist/shell/components/ProductBlock.d.ts +10 -0
  483. package/dist/shell/components/ProductBlock.d.ts.map +1 -0
  484. package/dist/shell/components/ProductBlock.js +12 -0
  485. package/dist/shell/components/ScrollViewport.d.ts +43 -0
  486. package/dist/shell/components/ScrollViewport.d.ts.map +1 -0
  487. package/dist/shell/components/ScrollViewport.js +86 -0
  488. package/dist/shell/components/SessionsPanel.d.ts +24 -0
  489. package/dist/shell/components/SessionsPanel.d.ts.map +1 -0
  490. package/dist/shell/components/SessionsPanel.js +8 -0
  491. package/dist/shell/components/ShellApp.d.ts +8 -0
  492. package/dist/shell/components/ShellApp.d.ts.map +1 -0
  493. package/dist/shell/components/ShellApp.js +45 -0
  494. package/dist/shell/components/ShortcutPanel.d.ts +14 -0
  495. package/dist/shell/components/ShortcutPanel.d.ts.map +1 -0
  496. package/dist/shell/components/ShortcutPanel.js +59 -0
  497. package/dist/shell/components/SlashSuggestions.d.ts +24 -0
  498. package/dist/shell/components/SlashSuggestions.d.ts.map +1 -0
  499. package/dist/shell/components/SlashSuggestions.js +7 -0
  500. package/dist/shell/components/StatusFooter.d.ts +30 -0
  501. package/dist/shell/components/StatusFooter.d.ts.map +1 -0
  502. package/dist/shell/components/StatusFooter.js +7 -0
  503. package/dist/shell/components/StatusTray.d.ts +9 -0
  504. package/dist/shell/components/StatusTray.d.ts.map +1 -0
  505. package/dist/shell/components/StatusTray.js +6 -0
  506. package/dist/shell/components/StructuredDiff.d.ts +9 -0
  507. package/dist/shell/components/StructuredDiff.d.ts.map +1 -0
  508. package/dist/shell/components/StructuredDiff.js +7 -0
  509. package/dist/shell/components/TaskListView.d.ts +9 -0
  510. package/dist/shell/components/TaskListView.d.ts.map +1 -0
  511. package/dist/shell/components/TaskListView.js +9 -0
  512. package/dist/shell/components/TaskSuggestionBar.d.ts +15 -0
  513. package/dist/shell/components/TaskSuggestionBar.d.ts.map +1 -0
  514. package/dist/shell/components/TaskSuggestionBar.js +8 -0
  515. package/dist/shell/components/UnseenMessagePill.d.ts +12 -0
  516. package/dist/shell/components/UnseenMessagePill.d.ts.map +1 -0
  517. package/dist/shell/components/UnseenMessagePill.js +6 -0
  518. package/dist/shell/components/WorkflowProgressView.d.ts +9 -0
  519. package/dist/shell/components/WorkflowProgressView.d.ts.map +1 -0
  520. package/dist/shell/components/WorkflowProgressView.js +9 -0
  521. package/dist/shell/components/useAnchoredCursor.d.ts +32 -0
  522. package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -0
  523. package/dist/shell/components/useAnchoredCursor.js +6 -0
  524. package/dist/shell/hooks/useRenderThrottle.d.ts +2 -0
  525. package/dist/shell/hooks/useRenderThrottle.d.ts.map +1 -0
  526. package/dist/shell/hooks/useRenderThrottle.js +35 -0
  527. package/dist/shell/hooks/useScrollBatcher.d.ts +10 -0
  528. package/dist/shell/hooks/useScrollBatcher.d.ts.map +1 -0
  529. package/dist/shell/hooks/useScrollBatcher.js +23 -0
  530. package/dist/shell/hooks/useScrollRuntime.d.ts +2 -0
  531. package/dist/shell/hooks/useScrollRuntime.d.ts.map +1 -0
  532. package/dist/shell/hooks/useScrollRuntime.js +6 -0
  533. package/dist/shell/hyperlink-utils.d.ts +18 -0
  534. package/dist/shell/hyperlink-utils.d.ts.map +1 -0
  535. package/dist/shell/hyperlink-utils.js +8 -0
  536. package/dist/shell/ink-renderer.d.ts +18 -0
  537. package/dist/shell/ink-renderer.d.ts.map +1 -0
  538. package/dist/shell/ink-renderer.js +54 -0
  539. package/dist/shell/models/command-transcript-presenter.d.ts +73 -0
  540. package/dist/shell/models/command-transcript-presenter.d.ts.map +1 -0
  541. package/dist/shell/models/command-transcript-presenter.js +26 -0
  542. package/dist/shell/models/help-panel.d.ts +37 -0
  543. package/dist/shell/models/help-panel.d.ts.map +1 -0
  544. package/dist/shell/models/help-panel.js +10 -0
  545. package/dist/shell/models/permission-elevation.d.ts +65 -0
  546. package/dist/shell/models/permission-elevation.d.ts.map +1 -0
  547. package/dist/shell/models/permission-elevation.js +10 -0
  548. package/dist/shell/models/permission-explanation.d.ts +45 -0
  549. package/dist/shell/models/permission-explanation.d.ts.map +1 -0
  550. package/dist/shell/models/permission-explanation.js +14 -0
  551. package/dist/shell/models/session-panel.d.ts +22 -0
  552. package/dist/shell/models/session-panel.d.ts.map +1 -0
  553. package/dist/shell/models/session-panel.js +18 -0
  554. package/dist/shell/models/task-scroll-state.d.ts +24 -0
  555. package/dist/shell/models/task-scroll-state.d.ts.map +1 -0
  556. package/dist/shell/models/task-scroll-state.js +26 -0
  557. package/dist/shell/models/terminal-input-runtime.d.ts +37 -0
  558. package/dist/shell/models/terminal-input-runtime.d.ts.map +1 -0
  559. package/dist/shell/models/terminal-input-runtime.js +18 -0
  560. package/dist/shell/models/transcript-scroll-state.d.ts +57 -0
  561. package/dist/shell/models/transcript-scroll-state.d.ts.map +1 -0
  562. package/dist/shell/models/transcript-scroll-state.js +12 -0
  563. package/dist/shell/models/transcript-selection-state.d.ts +39 -0
  564. package/dist/shell/models/transcript-selection-state.d.ts.map +1 -0
  565. package/dist/shell/models/transcript-selection-state.js +25 -0
  566. package/dist/shell/models/wheel-acceleration.d.ts +52 -0
  567. package/dist/shell/models/wheel-acceleration.d.ts.map +1 -0
  568. package/dist/shell/models/wheel-acceleration.js +6 -0
  569. package/dist/shell/output-utils.d.ts +22 -0
  570. package/dist/shell/output-utils.d.ts.map +1 -0
  571. package/dist/shell/output-utils.js +12 -0
  572. package/dist/shell/plain-renderer.d.ts +12 -0
  573. package/dist/shell/plain-renderer.d.ts.map +1 -0
  574. package/dist/shell/plain-renderer.js +13 -0
  575. package/dist/shell/progress-views.d.ts +10 -0
  576. package/dist/shell/progress-views.d.ts.map +1 -0
  577. package/dist/shell/progress-views.js +17 -0
  578. package/dist/shell/stdout-flush-barrier.d.ts +39 -0
  579. package/dist/shell/stdout-flush-barrier.d.ts.map +1 -0
  580. package/dist/shell/stdout-flush-barrier.js +10 -0
  581. package/dist/shell/terminal-capability.d.ts +54 -0
  582. package/dist/shell/terminal-capability.d.ts.map +1 -0
  583. package/dist/shell/terminal-capability.js +10 -0
  584. package/dist/shell/terminal-interaction-runtime.d.ts +11 -0
  585. package/dist/shell/terminal-interaction-runtime.d.ts.map +1 -0
  586. package/dist/shell/terminal-interaction-runtime.js +38 -0
  587. package/dist/shell/terminal-state-recovery.d.ts +52 -0
  588. package/dist/shell/terminal-state-recovery.d.ts.map +1 -0
  589. package/dist/shell/terminal-state-recovery.js +11 -0
  590. package/dist/shell/text-utils.d.ts +40 -0
  591. package/dist/shell/text-utils.d.ts.map +1 -0
  592. package/dist/shell/text-utils.js +26 -0
  593. package/dist/shell/theme.d.ts +41 -0
  594. package/dist/shell/theme.d.ts.map +1 -0
  595. package/dist/shell/theme.js +8 -0
  596. package/dist/shell/types.d.ts +784 -0
  597. package/dist/shell/types.d.ts.map +1 -0
  598. package/dist/shell/types.js +0 -0
  599. package/dist/shell/view-model.d.ts +82 -0
  600. package/dist/shell/view-model.d.ts.map +1 -0
  601. package/dist/shell/view-model.js +48 -0
  602. package/dist/slash-command-runtime.d.ts +64 -0
  603. package/dist/slash-command-runtime.d.ts.map +1 -0
  604. package/dist/slash-command-runtime.js +186 -0
  605. package/dist/slash-dispatch.d.ts +48 -0
  606. package/dist/slash-dispatch.d.ts.map +1 -0
  607. package/dist/slash-dispatch.js +53 -0
  608. package/dist/startup-runtime.d.ts +48 -0
  609. package/dist/startup-runtime.d.ts.map +1 -0
  610. package/dist/startup-runtime.js +43 -0
  611. package/dist/terminal-readiness-presenter.d.ts +131 -0
  612. package/dist/terminal-readiness-presenter.d.ts.map +1 -0
  613. package/dist/terminal-readiness-presenter.js +16 -0
  614. package/dist/terminal-readiness-runtime.d.ts +5 -0
  615. package/dist/terminal-readiness-runtime.d.ts.map +1 -0
  616. package/dist/terminal-readiness-runtime.js +15 -0
  617. package/dist/terminal-setup-runtime.d.ts +34 -0
  618. package/dist/terminal-setup-runtime.d.ts.map +1 -0
  619. package/dist/terminal-setup-runtime.js +257 -0
  620. package/dist/tool-output-presenter.d.ts +38 -0
  621. package/dist/tool-output-presenter.d.ts.map +1 -0
  622. package/dist/tool-output-presenter.js +16 -0
  623. package/dist/tool-result-budget.d.ts +42 -0
  624. package/dist/tool-result-budget.d.ts.map +1 -0
  625. package/dist/tool-result-budget.js +11 -0
  626. package/dist/tui-agent-job-runtime.d.ts +38 -0
  627. package/dist/tui-agent-job-runtime.d.ts.map +1 -0
  628. package/dist/tui-agent-job-runtime.js +86 -0
  629. package/dist/tui-context-runtime.d.ts +426 -0
  630. package/dist/tui-context-runtime.d.ts.map +1 -0
  631. package/dist/tui-context-runtime.js +65 -0
  632. package/dist/tui-data-types.d.ts +923 -0
  633. package/dist/tui-data-types.d.ts.map +1 -0
  634. package/dist/tui-data-types.js +0 -0
  635. package/dist/tui-details-runtime.d.ts +25 -0
  636. package/dist/tui-details-runtime.d.ts.map +1 -0
  637. package/dist/tui-details-runtime.js +29 -0
  638. package/dist/tui-memory-runtime.d.ts +33 -0
  639. package/dist/tui-memory-runtime.d.ts.map +1 -0
  640. package/dist/tui-memory-runtime.js +58 -0
  641. package/dist/tui-messages.d.ts +4 -0
  642. package/dist/tui-messages.d.ts.map +1 -0
  643. package/dist/tui-messages.js +6 -0
  644. package/dist/tui-model-runtime.d.ts +30 -0
  645. package/dist/tui-model-runtime.d.ts.map +1 -0
  646. package/dist/tui-model-runtime.js +39 -0
  647. package/dist/tui-output-surface.d.ts +141 -0
  648. package/dist/tui-output-surface.d.ts.map +1 -0
  649. package/dist/tui-output-surface.js +55 -0
  650. package/dist/tui-permission-runtime.d.ts +62 -0
  651. package/dist/tui-permission-runtime.d.ts.map +1 -0
  652. package/dist/tui-permission-runtime.js +24 -0
  653. package/dist/tui-state-runtime.d.ts +21 -0
  654. package/dist/tui-state-runtime.d.ts.map +1 -0
  655. package/dist/tui-state-runtime.js +47 -0
  656. package/dist/turn-continuity-runtime.d.ts +30 -0
  657. package/dist/turn-continuity-runtime.d.ts.map +1 -0
  658. package/dist/turn-continuity-runtime.js +8 -0
  659. package/dist/undo-ring.d.ts +16 -0
  660. package/dist/undo-ring.d.ts.map +1 -0
  661. package/dist/undo-ring.js +12 -0
  662. package/dist/usage-stats-presenter.d.ts +17 -0
  663. package/dist/usage-stats-presenter.d.ts.map +1 -0
  664. package/dist/usage-stats-presenter.js +22 -0
  665. package/dist/user-state-signal-runtime.d.ts +33 -0
  666. package/dist/user-state-signal-runtime.d.ts.map +1 -0
  667. package/dist/user-state-signal-runtime.js +8 -0
  668. package/dist/verification-command-runtime.d.ts +25 -0
  669. package/dist/verification-command-runtime.d.ts.map +1 -0
  670. package/dist/verification-command-runtime.js +51 -0
  671. package/dist/verification-level.d.ts +93 -0
  672. package/dist/verification-level.d.ts.map +1 -0
  673. package/dist/verification-level.js +18 -0
  674. package/dist/workflow-agent-runtime-bridge.d.ts +169 -0
  675. package/dist/workflow-agent-runtime-bridge.d.ts.map +1 -0
  676. package/dist/workflow-agent-runtime-bridge.js +9 -0
  677. package/dist/workflow-command-runtime.d.ts +94 -0
  678. package/dist/workflow-command-runtime.d.ts.map +1 -0
  679. package/dist/workflow-command-runtime.js +114 -0
  680. package/dist/workflow-plan-schema.d.ts +161 -0
  681. package/dist/workflow-plan-schema.d.ts.map +1 -0
  682. package/dist/workflow-plan-schema.js +12 -0
  683. package/dist/workflow-planner-entry.d.ts +52 -0
  684. package/dist/workflow-planner-entry.d.ts.map +1 -0
  685. package/dist/workflow-planner-entry.js +328 -0
  686. package/dist/workflow-task-surface.d.ts +39 -0
  687. package/dist/workflow-task-surface.d.ts.map +1 -0
  688. package/dist/workflow-task-surface.js +7 -0
  689. package/dist/workspace-reference-cache.d.ts +110 -0
  690. package/dist/workspace-reference-cache.d.ts.map +1 -0
  691. package/dist/workspace-reference-cache.js +12 -0
  692. package/package.json +41 -0
@@ -0,0 +1,784 @@
1
+ import type { Readable, Writable } from "node:stream";
2
+ import type { Language } from "@linghun/shared";
3
+ import type { Keybinding } from "../keybinding-runtime.js";
4
+ export type ShellRuntimeMode = "ink" | "plain";
5
+ export type ShellThemeMode = "color" | "no-color";
6
+ export type ProductBlockKind = "home" | "repo" | "setup" | "permission" | "run" | "tool" | "error" | "details" | "command" | "user";
7
+ export type ProductBlockStatus = "info" | "running" | "pass" | "partial" | "fail" | "blocked";
8
+ export type ProductBlockSelectionRange = {
9
+ lineIndex: number;
10
+ startColumn: number;
11
+ endColumn: number;
12
+ };
13
+ /**
14
+ * D.13Q-UX — 消息语义维度(与 ProductBlockKind 的"用途"维度正交)。
15
+ *
16
+ * - assistant_text: 普通 assistant 正文 / 最终汇报,走 Markdown,默认色,不卡片化。
17
+ * - assistant_thinking: thinking 块;dim italic,默认收起。
18
+ * - command_transcript: 用户输入 slash 命令的回显;低调单行 ❯ /xxx。
19
+ * - local_command_output: ! shell 输出;dim "⎿ " 前缀 + 默认色正文。
20
+ * - tool_result_success / _error / _cancelled / _rejected: 工具结果四态。
21
+ * - diagnostic: /model doctor 等诊断输出。
22
+ * - notification: 轻提示(cache-low / freshness / shortcut hint),走 notification 栈。
23
+ * - permission_panel: 权限面板,独立顶部脊线容器。
24
+ * - help_panel: /help 面板,分组 core/advanced/details。
25
+ * - status: 短暂状态行(不进 transcript)。
26
+ *
27
+ * 兼容性:未设 messageKind 时回退到旧的 ProductBlockKind + status 渲染路径,
28
+ * D.13L/M/N/O/P 既有形状不受影响。
29
+ */
30
+ export type MessageBlockKind = "assistant_text" | "assistant_thinking" | "command_transcript" | "user_text" | "local_command_output" | "tool_result_success" | "tool_result_error" | "tool_result_cancelled" | "tool_result_rejected" | "diagnostic" | "notification" | "permission_panel" | "help_panel" | "status" | "compact_boundary";
31
+ export type ProductBlockViewModel = {
32
+ id: string;
33
+ kind: ProductBlockKind;
34
+ status: ProductBlockStatus;
35
+ title: string;
36
+ summary: string;
37
+ detail?: string;
38
+ nextAction?: string;
39
+ /** True when Ctrl+O should reveal fullText from a summary-only rendering. */
40
+ ctrlOCollapsed?: boolean;
41
+ /** Echo / informational blocks that should not be auto-pruned by the view model. */
42
+ keep?: boolean;
43
+ /**
44
+ * Full normalized text the summary was derived from. Preserved on the block
45
+ * so `/details` (and future Ctrl+O) can reveal the entire body without
46
+ * round-tripping through the (potentially-truncated) summary line.
47
+ */
48
+ fullText?: string;
49
+ /**
50
+ * D.13Q-UX — 消息语义维度。设置后 ProductBlock 按 messageKind 分发渲染:
51
+ * assistant_text 走 Markdown 默认色(不卡片化、不打平);tool_result_* 按四态
52
+ * 着色;notification / status 等不进 transcript 主流。未设时回退到旧路径。
53
+ */
54
+ messageKind?: MessageBlockKind;
55
+ /** Whole-line compatibility fallback for older app-owned transcript selection rendering. */
56
+ selectionLineIndexes?: number[];
57
+ /** Cell-column ranges highlighted by the app-owned transcript selection substrate. */
58
+ selectionLineRanges?: ProductBlockSelectionRange[];
59
+ /** Phase 14 — message timestamp (ms since epoch), rendered dim next to user_text blocks. */
60
+ timestamp?: number;
61
+ /** Phase 15 — retry countdown info for error recovery UI. */
62
+ retrySeconds?: number;
63
+ retryAttempt?: number;
64
+ retryMax?: number;
65
+ };
66
+ export type CtrlOExpandView = {
67
+ active: boolean;
68
+ blockId?: string;
69
+ };
70
+ /**
71
+ * D.13Q-UX — 轻提示视图模型。CCB Notifications.tsx 范式:
72
+ * priority 决定显示顺序,timeoutMs 控制自动消失,color 留给 dim 之外的强调色。
73
+ * 通知**绝不进 transcript**,由 NotificationStack 右对齐栈单条主显。
74
+ *
75
+ * 过期判定:view-model 在 createShellViewModel 时以 Date.now() 为基准过滤
76
+ * createdAt + timeoutMs <= now 的项;timeoutMs 不设视为常驻。createdAt 由
77
+ * 写入方负责(见 index.ts:writeLightHints);缺省时 view-model 视为常驻。
78
+ */
79
+ export type NotificationView = {
80
+ /** 稳定 key,用于 React 列表 + dedupe。 */
81
+ key: string;
82
+ /** 单行短文案;过长应在数据源就截断。 */
83
+ text: string;
84
+ /** immediate 立即抢占;medium 默认;low 当队列空时显示。 */
85
+ priority: "immediate" | "medium" | "low";
86
+ /** 自动消失(毫秒);undefined 表示常驻直到状态消失。 */
87
+ timeoutMs?: number;
88
+ /** 写入时间戳(毫秒);与 timeoutMs 一起决定 view-model 是否过滤。 */
89
+ createdAt?: number;
90
+ /** 可选强调色(warning / error / dim 默认)。 */
91
+ tone?: "default" | "dim" | "warning" | "error" | "success";
92
+ };
93
+ export type StatusTrayViewModel = {
94
+ project: string;
95
+ model: string;
96
+ permission: string;
97
+ trust: string;
98
+ index: string;
99
+ background: string;
100
+ };
101
+ export type ComposerViewModel = {
102
+ placeholder: string;
103
+ taskPlaceholder: string;
104
+ submittedHint: string;
105
+ masking: boolean;
106
+ /** Active model setup flow (apiKey / baseUrl / model / confirm). */
107
+ setupActive: boolean;
108
+ /** Setup step label, surfaced near the composer when setup is active. */
109
+ setupStep?: string;
110
+ /**
111
+ * D.13Q-UX Real Smoke Fix v2 — D. busy guard.
112
+ * 模型仍在处理上一条请求时为 true(submitted-pending 首帧 / activity phase 在
113
+ * thinking|tool_running|continuing|permission_waiting / activeAbortController
114
+ * 还在)。Composer 在 busy=true 时仍允许打字保留草稿,但 Enter 不提交、不清空。
115
+ */
116
+ busy?: boolean;
117
+ /** busy=true 时显示的人类可读提示。"按 Ctrl+C 中断" 类。 */
118
+ busyHint?: string;
119
+ };
120
+ export type ShellViewMode = "home" | "task" | "pending";
121
+ export type TaskActivityView = {
122
+ phase: "thinking" | "tool_running" | "permission_waiting" | "continuing" | "completed" | "error";
123
+ text: string;
124
+ toolName?: string;
125
+ /** Short target summary for tool_running phase (e.g. file path, command snippet). */
126
+ toolTarget?: string;
127
+ elapsed?: string;
128
+ language?: "zh-CN" | "en-US";
129
+ totalLines?: number;
130
+ totalBytes?: number;
131
+ /** Concrete sub-phase label (e.g. "reading_context"), set by the runtime instead of the UI cycling arbitrarily. */
132
+ thinkingLabel?: string;
133
+ };
134
+ /**
135
+ * D.13E Step 2 — 扩展为 4 档提权 + 兼容 legacy 别名。
136
+ *
137
+ * - allow_once / allow_always_tool / deny / details / cancel:来自
138
+ * PermissionElevationModel.buildElevationOptions 的稳定 id。
139
+ * - yes / no:legacy 别名,保留以兼容现有 fallback 测试和老的 onInput 路径。
140
+ * controller 端把 yes 映射为 allow_once,no 映射为 deny。
141
+ */
142
+ export type PermissionActionId = "allow_once" | "allow_always_tool" | "deny" | "details" | "cancel" | "yes" | "no";
143
+ export type PermissionAction = {
144
+ id: PermissionActionId;
145
+ label: string;
146
+ /** Single-letter shortcut, e.g. "y" / "n" / "d". Esc handled separately. */
147
+ shortcut?: string;
148
+ };
149
+ export type TaskPermissionView = {
150
+ toolName: string;
151
+ reason: string;
152
+ risk: "low" | "medium" | "high";
153
+ scope: string[];
154
+ hint: string;
155
+ /**
156
+ * D.13L Block 0-B — 主屏权限卡的"做什么"摘要行,例如:
157
+ * "运行终端命令:git status"
158
+ * "写入文件:packages/tui/src/foo.ts"
159
+ * "使用工具:Glob"
160
+ * 由 mapPendingApprovalToPermission 从 toolCall.input 派生;UI 只读不解析。
161
+ */
162
+ actionSummary?: string;
163
+ /**
164
+ * Selectable actions surfaced as a button row under the card.
165
+ * If absent/empty, the view-model auto-fills the default y/n/d/cancel set
166
+ * via `withPermissionActions(...)`.
167
+ */
168
+ actions?: PermissionAction[];
169
+ /**
170
+ * D.13Q-UX — 详情说明行(多行 user-facing 短句)。由 view-model 调用
171
+ * permission-explanation.explainPolicyVerdict 装配;reason 已去 rule.id。
172
+ * PermissionControl 把这些行 dim 渲染在 actionSummary 下方,提供"为什么问"
173
+ * 的解释,但**不暴露 rule.id / hook id / classifier 内部枚举**。
174
+ * 详情可由 /details 进一步展开 redactedSummary(仍由现有 /details 链路负责)。
175
+ */
176
+ explanationLines?: string[];
177
+ };
178
+ /**
179
+ * TaskFooter — minimal status footer rendered under the composer in task mode.
180
+ * Only carries the small set of always-on signals: permission mode, model,
181
+ * cache hit rate, index status, and a colored cycle-mode hint. The full
182
+ * StatusTray noise stays out of the task region so the composer + permission
183
+ * flow keep focus.
184
+ *
185
+ * D13E-P3: dropped session id / gate / background fields; added model + cache
186
+ * + cyclePermHint (rendered with status-fail color in ShellApp.TaskFooter).
187
+ */
188
+ export type TaskFooterView = {
189
+ permissionMode: string;
190
+ permissionModeColor?: string;
191
+ model: string;
192
+ cache: string;
193
+ index: string;
194
+ /** Red-colored Shift+Tab hint, e.g. "(Shift+Tab 切换模式)" / "(Shift+Tab switch mode)". */
195
+ cyclePermHint: string;
196
+ /**
197
+ * D13E-P3 cleanup: optional reasoning level segment, e.g. "推理 High" /
198
+ * "Reasoning High". Absent when the active provider/model does not surface
199
+ * a reasoning level or when the value is empty/未生效.
200
+ */
201
+ reasoning?: string;
202
+ cost?: string;
203
+ contextUsage?: string;
204
+ hint?: string;
205
+ /**
206
+ * D.13Q-UX — model 段是否染 dim。setup-needed / "unknown" / "openai-compatible-model"
207
+ * 等占位状态时 true,避免把 stale 兜底(如 deepseek-chat)当成正常 model 显示。
208
+ */
209
+ modelDim?: boolean;
210
+ /**
211
+ * D.13Q-UX — cache 段色调:低命中率染 warning,未知染 dim,默认 muted。
212
+ */
213
+ cacheTone?: "default" | "warning" | "dim";
214
+ /**
215
+ * Footer workspace/worktree line. Keep it short and above runtimeStatus.
216
+ */
217
+ workspaceStatus?: string;
218
+ /**
219
+ * Footer 第二行:当前 active/resumable runtime 状态。历史 terminal 任务不进这里。
220
+ */
221
+ runtimeStatus?: string;
222
+ isRemoteMode?: boolean;
223
+ };
224
+ /**
225
+ * D.13E Step 2 — ConfigPanel view-model(runInkShell.onInput 拦截 /config 后填充)
226
+ *
227
+ * - panel_list:14 个 panel 的列表视图(cursor 指向当前高亮)。
228
+ * - panel_detail:进入某个 panel 的 actions 列表(actionCursor 指向当前高亮)。
229
+ *
230
+ * panels / actions 数组由 view-model.mapConfigPanelState 用
231
+ * ConfigControlPlane.getConfigPanels / getPanelText / getActionLabel 装配,
232
+ * 已经做过 i18n(zh-CN / en-US),UI 层只渲染 label / summary。
233
+ */
234
+ export type ConfigPanelView = {
235
+ phase: "panel_list";
236
+ cursor: number;
237
+ scrollOffset: number;
238
+ panels: {
239
+ id: string;
240
+ title: string;
241
+ summary: string;
242
+ slash: string;
243
+ }[];
244
+ } | {
245
+ phase: "panel_detail";
246
+ panel: {
247
+ id: string;
248
+ title: string;
249
+ summary: string;
250
+ };
251
+ actionCursor: number;
252
+ scrollOffset: number;
253
+ actions: {
254
+ id: string;
255
+ label: string;
256
+ }[];
257
+ };
258
+ /**
259
+ * D.13Q-UX Task Surface Maturity Sweep — 通用 CommandPanel 视图。
260
+ *
261
+ * 高级命令(/mcp, /memory, /index status, /cache, /background, /job,
262
+ * /plugins, /skills, /remote, /doctor, /model 等)默认输出走这条通道,
263
+ * 不再以 assistant_text 写进 transcript。结构上:
264
+ * - title:命令名("/mcp", "/index status")。
265
+ * - summary:短状态行("MCP 已连接:3 / 3"),数组以支持多行轻摘要。
266
+ * - sections:分组小表(每组一个标题 + 若干行)。
267
+ * - actions:建议的下一步命令("/mcp doctor")。
268
+ * - detailsText:完整明细文本,供显式详情面板(如 /details)展开。
269
+ * - tone:neutral / warning / error,控制边框色与状态色。
270
+ * - cursor / scrollOffset:面板自身可滚动时使用。
271
+ */
272
+ export type CommandPanelTaskRef = {
273
+ id: string;
274
+ kind: "agent" | "job" | "background";
275
+ };
276
+ export type CommandPanelRow = string | {
277
+ text: string;
278
+ selectable?: boolean;
279
+ taskRef?: CommandPanelTaskRef;
280
+ detailsText?: string;
281
+ };
282
+ export type CommandPanelSection = {
283
+ title?: string;
284
+ rows: CommandPanelRow[];
285
+ };
286
+ export type CommandPanelView = {
287
+ title: string;
288
+ summary?: string[];
289
+ sections?: CommandPanelSection[];
290
+ actions?: string[];
291
+ detailsText?: string;
292
+ tone?: "neutral" | "warning" | "error";
293
+ cursor?: number;
294
+ scrollOffset?: number;
295
+ /** 面板内部是否处于"展开 detailsText"状态。 */
296
+ expanded?: boolean;
297
+ };
298
+ export type TranscriptScrollView = {
299
+ scrollOffset: number;
300
+ stickToBottom: boolean;
301
+ hasOverflow?: boolean;
302
+ viewportHeight?: number;
303
+ contentHeight?: number;
304
+ wheelStep?: number;
305
+ };
306
+ export type TranscriptVirtualRangeView = {
307
+ startIndex: number;
308
+ endIndex: number;
309
+ topSpacer: number;
310
+ bottomSpacer: number;
311
+ estimatedContentHeight: number;
312
+ renderedBlockCount: number;
313
+ totalBlockCount: number;
314
+ };
315
+ export type AgentProgressTreeView = {
316
+ rows: {
317
+ id: string;
318
+ branch: "middle" | "last";
319
+ name: string;
320
+ status: string;
321
+ activity?: string;
322
+ elapsed?: string;
323
+ toolUses: number;
324
+ tokens: number;
325
+ }[];
326
+ hiddenPending: number;
327
+ activitySummary?: string;
328
+ /** Selected row index (-1 = no selection, >= 0 = selection active). */
329
+ cursor: number;
330
+ /** Expanded agent id (detail row visible). */
331
+ expandedId?: string;
332
+ };
333
+ export type TaskListView = {
334
+ rows: {
335
+ id: string;
336
+ subject: string;
337
+ status: string;
338
+ owner?: string;
339
+ blockedBy?: string[];
340
+ /** Phase 7 — activity summary for row 2 (dimColor). Only shown when in_progress + non-empty. */
341
+ activity?: string;
342
+ }[];
343
+ hiddenPending: number;
344
+ };
345
+ export type WorkflowProgressView = {
346
+ runs: {
347
+ id: string;
348
+ goal: string;
349
+ status: string;
350
+ elapsed?: string;
351
+ currentStepId?: string;
352
+ steps: {
353
+ id: string;
354
+ title: string;
355
+ status: string;
356
+ active: boolean;
357
+ }[];
358
+ }[];
359
+ hiddenPending: number;
360
+ };
361
+ export type BackgroundTaskOverlayView = {
362
+ title: string;
363
+ summary: string;
364
+ hint: string;
365
+ cursor: number;
366
+ rows: {
367
+ id: string;
368
+ kind: string;
369
+ title: string;
370
+ status: string;
371
+ currentStep?: string;
372
+ progress?: {
373
+ completed: number;
374
+ total?: number;
375
+ label?: string;
376
+ };
377
+ detailsText?: string;
378
+ }[];
379
+ };
380
+ export type TranscriptViewportGeometryView = {
381
+ x: number;
382
+ y: number;
383
+ width: number;
384
+ height: number;
385
+ contentHeight: number;
386
+ topOffset: number;
387
+ };
388
+ export type TranscriptMouseEventView = {
389
+ x: number;
390
+ y: number;
391
+ button: "left" | "wheel-up" | "wheel-down" | "other";
392
+ action: "down" | "drag" | "up" | "wheel" | "hover" | "focus-out";
393
+ };
394
+ /** Legacy task-scroll model shape; main transcript wiring uses TranscriptScrollView. */
395
+ export type TaskScrollView = TranscriptScrollView;
396
+ export type TranscriptScrollActionName = "lineUp" | "lineDown" | "halfPageUp" | "halfPageDown" | "fullPageUp" | "fullPageDown" | "wheelUp" | "wheelDown" | "top" | "bottom";
397
+ export type TaskSuggestion = {
398
+ id: string;
399
+ source: "slash" | "setup" | "permission" | "config" | "tool_error";
400
+ label: string;
401
+ hint?: string;
402
+ action: {
403
+ kind: "slash";
404
+ command: string;
405
+ } | {
406
+ kind: "inline";
407
+ id: string;
408
+ };
409
+ };
410
+ export type ShellViewModel = {
411
+ language: Language;
412
+ projectName: string;
413
+ projectPath: string;
414
+ keybindings?: Keybinding[];
415
+ width: number;
416
+ height: number;
417
+ mode: ShellRuntimeMode;
418
+ themeMode: ShellThemeMode;
419
+ viewMode: ShellViewMode;
420
+ brand: string;
421
+ homeVision: string;
422
+ setupHint?: string;
423
+ activity?: TaskActivityView;
424
+ permission?: TaskPermissionView;
425
+ status: StatusTrayViewModel;
426
+ composer: ComposerViewModel;
427
+ blocks: ProductBlockViewModel[];
428
+ transcriptVirtualRange?: TranscriptVirtualRangeView;
429
+ /** Live assistant preview rendered outside the historical ProductBlock list. */
430
+ streamingAssistantText?: string;
431
+ ctrlOExpand?: CtrlOExpandView;
432
+ limitations: string[];
433
+ /** Compact task-mode footer. Present in task/pending viewMode; absent in home. */
434
+ taskFooter?: TaskFooterView;
435
+ /** Footer-adjacent background/workflow summary; kept out of transcript blocks. */
436
+ taskRuntimeSummary?: ProductBlockViewModel;
437
+ agentProgressTree?: AgentProgressTreeView;
438
+ taskListView?: TaskListView;
439
+ workflowProgressView?: WorkflowProgressView;
440
+ backgroundTaskOverlay?: BackgroundTaskOverlayView;
441
+ /**
442
+ * D.13Q-UX — 轻提示队列。NotificationStack 右对齐渲染,单条主显,
443
+ * 不进 transcript(与 blocks 隔离)。空数组时 ShellApp 不渲染。
444
+ */
445
+ notifications?: NotificationView[];
446
+ /**
447
+ * D.13E Step 2 — 由 view-model.taskSuggestions 计算后挂到 view 上,
448
+ * ShellApp 渲染 TaskSuggestionBar;空数组时 ShellApp 不渲染任何东西。
449
+ */
450
+ taskSuggestions?: TaskSuggestion[];
451
+ taskSuggestionCursor?: number;
452
+ /**
453
+ * D.13E Step 2 — ConfigPanel UI 状态。idle 时 undefined;
454
+ * 与 view.permission 互斥(permission 优先级更高,ShellApp 互斥渲染)。
455
+ */
456
+ configPanel?: ConfigPanelView;
457
+ /**
458
+ * D.13Q-UX Task Surface — 通用 CommandPanel UI 状态。高级 slash 命令的结果
459
+ * 默认进入此面板(与 transcript 隔离)。空时 ShellApp 不渲染。
460
+ */
461
+ commandPanel?: CommandPanelView;
462
+ /**
463
+ * D.13Q-UX Task Surface — 任务区滚动状态。home 模式不存在;task/pending
464
+ * 模式始终存在,默认 scrollOffset=0 / stickToBottom=true。
465
+ */
466
+ transcriptScroll?: TranscriptScrollView;
467
+ /** Measured transcript viewport bounds used to route app-owned mouse wheel events. */
468
+ transcriptViewportGeometry?: TranscriptViewportGeometryView;
469
+ /**
470
+ * D.13Q-UX Closure — HelpPanel UI 状态。打开时显示三组 Tab + 命令列表,
471
+ * Enter dispatch slash,Esc 关闭。
472
+ */
473
+ helpPanel?: {
474
+ group: "core" | "advanced" | "details";
475
+ cursor: number;
476
+ scrollOffset: number;
477
+ entries: {
478
+ slash: string;
479
+ description: string;
480
+ }[];
481
+ };
482
+ /**
483
+ * D.13Q-UX Closure — BtwPanel UI 状态。打开时显示 side question + 回答(spinner / Markdown)。
484
+ */
485
+ btwPanel?: {
486
+ question: string;
487
+ phase: "loading" | "answered" | "error";
488
+ answer?: string;
489
+ error?: string;
490
+ };
491
+ /**
492
+ * D.13Q-UX Closure — SessionsPanel UI 状态。打开时显示按 updatedAt 排序的 session 列表。
493
+ */
494
+ sessionsPanel?: {
495
+ cursor: number;
496
+ entries: {
497
+ id: string;
498
+ title: string;
499
+ updatedAt: string;
500
+ messageCount: number;
501
+ isCurrent: boolean;
502
+ }[];
503
+ /** Phase 8: search | preview | undefined (list). */
504
+ mode?: "search" | "preview";
505
+ searchQuery?: string;
506
+ previewEntryId?: string;
507
+ };
508
+ /**
509
+ * R4 — HistorySearchPanel UI 状态。Ctrl+R 打开交互式历史搜索。
510
+ */
511
+ historySearchPanel?: {
512
+ query: string;
513
+ cursor: number;
514
+ results: {
515
+ text: string;
516
+ timestamp: number;
517
+ }[];
518
+ };
519
+ /**
520
+ * R4 — ShortcutPanel UI 状态。"?" / /shortcuts 打开快捷键发现面板。
521
+ */
522
+ shortcutPanel?: boolean;
523
+ /**
524
+ * R4 — Unseen message count (when scrolled above bottom).
525
+ */
526
+ unseenMessageCount?: number;
527
+ /**
528
+ * R4 — Git branch name for footer display.
529
+ */
530
+ gitBranch?: string;
531
+ /**
532
+ * Unified visible work state — derived source of truth for active work.
533
+ * The view-model uses this to suppress duplicate progress layers and expose
534
+ * the concrete views that ShellApp renders.
535
+ */
536
+ visibleWorkState?: VisibleWorkState;
537
+ };
538
+ /**
539
+ * Unified visible work state derived from TuiContext. The view-model maps this
540
+ * into activity/spinner, progress tree, and workflow views so multiple
541
+ * subsystems do not compete for the main screen.
542
+ *
543
+ * Priority (highest → lowest):
544
+ * mainStreaming > toolRunning > agentsRunning > explicitWorkflow > backgroundTasks > idle
545
+ */
546
+ export type VisibleWorkState = {
547
+ mainRequestActive: boolean;
548
+ userInputPending: boolean;
549
+ toolsRunning: boolean;
550
+ agentsRunning: number;
551
+ backgroundTasksRunning: number;
552
+ explicitWorkflowRunning: boolean;
553
+ multiAgentWorkflowRunning: boolean;
554
+ pendingCompletionCount: number;
555
+ scrollDetached: boolean;
556
+ unseenCount: number;
557
+ };
558
+ /**
559
+ * D.13E Step 2 — 新增 4 类事件,全部由 ConfigPanel / Composer permission row 触发:
560
+ * - config-move / config-enter / config-back:ConfigPanel 自身的导航事件,
561
+ * 由 runInkShell.onInput 路由到 reduceConfigState。
562
+ * - permission-action:Composer 在收到 elevation 行的 y/a/n/d 单字母或 Enter 后
563
+ * 发出,actionId 来自 PermissionElevationModel.buildElevationOptions 的稳定 id。
564
+ */
565
+ export type ShellInputEvent = {
566
+ type: "submit";
567
+ text: string;
568
+ } | {
569
+ type: "empty-submit";
570
+ } | {
571
+ type: "escape";
572
+ } | {
573
+ type: "interrupt";
574
+ } | {
575
+ type: "shift-enter";
576
+ } | {
577
+ type: "cycle-permission-mode";
578
+ } | {
579
+ type: "config-move";
580
+ delta: -1 | 1;
581
+ } | {
582
+ type: "config-enter";
583
+ } | {
584
+ type: "config-submit";
585
+ command: string;
586
+ } | {
587
+ type: "config-back";
588
+ } | {
589
+ type: "permission-action";
590
+ actionId: PermissionActionId;
591
+ } | {
592
+ type: "task-suggestion-move";
593
+ delta: -1 | 1;
594
+ } | {
595
+ type: "task-suggestion-action";
596
+ suggestionId: string;
597
+ }
598
+ /**
599
+ * D.13Q-UX — Ctrl+O 派发:直接触发"展开完整内容",不写 buffer、不进 transcript
600
+ * 命令行(旧实现 submit "/details" 会让用户输入区里出现 /details)。
601
+ * /details slash 仍保留为兼容命令;本事件是主交互入口。
602
+ */
603
+ | {
604
+ type: "toggle-details";
605
+ }
606
+ /**
607
+ * D.13Q-UX Closure — HelpPanel 事件:core / advanced / details 三组导航。
608
+ * help-open 由 index.ts 拦截 /help 后触发;help-move 上下选择;
609
+ * help-switch-group Tab/左右切组;help-enter 派发选中 slash;
610
+ * help-select 由数字快捷键直接选择对应项;help-close Esc。
611
+ */
612
+ | {
613
+ type: "help-open";
614
+ group?: "core" | "advanced" | "details";
615
+ } | {
616
+ type: "help-move";
617
+ delta: -1 | 1;
618
+ } | {
619
+ type: "help-switch-group";
620
+ delta: -1 | 1;
621
+ } | {
622
+ type: "help-enter";
623
+ } | {
624
+ type: "help-select";
625
+ index: number;
626
+ } | {
627
+ type: "help-close";
628
+ }
629
+ /**
630
+ * D.13Q-UX Closure — BtwPanel 事件:side question 独立面板,
631
+ * 不进主 conversation。
632
+ */
633
+ | {
634
+ type: "btw-open";
635
+ question: string;
636
+ } | {
637
+ type: "btw-close";
638
+ }
639
+ /**
640
+ * D.13Q-UX Closure — SessionsPanel 事件:picker 选择 + 关闭。
641
+ */
642
+ | {
643
+ type: "sessions-open";
644
+ } | {
645
+ type: "sessions-move";
646
+ delta: -1 | 1;
647
+ } | {
648
+ type: "sessions-resume";
649
+ } | {
650
+ type: "sessions-close";
651
+ }
652
+ /** Phase 8: search input + preview mode. */
653
+ | {
654
+ type: "sessions-search";
655
+ } | {
656
+ type: "sessions-search-input";
657
+ input: string;
658
+ } | {
659
+ type: "sessions-search-delete";
660
+ } | {
661
+ type: "sessions-search-close";
662
+ } | {
663
+ type: "sessions-preview";
664
+ } | {
665
+ type: "sessions-preview-close";
666
+ }
667
+ /**
668
+ * Transcript scroll events. CCB-compatible behavior is implemented in
669
+ * shell/models/transcript-scroll-state.ts: PgUp/PgDn are page actions,
670
+ * wheel/arrow are line actions, Home/End are absolute top/bottom jumps.
671
+ * - command-panel-close: Esc 关闭通用 CommandPanel。
672
+ */
673
+ | {
674
+ type: "transcript-scroll";
675
+ action: TranscriptScrollActionName;
676
+ } | {
677
+ type: "transcript-scroll";
678
+ delta: number;
679
+ } | {
680
+ type: "transcript-scroll-measure";
681
+ viewportHeight: number;
682
+ contentHeight: number;
683
+ } | {
684
+ type: "transcript-block-measure";
685
+ id: string;
686
+ width: number;
687
+ height: number;
688
+ } | {
689
+ type: "transcript-viewport-geometry";
690
+ geometry: TranscriptViewportGeometryView;
691
+ } | {
692
+ type: "transcript-mouse";
693
+ event: TranscriptMouseEventView;
694
+ } | {
695
+ type: "transcript-scroll-end";
696
+ } | {
697
+ type: "transcript-scroll-top";
698
+ } | {
699
+ type: "command-panel-close";
700
+ } | {
701
+ type: "command-panel-move";
702
+ delta: -1 | 1;
703
+ } | {
704
+ type: "command-panel-toggle";
705
+ } | {
706
+ type: "command-panel-stop";
707
+ } | {
708
+ type: "background-overlay-open";
709
+ } | {
710
+ type: "background-overlay-close";
711
+ } | {
712
+ type: "background-overlay-move";
713
+ delta: -1 | 1;
714
+ } | {
715
+ type: "background-overlay-toggle";
716
+ } | {
717
+ type: "background-overlay-stop";
718
+ } | {
719
+ type: "copy-selection";
720
+ } | {
721
+ type: "history-search-open";
722
+ } | {
723
+ type: "history-search-close";
724
+ } | {
725
+ type: "history-search-input";
726
+ query: string;
727
+ } | {
728
+ type: "history-search-move";
729
+ delta: -1 | 1;
730
+ } | {
731
+ type: "history-search-accept";
732
+ } | {
733
+ type: "shortcuts-panel-open";
734
+ } | {
735
+ type: "shortcuts-panel-close";
736
+ } | {
737
+ type: "undo";
738
+ } | {
739
+ type: "stash";
740
+ } | {
741
+ type: "external-editor";
742
+ } | {
743
+ type: "clipboard-copied";
744
+ text: string;
745
+ } | {
746
+ type: "clipboard-failed";
747
+ error: string;
748
+ }
749
+ /** Agent tree keyboard navigation (Phase 3 visual alignment). */
750
+ | {
751
+ type: "agent-tree-move";
752
+ delta: -1 | 1;
753
+ } | {
754
+ type: "agent-tree-enter";
755
+ } | {
756
+ type: "agent-tree-close";
757
+ } | {
758
+ type: "agent-tree-escape";
759
+ };
760
+ export type ShellController = {
761
+ onInput: (event: ShellInputEvent) => Promise<void> | void;
762
+ getViewModel: () => ShellViewModel;
763
+ onResize?: () => void;
764
+ };
765
+ export type ShellRenderOptions = {
766
+ stdin?: Readable;
767
+ stdout?: Writable;
768
+ stderr?: Writable;
769
+ };
770
+ export type BackgroundTaskSummary = {
771
+ id: string;
772
+ kind?: string;
773
+ title: string;
774
+ status: string;
775
+ currentStep?: string;
776
+ progress?: {
777
+ completed: number;
778
+ total?: number;
779
+ label?: string;
780
+ };
781
+ result?: string;
782
+ nextAction?: string;
783
+ };
784
+ //# sourceMappingURL=types.d.ts.map