@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
@@ -0,0 +1,72 @@
1
+ import { Markdown, visibleWidth } from "@earendil-works/pi-tui";
2
+ import { t } from "../../../state/i18n-bridge.js";
3
+ import { stripFenceMarkers } from "./preview-box-renderer.js";
4
+ /** CC parity in side-by-side layout. */
5
+ export const MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE = 20;
6
+ /** Preserves narrow-terminal protection in stacked layout. */
7
+ export const MAX_PREVIEW_HEIGHT_STACKED = 15;
8
+ export const NO_PREVIEW_TEXT = "No preview available";
9
+ /** 1 blank separator + 1 affordance text row reserved when `hasAnyPreview` (height stability of the affordance row's offset relative to the box). */
10
+ export const NOTES_AFFORDANCE_OVERHEAD = 2;
11
+ /**
12
+ * Per-question cache for rendered markdown previews. Width-keyed: switching the
13
+ * inner width invalidates every cached `Markdown`'s render output (pi-tui's
14
+ * `Markdown.render(width)` re-wraps when width changes).
15
+ *
16
+ * Replaces the inline `previewTexts`, `markdownCache`, `cachedWidth` triple from
17
+ * the previous monolithic `preview-pane.ts`. One Markdown per option, lazy on
18
+ * first request, never re-constructed — count semantics frozen by tests.
19
+ */
20
+ export class MarkdownContentCache {
21
+ previewTexts;
22
+ markdownCache;
23
+ cachedWidth;
24
+ theme;
25
+ markdownTheme;
26
+ constructor(question, theme, markdownTheme) {
27
+ this.theme = theme;
28
+ this.markdownTheme = markdownTheme;
29
+ this.previewTexts = new Map();
30
+ for (let i = 0; i < question.options.length; i++) {
31
+ const raw = question.options[i]?.preview;
32
+ if (raw && raw.length > 0)
33
+ this.previewTexts.set(i, raw);
34
+ }
35
+ this.markdownCache = new Map();
36
+ }
37
+ hasAnyPreview() {
38
+ return this.previewTexts.size > 0;
39
+ }
40
+ has(optionIndex) {
41
+ return this.previewTexts.has(optionIndex);
42
+ }
43
+ /**
44
+ * Compute the body lines for a given option at a given inner width. Width changes
45
+ * invalidate the per-Markdown render cache.
46
+ */
47
+ bodyFor(optionIndex, innerWidth) {
48
+ if (this.cachedWidth !== innerWidth) {
49
+ for (const md of this.markdownCache.values())
50
+ md.invalidate();
51
+ this.cachedWidth = innerWidth;
52
+ }
53
+ const text = this.previewTexts.get(optionIndex);
54
+ if (!text) {
55
+ const placeholder = this.theme.fg("dim", t("preview.no_preview", NO_PREVIEW_TEXT));
56
+ const pad = Math.max(0, innerWidth - visibleWidth(placeholder));
57
+ return [placeholder + " ".repeat(pad)];
58
+ }
59
+ let md = this.markdownCache.get(optionIndex);
60
+ if (!md) {
61
+ md = new Markdown(text, 0, 0, this.markdownTheme);
62
+ this.markdownCache.set(optionIndex, md);
63
+ }
64
+ return stripFenceMarkers(md.render(innerWidth));
65
+ }
66
+ invalidate() {
67
+ for (const md of this.markdownCache.values())
68
+ md.invalidate();
69
+ this.cachedWidth = undefined;
70
+ }
71
+ }
72
+ //# sourceMappingURL=markdown-content-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-content-cache.js","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/markdown-content-cache.ts"],"names":[],"mappings":"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AI,CAAC,aAAa,CAAC,MAAM,EAAE;YAAE,EAAE,CAAC,UAAU,EAAE,CAAC;QAC9D,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IAC9B,CAAC;CACD","sourcesContent":["import { Markdown, type MarkdownTheme, visibleWidth } from \"@earendil-works/pi-tui\";\nimport type { Theme } from \"../../../../../../../modes/interactive/theme/theme.ts\";\nimport { t } from \"../../../state/i18n-bridge.ts\";\nimport type { QuestionData } from \"../../../tool/types.ts\";\nimport { stripFenceMarkers } from \"./preview-box-renderer.ts\";\n\n/** CC parity in side-by-side layout. */\nexport const MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE = 20;\n/** Preserves narrow-terminal protection in stacked layout. */\nexport const MAX_PREVIEW_HEIGHT_STACKED = 15;\nexport const NO_PREVIEW_TEXT = \"No preview available\";\n/** 1 blank separator + 1 affordance text row reserved when `hasAnyPreview` (height stability of the affordance row's offset relative to the box). */\nexport const NOTES_AFFORDANCE_OVERHEAD = 2;\n\n/**\n * Per-question cache for rendered markdown previews. Width-keyed: switching the\n * inner width invalidates every cached `Markdown`'s render output (pi-tui's\n * `Markdown.render(width)` re-wraps when width changes).\n *\n * Replaces the inline `previewTexts`, `markdownCache`, `cachedWidth` triple from\n * the previous monolithic `preview-pane.ts`. One Markdown per option, lazy on\n * first request, never re-constructed — count semantics frozen by tests.\n */\nexport class MarkdownContentCache {\n\tprivate readonly previewTexts: Map<number, string>;\n\tprivate readonly markdownCache: Map<number, Markdown>;\n\tprivate cachedWidth: number | undefined;\n\tprivate readonly theme: Theme;\n\tprivate readonly markdownTheme: MarkdownTheme;\n\n\tconstructor(question: QuestionData, theme: Theme, markdownTheme: MarkdownTheme) {\n\t\tthis.theme = theme;\n\t\tthis.markdownTheme = markdownTheme;\n\t\tthis.previewTexts = new Map();\n\t\tfor (let i = 0; i < question.options.length; i++) {\n\t\t\tconst raw = question.options[i]?.preview;\n\t\t\tif (raw && raw.length > 0) this.previewTexts.set(i, raw);\n\t\t}\n\t\tthis.markdownCache = new Map();\n\t}\n\n\thasAnyPreview(): boolean {\n\t\treturn this.previewTexts.size > 0;\n\t}\n\n\thas(optionIndex: number): boolean {\n\t\treturn this.previewTexts.has(optionIndex);\n\t}\n\n\t/**\n\t * Compute the body lines for a given option at a given inner width. Width changes\n\t * invalidate the per-Markdown render cache.\n\t */\n\tbodyFor(optionIndex: number, innerWidth: number): string[] {\n\t\tif (this.cachedWidth !== innerWidth) {\n\t\t\tfor (const md of this.markdownCache.values()) md.invalidate();\n\t\t\tthis.cachedWidth = innerWidth;\n\t\t}\n\t\tconst text = this.previewTexts.get(optionIndex);\n\t\tif (!text) {\n\t\t\tconst placeholder = this.theme.fg(\"dim\", t(\"preview.no_preview\", NO_PREVIEW_TEXT));\n\t\t\tconst pad = Math.max(0, innerWidth - visibleWidth(placeholder));\n\t\t\treturn [placeholder + \" \".repeat(pad)];\n\t\t}\n\t\tlet md = this.markdownCache.get(optionIndex);\n\t\tif (!md) {\n\t\t\tmd = new Markdown(text, 0, 0, this.markdownTheme);\n\t\t\tthis.markdownCache.set(optionIndex, md);\n\t\t}\n\t\treturn stripFenceMarkers(md.render(innerWidth));\n\t}\n\n\tinvalidate(): void {\n\t\tfor (const md of this.markdownCache.values()) md.invalidate();\n\t\tthis.cachedWidth = undefined;\n\t}\n}\n"]}
@@ -0,0 +1,61 @@
1
+ import type { MarkdownTheme } from "@earendil-works/pi-tui";
2
+ import type { Theme } from "../../../../../../../modes/interactive/theme/theme.ts";
3
+ import type { QuestionData } from "../../../tool/types.ts";
4
+ import type { PreviewLayoutMode } from "./preview-layout-decider.ts";
5
+ /**
6
+ * Affordance text shown below the bordered preview when focused on a preview-bearing option.
7
+ * Re-exported by `preview-pane.ts` for the existing test surface.
8
+ */
9
+ export declare const NOTES_AFFORDANCE_TEMPLATE = "Notes: press {key} to add notes";
10
+ /** Affordance text once the question carries a saved note (#197). */
11
+ export declare const NOTES_EDIT_AFFORDANCE_TEMPLATE = "Note saved: press {key} to edit";
12
+ /** Default-key (`n`) renderings of the two affordance templates. */
13
+ export declare const NOTES_AFFORDANCE_TEXT: string;
14
+ export declare const NOTES_EDIT_AFFORDANCE_TEXT: string;
15
+ /**
16
+ * Which notes affordance the block shows under the preview: `add` / `edit` (no note yet /
17
+ * a saved note) while the pane is focused with the notes editor closed, `none` otherwise.
18
+ * Decided by the pane from its props; the row itself is kept either way (height-stable).
19
+ */
20
+ export type NotesAffordance = "add" | "edit" | "none";
21
+ export interface PreviewBlockRendererConfig {
22
+ question: QuestionData;
23
+ theme: Theme;
24
+ markdownTheme: MarkdownTheme;
25
+ /** Resolved notes key (`resolveNotesKey` output), named by the affordance. */
26
+ notesKey: string;
27
+ }
28
+ /**
29
+ * Renders the bordered markdown preview block for a single question (one block per render call,
30
+ * for the option at `optionIndex`). Owns a per-question `MarkdownContentCache`.
31
+ *
32
+ * NOT a `Component` — pure render-and-measure helper consumed by `PreviewPane`. The layout mode
33
+ * is threaded as an explicit param (never re-derived from column width post-split).
34
+ *
35
+ * The affordance row is always emitted (visually empty when gated) so the preview block's row
36
+ * count is height-stable across affordance-state transitions.
37
+ */
38
+ export declare class PreviewBlockRenderer {
39
+ private readonly theme;
40
+ private readonly cache;
41
+ private readonly notesKey;
42
+ constructor(config: PreviewBlockRendererConfig);
43
+ hasAnyPreview(): boolean;
44
+ has(optionIndex: number): boolean;
45
+ invalidate(): void;
46
+ /**
47
+ * Height contribution of the preview block — always equal to `renderBlock(...).length`
48
+ * for the same arguments (the affordance overhead is not gated by the `NotesAffordance`).
49
+ * `maxRows` is the row allowance the dialog can give the block; see `fitBlock`.
50
+ */
51
+ blockHeight(width: number, optionIndex: number, mode: PreviewLayoutMode, maxRows?: number): number;
52
+ /**
53
+ * Render the preview block at `width`: bordered box, then (when it fits) a blank separator
54
+ * and the notes-affordance row. `affordance` picks the text (`none` blanks it), shown only when
55
+ * the option carries a preview; the row is emitted (empty when gated) whenever the block keeps
56
+ * it, so the row count only depends on the fit. Under a `maxRows` allowance the box always closes and its bottom border
57
+ * counts the lines left out; with no room for a box the block is empty.
58
+ */
59
+ renderBlock(width: number, optionIndex: number, mode: PreviewLayoutMode, affordance: NotesAffordance, maxRows?: number): string[];
60
+ }
61
+ //# sourceMappingURL=preview-block-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-block-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uDAAuD,CAAC;AAGnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAe3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,oCAAiD,CAAC;AACxF,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,oCAAiD,CAAC;AAC7F,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,QAAwE,CAAC;AAC3G,eAAO,MAAM,0BAA0B,QAA6E,CAAC;AAErH;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAyCtD,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,aAAa,CAAC;IAC7B,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,qBAAa,oBAAoB;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAElC,YAAY,MAAM,EAAE,0BAA0B,EAI7C;IAED,aAAa,IAAI,OAAO,CAEvB;IAED,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEhC;IAED,UAAU,IAAI,IAAI,CAEjB;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAIjG;IAED;;;;;;OAMG;IACH,WAAW,CACV,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,MAAM,GACd,MAAM,EAAE,CAgBV;CACD"}
@@ -0,0 +1,108 @@
1
+ import { DEFAULT_NOTES_KEY, formatNotesKeyForDisplay } from "../../../config.js";
2
+ import { t } from "../../../state/i18n-bridge.js";
3
+ import { KEY_PLACEHOLDER } from "../../dialog-copy.js";
4
+ import { MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE, MAX_PREVIEW_HEIGHT_STACKED, MarkdownContentCache, NOTES_AFFORDANCE_OVERHEAD, } from "./markdown-content-cache.js";
5
+ import { BORDER_HORIZONTAL_OVERHEAD, BORDER_INNER_PADDING_HORIZONTAL, BORDER_VERTICAL_OVERHEAD, computeBoxDimensions, renderBorderedBox, } from "./preview-box-renderer.js";
6
+ /**
7
+ * Affordance text shown below the bordered preview when focused on a preview-bearing option.
8
+ * Re-exported by `preview-pane.ts` for the existing test surface.
9
+ */
10
+ export const NOTES_AFFORDANCE_TEMPLATE = `Notes: press ${KEY_PLACEHOLDER} to add notes`;
11
+ /** Affordance text once the question carries a saved note (#197). */
12
+ export const NOTES_EDIT_AFFORDANCE_TEMPLATE = `Note saved: press ${KEY_PLACEHOLDER} to edit`;
13
+ /** Default-key (`n`) renderings of the two affordance templates. */
14
+ export const NOTES_AFFORDANCE_TEXT = NOTES_AFFORDANCE_TEMPLATE.replace(KEY_PLACEHOLDER, DEFAULT_NOTES_KEY);
15
+ export const NOTES_EDIT_AFFORDANCE_TEXT = NOTES_EDIT_AFFORDANCE_TEMPLATE.replace(KEY_PLACEHOLDER, DEFAULT_NOTES_KEY);
16
+ function affordanceText(affordance, notesKey) {
17
+ const text = affordance === "edit"
18
+ ? t("preview.notes_edit_affordance", NOTES_EDIT_AFFORDANCE_TEMPLATE)
19
+ : t("preview.notes_affordance", NOTES_AFFORDANCE_TEMPLATE);
20
+ return text.replace(KEY_PLACEHOLDER, formatNotesKeyForDisplay(notesKey));
21
+ }
22
+ /** Content row budget for a layout mode: preview cap minus border + affordance overhead. */
23
+ function contentBudgetFor(mode) {
24
+ const cap = mode === "side-by-side" ? MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE : MAX_PREVIEW_HEIGHT_STACKED;
25
+ return Math.max(1, cap - BORDER_VERTICAL_OVERHEAD - NOTES_AFFORDANCE_OVERHEAD);
26
+ }
27
+ /**
28
+ * Rows a preview block uses for `rawRows` of content. Unconstrained (no `maxRows`), content is
29
+ * capped by the layout's fixed budget and the notes affordance is kept. Under a `maxRows`
30
+ * allowance that the full block would exceed, the affordance (2 rows — the footer hint already
31
+ * names the notes key) goes first, then content shrinks so the box still closes with its
32
+ * "N lines hidden" count. Undefined when not even one content row fits inside a border.
33
+ */
34
+ function fitBlock(rawRows, mode, maxRows) {
35
+ const contentRows = Math.min(rawRows, contentBudgetFor(mode));
36
+ if (maxRows === undefined || BORDER_VERTICAL_OVERHEAD + contentRows + NOTES_AFFORDANCE_OVERHEAD <= maxRows) {
37
+ return { contentRows, affordance: true };
38
+ }
39
+ const fitted = Math.min(contentRows, maxRows - BORDER_VERTICAL_OVERHEAD);
40
+ return fitted >= 1 ? { contentRows: fitted, affordance: false } : undefined;
41
+ }
42
+ /** Inner (padding-aware) content width for a total block width. */
43
+ function innerWidthFor(width) {
44
+ return Math.max(1, width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL);
45
+ }
46
+ /**
47
+ * Renders the bordered markdown preview block for a single question (one block per render call,
48
+ * for the option at `optionIndex`). Owns a per-question `MarkdownContentCache`.
49
+ *
50
+ * NOT a `Component` — pure render-and-measure helper consumed by `PreviewPane`. The layout mode
51
+ * is threaded as an explicit param (never re-derived from column width post-split).
52
+ *
53
+ * The affordance row is always emitted (visually empty when gated) so the preview block's row
54
+ * count is height-stable across affordance-state transitions.
55
+ */
56
+ export class PreviewBlockRenderer {
57
+ theme;
58
+ cache;
59
+ notesKey;
60
+ constructor(config) {
61
+ this.theme = config.theme;
62
+ this.notesKey = config.notesKey;
63
+ this.cache = new MarkdownContentCache(config.question, config.theme, config.markdownTheme);
64
+ }
65
+ hasAnyPreview() {
66
+ return this.cache.hasAnyPreview();
67
+ }
68
+ has(optionIndex) {
69
+ return this.cache.has(optionIndex);
70
+ }
71
+ invalidate() {
72
+ this.cache.invalidate();
73
+ }
74
+ /**
75
+ * Height contribution of the preview block — always equal to `renderBlock(...).length`
76
+ * for the same arguments (the affordance overhead is not gated by the `NotesAffordance`).
77
+ * `maxRows` is the row allowance the dialog can give the block; see `fitBlock`.
78
+ */
79
+ blockHeight(width, optionIndex, mode, maxRows) {
80
+ const rawRows = this.cache.bodyFor(optionIndex, innerWidthFor(width)).length;
81
+ const fit = fitBlock(rawRows, mode, maxRows);
82
+ return fit ? BORDER_VERTICAL_OVERHEAD + fit.contentRows + (fit.affordance ? NOTES_AFFORDANCE_OVERHEAD : 0) : 0;
83
+ }
84
+ /**
85
+ * Render the preview block at `width`: bordered box, then (when it fits) a blank separator
86
+ * and the notes-affordance row. `affordance` picks the text (`none` blanks it), shown only when
87
+ * the option carries a preview; the row is emitted (empty when gated) whenever the block keeps
88
+ * it, so the row count only depends on the fit. Under a `maxRows` allowance the box always closes and its bottom border
89
+ * counts the lines left out; with no room for a box the block is empty.
90
+ */
91
+ renderBlock(width, optionIndex, mode, affordance, maxRows) {
92
+ const maxInnerWidth = innerWidthFor(width);
93
+ const raw = this.cache.bodyFor(optionIndex, maxInnerWidth);
94
+ const fit = fitBlock(raw.length, mode, maxRows);
95
+ if (!fit)
96
+ return [];
97
+ const hidden = raw.length - fit.contentRows;
98
+ const contentLines = hidden > 0 ? raw.slice(0, fit.contentRows) : raw;
99
+ const { boxWidth } = computeBoxDimensions(contentLines, maxInnerWidth);
100
+ const colorFn = (s) => this.theme.fg("accent", s);
101
+ const boxedLines = renderBorderedBox(contentLines, boxWidth, colorFn, hidden);
102
+ if (!fit.affordance)
103
+ return boxedLines;
104
+ const text = affordance !== "none" && this.cache.has(optionIndex) ? affordanceText(affordance, this.notesKey) : "";
105
+ return [...boxedLines, "", text ? this.theme.fg("muted", text) : ""];
106
+ }
107
+ }
108
+ //# sourceMappingURL=preview-block-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-block-renderer.js","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/preview-block-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,+BAA+B,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,+BAA+B,EAC/B,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,GACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,GACjB,MAAM,2BAA2B,CAAC;AAGnC;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAgB,eAAe,eAAe,CAAC;AACxF,qEAAqE;AACrE,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,eAAe,UAAU,CAAC;AAC7F,oEAAoE;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,OAAO,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;AAC3G,M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E,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC;CACD","sourcesContent":["import type { MarkdownTheme } from \"@earendil-works/pi-tui\";\nimport type { Theme } from \"../../../../../../../modes/interactive/theme/theme.ts\";\nimport { DEFAULT_NOTES_KEY, formatNotesKeyForDisplay } from \"../../../config.ts\";\nimport { t } from \"../../../state/i18n-bridge.ts\";\nimport type { QuestionData } from \"../../../tool/types.ts\";\nimport { KEY_PLACEHOLDER } from \"../../dialog-copy.ts\";\nimport {\n\tMAX_PREVIEW_HEIGHT_SIDE_BY_SIDE,\n\tMAX_PREVIEW_HEIGHT_STACKED,\n\tMarkdownContentCache,\n\tNOTES_AFFORDANCE_OVERHEAD,\n} from \"./markdown-content-cache.ts\";\nimport {\n\tBORDER_HORIZONTAL_OVERHEAD,\n\tBORDER_INNER_PADDING_HORIZONTAL,\n\tBORDER_VERTICAL_OVERHEAD,\n\tcomputeBoxDimensions,\n\trenderBorderedBox,\n} from \"./preview-box-renderer.ts\";\nimport type { PreviewLayoutMode } from \"./preview-layout-decider.ts\";\n\n/**\n * Affordance text shown below the bordered preview when focused on a preview-bearing option.\n * Re-exported by `preview-pane.ts` for the existing test surface.\n */\nexport const NOTES_AFFORDANCE_TEMPLATE = `Notes: press ${KEY_PLACEHOLDER} to add notes`;\n/** Affordance text once the question carries a saved note (#197). */\nexport const NOTES_EDIT_AFFORDANCE_TEMPLATE = `Note saved: press ${KEY_PLACEHOLDER} to edit`;\n/** Default-key (`n`) renderings of the two affordance templates. */\nexport const NOTES_AFFORDANCE_TEXT = NOTES_AFFORDANCE_TEMPLATE.replace(KEY_PLACEHOLDER, DEFAULT_NOTES_KEY);\nexport const NOTES_EDIT_AFFORDANCE_TEXT = NOTES_EDIT_AFFORDANCE_TEMPLATE.replace(KEY_PLACEHOLDER, DEFAULT_NOTES_KEY);\n\n/**\n * Which notes affordance the block shows under the preview: `add` / `edit` (no note yet /\n * a saved note) while the pane is focused with the notes editor closed, `none` otherwise.\n * Decided by the pane from its props; the row itself is kept either way (height-stable).\n */\nexport type NotesAffordance = \"add\" | \"edit\" | \"none\";\n\nfunction affordanceText(affordance: Exclude<NotesAffordance, \"none\">, notesKey: string): string {\n\tconst text =\n\t\taffordance === \"edit\"\n\t\t\t? t(\"preview.notes_edit_affordance\", NOTES_EDIT_AFFORDANCE_TEMPLATE)\n\t\t\t: t(\"preview.notes_affordance\", NOTES_AFFORDANCE_TEMPLATE);\n\treturn text.replace(KEY_PLACEHOLDER, formatNotesKeyForDisplay(notesKey));\n}\n\n/** Content row budget for a layout mode: preview cap minus border + affordance overhead. */\nfunction contentBudgetFor(mode: PreviewLayoutMode): number {\n\tconst cap = mode === \"side-by-side\" ? MAX_PREVIEW_HEIGHT_SIDE_BY_SIDE : MAX_PREVIEW_HEIGHT_STACKED;\n\treturn Math.max(1, cap - BORDER_VERTICAL_OVERHEAD - NOTES_AFFORDANCE_OVERHEAD);\n}\n\n/**\n * Rows a preview block uses for `rawRows` of content. Unconstrained (no `maxRows`), content is\n * capped by the layout's fixed budget and the notes affordance is kept. Under a `maxRows`\n * allowance that the full block would exceed, the affordance (2 rows — the footer hint already\n * names the notes key) goes first, then content shrinks so the box still closes with its\n * \"N lines hidden\" count. Undefined when not even one content row fits inside a border.\n */\nfunction fitBlock(\n\trawRows: number,\n\tmode: PreviewLayoutMode,\n\tmaxRows: number | undefined,\n): { contentRows: number; affordance: boolean } | undefined {\n\tconst contentRows = Math.min(rawRows, contentBudgetFor(mode));\n\tif (maxRows === undefined || BORDER_VERTICAL_OVERHEAD + contentRows + NOTES_AFFORDANCE_OVERHEAD <= maxRows) {\n\t\treturn { contentRows, affordance: true };\n\t}\n\tconst fitted = Math.min(contentRows, maxRows - BORDER_VERTICAL_OVERHEAD);\n\treturn fitted >= 1 ? { contentRows: fitted, affordance: false } : undefined;\n}\n\n/** Inner (padding-aware) content width for a total block width. */\nfunction innerWidthFor(width: number): number {\n\treturn Math.max(1, width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL);\n}\n\nexport interface PreviewBlockRendererConfig {\n\tquestion: QuestionData;\n\ttheme: Theme;\n\tmarkdownTheme: MarkdownTheme;\n\t/** Resolved notes key (`resolveNotesKey` output), named by the affordance. */\n\tnotesKey: string;\n}\n\n/**\n * Renders the bordered markdown preview block for a single question (one block per render call,\n * for the option at `optionIndex`). Owns a per-question `MarkdownContentCache`.\n *\n * NOT a `Component` — pure render-and-measure helper consumed by `PreviewPane`. The layout mode\n * is threaded as an explicit param (never re-derived from column width post-split).\n *\n * The affordance row is always emitted (visually empty when gated) so the preview block's row\n * count is height-stable across affordance-state transitions.\n */\nexport class PreviewBlockRenderer {\n\tprivate readonly theme: Theme;\n\tprivate readonly cache: MarkdownContentCache;\n\tprivate readonly notesKey: string;\n\n\tconstructor(config: PreviewBlockRendererConfig) {\n\t\tthis.theme = config.theme;\n\t\tthis.notesKey = config.notesKey;\n\t\tthis.cache = new MarkdownContentCache(config.question, config.theme, config.markdownTheme);\n\t}\n\n\thasAnyPreview(): boolean {\n\t\treturn this.cache.hasAnyPreview();\n\t}\n\n\thas(optionIndex: number): boolean {\n\t\treturn this.cache.has(optionIndex);\n\t}\n\n\tinvalidate(): void {\n\t\tthis.cache.invalidate();\n\t}\n\n\t/**\n\t * Height contribution of the preview block — always equal to `renderBlock(...).length`\n\t * for the same arguments (the affordance overhead is not gated by the `NotesAffordance`).\n\t * `maxRows` is the row allowance the dialog can give the block; see `fitBlock`.\n\t */\n\tblockHeight(width: number, optionIndex: number, mode: PreviewLayoutMode, maxRows?: number): number {\n\t\tconst rawRows = this.cache.bodyFor(optionIndex, innerWidthFor(width)).length;\n\t\tconst fit = fitBlock(rawRows, mode, maxRows);\n\t\treturn fit ? BORDER_VERTICAL_OVERHEAD + fit.contentRows + (fit.affordance ? NOTES_AFFORDANCE_OVERHEAD : 0) : 0;\n\t}\n\n\t/**\n\t * Render the preview block at `width`: bordered box, then (when it fits) a blank separator\n\t * and the notes-affordance row. `affordance` picks the text (`none` blanks it), shown only when\n\t * the option carries a preview; the row is emitted (empty when gated) whenever the block keeps\n\t * it, so the row count only depends on the fit. Under a `maxRows` allowance the box always closes and its bottom border\n\t * counts the lines left out; with no room for a box the block is empty.\n\t */\n\trenderBlock(\n\t\twidth: number,\n\t\toptionIndex: number,\n\t\tmode: PreviewLayoutMode,\n\t\taffordance: NotesAffordance,\n\t\tmaxRows?: number,\n\t): string[] {\n\t\tconst maxInnerWidth = innerWidthFor(width);\n\t\tconst raw = this.cache.bodyFor(optionIndex, maxInnerWidth);\n\t\tconst fit = fitBlock(raw.length, mode, maxRows);\n\t\tif (!fit) return [];\n\t\tconst hidden = raw.length - fit.contentRows;\n\t\tconst contentLines = hidden > 0 ? raw.slice(0, fit.contentRows) : raw;\n\n\t\tconst { boxWidth } = computeBoxDimensions(contentLines, maxInnerWidth);\n\t\tconst colorFn = (s: string) => this.theme.fg(\"accent\", s);\n\t\tconst boxedLines = renderBorderedBox(contentLines, boxWidth, colorFn, hidden);\n\t\tif (!fit.affordance) return boxedLines;\n\n\t\tconst text =\n\t\t\taffordance !== \"none\" && this.cache.has(optionIndex) ? affordanceText(affordance, this.notesKey) : \"\";\n\t\treturn [...boxedLines, \"\", text ? this.theme.fg(\"muted\", text) : \"\"];\n\t}\n}\n"]}
@@ -0,0 +1,39 @@
1
+ /** Top + bottom border rows consumed by `renderBorderedBox`. */
2
+ export declare const BORDER_VERTICAL_OVERHEAD = 2;
3
+ /** Left + right vertical bar columns (`│ ... │`) consumed by `renderBorderedBox`. */
4
+ export declare const BORDER_HORIZONTAL_OVERHEAD = 2;
5
+ /** Inner horizontal padding (1 col) between each border bar and content area. */
6
+ export declare const BORDER_INNER_PADDING_HORIZONTAL = 1;
7
+ /** Floor for the preview box's inner content width — CC parity (`PreviewBox.minWidth`). */
8
+ export declare const BOX_MIN_CONTENT_WIDTH = 40;
9
+ /**
10
+ * Drops fenced-code-block marker lines (` ``` ` opener/closer) from rendered markdown.
11
+ * pi-tui's Markdown emits literal opening ` ```lang ` and closing ` ``` ` lines around
12
+ * code blocks; this strip leaves only the highlighted code body. Inline code
13
+ * (`codespan`) is unaffected — pi-tui already renders it without backticks.
14
+ */
15
+ export declare function stripFenceMarkers(lines: readonly string[]): string[];
16
+ /**
17
+ * Wraps `lines` in a 4-sided ASCII border with 1 col of inner horizontal padding.
18
+ * Layout per content row: `│` + ` ` + content padded to `contentInner` + ` ` + `│`,
19
+ * where `contentInner = width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL`.
20
+ * Top/bottom dash runs span corner-to-corner (`width - BORDER_HORIZONTAL_OVERHEAD`). When
21
+ * `hidden > 0`, the bottom-row dash run is replaced with ` ✂ ── N lines hidden ── ` (corners stay).
22
+ */
23
+ export declare function renderBorderedBox(lines: readonly string[], width: number, colorFn: (s: string) => string, hidden?: number): string[];
24
+ /**
25
+ * Compute box dimensions from content lines. Pure of args.
26
+ *
27
+ * CC parity:
28
+ * contentWidth = max(minWidth, widestRenderedLine)
29
+ * boxWidth = min(contentWidth + 4, effectiveMaxWidth)
30
+ *
31
+ * Trailing whitespace is stripped before measuring because pi-tui's
32
+ * `Markdown.render(width)` pads every line to `width`, which would otherwise force
33
+ * the box to fill the whole column allocation.
34
+ */
35
+ export declare function computeBoxDimensions(contentLines: readonly string[], maxInnerWidth: number): {
36
+ innerWidth: number;
37
+ boxWidth: number;
38
+ };
39
+ //# sourceMappingURL=preview-box-renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-box-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.ts"],"names":[],"mappings":"AAMA,gEAAgE;AAChE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,qFAAqF;AACrF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,IAAI,CAAC;AACjD,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAKpE;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAC9B,MAAM,SAAI,GACR,MAAM,EAAE,CAoBV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CACnC,YAAY,EAAE,SAAS,MAAM,EAAE,EAC/B,aAAa,EAAE,MAAM,GACnB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAS1C"}
@@ -0,0 +1,76 @@
1
+ import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
2
+ const ANSI_SGR_RE = /\x1b\[[0-9;]*m/g;
3
+ const ANSI_OSC8_RE = /\x1b\]8;[^\x07\x1b]*(?:\x07|\x1b\\)/g;
4
+ const FENCE_MARKER_RE = /^`{3}/;
5
+ /** Top + bottom border rows consumed by `renderBorderedBox`. */
6
+ export const BORDER_VERTICAL_OVERHEAD = 2;
7
+ /** Left + right vertical bar columns (`│ ... │`) consumed by `renderBorderedBox`. */
8
+ export const BORDER_HORIZONTAL_OVERHEAD = 2;
9
+ /** Inner horizontal padding (1 col) between each border bar and content area. */
10
+ export const BORDER_INNER_PADDING_HORIZONTAL = 1;
11
+ /** Floor for the preview box's inner content width — CC parity (`PreviewBox.minWidth`). */
12
+ export const BOX_MIN_CONTENT_WIDTH = 40;
13
+ /**
14
+ * Drops fenced-code-block marker lines (` ``` ` opener/closer) from rendered markdown.
15
+ * pi-tui's Markdown emits literal opening ` ```lang ` and closing ` ``` ` lines around
16
+ * code blocks; this strip leaves only the highlighted code body. Inline code
17
+ * (`codespan`) is unaffected — pi-tui already renders it without backticks.
18
+ */
19
+ export function stripFenceMarkers(lines) {
20
+ return lines.filter((line) => {
21
+ const clean = line.replace(ANSI_SGR_RE, "").replace(ANSI_OSC8_RE, "");
22
+ return !FENCE_MARKER_RE.test(clean);
23
+ });
24
+ }
25
+ /**
26
+ * Wraps `lines` in a 4-sided ASCII border with 1 col of inner horizontal padding.
27
+ * Layout per content row: `│` + ` ` + content padded to `contentInner` + ` ` + `│`,
28
+ * where `contentInner = width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL`.
29
+ * Top/bottom dash runs span corner-to-corner (`width - BORDER_HORIZONTAL_OVERHEAD`). When
30
+ * `hidden > 0`, the bottom-row dash run is replaced with ` ✂ ── N lines hidden ── ` (corners stay).
31
+ */
32
+ export function renderBorderedBox(lines, width, colorFn, hidden = 0) {
33
+ const dashSpan = Math.max(1, width - BORDER_HORIZONTAL_OVERHEAD);
34
+ const contentInner = Math.max(1, dashSpan - 2 * BORDER_INNER_PADDING_HORIZONTAL);
35
+ const pad = " ".repeat(BORDER_INNER_PADDING_HORIZONTAL);
36
+ const top = colorFn(`┌${"─".repeat(dashSpan)}┐`);
37
+ const out = [top];
38
+ for (const line of lines) {
39
+ const padded = truncateToWidth(line, contentInner, "", true);
40
+ out.push(`${colorFn("│")}${pad}${padded}${pad}${colorFn("│")}`);
41
+ }
42
+ if (hidden > 0) {
43
+ const indicator = ` ✂ ── ${hidden} lines hidden ── `;
44
+ const space = dashSpan - indicator.length;
45
+ const leftFill = "─".repeat(Math.max(0, Math.floor(space / 2)));
46
+ const rightFill = "─".repeat(Math.max(0, dashSpan - leftFill.length - indicator.length));
47
+ out.push(colorFn(`└${leftFill}${indicator}${rightFill}┘`));
48
+ }
49
+ else {
50
+ out.push(colorFn(`└${"─".repeat(dashSpan)}┘`));
51
+ }
52
+ return out;
53
+ }
54
+ /**
55
+ * Compute box dimensions from content lines. Pure of args.
56
+ *
57
+ * CC parity:
58
+ * contentWidth = max(minWidth, widestRenderedLine)
59
+ * boxWidth = min(contentWidth + 4, effectiveMaxWidth)
60
+ *
61
+ * Trailing whitespace is stripped before measuring because pi-tui's
62
+ * `Markdown.render(width)` pads every line to `width`, which would otherwise force
63
+ * the box to fill the whole column allocation.
64
+ */
65
+ export function computeBoxDimensions(contentLines, maxInnerWidth) {
66
+ let widest = Math.min(BOX_MIN_CONTENT_WIDTH, maxInnerWidth);
67
+ for (const line of contentLines) {
68
+ const w = visibleWidth(line.replace(/\s+$/, ""));
69
+ if (w > widest)
70
+ widest = w;
71
+ }
72
+ const innerWidth = Math.min(widest, maxInnerWidth);
73
+ const boxWidth = innerWidth + BORDER_HORIZONTAL_OVERHEAD + 2 * BORDER_INNER_PADDING_HORIZONTAL;
74
+ return { innerWidth, boxWidth };
75
+ }
76
+ //# sourceMappingURL=preview-box-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-box-renderer.js","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/preview-box-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,WAAW,GAAG,iBAAiB,CAAC;AACtC,MAAM,YAAY,GAAG,sCAAsC,CAAC;AAC5D,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC,gEAAgE;AAChE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,qFAAqF;AACrF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAC5C,iFAAiF;AACjF,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AACjD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAExC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,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ToWidth, visibleWidth } from \"@earendil-works/pi-tui\";\n\nconst ANSI_SGR_RE = /\\x1b\\[[0-9;]*m/g;\nconst ANSI_OSC8_RE = /\\x1b\\]8;[^\\x07\\x1b]*(?:\\x07|\\x1b\\\\)/g;\nconst FENCE_MARKER_RE = /^`{3}/;\n\n/** Top + bottom border rows consumed by `renderBorderedBox`. */\nexport const BORDER_VERTICAL_OVERHEAD = 2;\n/** Left + right vertical bar columns (`│ ... │`) consumed by `renderBorderedBox`. */\nexport const BORDER_HORIZONTAL_OVERHEAD = 2;\n/** Inner horizontal padding (1 col) between each border bar and content area. */\nexport const BORDER_INNER_PADDING_HORIZONTAL = 1;\n/** Floor for the preview box's inner content width — CC parity (`PreviewBox.minWidth`). */\nexport const BOX_MIN_CONTENT_WIDTH = 40;\n\n/**\n * Drops fenced-code-block marker lines (` ``` ` opener/closer) from rendered markdown.\n * pi-tui's Markdown emits literal opening ` ```lang ` and closing ` ``` ` lines around\n * code blocks; this strip leaves only the highlighted code body. Inline code\n * (`codespan`) is unaffected — pi-tui already renders it without backticks.\n */\nexport function stripFenceMarkers(lines: readonly string[]): string[] {\n\treturn lines.filter((line) => {\n\t\tconst clean = line.replace(ANSI_SGR_RE, \"\").replace(ANSI_OSC8_RE, \"\");\n\t\treturn !FENCE_MARKER_RE.test(clean);\n\t});\n}\n\n/**\n * Wraps `lines` in a 4-sided ASCII border with 1 col of inner horizontal padding.\n * Layout per content row: `│` + ` ` + content padded to `contentInner` + ` ` + `│`,\n * where `contentInner = width - BORDER_HORIZONTAL_OVERHEAD - 2 * BORDER_INNER_PADDING_HORIZONTAL`.\n * Top/bottom dash runs span corner-to-corner (`width - BORDER_HORIZONTAL_OVERHEAD`). When\n * `hidden > 0`, the bottom-row dash run is replaced with ` ✂ ── N lines hidden ── ` (corners stay).\n */\nexport function renderBorderedBox(\n\tlines: readonly string[],\n\twidth: number,\n\tcolorFn: (s: string) => string,\n\thidden = 0,\n): string[] {\n\tconst dashSpan = Math.max(1, width - BORDER_HORIZONTAL_OVERHEAD);\n\tconst contentInner = Math.max(1, dashSpan - 2 * BORDER_INNER_PADDING_HORIZONTAL);\n\tconst pad = \" \".repeat(BORDER_INNER_PADDING_HORIZONTAL);\n\tconst top = colorFn(`┌${\"─\".repeat(dashSpan)}┐`);\n\tconst out: string[] = [top];\n\tfor (const line of lines) {\n\t\tconst padded = truncateToWidth(line, contentInner, \"\", true);\n\t\tout.push(`${colorFn(\"│\")}${pad}${padded}${pad}${colorFn(\"│\")}`);\n\t}\n\tif (hidden > 0) {\n\t\tconst indicator = ` ✂ ── ${hidden} lines hidden ── `;\n\t\tconst space = dashSpan - indicator.length;\n\t\tconst leftFill = \"─\".repeat(Math.max(0, Math.floor(space / 2)));\n\t\tconst rightFill = \"─\".repeat(Math.max(0, dashSpan - leftFill.length - indicator.length));\n\t\tout.push(colorFn(`└${leftFill}${indicator}${rightFill}┘`));\n\t} else {\n\t\tout.push(colorFn(`└${\"─\".repeat(dashSpan)}┘`));\n\t}\n\treturn out;\n}\n\n/**\n * Compute box dimensions from content lines. Pure of args.\n *\n * CC parity:\n * contentWidth = max(minWidth, widestRenderedLine)\n * boxWidth = min(contentWidth + 4, effectiveMaxWidth)\n *\n * Trailing whitespace is stripped before measuring because pi-tui's\n * `Markdown.render(width)` pads every line to `width`, which would otherwise force\n * the box to fill the whole column allocation.\n */\nexport function computeBoxDimensions(\n\tcontentLines: readonly string[],\n\tmaxInnerWidth: number,\n): { innerWidth: number; boxWidth: number } {\n\tlet widest = Math.min(BOX_MIN_CONTENT_WIDTH, maxInnerWidth);\n\tfor (const line of contentLines) {\n\t\tconst w = visibleWidth(line.replace(/\\s+$/, \"\"));\n\t\tif (w > widest) widest = w;\n\t}\n\tconst innerWidth = Math.min(widest, maxInnerWidth);\n\tconst boxWidth = innerWidth + BORDER_HORIZONTAL_OVERHEAD + 2 * BORDER_INNER_PADDING_HORIZONTAL;\n\treturn { innerWidth, boxWidth };\n}\n"]}
@@ -0,0 +1,123 @@
1
+ import type { QuestionData } from "../../../tool/types.ts";
2
+ import type { WrappingSelectItem } from "../wrapping-select.ts";
3
+ /** Min terminal/pane width for the side-by-side layout to engage. */
4
+ export declare const PREVIEW_MIN_WIDTH = 100;
5
+ /** Visual gap between options column and preview column in side-by-side. */
6
+ export declare const PREVIEW_COLUMN_GAP = 2;
7
+ /** 1 col padding inside the preview column (between gap and `│`). */
8
+ export declare const PREVIEW_PADDING_LEFT = 1;
9
+ /** Empty rows between options and preview blocks in stacked (narrow) layout. */
10
+ export declare const STACKED_GAP_ROWS = 1;
11
+ /** Floor for the adaptive left column width — prevents collapse on short labels. */
12
+ export declare const MIN_LEFT = 30;
13
+ /** Ceiling ratio: left column never exceeds this fraction of pane width. */
14
+ export declare const MAX_LEFT_RATIO = 0.5;
15
+ /** Floor for the preview column width — prevents right-side collapse on narrow terminals. */
16
+ export declare const MIN_PREVIEW_WIDTH = 45;
17
+ /** visibleWidth(" ✔") = 2 (space + ✔ codepoint). Reserved on the longest-label measurement
18
+ * so a confirmed row never gets truncated when MIN_LEFT clamps the column. */
19
+ export declare const CONFIRMED_OVERHEAD = 2;
20
+ export type PreviewLayoutMode = "side-by-side" | "stacked";
21
+ /**
22
+ * Decide layout mode from terminal + pane widths. Pure of inputs.
23
+ *
24
+ * The terminal-width gate is the AND check from the previous `preview-pane.ts` —
25
+ * lifted here so the decision is computed ONCE per render and threaded explicitly
26
+ * through `previewBlockHeight`. Removes the bug class where `previewBlockHeight`
27
+ * re-derived `sideBySide` from a column width (already < pane width post-split),
28
+ * capping height too short.
29
+ */
30
+ export declare function decideLayout(terminalWidth: number, paneWidth: number): PreviewLayoutMode;
31
+ /**
32
+ * Compute the adaptive left column width from option labels.
33
+ * Pure function — deterministic for a given (items, totalForNumbering, paneWidth).
34
+ *
35
+ * Pipeline:
36
+ * 1. Measure: longest visible label width + prefix overhead + confirmed-mark overhead
37
+ * 2. Clamp: floor MIN_LEFT, ceiling paneWidth * MAX_LEFT_RATIO
38
+ * 3. Safety net: never exceed available = paneWidth - GAP - MIN_PREVIEW_WIDTH
39
+ */
40
+ export declare function adaptiveLeftWidth(items: readonly WrappingSelectItem[], totalForNumbering: number, paneWidth: number): number;
41
+ /**
42
+ * Cross-tab maximum left-column width. Aggregates `adaptiveLeftWidth` over every tab
43
+ * and returns the widest result, so the options column stays stable on tab switch.
44
+ *
45
+ * Pure function — `tabs.length` MUST equal `itemsByTab.length`. Numbering uses
46
+ * `items.length` for every tab (the chat row slot that once added +1 on single-select
47
+ * has been removed).
48
+ * Floor is `MIN_LEFT` so an all-empty input still produces a usable column.
49
+ */
50
+ export declare function crossTabMaxLeftWidth(tabs: ReadonlyArray<{
51
+ multiSelect?: boolean;
52
+ }>, itemsByTab: ReadonlyArray<readonly WrappingSelectItem[]>, paneWidth: number): number;
53
+ /**
54
+ * Source-line probe: measures the widest source line across all options' previews.
55
+ * Returns 0 when no option carries a preview.
56
+ *
57
+ * V1 heuristic — works well for tree/table/heading/list content where source-line
58
+ * width ≈ rendered width. Paragraphs overstate (source width "wants" the full pane);
59
+ * the worst case is "donation does nothing useful" — fallback to the label-driven path.
60
+ * Upgrade path: replace with a render-width probe that invokes Markdown at a probe width.
61
+ *
62
+ * Pure function — O(total chars) per question; no Markdown invocation, no cache interaction.
63
+ */
64
+ export declare function previewSourceWidth(question: QuestionData): number;
65
+ /**
66
+ * Cross-tab/cross-option preview budget. Iterates all questions, computes each question's
67
+ * preview appetite via `previewSourceWidth`, adds box + padding overhead (5 cols), and
68
+ * returns the widest result. Floor is `MIN_PREVIEW_WIDTH` so a previewless question still
69
+ * reserves a usable column. Ceiling ensures the left column retains its `MIN_LEFT` floor.
70
+ *
71
+ * Pure function — same cross-tab max pattern as `crossTabMaxLeftWidth`.
72
+ */
73
+ export declare function crossTabPreviewBudget(questions: readonly QuestionData[], paneWidth: number): number;
74
+ /**
75
+ * Cross-tab left-column width with slack donation. Combines the label-driven width
76
+ * (from `crossTabMaxLeftWidth`) with the slack donated by narrow previews.
77
+ *
78
+ * Pipeline:
79
+ * 1. `labelDriven` = `crossTabMaxLeftWidth(tabs, itemsByTab, paneWidth)`
80
+ * 2. `previewBudget` = `crossTabPreviewBudget(questions, paneWidth)`
81
+ * 3. `slackDonation` = `paneWidth − GAP − previewBudget`
82
+ * 4. Return `min(max(labelDriven, slackDonation), ceiling)` where `ceiling` is the
83
+ * tighter of the preview-width safety limit and `MAX_LEFT_RATIO`
84
+ *
85
+ * Invariants (hold at side-by-side widths, paneWidth ≥ PREVIEW_MIN_WIDTH — the only
86
+ * mode that consumes this value; narrower panes can pull both ceilings under MIN_LEFT):
87
+ * - Floor: result ≥ MIN_LEFT (ratioCeiling ≥ 50 once paneWidth ≥ 100)
88
+ * - Options cap: left column ≤ paneWidth × MAX_LEFT_RATIO
89
+ * - Preview floor: right column ≥ MIN_PREVIEW_WIDTH — enforced transitively by the
90
+ * MAX_LEFT_RATIO cap (right column keeps ≥ paneWidth/2 − GAP ≥ 48 cols);
91
+ * previewSafetyCeiling is defensive depth that binds only if MAX_LEFT_RATIO
92
+ * ever rises above ~0.53
93
+ * - Cross-tab stability: both reductions are tab-independent
94
+ * - Determinism: pure of (questions, itemsByTab, paneWidth)
95
+ *
96
+ * `crossTabMaxLeftWidth` is NOT replaced — it continues to exist as the primitive.
97
+ * Donation obeys the same `MAX_LEFT_RATIO` cap as the label-driven path; the preview
98
+ * composer right-aligns narrower boxes inside the remaining column.
99
+ */
100
+ export declare function crossTabLeftWidthWithDonation(tabs: ReadonlyArray<{
101
+ multiSelect?: boolean;
102
+ }>, itemsByTab: ReadonlyArray<readonly WrappingSelectItem[]>, questions: readonly QuestionData[], paneWidth: number): number;
103
+ /**
104
+ * Width allocation for side-by-side mode.
105
+ * `adaptiveLeft` is the pre-computed left column width (from `adaptiveLeftWidth`,
106
+ * cross-tab aggregated). The Math.max(1, ...) calls keep both columns >= 1 col on
107
+ * extreme inputs.
108
+ */
109
+ export declare function columnWidths(paneWidth: number, adaptiveLeft: number): {
110
+ leftWidth: number;
111
+ rightWidth: number;
112
+ gap: number;
113
+ };
114
+ /**
115
+ * Returns the widths actually passed to `options.render` and `previewLines` inside
116
+ * `render()`. Stacked uses the full pane width for both; side-by-side splits via
117
+ * `columnWidths`, with the preview column offset by `PREVIEW_PADDING_LEFT`.
118
+ */
119
+ export declare function bodyWidths(paneWidth: number, mode: PreviewLayoutMode, adaptiveLeft: number): {
120
+ optionsWidth: number;
121
+ previewWidth: number;
122
+ };
123
+ //# sourceMappingURL=preview-layout-decider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-layout-decider.d.ts","sourceRoot":"","sources":["../../../../../../../../src/humain/ask-user-question/vendor/ask/view/components/preview/preview-layout-decider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGhE,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,qEAAqE;AACrE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,oFAAoF;AACpF,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,4EAA4E;AAC5E,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC;+EAC+E;AAC/E,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG,SAAS,CAAC;AAE3D;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,iBAAiB,CAExF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,SAAS,kBAAkB,EAA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