@humain/humain-code 0.8.3 → 0.8.5

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 (926) hide show
  1. package/CHANGELOG.md +147 -0
  2. package/dist/bundle/agent-monitor.js +1 -1
  3. package/dist/bundle/chunks/anthropic-messages-42CGJCSR.js +82 -0
  4. package/dist/bundle/chunks/ask-VH7GNX75.js +97 -0
  5. package/dist/bundle/chunks/azure-openai-responses-DOKKMBUN.js +15 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +200 -179
  7. package/dist/bundle/chunks/bowser-UX7KDMIY.js +92 -0
  8. package/dist/bundle/chunks/{chunk-46C6D7UC.js → chunk-2CYGUEQO.js} +1 -1
  9. package/dist/bundle/chunks/chunk-2RXTZK2V.js +177 -0
  10. package/dist/bundle/chunks/{chunk-2XD7TLKB.js → chunk-3OOOEJV4.js} +16 -16
  11. package/dist/bundle/chunks/chunk-3RXT35Y3.js +3 -0
  12. package/dist/bundle/chunks/{chunk-MPRAQ6ZI.js → chunk-4LGBXPUD.js} +1 -1
  13. package/dist/bundle/chunks/chunk-4SL6URR3.js +90 -0
  14. package/dist/bundle/chunks/{chunk-AW24RHGJ.js → chunk-53DWQSBC.js} +4 -4
  15. package/dist/bundle/chunks/{chunk-LSRXA7OS.js → chunk-5C5K4EVJ.js} +3 -3
  16. package/dist/bundle/chunks/{chunk-2JNJJ6SZ.js → chunk-5KUCY54O.js} +3 -3
  17. package/dist/bundle/chunks/{chunk-4TDNOR36.js → chunk-625QJSFJ.js} +1 -1
  18. package/dist/bundle/chunks/chunk-7DIRHF4H.js +17 -0
  19. package/dist/bundle/chunks/{chunk-QJB5YI3I.js → chunk-7PAXKU7M.js} +1 -1
  20. package/dist/bundle/chunks/chunk-7XRMMCKG.js +2477 -0
  21. package/dist/bundle/chunks/{chunk-R2KD2HFT.js → chunk-7YB3HRRN.js} +83 -196
  22. package/dist/bundle/chunks/{chunk-DCXHRP6C.js → chunk-A2UZYK23.js} +13 -13
  23. package/dist/bundle/chunks/chunk-A5ZMBTTM.js +12 -0
  24. package/dist/bundle/chunks/{chunk-JKX5EGOT.js → chunk-AER66CNP.js} +13 -13
  25. package/dist/bundle/chunks/chunk-B3FT6L6S.js +131 -0
  26. package/dist/bundle/chunks/{chunk-VSXVZVBE.js → chunk-BDNX23GT.js} +433 -412
  27. package/dist/bundle/chunks/chunk-BIC5BSNX.js +13 -0
  28. package/dist/bundle/chunks/{chunk-JSHKS7VH.js → chunk-BNZZJ4LO.js} +1 -1
  29. package/dist/bundle/chunks/{chunk-4MKATHT2.js → chunk-CG43CMFH.js} +1 -1
  30. package/dist/bundle/chunks/{chunk-VFLVWPLZ.js → chunk-CKFLQGJN.js} +20 -16
  31. package/dist/bundle/chunks/{chunk-7LSTTCSC.js → chunk-COZTJAOY.js} +348 -177
  32. package/dist/bundle/chunks/chunk-D4UCXXDP.js +115 -0
  33. package/dist/bundle/chunks/{chunk-HQMUDHC3.js → chunk-D6ZWWDW5.js} +6 -5
  34. package/dist/bundle/chunks/{chunk-MUN4ZZZP.js → chunk-EWPEY4F4.js} +1341 -1366
  35. package/dist/bundle/chunks/{chunk-FJIISX5W.js → chunk-F74XLJPC.js} +195 -192
  36. package/dist/bundle/chunks/chunk-FDRBTGFJ.js +4 -0
  37. package/dist/bundle/chunks/chunk-FHP5BULR.js +5 -0
  38. package/dist/bundle/chunks/{chunk-E4VUW4RI.js → chunk-FLWO3H5J.js} +12 -12
  39. package/dist/bundle/chunks/{chunk-KLSRGGOH.js → chunk-G2PFPQX7.js} +2 -2
  40. package/dist/bundle/chunks/chunk-GMPJWLZS.js +57 -0
  41. package/dist/bundle/chunks/{chunk-M5TVWJ5T.js → chunk-H35P7ROY.js} +462 -441
  42. package/dist/bundle/chunks/chunk-HCHCYBNK.js +2 -0
  43. package/dist/bundle/chunks/{chunk-7WE77IE3.js → chunk-HRNYDRL7.js} +1 -1
  44. package/dist/bundle/chunks/chunk-HWFAAGYK.js +23 -0
  45. package/dist/bundle/chunks/{chunk-PVNXN2TC.js → chunk-II5C7G67.js} +1 -1
  46. package/dist/bundle/chunks/{chunk-F2H47FRF.js → chunk-IMRZP5SC.js} +182 -137
  47. package/dist/bundle/chunks/chunk-J64VNQ6D.js +13 -0
  48. package/dist/bundle/chunks/{chunk-65FLSKDA.js → chunk-K5EFEIFP.js} +5 -4
  49. package/dist/bundle/chunks/{chunk-KI7CHPWC.js → chunk-KJ3QRSSY.js} +46 -43
  50. package/dist/bundle/chunks/{cli-6DJO467D.js → chunk-KSEO2LRK.js} +12 -10
  51. package/dist/bundle/chunks/{chunk-HHWVVNGG.js → chunk-MA2WCMSN.js} +2 -2
  52. package/dist/bundle/chunks/{chunk-L4J7SMJB.js → chunk-MAEKQSFU.js} +1 -1
  53. package/dist/bundle/chunks/chunk-MHQNLTZR.js +8 -0
  54. package/dist/bundle/chunks/chunk-MLOUZAVZ.js +122 -0
  55. package/dist/bundle/chunks/chunk-MQYR4Q6X.js +5 -0
  56. package/dist/bundle/chunks/chunk-MXF3KYLZ.js +4 -0
  57. package/dist/bundle/chunks/{chunk-GY663MNP.js → chunk-MZRTVX7F.js} +1 -1
  58. package/dist/bundle/chunks/chunk-MZYHSWHX.js +59 -0
  59. package/dist/bundle/chunks/chunk-N3W4ALAM.js +1151 -0
  60. package/dist/bundle/chunks/{chunk-6HTHDVJC.js → chunk-NPVRWPGX.js} +1 -1
  61. package/dist/bundle/chunks/{chunk-BRSLXHED.js → chunk-O44A4E4K.js} +1 -1
  62. package/dist/bundle/chunks/{chunk-T2ZGMEMV.js → chunk-OADQOW67.js} +175 -260
  63. package/dist/bundle/chunks/{chunk-J4GII2EE.js → chunk-P7SLTLSZ.js} +51 -46
  64. package/dist/bundle/chunks/{chunk-7OZNMWAJ.js → chunk-PPGSQZZF.js} +1 -1
  65. package/dist/bundle/chunks/chunk-PYX6ZCC7.js +29 -0
  66. package/dist/bundle/chunks/chunk-PZ7NYBHJ.js +8 -0
  67. package/dist/bundle/chunks/{chunk-VCMXBP5S.js → chunk-QESIDBMW.js} +1 -7
  68. package/dist/bundle/chunks/chunk-QUWVILLB.js +3 -0
  69. package/dist/bundle/chunks/chunk-QZWUXGY7.js +99 -0
  70. package/dist/bundle/chunks/{chunk-MIAXMK5F.js → chunk-QZXLTW7V.js} +8 -7
  71. package/dist/bundle/chunks/chunk-RP6MWUAP.js +4 -0
  72. package/dist/bundle/chunks/chunk-SASR4VNV.js +17 -0
  73. package/dist/bundle/chunks/{chunk-JSZBTGI6.js → chunk-SZZ5PNP6.js} +2 -2
  74. package/dist/bundle/chunks/chunk-T5WECB2D.js +7 -0
  75. package/dist/bundle/chunks/{chunk-2NVGOSBN.js → chunk-T7F2TEIS.js} +37 -13
  76. package/dist/bundle/chunks/{chunk-ZSWU5KKA.js → chunk-UOSJTMCL.js} +7 -3
  77. package/dist/bundle/chunks/{chunk-6P6MMQUH.js → chunk-UTRUALFN.js} +3 -3
  78. package/dist/bundle/chunks/{chunk-PWFM6AQQ.js → chunk-V2HTCZRF.js} +70 -67
  79. package/dist/bundle/chunks/{chunk-4GB7A76U.js → chunk-VWUEKLRH.js} +225 -348
  80. package/dist/bundle/chunks/{chunk-JX6YIPNK.js → chunk-WCKS2DPT.js} +1 -1
  81. package/dist/bundle/chunks/chunk-XGOJCV6Z.js +2 -0
  82. package/dist/bundle/chunks/{chunk-7WETECIB.js → chunk-Z7BWHPJ2.js} +1 -1
  83. package/dist/bundle/chunks/chunk-ZFFDBTG3.js +17 -0
  84. package/dist/bundle/chunks/cli-NJLV3XDZ.js +3 -0
  85. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-JEZVYITT.js → cloudflare-workers-ai-system-one-ZAZW4M4B.js} +1 -1
  86. package/dist/bundle/chunks/{compat-4ILE5BEC.js → compat-2RC4CJNV.js} +12 -12
  87. package/dist/bundle/chunks/{curator-server-QB4GITGS.js → curator-server-MW645JI3.js} +2 -2
  88. package/dist/bundle/chunks/{dist-NXHRL2KY.js → dist-3DAGUOYC.js} +2 -2
  89. package/dist/bundle/chunks/{dist-I6CI3CG5.js → dist-K4QIXV5O.js} +9 -9
  90. package/dist/bundle/chunks/{dist-35STTNYA.js → dist-NI2PTSLH.js} +1 -1
  91. package/dist/bundle/chunks/{dist-CBODG4CA.js → dist-VXQT3DQY.js} +6 -6
  92. package/dist/bundle/chunks/{dist-cjs-EROMDUKS.js → dist-cjs-4JQA6W3S.js} +31 -31
  93. package/dist/bundle/chunks/doctor-EH7X36SK.js +83 -0
  94. package/dist/bundle/chunks/{easter-egg-3d-VZC5WOYV.js → easter-egg-3d-Z24JLXD4.js} +1 -1
  95. package/dist/bundle/chunks/entry-3EL6GOWK.js +2 -0
  96. package/dist/bundle/chunks/{entry-6XDR2IDE.js → entry-4IMREZBD.js} +80 -79
  97. package/dist/bundle/chunks/{execute-6MEJJF2T.js → execute-C4BZQRPQ.js} +23 -22
  98. package/dist/bundle/chunks/{extract-L373D6O7.js → extract-XVQCIS7D.js} +5 -5
  99. package/dist/bundle/chunks/{flow-implementer-XOP4MG5X.js → flow-implementer-J6QTLBTH.js} +5 -5
  100. package/dist/bundle/chunks/github-copilot.js +57 -56
  101. package/dist/bundle/chunks/google-generative-ai-P2P45MYP.js +22 -0
  102. package/dist/bundle/chunks/google-vertex-SHY4IS5F.js +26 -0
  103. package/dist/bundle/chunks/{host-WOLZCWQQ.js → host-YESS2VAB.js} +1 -1
  104. package/dist/bundle/chunks/{index.bundle-HONF3PUD.js → index.bundle-TZT64KLH.js} +102 -89
  105. package/dist/bundle/chunks/{inprocess-MBKFGDM2.js → inprocess-OHNEKTFB.js} +6 -6
  106. package/dist/bundle/chunks/interactive-mode-ZREVRX7W.js +5 -0
  107. package/dist/bundle/chunks/{llama-cpp-classify-KYZT532X.js → llama-cpp-classify-RSRH4KV2.js} +5 -5
  108. package/dist/bundle/chunks/mistral-conversations-YTMJKHHI.js +42 -0
  109. package/dist/bundle/chunks/{node-N7TPBUJB.js → node-FF6QQQLH.js} +1 -1
  110. package/dist/bundle/chunks/openai-codex-responses-NUCJOJSZ.js +97 -0
  111. package/dist/bundle/chunks/openai-completions-E5NRJUHA.js +91 -0
  112. package/dist/bundle/chunks/{openai-decisions-JMSDGR7K.js → openai-decisions-342J5ZYG.js} +1 -1
  113. package/dist/bundle/chunks/openai-responses-BN5Z4HFI.js +26 -0
  114. package/dist/bundle/chunks/openrouter-images-7RNG3JVF.js +12 -0
  115. package/dist/bundle/chunks/{pdfjs-FE3L72A6.js → pdfjs-LSTLRXQW.js} +1415 -1416
  116. package/dist/bundle/chunks/pi-messages-2L7FV5OK.js +22 -0
  117. package/dist/bundle/chunks/questionnaire-session-XEVAK7JS.js +123 -0
  118. package/dist/bundle/chunks/runtime-2FSZRUG5.js +2 -0
  119. package/dist/bundle/chunks/session-picker-666KJIVM.js +4 -0
  120. package/dist/bundle/chunks/startup-ui-INEVSNGK.js +3 -0
  121. package/dist/bundle/chunks/{trace-command-VM7FBWPE.js → trace-command-BCVMZ5ZD.js} +4 -4
  122. package/dist/bundle/chunks/typesafe-system-one-UJUNSZG4.js +3 -0
  123. package/dist/bundle/chunks/{undici-WVNE45GY.js → undici-7IGAYA4S.js} +1 -1
  124. package/dist/bundle/chunks/virtual-modules-6FVRJTM3.js +29 -0
  125. package/dist/bundle/cli-runtime.js +5 -5
  126. package/dist/bundle/flow/package.json +3 -3
  127. package/dist/bundle/index.js +13 -13
  128. package/dist/bundle/orchestrate/package.json +1 -1
  129. package/dist/bundle/rpc-entry.js +5 -4
  130. package/dist/cli/agent-dir-arg.d.ts +12 -0
  131. package/dist/cli/agent-dir-arg.d.ts.map +1 -0
  132. package/dist/cli/agent-dir-arg.js +15 -0
  133. package/dist/cli/agent-dir-arg.js.map +1 -0
  134. package/dist/cli/args.d.ts +9 -0
  135. package/dist/cli/args.d.ts.map +1 -1
  136. package/dist/cli/args.js +19 -5
  137. package/dist/cli/args.js.map +1 -1
  138. package/dist/cli/auth-check.d.ts +1 -1
  139. package/dist/cli/auth-check.d.ts.map +1 -1
  140. package/dist/cli/auth-check.js +4 -2
  141. package/dist/cli/auth-check.js.map +1 -1
  142. package/dist/cli/doctor-config.d.ts +14 -0
  143. package/dist/cli/doctor-config.d.ts.map +1 -0
  144. package/dist/cli/doctor-config.js +92 -0
  145. package/dist/cli/doctor-config.js.map +1 -0
  146. package/dist/cli/doctor-system.d.ts +12 -0
  147. package/dist/cli/doctor-system.d.ts.map +1 -0
  148. package/dist/cli/doctor-system.js +109 -0
  149. package/dist/cli/doctor-system.js.map +1 -0
  150. package/dist/cli/doctor.d.ts +11 -0
  151. package/dist/cli/doctor.d.ts.map +1 -0
  152. package/dist/cli/doctor.js +323 -0
  153. package/dist/cli/doctor.js.map +1 -0
  154. package/dist/cli/doctor.lazy.d.ts +3 -0
  155. package/dist/cli/doctor.lazy.d.ts.map +1 -0
  156. package/dist/cli/doctor.lazy.js +3 -0
  157. package/dist/cli/doctor.lazy.js.map +1 -0
  158. package/dist/cli/list-models.d.ts.map +1 -1
  159. package/dist/cli/list-models.js +0 -4
  160. package/dist/cli/list-models.js.map +1 -1
  161. package/dist/cli/project-trust.d.ts.map +1 -1
  162. package/dist/cli/project-trust.js +6 -6
  163. package/dist/cli/project-trust.js.map +1 -1
  164. package/dist/cli/startup-ui.d.ts +3 -2
  165. package/dist/cli/startup-ui.d.ts.map +1 -1
  166. package/dist/cli/startup-ui.js +23 -10
  167. package/dist/cli/startup-ui.js.map +1 -1
  168. package/dist/config.d.ts +5 -1
  169. package/dist/config.d.ts.map +1 -1
  170. package/dist/config.js +13 -3
  171. package/dist/config.js.map +1 -1
  172. package/dist/coordination/broker/broker.d.ts +3 -3
  173. package/dist/coordination/broker/broker.d.ts.map +1 -1
  174. package/dist/coordination/broker/broker.js +15 -7
  175. package/dist/coordination/broker/broker.js.map +1 -1
  176. package/dist/core/acceptance-command.d.ts +6 -3
  177. package/dist/core/acceptance-command.d.ts.map +1 -1
  178. package/dist/core/acceptance-command.js +43 -12
  179. package/dist/core/acceptance-command.js.map +1 -1
  180. package/dist/core/acceptance-ledger.d.ts +2 -0
  181. package/dist/core/acceptance-ledger.d.ts.map +1 -1
  182. package/dist/core/acceptance-ledger.js +14 -3
  183. package/dist/core/acceptance-ledger.js.map +1 -1
  184. package/dist/core/agent-session-runtime.d.ts +11 -4
  185. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  186. package/dist/core/agent-session-runtime.js +13 -4
  187. package/dist/core/agent-session-runtime.js.map +1 -1
  188. package/dist/core/agent-session-services.d.ts.map +1 -1
  189. package/dist/core/agent-session-services.js +6 -0
  190. package/dist/core/agent-session-services.js.map +1 -1
  191. package/dist/core/agent-session.d.ts +19 -1
  192. package/dist/core/agent-session.d.ts.map +1 -1
  193. package/dist/core/agent-session.js +131 -36
  194. package/dist/core/agent-session.js.map +1 -1
  195. package/dist/core/auth-storage.d.ts.map +1 -1
  196. package/dist/core/auth-storage.js +7 -1
  197. package/dist/core/auth-storage.js.map +1 -1
  198. package/dist/core/bash-executor.d.ts +3 -1
  199. package/dist/core/bash-executor.d.ts.map +1 -1
  200. package/dist/core/bash-executor.js +18 -8
  201. package/dist/core/bash-executor.js.map +1 -1
  202. package/dist/core/bug-report.d.ts +24 -1
  203. package/dist/core/bug-report.d.ts.map +1 -1
  204. package/dist/core/bug-report.js +216 -19
  205. package/dist/core/bug-report.js.map +1 -1
  206. package/dist/core/compaction/branch-summarization.d.ts +2 -2
  207. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  208. package/dist/core/compaction/branch-summarization.js +9 -15
  209. package/dist/core/compaction/branch-summarization.js.map +1 -1
  210. package/dist/core/compaction/compaction.d.ts.map +1 -1
  211. package/dist/core/compaction/compaction.js +3 -0
  212. package/dist/core/compaction/compaction.js.map +1 -1
  213. package/dist/core/export-html/index.d.ts.map +1 -1
  214. package/dist/core/export-html/index.js +12 -10
  215. package/dist/core/export-html/index.js.map +1 -1
  216. package/dist/core/export-html/template.js +23 -1
  217. package/dist/core/extensions/containment.d.ts +26 -0
  218. package/dist/core/extensions/containment.d.ts.map +1 -0
  219. package/dist/core/extensions/containment.js +66 -0
  220. package/dist/core/extensions/containment.js.map +1 -0
  221. package/dist/core/extensions/loader.d.ts.map +1 -1
  222. package/dist/core/extensions/loader.js +65 -7
  223. package/dist/core/extensions/loader.js.map +1 -1
  224. package/dist/core/extensions/runner.d.ts +2 -1
  225. package/dist/core/extensions/runner.d.ts.map +1 -1
  226. package/dist/core/extensions/runner.js +68 -12
  227. package/dist/core/extensions/runner.js.map +1 -1
  228. package/dist/core/extensions/types.d.ts +14 -3
  229. package/dist/core/extensions/types.d.ts.map +1 -1
  230. package/dist/core/extensions/types.js.map +1 -1
  231. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  232. package/dist/core/extensions/wrapper.js +4 -1
  233. package/dist/core/extensions/wrapper.js.map +1 -1
  234. package/dist/core/footer-data-provider.d.ts.map +1 -1
  235. package/dist/core/footer-data-provider.js +2 -4
  236. package/dist/core/footer-data-provider.js.map +1 -1
  237. package/dist/core/http-dispatcher.d.ts +5 -2
  238. package/dist/core/http-dispatcher.d.ts.map +1 -1
  239. package/dist/core/http-dispatcher.js +6 -3
  240. package/dist/core/http-dispatcher.js.map +1 -1
  241. package/dist/core/keybindings.d.ts +20 -0
  242. package/dist/core/keybindings.d.ts.map +1 -1
  243. package/dist/core/keybindings.js +4 -1
  244. package/dist/core/keybindings.js.map +1 -1
  245. package/dist/core/mcp-servers.d.ts +29 -0
  246. package/dist/core/mcp-servers.d.ts.map +1 -1
  247. package/dist/core/mcp-servers.js +63 -17
  248. package/dist/core/mcp-servers.js.map +1 -1
  249. package/dist/core/messages.d.ts +4 -0
  250. package/dist/core/messages.d.ts.map +1 -1
  251. package/dist/core/messages.js +10 -2
  252. package/dist/core/messages.js.map +1 -1
  253. package/dist/core/model-config.d.ts +36 -0
  254. package/dist/core/model-config.d.ts.map +1 -1
  255. package/dist/core/model-resolver.js +1 -1
  256. package/dist/core/model-resolver.js.map +1 -1
  257. package/dist/core/model-runtime.d.ts.map +1 -1
  258. package/dist/core/model-runtime.js +6 -2
  259. package/dist/core/model-runtime.js.map +1 -1
  260. package/dist/core/nested-tool-calls.d.ts +6 -5
  261. package/dist/core/nested-tool-calls.d.ts.map +1 -1
  262. package/dist/core/nested-tool-calls.js +1 -3
  263. package/dist/core/nested-tool-calls.js.map +1 -1
  264. package/dist/core/os-secret-store.js +1 -1
  265. package/dist/core/os-secret-store.js.map +1 -1
  266. package/dist/core/package-manager.d.ts +3 -1
  267. package/dist/core/package-manager.d.ts.map +1 -1
  268. package/dist/core/package-manager.js +25 -4
  269. package/dist/core/package-manager.js.map +1 -1
  270. package/dist/core/pi-ai-schemas.d.ts +4 -0
  271. package/dist/core/pi-ai-schemas.d.ts.map +1 -1
  272. package/dist/core/project-trust.d.ts.map +1 -1
  273. package/dist/core/project-trust.js +1 -1
  274. package/dist/core/project-trust.js.map +1 -1
  275. package/dist/core/provider-composer.d.ts +1 -0
  276. package/dist/core/provider-composer.d.ts.map +1 -1
  277. package/dist/core/provider-composer.js +1 -0
  278. package/dist/core/provider-composer.js.map +1 -1
  279. package/dist/core/resolve-config-value.d.ts +4 -0
  280. package/dist/core/resolve-config-value.d.ts.map +1 -1
  281. package/dist/core/resolve-config-value.js +14 -3
  282. package/dist/core/resolve-config-value.js.map +1 -1
  283. package/dist/core/resource-loader.d.ts.map +1 -1
  284. package/dist/core/resource-loader.js +40 -2
  285. package/dist/core/resource-loader.js.map +1 -1
  286. package/dist/core/runtime-credentials.d.ts.map +1 -1
  287. package/dist/core/runtime-credentials.js +11 -7
  288. package/dist/core/runtime-credentials.js.map +1 -1
  289. package/dist/core/sdk.d.ts.map +1 -1
  290. package/dist/core/sdk.js +8 -4
  291. package/dist/core/sdk.js.map +1 -1
  292. package/dist/core/session-manager.d.ts +22 -1
  293. package/dist/core/session-manager.d.ts.map +1 -1
  294. package/dist/core/session-manager.js +227 -37
  295. package/dist/core/session-manager.js.map +1 -1
  296. package/dist/core/settings-defaults.d.ts +10 -1
  297. package/dist/core/settings-defaults.d.ts.map +1 -1
  298. package/dist/core/settings-defaults.js +7 -1
  299. package/dist/core/settings-defaults.js.map +1 -1
  300. package/dist/core/settings-manager.d.ts +14 -4
  301. package/dist/core/settings-manager.d.ts.map +1 -1
  302. package/dist/core/settings-manager.js +48 -15
  303. package/dist/core/settings-manager.js.map +1 -1
  304. package/dist/core/settings-schema.d.ts +20 -2
  305. package/dist/core/settings-schema.d.ts.map +1 -1
  306. package/dist/core/settings-schema.js +27 -4
  307. package/dist/core/settings-schema.js.map +1 -1
  308. package/dist/core/slash-commands.d.ts.map +1 -1
  309. package/dist/core/slash-commands.js +2 -0
  310. package/dist/core/slash-commands.js.map +1 -1
  311. package/dist/core/tools/bash-jobs.js +2 -2
  312. package/dist/core/tools/bash-jobs.js.map +1 -1
  313. package/dist/core/tools/bash.d.ts +3 -0
  314. package/dist/core/tools/bash.d.ts.map +1 -1
  315. package/dist/core/tools/bash.js +78 -46
  316. package/dist/core/tools/bash.js.map +1 -1
  317. package/dist/core/tools/edit-diff.d.ts +7 -1
  318. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  319. package/dist/core/tools/edit-diff.js +139 -75
  320. package/dist/core/tools/edit-diff.js.map +1 -1
  321. package/dist/core/tools/edit.d.ts.map +1 -1
  322. package/dist/core/tools/edit.js +4 -1
  323. package/dist/core/tools/edit.js.map +1 -1
  324. package/dist/core/tools/output-accumulator.d.ts +21 -6
  325. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  326. package/dist/core/tools/output-accumulator.js +90 -76
  327. package/dist/core/tools/output-accumulator.js.map +1 -1
  328. package/dist/core/tools/render-utils.d.ts +7 -2
  329. package/dist/core/tools/render-utils.d.ts.map +1 -1
  330. package/dist/core/tools/render-utils.js +14 -1
  331. package/dist/core/tools/render-utils.js.map +1 -1
  332. package/dist/core/tools/renderers/bash.d.ts.map +1 -1
  333. package/dist/core/tools/renderers/bash.js +9 -3
  334. package/dist/core/tools/renderers/bash.js.map +1 -1
  335. package/dist/core/tools/truncate.d.ts +1 -1
  336. package/dist/core/tools/truncate.d.ts.map +1 -1
  337. package/dist/core/tools/truncate.js +16 -7
  338. package/dist/core/tools/truncate.js.map +1 -1
  339. package/dist/core/tools/write.d.ts.map +1 -1
  340. package/dist/core/tools/write.js +2 -0
  341. package/dist/core/tools/write.js.map +1 -1
  342. package/dist/core/trust-manager.d.ts +2 -0
  343. package/dist/core/trust-manager.d.ts.map +1 -1
  344. package/dist/core/trust-manager.js +5 -4
  345. package/dist/core/trust-manager.js.map +1 -1
  346. package/dist/core/usage-totals.d.ts.map +1 -1
  347. package/dist/core/usage-totals.js +3 -0
  348. package/dist/core/usage-totals.js.map +1 -1
  349. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  350. package/dist/extensions/codemode/execute.js +64 -20
  351. package/dist/extensions/codemode/execute.js.map +1 -1
  352. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  353. package/dist/extensions/codemode/renderer.js +8 -3
  354. package/dist/extensions/codemode/renderer.js.map +1 -1
  355. package/dist/extensions/codemode/tool.d.ts +5 -0
  356. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  357. package/dist/extensions/codemode/tool.js.map +1 -1
  358. package/dist/extensions/llama/client.d.ts.map +1 -1
  359. package/dist/extensions/llama/client.js +3 -13
  360. package/dist/extensions/llama/client.js.map +1 -1
  361. package/dist/extensions/llama/ui.d.ts.map +1 -1
  362. package/dist/extensions/llama/ui.js +2 -1
  363. package/dist/extensions/llama/ui.js.map +1 -1
  364. package/dist/extensions/mcp/cli.d.ts +7 -0
  365. package/dist/extensions/mcp/cli.d.ts.map +1 -1
  366. package/dist/extensions/mcp/cli.js +35 -8
  367. package/dist/extensions/mcp/cli.js.map +1 -1
  368. package/dist/extensions/mcp/config.d.ts +33 -0
  369. package/dist/extensions/mcp/config.d.ts.map +1 -1
  370. package/dist/extensions/mcp/config.js +11 -2
  371. package/dist/extensions/mcp/config.js.map +1 -1
  372. package/dist/extensions/mcp/index.d.ts +8 -0
  373. package/dist/extensions/mcp/index.d.ts.map +1 -1
  374. package/dist/extensions/mcp/index.js +16 -0
  375. package/dist/extensions/mcp/index.js.map +1 -1
  376. package/dist/extensions/mcp/resources.d.ts +1 -1
  377. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  378. package/dist/extensions/mcp/resources.js +4 -3
  379. package/dist/extensions/mcp/resources.js.map +1 -1
  380. package/dist/extensions/mcp/runtime.d.ts +1 -1
  381. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  382. package/dist/extensions/mcp/runtime.js +15 -14
  383. package/dist/extensions/mcp/runtime.js.map +1 -1
  384. package/dist/extensions/mcp/tools.d.ts +1 -24
  385. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  386. package/dist/extensions/mcp/tools.js +10 -163
  387. package/dist/extensions/mcp/tools.js.map +1 -1
  388. package/dist/humain/ask-user-question/index.d.ts +4 -0
  389. package/dist/humain/ask-user-question/index.d.ts.map +1 -0
  390. package/dist/humain/ask-user-question/index.js +18 -0
  391. package/dist/humain/ask-user-question/index.js.map +1 -0
  392. package/dist/humain/ask-user-question/vendor/ask/answer-channel.d.ts +38 -0
  393. package/dist/humain/ask-user-question/vendor/ask/answer-channel.d.ts.map +1 -0
  394. package/dist/humain/ask-user-question/vendor/ask/answer-channel.js +97 -0
  395. package/dist/humain/ask-user-question/vendor/ask/answer-channel.js.map +1 -0
  396. package/dist/humain/ask-user-question/vendor/ask/ask-user-question.d.ts +41 -0
  397. package/dist/humain/ask-user-question/vendor/ask/ask-user-question.d.ts.map +1 -0
  398. package/dist/humain/ask-user-question/vendor/ask/ask-user-question.js +441 -0
  399. package/dist/humain/ask-user-question/vendor/ask/ask-user-question.js.map +1 -0
  400. package/dist/humain/ask-user-question/vendor/ask/config.d.ts +39 -0
  401. package/dist/humain/ask-user-question/vendor/ask/config.d.ts.map +1 -0
  402. package/dist/humain/ask-user-question/vendor/ask/config.js +95 -0
  403. package/dist/humain/ask-user-question/vendor/ask/config.js.map +1 -0
  404. package/dist/humain/ask-user-question/vendor/ask/events.d.ts +132 -0
  405. package/dist/humain/ask-user-question/vendor/ask/events.d.ts.map +1 -0
  406. package/dist/humain/ask-user-question/vendor/ask/events.js +50 -0
  407. package/dist/humain/ask-user-question/vendor/ask/events.js.map +1 -0
  408. package/dist/humain/ask-user-question/vendor/ask/index.d.ts +5 -0
  409. package/dist/humain/ask-user-question/vendor/ask/index.d.ts.map +1 -0
  410. package/dist/humain/ask-user-question/vendor/ask/index.js +15 -0
  411. package/dist/humain/ask-user-question/vendor/ask/index.js.map +1 -0
  412. package/dist/humain/ask-user-question/vendor/ask/presentation.d.ts +81 -0
  413. package/dist/humain/ask-user-question/vendor/ask/presentation.d.ts.map +1 -0
  414. package/dist/humain/ask-user-question/vendor/ask/presentation.js +105 -0
  415. package/dist/humain/ask-user-question/vendor/ask/presentation.js.map +1 -0
  416. package/dist/humain/ask-user-question/vendor/ask/reconcile.d.ts +28 -0
  417. package/dist/humain/ask-user-question/vendor/ask/reconcile.d.ts.map +1 -0
  418. package/dist/humain/ask-user-question/vendor/ask/reconcile.js +45 -0
  419. package/dist/humain/ask-user-question/vendor/ask/reconcile.js.map +1 -0
  420. package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.d.ts +41 -0
  421. package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.d.ts.map +1 -0
  422. package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.js +166 -0
  423. package/dist/humain/ask-user-question/vendor/ask/rpc-fallback.js.map +1 -0
  424. package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.d.ts +46 -0
  425. package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.d.ts.map +1 -0
  426. package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.js +247 -0
  427. package/dist/humain/ask-user-question/vendor/ask/state/build-questionnaire.js.map +1 -0
  428. package/dist/humain/ask-user-question/vendor/ask/state/external-editor.d.ts +11 -0
  429. package/dist/humain/ask-user-question/vendor/ask/state/external-editor.d.ts.map +1 -0
  430. package/dist/humain/ask-user-question/vendor/ask/state/external-editor.js +56 -0
  431. package/dist/humain/ask-user-question/vendor/ask/state/external-editor.js.map +1 -0
  432. package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.d.ts +6 -0
  433. package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.d.ts.map +1 -0
  434. package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.js +10 -0
  435. package/dist/humain/ask-user-question/vendor/ask/state/i18n-bridge.js.map +1 -0
  436. package/dist/humain/ask-user-question/vendor/ask/state/key-router.d.ts +57 -0
  437. package/dist/humain/ask-user-question/vendor/ask/state/key-router.d.ts.map +1 -0
  438. package/dist/humain/ask-user-question/vendor/ask/state/key-router.js +357 -0
  439. package/dist/humain/ask-user-question/vendor/ask/state/key-router.js.map +1 -0
  440. package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.d.ts +112 -0
  441. package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.d.ts.map +1 -0
  442. package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.js +240 -0
  443. package/dist/humain/ask-user-question/vendor/ask/state/questionnaire-session.js.map +1 -0
  444. package/dist/humain/ask-user-question/vendor/ask/state/row-intent.d.ts +87 -0
  445. package/dist/humain/ask-user-question/vendor/ask/state/row-intent.d.ts.map +1 -0
  446. package/dist/humain/ask-user-question/vendor/ask/state/row-intent.js +79 -0
  447. package/dist/humain/ask-user-question/vendor/ask/state/row-intent.js.map +1 -0
  448. package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.d.ts +22 -0
  449. package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.d.ts.map +1 -0
  450. package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.js +2 -0
  451. package/dist/humain/ask-user-question/vendor/ask/state/selectors/contract.js.map +1 -0
  452. package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.d.ts +27 -0
  453. package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.d.ts.map +1 -0
  454. package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.js +48 -0
  455. package/dist/humain/ask-user-question/vendor/ask/state/selectors/derivations.js.map +1 -0
  456. package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.d.ts +13 -0
  457. package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.d.ts.map +1 -0
  458. package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.js +15 -0
  459. package/dist/humain/ask-user-question/vendor/ask/state/selectors/focus.js.map +1 -0
  460. package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.d.ts +14 -0
  461. package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.d.ts.map +1 -0
  462. package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.js +96 -0
  463. package/dist/humain/ask-user-question/vendor/ask/state/selectors/projections.js.map +1 -0
  464. package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.d.ts +58 -0
  465. package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.d.ts.map +1 -0
  466. package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.js +310 -0
  467. package/dist/humain/ask-user-question/vendor/ask/state/state-reducer.js.map +1 -0
  468. package/dist/humain/ask-user-question/vendor/ask/state/state.d.ts +68 -0
  469. package/dist/humain/ask-user-question/vendor/ask/state/state.d.ts.map +1 -0
  470. package/dist/humain/ask-user-question/vendor/ask/state/state.js +2 -0
  471. package/dist/humain/ask-user-question/vendor/ask/state/state.js.map +1 -0
  472. package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.d.ts +24 -0
  473. package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.d.ts.map +1 -0
  474. package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.js +114 -0
  475. package/dist/humain/ask-user-question/vendor/ask/tool/external-answer.js.map +1 -0
  476. package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.d.ts +18 -0
  477. package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.d.ts.map +1 -0
  478. package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.js +29 -0
  479. package/dist/humain/ask-user-question/vendor/ask/tool/format-answer.js.map +1 -0
  480. package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.d.ts +41 -0
  481. package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.d.ts.map +1 -0
  482. package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.js +99 -0
  483. package/dist/humain/ask-user-question/vendor/ask/tool/normalize-params.js.map +1 -0
  484. package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.d.ts +37 -0
  485. package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.d.ts.map +1 -0
  486. package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.js +70 -0
  487. package/dist/humain/ask-user-question/vendor/ask/tool/response-envelope.js.map +1 -0
  488. package/dist/humain/ask-user-question/vendor/ask/tool/types.d.ts +129 -0
  489. package/dist/humain/ask-user-question/vendor/ask/tool/types.d.ts.map +1 -0
  490. package/dist/humain/ask-user-question/vendor/ask/tool/types.js +76 -0
  491. package/dist/humain/ask-user-question/vendor/ask/tool/types.js.map +1 -0
  492. package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.d.ts +21 -0
  493. package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.d.ts.map +1 -0
  494. package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.js +49 -0
  495. package/dist/humain/ask-user-question/vendor/ask/tool/validate-questionnaire.js.map +1 -0
  496. package/dist/humain/ask-user-question/vendor/ask/view/component-binding.d.ts +23 -0
  497. package/dist/humain/ask-user-question/vendor/ask/view/component-binding.d.ts.map +1 -0
  498. package/dist/humain/ask-user-question/vendor/ask/view/component-binding.js +16 -0
  499. package/dist/humain/ask-user-question/vendor/ask/view/component-binding.js.map +1 -0
  500. package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.d.ts +21 -0
  501. package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.d.ts.map +1 -0
  502. package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.js +49 -0
  503. package/dist/humain/ask-user-question/vendor/ask/view/components/inline-input.js.map +1 -0
  504. package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.d.ts +43 -0
  505. package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.d.ts.map +1 -0
  506. package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.js +130 -0
  507. package/dist/humain/ask-user-question/vendor/ask/view/components/multi-select-view.js.map +1 -0
  508. package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.d.ts +45 -0
  509. package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.d.ts.map +1 -0
  510. package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.js +39 -0
  511. package/dist/humain/ask-user-question/vendor/ask/view/components/option-list-view.js.map +1 -0
  512. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.d.ts +36 -0
  513. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.d.ts.map +1 -0
  514. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.js +72 -0
  515. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.js.map +1 -0
  516. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.d.ts +61 -0
  517. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.d.ts.map +1 -0
  518. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.js +108 -0
  519. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.js.map +1 -0
  520. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.d.ts +39 -0
  521. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.d.ts.map +1 -0
  522. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.js +76 -0
  523. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.js.map +1 -0
  524. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.d.ts +123 -0
  525. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.d.ts.map +1 -0
  526. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.js +180 -0
  527. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.js.map +1 -0
  528. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.d.ts +108 -0
  529. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.d.ts.map +1 -0
  530. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.js +235 -0
  531. package/dist/humain/ask-user-question/vendor/ask/view/components/preview/preview-pane.js.map +1 -0
  532. package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.d.ts +37 -0
  533. package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.d.ts.map +1 -0
  534. package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.js +47 -0
  535. package/dist/humain/ask-user-question/vendor/ask/view/components/submit-picker.js.map +1 -0
  536. package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.d.ts +31 -0
  537. package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.d.ts.map +1 -0
  538. package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.js +35 -0
  539. package/dist/humain/ask-user-question/vendor/ask/view/components/tab-bar.js.map +1 -0
  540. package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.d.ts +124 -0
  541. package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.d.ts.map +1 -0
  542. package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.js +205 -0
  543. package/dist/humain/ask-user-question/vendor/ask/view/components/wrapping-select.js.map +1 -0
  544. package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.d.ts +83 -0
  545. package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.d.ts.map +1 -0
  546. package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.js +186 -0
  547. package/dist/humain/ask-user-question/vendor/ask/view/dialog-builder.js.map +1 -0
  548. package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.d.ts +47 -0
  549. package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.d.ts.map +1 -0
  550. package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.js +48 -0
  551. package/dist/humain/ask-user-question/vendor/ask/view/dialog-copy.js.map +1 -0
  552. package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.d.ts +58 -0
  553. package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.d.ts.map +1 -0
  554. package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.js +84 -0
  555. package/dist/humain/ask-user-question/vendor/ask/view/props-adapter.js.map +1 -0
  556. package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.d.ts +20 -0
  557. package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.d.ts.map +1 -0
  558. package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.js +55 -0
  559. package/dist/humain/ask-user-question/vendor/ask/view/scroll-window.js.map +1 -0
  560. package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.d.ts +23 -0
  561. package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.d.ts.map +1 -0
  562. package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.js +2 -0
  563. package/dist/humain/ask-user-question/vendor/ask/view/stateful-view.js.map +1 -0
  564. package/dist/humain/ask-user-question/vendor/ask/view/tab-components.d.ts +15 -0
  565. package/dist/humain/ask-user-question/vendor/ask/view/tab-components.d.ts.map +1 -0
  566. package/dist/humain/ask-user-question/vendor/ask/view/tab-components.js +2 -0
  567. package/dist/humain/ask-user-question/vendor/ask/view/tab-components.js.map +1 -0
  568. package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.d.ts +98 -0
  569. package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.d.ts.map +1 -0
  570. package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.js +248 -0
  571. package/dist/humain/ask-user-question/vendor/ask/view/tab-content-strategy.js.map +1 -0
  572. package/dist/humain/ask-user-question/vendor/ask/view/transcript.d.ts +23 -0
  573. package/dist/humain/ask-user-question/vendor/ask/view/transcript.d.ts.map +1 -0
  574. package/dist/humain/ask-user-question/vendor/ask/view/transcript.js +131 -0
  575. package/dist/humain/ask-user-question/vendor/ask/view/transcript.js.map +1 -0
  576. package/dist/humain/ask-user-question/vendor/config/config.d.ts +132 -0
  577. package/dist/humain/ask-user-question/vendor/config/config.d.ts.map +1 -0
  578. package/dist/humain/ask-user-question/vendor/config/config.js +286 -0
  579. package/dist/humain/ask-user-question/vendor/config/config.js.map +1 -0
  580. package/dist/humain/ask-user-question/vendor/config/index.d.ts +2 -0
  581. package/dist/humain/ask-user-question/vendor/config/index.d.ts.map +1 -0
  582. package/dist/humain/ask-user-question/vendor/config/index.js +2 -0
  583. package/dist/humain/ask-user-question/vendor/config/index.js.map +1 -0
  584. package/dist/humain/ask-user-question/vendor/i18n/i18n.d.ts +64 -0
  585. package/dist/humain/ask-user-question/vendor/i18n/i18n.d.ts.map +1 -0
  586. package/dist/humain/ask-user-question/vendor/i18n/i18n.js +185 -0
  587. package/dist/humain/ask-user-question/vendor/i18n/i18n.js.map +1 -0
  588. package/dist/humain/ask-user-question/vendor/i18n/loader.d.ts +44 -0
  589. package/dist/humain/ask-user-question/vendor/i18n/loader.d.ts.map +1 -0
  590. package/dist/humain/ask-user-question/vendor/i18n/loader.js +55 -0
  591. package/dist/humain/ask-user-question/vendor/i18n/loader.js.map +1 -0
  592. package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +26 -16
  593. package/dist/humain/brand-logo.d.ts +2 -0
  594. package/dist/humain/brand-logo.d.ts.map +1 -1
  595. package/dist/humain/brand-logo.js +4 -0
  596. package/dist/humain/brand-logo.js.map +1 -1
  597. package/dist/humain/bundled-extension-names.d.ts +1 -0
  598. package/dist/humain/bundled-extension-names.d.ts.map +1 -1
  599. package/dist/humain/bundled-extension-names.js +1 -0
  600. package/dist/humain/bundled-extension-names.js.map +1 -1
  601. package/dist/humain/checklist/footer-progress.d.ts +7 -0
  602. package/dist/humain/checklist/footer-progress.d.ts.map +1 -0
  603. package/dist/humain/checklist/footer-progress.js +15 -0
  604. package/dist/humain/checklist/footer-progress.js.map +1 -0
  605. package/dist/humain/checklist/glyphs.d.ts +7 -0
  606. package/dist/humain/checklist/glyphs.d.ts.map +1 -0
  607. package/dist/humain/checklist/glyphs.js +8 -0
  608. package/dist/humain/checklist/glyphs.js.map +1 -0
  609. package/dist/humain/checklist/index.d.ts +6 -0
  610. package/dist/humain/checklist/index.d.ts.map +1 -0
  611. package/dist/humain/checklist/index.js +37 -0
  612. package/dist/humain/checklist/index.js.map +1 -0
  613. package/dist/humain/checklist/progress.d.ts +37 -0
  614. package/dist/humain/checklist/progress.d.ts.map +1 -0
  615. package/dist/humain/checklist/progress.js +234 -0
  616. package/dist/humain/checklist/progress.js.map +1 -0
  617. package/dist/humain/checklist/projector.d.ts +53 -0
  618. package/dist/humain/checklist/projector.d.ts.map +1 -0
  619. package/dist/humain/checklist/projector.js +198 -0
  620. package/dist/humain/checklist/projector.js.map +1 -0
  621. package/dist/humain/checklist/sidebar.d.ts +18 -0
  622. package/dist/humain/checklist/sidebar.d.ts.map +1 -0
  623. package/dist/humain/checklist/sidebar.js +38 -0
  624. package/dist/humain/checklist/sidebar.js.map +1 -0
  625. package/dist/humain/checklist/status-segment.d.ts +19 -0
  626. package/dist/humain/checklist/status-segment.d.ts.map +1 -0
  627. package/dist/humain/checklist/status-segment.js +59 -0
  628. package/dist/humain/checklist/status-segment.js.map +1 -0
  629. package/dist/humain/checklist/vendor/add-task-dialog.d.ts +54 -0
  630. package/dist/humain/checklist/vendor/add-task-dialog.d.ts.map +1 -0
  631. package/dist/humain/checklist/vendor/add-task-dialog.js +238 -0
  632. package/dist/humain/checklist/vendor/add-task-dialog.js.map +1 -0
  633. package/dist/humain/checklist/vendor/commands.d.ts +38 -0
  634. package/dist/humain/checklist/vendor/commands.d.ts.map +1 -0
  635. package/dist/humain/checklist/vendor/commands.js +205 -0
  636. package/dist/humain/checklist/vendor/commands.js.map +1 -0
  637. package/dist/humain/checklist/vendor/index.d.ts +3 -0
  638. package/dist/humain/checklist/vendor/index.d.ts.map +1 -0
  639. package/dist/humain/checklist/vendor/index.js +276 -0
  640. package/dist/humain/checklist/vendor/index.js.map +1 -0
  641. package/dist/humain/checklist/vendor/render.d.ts +97 -0
  642. package/dist/humain/checklist/vendor/render.d.ts.map +1 -0
  643. package/dist/humain/checklist/vendor/render.js +354 -0
  644. package/dist/humain/checklist/vendor/render.js.map +1 -0
  645. package/dist/humain/checklist/vendor/settings.d.ts +11 -0
  646. package/dist/humain/checklist/vendor/settings.d.ts.map +1 -0
  647. package/dist/humain/checklist/vendor/settings.js +8 -0
  648. package/dist/humain/checklist/vendor/settings.js.map +1 -0
  649. package/dist/humain/checklist/vendor/store.d.ts +120 -0
  650. package/dist/humain/checklist/vendor/store.d.ts.map +1 -0
  651. package/dist/humain/checklist/vendor/store.js +990 -0
  652. package/dist/humain/checklist/vendor/store.js.map +1 -0
  653. package/dist/humain/checklist/vendor/tools.d.ts +21 -0
  654. package/dist/humain/checklist/vendor/tools.d.ts.map +1 -0
  655. package/dist/humain/checklist/vendor/tools.js +162 -0
  656. package/dist/humain/checklist/vendor/tools.js.map +1 -0
  657. package/dist/humain/checklist/vendor/types.d.ts +188 -0
  658. package/dist/humain/checklist/vendor/types.d.ts.map +1 -0
  659. package/dist/humain/checklist/vendor/types.js +32 -0
  660. package/dist/humain/checklist/vendor/types.js.map +1 -0
  661. package/dist/humain/flow-loader.d.ts.map +1 -1
  662. package/dist/humain/flow-loader.js +31 -5
  663. package/dist/humain/flow-loader.js.map +1 -1
  664. package/dist/humain/gateway/catalog.d.ts +1 -0
  665. package/dist/humain/gateway/catalog.d.ts.map +1 -1
  666. package/dist/humain/gateway/catalog.js +1 -0
  667. package/dist/humain/gateway/catalog.js.map +1 -1
  668. package/dist/humain/gateway/client.d.ts +1 -0
  669. package/dist/humain/gateway/client.d.ts.map +1 -1
  670. package/dist/humain/gateway/client.js +8 -1
  671. package/dist/humain/gateway/client.js.map +1 -1
  672. package/dist/humain/gateway/http.d.ts.map +1 -1
  673. package/dist/humain/gateway/http.js +11 -3
  674. package/dist/humain/gateway/http.js.map +1 -1
  675. package/dist/humain/gateway/images.d.ts +3 -0
  676. package/dist/humain/gateway/images.d.ts.map +1 -0
  677. package/dist/humain/gateway/images.js +73 -0
  678. package/dist/humain/gateway/images.js.map +1 -0
  679. package/dist/humain/gateway/provider.js +1 -1
  680. package/dist/humain/gateway/provider.js.map +1 -1
  681. package/dist/humain/hcode/account-store.d.ts.map +1 -1
  682. package/dist/humain/hcode/account-store.js +3 -1
  683. package/dist/humain/hcode/account-store.js.map +1 -1
  684. package/dist/humain/hcode/account.d.ts.map +1 -1
  685. package/dist/humain/hcode/account.js +23 -13
  686. package/dist/humain/hcode/account.js.map +1 -1
  687. package/dist/humain/hcode/images.d.ts.map +1 -1
  688. package/dist/humain/hcode/images.js +19 -13
  689. package/dist/humain/hcode/images.js.map +1 -1
  690. package/dist/humain/hcode/login-failure.d.ts +1 -0
  691. package/dist/humain/hcode/login-failure.d.ts.map +1 -1
  692. package/dist/humain/hcode/login-failure.js +1 -0
  693. package/dist/humain/hcode/login-failure.js.map +1 -1
  694. package/dist/humain/hcode/provider.d.ts.map +1 -1
  695. package/dist/humain/hcode/provider.js +2 -1
  696. package/dist/humain/hcode/provider.js.map +1 -1
  697. package/dist/humain/hcode/run-credential.d.ts +1 -0
  698. package/dist/humain/hcode/run-credential.d.ts.map +1 -1
  699. package/dist/humain/hcode/run-credential.js +12 -4
  700. package/dist/humain/hcode/run-credential.js.map +1 -1
  701. package/dist/humain/index.d.ts.map +1 -1
  702. package/dist/humain/index.js +4 -0
  703. package/dist/humain/index.js.map +1 -1
  704. package/dist/humain/node-provider.d.ts.map +1 -1
  705. package/dist/humain/node-provider.js +37 -8
  706. package/dist/humain/node-provider.js.map +1 -1
  707. package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
  708. package/dist/humain/web-access/vendor/index.js +11 -1
  709. package/dist/humain/web-access/vendor/index.js.map +1 -1
  710. package/dist/main.d.ts +1 -1
  711. package/dist/main.d.ts.map +1 -1
  712. package/dist/main.js +36 -26
  713. package/dist/main.js.map +1 -1
  714. package/dist/modes/interactive/bug-report.d.ts.map +1 -1
  715. package/dist/modes/interactive/bug-report.js +48 -12
  716. package/dist/modes/interactive/bug-report.js.map +1 -1
  717. package/dist/modes/interactive/chat-viewport.js +1 -1
  718. package/dist/modes/interactive/chat-viewport.js.map +1 -1
  719. package/dist/modes/interactive/components/bash-execution.d.ts +2 -1
  720. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  721. package/dist/modes/interactive/components/bash-execution.js +7 -4
  722. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  723. package/dist/modes/interactive/components/config-selector.js +1 -1
  724. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  725. package/dist/modes/interactive/components/custom-editor.d.ts +2 -0
  726. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  727. package/dist/modes/interactive/components/custom-editor.js +20 -1
  728. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  729. package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
  730. package/dist/modes/interactive/components/extension-editor.js +2 -2
  731. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  732. package/dist/modes/interactive/components/footer.d.ts +7 -0
  733. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  734. package/dist/modes/interactive/components/footer.js +74 -1
  735. package/dist/modes/interactive/components/footer.js.map +1 -1
  736. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  737. package/dist/modes/interactive/components/mermaid.js +11 -4
  738. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  739. package/dist/modes/interactive/components/model-selector.d.ts +2 -0
  740. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  741. package/dist/modes/interactive/components/model-selector.js +56 -8
  742. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  743. package/dist/modes/interactive/components/oauth-selector.d.ts +13 -1
  744. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  745. package/dist/modes/interactive/components/oauth-selector.js +10 -9
  746. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  747. package/dist/modes/interactive/components/session-selector.js +3 -3
  748. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  749. package/dist/modes/interactive/components/settings-selector.d.ts +4 -3
  750. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  751. package/dist/modes/interactive/components/settings-selector.js +83 -37
  752. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  753. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  754. package/dist/modes/interactive/components/settings-submenu.js +3 -3
  755. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  756. package/dist/modes/interactive/components/status-indicator.d.ts +18 -7
  757. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  758. package/dist/modes/interactive/components/status-indicator.js +70 -24
  759. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  760. package/dist/modes/interactive/components/status-line.d.ts +16 -0
  761. package/dist/modes/interactive/components/status-line.d.ts.map +1 -0
  762. package/dist/modes/interactive/components/status-line.js +51 -0
  763. package/dist/modes/interactive/components/status-line.js.map +1 -0
  764. package/dist/modes/interactive/components/tool-execution.d.ts +5 -0
  765. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  766. package/dist/modes/interactive/components/tool-execution.js +8 -1
  767. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  768. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  769. package/dist/modes/interactive/components/visual-truncate.js +11 -3
  770. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  771. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  772. package/dist/modes/interactive/external-editor.js +13 -3
  773. package/dist/modes/interactive/external-editor.js.map +1 -1
  774. package/dist/modes/interactive/interactive-mode.d.ts +20 -4
  775. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  776. package/dist/modes/interactive/interactive-mode.js +260 -154
  777. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  778. package/dist/modes/interactive/program-status-reporter.d.ts +2 -0
  779. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
  780. package/dist/modes/interactive/program-status-reporter.js +4 -0
  781. package/dist/modes/interactive/program-status-reporter.js.map +1 -1
  782. package/dist/modes/interactive/session-share.d.ts.map +1 -1
  783. package/dist/modes/interactive/session-share.js +9 -1
  784. package/dist/modes/interactive/session-share.js.map +1 -1
  785. package/dist/modes/print-mode.d.ts.map +1 -1
  786. package/dist/modes/print-mode.js +34 -7
  787. package/dist/modes/print-mode.js.map +1 -1
  788. package/dist/modes/rpc/jsonl.js +6 -5
  789. package/dist/modes/rpc/jsonl.js.map +1 -1
  790. package/dist/modes/rpc/rpc-client.d.ts +2 -0
  791. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  792. package/dist/modes/rpc/rpc-client.js +9 -2
  793. package/dist/modes/rpc/rpc-client.js.map +1 -1
  794. package/dist/modes/rpc/rpc-mode.d.ts +2 -1
  795. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  796. package/dist/modes/rpc/rpc-mode.js +113 -13
  797. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  798. package/dist/modes/rpc/rpc-types.d.ts +22 -1
  799. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  800. package/dist/modes/rpc/rpc-types.js.map +1 -1
  801. package/dist/modes/uncaught-errors.d.ts +20 -0
  802. package/dist/modes/uncaught-errors.d.ts.map +1 -0
  803. package/dist/modes/uncaught-errors.js +56 -0
  804. package/dist/modes/uncaught-errors.js.map +1 -0
  805. package/dist/package-manager-cli.d.ts.map +1 -1
  806. package/dist/package-manager-cli.js +10 -1
  807. package/dist/package-manager-cli.js.map +1 -1
  808. package/dist/utils/clipboard-image.js +1 -1
  809. package/dist/utils/clipboard-image.js.map +1 -1
  810. package/dist/utils/clipboard.js +2 -2
  811. package/dist/utils/clipboard.js.map +1 -1
  812. package/dist/utils/image-process.d.ts +5 -0
  813. package/dist/utils/image-process.d.ts.map +1 -1
  814. package/dist/utils/image-process.js +22 -4
  815. package/dist/utils/image-process.js.map +1 -1
  816. package/dist/utils/output-files.d.ts +44 -7
  817. package/dist/utils/output-files.d.ts.map +1 -1
  818. package/dist/utils/output-files.js +206 -12
  819. package/dist/utils/output-files.js.map +1 -1
  820. package/dist/utils/piped-stdin.d.ts +21 -0
  821. package/dist/utils/piped-stdin.d.ts.map +1 -0
  822. package/dist/utils/piped-stdin.js +60 -0
  823. package/dist/utils/piped-stdin.js.map +1 -0
  824. package/dist/utils/shell.d.ts +5 -2
  825. package/dist/utils/shell.d.ts.map +1 -1
  826. package/dist/utils/shell.js +77 -8
  827. package/dist/utils/shell.js.map +1 -1
  828. package/dist/utils/syntax-highlight.d.ts +33 -2
  829. package/dist/utils/syntax-highlight.d.ts.map +1 -1
  830. package/dist/utils/syntax-highlight.js +77 -10
  831. package/dist/utils/syntax-highlight.js.map +1 -1
  832. package/dist/utils/tools-manager.d.ts +1 -0
  833. package/dist/utils/tools-manager.d.ts.map +1 -1
  834. package/dist/utils/tools-manager.js +9 -8
  835. package/dist/utils/tools-manager.js.map +1 -1
  836. package/dist/utils/wsl.d.ts +8 -2
  837. package/dist/utils/wsl.d.ts.map +1 -1
  838. package/dist/utils/wsl.js +12 -3
  839. package/dist/utils/wsl.js.map +1 -1
  840. package/docs/cli.md +39 -3
  841. package/docs/codemode.md +7 -3
  842. package/docs/compaction.md +1 -1
  843. package/docs/development.md +6 -0
  844. package/docs/environment-variables.md +3 -2
  845. package/docs/extensions.md +21 -5
  846. package/docs/flow.md +2 -0
  847. package/docs/humain-code.md +1 -1
  848. package/docs/keybindings.md +2 -0
  849. package/docs/llama-cpp.md +2 -2
  850. package/docs/message-types.md +1 -0
  851. package/docs/models-configuration.md +14 -3
  852. package/docs/models.md +29 -7
  853. package/docs/providers.md +20 -2
  854. package/docs/rpc-commands.md +25 -2
  855. package/docs/rpc.md +20 -0
  856. package/docs/run-preflight.md +2 -2
  857. package/docs/session-format.md +9 -0
  858. package/docs/settings.md +35 -5
  859. package/docs/shell-aliases.md +1 -1
  860. package/docs/slash-commands.md +3 -1
  861. package/docs/terminal-setup.md +25 -0
  862. package/docs/windows.md +2 -1
  863. package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
  864. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  865. package/examples/rpc-extension-ui.ts +8 -7
  866. package/npm-shrinkwrap.json +209 -180
  867. package/package.json +26 -20
  868. package/schemas/keybindings.schema.json +12 -0
  869. package/schemas/models.schema.json +20 -7
  870. package/schemas/settings.schema.json +43 -5
  871. package/src/coordination/UPSTREAM.md +27 -1
  872. package/src/coordination/upstream.json +3 -3
  873. package/src/humain/ask-user-question/UPSTREAM.md +31 -0
  874. package/src/humain/ask-user-question/upstream.json +258 -0
  875. package/src/humain/ask-user-question/vendor/ask/LICENSE +21 -0
  876. package/src/humain/ask-user-question/vendor/ask/locales/de.json +38 -0
  877. package/src/humain/ask-user-question/vendor/ask/locales/en.json +41 -0
  878. package/src/humain/ask-user-question/vendor/ask/locales/es.json +38 -0
  879. package/src/humain/ask-user-question/vendor/ask/locales/fr.json +38 -0
  880. package/src/humain/ask-user-question/vendor/ask/locales/pt-BR.json +38 -0
  881. package/src/humain/ask-user-question/vendor/ask/locales/pt.json +38 -0
  882. package/src/humain/ask-user-question/vendor/ask/locales/ru.json +38 -0
  883. package/src/humain/ask-user-question/vendor/ask/locales/uk.json +38 -0
  884. package/src/humain/ask-user-question/vendor/ask/locales/zh.json +40 -0
  885. package/src/humain/ask-user-question/vendor/config/LICENSE +21 -0
  886. package/src/humain/ask-user-question/vendor/i18n/LICENSE +21 -0
  887. package/src/humain/caveman/UPSTREAM.md +44 -11
  888. package/src/humain/caveman/upstream.json +3 -3
  889. package/src/humain/caveman/vendor/NOTICE +4 -0
  890. package/src/humain/web-access/UPSTREAM.md +8 -0
  891. package/dist/bundle/chunks/anthropic-messages-XFCDMGD6.js +0 -77
  892. package/dist/bundle/chunks/azure-openai-responses-F4KQM3NK.js +0 -15
  893. package/dist/bundle/chunks/bowser-DXKSTXFQ.js +0 -89
  894. package/dist/bundle/chunks/chunk-3E37CJCE.js +0 -34
  895. package/dist/bundle/chunks/chunk-3HVHETMU.js +0 -18
  896. package/dist/bundle/chunks/chunk-6JTCRCNF.js +0 -74
  897. package/dist/bundle/chunks/chunk-B3ZLWVDA.js +0 -80
  898. package/dist/bundle/chunks/chunk-F77J5EQZ.js +0 -3
  899. package/dist/bundle/chunks/chunk-GPLWWO5Q.js +0 -121
  900. package/dist/bundle/chunks/chunk-GV5OVRKK.js +0 -4
  901. package/dist/bundle/chunks/chunk-JBSWWCT5.js +0 -12
  902. package/dist/bundle/chunks/chunk-JWOPWHVH.js +0 -51
  903. package/dist/bundle/chunks/chunk-KRBELWQH.js +0 -7
  904. package/dist/bundle/chunks/chunk-PFBAIRCY.js +0 -56
  905. package/dist/bundle/chunks/chunk-Q5RKNQ2T.js +0 -73
  906. package/dist/bundle/chunks/chunk-QFDZEUFU.js +0 -12
  907. package/dist/bundle/chunks/chunk-SKCJ25SX.js +0 -24
  908. package/dist/bundle/chunks/chunk-UZOIHLNU.js +0 -23
  909. package/dist/bundle/chunks/chunk-YSWDFV2L.js +0 -11
  910. package/dist/bundle/chunks/chunk-YZMQXAJM.js +0 -8
  911. package/dist/bundle/chunks/chunk-ZAHVC5V2.js +0 -3591
  912. package/dist/bundle/chunks/entry-2GZ3PTWQ.js +0 -2
  913. package/dist/bundle/chunks/google-generative-ai-WIASMWS3.js +0 -22
  914. package/dist/bundle/chunks/google-vertex-WSPHRZIZ.js +0 -25
  915. package/dist/bundle/chunks/interactive-mode-3322RQEH.js +0 -5
  916. package/dist/bundle/chunks/mistral-conversations-7JYDDRUT.js +0 -43
  917. package/dist/bundle/chunks/openai-codex-responses-7PAML4NF.js +0 -102
  918. package/dist/bundle/chunks/openai-completions-UJDAIGTK.js +0 -87
  919. package/dist/bundle/chunks/openai-responses-2WNCE6AY.js +0 -26
  920. package/dist/bundle/chunks/openrouter-images-V3UCCO6X.js +0 -8
  921. package/dist/bundle/chunks/pi-messages-TQ7LJUNQ.js +0 -28
  922. package/dist/bundle/chunks/runtime-H7LYNKCZ.js +0 -2
  923. package/dist/bundle/chunks/session-picker-EYKCMFQR.js +0 -4
  924. package/dist/bundle/chunks/startup-ui-7ODOR34R.js +0 -3
  925. package/dist/bundle/chunks/typesafe-system-one-YP7GGN4C.js +0 -3
  926. package/dist/bundle/chunks/virtual-modules-47MGUPYN.js +0 -28
@@ -1,5 +1,5 @@
1
1
  import * as path from "node:path";
2
- import { BUG_REPORT_CUSTOM_ENTRY_TYPE, bugReportArchiveFileName, collectBugReportDiagnostics, collectBugReportMetadata, createBugReportConversation, createBugReportRedactor, writeBugReportArchive, } from "../../core/bug-report.js";
2
+ import { BUG_REPORT_CUSTOM_ENTRY_TYPE, bugReportArchiveFileName, collectBugReportDiagnostics, collectBugReportMetadata, createBugReportConversation, createBugReportExportRedactor, projectBugReportFields, writeBugReportArchive, writeMinimalBugReportArchive, } from "../../core/bug-report.js";
3
3
  import { clearCrashLog, readCrashLog } from "../../core/crash-log.js";
4
4
  import { BorderedLoader } from "./components/bordered-loader.js";
5
5
  import { ExtensionEditorComponent } from "./components/extension-editor.js";
@@ -9,7 +9,7 @@ const DISCLAIMER = "Create a local bug report with account and installation deta
9
9
  const TRANSCRIPT_NOTE = "Conversation content can include prompts, code, tool calls, file contents, and command output. Secrets are excluded. Review the archive before sending it.";
10
10
  /** Run the `/bug` flow: consent, optional summary, then export a zip archive. */
11
11
  export async function reportBug(context, initialHint) {
12
- const redactor = createBugReportRedactor();
12
+ const redactor = createBugReportExportRedactor();
13
13
  const manager = context.session.sessionManager;
14
14
  const sessionId = manager.getSessionId();
15
15
  const runtime = context.session.modelRuntime;
@@ -22,18 +22,20 @@ export async function reportBug(context, initialHint) {
22
22
  try {
23
23
  // Register already-available local masking inputs before computing the reviewed conversation bytes.
24
24
  const extensions = context.session.resourceLoader.getExtensions();
25
- redactor.redactJson({
25
+ projectBugReportFields({
26
26
  model,
27
27
  extensions: extensions.extensions,
28
28
  extensionErrors: extensions.errors,
29
29
  global: context.session.settingsManager.getGlobalSettings(),
30
30
  project: context.session.settingsManager.getProjectSettings(),
31
31
  crashes: readCrashLog(),
32
- }, "available");
32
+ }, redactor, "available");
33
33
  options = await promptForOptions(context, redactor, initialHint);
34
34
  }
35
35
  catch {
36
- context.showError("Could not safely project the bug report. No report was exported.");
36
+ // A collector can fail before handing its inputs to the redactor; their secret coverage is unknown.
37
+ redactor.disable();
38
+ await exportMinimalReport(context, current, redactor);
37
39
  return;
38
40
  }
39
41
  if (!current()) {
@@ -64,7 +66,7 @@ export async function reportBug(context, initialHint) {
64
66
  if (loader.signal.aborted)
65
67
  context.showStatus("Bug report cancelled");
66
68
  else
67
- context.showError("Failed to safely write bug report summary. No report was exported.");
69
+ await exportConfirmedMinimalReport(context, current, redactor);
68
70
  return;
69
71
  }
70
72
  restoreEditor(context, loader);
@@ -78,15 +80,45 @@ export async function reportBug(context, initialHint) {
78
80
  if (!current())
79
81
  throw new Error("Session changed");
80
82
  bundle = await buildBundle(context.session, options, summary, redactor);
83
+ if (options.conversation.omittedFields && (options.includeSession || summary !== undefined))
84
+ bundle.metadata.omissions.push("Over-budget conversation fields were omitted after secret discovery.");
81
85
  if (!current())
82
86
  throw new Error("Session changed");
83
87
  }
84
88
  catch {
85
- context.showError("Failed to safely build bug report. No report was exported.");
89
+ redactor.disable();
90
+ await exportMinimalReport(context, current, redactor);
86
91
  return;
87
92
  }
88
93
  await exportZip(context, bundle, redactor, current);
89
94
  }
95
+ async function exportMinimalReport(context, current, redactor) {
96
+ if (!current()) {
97
+ context.showStatus("Bug report cancelled: session changed");
98
+ return;
99
+ }
100
+ const confirmation = await choose(context, "Export a minimal bug report?", ["Export as Zip", "Cancel"], "Some fields were omitted. Safely redacted crash details are included when secret discovery completed; otherwise only CLI/platform details and crash dates/kinds are included. Configuration, descriptions, conversation and summary are excluded. Nothing is automatically emailed or uploaded.");
101
+ if (!current() || confirmation !== "Export as Zip") {
102
+ context.showStatus("Bug report cancelled");
103
+ return;
104
+ }
105
+ await exportConfirmedMinimalReport(context, current, redactor);
106
+ }
107
+ /** Existing export consent also covers this strictly smaller, closed projection. */
108
+ async function exportConfirmedMinimalReport(context, current, redactor) {
109
+ if (!current()) {
110
+ context.showStatus("Bug report cancelled: session changed");
111
+ return;
112
+ }
113
+ try {
114
+ const { id, archivePath } = await writeMinimalBugReportArchive(readCrashLog(), process.cwd(), redactor);
115
+ // Retain the original crash log: the minimal archive deliberately excludes its full evidence.
116
+ context.showStatus(`Bug report exported to: ${archivePath}\nReport ID: ${id}\nSome fields were omitted. Review the archive before manually emailing it to akarim@humain.com. Nothing was automatically emailed or uploaded.`);
117
+ }
118
+ catch {
119
+ context.showError("Failed to write minimal bug report. No report was exported.");
120
+ }
121
+ }
90
122
  async function promptForOptions(context, redactor, initialHint) {
91
123
  const hint = await input(context, "Report a bug", `${DISCLAIMER}\n\nWhat went wrong? (optional)`, initialHint === undefined ? undefined : redactor.redactText(initialHint).text);
92
124
  if (hint === null)
@@ -147,18 +179,19 @@ async function buildBundle(session, options, summary, redactor) {
147
179
  }
148
180
  async function exportZip(context, bundle, redactor, current) {
149
181
  const archivePath = path.join(process.cwd(), bugReportArchiveFileName(bundle.metadata.id));
182
+ let omittedFields;
150
183
  try {
151
- await writeBugReportArchive(bundle, archivePath, redactor);
184
+ ({ omittedFields } = await writeBugReportArchive(bundle, archivePath, redactor));
152
185
  }
153
186
  catch {
154
- context.showError("Failed to safely write bug report. No report was exported.");
187
+ await exportConfirmedMinimalReport(context, current, redactor);
155
188
  return;
156
189
  }
157
190
  if (current())
158
- recordInSession(context.session, bundle, archivePath);
191
+ recordInSession(context.session, bundle, archivePath, omittedFields);
159
192
  context.showStatus(`Bug report exported to: ${archivePath}\nReport ID: ${bundle.metadata.id}\nReview the archive before manually emailing it to akarim@humain.com. Nothing was automatically emailed or uploaded.`);
160
193
  }
161
- function recordInSession(session, bundle, archivePath) {
194
+ function recordInSession(session, bundle, archivePath, omittedFields) {
162
195
  session.sessionManager.appendCustomEntry(BUG_REPORT_CUSTOM_ENTRY_TYPE, {
163
196
  id: bundle.metadata.id,
164
197
  createdAt: bundle.metadata.createdAt,
@@ -168,7 +201,10 @@ function recordInSession(session, bundle, archivePath) {
168
201
  delivery: "zip",
169
202
  path: archivePath,
170
203
  });
171
- if (bundle.diagnostics.crashes.length > 0)
204
+ if (!omittedFields &&
205
+ bundle.diagnostics.crashes.length > 0 &&
206
+ bundle.diagnostics.omissions.length === 0 &&
207
+ bundle.metadata.omissions.length === 0)
172
208
  clearCrashLog();
173
209
  }
174
210
  function input(context, title, description, initialValue) {
@@ -1 +1 @@
1
- {"version":3,"file":"bug-report.js","sourceRoot":"","sources":["../../../src/modes/interactive/bug-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EACN,4BAA4B,EAI5B,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,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C,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE;YAClF,GAAG,EAAE,OAAO,CAAC,EAAE;YACf,WAAW;SACX,CAAC,CAAC;QACH,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,OAAyB,EAAE,OAAe;IAC7D,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC9D,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,OAAyB,EAAE,SAAkB;IACjE,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAChC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;AAC5B,CAAC;AAED,SAAS,aAAa,CAAC,OAAyB,EAAE,SAAkB;IACnE,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC;IACtB,OAAO,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAChC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;AAC5B,CAAC","sourcesContent":["import * as path from \"node:path\";\nimport type { Container, EditorComponent, TUI } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.ts\";\nimport {\n\tBUG_REPORT_CUSTOM_ENTRY_TYPE,\n\ttype BugReportBundle,\n\ttype BugReportConversation,\n\ttype BugReportSessionEntryData,\n\tbugReportArchiveFileName,\n\tcollectBugReportDiagnostics,\n\tcollectBugReportMetadata,\n\tcreateBugReportConversation,\n\tcreateBugReportRedactor,\n\twriteBugReportArchive,\n} from \"../../core/bug-report.ts\";\nimport { clearCrashLog, readCrashLog } from \"../../core/crash-log.ts\";\nimport type { KeybindingsManager } from \"../../core/keybindings.ts\";\nimport type { TraceRedactor } from \"../../core/trace/redaction.ts\";\nimport { BorderedLoader } from \"./components/bordered-loader.ts\";\nimport { ExtensionEditorComponent } from \"./components/extension-editor.ts\";\nimport { ExtensionSelectorComponent } from \"./components/extension-selector.ts\";\nimport { theme } from \"./theme/theme.ts\";\n\ninterface BugReportContext {\n\tsession: AgentSession;\n\tui: TUI;\n\teditorContainer: Container;\n\teditor: EditorComponent;\n\tkeybindings: KeybindingsManager;\n\tshowStatus: (message: string) => void;\n\tshowError: (message: string) => void;\n}\n\ninterface BugReportOptions {\n\thint?: string;\n\tincludeSession: boolean;\n\tincludeSummary: boolean;\n\tconversation: BugReportConversation;\n}\n\ntype Overlay = Container & { dispose?: () => void };\n\nconst DISCLAIMER =\n\t\"Create a local bug report with account and installation details and diagnostics. Secrets are excluded. You'll choose whether to attach the conversation. Nothing is automatically emailed or uploaded.\";\nconst TRANSCRIPT_NOTE =\n\t\"Conversation content can include prompts, code, tool calls, file contents, and command output. Secrets are excluded. Review the archive before sending it.\";\n\n/** Run the `/bug` flow: consent, optional summary, then export a zip archive. */\nexport async function reportBug(context: BugReportContext, initialHint?: string): Promise<void> {\n\tconst redactor = createBugReportRedactor();\n\tconst manager = context.session.sessionManager;\n\tconst sessionId = manager.getSessionId();\n\tconst runtime = context.session.modelRuntime;\n\tconst model = context.session.model;\n\tconst current = () =>\n\t\tcontext.session.sessionManager === manager &&\n\t\tmanager.getSessionId() === sessionId &&\n\t\tcontext.session.modelRuntime === runtime &&\n\t\tcontext.session.model === model;\n\tlet options: BugReportOptions | undefined;\n\ttry {\n\t\t// Register already-available local masking inputs before computing the reviewed conversation bytes.\n\t\tconst extensions = context.session.resourceLoader.getExtensions();\n\t\tredactor.redactJson(\n\t\t\t{\n\t\t\t\tmodel,\n\t\t\t\textensions: extensions.extensions,\n\t\t\t\textensionErrors: extensions.errors,\n\t\t\t\tglobal: context.session.settingsManager.getGlobalSettings(),\n\t\t\t\tproject: context.session.settingsManager.getProjectSettings(),\n\t\t\t\tcrashes: readCrashLog(),\n\t\t\t},\n\t\t\t\"available\",\n\t\t);\n\t\toptions = await promptForOptions(context, redactor, initialHint);\n\t} catch {\n\t\tcontext.showError(\"Could not safely project the bug report. No report was exported.\");\n\t\treturn;\n\t}\n\tif (!current()) {\n\t\tcontext.showStatus(\"Bug report cancelled: session changed\");\n\t\treturn;\n\t}\n\tif (!options) {\n\t\tcontext.showStatus(\"Bug report cancelled\");\n\t\treturn;\n\t}\n\tlet summary: string | undefined;\n\tif (options.includeSummary) {\n\t\tconst loader = showLoader(\n\t\t\tcontext,\n\t\t\t`Writing summary with ${context.session.model?.name ?? \"the current model\"}...`,\n\t\t);\n\t\ttry {\n\t\t\t// Fail before inference if any later collection changed the projection the user reviewed.\n\t\t\tconst summaryInput = { messages: options.conversation.messages, hint: options.hint };\n\t\t\tconst reviewed = redactor.redactJson(summaryInput, \"summary\").value;\n\t\t\tif (JSON.stringify(reviewed) !== JSON.stringify(summaryInput))\n\t\t\t\tthrow new Error(\"Summary input redaction changed after review.\");\n\t\t\tsummary = redactor.redactText(\n\t\t\t\tawait context.session.summarizeForBugReport({\n\t\t\t\t\thint: options.hint,\n\t\t\t\t\tsignal: loader.signal,\n\t\t\t\t\tconversation: options.conversation,\n\t\t\t\t}),\n\t\t\t).text;\n\t\t} catch {\n\t\t\trestoreEditor(context, loader);\n\t\t\tif (loader.signal.aborted) context.showStatus(\"Bug report cancelled\");\n\t\t\telse context.showError(\"Failed to safely write bug report summary. No report was exported.\");\n\t\t\treturn;\n\t\t}\n\t\trestoreEditor(context, loader);\n\t\tif (loader.signal.aborted) {\n\t\t\tcontext.showStatus(\"Bug report cancelled\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\tlet bundle: BugReportBundle;\n\ttry {\n\t\tif (!current()) throw new Error(\"Session changed\");\n\t\tbundle = await buildBundle(context.session, options, summary, redactor);\n\t\tif (!current()) throw new Error(\"Session changed\");\n\t} catch {\n\t\tcontext.showError(\"Failed to safely build bug report. No report was exported.\");\n\t\treturn;\n\t}\n\n\tawait exportZip(context, bundle, redactor, current);\n}\n\nasync function promptForOptions(\n\tcontext: BugReportContext,\n\tredactor: TraceRedactor,\n\tinitialHint: string | undefined,\n): Promise<BugReportOptions | undefined> {\n\tconst hint = await input(\n\t\tcontext,\n\t\t\"Report a bug\",\n\t\t`${DISCLAIMER}\\n\\nWhat went wrong? (optional)`,\n\t\tinitialHint === undefined ? undefined : redactor.redactText(initialHint).text,\n\t);\n\tif (hint === null) return undefined;\n\t// Register hint credentials before transcript echoes; sanitize again after transcript discovery.\n\tredactor.redactText(hint.trim());\n\tconst conversation = createBugReportConversation(context.session.sessionManager, redactor);\n\tconst description = redactor.redactText(hint.trim()).text;\n\tconst transcript = await choose(\n\t\tcontext,\n\t\t`Attach the current conversation (${conversation.bytes} bytes)?`,\n\t\t[\"Attach conversation\", \"Don't attach\"],\n\t\tTRANSCRIPT_NOTE,\n\t);\n\tif (!transcript) return undefined;\n\tconst includeSession = transcript === \"Attach conversation\";\n\tlet includeSummary = false;\n\t{\n\t\tconst model = context.session.model;\n\t\tconst summary = await choose(\n\t\t\tcontext,\n\t\t\t\"Generate a summary with the selected model?\",\n\t\t\t[\"Yes, generate a summary\", \"No\"],\n\t\t\t`Generate a summary with the selected model? This sends the secret-redacted conversation to your inference provider and may use your allowance or provider tokens. Selected provider: ${model?.provider ?? \"none\"}.`,\n\t\t);\n\t\tif (!summary) return undefined;\n\t\tincludeSummary = summary !== \"No\";\n\t}\n\tconst confirmation = await choose(\n\t\tcontext,\n\t\t\"Bug report\",\n\t\t[\"Export as Zip\", \"Cancel\"],\n\t\t`Description: ${description || \"none\"}\\nTranscript: ${includeSession ? \"included\" : \"not included\"}\\nSummary: ${includeSummary ? `written by ${context.session.model?.name ?? \"the current model\"}` : \"none\"}\\n\\nThe zip archive will be written to the current directory. Review the archive before manually emailing it to akarim@humain.com.`,\n\t);\n\tif (confirmation !== \"Export as Zip\") return undefined;\n\treturn {\n\t\thint: description || undefined,\n\t\tincludeSession,\n\t\tincludeSummary,\n\t\tconversation,\n\t};\n}\n\nasync function buildBundle(\n\tsession: AgentSession,\n\toptions: BugReportOptions,\n\tsummary: string | undefined,\n\tredactor: TraceRedactor,\n): Promise<BugReportBundle> {\n\tconst support = await session.modelRuntime.getHcodeSupportSnapshot(AbortSignal.timeout(1000));\n\tconst extensions = session.resourceLoader.getExtensions();\n\treturn {\n\t\tmetadata: collectBugReportMetadata({\n\t\t\tredactor,\n\t\t\tsupport,\n\t\t\thint: options.hint,\n\t\t\tsessionId: session.sessionId,\n\t\t\tcwd: session.sessionManager.getCwd(),\n\t\t\tincludeSession: options.includeSession,\n\t\t\tincludeSummary: summary !== undefined,\n\t\t\tmessageCount: options.includeSession ? options.conversation.messages.length : 0,\n\t\t\tmodel: session.model,\n\t\t\tmodelRuntime: session.modelRuntime,\n\t\t\tthinkingLevel: session.thinkingLevel,\n\t\t\textensions: extensions.extensions,\n\t\t\textensionErrors: extensions.errors,\n\t\t\tglobalSettings: session.settingsManager.getGlobalSettings(),\n\t\t\tprojectSettings: session.settingsManager.getProjectSettings(),\n\t\t}),\n\t\tdiagnostics: collectBugReportDiagnostics(\n\t\t\toptions.includeSession\n\t\t\t\t? { kind: \"conversation\", session: session.sessionManager, crashes: readCrashLog() }\n\t\t\t\t: { kind: \"standalone\", crashes: readCrashLog() },\n\t\t\tredactor,\n\t\t),\n\t\tsummary,\n\t\tsessionJsonl: options.includeSession ? options.conversation.sessionJsonl : undefined,\n\t};\n}\n\nasync function exportZip(\n\tcontext: BugReportContext,\n\tbundle: BugReportBundle,\n\tredactor: TraceRedactor,\n\tcurrent: () => boolean,\n): Promise<void> {\n\tconst archivePath = path.join(process.cwd(), bugReportArchiveFileName(bundle.metadata.id));\n\ttry {\n\t\tawait writeBugReportArchive(bundle, archivePath, redactor);\n\t} catch {\n\t\tcontext.showError(\"Failed to safely write bug report. No report was exported.\");\n\t\treturn;\n\t}\n\tif (current()) recordInSession(context.session, bundle, archivePath);\n\tcontext.showStatus(\n\t\t`Bug report exported to: ${archivePath}\\nReport ID: ${bundle.metadata.id}\\nReview the archive before manually emailing it to akarim@humain.com. Nothing was automatically emailed or uploaded.`,\n\t);\n}\n\nfunction recordInSession(session: AgentSession, bundle: BugReportBundle, archivePath: string): void {\n\tsession.sessionManager.appendCustomEntry(BUG_REPORT_CUSTOM_ENTRY_TYPE, {\n\t\tid: bundle.metadata.id,\n\t\tcreatedAt: bundle.metadata.createdAt,\n\t\thint: bundle.metadata.hint,\n\t\tsessionIncluded: bundle.metadata.session.included,\n\t\tsummaryIncluded: bundle.metadata.session.summaryIncluded,\n\t\tdelivery: \"zip\",\n\t\tpath: archivePath,\n\t} satisfies BugReportSessionEntryData);\n\tif (bundle.diagnostics.crashes.length > 0) clearCrashLog();\n}\n\nfunction input(\n\tcontext: BugReportContext,\n\ttitle: string,\n\tdescription: string,\n\tinitialValue?: string,\n): Promise<string | null> {\n\treturn new Promise((resolve) => {\n\t\tlet component: ExtensionEditorComponent;\n\t\tconst finish = (value: string | null) => {\n\t\t\trestoreEditor(context, component);\n\t\t\tresolve(value);\n\t\t};\n\t\tcomponent = new ExtensionEditorComponent(\n\t\t\tcontext.ui,\n\t\t\tcontext.keybindings,\n\t\t\ttitle,\n\t\t\tinitialValue,\n\t\t\t(value) => finish(value),\n\t\t\t() => finish(null),\n\t\t\t{ description },\n\t\t\tcontext.session.settingsManager.getExternalEditorCommand(),\n\t\t);\n\t\tshowOverlay(context, component);\n\t});\n}\n\nfunction choose(\n\tcontext: BugReportContext,\n\ttitle: string,\n\toptions: string[],\n\tdescription?: string,\n): Promise<string | undefined> {\n\treturn new Promise((resolve) => {\n\t\tlet component: ExtensionSelectorComponent;\n\t\tconst finish = (value?: string) => {\n\t\t\trestoreEditor(context, component);\n\t\t\tresolve(value);\n\t\t};\n\t\tcomponent = new ExtensionSelectorComponent(title, options, finish, () => finish(), {\n\t\t\ttui: context.ui,\n\t\t\tdescription,\n\t\t});\n\t\tshowOverlay(context, component);\n\t});\n}\n\nfunction showLoader(context: BugReportContext, message: string): BorderedLoader {\n\tconst loader = new BorderedLoader(context.ui, theme, message);\n\tshowOverlay(context, loader);\n\treturn loader;\n}\n\nfunction showOverlay(context: BugReportContext, component: Overlay): void {\n\tcontext.editorContainer.clear();\n\tcontext.editorContainer.addChild(component);\n\tcontext.ui.setFocus(component);\n\tcontext.ui.requestRender();\n}\n\nfunction restoreEditor(context: BugReportContext, component: Overlay): void {\n\tcomponent.dispose?.();\n\tcontext.editorContainer.clear();\n\tcontext.editorContainer.addChild(context.editor);\n\tcontext.ui.setFocus(context.editor);\n\tcontext.ui.requestRender();\n}\n"]}
1
+ {"version":3,"file":"bug-report.js","sourceRoot":"","sources":["../../../src/modes/interactive/bug-report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EACN,4BAA4B,EAK5B,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,6BAA6B,EAC7B,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAqBzC,MAAM,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eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;AAC5B,CAAC","sourcesContent":["import * as path from \"node:path\";\nimport type { Container, EditorComponent, TUI } from \"@earendil-works/pi-tui\";\nimport type { AgentSession } from \"../../core/agent-session.ts\";\nimport {\n\tBUG_REPORT_CUSTOM_ENTRY_TYPE,\n\ttype BugReportBundle,\n\ttype BugReportConversation,\n\ttype BugReportExportRedactor,\n\ttype BugReportSessionEntryData,\n\tbugReportArchiveFileName,\n\tcollectBugReportDiagnostics,\n\tcollectBugReportMetadata,\n\tcreateBugReportConversation,\n\tcreateBugReportExportRedactor,\n\tprojectBugReportFields,\n\twriteBugReportArchive,\n\twriteMinimalBugReportArchive,\n} from \"../../core/bug-report.ts\";\nimport { clearCrashLog, readCrashLog } from \"../../core/crash-log.ts\";\nimport type { KeybindingsManager } from \"../../core/keybindings.ts\";\nimport type { TraceRedactor } from \"../../core/trace/redaction.ts\";\nimport { BorderedLoader } from \"./components/bordered-loader.ts\";\nimport { ExtensionEditorComponent } from \"./components/extension-editor.ts\";\nimport { ExtensionSelectorComponent } from \"./components/extension-selector.ts\";\nimport { theme } from \"./theme/theme.ts\";\n\ninterface BugReportContext {\n\tsession: AgentSession;\n\tui: TUI;\n\teditorContainer: Container;\n\teditor: EditorComponent;\n\tkeybindings: KeybindingsManager;\n\tshowStatus: (message: string) => void;\n\tshowError: (message: string) => void;\n}\n\ninterface BugReportOptions {\n\thint?: string;\n\tincludeSession: boolean;\n\tincludeSummary: boolean;\n\tconversation: BugReportConversation;\n}\n\ntype Overlay = Container & { dispose?: () => void };\n\nconst DISCLAIMER =\n\t\"Create a local bug report with account and installation details and diagnostics. Secrets are excluded. You'll choose whether to attach the conversation. Nothing is automatically emailed or uploaded.\";\nconst TRANSCRIPT_NOTE =\n\t\"Conversation content can include prompts, code, tool calls, file contents, and command output. Secrets are excluded. Review the archive before sending it.\";\n\n/** Run the `/bug` flow: consent, optional summary, then export a zip archive. */\nexport async function reportBug(context: BugReportContext, initialHint?: string): Promise<void> {\n\tconst redactor = createBugReportExportRedactor();\n\tconst manager = context.session.sessionManager;\n\tconst sessionId = manager.getSessionId();\n\tconst runtime = context.session.modelRuntime;\n\tconst model = context.session.model;\n\tconst current = () =>\n\t\tcontext.session.sessionManager === manager &&\n\t\tmanager.getSessionId() === sessionId &&\n\t\tcontext.session.modelRuntime === runtime &&\n\t\tcontext.session.model === model;\n\tlet options: BugReportOptions | undefined;\n\ttry {\n\t\t// Register already-available local masking inputs before computing the reviewed conversation bytes.\n\t\tconst extensions = context.session.resourceLoader.getExtensions();\n\t\tprojectBugReportFields(\n\t\t\t{\n\t\t\t\tmodel,\n\t\t\t\textensions: extensions.extensions,\n\t\t\t\textensionErrors: extensions.errors,\n\t\t\t\tglobal: context.session.settingsManager.getGlobalSettings(),\n\t\t\t\tproject: context.session.settingsManager.getProjectSettings(),\n\t\t\t\tcrashes: readCrashLog(),\n\t\t\t},\n\t\t\tredactor,\n\t\t\t\"available\",\n\t\t);\n\t\toptions = await promptForOptions(context, redactor, initialHint);\n\t} catch {\n\t\t// A collector can fail before handing its inputs to the redactor; their secret coverage is unknown.\n\t\tredactor.disable();\n\t\tawait exportMinimalReport(context, current, redactor);\n\t\treturn;\n\t}\n\tif (!current()) {\n\t\tcontext.showStatus(\"Bug report cancelled: session changed\");\n\t\treturn;\n\t}\n\tif (!options) {\n\t\tcontext.showStatus(\"Bug report cancelled\");\n\t\treturn;\n\t}\n\tlet summary: string | undefined;\n\tif (options.includeSummary) {\n\t\tconst loader = showLoader(\n\t\t\tcontext,\n\t\t\t`Writing summary with ${context.session.model?.name ?? \"the current model\"}...`,\n\t\t);\n\t\ttry {\n\t\t\t// Fail before inference if any later collection changed the projection the user reviewed.\n\t\t\tconst summaryInput = { messages: options.conversation.messages, hint: options.hint };\n\t\t\tconst reviewed = redactor.redactJson(summaryInput, \"summary\").value;\n\t\t\tif (JSON.stringify(reviewed) !== JSON.stringify(summaryInput))\n\t\t\t\tthrow new Error(\"Summary input redaction changed after review.\");\n\t\t\tsummary = redactor.redactText(\n\t\t\t\tawait context.session.summarizeForBugReport({\n\t\t\t\t\thint: options.hint,\n\t\t\t\t\tsignal: loader.signal,\n\t\t\t\t\tconversation: options.conversation,\n\t\t\t\t}),\n\t\t\t).text;\n\t\t} catch {\n\t\t\trestoreEditor(context, loader);\n\t\t\tif (loader.signal.aborted) context.showStatus(\"Bug report cancelled\");\n\t\t\telse await exportConfirmedMinimalReport(context, current, redactor);\n\t\t\treturn;\n\t\t}\n\t\trestoreEditor(context, loader);\n\t\tif (loader.signal.aborted) {\n\t\t\tcontext.showStatus(\"Bug report cancelled\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\tlet bundle: BugReportBundle;\n\ttry {\n\t\tif (!current()) throw new Error(\"Session changed\");\n\t\tbundle = await buildBundle(context.session, options, summary, redactor);\n\t\tif (options.conversation.omittedFields && (options.includeSession || summary !== undefined))\n\t\t\tbundle.metadata.omissions.push(\"Over-budget conversation fields were omitted after secret discovery.\");\n\t\tif (!current()) throw new Error(\"Session changed\");\n\t} catch {\n\t\tredactor.disable();\n\t\tawait exportMinimalReport(context, current, redactor);\n\t\treturn;\n\t}\n\n\tawait exportZip(context, bundle, redactor, current);\n}\n\nasync function exportMinimalReport(\n\tcontext: BugReportContext,\n\tcurrent: () => boolean,\n\tredactor: BugReportExportRedactor,\n): Promise<void> {\n\tif (!current()) {\n\t\tcontext.showStatus(\"Bug report cancelled: session changed\");\n\t\treturn;\n\t}\n\tconst confirmation = await choose(\n\t\tcontext,\n\t\t\"Export a minimal bug report?\",\n\t\t[\"Export as Zip\", \"Cancel\"],\n\t\t\"Some fields were omitted. Safely redacted crash details are included when secret discovery completed; otherwise only CLI/platform details and crash dates/kinds are included. Configuration, descriptions, conversation and summary are excluded. Nothing is automatically emailed or uploaded.\",\n\t);\n\tif (!current() || confirmation !== \"Export as Zip\") {\n\t\tcontext.showStatus(\"Bug report cancelled\");\n\t\treturn;\n\t}\n\tawait exportConfirmedMinimalReport(context, current, redactor);\n}\n\n/** Existing export consent also covers this strictly smaller, closed projection. */\nasync function exportConfirmedMinimalReport(\n\tcontext: BugReportContext,\n\tcurrent: () => boolean,\n\tredactor: BugReportExportRedactor,\n): Promise<void> {\n\tif (!current()) {\n\t\tcontext.showStatus(\"Bug report cancelled: session changed\");\n\t\treturn;\n\t}\n\ttry {\n\t\tconst { id, archivePath } = await writeMinimalBugReportArchive(readCrashLog(), process.cwd(), redactor);\n\t\t// Retain the original crash log: the minimal archive deliberately excludes its full evidence.\n\t\tcontext.showStatus(\n\t\t\t`Bug report exported to: ${archivePath}\\nReport ID: ${id}\\nSome fields were omitted. Review the archive before manually emailing it to akarim@humain.com. Nothing was automatically emailed or uploaded.`,\n\t\t);\n\t} catch {\n\t\tcontext.showError(\"Failed to write minimal bug report. No report was exported.\");\n\t}\n}\n\nasync function promptForOptions(\n\tcontext: BugReportContext,\n\tredactor: TraceRedactor,\n\tinitialHint: string | undefined,\n): Promise<BugReportOptions | undefined> {\n\tconst hint = await input(\n\t\tcontext,\n\t\t\"Report a bug\",\n\t\t`${DISCLAIMER}\\n\\nWhat went wrong? (optional)`,\n\t\tinitialHint === undefined ? undefined : redactor.redactText(initialHint).text,\n\t);\n\tif (hint === null) return undefined;\n\t// Register hint credentials before transcript echoes; sanitize again after transcript discovery.\n\tredactor.redactText(hint.trim());\n\tconst conversation = createBugReportConversation(context.session.sessionManager, redactor);\n\tconst description = redactor.redactText(hint.trim()).text;\n\tconst transcript = await choose(\n\t\tcontext,\n\t\t`Attach the current conversation (${conversation.bytes} bytes)?`,\n\t\t[\"Attach conversation\", \"Don't attach\"],\n\t\tTRANSCRIPT_NOTE,\n\t);\n\tif (!transcript) return undefined;\n\tconst includeSession = transcript === \"Attach conversation\";\n\tlet includeSummary = false;\n\t{\n\t\tconst model = context.session.model;\n\t\tconst summary = await choose(\n\t\t\tcontext,\n\t\t\t\"Generate a summary with the selected model?\",\n\t\t\t[\"Yes, generate a summary\", \"No\"],\n\t\t\t`Generate a summary with the selected model? This sends the secret-redacted conversation to your inference provider and may use your allowance or provider tokens. Selected provider: ${model?.provider ?? \"none\"}.`,\n\t\t);\n\t\tif (!summary) return undefined;\n\t\tincludeSummary = summary !== \"No\";\n\t}\n\tconst confirmation = await choose(\n\t\tcontext,\n\t\t\"Bug report\",\n\t\t[\"Export as Zip\", \"Cancel\"],\n\t\t`Description: ${description || \"none\"}\\nTranscript: ${includeSession ? \"included\" : \"not included\"}\\nSummary: ${includeSummary ? `written by ${context.session.model?.name ?? \"the current model\"}` : \"none\"}\\n\\nThe zip archive will be written to the current directory. Review the archive before manually emailing it to akarim@humain.com.`,\n\t);\n\tif (confirmation !== \"Export as Zip\") return undefined;\n\treturn {\n\t\thint: description || undefined,\n\t\tincludeSession,\n\t\tincludeSummary,\n\t\tconversation,\n\t};\n}\n\nasync function buildBundle(\n\tsession: AgentSession,\n\toptions: BugReportOptions,\n\tsummary: string | undefined,\n\tredactor: TraceRedactor,\n): Promise<BugReportBundle> {\n\tconst support = await session.modelRuntime.getHcodeSupportSnapshot(AbortSignal.timeout(1000));\n\tconst extensions = session.resourceLoader.getExtensions();\n\treturn {\n\t\tmetadata: collectBugReportMetadata({\n\t\t\tredactor,\n\t\t\tsupport,\n\t\t\thint: options.hint,\n\t\t\tsessionId: session.sessionId,\n\t\t\tcwd: session.sessionManager.getCwd(),\n\t\t\tincludeSession: options.includeSession,\n\t\t\tincludeSummary: summary !== undefined,\n\t\t\tmessageCount: options.includeSession ? options.conversation.messages.length : 0,\n\t\t\tmodel: session.model,\n\t\t\tmodelRuntime: session.modelRuntime,\n\t\t\tthinkingLevel: session.thinkingLevel,\n\t\t\textensions: extensions.extensions,\n\t\t\textensionErrors: extensions.errors,\n\t\t\tglobalSettings: session.settingsManager.getGlobalSettings(),\n\t\t\tprojectSettings: session.settingsManager.getProjectSettings(),\n\t\t}),\n\t\tdiagnostics: collectBugReportDiagnostics(\n\t\t\toptions.includeSession\n\t\t\t\t? { kind: \"conversation\", session: session.sessionManager, crashes: readCrashLog() }\n\t\t\t\t: { kind: \"standalone\", crashes: readCrashLog() },\n\t\t\tredactor,\n\t\t),\n\t\tsummary,\n\t\tsessionJsonl: options.includeSession ? options.conversation.sessionJsonl : undefined,\n\t};\n}\n\nasync function exportZip(\n\tcontext: BugReportContext,\n\tbundle: BugReportBundle,\n\tredactor: BugReportExportRedactor,\n\tcurrent: () => boolean,\n): Promise<void> {\n\tconst archivePath = path.join(process.cwd(), bugReportArchiveFileName(bundle.metadata.id));\n\tlet omittedFields: boolean;\n\ttry {\n\t\t({ omittedFields } = await writeBugReportArchive(bundle, archivePath, redactor));\n\t} catch {\n\t\tawait exportConfirmedMinimalReport(context, current, redactor);\n\t\treturn;\n\t}\n\tif (current()) recordInSession(context.session, bundle, archivePath, omittedFields);\n\tcontext.showStatus(\n\t\t`Bug report exported to: ${archivePath}\\nReport ID: ${bundle.metadata.id}\\nReview the archive before manually emailing it to akarim@humain.com. Nothing was automatically emailed or uploaded.`,\n\t);\n}\n\nfunction recordInSession(\n\tsession: AgentSession,\n\tbundle: BugReportBundle,\n\tarchivePath: string,\n\tomittedFields: boolean,\n): void {\n\tsession.sessionManager.appendCustomEntry(BUG_REPORT_CUSTOM_ENTRY_TYPE, {\n\t\tid: bundle.metadata.id,\n\t\tcreatedAt: bundle.metadata.createdAt,\n\t\thint: bundle.metadata.hint,\n\t\tsessionIncluded: bundle.metadata.session.included,\n\t\tsummaryIncluded: bundle.metadata.session.summaryIncluded,\n\t\tdelivery: \"zip\",\n\t\tpath: archivePath,\n\t} satisfies BugReportSessionEntryData);\n\tif (\n\t\t!omittedFields &&\n\t\tbundle.diagnostics.crashes.length > 0 &&\n\t\tbundle.diagnostics.omissions.length === 0 &&\n\t\tbundle.metadata.omissions.length === 0\n\t)\n\t\tclearCrashLog();\n}\n\nfunction input(\n\tcontext: BugReportContext,\n\ttitle: string,\n\tdescription: string,\n\tinitialValue?: string,\n): Promise<string | null> {\n\treturn new Promise((resolve) => {\n\t\tlet component: ExtensionEditorComponent;\n\t\tconst finish = (value: string | null) => {\n\t\t\trestoreEditor(context, component);\n\t\t\tresolve(value);\n\t\t};\n\t\tcomponent = new ExtensionEditorComponent(\n\t\t\tcontext.ui,\n\t\t\tcontext.keybindings,\n\t\t\ttitle,\n\t\t\tinitialValue,\n\t\t\t(value) => finish(value),\n\t\t\t() => finish(null),\n\t\t\t{ description },\n\t\t\tcontext.session.settingsManager.getExternalEditorCommand(),\n\t\t);\n\t\tshowOverlay(context, component);\n\t});\n}\n\nfunction choose(\n\tcontext: BugReportContext,\n\ttitle: string,\n\toptions: string[],\n\tdescription?: string,\n): Promise<string | undefined> {\n\treturn new Promise((resolve) => {\n\t\tlet component: ExtensionSelectorComponent;\n\t\tconst finish = (value?: string) => {\n\t\t\trestoreEditor(context, component);\n\t\t\tresolve(value);\n\t\t};\n\t\tcomponent = new ExtensionSelectorComponent(title, options, finish, () => finish(), {\n\t\t\ttui: context.ui,\n\t\t\tdescription,\n\t\t});\n\t\tshowOverlay(context, component);\n\t});\n}\n\nfunction showLoader(context: BugReportContext, message: string): BorderedLoader {\n\tconst loader = new BorderedLoader(context.ui, theme, message);\n\tshowOverlay(context, loader);\n\treturn loader;\n}\n\nfunction showOverlay(context: BugReportContext, component: Overlay): void {\n\tcontext.editorContainer.clear();\n\tcontext.editorContainer.addChild(component);\n\tcontext.ui.setFocus(component);\n\tcontext.ui.requestRender();\n}\n\nfunction restoreEditor(context: BugReportContext, component: Overlay): void {\n\tcomponent.dispose?.();\n\tcontext.editorContainer.clear();\n\tcontext.editorContainer.addChild(context.editor);\n\tcontext.ui.setFocus(context.editor);\n\tcontext.ui.requestRender();\n}\n"]}
@@ -11,8 +11,8 @@ export function createChatViewport(options) {
11
11
  });
12
12
  const dock = new VStack([
13
13
  { component: options.pendingMessages, shrink: 1, minSize: 0 },
14
- { component: options.status, shrink: 1, minSize: 0 },
15
14
  ...(options.widgetsAbove === undefined ? [] : [{ component: options.widgetsAbove, shrink: 1, minSize: 0 }]),
15
+ { component: options.status, shrink: 0, minSize: 0 },
16
16
  { component: options.editor, shrink: 1, minSize: 3 },
17
17
  ...(options.widgetsBelow === undefined ? [] : [{ component: options.widgetsBelow, shrink: 1, minSize: 0 }]),
18
18
  { component: options.footer, shrink: 1, minSize: 0 },
@@ -1 +1 @@
1
- {"version":3,"file":"chat-viewport.js","sourceRoot":"","sources":["../../../src/modes/interactive/chat-viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAA4B,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAoBtG,gEAAgE;AAChE,MAAM,UAAU,kBAAkB,CAAC,OAA4B;IAC9D,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE;QACnD,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,OAAO;QACnB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM;QACtC,GAAG,CAAC,OAAO,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAC1G,GAAG,CAAC,OAAO,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,EAAE,CAAC;KAC1G,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,IAAI,MAAM,CAAC;QACvB,EAAE,SAAS,EAAE,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QAC7D,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACpD,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3G,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;QACpD,GAAG,CAAC,OAAO,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3G,EAAE,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;KACpD,CAAC,CAAC;IACH,OAAO;QACN,UAAU;QACV,IAAI,EAAE,IAAI,MAAM,CAAC;YAChB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;YACnE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;SAClE,CAAC;KACF,CAAC;AACH,CAAC","sourcesContent":["import { type Component, ScrollView, type ScrollViewScrollbar, VStack } from \"@earendil-works/pi-tui\";\n\nexport interface ChatViewportOptions {\n\treadonly document: Component;\n\treadonly pendingMessages: Component;\n\treadonly status: Component;\n\treadonly editor: Component;\n\treadonly footer: Component;\n\treadonly widgetsAbove?: Component;\n\treadonly widgetsBelow?: Component;\n\treadonly scrollbar?: ScrollViewScrollbar;\n\treadonly scrollbarTrackStyle?: (text: string) => string;\n\treadonly scrollbarThumbStyle?: (text: string) => string;\n}\n\nexport interface ChatViewport {\n\treadonly root: Component;\n\treadonly transcript: ScrollView;\n}\n\n/** Shared fullscreen transcript and fixed input-dock layout. */\nexport function createChatViewport(options: ChatViewportOptions): ChatViewport {\n\tconst transcript = new ScrollView(options.document, {\n\t\tfollow: \"end\",\n\t\tprimary: true,\n\t\toverscroll: \"chain\",\n\t\tscrollbar: options.scrollbar ?? \"auto\",\n\t\t...(options.scrollbarTrackStyle === undefined ? {} : { scrollbarTrackStyle: options.scrollbarTrackStyle }),\n\t\t...(options.scrollbarThumbStyle === undefined ? {} : { scrollbarThumbStyle: options.scrollbarThumbStyle }),\n\t});\n\tconst dock = new VStack([\n\t\t{ component: options.pendingMessages, shrink: 1, minSize: 0 },\n\t\t{ component: options.status, shrink: 1, minSize: 0 },\n\t\t...(options.widgetsAbove === undefined ? [] : [{ component: options.widgetsAbove, shrink: 1, minSize: 0 }]),\n\t\t{ component: options.editor, shrink: 1, minSize: 3 },\n\t\t...(options.widgetsBelow === undefined ? [] : [{ component: options.widgetsBelow, shrink: 1, minSize: 0 }]),\n\t\t{ component: options.footer, shrink: 1, minSize: 0 },\n\t]);\n\treturn {\n\t\ttranscript,\n\t\troot: new VStack([\n\t\t\t{ component: transcript, basis: 0, grow: 1, shrink: 1, minSize: 1 },\n\t\t\t{ component: dock, basis: \"auto\", grow: 0, shrink: 1, minSize: 1 },\n\t\t]),\n\t};\n}\n"]}
1
+ {"version":3,"file":"chat-viewport.js","sourceRoot":"","sources":["../../../src/modes/interactive/chat-viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAA4B,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAoBtG,gEAAgE;AAChE,MAAM,UAAU,kBAAkB,CAAC,OAA4B;IAC9D,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE;QACnD,MAAM,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CAAC,EAAE;KACpD,CAAC,CAAC;IACH,OAAO;QACN,UAAU;QACV,IAAI,EAAE,IAAI,MAAM,CAAC;YAChB,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;YACnE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE;SAClE,CAAC;KACF,CAAC;AACH,CAAC","sourcesContent":["import { type Component, ScrollView, type ScrollViewScrollbar, VStack } from \"@earendil-works/pi-tui\";\n\nexport interface ChatViewportOptions {\n\treadonly document: Component;\n\treadonly pendingMessages: Component;\n\treadonly status: Component;\n\treadonly editor: Component;\n\treadonly footer: Component;\n\treadonly widgetsAbove?: Component;\n\treadonly widgetsBelow?: Component;\n\treadonly scrollbar?: ScrollViewScrollbar;\n\treadonly scrollbarTrackStyle?: (text: string) => string;\n\treadonly scrollbarThumbStyle?: (text: string) => string;\n}\n\nexport interface ChatViewport {\n\treadonly root: Component;\n\treadonly transcript: ScrollView;\n}\n\n/** Shared fullscreen transcript and fixed input-dock layout. */\nexport function createChatViewport(options: ChatViewportOptions): ChatViewport {\n\tconst transcript = new ScrollView(options.document, {\n\t\tfollow: \"end\",\n\t\tprimary: true,\n\t\toverscroll: \"chain\",\n\t\tscrollbar: options.scrollbar ?? \"auto\",\n\t\t...(options.scrollbarTrackStyle === undefined ? {} : { scrollbarTrackStyle: options.scrollbarTrackStyle }),\n\t\t...(options.scrollbarThumbStyle === undefined ? {} : { scrollbarThumbStyle: options.scrollbarThumbStyle }),\n\t});\n\tconst dock = new VStack([\n\t\t{ component: options.pendingMessages, shrink: 1, minSize: 0 },\n\t\t...(options.widgetsAbove === undefined ? [] : [{ component: options.widgetsAbove, shrink: 1, minSize: 0 }]),\n\t\t{ component: options.status, shrink: 0, minSize: 0 },\n\t\t{ component: options.editor, shrink: 1, minSize: 3 },\n\t\t...(options.widgetsBelow === undefined ? [] : [{ component: options.widgetsBelow, shrink: 1, minSize: 0 }]),\n\t\t{ component: options.footer, shrink: 1, minSize: 0 },\n\t]);\n\treturn {\n\t\ttranscript,\n\t\troot: new VStack([\n\t\t\t{ component: transcript, basis: 0, grow: 1, shrink: 1, minSize: 1 },\n\t\t\t{ component: dock, basis: \"auto\", grow: 0, shrink: 1, minSize: 1 },\n\t\t]),\n\t};\n}\n"]}
@@ -11,6 +11,7 @@ export declare class BashExecutionComponent extends Container {
11
11
  private loader;
12
12
  private truncationResult?;
13
13
  private fullOutputPath?;
14
+ private fullOutputError?;
14
15
  private expanded;
15
16
  private contentContainer;
16
17
  /** `dim` marks `!!` commands, whose output is excluded from the model context. */
@@ -24,7 +25,7 @@ export declare class BashExecutionComponent extends Container {
24
25
  setOutputPad(outputPad: number): void;
25
26
  invalidate(): void;
26
27
  appendOutput(chunk: string): void;
27
- setComplete(exitCode: number | undefined, cancelled: boolean, truncationResult?: TruncationResult, fullOutputPath?: string): void;
28
+ setComplete(exitCode: number | undefined, cancelled: boolean, truncationResult?: TruncationResult, fullOutputPath?: string, fullOutputError?: string): void;
28
29
  private updateDisplay;
29
30
  /**
30
31
  * Get the raw output for creating BashExecutionMessage.
@@ -1 +1 @@
1
- {"version":3,"file":"bash-execution.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/bash-execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAwB,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAGN,KAAK,gBAAgB,EAErB,MAAM,iCAAiC,CAAC;AAUzC,qBAAa,sBAAuB,SAAQ,SAAS;IACpD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,MAAM,CAA6D;IAC3E,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAAY;IACpC,kFAAkF;IAClF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,SAAS,CAAS;IAE1B,YAAY,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,UAAQ,EAAE,SAAS,SAAI,EA4B9E;IAED;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGnC;IAED,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAGpC;IAEQ,UAAU,IAAI,IAAI,CAG1B;IAED,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAgBhC;IAED,WAAW,CACV,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,EAAE,OAAO,EAClB,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,cAAc,CAAC,EAAE,MAAM,GACrB,IAAI,CAcN;IAED,OAAO,CAAC,aAAa;IAwFrB;;OAEG;IACH,SAAS,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,UAAU,IAAI,MAAM,CAEnB;CACD"}
1
+ {"version":3,"file":"bash-execution.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/bash-execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAwB,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAGN,KAAK,gBAAgB,EAErB,MAAM,iCAAiC,CAAC;AAUzC,qBAAa,sBAAuB,SAAQ,SAAS;IACpD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,MAAM,CAA6D;IAC3E,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAC5C,OAAO,CAAC,cAAc,CAAC,CAAS;IAChC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAAY;IACpC,kFAAkF;IAClF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,SAAS,CAAS;IAE1B,YAAY,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,kBAAkB,UAAQ,EAAE,SAAS,SAAI,EA4B9E;IAED;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAGnC;IAED,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAGpC;IAEQ,UAAU,IAAI,IAAI,CAG1B;IAED,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAgBhC;IAED,WAAW,CACV,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,EAAE,OAAO,EAClB,gBAAgB,CAAC,EAAE,gBAAgB,EACnC,cAAc,CAAC,EAAE,MAAM,EACvB,eAAe,CAAC,EAAE,MAAM,GACtB,IAAI,CAeN;IAED,OAAO,CAAC,aAAa;IA6FrB;;OAEG;IACH,SAAS,IAAI,MAAM,CAElB;IAED;;OAEG;IACH,UAAU,IAAI,MAAM,CAEnB;CACD"}
@@ -2,6 +2,7 @@
2
2
  * Component for displaying bash command execution with streaming output.
3
3
  */
4
4
  import { Container, Loader, Spacer, Text } from "@earendil-works/pi-tui";
5
+ import { bashTruncationNote } from "../../../core/messages.js";
5
6
  import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, truncateTail, } from "../../../core/tools/truncate.js";
6
7
  import { stripAnsi } from "../../../utils/ansi.js";
7
8
  import { theme } from "../theme/theme.js";
@@ -18,6 +19,7 @@ export class BashExecutionComponent extends Container {
18
19
  loader;
19
20
  truncationResult;
20
21
  fullOutputPath;
22
+ fullOutputError;
21
23
  expanded = false;
22
24
  contentContainer;
23
25
  /** `dim` marks `!!` commands, whose output is excluded from the model context. */
@@ -36,7 +38,7 @@ export class BashExecutionComponent extends Container {
36
38
  // Content container (holds dynamic content between borders)
37
39
  this.contentContainer = new Container();
38
40
  this.addChild(this.contentContainer);
39
- this.loader = new Loader(ui, (spinner) => theme.fg(this.colorKey, spinner), (text) => theme.fg("muted", text), `Running... (${keyText("tui.select.cancel")} to cancel)`);
41
+ this.loader = new Loader(ui, (spinner) => theme.fg(this.colorKey, spinner), (text) => theme.fg("muted", text), `Running... (${keyText("app.interrupt")} to cancel)`);
40
42
  // Bottom border
41
43
  this.addChild(new DynamicBorder(borderColor));
42
44
  this.updateDisplay();
@@ -72,7 +74,7 @@ export class BashExecutionComponent extends Container {
72
74
  }
73
75
  this.updateDisplay();
74
76
  }
75
- setComplete(exitCode, cancelled, truncationResult, fullOutputPath) {
77
+ setComplete(exitCode, cancelled, truncationResult, fullOutputPath, fullOutputError) {
76
78
  this.exitCode = exitCode;
77
79
  this.status = cancelled
78
80
  ? "cancelled"
@@ -81,6 +83,7 @@ export class BashExecutionComponent extends Container {
81
83
  : "complete";
82
84
  this.truncationResult = truncationResult;
83
85
  this.fullOutputPath = fullOutputPath;
86
+ this.fullOutputError = fullOutputError;
84
87
  // Stop loader
85
88
  this.loader.stop();
86
89
  this.updateDisplay();
@@ -154,8 +157,8 @@ export class BashExecutionComponent extends Container {
154
157
  }
155
158
  // Add truncation warning (context truncation, not preview truncation)
156
159
  const wasTruncated = this.truncationResult?.truncated || contextTruncation.truncated;
157
- if (wasTruncated && this.fullOutputPath) {
158
- statusParts.push(theme.fg("warning", `Output truncated. Full output: ${this.fullOutputPath}`));
160
+ if (wasTruncated) {
161
+ statusParts.push(theme.fg("warning", bashTruncationNote({ fullOutputPath: this.fullOutputPath, fullOutputError: this.fullOutputError })));
159
162
  }
160
163
  if (statusParts.length > 0) {
161
164
  this.contentContainer.addChild(new Text(`\n${statusParts.join("\n")}`, this.outputPad, 0));
@@ -1 +1 @@
1
- {"version":3,"file":"bash-execution.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/bash-execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EAEjB,YAAY,GACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,yEAAyE;AACzE,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IAC5C,OAAO,CAAS;IAChB,WAAW,GAAa,EAAE,CAAC;IAC3B,MAAM,GAAmD,SAAS,CAAC;IACnE,QAAQ,GAAuB,SAAS,CAAC;IACzC,MAAM,CAAS;IACf,gBAAgB,CAAoB;IACpC,cAAc,CAAU;IACxB,QAAQ,GAAG,KAAK,CAAC;IACjB,gBAAgB,CAAY;IACpC,kFAAkF;IACjE,QAAQ,CAAqB;IACtC,SAAS,CAAS;IAE1B,YAAY,OAAe,EAAE,EAAO,EAAE,kBAAkB,GAAG,KAAK,EAAE,SAAS,GAAG,CAAC;QAC9E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;QACxD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C;gBAC5B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,KAAK,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5F,CAAC;QACF,CAAC;IACF,CAAC;IAED;;OAEG;IACH,SAAS;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,UAAU;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;CACD","sourcesContent":["/**\n * Component for displaying bash command execution with streaming output.\n */\n\nimport { Container, Loader, Spacer, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype TruncationResult,\n\ttruncateTail,\n} from \"../../../core/tools/truncate.ts\";\nimport { stripAnsi } from \"../../../utils/ansi.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\nimport { keyHint, keyText } from \"./keybinding-hints.ts\";\nimport { truncateToVisualLines } from \"./visual-truncate.ts\";\n\n// Preview line limit when not expanded (matches tool execution behavior)\nconst PREVIEW_LINES = 20;\n\nexport class BashExecutionComponent extends Container {\n\tprivate command: string;\n\tprivate outputLines: string[] = [];\n\tprivate status: \"running\" | \"complete\" | \"cancelled\" | \"error\" = \"running\";\n\tprivate exitCode: number | undefined = undefined;\n\tprivate loader: Loader;\n\tprivate truncationResult?: TruncationResult;\n\tprivate fullOutputPath?: string;\n\tprivate expanded = false;\n\tprivate contentContainer: Container;\n\t/** `dim` marks `!!` commands, whose output is excluded from the model context. */\n\tprivate readonly colorKey: \"dim\" | \"bashMode\";\n\tprivate outputPad: number;\n\n\tconstructor(command: string, ui: TUI, excludeFromContext = false, outputPad = 1) {\n\t\tsuper();\n\t\tthis.command = command;\n\t\tthis.colorKey = excludeFromContext ? \"dim\" : \"bashMode\";\n\t\tthis.outputPad = outputPad;\n\t\tconst borderColor = (str: string) => theme.fg(this.colorKey, str);\n\n\t\t// Add spacer\n\t\tthis.addChild(new Spacer(1));\n\n\t\t// Top border\n\t\tthis.addChild(new DynamicBorder(borderColor));\n\n\t\t// Content container (holds dynamic content between borders)\n\t\tthis.contentContainer = new Container();\n\t\tthis.addChild(this.contentContainer);\n\n\t\tthis.loader = new Loader(\n\t\t\tui,\n\t\t\t(spinner) => theme.fg(this.colorKey, spinner),\n\t\t\t(text) => theme.fg(\"muted\", text),\n\t\t\t`Running... (${keyText(\"tui.select.cancel\")} to cancel)`, // Plain text for loader\n\t\t);\n\n\t\t// Bottom border\n\t\tthis.addChild(new DynamicBorder(borderColor));\n\n\t\tthis.updateDisplay();\n\t}\n\n\t/**\n\t * Set whether the output is expanded (shows full output) or collapsed (preview only).\n\t */\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t\tthis.updateDisplay();\n\t}\n\n\tsetOutputPad(outputPad: number): void {\n\t\tthis.outputPad = outputPad;\n\t\tthis.updateDisplay();\n\t}\n\n\toverride invalidate(): void {\n\t\tsuper.invalidate();\n\t\tthis.updateDisplay();\n\t}\n\n\tappendOutput(chunk: string): void {\n\t\t// Strip ANSI codes and normalize line endings\n\t\t// Note: binary data is already sanitized in tui-renderer.ts executeBashCommand\n\t\tconst clean = stripAnsi(chunk).replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n\n\t\t// Append to output lines\n\t\tconst newLines = clean.split(\"\\n\");\n\t\tif (this.outputLines.length > 0 && newLines.length > 0) {\n\t\t\t// Append first chunk to last line (incomplete line continuation)\n\t\t\tthis.outputLines[this.outputLines.length - 1] += newLines[0];\n\t\t\tthis.outputLines.push(...newLines.slice(1));\n\t\t} else {\n\t\t\tthis.outputLines.push(...newLines);\n\t\t}\n\n\t\tthis.updateDisplay();\n\t}\n\n\tsetComplete(\n\t\texitCode: number | undefined,\n\t\tcancelled: boolean,\n\t\ttruncationResult?: TruncationResult,\n\t\tfullOutputPath?: string,\n\t): void {\n\t\tthis.exitCode = exitCode;\n\t\tthis.status = cancelled\n\t\t\t? \"cancelled\"\n\t\t\t: exitCode !== 0 && exitCode !== undefined && exitCode !== null\n\t\t\t\t? \"error\"\n\t\t\t\t: \"complete\";\n\t\tthis.truncationResult = truncationResult;\n\t\tthis.fullOutputPath = fullOutputPath;\n\n\t\t// Stop loader\n\t\tthis.loader.stop();\n\n\t\tthis.updateDisplay();\n\t}\n\n\tprivate updateDisplay(): void {\n\t\t// Apply truncation for LLM context limits (same limits as bash tool)\n\t\tconst fullOutput = this.outputLines.join(\"\\n\");\n\t\tconst contextTruncation = truncateTail(fullOutput, {\n\t\t\tmaxLines: DEFAULT_MAX_LINES,\n\t\t\tmaxBytes: DEFAULT_MAX_BYTES,\n\t\t});\n\n\t\t// Get the lines to potentially display (after context truncation)\n\t\tconst availableLines = contextTruncation.content ? contextTruncation.content.split(\"\\n\") : [];\n\n\t\t// Apply preview truncation based on expanded state\n\t\tconst previewLogicalLines = availableLines.slice(-PREVIEW_LINES);\n\t\tconst hiddenLineCount = availableLines.length - previewLogicalLines.length;\n\n\t\t// Rebuild content container\n\t\tthis.contentContainer.clear();\n\n\t\t// Command header\n\t\tconst header = new Text(theme.fg(this.colorKey, theme.bold(`$ ${this.command}`)), this.outputPad, 0);\n\t\tthis.contentContainer.addChild(header);\n\n\t\t// Output\n\t\tif (availableLines.length > 0) {\n\t\t\tif (this.expanded) {\n\t\t\t\t// Show all lines\n\t\t\t\tconst displayText = availableLines.map((line) => theme.fg(\"muted\", line)).join(\"\\n\");\n\t\t\t\tthis.contentContainer.addChild(new Text(`\\n${displayText}`, this.outputPad, 0));\n\t\t\t} else {\n\t\t\t\t// Use shared visual truncation utility with width-aware caching\n\t\t\t\tconst styledOutput = previewLogicalLines.map((line) => theme.fg(\"muted\", line)).join(\"\\n\");\n\t\t\t\tconst styledInput = `\\n${styledOutput}`;\n\t\t\t\tlet cachedWidth: number | undefined;\n\t\t\t\tlet cachedLines: readonly string[] | undefined;\n\t\t\t\tthis.contentContainer.addChild({\n\t\t\t\t\trender: (width: number) => {\n\t\t\t\t\t\tif (cachedLines === undefined || cachedWidth !== width) {\n\t\t\t\t\t\t\tconst result = truncateToVisualLines(styledInput, PREVIEW_LINES, width, this.outputPad);\n\t\t\t\t\t\t\tcachedLines = result.visualLines;\n\t\t\t\t\t\t\tcachedWidth = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn cachedLines ?? [];\n\t\t\t\t\t},\n\t\t\t\t\tinvalidate: () => {\n\t\t\t\t\t\tcachedWidth = undefined;\n\t\t\t\t\t\tcachedLines = undefined;\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// Loader or status\n\t\tif (this.status === \"running\") {\n\t\t\tthis.contentContainer.addChild(this.loader);\n\t\t} else {\n\t\t\tconst statusParts: string[] = [];\n\n\t\t\t// Show how many lines are hidden (collapsed preview)\n\t\t\tif (hiddenLineCount > 0) {\n\t\t\t\tif (this.expanded) {\n\t\t\t\t\tstatusParts.push(\n\t\t\t\t\t\t`${theme.fg(\"muted\", \"(\")}${keyHint(\"app.tools.expand\", \"to collapse\")}${theme.fg(\"muted\", \")\")}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tstatusParts.push(\n\t\t\t\t\t\t`${theme.fg(\"muted\", `... ${hiddenLineCount} more lines (`)}${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.status === \"cancelled\") {\n\t\t\t\tstatusParts.push(theme.fg(\"warning\", \"(cancelled)\"));\n\t\t\t} else if (this.status === \"error\") {\n\t\t\t\tstatusParts.push(theme.fg(\"error\", `(exit ${this.exitCode})`));\n\t\t\t}\n\n\t\t\t// Add truncation warning (context truncation, not preview truncation)\n\t\t\tconst wasTruncated = this.truncationResult?.truncated || contextTruncation.truncated;\n\t\t\tif (wasTruncated && this.fullOutputPath) {\n\t\t\t\tstatusParts.push(theme.fg(\"warning\", `Output truncated. Full output: ${this.fullOutputPath}`));\n\t\t\t}\n\n\t\t\tif (statusParts.length > 0) {\n\t\t\t\tthis.contentContainer.addChild(new Text(`\\n${statusParts.join(\"\\n\")}`, this.outputPad, 0));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get the raw output for creating BashExecutionMessage.\n\t */\n\tgetOutput(): string {\n\t\treturn this.outputLines.join(\"\\n\");\n\t}\n\n\t/**\n\t * Get the command that was executed.\n\t */\n\tgetCommand(): string {\n\t\treturn this.command;\n\t}\n}\n"]}
1
+ {"version":3,"file":"bash-execution.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/bash-execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAY,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EAEjB,YAAY,GACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,yEAAyE;AACzE,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB,MAAM,OAAO,sBAAuB,SAAQ,SAAS;IAC5C,OAAO,CAAS;IAChB,WAAW,GAAa,EAAE,CAAC;IAC3B,MAAM,GAAmD,SAAS,CAAC;IACnE,QAAQ,GAAuB,SAAS,CAAC;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,EAAE,CAAC;gBACpC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;YAChE,CAAC;YAED,sEAAsE;YACtE,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,IAAI,iBAAiB,CAAC,SAAS,CAAC;YACrF,IAAI,YAAY,EAAE,CAAC;gBAClB,WAAW,CAAC,IAAI,CACf,KAAK,CAAC,EAAE,CACP,SAAS,EACT,kBAAkB,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAClG,CACD,CAAC;YACH,CAAC;YAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,KAAK,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;YAC5F,CAAC;QACF,CAAC;IACF,CAAC;IAED;;OAEG;IACH,SAAS;QACR,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,UAAU;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;CACD","sourcesContent":["/**\n * Component for displaying bash command execution with streaming output.\n */\n\nimport { Container, Loader, Spacer, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport { bashTruncationNote } from \"../../../core/messages.ts\";\nimport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype TruncationResult,\n\ttruncateTail,\n} from \"../../../core/tools/truncate.ts\";\nimport { stripAnsi } from \"../../../utils/ansi.ts\";\nimport { theme } from \"../theme/theme.ts\";\nimport { DynamicBorder } from \"./dynamic-border.ts\";\nimport { keyHint, keyText } from \"./keybinding-hints.ts\";\nimport { truncateToVisualLines } from \"./visual-truncate.ts\";\n\n// Preview line limit when not expanded (matches tool execution behavior)\nconst PREVIEW_LINES = 20;\n\nexport class BashExecutionComponent extends Container {\n\tprivate command: string;\n\tprivate outputLines: string[] = [];\n\tprivate status: \"running\" | \"complete\" | \"cancelled\" | \"error\" = \"running\";\n\tprivate exitCode: number | undefined = undefined;\n\tprivate loader: Loader;\n\tprivate truncationResult?: TruncationResult;\n\tprivate fullOutputPath?: string;\n\tprivate fullOutputError?: string;\n\tprivate expanded = false;\n\tprivate contentContainer: Container;\n\t/** `dim` marks `!!` commands, whose output is excluded from the model context. */\n\tprivate readonly colorKey: \"dim\" | \"bashMode\";\n\tprivate outputPad: number;\n\n\tconstructor(command: string, ui: TUI, excludeFromContext = false, outputPad = 1) {\n\t\tsuper();\n\t\tthis.command = command;\n\t\tthis.colorKey = excludeFromContext ? \"dim\" : \"bashMode\";\n\t\tthis.outputPad = outputPad;\n\t\tconst borderColor = (str: string) => theme.fg(this.colorKey, str);\n\n\t\t// Add spacer\n\t\tthis.addChild(new Spacer(1));\n\n\t\t// Top border\n\t\tthis.addChild(new DynamicBorder(borderColor));\n\n\t\t// Content container (holds dynamic content between borders)\n\t\tthis.contentContainer = new Container();\n\t\tthis.addChild(this.contentContainer);\n\n\t\tthis.loader = new Loader(\n\t\t\tui,\n\t\t\t(spinner) => theme.fg(this.colorKey, spinner),\n\t\t\t(text) => theme.fg(\"muted\", text),\n\t\t\t`Running... (${keyText(\"app.interrupt\")} to cancel)`, // Plain text for loader\n\t\t);\n\n\t\t// Bottom border\n\t\tthis.addChild(new DynamicBorder(borderColor));\n\n\t\tthis.updateDisplay();\n\t}\n\n\t/**\n\t * Set whether the output is expanded (shows full output) or collapsed (preview only).\n\t */\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.expanded = expanded;\n\t\tthis.updateDisplay();\n\t}\n\n\tsetOutputPad(outputPad: number): void {\n\t\tthis.outputPad = outputPad;\n\t\tthis.updateDisplay();\n\t}\n\n\toverride invalidate(): void {\n\t\tsuper.invalidate();\n\t\tthis.updateDisplay();\n\t}\n\n\tappendOutput(chunk: string): void {\n\t\t// Strip ANSI codes and normalize line endings\n\t\t// Note: binary data is already sanitized in tui-renderer.ts executeBashCommand\n\t\tconst clean = stripAnsi(chunk).replace(/\\r\\n/g, \"\\n\").replace(/\\r/g, \"\\n\");\n\n\t\t// Append to output lines\n\t\tconst newLines = clean.split(\"\\n\");\n\t\tif (this.outputLines.length > 0 && newLines.length > 0) {\n\t\t\t// Append first chunk to last line (incomplete line continuation)\n\t\t\tthis.outputLines[this.outputLines.length - 1] += newLines[0];\n\t\t\tthis.outputLines.push(...newLines.slice(1));\n\t\t} else {\n\t\t\tthis.outputLines.push(...newLines);\n\t\t}\n\n\t\tthis.updateDisplay();\n\t}\n\n\tsetComplete(\n\t\texitCode: number | undefined,\n\t\tcancelled: boolean,\n\t\ttruncationResult?: TruncationResult,\n\t\tfullOutputPath?: string,\n\t\tfullOutputError?: string,\n\t): void {\n\t\tthis.exitCode = exitCode;\n\t\tthis.status = cancelled\n\t\t\t? \"cancelled\"\n\t\t\t: exitCode !== 0 && exitCode !== undefined && exitCode !== null\n\t\t\t\t? \"error\"\n\t\t\t\t: \"complete\";\n\t\tthis.truncationResult = truncationResult;\n\t\tthis.fullOutputPath = fullOutputPath;\n\t\tthis.fullOutputError = fullOutputError;\n\n\t\t// Stop loader\n\t\tthis.loader.stop();\n\n\t\tthis.updateDisplay();\n\t}\n\n\tprivate updateDisplay(): void {\n\t\t// Apply truncation for LLM context limits (same limits as bash tool)\n\t\tconst fullOutput = this.outputLines.join(\"\\n\");\n\t\tconst contextTruncation = truncateTail(fullOutput, {\n\t\t\tmaxLines: DEFAULT_MAX_LINES,\n\t\t\tmaxBytes: DEFAULT_MAX_BYTES,\n\t\t});\n\n\t\t// Get the lines to potentially display (after context truncation)\n\t\tconst availableLines = contextTruncation.content ? contextTruncation.content.split(\"\\n\") : [];\n\n\t\t// Apply preview truncation based on expanded state\n\t\tconst previewLogicalLines = availableLines.slice(-PREVIEW_LINES);\n\t\tconst hiddenLineCount = availableLines.length - previewLogicalLines.length;\n\n\t\t// Rebuild content container\n\t\tthis.contentContainer.clear();\n\n\t\t// Command header\n\t\tconst header = new Text(theme.fg(this.colorKey, theme.bold(`$ ${this.command}`)), this.outputPad, 0);\n\t\tthis.contentContainer.addChild(header);\n\n\t\t// Output\n\t\tif (availableLines.length > 0) {\n\t\t\tif (this.expanded) {\n\t\t\t\t// Show all lines\n\t\t\t\tconst displayText = availableLines.map((line) => theme.fg(\"muted\", line)).join(\"\\n\");\n\t\t\t\tthis.contentContainer.addChild(new Text(`\\n${displayText}`, this.outputPad, 0));\n\t\t\t} else {\n\t\t\t\t// Use shared visual truncation utility with width-aware caching\n\t\t\t\tconst styledOutput = previewLogicalLines.map((line) => theme.fg(\"muted\", line)).join(\"\\n\");\n\t\t\t\tconst styledInput = `\\n${styledOutput}`;\n\t\t\t\tlet cachedWidth: number | undefined;\n\t\t\t\tlet cachedLines: readonly string[] | undefined;\n\t\t\t\tthis.contentContainer.addChild({\n\t\t\t\t\trender: (width: number) => {\n\t\t\t\t\t\tif (cachedLines === undefined || cachedWidth !== width) {\n\t\t\t\t\t\t\tconst result = truncateToVisualLines(styledInput, PREVIEW_LINES, width, this.outputPad);\n\t\t\t\t\t\t\tcachedLines = result.visualLines;\n\t\t\t\t\t\t\tcachedWidth = width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn cachedLines ?? [];\n\t\t\t\t\t},\n\t\t\t\t\tinvalidate: () => {\n\t\t\t\t\t\tcachedWidth = undefined;\n\t\t\t\t\t\tcachedLines = undefined;\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// Loader or status\n\t\tif (this.status === \"running\") {\n\t\t\tthis.contentContainer.addChild(this.loader);\n\t\t} else {\n\t\t\tconst statusParts: string[] = [];\n\n\t\t\t// Show how many lines are hidden (collapsed preview)\n\t\t\tif (hiddenLineCount > 0) {\n\t\t\t\tif (this.expanded) {\n\t\t\t\t\tstatusParts.push(\n\t\t\t\t\t\t`${theme.fg(\"muted\", \"(\")}${keyHint(\"app.tools.expand\", \"to collapse\")}${theme.fg(\"muted\", \")\")}`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tstatusParts.push(\n\t\t\t\t\t\t`${theme.fg(\"muted\", `... ${hiddenLineCount} more lines (`)}${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.status === \"cancelled\") {\n\t\t\t\tstatusParts.push(theme.fg(\"warning\", \"(cancelled)\"));\n\t\t\t} else if (this.status === \"error\") {\n\t\t\t\tstatusParts.push(theme.fg(\"error\", `(exit ${this.exitCode})`));\n\t\t\t}\n\n\t\t\t// Add truncation warning (context truncation, not preview truncation)\n\t\t\tconst wasTruncated = this.truncationResult?.truncated || contextTruncation.truncated;\n\t\t\tif (wasTruncated) {\n\t\t\t\tstatusParts.push(\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\tbashTruncationNote({ fullOutputPath: this.fullOutputPath, fullOutputError: this.fullOutputError }),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (statusParts.length > 0) {\n\t\t\t\tthis.contentContainer.addChild(new Text(`\\n${statusParts.join(\"\\n\")}`, this.outputPad, 0));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get the raw output for creating BashExecutionMessage.\n\t */\n\tgetOutput(): string {\n\t\treturn this.outputLines.join(\"\\n\");\n\t}\n\n\t/**\n\t * Get the command that was executed.\n\t */\n\tgetCommand(): string {\n\t\treturn this.command;\n\t}\n}\n"]}
@@ -132,7 +132,7 @@ class ConfigSelectorHeader {
132
132
  const sep = theme.fg("muted", " · ");
133
133
  const switchHint = this.projectModeAvailable ? keyHint("tui.input.tab", "switch mode") + sep : "";
134
134
  const actionHint = this.writeScope === "project" ? rawKeyHint("space", "cycle inherit/+/-") : rawKeyHint("space", "toggle");
135
- const hint = switchHint + actionHint + sep + rawKeyHint("esc", "close");
135
+ const hint = switchHint + actionHint + sep + keyHint("tui.select.cancel", "close");
136
136
  const spacing = Math.max(1, width - visibleWidth(title) - visibleWidth(hint));
137
137
  const scopeHint = this.writeScope === "project"
138
138
  ? theme.fg("muted", `${CONFIG_DIR_NAME}/settings.json · inherited global resources are dimmed`)