@testmuai/kane-cli 0.9.0 → 0.10.0-rc.3

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 (634) hide show
  1. package/dist/ChatSurface-6NZGMNHL.js +2 -0
  2. package/dist/ChromeProfilePicker-M4WXOB5O.js +2 -0
  3. package/dist/CliFeedbackPrompt-6MJA7DF6.js +2 -0
  4. package/dist/CliUploadProgress-6NLS7XHH.js +2 -0
  5. package/dist/ConfigView-O4WKZ5PU.js +2 -0
  6. package/dist/EvidenceViewOffer-WIEWCZUP.js +2 -0
  7. package/dist/FolderPicker-AF7ZMV3M.js +2 -0
  8. package/dist/InfoBox-D7GGZJU4.js +2 -0
  9. package/dist/LinksBox-DXP66H3H.js +2 -0
  10. package/dist/ProfilesView-TWOY5PVC.js +2 -0
  11. package/dist/ProjectPicker-OBYHJJLU.js +2 -0
  12. package/dist/SaveSessionPrompt-7XSHS4NL.js +2 -0
  13. package/dist/ScrollbackTap-4SPXGFMU.js +2 -0
  14. package/dist/SingleShotApp-XQUDR36R.js +2 -0
  15. package/dist/SummaryBox-IA2KS6GT.js +2 -0
  16. package/dist/TestMdRunView-LS2QUFWR.js +2 -0
  17. package/dist/TestrunEvidenceTable-HNDVJDIF.js +2 -0
  18. package/dist/WhoamiView-SNL75TEF.js +2 -0
  19. package/dist/{agent-parse-2MLJOJTH.js → agent-parse-CAS45UKA.js} +1 -1
  20. package/dist/app-client-U2YYF65L.js +2 -0
  21. package/dist/app-download-UI4ABEIX.js +2 -0
  22. package/dist/assurance-job-FFSSS4XV.js +7 -0
  23. package/dist/auth-7Z54TMQQ.js +2 -0
  24. package/dist/{binary-LVHXED3O.js → binary-THPLXCOD.js} +1 -1
  25. package/dist/bind-4XWK3DG2.js +2 -0
  26. package/dist/bootstrap-6ACT4ALI.js +2 -0
  27. package/dist/bridge-T6QMYKED.js +2 -0
  28. package/dist/build-5ZN47FAT.js +2 -0
  29. package/dist/catalog-MYPS2BXY.js +2 -0
  30. package/dist/{changelog-N5AZHXOS.js → changelog-SU674BVE.js} +1 -1
  31. package/dist/chat-committer-ZCSRJEUB.js +2 -0
  32. package/dist/chat-controller-XINCDH6Z.js +2 -0
  33. package/dist/child-G2GCW73X.js +2 -0
  34. package/dist/chunk-22PIMG52.js +2 -0
  35. package/dist/chunk-2DYHAP4E.js +2 -0
  36. package/dist/chunk-2TVPA3LL.js +2 -0
  37. package/dist/{chunk-FMUV6UCX.js → chunk-2XW33VOK.js} +1 -1
  38. package/dist/chunk-33DWJV67.js +235 -0
  39. package/dist/chunk-34R7BNZ2.js +2 -0
  40. package/dist/chunk-35ECWCCK.js +2 -0
  41. package/dist/{chunk-OHOJSADN.js → chunk-36N3EHW5.js} +1 -1
  42. package/dist/chunk-3BSYOCSW.js +3 -0
  43. package/dist/chunk-3E4ZO73O.js +6 -0
  44. package/dist/chunk-3F5FMH76.js +2 -0
  45. package/dist/chunk-3G2LSTK5.js +2 -0
  46. package/dist/chunk-3GXN6VF6.js +2 -0
  47. package/dist/chunk-3JLEDSG5.js +4 -0
  48. package/dist/chunk-3OQW2GTA.js +2 -0
  49. package/dist/chunk-3QICDXY5.js +5 -0
  50. package/dist/chunk-3RJHXOZH.js +3 -0
  51. package/dist/{chunk-Q5RDCSYM.js → chunk-3YTCKCBG.js} +1 -1
  52. package/dist/chunk-42PALMW2.js +4 -0
  53. package/dist/chunk-44B6THYK.js +2 -0
  54. package/dist/chunk-457Y5TEC.js +19 -0
  55. package/dist/chunk-47WQBG5I.js +6 -0
  56. package/dist/chunk-4I7YN6YY.js +3 -0
  57. package/dist/chunk-4IEQNX7F.js +2 -0
  58. package/dist/chunk-4LTHDJ3D.js +2 -0
  59. package/dist/chunk-4QFTHUJA.js +34 -0
  60. package/dist/chunk-4QTH7VYE.js +2 -0
  61. package/dist/chunk-4YW767UV.js +47 -0
  62. package/dist/chunk-54XA5MZH.js +2 -0
  63. package/dist/chunk-5AKJPYUW.js +11 -0
  64. package/dist/{chunk-AKE2CTV6.js → chunk-5D7ENQTQ.js} +1 -1
  65. package/dist/chunk-63EKRZKI.js +2 -0
  66. package/dist/{chunk-EHN5HTUD.js → chunk-65VANXOF.js} +51 -51
  67. package/dist/{chunk-J3BGYSMD.js → chunk-6DZX5HLZ.js} +8 -8
  68. package/dist/{chunk-YBAVDT3G.js → chunk-6EB5VRAN.js} +1 -1
  69. package/dist/chunk-6NFOH4AC.js +4 -0
  70. package/dist/chunk-6PIIUAZF.js +3 -0
  71. package/dist/chunk-6UVIY56J.js +2 -0
  72. package/dist/chunk-72KYMWQ5.js +2 -0
  73. package/dist/chunk-72RC7JSA.js +21 -0
  74. package/dist/chunk-734ORT6O.js +4 -0
  75. package/dist/chunk-77ZZQJLX.js +2 -0
  76. package/dist/chunk-7AET4JKQ.js +2 -0
  77. package/dist/chunk-7DFBOVUB.js +2 -0
  78. package/dist/chunk-7HMSMAUG.js +29 -0
  79. package/dist/chunk-7HO4NX5W.js +1 -0
  80. package/dist/chunk-7KX2BHKG.js +2 -0
  81. package/dist/{chunk-ULGZPRKU.js → chunk-7NCJMWFX.js} +1 -1
  82. package/dist/chunk-7NPTL66J.js +2 -0
  83. package/dist/chunk-7RWP4Y3H.js +2 -0
  84. package/dist/{chunk-PCKIANML.js → chunk-7SY34IIL.js} +1 -1
  85. package/dist/chunk-7V4BQSSV.js +2 -0
  86. package/dist/chunk-7XBNMOH4.js +6 -0
  87. package/dist/{chunk-SOCHN2PY.js → chunk-7YT4TTKL.js} +1 -1
  88. package/dist/{chunk-C25M2J5Q.js → chunk-ACMBMZDQ.js} +1 -1
  89. package/dist/chunk-AEWNWAXW.js +18 -0
  90. package/dist/chunk-AQ2OG2EF.js +2 -0
  91. package/dist/chunk-AUJSC7PU.js +4 -0
  92. package/dist/chunk-AVI5H4UM.js +13 -0
  93. package/dist/chunk-AVSMXDTX.js +2 -0
  94. package/dist/chunk-AZLNLHUA.js +4 -0
  95. package/dist/{chunk-HGFWIBVF.js → chunk-B7ZX5HEN.js} +5 -5
  96. package/dist/{chunk-66MOZKD2.js → chunk-BSRSXYDZ.js} +1 -1
  97. package/dist/chunk-BWXLZS5O.js +2 -0
  98. package/dist/chunk-BY65QAAN.js +4 -0
  99. package/dist/chunk-C2RUDJ46.js +2 -0
  100. package/dist/chunk-C5Z7MQE6.js +2 -0
  101. package/dist/{chunk-WDMUPK6I.js → chunk-C62QWG4B.js} +1 -1
  102. package/dist/chunk-C6HI6Y3S.js +2 -0
  103. package/dist/chunk-CB4ARIHR.js +2 -0
  104. package/dist/{chunk-7WXMV3O3.js → chunk-CCP4X75B.js} +1 -1
  105. package/dist/chunk-CGITGJ3I.js +4 -0
  106. package/dist/chunk-CM4CHYSN.js +2 -0
  107. package/dist/{chunk-ZXY4P76I.js → chunk-CUXY6KQ2.js} +1 -1
  108. package/dist/chunk-D36V5OX6.js +2 -0
  109. package/dist/chunk-D756UWY2.js +6 -0
  110. package/dist/chunk-D7TKE7LK.js +2 -0
  111. package/dist/{chunk-UWXDURAB.js → chunk-D7U2M26S.js} +1 -1
  112. package/dist/chunk-DBMW3VUN.js +4 -0
  113. package/dist/chunk-DDZLCAEO.js +5 -0
  114. package/dist/chunk-DJC7NTLA.js +3 -0
  115. package/dist/chunk-DPGOAFKF.js +2 -0
  116. package/dist/chunk-DREQ3RAA.js +2 -0
  117. package/dist/chunk-DTUPEKEO.js +2 -0
  118. package/dist/chunk-DZOYYWOW.js +2 -0
  119. package/dist/chunk-E6KSRQXL.js +8 -0
  120. package/dist/chunk-EBPRPNSA.js +2 -0
  121. package/dist/chunk-ECPFI75W.js +5 -0
  122. package/dist/chunk-EECDDDSB.js +3 -0
  123. package/dist/chunk-EF47KRUK.js +2 -0
  124. package/dist/chunk-ETZMFRD6.js +2 -0
  125. package/dist/chunk-EZN7CF45.js +4 -0
  126. package/dist/{chunk-CNUCP6DK.js → chunk-F22K3RRX.js} +1 -1
  127. package/dist/{chunk-WRSIKZ2V.js → chunk-F5NHG7VB.js} +1 -1
  128. package/dist/{chunk-DHJSM5DT.js → chunk-FCD3NYOM.js} +1 -1
  129. package/dist/chunk-FIP5L6LV.js +9 -0
  130. package/dist/chunk-FOJHSG5M.js +6 -0
  131. package/dist/chunk-FSYOTRMC.js +2 -0
  132. package/dist/chunk-FWDUVFS6.js +26 -0
  133. package/dist/chunk-FWUPJORV.js +6 -0
  134. package/dist/chunk-GFLB2SHW.js +2 -0
  135. package/dist/chunk-GMTHZUZ3.js +2 -0
  136. package/dist/chunk-GQRU3B54.js +1397 -0
  137. package/dist/chunk-GRURFGBP.js +2 -0
  138. package/dist/chunk-GXKY5A46.js +9 -0
  139. package/dist/chunk-HAW5WEKT.js +13 -0
  140. package/dist/chunk-HCJ2N3XB.js +12 -0
  141. package/dist/chunk-HHW6MRU3.js +6 -0
  142. package/dist/chunk-HIUAUZNL.js +2 -0
  143. package/dist/chunk-HJLMH7ZM.js +2 -0
  144. package/dist/{chunk-YWYORBY3.js → chunk-HJMCXSUJ.js} +1 -1
  145. package/dist/chunk-HK62JVQM.js +3 -0
  146. package/dist/{chunk-5GUD3CIH.js → chunk-HQ2E2XCU.js} +1 -1
  147. package/dist/chunk-I2MC6VVX.js +2 -0
  148. package/dist/chunk-I4RVVBG3.js +10 -0
  149. package/dist/chunk-I4WXALQR.js +2 -0
  150. package/dist/chunk-ICLUC44J.js +2 -0
  151. package/dist/{chunk-6HU5M2DS.js → chunk-IGEAET7M.js} +1 -1
  152. package/dist/{chunk-GCISXCDU.js → chunk-IINZZ4BZ.js} +1 -1
  153. package/dist/chunk-IJ2AHSWW.js +2 -0
  154. package/dist/{chunk-CSNJPD2J.js → chunk-IUQOG7Z5.js} +3 -3
  155. package/dist/chunk-IZ65ZPWY.js +3 -0
  156. package/dist/chunk-JGRXMTME.js +15 -0
  157. package/dist/{chunk-NBXYL2JT.js → chunk-JIRNI5TB.js} +7 -7
  158. package/dist/chunk-JNSWKGTB.js +2 -0
  159. package/dist/chunk-JZP3Y4ZM.js +2 -0
  160. package/dist/chunk-KF4DKXSS.js +2 -0
  161. package/dist/chunk-KGNE5CIM.js +2 -0
  162. package/dist/chunk-KM3YCIDV.js +3 -0
  163. package/dist/{chunk-HAYV4D2I.js → chunk-KODJVOCN.js} +1 -1
  164. package/dist/chunk-KU3YHPWZ.js +2 -0
  165. package/dist/{chunk-M3UAZTDK.js → chunk-KXHJMAZU.js} +2 -2
  166. package/dist/chunk-L5DALV5N.js +2 -0
  167. package/dist/chunk-LAOTVZHV.js +6 -0
  168. package/dist/chunk-LCSJ7GOG.js +2 -0
  169. package/dist/{chunk-DWMESHFI.js → chunk-LIGTP3A3.js} +1 -1
  170. package/dist/chunk-LKQFG4RW.js +5 -0
  171. package/dist/{chunk-EBLXHOE3.js → chunk-LQQNPMOD.js} +1 -1
  172. package/dist/chunk-LSDJOVWW.js +6 -0
  173. package/dist/{chunk-C6S2RPZA.js → chunk-LUR7JFPP.js} +1 -1
  174. package/dist/chunk-LUZBGTYB.js +2 -0
  175. package/dist/chunk-LX2I4JEH.js +2 -0
  176. package/dist/{chunk-7GAHJZLH.js → chunk-M43WH5DQ.js} +1 -1
  177. package/dist/chunk-MEKPGQAM.js +21 -0
  178. package/dist/chunk-MNBGG4H3.js +16 -0
  179. package/dist/chunk-MYVKUJGS.js +2 -0
  180. package/dist/chunk-MYZHOBS4.js +2 -0
  181. package/dist/chunk-NC7D7GOM.js +21 -0
  182. package/dist/chunk-NIVFEACM.js +2 -0
  183. package/dist/chunk-NLZZLANH.js +4 -0
  184. package/dist/{chunk-XT7XA4DN.js → chunk-NXAJBSIF.js} +1 -1
  185. package/dist/chunk-NXRF7FFS.js +2 -0
  186. package/dist/chunk-NZ6AV2TA.js +4 -0
  187. package/dist/chunk-O3HHTKZ5.js +6 -0
  188. package/dist/chunk-OCDBTAYS.js +12 -0
  189. package/dist/chunk-OFSDB7B4.js +3 -0
  190. package/dist/{chunk-Q5CINJYL.js → chunk-OGFU4YY4.js} +1 -1
  191. package/dist/chunk-OJ33Q6DU.js +2 -0
  192. package/dist/chunk-P2ZQDQDB.js +2 -0
  193. package/dist/{chunk-KXEE6VCA.js → chunk-P3JXJ4BW.js} +1 -1
  194. package/dist/chunk-PAWQ4AKN.js +2 -0
  195. package/dist/chunk-PUVMC4PX.js +26 -0
  196. package/dist/{chunk-SEEEGDVK.js → chunk-PZA3BSOE.js} +1 -1
  197. package/dist/chunk-Q3C6NDGI.js +2 -0
  198. package/dist/chunk-QBYENBMB.js +2 -0
  199. package/dist/chunk-QDFY5GGO.js +5 -0
  200. package/dist/chunk-QDXKEOKI.js +16 -0
  201. package/dist/{chunk-6VY62QC2.js → chunk-QENCC2ZS.js} +1 -1
  202. package/dist/chunk-QI5RZ7LL.js +2 -0
  203. package/dist/chunk-QXQ7KVEN.js +2 -0
  204. package/dist/chunk-R4JUKTDO.js +2 -0
  205. package/dist/chunk-R7KXAISS.js +12 -0
  206. package/dist/chunk-RDP7GWSY.js +2 -0
  207. package/dist/chunk-REKHAN53.js +5 -0
  208. package/dist/chunk-RF37IJNN.js +2 -0
  209. package/dist/{chunk-KWEOLPBJ.js → chunk-RFEON5GN.js} +1 -1
  210. package/dist/chunk-RHGW7B5Q.js +2 -0
  211. package/dist/chunk-RPRXRKKR.js +2 -0
  212. package/dist/{chunk-EOA6YPES.js → chunk-RTVHJ23A.js} +4 -4
  213. package/dist/chunk-RTVWQK7I.js +2 -0
  214. package/dist/chunk-RX6776AI.js +5 -0
  215. package/dist/{chunk-F7NSSQYZ.js → chunk-SGPAM5DZ.js} +1 -1
  216. package/dist/chunk-SMTBOSEJ.js +2 -0
  217. package/dist/chunk-SMXABALN.js +2 -0
  218. package/dist/{chunk-TM7VRLWS.js → chunk-SXRHKXSE.js} +1 -1
  219. package/dist/chunk-TNORODUF.js +2 -0
  220. package/dist/chunk-TU42YZOJ.js +6 -0
  221. package/dist/chunk-TU7TVFBK.js +2 -0
  222. package/dist/chunk-TW5AA5A7.js +8 -0
  223. package/dist/chunk-UEE3RZN4.js +14 -0
  224. package/dist/chunk-URH4FX3H.js +2 -0
  225. package/dist/chunk-UTM7D4PI.js +2 -0
  226. package/dist/chunk-UUJIGOEO.js +2 -0
  227. package/dist/chunk-UYDHOHSZ.js +2 -0
  228. package/dist/{chunk-4BZOG6PE.js → chunk-V7USCQWO.js} +1 -1
  229. package/dist/chunk-VJGWVBZR.js +1 -0
  230. package/dist/chunk-VLDCHFXF.js +2 -0
  231. package/dist/chunk-VO66KP2W.js +2 -0
  232. package/dist/chunk-VRIZDOO5.js +2 -0
  233. package/dist/{chunk-DOOI2JBD.js → chunk-VSVWNRI2.js} +1 -1
  234. package/dist/chunk-VUFIL5VR.js +6 -0
  235. package/dist/chunk-VX657KIK.js +2 -0
  236. package/dist/chunk-VXGN3IV7.js +2 -0
  237. package/dist/chunk-VZ4A6WMK.js +97 -0
  238. package/dist/chunk-VZJ6LUXX.js +2 -0
  239. package/dist/{chunk-RWSOZPJQ.js → chunk-W4QSZNMB.js} +1 -1
  240. package/dist/chunk-W54OT2FU.js +9 -0
  241. package/dist/{chunk-BL3SJDCG.js → chunk-W6HZF56M.js} +1 -1
  242. package/dist/chunk-W72ACCFL.js +27 -0
  243. package/dist/chunk-W7FLXW6Q.js +5 -0
  244. package/dist/chunk-WAOUE7MP.js +9 -0
  245. package/dist/chunk-WEIPY3CI.js +16 -0
  246. package/dist/chunk-WMGKUERB.js +6 -0
  247. package/dist/{chunk-DFS4RMVP.js → chunk-WN5VKKJ3.js} +1 -1
  248. package/dist/chunk-WOSANGV6.js +5 -0
  249. package/dist/{chunk-K3IQEL7R.js → chunk-WXJCJL5L.js} +1 -1
  250. package/dist/chunk-WZXPF3BI.js +2 -0
  251. package/dist/chunk-XB6BJPDL.js +2 -0
  252. package/dist/{chunk-4FHK4LKQ.js → chunk-XLEGGC4Y.js} +1 -1
  253. package/dist/chunk-XMPTFXPW.js +5 -0
  254. package/dist/chunk-XQMWHPZI.js +3 -0
  255. package/dist/{chunk-75MMTNPB.js → chunk-XRNQSXOM.js} +2 -2
  256. package/dist/{chunk-2PKME4VT.js → chunk-XZGEN4NU.js} +4 -4
  257. package/dist/chunk-XZYA7DNH.js +2 -0
  258. package/dist/{chunk-OIUV3ISA.js → chunk-Y6Y6RAY4.js} +1 -1
  259. package/dist/chunk-Y7E5L42F.js +3 -0
  260. package/dist/{chunk-GFBAK7WQ.js → chunk-YAW6JW6D.js} +7 -7
  261. package/dist/chunk-YDPTSDIJ.js +2 -0
  262. package/dist/chunk-YDSGXB25.js +2 -0
  263. package/dist/chunk-YGRULEZY.js +2 -0
  264. package/dist/chunk-YHFZFV3A.js +22 -0
  265. package/dist/chunk-YIKF4ERQ.js +375 -0
  266. package/dist/chunk-YLXWAY7D.js +2 -0
  267. package/dist/{chunk-UA2QDAWT.js → chunk-YPFQ4UGF.js} +1 -1
  268. package/dist/{chunk-4CYBXJIA.js → chunk-YQ5C6UDG.js} +1 -1
  269. package/dist/chunk-Z55KBMYV.js +2 -0
  270. package/dist/chunk-ZAFJQ3SM.js +2 -0
  271. package/dist/chunk-ZCRZFAOT.js +2 -0
  272. package/dist/chunk-ZFM77AQU.js +2 -0
  273. package/dist/{chunk-Q6F23V7L.js → chunk-ZFMRQ57Y.js} +1 -1
  274. package/dist/chunk-ZHWU6L2G.js +5 -0
  275. package/dist/chunk-ZTHYAHDN.js +17 -0
  276. package/dist/{chunk-X2A6CC6B.js → chunk-ZTRRFG52.js} +1 -1
  277. package/dist/chunk-ZU4W2QGM.js +3 -0
  278. package/dist/committer-JGY66PFM.js +2 -0
  279. package/dist/config-754B73XK.js +2 -0
  280. package/dist/controller-client-PB3AZAGG.js +2 -0
  281. package/dist/cover-cmd-NBNZCR6C.js +2 -0
  282. package/dist/{credentials-QD32Y7K7.js → credentials-F7DYLVWY.js} +1 -1
  283. package/dist/{deps-bundle-OI7JJ22L.js → deps-bundle-PW3WEQJ7.js} +1 -1
  284. package/dist/{deps-resolve-ZOALDS6H.js → deps-resolve-SQYVN76L.js} +1 -1
  285. package/dist/descriptor-7T32VRMB.js +2 -0
  286. package/dist/design-chat-F3OEZPNJ.js +2 -0
  287. package/dist/design-committer-TRYP3LOZ.js +2 -0
  288. package/dist/design-headless-OTHYOX3E.js +2 -0
  289. package/dist/design-remote-2BEGCVCX.js +3 -0
  290. package/dist/device-env-CHFRRV6W.js +2 -0
  291. package/dist/dispatch-DVQ3H7EJ.js +2 -0
  292. package/dist/doctor-XY26Z35T.js +2 -0
  293. package/dist/docx-convert-6IZO5P5K.js +2 -0
  294. package/dist/{dossier-7HVC6BNK.js → dossier-NROC2MCY.js} +1 -1
  295. package/dist/evidence-P6FFKC7B.js +2 -0
  296. package/dist/evidence-presentation-YYTIDCBS.js +2 -0
  297. package/dist/evolve-cmd-WWOB3QJR.js +2 -0
  298. package/dist/evolve-remote-WLVY3QID.js +2 -0
  299. package/dist/{exit-manager-ZLDO54S4.js → exit-manager-EDHCETUN.js} +1 -1
  300. package/dist/explain-DGJ5T6V5.js +2 -0
  301. package/dist/explain-cmd-OP5I5W3O.js +12 -0
  302. package/dist/explain-cmd-VYAANFFZ.js +4 -0
  303. package/dist/explore-K5YBGHK6.js +2 -0
  304. package/dist/explore-context-tty-RZ7D2TBV.js +2 -0
  305. package/dist/explore-entry-EKXJ67BD.js +6 -0
  306. package/dist/explore-live-2YVRAQZO.js +5 -0
  307. package/dist/explore-run-tty-D47FGPX7.js +5 -0
  308. package/dist/extract-bind-W2NET364.js +14 -0
  309. package/dist/extract-chat-M65NWGUK.js +2 -0
  310. package/dist/extract-cmd-FTFLETOP.js +6 -0
  311. package/dist/extract-headless-G6W6JQ27.js +2 -0
  312. package/dist/feeder-NY45UFJK.js +2 -0
  313. package/dist/folder-flags-KKIH654K.js +2 -0
  314. package/dist/gaps-cmd-OIDDLRYL.js +3 -0
  315. package/dist/gate-7AKRPRMK.js +2 -0
  316. package/dist/gate-WISOUTHQ.js +2 -0
  317. package/dist/{generate-headless-6WMJYNI6.js → generate-headless-RURIEKVS.js} +3 -3
  318. package/dist/headless-io-FFM5T6KL.js +2 -0
  319. package/dist/hold-passthrough-IOWPVB4W.js +2 -0
  320. package/dist/identity-HL5CJJXR.js +2 -0
  321. package/dist/index.js +178 -160
  322. package/dist/ingest-PDGS5ZTL.js +2 -0
  323. package/dist/ingest-cmd-4G2AK4Y2.js +8 -0
  324. package/dist/ingest-remote-SSLUHQVG.js +2 -0
  325. package/dist/ink-screen-RZ7QDIUI.js +2 -0
  326. package/dist/install-ZVBHPXGP.js +2 -0
  327. package/dist/interactive-bind-SI2ZS55Q.js +26 -0
  328. package/dist/interactive-remote-J56EWJGA.js +65 -0
  329. package/dist/interrupt-guard-QETBPINI.js +2 -0
  330. package/dist/lane-AQYRIW24.js +2 -0
  331. package/dist/lattice-auth-6FEVSR7E.js +2 -0
  332. package/dist/lifecycle-cmd-HJ37LTXE.js +2 -0
  333. package/dist/list-cmd-6XL2FYLQ.js +3 -0
  334. package/dist/list-commands-5DCCKU3L.js +2 -0
  335. package/dist/list-remote-LXPQNXYN.js +15 -0
  336. package/dist/locks-cmd-JJ2QNTNY.js +2 -0
  337. package/dist/logical-ids-RXAQJZ3T.js +2 -0
  338. package/dist/login-flow-WEK3E476.js +2 -0
  339. package/dist/maintenance-cmd-BXXHP36K.js +2 -0
  340. package/dist/mobile-prompts-CECJ5UY2.js +2 -0
  341. package/dist/{next-KZXH4UA4.js → next-O6SUSX3R.js} +1 -1
  342. package/dist/{objective-variable-gate-CG2KK5UX.js → objective-variable-gate-3Z7DNVVC.js} +1 -1
  343. package/dist/onboarding-PDVYMTY5.js +5 -0
  344. package/dist/open-provider-OZAG6WZS.js +2 -0
  345. package/dist/{paths-JCYX6UWL.js → paths-UMIX3RJF.js} +1 -1
  346. package/dist/pdf-convert-447ACUB3.js +2 -0
  347. package/dist/persist-recorded-session-A3ID7JFA.js +3 -0
  348. package/dist/phase-seed-LCJ4WSYV.js +2 -0
  349. package/dist/pipeline-GX3LKPI5.js +2 -0
  350. package/dist/prepare-target-FMT6QFHZ.js +2 -0
  351. package/dist/pull-cmd-UPFQYUND.js +2 -0
  352. package/dist/pull-route-FWBXJMR7.js +2 -0
  353. package/dist/readmodel-INMP6MNW.js +2 -0
  354. package/dist/real-device-run-X7JJWOIK.js +2 -0
  355. package/dist/reconcile-cmd-JBH365JL.js +5 -0
  356. package/dist/reconcile-deps-TWJ3FTSU.js +2 -0
  357. package/dist/reconcile-remote-BCX6SWFC.js +13 -0
  358. package/dist/recording-banner-YKBAL6UB.js +2 -0
  359. package/dist/registry-VQC757MJ.js +2 -0
  360. package/dist/remote-entry-X6JMPC2K.js +2 -0
  361. package/dist/remote-mode-FDPA7EWG.js +4 -0
  362. package/dist/remote-words-YVB66R3F.js +2 -0
  363. package/dist/require-project-folder-MLMEQJYP.js +2 -0
  364. package/dist/resolve-run-intent-PC7TQZUL.js +2 -0
  365. package/dist/resolver-EID34LQE.js +2 -0
  366. package/dist/revert-FHOBLZWF.js +2 -0
  367. package/dist/review-cmd-EUHFLFMY.js +5 -0
  368. package/dist/run-5RQUCNYP.js +2 -0
  369. package/dist/run-PC5YO4AS.js +2 -0
  370. package/dist/run-channel-63SVP5OI.js +2 -0
  371. package/dist/run-remote-SJCRTL7O.js +2 -0
  372. package/dist/run-startup-gate-YO66G6LS.js +2 -0
  373. package/dist/run-test-md-BLNBK4MH.js +17 -0
  374. package/dist/scrollback-GGNBDFQV.js +2 -0
  375. package/dist/session-target-DD53UXO7.js +2 -0
  376. package/dist/session-worker.js +12 -0
  377. package/dist/sessions-CFV7FOIT.js +2 -0
  378. package/dist/sessions-cmd-S7WZBUCN.js +26 -0
  379. package/dist/sessions-remote-IWHWIQ2T.js +3 -0
  380. package/dist/shell-arg-FN3MT5U7.js +2 -0
  381. package/dist/{skill-installer-32YYMM4N.js → skill-installer-MAVQY6GW.js} +1 -1
  382. package/dist/spawner-C7NLLM4F.js +2 -0
  383. package/dist/store-MSA7KASS.js +2 -0
  384. package/dist/store-choice-3OJCV26J.js +2 -0
  385. package/dist/store-guard-OOSDLMEC.js +2 -0
  386. package/dist/store-id-YZ5WKJ25.js +2 -0
  387. package/dist/store-site-KA2DNBGY.js +2 -0
  388. package/dist/stream-warnings-GEQKKJU7.js +2 -0
  389. package/dist/structured-answers-EQ2AP3F7.js +2 -0
  390. package/dist/sync-cmd-RDFDMVKQ.js +2 -0
  391. package/dist/sync-setup-RBRDUV7Q.js +2 -0
  392. package/dist/{sync-setup-ui-RC727VK6.js → sync-setup-ui-XITPGSO4.js} +2 -2
  393. package/dist/tcg-generate-KIECTZ2C.js +2 -0
  394. package/dist/test-definition-VRI4YIYL.js +2 -0
  395. package/dist/testmd-actions-CMAG6HWI.js +2 -0
  396. package/dist/testmd-sync-UPAA5UMD.js +2 -0
  397. package/dist/tms-client-NXAB6VJD.js +2 -0
  398. package/dist/token-refresh-KP3AYMYK.js +2 -0
  399. package/dist/trust-gate-AT2XBWN4.js +2 -0
  400. package/dist/turn-preflight-LHYLRL7G.js +2 -0
  401. package/dist/ui-SNV3FD2G.js +4 -0
  402. package/dist/use-case-ref-NE4X4MZN.js +2 -0
  403. package/dist/validate-basic-M5JHHNZA.js +2 -0
  404. package/dist/{variable-receipt-YWNS24TH.js → variable-receipt-BXSZO36E.js} +1 -1
  405. package/dist/verdicts-XK3GAUX3.js +2 -0
  406. package/dist/version-check-Q737BE65.js +2 -0
  407. package/dist/{view-cmd-3WHG6MVB.js → view-cmd-XSNL5DGI.js} +4 -3
  408. package/dist/walk-session-SHGYLFRB.js +2 -0
  409. package/dist/with-telemetry-PM2HVN2B.js +2 -0
  410. package/package.json +11 -11
  411. package/dist/ChatSurface-FJPK3XEJ.js +0 -8
  412. package/dist/ChromeProfilePicker-7DUDJTE2.js +0 -2
  413. package/dist/CliFeedbackPrompt-ZZPYC6OS.js +0 -2
  414. package/dist/CliUploadProgress-WQYKIBAR.js +0 -2
  415. package/dist/ConfigView-KXNOODDW.js +0 -2
  416. package/dist/EvidenceViewOffer-BTBVPBZX.js +0 -2
  417. package/dist/FolderPicker-H4YEX5LV.js +0 -2
  418. package/dist/InfoBox-DTM7X24Z.js +0 -2
  419. package/dist/LinksBox-KFG3FVOT.js +0 -2
  420. package/dist/ProfilesView-KBZHT4KL.js +0 -2
  421. package/dist/ProjectPicker-OARWULNN.js +0 -2
  422. package/dist/SaveSessionPrompt-37SMU5MC.js +0 -2
  423. package/dist/ScrollbackTap-QHJOFYMC.js +0 -2
  424. package/dist/SingleShotApp-UYCAW65Y.js +0 -2
  425. package/dist/SummaryBox-6RB5DSAH.js +0 -2
  426. package/dist/TestMdRunView-ZMOII3PL.js +0 -2
  427. package/dist/TestrunEvidenceTable-3UP2EYIV.js +0 -2
  428. package/dist/WhoamiView-MC62GERR.js +0 -2
  429. package/dist/app-client-PQFJAB63.js +0 -2
  430. package/dist/app-download-P6YXWSVQ.js +0 -2
  431. package/dist/auth-LXW4OFKF.js +0 -2
  432. package/dist/bind-ZYESQSCJ.js +0 -15
  433. package/dist/bootstrap-DI4UGMH3.js +0 -2
  434. package/dist/bridge-7J3JE3JS.js +0 -2
  435. package/dist/build-JIKYOZUH.js +0 -2
  436. package/dist/catalog-LLME3744.js +0 -2
  437. package/dist/chat-committer-6D7AQI6Z.js +0 -2
  438. package/dist/chat-controller-UJQ6Z4RE.js +0 -2
  439. package/dist/chunk-243ZJHT6.js +0 -4
  440. package/dist/chunk-2KVECC36.js +0 -2
  441. package/dist/chunk-2YEHV2CX.js +0 -2
  442. package/dist/chunk-3MCPTVJX.js +0 -2
  443. package/dist/chunk-3UI5VTQS.js +0 -4
  444. package/dist/chunk-3VAU3PNU.js +0 -2
  445. package/dist/chunk-3YIZG7WZ.js +0 -3
  446. package/dist/chunk-4Y2WH77W.js +0 -2
  447. package/dist/chunk-5EOX4MEY.js +0 -2
  448. package/dist/chunk-5HMN74RZ.js +0 -9
  449. package/dist/chunk-5LJRZI7S.js +0 -6
  450. package/dist/chunk-5RCS2LIQ.js +0 -26
  451. package/dist/chunk-5TQFOPJV.js +0 -2
  452. package/dist/chunk-5ZFOKYFB.js +0 -5
  453. package/dist/chunk-63DYVWNX.js +0 -2
  454. package/dist/chunk-6MD7SR7D.js +0 -9
  455. package/dist/chunk-7N6OCHPC.js +0 -7
  456. package/dist/chunk-A2SQD2AY.js +0 -4
  457. package/dist/chunk-AACQE24F.js +0 -2
  458. package/dist/chunk-AHFIRHSP.js +0 -18
  459. package/dist/chunk-AJT34ESA.js +0 -38
  460. package/dist/chunk-AUMJ4RVA.js +0 -21
  461. package/dist/chunk-AXTPNZPX.js +0 -2
  462. package/dist/chunk-BB2W35TW.js +0 -2
  463. package/dist/chunk-BKM2LWU2.js +0 -3
  464. package/dist/chunk-BUPRL2TE.js +0 -2
  465. package/dist/chunk-C44QQJR4.js +0 -239
  466. package/dist/chunk-CW3RHKLA.js +0 -5
  467. package/dist/chunk-D6E6KRVX.js +0 -2
  468. package/dist/chunk-DTRKTBCE.js +0 -17
  469. package/dist/chunk-DTRSYWZE.js +0 -2
  470. package/dist/chunk-EVFFDODK.js +0 -5
  471. package/dist/chunk-F2OBORCG.js +0 -2
  472. package/dist/chunk-FQNQVC5O.js +0 -5
  473. package/dist/chunk-FY7TCYPK.js +0 -6
  474. package/dist/chunk-GTVQYT3D.js +0 -35
  475. package/dist/chunk-HG5LLZBU.js +0 -2
  476. package/dist/chunk-I7TIGB7K.js +0 -2
  477. package/dist/chunk-IICT4VOU.js +0 -2
  478. package/dist/chunk-ILDHE4P4.js +0 -6
  479. package/dist/chunk-IPXKUYUK.js +0 -2
  480. package/dist/chunk-JQY5HRZ4.js +0 -15
  481. package/dist/chunk-JX6BFEDO.js +0 -4
  482. package/dist/chunk-K2UJYY2U.js +0 -2
  483. package/dist/chunk-KBM3XHAM.js +0 -2
  484. package/dist/chunk-KDNNMU7Q.js +0 -4
  485. package/dist/chunk-KJQNAOOE.js +0 -6
  486. package/dist/chunk-LH4IPANP.js +0 -2
  487. package/dist/chunk-LLG7NEGX.js +0 -6
  488. package/dist/chunk-LSDWPG6C.js +0 -2
  489. package/dist/chunk-MSGW4JDG.js +0 -2
  490. package/dist/chunk-NJ4BXZBX.js +0 -2
  491. package/dist/chunk-NLCCBXXV.js +0 -2
  492. package/dist/chunk-NMSZ7G6P.js +0 -2
  493. package/dist/chunk-OC6H6BYI.js +0 -6
  494. package/dist/chunk-OJAXOOZ5.js +0 -8
  495. package/dist/chunk-OMNLAGQC.js +0 -29
  496. package/dist/chunk-OOCCUUR2.js +0 -2
  497. package/dist/chunk-OXC6O5O7.js +0 -2
  498. package/dist/chunk-OZQDD2EX.js +0 -94
  499. package/dist/chunk-PEDINHVU.js +0 -2
  500. package/dist/chunk-PNUAP3RY.js +0 -8
  501. package/dist/chunk-Q2F5QB2W.js +0 -2
  502. package/dist/chunk-Q4YYAN6E.js +0 -2
  503. package/dist/chunk-Q6AHSGOE.js +0 -5
  504. package/dist/chunk-QAB3Y5FQ.js +0 -4
  505. package/dist/chunk-RDHWNSDP.js +0 -7
  506. package/dist/chunk-RKXHVP2Z.js +0 -2
  507. package/dist/chunk-RRY5IXOB.js +0 -2
  508. package/dist/chunk-RSSOJ3L2.js +0 -21
  509. package/dist/chunk-RTSBKCZY.js +0 -16
  510. package/dist/chunk-SID4X77D.js +0 -370
  511. package/dist/chunk-SRTKRHYI.js +0 -12
  512. package/dist/chunk-T2ONUKTL.js +0 -5
  513. package/dist/chunk-U6OTFMIT.js +0 -4
  514. package/dist/chunk-UD7KKHPW.js +0 -5
  515. package/dist/chunk-USOYXCZ4.js +0 -2
  516. package/dist/chunk-USY7VAO6.js +0 -2
  517. package/dist/chunk-V4B5QA3U.js +0 -4
  518. package/dist/chunk-VBS33P2C.js +0 -2
  519. package/dist/chunk-VHW7BMZQ.js +0 -2
  520. package/dist/chunk-VIO7CCFW.js +0 -5
  521. package/dist/chunk-VORWZLS3.js +0 -9
  522. package/dist/chunk-VVOKM2VO.js +0 -2
  523. package/dist/chunk-W5TTF7GB.js +0 -6
  524. package/dist/chunk-WESMQEPO.js +0 -2
  525. package/dist/chunk-WMI4P76K.js +0 -27
  526. package/dist/chunk-WNOC6MQC.js +0 -2
  527. package/dist/chunk-WVHMPIDQ.js +0 -2
  528. package/dist/chunk-XBX643ZD.js +0 -2
  529. package/dist/chunk-XKHWWKJZ.js +0 -3
  530. package/dist/chunk-XLSOQLVT.js +0 -2
  531. package/dist/chunk-Y3ZYN6AK.js +0 -4
  532. package/dist/chunk-YCCUBQY4.js +0 -2
  533. package/dist/chunk-YKTYVJBN.js +0 -3
  534. package/dist/chunk-YLQHY4A7.js +0 -2
  535. package/dist/chunk-Z7IGTVJW.js +0 -2
  536. package/dist/chunk-ZC2CKWLB.js +0 -2
  537. package/dist/chunk-ZER3FZSZ.js +0 -22
  538. package/dist/chunk-ZJYT72BA.js +0 -9
  539. package/dist/chunk-ZKSN2SJ7.js +0 -2
  540. package/dist/chunk-ZLWURCJ7.js +0 -2
  541. package/dist/committer-2QPBANRD.js +0 -2
  542. package/dist/config-YGTHSGQN.js +0 -2
  543. package/dist/controller-client-ZF5IXRUV.js +0 -2
  544. package/dist/cover-cmd-6RO366CC.js +0 -3
  545. package/dist/descriptor-3JJUOHBM.js +0 -2
  546. package/dist/design-committer-D44GSUXY.js +0 -2
  547. package/dist/device-env-DXDJJMTL.js +0 -2
  548. package/dist/dispatch-7EWWQRQ5.js +0 -2
  549. package/dist/doctor-TPYPEEUL.js +0 -2
  550. package/dist/docx-convert-SQRTF7XS.js +0 -2
  551. package/dist/evidence-NPFTBGDF.js +0 -2
  552. package/dist/evidence-presentation-XF23B7F2.js +0 -2
  553. package/dist/evolve-cmd-VGVXV6XW.js +0 -2
  554. package/dist/explain-NEFBUX5G.js +0 -2
  555. package/dist/explain-cmd-GOP5TE63.js +0 -9
  556. package/dist/explain-cmd-M7IX2YNB.js +0 -3
  557. package/dist/extract-bind-CKIRLXAJ.js +0 -14
  558. package/dist/extract-cmd-3EWLSPGS.js +0 -5
  559. package/dist/feeder-66TUPB2R.js +0 -2
  560. package/dist/gaps-cmd-WVC5GXQC.js +0 -3
  561. package/dist/gate-OYRDJMF6.js +0 -2
  562. package/dist/headless-io-75HUMWZB.js +0 -2
  563. package/dist/identity-ADZ4PAJF.js +0 -2
  564. package/dist/ingest-OSNNM3DH.js +0 -2
  565. package/dist/ingest-cmd-AECK5T4H.js +0 -2
  566. package/dist/install-ZV3KJZV4.js +0 -2
  567. package/dist/interactive-bind-IYS6KDOH.js +0 -26
  568. package/dist/interrupt-guard-UREUWNRL.js +0 -2
  569. package/dist/lifecycle-cmd-XCSBELFQ.js +0 -2
  570. package/dist/list-cmd-S4DSN2ET.js +0 -3
  571. package/dist/list-commands-GLNGHPDU.js +0 -2
  572. package/dist/locks-cmd-67OHQZNV.js +0 -2
  573. package/dist/logical-ids-GLVM2SVR.js +0 -2
  574. package/dist/login-flow-ASUUU7SO.js +0 -2
  575. package/dist/maintenance-cmd-K5KXRIFL.js +0 -2
  576. package/dist/mobile-prompts-ZUZTA3RV.js +0 -2
  577. package/dist/open-provider-YIBB77FE.js +0 -2
  578. package/dist/pdf-convert-RLXSXFWN.js +0 -2
  579. package/dist/persist-recorded-session-EWV56TSZ.js +0 -3
  580. package/dist/phase-seed-MKHEWUN6.js +0 -2
  581. package/dist/pipeline-LAWACB2O.js +0 -2
  582. package/dist/prepare-target-WGPCZKLE.js +0 -2
  583. package/dist/readmodel-FVLRQWZ7.js +0 -2
  584. package/dist/real-device-run-MDLFKFVQ.js +0 -2
  585. package/dist/reconcile-cmd-XFM2ZXUJ.js +0 -2
  586. package/dist/reconcile-deps-V5VLDPYT.js +0 -4
  587. package/dist/reconcile-engine-VZBTMPUK.js +0 -2
  588. package/dist/recording-banner-CJHRPHHF.js +0 -2
  589. package/dist/records-LMCVKPE5.js +0 -2
  590. package/dist/registry-3JXQFZEG.js +0 -2
  591. package/dist/require-project-folder-SE5GVCYJ.js +0 -2
  592. package/dist/resolve-run-intent-DD4MB6UD.js +0 -2
  593. package/dist/resolver-TLO4SRWV.js +0 -2
  594. package/dist/revert-NOUECRW4.js +0 -2
  595. package/dist/review-cmd-7EOYQMPE.js +0 -5
  596. package/dist/run-EHUNJPW6.js +0 -2
  597. package/dist/run-OTMPUQSH.js +0 -2
  598. package/dist/run-channel-RGH4WIQX.js +0 -2
  599. package/dist/run-test-md-KBDEHGXJ.js +0 -17
  600. package/dist/scrollback-JLPJR25X.js +0 -2
  601. package/dist/session-items-2ATN7VXG.js +0 -2
  602. package/dist/session-target-UMNASXI7.js +0 -2
  603. package/dist/sessions-NH7WQWMX.js +0 -2
  604. package/dist/sessions-cmd-M3SECFKQ.js +0 -25
  605. package/dist/spawner-DPT2RLAO.js +0 -2
  606. package/dist/store-guard-U32JE6JJ.js +0 -2
  607. package/dist/store-id-EOSGEKVK.js +0 -2
  608. package/dist/structured-answers-ZI2B6JJE.js +0 -2
  609. package/dist/sync-cmd-3EP7LZGL.js +0 -2
  610. package/dist/sync-setup-SWTBVQEV.js +0 -2
  611. package/dist/tcg-generate-KXU7E2GF.js +0 -2
  612. package/dist/testmd-actions-PEWCPQ5R.js +0 -2
  613. package/dist/testmd-sync-ZWFQWZ2X.js +0 -2
  614. package/dist/tms-client-KU6HCA23.js +0 -2
  615. package/dist/token-refresh-QD3OCGJJ.js +0 -2
  616. package/dist/trust-gate-EX7R2P4Y.js +0 -2
  617. package/dist/turn-preflight-JGYT7LXP.js +0 -2
  618. package/dist/ui-JEJGTURD.js +0 -4
  619. package/dist/validate-basic-AAIXSAWH.js +0 -2
  620. package/dist/verdicts-LAB5BGCC.js +0 -2
  621. package/dist/version-check-EHOLX3YH.js +0 -2
  622. package/dist/walk-session-XP4KYFKO.js +0 -2
  623. package/dist/with-telemetry-FJMJQDCM.js +0 -2
  624. /package/dist/{chunk-BKHXPBWN.js → chunk-2RUSXQ3O.js} +0 -0
  625. /package/dist/{chunk-6J5T5FEY.js → chunk-3AGP2BVN.js} +0 -0
  626. /package/dist/{chunk-CH273NAE.js → chunk-73Y6T2UK.js} +0 -0
  627. /package/dist/{chunk-ZMNJBUAO.js → chunk-73ZFOJOK.js} +0 -0
  628. /package/dist/{chunk-NOL7MNZH.js → chunk-A7RJQJNT.js} +0 -0
  629. /package/dist/{chunk-N2P4MI32.js → chunk-FWGUISUG.js} +0 -0
  630. /package/dist/{chunk-UJZZDPDY.js → chunk-HD6NR44L.js} +0 -0
  631. /package/dist/{chunk-LDPLJFCV.js → chunk-I6S6DZ2E.js} +0 -0
  632. /package/dist/{chunk-427OQS2N.js → chunk-LD5B3QFW.js} +0 -0
  633. /package/dist/{chunk-2UIHS2FH.js → chunk-PGESS7BW.js} +0 -0
  634. /package/dist/{chunk-BZAGVBCX.js → chunk-ZCIWQHCO.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as $}from"./chunk-AHFIRHSP.js";import{g as D}from"./chunk-K3IQEL7R.js";import{a as E}from"./chunk-NLCCBXXV.js";function U(e){return["completed","failed","ended","stopped"].includes(e.trim().toLowerCase())}function je(e){return["ended","stopped"].includes(e.trim().toLowerCase())}function q(e){return{requestId:e.requestId,objective:e.objective,status:"",turnActive:!1,scenarios:[],thinking:"",thinkingLog:[],chatLog:[],progress:0}}function Re(e){return e.pendingClarification===void 0?e:{...e,pendingClarification:void 0}}function Ce(e){return{...e,turnActive:!0,error:void 0,thinking:"",thinkingLog:[]}}function P(e,t){switch(t.type){case"thinking":return{...e,status:"thinking",thinking:e.thinking+t.delta};case"thinking_done":return{...e,thinkingLog:[...e.thinkingLog,{text:e.thinking,tookMs:t.tookMs}],thinking:""};case"progress":return{...e,progress:t.pct};case"snapshot":return{...e,scenarios:t.data.scenarios,status:t.data.status,headline:t.data.headline??e.headline};case"chat":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}]};case"clarification":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}],pendingClarification:t.text};case"limit":return{...e,limits:{scenarioLimit:t.scenarioLimit,perScenarioLimit:t.perScenarioLimit}};case"error":return{...e,error:t.message};case"done":return{...e,status:t.status,turnActive:!1,error:t.status==="failed"&&!e.error?"generation failed":e.error}}}function H(e,t){let n=[],i=e.type??"",d=e.status??"";if(i==="ping")return n;switch(i){case"thinking_token":typeof e.data=="string"&&n.push({type:"thinking",delta:e.data});break;case"thinking_stopped":{let r=e.data??{},o=se(r.time_taken);n.push({type:"thinking_done",text:typeof e.data=="string"?e.data:r.message??"",tookMs:o});break}case"progress":{let r=e.data??{};typeof r.progress=="number"&&n.push({type:"progress",pct:r.progress});break}case"clarification":{let r=e.data??{};typeof r.message=="string"&&n.push({type:"clarification",text:r.message});break}case"chatting_stopped":{let r=e.data??{};typeof r.message=="string"&&r.message.length>0&&n.push({type:"chat",text:r.message});break}case"limit_update":{let r=e.data??{},o=r.test_cases_limit??e.test_cases_limit,p=r.per_scenario_test_cases_limit??e.per_scenario_test_cases_limit;n.push({type:"limit",scenarioLimit:o,perScenarioLimit:p});break}case"error":{let r=typeof e.data=="string"?e.data:e.data?.message??"generation error";n.push({type:"error",message:r});break}case"request_cancelled":return n.push({type:"done",status:"stopped"}),n;case"session_ended":return n.push({type:"done",status:"ended"}),n;default:break}if(Array.isArray(e.scenarios)&&n.push({type:"snapshot",data:{requestId:t,status:d,headline:e.headline,scenarios:e.scenarios}}),d&&U(d)){let r=d.trim().toLowerCase();n.push({type:"done",status:r})}return n}function se(e){if(!e)return;let t=/^([\d.]+)(ms|s)?$/.exec(e.trim());if(!t)return;let n=Number(t[1]);if(Number.isFinite(n))return t[2]==="ms"?Math.round(n):Math.round(n*1e3)}var v=class extends Error{constructor(t){super(t),this.name="AuthError"}},M=class extends Error{constructor(t){super(t),this.name="ForbiddenError"}},I=class extends Error{constructor(t){super(t),this.name="InsufficientCreditsError"}},k=class extends Error{constructor(n,i){super(n);this.cause=i;this.name="TransportError"}};function x(e,t){let n=t?.message??t?.error??`HTTP ${e}`;return e===401?new v(n):e===403?t?.key==="insufficient_credits"?new I(n):new M(n):new k(n)}async function*J(e){let t=e.fetchImpl??fetch,n=e.maxRetries??5,i=e.maxBackoffMs??3e4,d=e.connectTimeoutMs??1e4,r=0,o=!1;for(;;){if(e.signal.aborted)return;let p=new AbortController,a=()=>p.abort();e.signal.addEventListener("abort",a,{once:!0});let c=setTimeout(()=>p.abort(),d),g;try{g=await t(e.url,{method:"GET",headers:{Authorization:await e.authHeader(),Accept:"text/event-stream"},signal:p.signal})}catch(w){if(clearTimeout(c),e.signal.removeEventListener("abort",a),e.signal.aborted)return;if(++r>n)throw new k("SSE connect failed",w);await O(F(r,i));continue}if(clearTimeout(c),!g.ok){e.signal.removeEventListener("abort",a);let w=await oe(g);if(g.status===401&&o){if(++r>n)throw x(401,w);await O(F(r,i));continue}throw x(g.status,w)}if(!g.body)throw e.signal.removeEventListener("abort",a),new k("SSE response had no body");o=!0,r=0;let m=g.body.getReader(),h=new TextDecoder("utf-8"),b="";try{for(;;){if(e.signal.aborted){await m.cancel().catch(()=>{});return}let{done:w,value:s}=await m.read();if(w)break;b+=h.decode(s,{stream:!0});let f;for(;(f=b.indexOf(`
2
+ import{a as $}from"./chunk-AEWNWAXW.js";import{g as D}from"./chunk-WXJCJL5L.js";import{a as E}from"./chunk-4QTH7VYE.js";function U(e){return["completed","failed","ended","stopped"].includes(e.trim().toLowerCase())}function je(e){return["ended","stopped"].includes(e.trim().toLowerCase())}function q(e){return{requestId:e.requestId,objective:e.objective,status:"",turnActive:!1,scenarios:[],thinking:"",thinkingLog:[],chatLog:[],progress:0}}function Re(e){return e.pendingClarification===void 0?e:{...e,pendingClarification:void 0}}function Ce(e){return{...e,turnActive:!0,error:void 0,thinking:"",thinkingLog:[]}}function P(e,t){switch(t.type){case"thinking":return{...e,status:"thinking",thinking:e.thinking+t.delta};case"thinking_done":return{...e,thinkingLog:[...e.thinkingLog,{text:e.thinking,tookMs:t.tookMs}],thinking:""};case"progress":return{...e,progress:t.pct};case"snapshot":return{...e,scenarios:t.data.scenarios,status:t.data.status,headline:t.data.headline??e.headline};case"chat":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}]};case"clarification":return{...e,turnActive:!1,chatLog:[...e.chatLog,{role:"model",text:t.text}],pendingClarification:t.text};case"limit":return{...e,limits:{scenarioLimit:t.scenarioLimit,perScenarioLimit:t.perScenarioLimit}};case"error":return{...e,error:t.message};case"done":return{...e,status:t.status,turnActive:!1,error:t.status==="failed"&&!e.error?"generation failed":e.error}}}function H(e,t){let n=[],i=e.type??"",d=e.status??"";if(i==="ping")return n;switch(i){case"thinking_token":typeof e.data=="string"&&n.push({type:"thinking",delta:e.data});break;case"thinking_stopped":{let r=e.data??{},o=se(r.time_taken);n.push({type:"thinking_done",text:typeof e.data=="string"?e.data:r.message??"",tookMs:o});break}case"progress":{let r=e.data??{};typeof r.progress=="number"&&n.push({type:"progress",pct:r.progress});break}case"clarification":{let r=e.data??{};typeof r.message=="string"&&n.push({type:"clarification",text:r.message});break}case"chatting_stopped":{let r=e.data??{};typeof r.message=="string"&&r.message.length>0&&n.push({type:"chat",text:r.message});break}case"limit_update":{let r=e.data??{},o=r.test_cases_limit??e.test_cases_limit,p=r.per_scenario_test_cases_limit??e.per_scenario_test_cases_limit;n.push({type:"limit",scenarioLimit:o,perScenarioLimit:p});break}case"error":{let r=typeof e.data=="string"?e.data:e.data?.message??"generation error";n.push({type:"error",message:r});break}case"request_cancelled":return n.push({type:"done",status:"stopped"}),n;case"session_ended":return n.push({type:"done",status:"ended"}),n;default:break}if(Array.isArray(e.scenarios)&&n.push({type:"snapshot",data:{requestId:t,status:d,headline:e.headline,scenarios:e.scenarios}}),d&&U(d)){let r=d.trim().toLowerCase();n.push({type:"done",status:r})}return n}function se(e){if(!e)return;let t=/^([\d.]+)(ms|s)?$/.exec(e.trim());if(!t)return;let n=Number(t[1]);if(Number.isFinite(n))return t[2]==="ms"?Math.round(n):Math.round(n*1e3)}var v=class extends Error{constructor(t){super(t),this.name="AuthError"}},M=class extends Error{constructor(t){super(t),this.name="ForbiddenError"}},I=class extends Error{constructor(t){super(t),this.name="InsufficientCreditsError"}},k=class extends Error{constructor(n,i){super(n);this.cause=i;this.name="TransportError"}};function x(e,t){let n=t?.message??t?.error??`HTTP ${e}`;return e===401?new v(n):e===403?t?.key==="insufficient_credits"?new I(n):new M(n):new k(n)}async function*J(e){let t=e.fetchImpl??fetch,n=e.maxRetries??5,i=e.maxBackoffMs??3e4,d=e.connectTimeoutMs??1e4,r=0,o=!1;for(;;){if(e.signal.aborted)return;let p=new AbortController,a=()=>p.abort();e.signal.addEventListener("abort",a,{once:!0});let c=setTimeout(()=>p.abort(),d),g;try{g=await t(e.url,{method:"GET",headers:{Authorization:await e.authHeader(),Accept:"text/event-stream"},signal:p.signal})}catch(w){if(clearTimeout(c),e.signal.removeEventListener("abort",a),e.signal.aborted)return;if(++r>n)throw new k("SSE connect failed",w);await O(F(r,i));continue}if(clearTimeout(c),!g.ok){e.signal.removeEventListener("abort",a);let w=await oe(g);if(g.status===401&&o){if(++r>n)throw x(401,w);await O(F(r,i));continue}throw x(g.status,w)}if(!g.body)throw e.signal.removeEventListener("abort",a),new k("SSE response had no body");o=!0,r=0;let m=g.body.getReader(),h=new TextDecoder("utf-8"),b="";try{for(;;){if(e.signal.aborted){await m.cancel().catch(()=>{});return}let{done:w,value:s}=await m.read();if(w)break;b+=h.decode(s,{stream:!0});let f;for(;(f=b.indexOf(`
3
3
 
4
4
  `))>=0;){let u=b.slice(0,f);b=b.slice(f+2);let l=ie(u);l&&(yield l)}}}catch(w){if(e.signal.aborted)return;if(++r>n)throw new k("SSE stream dropped",w);await O(F(r,i));continue}finally{e.signal.removeEventListener("abort",a)}return}}function ie(e){let t="message",n="";for(let i of e.split(`
5
5
  `))i.startsWith("event:")?t=i.slice(6).trim():i.startsWith("data:")&&(n+=i.slice(5).trim());if(t!=="message"||!n)return null;try{let i=Buffer.from(n,"base64").toString("utf-8");return JSON.parse(i)}catch{return null}}function F(e,t){return Math.min(t,1e3*2**(e-1))}function O(e){return new Promise(t=>setTimeout(t,e))}async function oe(e){try{return await e.clone().json()}catch{return}}function W(e,t){t?.length&&(e.append("files",t.map(n=>n.fileKey).join(",")),e.append("gemini_metadata",JSON.stringify(t.map(n=>({fileData:{fileUri:n.geminiUri,mimeType:n.mimeType}})))))}function Ue(e,t={}){let n=t.fetchImpl??fetch,i=new Map,d=!0;async function r(){let s=await e.authResolver.resolve();if(!s)throw new v("unauthorized; run `kane-cli login`");return E(s.username,s.access_key)}function o(s){return`${e.baseUrl}${s}`}async function p(s){if(!s.ok){let f;try{f=await s.clone().json()}catch{f=void 0}throw x(s.status,f)}return s.json()}function a(s){let f=s?.data??s;return{request_id:f.request_id??f.id,status:f.status??""}}function c(s,f,u,l){let y=q({requestId:s,objective:f});l&&(y=P(y,{type:"snapshot",data:l}),l.status==="cleaned_up"&&(y={...y,error:"session was reaped (cleaned_up) \u2014 continuing will destructively regenerate"}));let S=new AbortController;u&&(u.aborted?S.abort():u.addEventListener("abort",()=>S.abort(),{once:!0})),i.set(s,S);let A={requestId:s,state:y,events:void 0};return A.events=(async function*(){try{let C=J({url:o(`/requests/${s}/sse`),authHeader:r,signal:S.signal,log:e.log,fetchImpl:n});for await(let L of C)for(let z of H(L,s))A.state=P(A.state,z),yield z}finally{i.delete(s)}})(),A}async function g(s,f){let u=new FormData;u.append("prompt",s.prompt),d=s.memoryEnhancement??!0,u.append("memory_enhancement",String(d)),s.scenarioLimit!==void 0&&u.append("test_scenario_limit",String(s.scenarioLimit)),s.perScenarioLimit!==void 0&&u.append("per_scenario_test_cases_limit",String(s.perScenarioLimit));let l=s.projectId??e.projectId,y=s.folderId??e.folderId;l&&u.append("project_id",l),y&&u.append("folder_id",y),W(u,s.attachments);let S=await n(o("/requests"),{method:"POST",headers:{Authorization:await r()},body:u}),A=await p(S),{request_id:C}=a(A),L=String(C);return c(L,s.prompt,f)}async function m(s,f){let u=await n(o(`/requests/${s}`),{method:"GET",headers:{Authorization:await r()}}),l=await p(u),y=l?.data??l,S={requestId:s,status:y.status??"",headline:y.headline,scenarios:Array.isArray(y.scenarios)?y.scenarios:[]};return c(s,"",f,S)}async function h(s,f,u){let l=new FormData;l.append("prompt",f),l.append("chat_enabled","true"),l.append("memory_enhancement",String(d)),u?.mappings&&l.append("mappings",JSON.stringify(u.mappings)),W(l,u?.attachments);let y=await n(o(`/requests/${s}`),{method:"PUT",headers:{Authorization:await r()},body:l});if(!y.ok){let S;try{S=await y.clone().json()}catch{}throw x(y.status,S)}}async function b(s){i.get(s)?.abort();let u=await n(o(`/requests/${s}/stop`),{method:"DELETE",headers:{Authorization:await r()}});if(!u.ok&&u.status!==404){let l;try{l=await u.clone().json()}catch{}throw x(u.status,l)}}async function w(s){i.get(s)?.abort();let u=await n(o(`/requests/${s}/end`),{method:"DELETE",headers:{Authorization:await r()}});if(!u.ok&&u.status!==404){let l;try{l=await u.clone().json()}catch{}throw x(u.status,l)}}return{start:g,attach:m,chat:h,cancel:b,end:w}}import{statSync as ae,realpathSync as G,existsSync as ce}from"fs";import{extname as ue,resolve as j,isAbsolute as pe}from"path";import{homedir as V}from"os";var de=new Set([".txt",".md",".json",".xml",".jpg",".jpeg",".png",".gif",".bmp",".webp",".pdf",".docx",".csv",".xlsx",".mp3",".wav",".m4a",".webm",".mpeg",".mpga",".mp4",".mov"]),le=50*1024*1024,X=10;function fe(e){return e==="~"?V():e.startsWith("~/")?j(V(),e.slice(2)):e}function Ge(e,t){let n=[],i=[],d=new Set,r=[],o=(()=>{try{return G(j(t))}catch{return j(t)}})(),p=o.endsWith("/")?o:o+"/";for(let a of e){let c=fe(a),g=pe(c)?c:j(t,c);if(!ce(g)){n.push(`Not found: ${a}`);continue}let m;try{m=G(g)}catch{n.push(`Cannot resolve: ${a}`);continue}if(d.has(m))continue;let h;try{h=ae(m)}catch{n.push(`Cannot read: ${a}`);continue}if(!h.isFile()){n.push(`Not a file: ${a}`);continue}if(h.size===0){n.push(`Empty file: ${a}`);continue}let b=ue(m).toLowerCase();if(!de.has(b)){n.push(`Unsupported type ${b||"(none)"}: ${a}`);continue}if(h.size>le){n.push(`Too large (>50MB): ${a}`);continue}m!==o&&!m.startsWith(p)&&i.push(`Outside working dir: ${a}`),d.add(m),r.push(m)}return r.length>X&&n.push(`Too many files: ${r.length} (max ${X})`),{ok:n.length?[]:r,errors:n,warnings:i}}var B=class extends Error{constructor(n){super(n.join("; "));this.errors=n;this.name="AttachmentValidationError"}};async function Xe(e){let{promptText:t,filePaths:n,cwd:i,scenarios:d,isRefine:r,conn:o,deps:p}=e,{ok:a,errors:c,warnings:g}=p.validate(n,i);if(c.length)throw new B(c);e.onValidated?.();let m=a.length?await p.upload(o,a,p.onUpload):[],h=r?p.buildMappings(t,d):void 0;return{promptText:t,mappings:h,attachments:m,warnings:g}}import{readFile as me}from"fs/promises";import{basename as K}from"path";async function ge(e){let t=await e.authResolver.resolve();if(!t)throw new v("unauthorized; run `kane-cli login`");return E(t.username,t.access_key)}async function he(e,t,n={}){let i=n.fetchImpl??fetch,d=await me(t),r=K(t),o=new FormData;o.append("file",new Blob([d]),r),o.append("source","omniBox"),o.append("geminiFileUpload","true");let p=await i(`${e.tmsBaseUrl}/v1/attachment`,{method:"POST",headers:{Authorization:await ge(e)},body:o,signal:n.signal});if(!p.ok){let h;try{h=await p.clone().json()}catch{}throw x(p.status,h)}let a=await p.json(),c=a?.data??a,g=c?.gemini_response?.uri,m=c?.gemini_response?.mimeType;if(!c?.file_key||!g){let h=c&&typeof c=="object"?Object.keys(c).join(","):typeof c,b=(()=>{try{return JSON.stringify(c).slice(0,500)}catch{return"<unserializable>"}})();throw new Error(`attachment upload for ${r} returned no file_key/gemini uri \u2014 status ${p.status}, body keys: [${h}], raw: ${b}`)}return{fileName:c.file_name??r,fileKey:c.file_key,geminiUri:g,mimeType:m??"application/octet-stream"}}async function tt(e,t,n,i={}){let d=[];for(let r=0;r<t.length;r++){if(i.signal?.aborted)throw Object.assign(new Error("upload aborted"),{name:"AbortError"});let o=K(t[r]);n?.({file:o,index:r+1,total:t.length,status:"uploading"});try{d.push(await he(e,t[r],i)),n?.({file:o,index:r+1,total:t.length,status:"done"})}catch(p){throw n?.({file:o,index:r+1,total:t.length,status:"failed"}),p}}return d}var ye=/@([sS])(\d+)\.([cC])(\d+)/g,be=/@([sS])(\d+)(?!\d)(?!\.[cC]\d)/g;function rt(e,t){let n={},i={};for(let d of e.matchAll(ye)){let r=Number(d[2]),o=Number(d[4]),p=t[r-1];if(!p)continue;n[`s${r}`]=String(p.id);let a=p.test_cases??[];if(a[o-1])for(let c=0;c<o;c++){let g=a[c];g&&(i[`s${r}.c${c+1}`]=String(g.id))}}for(let d of e.matchAll(be)){let r=Number(d[2]),o=t[r-1];o&&(n[`s${r}`]=String(o.id))}if(!(Object.keys(n).length===0&&Object.keys(i).length===0))return{scenario:n,testcase:i}}function R(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(n==null||typeof n!="object")return[];let i=n;if(typeof i.step!="string")return[];let d=typeof i.expected_result=="string"?i.expected_result:typeof i.outcome=="string"?i.outcome:"";t.push({step:i.step,expected:d})}return t}var we=30,Se=300;function Z(){return{mode:"testing",max_steps:we,timeout:Se,variables:{}}}function Q(e){return e.title??`Test case ${e.id}`}function ct(e,t){return $({frontmatter:Z(),heading:Q(t),steps:e.sub_objectives.map(n=>n.objective)})}function Y(e){let t=R(e.manual_steps).map(n=>n.step);return $({frontmatter:Z(),heading:Q(e),steps:t})}import{mkdtempSync as xe,mkdirSync as N,writeFileSync as ee,rmSync as te,renameSync as _e,existsSync as ne,readFileSync as ve}from"fs";import{join as _,resolve as ke}from"path";async function ft(e,t,n,i=Y){(n.redirectBareCwd??!0)&&ke(t)===process.cwd()&&(t=_(t,".testmuai","tests"));let d=T(e.objective)??e.headline,r=T(n.suiteName)??`${T(re(d,4))??"tcg"}-${e.requestId}`,o=r,p=_(t,r);ne(p)&&!Te(p,e.requestId)&&(o=`${r}-${e.requestId}`);let a=_(t,o),c=[],g=new Map;for(let h of e.scenarios){let b=(h.test_cases??[]).filter(Ae);if(b.length===0)continue;let w=T(Ee(h.scode))??T(h.sid)??`s${h.id}`,s=g.get(w)??new Set;g.set(w,s);for(let f of b){let u=T(re(f.title,5))??"case",l=`${u}_test.md`;for(let y=2;s.has(l);y++)l=`${u}-${y}_test.md`;s.add(l),c.push({dir:w,file:l,tc:f})}}if(c.length===0)return{suiteDir:a,paths:[],warning:"no functional test cases generated"};N(t,{recursive:!0});let m=xe(_(t,".tcg-tmp-"));try{N(_(m,"helpers"),{recursive:!0}),ee(_(m,".tcg-suite.json"),JSON.stringify({requestId:e.requestId,suiteName:o}));let h=[],b=new Set;for(let s of c){let f=_(m,s.dir);b.has(f)||(N(f,{recursive:!0}),b.add(f));let u=_(f,s.file);ee(u,i(s.tc)),h.push(u)}ne(a)&&te(a,{recursive:!0,force:!0}),_e(m,a);let w=h.map(s=>s.replace(m,a));return{suiteDir:a,paths:w}}catch(h){try{te(m,{recursive:!0,force:!0})}catch{}throw h}}function Ae(e){return(e.category??"").trim().toLowerCase()==="functional"}function Te(e,t){try{return JSON.parse(ve(_(e,".tcg-suite.json"),"utf-8"))?.requestId===t}catch{return!1}}function T(e){return e&&e.length>0?e:void 0}function re(e,t){return e?e.toLowerCase().replace(/[^a-z0-9]+/g," ").trim().split(/\s+/).filter(Boolean).slice(0,t).join("-"):""}function Ee(e){return e?e.replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^-+|-+$/g,""):""}function ht(e){let t=[];e.title&&t.push(e.title),e.description&&t.push("",e.description);let n=R(e.manual_steps);return n.length>0&&(t.push("","Steps:"),n.forEach((i,d)=>{t.push(`${d+1}. ${i.step}`)})),t.join(`
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as n}from"./chunk-NLCCBXXV.js";import{a as r}from"./chunk-RZ4F3BHX.js";var i={attempts:3,backoffMs:[250,750]},o=class extends n{constructor(e,t){super(e,t)}headers(){return{Authorization:this.authHeader,"Content-Type":"application/json"}}async getTmsCredentials(){let e=await r(`${this.baseUrl}/auth/tms-credentials`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credential exchange failed: ${e.status} ${await e.text()}`);return await e.json()}async getPresignedUrls(e,t,s){let a=await r(`${this.baseUrl}/upload/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({test_id:e,session_id:t,files:s})});if(!a.ok)throw new Error(`Presign request failed: ${a.status} ${await a.text()}`);return await a.json()}async getScreenshotSas(){let e=await r(`${this.baseUrl}/upload/screenshot-sas`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Screenshot SAS request failed: ${e.status} ${await e.text()}`);return await e.json()}async resolveMobileDepsBundle(e){let t=await r(`${this.baseUrl}/mobile-deps/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({cli_version:e.cliVersion,os:e.os,arch:e.arch,device_class:e.deviceClass})});if(!t.ok)throw new Error(`Mobile deps resolve failed: ${t.status} ${await t.text()}`);let s=await t.json();return{bundleVersion:s.bundle_version,url:s.url,sha256:s.sha256,bytes:s.bytes}}async getMobileDeviceCatalog(e="android"){let t=`${this.baseUrl}/mobile/devices${e==="ios"?"?platform=ios":""}`,s=await r(t,{method:"GET",headers:this.headers(),retry:i});if(!s.ok)throw new Error(`Device catalog request failed: ${s.status} ${await s.text()}`);return await s.json()}async getCreditBalance(){let e=await r(`${this.baseUrl}/credits/balance`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credit balance request failed: ${e.status} ${await e.text()}`);return await e.json()}};export{o as a};
2
+ import{a as n}from"./chunk-3G2LSTK5.js";import{a as r}from"./chunk-RZ4F3BHX.js";var i={attempts:3,backoffMs:[250,750]},o=class extends n{constructor(e,t){super(e,t)}headers(){return{Authorization:this.authHeader,"Content-Type":"application/json"}}async getTmsCredentials(){let e=await r(`${this.baseUrl}/auth/tms-credentials`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credential exchange failed: ${e.status} ${await e.text()}`);return await e.json()}async getPresignedUrls(e,t,s){let a=await r(`${this.baseUrl}/upload/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({test_id:e,session_id:t,files:s})});if(!a.ok)throw new Error(`Presign request failed: ${a.status} ${await a.text()}`);return await a.json()}async getScreenshotSas(){let e=await r(`${this.baseUrl}/upload/screenshot-sas`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Screenshot SAS request failed: ${e.status} ${await e.text()}`);return await e.json()}async resolveMobileDepsBundle(e){let t=await r(`${this.baseUrl}/mobile-deps/presign`,{method:"POST",headers:this.headers(),body:JSON.stringify({cli_version:e.cliVersion,os:e.os,arch:e.arch,device_class:e.deviceClass})});if(!t.ok)throw new Error(`Mobile deps resolve failed: ${t.status} ${await t.text()}`);let s=await t.json();return{bundleVersion:s.bundle_version,url:s.url,sha256:s.sha256,bytes:s.bytes}}async getMobileDeviceCatalog(e="android"){let t=`${this.baseUrl}/mobile/devices${e==="ios"?"?platform=ios":""}`,s=await r(t,{method:"GET",headers:this.headers(),retry:i});if(!s.ok)throw new Error(`Device catalog request failed: ${s.status} ${await s.text()}`);return await s.json()}async getCreditBalance(){let e=await r(`${this.baseUrl}/credits/balance`,{method:"GET",headers:this.headers(),retry:i});if(!e.ok)throw new Error(`Credit balance request failed: ${e.status} ${await e.text()}`);return await e.json()}};export{o as a};
@@ -0,0 +1,9 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{I as se,J as oe,L as R,M as E,N as ae,Na as k,a as ie,r as A}from"./chunk-UEE3RZN4.js";import{f as x,h as re}from"./chunk-KU3YHPWZ.js";import{a as J,d as X,h as B,i as Y,j as Q,k as V,l as Z,m as ee,n as te,o as F,p as ne}from"./chunk-PUVMC4PX.js";import{d as P}from"./chunk-B7ZX5HEN.js";import{existsSync as D,readFileSync as I,renameSync as $e,writeFileSync as Ee}from"fs";import{dirname as q,isAbsolute as T,resolve as N}from"path";var ve=new Set(["inline","testmd","testrun"]),ye=new Set(["inferred","authored","runtime-derived"]),C=new Set(["passed","failed","broken","skipped"]);function ce(t,e,n){if(n.facts.length===0)return{record:null,errors:[{code:"EMPTY_EXECUTIONS",detail:"a run with no designed units attaches no facts \u2014 skip the call"}]};let a=e;for(let s=0;;s++){let o=t.head(),c=t.serialize(o);if(!t.sameToken(t.parse(a.latestHash),o)){if(s>=3)return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(a.latestHash)} but chain head is ${String(c)} \u2014 retry budget exhausted`}]};a=E(t);continue}let d=be(t,a,n);if(d!=="cas")return d;if(s>=3)return{record:null,errors:[{code:"STALE_BASIS",detail:"concurrent appends kept moving the head \u2014 retry budget exhausted"}]};a=E(t)}}function de(t,e){return ve.has(t.mode)?C.has(t.verdict)?ye.has(t.oracle_mode)?typeof t.drift_flag!="boolean"||typeof t.stale_at_run!="boolean"?[{code:"MISSING_FIELD",detail:`${e}: drift_flag and stale_at_run are required booleans`}]:!t.execution_id||!t.started_at||!t.definition_id_at_run?[{code:"MISSING_FIELD",detail:`${e}: execution_id, started_at and definition_id_at_run are required`}]:[]:[{code:"BAD_ORACLE_MODE",detail:`${e}: oracle_mode '${t.oracle_mode}' not in inferred|authored|runtime-derived`}]:[{code:"BAD_VERDICT",detail:`${e}: verdict '${t.verdict}' not in ${[...C].join("|")}`}]:[{code:"BAD_MODE",detail:`${e}: mode '${t.mode}' not in inline|testmd|testrun`}]}function ue(t,e,n,a){return{about:e,definition_id_at_run:t.definition_id_at_run,verdict:t.verdict,...n&&n.length?{per_ac:n}:{},drift_flag:t.drift_flag,oracle_mode:t.oracle_mode,stale_at_run:t.stale_at_run,...a.length?{unresolved_acs:a}:{},execution_id:t.execution_id,...t.evidence_id?{evidence_id:t.evidence_id}:{},...t.duration_ms!==void 0?{duration_ms:t.duration_ms}:{},started_at:t.started_at,mode:t.mode,local:t.local,...t.via_parent?{via_parent:t.via_parent}:{}}}function pe(t,e,n={}){if(!Array.isArray(e.facts)||e.facts.length===0)return{record:null,errors:[{code:"EMPTY_EXECUTIONS",detail:"parked line carries no facts"}]};for(let a=0;;a++){let s=E(t),o=e.facts.filter(r=>s.appliedEvents.has(r.event_id)).map(r=>r.event_id),c=e.facts.filter(r=>!s.appliedEvents.has(r.event_id));if(c.length===0)return{record:null,errors:null,applied:[],skipped:o,rejected:[]};let d=[],u=[],l=[],h=[];for(let r of c){let i=`executions[${r.ref}]`,f=[];if(!r.about_cid||!s.hasNode(r.about_cid))f.push({code:"UNKNOWN_REF",detail:`${i}: about_cid '${String(r.about_cid)}' is not in the graph \u2014 the pinned run-time target is gone`});else if(s.nodeLabel.get(r.about_cid)!==x.TEST)f.push({code:"ILLEGAL_TARGET",detail:`${i}: execution facts attach to tests \u2014 '${r.about_cid}' is a ${s.nodeLabel.get(r.about_cid)}`});else if(!r.event_id)f.push({code:"MISSING_FIELD",detail:`${i}: parked facts require event_id`});else{f.push(...de(r,i));for(let g of r.per_ac??[])C.has(g.verdict)||f.push({code:"BAD_VERDICT",detail:`${i}.per_ac['${g.ac_ref}']: verdict '${g.verdict}'`})}if(f.length>0){d.push({event_id:r.event_id??"",errors:f});continue}let p=[],m=[],v=[...r.unresolved_acs??[]];for(let g of r.per_ac??[]){let $=g.ac_cid&&s.hasNode(g.ac_cid)&&s.nodeLabel.get(g.ac_cid)===x.AC?g.ac_cid:null,y=$?null:s.resolve(g.ac_ref),_=$??(y?s.tipOf(y.cid):null);if(!_||!$&&(s.superseded.has(_)||s.nodeLabel.get(_)!==x.AC)){v.push(g.ac_ref);continue}p.push({ac_ref:s.nameOf.get(_)??g.ac_ref,ac_cid:_,verdict:g.verdict}),m.push(_)}u.push(ue(r,r.about_cid,p,v)),h.push({about_cid:r.about_cid,per_ac:m}),l.push(r.event_id)}if(u.length===0)return{record:null,errors:null,applied:[],skipped:o,rejected:d};try{let r=R(t,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:[],supersessions:[],executions:u,event_ids:[...l].sort(),source_head_moves:{}},{returnWarnings:!0,graph:s,expectPrev:s.latestHash,intent:{v:1,verb:"parked",args:A({line:e}),pins:{facts:h}},busyRetry:{deadlineMs:5e3},provenance:n.provenance});return{record:r.record,errors:null,applied:l,skipped:o,rejected:d,...r.warnings?{warnings:r.warnings}:{}}}catch(r){if(!(r instanceof k))throw r;if(a>=3)return{record:null,errors:[{code:"STALE_BASIS",detail:"concurrent appends kept moving the head \u2014 parked replay retry budget exhausted (line stays queued)"}]}}}}function be(t,e,n){let a=[],s=[],o=[];for(let d of n.facts){let u=`executions[${d.ref}]`,l=n.pinned?null:e.resolve(d.ref),h=n.pinned?d.about_cid&&e.hasNode(d.about_cid)?d.about_cid:null:l?e.tipOf(l.cid):null;if(!h||!n.pinned&&e.superseded.has(h)){a.push({code:"UNKNOWN_REF",detail:`${u}: '${n.pinned?String(d.about_cid):d.ref}' is not a ${n.pinned?"":"live "}committed node`});continue}if(e.nodeLabel.get(h)!==x.TEST){a.push({code:"ILLEGAL_TARGET",detail:`${u}: execution facts attach to tests \u2014 '${d.ref}' is a ${e.nodeLabel.get(h)}`});continue}let r=de(d,u);if(r.length>0){a.push(...r);continue}let i=[],f=[];for(let p of d.per_ac??[]){let m=n.pinned?null:e.resolve(p.ac_ref),v=n.pinned?p.ac_cid&&e.hasNode(p.ac_cid)?p.ac_cid:null:m?e.tipOf(m.cid):null;if(!v||!n.pinned&&e.superseded.has(v)||e.nodeLabel.get(v)!==x.AC){a.push({code:"UNKNOWN_REF",detail:`${u}.per_ac: '${n.pinned?String(p.ac_cid):p.ac_ref}' is not a${n.pinned?"n":" live"} AC`});continue}if(!C.has(p.verdict)){a.push({code:"BAD_VERDICT",detail:`${u}.per_ac['${p.ac_ref}']: verdict '${p.verdict}'`});continue}i.push({ac_ref:e.nameOf.get(v)??v,ac_cid:v,verdict:p.verdict}),f.push(v)}s.push(ue(d,h,i,d.unresolved_acs??[])),o.push({about_cid:h,per_ac:f})}if(a.length>0)return{record:null,errors:a};let c;try{c=R(t,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:[],supersessions:[],executions:s,...n.eventIds&&n.eventIds.length>0?{event_ids:n.eventIds}:{},source_head_moves:{}},{returnWarnings:!0,graph:e,expectPrev:e.latestHash,intent:{v:1,verb:"execution",args:A({facts:n.facts,by:n.by,eventIds:n.eventIds??null}),pins:{facts:o}},busyRetry:{deadlineMs:n.lockDeadlineMs??5e3},provenance:n.provenance})}catch(d){if(d instanceof k)return"cas";throw d}return{record:c.record,errors:null,...c.warnings?{warnings:c.warnings}:{}}}function Ye(t){let e={failed:3,broken:2,skipped:1,passed:0},n=new Map;for(let a of t)for(let s of a.verifies??[]){let o=n.get(s);(o===void 0||(e[a.status]??0)>(e[o]??0))&&n.set(s,a.status)}return[...n.entries()].map(([a,s])=>({ref:a,verdict:s}))}function Qe(t){let e=[],{store:n}=t;if(!n.exists())return{synced:0,superseded:0,skipped:"no-context",warnings:e};let a=t.by??{kind:"ai",id:"exec-sync"},s=t.lockDeadlineMs;try{Se(n,e,s)}catch(i){e.push(`sync: parked-facts replay failed (${i instanceof Error?i.message:String(i)}) \u2014 queue intact, retrying next sync`)}let o=E(n),c=[],d=0,u=new Set,l=new Set(t.members.map(i=>T(i.path)?i.path:N(t.projectDir,i.path))),h=new Map;for(let i of t.members){let f=T(i.path)?i.path:N(t.projectDir,i.path);if(!D(f)){e.push(`sync: member file missing: ${f} \u2014 skipped, no fact attached`);continue}for(let p of xe(f,e))if(!u.has(p.path))try{let m=p.path===f,v=!m&&l.has(p.path),g=m?void 0:F(I(f,"utf8"))?.id,$=I(p.path,"utf8"),y=F($);if(!y?.id){u.add(p.path);continue}let _=o.resolve(y.id),S=_?o.tipOf(_.cid):null;if(!_||!S||o.superseded.has(S)){u.add(p.path),e.push(`sync: ${y.id} does not resolve to a live test \u2014 skipped (foreign store?)`);continue}let L=B(V($,ee(q(p.path),o))),_e=String(o.getNode(S)?.content.test_md_blob??""),j=B(V(_e,Z(o))),G=o.getNode(S)?.content.definitionId,M=typeof G=="string"?G:j,w=!1,O=S;if(L===j)y.base!==M&&he(p.path,$,M,e);else if(y.base===j||y.base===M){let b=Ie(n,o,S,$,L,q(p.path),a);b.error?(e.push(`sync: could not supersede ${y.id}: ${b.error}`),w=!0):(d++,O=b.newCid,w=b.oracleTier,he(p.path,I(p.path,"utf8"),L,e),o=E(n))}else w=!0,e.push(y.base?`sync: ${y.id} was edited from an older version \u2014 graph kept; reconcile via a redesign or maintain`:`sync: ${y.id} carries no base pin (hand-copied file?) \u2014 fact attached with drift flag`);if(v){w&&h.set(p.path,!0);continue}u.add(p.path);let H=o.getNode(O)?.content.check,W=m?i.acs??[]:[],U=W.filter(b=>fe(o,b.ref)),z=W.filter(b=>!fe(o,b.ref)).map(b=>b.ref);c.push({ref:y.id,about_cid:O,definition_id_at_run:L,verdict:i.verdict,...U.length?{per_ac:U.map(b=>{let K=ge(o,b.ref);return{ac_ref:b.ref,...K?{ac_cid:K}:{},verdict:b.verdict}})}:{},drift_flag:w||h.get(p.path)===!0||m&&i.driftFlag===!0,oracle_mode:H?.expected_mode??(J(H?.operand)?"runtime-derived":"inferred"),stale_at_run:o.stale(O)!=="fresh",...z.length?{unresolved_acs:z}:{},execution_id:i.executionId,...i.evidenceId?{evidence_id:i.evidenceId}:{},...i.durationMs!==void 0?{duration_ms:i.durationMs}:{},started_at:i.startedAt,mode:i.mode,local:i.local,...g?{via_parent:g}:{}})}catch(m){p.path!==f&&l.has(p.path)||u.add(p.path),e.push(`sync: ${p.path} failed to sync (${m instanceof Error?m.message:String(m)}) \u2014 skipped; other members unaffected`)}}if(c.length===0)return{synced:0,superseded:d,warnings:e};let r;try{r=ce(n,E(n),{facts:c,by:a,eventIds:c.map(i=>`exec-fact:${i.execution_id}:${i.ref}`),lockDeadlineMs:s})}catch(i){return e.push(`sync facts: commit threw: ${i instanceof Error?i.message:String(i)}`),le(n,c,a,e,s),{synced:0,superseded:d,warnings:e}}return r.errors?(le(n,c,a,e,s),e.push(...r.errors.map(i=>`sync facts: ${i.code}: ${i.detail}`)),{synced:0,superseded:d,warnings:e}):(r.warnings&&e.push(...r.warnings.map(i=>`sync facts: ${i}`)),{synced:c.length,superseded:d,warnings:e})}function le(t,e,n,a,s){try{let o={by:n,ts:new Date().toISOString(),facts:e.map(u=>({...u,about_cid:u.about_cid??"",event_id:`exec-fact:${u.execution_id}:${u.ref}`}))},{where:c,sideFile:d}=t.parkedFacts().park(JSON.stringify(o),{deadlineMs:s??5e3});d&&a.push(`sync facts: store lock busy \u2014 parked to ${c}; it drains on the next sync`),a.push(`sync facts: commit failed \u2014 ${e.length} fact(s) parked to ${c}; they replay on the next sync`)}catch(o){a.push(`sync facts: could not park the failed batch (${o instanceof Error?o.message:String(o)}) \u2014 this run's facts are LOST`)}}function Se(t,e,n){let a=t.parkedFacts(),s=n??5e3,o=a.snapshot({deadlineMs:s});if("fenced"in o){e.push(`sync: parked facts stay queued while rebase ${o.fenced} is open \u2014 they drain on the first sync after it is finished`);return}let c=o.lines;if(c.length===0)return;let d=new Set,u=[];for(let l of c){let h=null;try{let i=JSON.parse(l);i&&Array.isArray(i.facts)&&(h=i)}catch{}if(!h){u.push({parent:l,line:l}),d.add(l);continue}let r=pe(t,h);if(r.errors){if(r.errors.some(i=>i.code==="STALE_BASIS")){e.push(`sync: parked facts replay deferred (${r.errors[0].detail}) \u2014 retrying next sync`);continue}u.push({parent:l,line:l}),d.add(l),e.push(`sync: parked facts line quarantined to ${a.quarantinePath} (${r.errors.map(i=>`${i.code}: ${i.detail}`).join("; ")})`);continue}for(let i of r.rejected){let f=h.facts.find(p=>p.event_id===i.event_id);u.push({parent:l,line:JSON.stringify({...f??{event_id:i.event_id},_reason:i.errors})})}if(r.rejected.length>0){let i=r.rejected.map(f=>f.errors.map(p=>`${p.code}: ${p.detail}`).join("; ")).join(" | ");e.push(`sync: ${r.rejected.length} parked fact(s) quarantined to ${a.quarantinePath} (${i})`)}d.add(l),r.warnings&&e.push(...r.warnings.map(i=>`sync: ${i}`)),r.applied.length>0&&e.push(`sync: replayed ${r.applied.length} parked fact(s) from a previous run`)}if(d.size!==0)try{a.settle(d,u,{deadlineMs:s})}catch(l){e.push(`sync: queue rewrite failed (${l instanceof Error?l.message:String(l)}) \u2014 already-applied lines dedupe next sync; bad lines re-quarantine then`)}}function xe(t,e){let n=[],a=new Set,s=o=>{if(a.has(o)||!D(o))return;a.add(o);let c;try{c=I(o,"utf8")}catch(d){e.push(`sync: unreadable unit ${o} (${d instanceof Error?d.message:String(d)}) \u2014 skipped`);return}for(let d of c.split(`
3
+ `)){let u=/^@import\s+(\S+)\s*$/.exec(d.trim());if(!u)continue;let l=T(u[1])?u[1]:N(q(o),u[1]);if(!D(l))continue;let h;try{h=I(l,"utf8")}catch(r){e.push(`sync: unreadable import ${l} (${r instanceof Error?r.message:String(r)}) \u2014 skipped; importer continues`);continue}F(h)?.id&&s(l)}n.push({path:o})};return s(t),n}function fe(t,e){return ge(t,e)!==null}function ge(t,e){let n=ae(t,e);return n!==null&&t.nodeLabel.get(n)==="ac"?n:null}function ke(t,e,n,a){let s=t.split(`
4
+ `),o=Q(s),c={};return{blob:s.map((u,l)=>{let h=Y.exec(u.trim());if(!h||o.has(l))return u;let r=h[1];if(a&&r in a){let v=n.tipOf(a[r]);c[r]=v;let g=n.displayNameOf(v);return g?`@import ${g}`:u}let i=n.resolve(r);if(i)return c[r]=i.tip,u;if(e===null&&!T(r))return u;let f=T(r)?r:N(e,r);if(!D(f))return u;let p=F(I(f,"utf8"))?.id,m=p?n.resolve(p):null;return!p||!m?u:(c[r]=m.tip,`@import ${p}`)}).join(`
5
+ `),imports:c}}function Ie(t,e,n,a,s,o,c,d={}){let u=e.getNode(n);if(!u)return{oracleTier:!1,error:"tip unreadable"};let{blob:l,imports:h}=ke(ne(a),o,e,d.imports),r=String(u.content.test_md_blob??""),i=/^#\s+(.+?)\s*$/m.exec(l)?.[1]??String(u.content.title??""),f={...u.content,test_md_blob:l,definitionId:s,title:i};{let _=we(l);_.target!==void 0?f.target=_.target:delete f.target,_.app!==void 0?f.app=_.app:delete f.app}let p=re("test",f);if(p.length>0)return{oracleTier:!1,error:p.map(_=>_.detail).join("; ")};let m=ie("test",f);if(m===n)return{newCid:n,oracleTier:!1};let v=me(r)!==me(l);if(se(e,n,m))return{oracleTier:v,error:"file content reproduces an already-superseded version (supersession cycle guard) \u2014 graph kept; re-edit forward or redesign"};let g=oe({graph:e,oldTip:n,newCid:m,newLabel:"test",by:c,reason:`re-blessed onto ${m} (edited on disk, run sync)`});if(g.errors.length>0)return{oracleTier:v,error:`edge re-bless refused: ${g.errors.join("; ")}`};let $=t.head(),y=t.serialize($);if(!t.sameToken(t.parse(e.latestHash),$)){if(d.throwTransient)throw new k(`store advanced under the sync (basis ${String(e.latestHash)} vs head ${String(y)})`);return{oracleTier:v,error:`store advanced under the sync (basis ${String(e.latestHash)} vs head ${String(y)}) \u2014 re-run to retry`}}try{R(t,{ts:new Date().toISOString(),proposal_id:null,nodes:[{cid:m,label:"test",content:f}],edges:g.edges,review:[{id:m,kind:"review-item",resolution:"edited",edit:null,reason:"edited on disk (run sync)",by:c}],supersessions:[{kind:"node",old:n,new:m,reason:"edited on disk (run sync)",by:c},...g.supersessions],source_head_moves:{}},{graph:e,expectPrev:y,intent:{v:1,verb:"exec-supersede",args:A({tip:n,raw:a,fileId:s,by:c}),pins:{tip:n,imports:h}},provenance:d.provenance})}catch(_){if(d.throwTransient&&_ instanceof k)throw _;return{oracleTier:v,error:_ instanceof Error?_.message:String(_)}}return{newCid:m,oracleTier:v}}function we(t){let e=X(t);return{...typeof e.target=="string"?{target:e.target}:{},...typeof e.app=="string"?{app:e.app}:{}}}function me(t){let e=[],n=t.split(`
6
+ `),a=n.some(o=>/^##\s/.test(o)&&P.test(o)),s=!1;for(let o of n){if(/^##\s/.test(o)){let c=P.exec(o);s=a?c!==null:/\bassert\b/i.test(o),c&&e.push(`v:${c[1].trim()}`);continue}s&&o.trim()!==""&&e.push(o.trim())}return e.join(`
7
+ `)}var Fe=0;function he(t,e,n,a){try{let s=e.split(`
8
+ `),o=-1;if(s[0]?.trim()==="---"){for(let u=1;u<s.length;u++)if(s[u].trim()==="---"){o=u;break}}if(o<0)return;let c=te(s,o);if(!c)return;if(c.baseLine!==void 0){let u=s[c.baseLine].endsWith("\r")?"\r":"";s[c.baseLine]=`${c.childIndent}base: ${n}${c.baseComment?` ${c.baseComment}`:""}${u}`}else if(c.strayBase){a.push(`sync: ${t} has a base: line this scanner cannot confidently rewrite (unexpected indentation or key quoting) \u2014 pin refresh skipped (stale pin until the shape is fixed)`);return}else{let l=s[c.idLine??c.start].endsWith("\r")?"\r":"";s.splice((c.idLine??c.start)+1,0,`${c.childIndent??" "}base: ${n}${l}`)}let d=`${t}.tmp-sync.${process.pid}-${Fe++}`;Ee(d,s.join(`
9
+ `)),$e(d,t)}catch(s){a.push(`sync: pin refresh failed for ${t} (${s instanceof Error?s.message:String(s)}) \u2014 next run self-heals`)}}export{ce as a,pe as b,Ye as c,Qe as d,Ie as e};
@@ -0,0 +1,6 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ var A=(r=0)=>e=>`\x1B[${e+r}m`,y=(r=0)=>e=>`\x1B[${38+r};5;${e}m`,E=(r=0)=>(e,t,o)=>`\x1B[${38+r};2;${e};${t};${o}m`,l={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},H=Object.keys(l.modifier),_=Object.keys(l.color),j=Object.keys(l.bgColor),q=[..._,...j];function w(){let r=new Map;for(let[e,t]of Object.entries(l)){for(let[o,n]of Object.entries(t))l[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},t[o]=l[o],r.set(n[0],n[1]);Object.defineProperty(l,e,{value:t,enumerable:!1})}return Object.defineProperty(l,"codes",{value:r,enumerable:!1}),l.color.close="\x1B[39m",l.bgColor.close="\x1B[49m",l.color.ansi=A(),l.color.ansi256=y(),l.color.ansi16m=E(),l.bgColor.ansi=A(10),l.bgColor.ansi256=y(10),l.bgColor.ansi16m=E(10),Object.defineProperties(l,{rgbToAnsi256:{value(e,t,o){return e===t&&t===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(o/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[o]=t;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:e=>l.rgbToAnsi256(...l.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,o,n;if(e>=232)t=((e-232)*10+8)/255,o=t,n=t;else{e-=16;let R=e%36;t=Math.floor(e/36)/5,o=Math.floor(R/6)/5,n=R%6/5}let i=Math.max(t,o,n)*2;if(i===0)return 30;let u=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(t));return i===2&&(u+=60),u},enumerable:!1},rgbToAnsi:{value:(e,t,o)=>l.ansi256ToAnsi(l.rgbToAnsi256(e,t,o)),enumerable:!1},hexToAnsi:{value:e=>l.ansi256ToAnsi(l.hexToAnsi256(e)),enumerable:!1}}),l}var L=w(),a=L;import p from"process";import P from"os";import N from"tty";function c(r,e=globalThis.Deno?globalThis.Deno.args:p.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",o=e.indexOf(t+r),n=e.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:s}=p,d;c("no-color")||c("no-colors")||c("color=false")||c("color=never")?d=0:(c("color")||c("colors")||c("color=true")||c("color=always"))&&(d=1);function k(){if("FORCE_COLOR"in s)return s.FORCE_COLOR==="true"?1:s.FORCE_COLOR==="false"?0:s.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(s.FORCE_COLOR,10),3)}function G(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function Y(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let o=k();o!==void 0&&(d=o);let n=t?d:o;if(n===0)return 0;if(t){if(c("color=16m")||c("color=full")||c("color=truecolor"))return 3;if(c("color=256"))return 2}if("TF_BUILD"in s&&"AGENT_NAME"in s)return 1;if(r&&!e&&n===void 0)return 0;let i=n||0;if(s.TERM==="dumb")return i;if(p.platform==="win32"){let u=P.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in s)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(u=>u in s)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(u=>u in s)||s.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if(s.COLORTERM==="truecolor"||s.TERM==="xterm-kitty"||s.TERM==="xterm-ghostty"||s.TERM==="wezterm")return 3;if("TERM_PROGRAM"in s){let u=Number.parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:i}function x(r,e={}){let t=Y(r,{streamIsTTY:r&&r.isTTY,...e});return G(t)}var $={stdout:x({isTTY:N.isatty(1)}),stderr:x({isTTY:N.isatty(2)})},v=$;function B(r,e,t){let o=r.indexOf(e);if(o===-1)return r;let n=e.length,i=0,u="";do u+=r.slice(i,o)+e+t,i=o+n,o=r.indexOf(e,i);while(o!==-1);return u+=r.slice(i),u}function M(r,e,t,o){let n=0,i="";do{let u=r[o-1]==="\r";i+=r.slice(n,u?o-1:o)+e+(u?`\r
3
+ `:`
4
+ `)+t,n=o+1,o=r.indexOf(`
5
+ `,n)}while(o!==-1);return i+=r.slice(n),i}var{stdout:I,stderr:S}=v,O=Symbol("GENERATOR"),f=Symbol("STYLER"),h=Symbol("IS_EMPTY"),F=["ansi","ansi","ansi256","ansi16m"],b=Object.create(null),D=(r,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=I?I.level:0;r.level=e.level===void 0?t:e.level};var U=r=>{let e=(...t)=>t.join(" ");return D(e,r),Object.setPrototypeOf(e,m.prototype),e};function m(r){return U(r)}Object.setPrototypeOf(m.prototype,Function.prototype);for(let[r,e]of Object.entries(a))b[r]={get(){let t=g(this,C(e.open,e.close,this[f]),this[h]);return Object.defineProperty(this,r,{value:t}),t}};b.visible={get(){let r=g(this,this[f],!0);return Object.defineProperty(this,"visible",{value:r}),r}};var T=(r,e,t,...o)=>r==="rgb"?e==="ansi16m"?a[t].ansi16m(...o):e==="ansi256"?a[t].ansi256(a.rgbToAnsi256(...o)):a[t].ansi(a.rgbToAnsi(...o)):r==="hex"?T("rgb",e,t,...a.hexToRgb(...o)):a[t][r](...o),V=["rgb","hex","ansi256"];for(let r of V){b[r]={get(){let{level:t}=this;return function(...o){let n=C(T(r,F[t],"color",...o),a.color.close,this[f]);return g(this,n,this[h])}}};let e="bg"+r[0].toUpperCase()+r.slice(1);b[e]={get(){let{level:t}=this;return function(...o){let n=C(T(r,F[t],"bgColor",...o),a.bgColor.close,this[f]);return g(this,n,this[h])}}}}var K=Object.defineProperties(()=>{},{...b,level:{enumerable:!0,get(){return this[O].level},set(r){this[O].level=r}}}),C=(r,e,t)=>{let o,n;return t===void 0?(o=r,n=e):(o=t.openAll+r,n=e+t.closeAll),{open:r,close:e,openAll:o,closeAll:n,parent:t}},g=(r,e,t)=>{let o=(...n)=>W(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,K),o[O]=r,o[f]=e,o[h]=t,o},W=(r,e)=>{if(r.level<=0||!e)return r[h]?"":e;let t=r[f];if(t===void 0)return e;let{openAll:o,closeAll:n}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=B(e,t.close,t.open),t=t.parent;let i=e.indexOf(`
6
+ `);return i!==-1&&(e=M(e,n,o,i)),o+e+n};Object.defineProperties(m.prototype,b);var z=m(),le=m({level:S?S.level:0});var se=z;export{se as a};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as ke,b as we,c as H,d as b,m as N,n as J,o as _e,p as be}from"./chunk-OFSDB7B4.js";import{a as ye}from"./chunk-RTVWQK7I.js";import{b as pe,c as fe,e as ge}from"./chunk-HAW5WEKT.js";import{a as me}from"./chunk-VZJ6LUXX.js";import{n as ve}from"./chunk-35ECWCCK.js";import{b as he}from"./chunk-IZ65ZPWY.js";import{M as D}from"./chunk-UEE3RZN4.js";import{e as K}from"./chunk-HHW6MRU3.js";import{m as ue}from"./chunk-4I7YN6YY.js";var Ce=4;function He(t){return{ucRef:t.key,force:t.kind==="evolve",verb:t.kind}}function L(t,o,C){for(let{sid:R}of t.sessions().list()){if(C&&!C(R))continue;let p;try{p=t.sessions().peek(R)}catch{continue}if(!p?.reconcile||K(p,new Date)||(H(t,p.reconcile),b(t,p.reconcile.proposal_id).resolved))continue;let A=p.change_basis?.source_id??Object.keys(p.read_basis)[0]??"";if(!(o!==void 0&&A!==o))return{sid:p.sid,proposalId:p.reconcile.proposal_id,source:A,...p.change_basis?{changeBasis:{source_id:p.change_basis.source_id,to_cid:p.change_basis.new_head}}:{}}}return null}function V(t,o,C){let R=[];for(let{sid:p}of t.sessions().list()){if(C&&!C(p))continue;let h;try{h=t.sessions().peek(p)}catch{continue}if(!h?.reconcile||K(h,new Date))continue;let A=h.change_basis?.source_id??Object.keys(h.read_basis)[0]??"";o!==void 0&&A!==o||(H(t,h.reconcile),R.push(h.reconcile.proposal_id))}return R}var xe=80;function Pe(t){return{kind:t.kind,ref:t.display,title:t.kind==="ADD"?t.title:`${t.display} \xB7 ${t.title}`,why:t.changeLine,origin:"content-change",...t.tier!==void 0?{tier:t.tier}:{},...t.diffSummary==null&&t.diff.length>0?{diff:t.diff}:{},...t.diffSummary!=null?{diffSummary:t.diffSummary,viewDiff:!0}:{},...t.cites.length>0?{citeLines:t.cites.map(o=>`cite ${o.source_id??"conversation"} ${o.anchor} \u2014 "${o.quote.slice(0,xe)}"`)}:{},...t.impact?{impact:{stale_refs:Array(t.impact.stale).fill("\xB7"),...t.impact.direct.length>0?{direct_refs:t.impact.direct}:{}}}:{}}}function Ne(t){let o=t.store,C=t.changeSince?{since:t.changeSince}:{},R=he(),p=t.by??{kind:"human",id:"owner"},h=n=>t.emit?.(n),A=t.emitWalkSignal??((n,e,r)=>o.signals().append({ts:new Date().toISOString(),command:"reconcile-walk",id:n,verdict:e,polarity:"preference",by:p,target:n,...r!==void 0?{reason:r}:{}})),j=new Set(t.sessionId?[t.sessionId]:[]),y=t.sessionId?n=>j.has(n)||[...t.children?.()??[]].includes(n):void 0,g=o.proposals(),k=t.changeContext?.source_id,$=new Map;t.changeContext&&$.set(t.changeContext.source_id,t.changeContext.old_head);let Re=n=>{let e=$.get(n);if(e)return e;try{let r=ge(o,n,C);return r&&$.set(n,r.old_head),r?.old_head}catch{return}},X=n=>{let e=g.read(n);if(!e)return[];let r=N(e,D(o)),s=b(o,n);return J(r,s.verdicts)},Z=new Set,Se=()=>{let n=D(o);for(let{sid:e}of o.sessions().list()){if(y&&!y(e))continue;let r;try{r=o.sessions().peek(e)}catch{continue}if(!r||K(r,new Date))continue;let s=(r.ingest_schedule??[]).filter(i=>{if(i.status!=="skipped"||!(i.note??"").includes("review"))return!1;let a=n.heads.get(i.source_id);return typeof a!="string"||!n.extractedSourceCids.has(a)?!0:(Z.has(i.source_id)||(Z.add(i.source_id),t.note?.(`the new version of ${i.source_id} that waited for review has been extracted since, so its changes are not read again`)),!1)});if(s.length>0)return{source:s[0].source_id,count:s.length}}return null},ee=async(n,e,r,s)=>{let i=await Y(r,(d,l)=>(d(n),G({resume:n,...s!==null?{message:s}:{},mode:W},l))),a=null;try{a=o.sessions().peek(n)}catch{a=null}if(a?.reconcile&&a.reconcile.proposal_id!==e)H(o,a.reconcile);else{let d=g.verdicts(e);d.steer&&(delete d.steer,g.saveVerdicts(e,d))}return i},W=t.ask?"interactive":"override",q=!1,_=null,M=null,B=null,te={paused:!0},ne=t.ask,re=ne?n=>q?Promise.resolve(te):new Promise((e,r)=>{B=()=>e(te),ne(n).then(e,r)}).finally(()=>{B=null}):void 0,G=async(n,e)=>{let[{runExtract:r},{runAgent:s},{resolveAgentAuthEnv:i},{preflightTurn:a}]=await Promise.all([import("./run-5RQUCNYP.js"),import("./bridge-T6QMYKED.js"),import("./spawner-C7NLLM4F.js"),import("./turn-preflight-LHYLRL7G.js")]),d=t.auth??await i(t.credentials),l=!1,c=!1;M=null;let u=t.parentLock?.()??null,S={...n,...t.changeSince?{changeSince:t.changeSince}:{}},Q=await r(u?{...S,underLock:u}:S,{...t.nested?{nested:!0}:{},...t.by?{by:t.by}:{},reviewsHeld:!0,...t.telemetry?{telemetry:t.telemetry}:{},...t.tracePath?{tracePath:t.tracePath}:{},...t.narrate?{narrate:t.narrate}:{},emit:f=>{f.type==="held"&&(c=!0),f.type==="error"&&(M={code:String(f.code??"ERROR"),message:String(f.message??"the run failed")});let m=me(f);m&&_===null&&(_=m);let P=f.type==="session_paused"?f.cause:void 0;P&&typeof P.code=="string"&&_===null&&(_={code:P.code,final:!1}),t.emit&&e(f)},agent:t.agent??s,store:o,credentials:t.credentials,onIngestRefusal:t.onIngestRefusal,preflightTurn:t.preflightTurn??(()=>a(d)),...t.probe?{probe:t.probe}:{},...t.matchUnreviewed?{matchUnreviewed:!0}:{},ask:re?async f=>{let m=await re(f);return!Array.isArray(m)&&"paused"in m&&(l=!0),m}:async f=>f.map(m=>({id:m.id,selected_index:m.recommended_index,free_text:null})),review:async f=>new Map(f.map(m=>[m.temp_ref,{resolution:"skipped"}])),confirmStale:async()=>!0,out:f=>t.note?.(f),progress:()=>{},isTTY:t.ask!==void 0,auth:d});return q=!1,Q!==3||c?Q:l?Ce:1},Y=async(n,e)=>{let r=null,s,i=[],a=u=>ye(u,{verb:"extract",...s!==void 0?{id:s}:{}}),d=u=>{r===null?i.push(u):t.emit?.(a(u))},l=u=>{r=Date.now(),s=u,h({type:"child_start",child:"extract",subject:n,...u?{session_id:u}:{}});for(let S of i.splice(0))t.emit?.(a(S))},c=1;try{return c=await e(l,d),c}finally{if(r!==null){let u=Math.round((Date.now()-r)/1e3);h({type:"child_end",child:"extract",ok:c===0||c===3||c===Ce,dur_s:u,exit_code:c})}else for(let u of i.splice(0))t.emit?.(a(u))}},ie=async n=>{let e=null;try{e=o.sessions().peek(n)}catch{return}if(!e?.reconcile?.pending)return;let r;try{r=o.sessions().resume(n)}catch{return}try{let s=r.state.reconcile;if(!s?.pending)return;let i=g.read(s.proposal_id);if(i){let[{extractProtocolCtx:l},{landHoldPassthrough:c}]=await Promise.all([import("./run-5RQUCNYP.js"),import("./hold-passthrough-IOWPVB4W.js")]);if(!(await c({store:o,ctx:l(o,n,t.credentials,{probe:t.probe,runAuth:t.auth,similarity:R}),graph:D(o),sid:n,proposalId:s.proposal_id,proposal:i,by:p,durable:!0,...t.matchUnreviewed?{matchUnreviewed:!0}:{}})).ok)return}let{pending:a,...d}=s;r.save({reconcile:d})}finally{r.release()}},De=async(n,e)=>{let r=null;try{r=o.sessions().peek(e)}catch{r=null}if(!r)return F.startReview(n);if(o.sessions().isLive(e))return t.note?.(`session ${e} is running \u2014 it is not resumed here`),_={code:"SESSION_LOCKED",final:!1},2;if(r.reconcile?.pending&&await ie(e),r.reconcile&&g.read(r.reconcile.proposal_id)){let s=g.verdicts(r.reconcile.proposal_id).steer;if(!s)return 3;j.add(e);let i=(r.checkpoint?.seq??0)>s.seq;return ee(e,r.reconcile.proposal_id,n,i?null:s.text)}if(ve(r,o.sessions().hasBase(e))){try{o.sessions().resume(e).complete({ended:"failed",code:"SESSION_KEPT_NOTHING"})}catch{}return F.startReview(n)}return j.add(e),Y(n,(s,i)=>(s(e),G({resume:e,mode:W},i)))},se=n=>{if(o.sessions().isLive(n))return!1;let e=null;try{e=o.sessions().peek(n)}catch{e=null}return!e?.checkpoint&&!o.sessions().hasBase(n)&&o.sessions().appliedEvents(n).length===0},F={lastReadError(){return M},pending(){let n=L(o,k,y);if(n){let r=X(n.proposalId).length;return r>0?{source:n.source,count:r,kind:"cards"}:null}let e=Se();return e?{source:e.source,count:e.count,kind:"needs-run"}:null},loadCards(){let n=L(o,k,y);if(!n)return[];let e=X(n.proposalId),r=e.filter(d=>d.kind==="ADD"||d.ref!=null),s=e.filter(d=>d.kind!=="ADD"&&d.ref==null);for(let d of s)t.note?.(`dropped: [${d.kind}] ${d.title} \u2014 its target was retired while the review was open; nothing lands`);let i=g.verdicts(n.proposalId),a=r.map(d=>{let l=we(i.verdicts[d.key]);return l==="another session"&&t.note?.(`saving: [${d.kind}] ${d.title} \u2014 another session is saving its verdict; it comes back here if that save does not land`),{key:d.key,card:Pe(d),viewLines:d.diff,...l?{saving:l}:{}}});return h({type:"review_cards",source:n.source,cards:a.map(d=>({key:d.key,card:d.card})),dropped:s.map(d=>({kind:d.kind,title:d.title}))}),a},async applyVerdict(n,e,r){let s=L(o,k,y);s&&await ie(s.sid);let i=L(o,k,y),a=(v,ae)=>{let le=i?.source??k;return h({type:"card_refused",...le?{source:le}:{},key:n,verdict:e,code:v,refusal:ae}),{ok:!1,refusal:ae,code:v}};if(!i)return a("HOLD_GONE","the held changeset is gone \u2014 nothing to verdict");let d=g.read(i.proposalId);if(!d)return a("PROPOSAL_UNREADABLE",ue().text("PROPOSAL_UNREADABLE",{proposal:i.proposalId}));if(n in b(o,i.proposalId).verdicts)return a("ALREADY_VERDICTED","that change was already verdicted (another surface?) \u2014 refresh the review");let l=D(o),c=N(d,l).find(v=>v.key===n);if(!c)return a("CARD_GONE","that change no longer builds a card \u2014 the set may have moved; re-open the review");let u=Re(i.source),S=i.changeBasis?{source_id:i.changeBasis.source_id,...u?{from_cid:u}:{},...i.changeBasis.to_cid?{to_cid:i.changeBasis.to_cid}:{}}:void 0,f=`${e==="approve"?c.kind==="ARCHIVE"?"retired":"approved":e==="reject"?"rejected":"deferred"} change \xB7 [${c.kind}] ${c.display}${c.kind==="ADD"?"":` ${c.title}`} (you)`,m={verdict:e,...r?{note:r}:{},at:new Date().toISOString(),line:f},P=o.serialize(o.head()),I=_e(l,c),O=ke(i.proposalId,n),z={after:P,process:O.process,pid:O.pid},T=I?{target:I,...i.changeBasis?{source:i.changeBasis.source_id}:{},by:p}:void 0,oe=e==="reject"?null:e==="defer"?{...z,kind:"gap",proposal_id:i.proposalId,text:c.changeLine||c.title}:c.kind==="ARCHIVE"?{...z,kind:"archive",target:I??"",...T?{closes:T}:{}}:{...z,kind:"record",proposal_id:`${i.proposalId}:${n}`,offer:{kind:c.kind==="MODIFY"?"evolve":"design",title:c.kind==="ADD"?c.title:c.display,...c.kind==="MODIFY"&&I?{fallback:I}:{}},...c.kind==="MODIFY"&&T?{closes:T}:{}},de=g.verdicts(i.proposalId);de.verdicts[n]=oe?{...m,pending:oe}:m,g.saveVerdicts(i.proposalId,de);let ce=()=>{let v=g.verdicts(i.proposalId);delete v.verdicts[n],g.saveVerdicts(i.proposalId,v)},w;try{w=await be({store:o,graph:l,proposal:d,proposalId:i.proposalId,card:c,verdict:e,...r?{note:r}:{},by:p,sid:i.sid,...S?{changeBasis:S}:{},signals:v=>A(v.ref,v.verdict,v.reason),...t.probe?{probe:t.probe}:{},...t.matchUnreviewed?{matchUnreviewed:!0}:{}})}catch(v){throw ce(),O.done(),v}if(!w.ok)return ce(),O.done(),a(w.code,w.refusal);let U=w.offer&&w.offer.target?{kind:w.offer.kind,key:w.offer.target,title:c.kind==="ADD"?c.title:c.display}:void 0,E=g.verdicts(i.proposalId);E.verdicts[n]={...m,...U?{offer:U}:{}};let Ae=J(N(d,D(o)),E.verdicts).length,Ee=Object.values(E.verdicts).some(v=>v.pending);Ae===0&&!Ee&&(E.resolved=!0),g.saveVerdicts(i.proposalId,E),O.done();let x={ok:!0,line:f,...w.note?{note:w.note}:{},...U?{offer:U}:{}};return h({type:"card_verdict",source:i.source,key:n,verdict:e,line:x.line,...x.note?{note:x.note}:{},...x.offer?{offer:x.offer}:{}}),E.resolved&&h({type:"review_resolved",source:i.source}),x},async resumeReview(n,e,r){_=null;let s=await De(n,e);return r&&_&&(r.refused=_),s},givenVerdicts(){let n=[];for(let e of V(o,k,y))for(let[r,s]of Object.entries(b(o,e).verdicts))s.verdict!=="steer"&&n.push({card:r,verdict:s.verdict,...s.note?{note:s.note}:{},...s.line?{line:s.line}:{},at:s.at});return n.sort((e,r)=>e.at.localeCompare(r.at))},resumableChildren(){let n=[];for(let e of V(o,k,y))for(let[r,s]of Object.entries(b(o,e).verdicts)){let i=s.offer;i?.answer!=="accepted"||i.child===void 0||i.ended!==void 0||se(i.child)||n.push({proposalId:e,card:r,offer:{kind:i.kind,key:i.key,title:i.title},child:i.child,at:s.at})}return n.sort((e,r)=>e.at.localeCompare(r.at)).map(({proposalId:e,card:r,offer:s,child:i})=>({proposalId:e,card:r,offer:s,child:i}))},pendingOffers(){let n=[];for(let e of V(o,k,y))for(let[r,s]of Object.entries(b(o,e).verdicts)){if(!s.offer)continue;let{kind:i,key:a,title:d,answer:l,child:c,ended:u}=s.offer;l===void 0?n.push({proposalId:e,card:r,offer:{kind:i,key:a,title:d},at:s.at}):l==="accepted"&&c!==void 0&&u===void 0&&se(c)&&n.push({proposalId:e,card:r,offer:{kind:i,key:a,title:d},at:s.at,reopened:!0})}return n.sort((e,r)=>e.at.localeCompare(r.at)).map(({proposalId:e,card:r,offer:s,reopened:i})=>({proposalId:e,card:r,offer:s,...i?{reopened:i}:{}}))},offerAnswered(n,e,r,s){if(!V(o,k,y).includes(n))return!1;let i=b(o,n),a=i.verdicts[e];if(!a?.offer)return!1;let{kind:d,key:l,title:c}=a.offer;return a.offer={kind:d,key:l,title:c,answer:r,...r==="accepted"&&s!==void 0?{child:s}:{}},g.saveVerdicts(n,i),!0},offerEnded(n,e,r){if(!V(o,k,y).includes(n))return!1;let s=b(o,n),i=s.verdicts[e];return i?.offer?(i.offer={...i.offer,ended:r},g.saveVerdicts(n,s),!0):!1},async startReview(n){let e=pe(o,n,C);if(e.kind==="unchanged")return t.note?.(`no use case of ${n} is behind its current version, which has been read \u2014 nothing to review`),0;if(e.kind!=="ok"){let a=e.kind==="first"?`no change context for ${n}`:`${n}'s version ${e.version} cannot be read`;return t.note?.(`${a} \u2014 nothing to review`),_=e.kind==="first"?{code:"POSTURE_USAGE",final:!0}:{code:"SOURCE_UNREADABLE",final:!1},2}let r=e.changeContext;$.set(n,r.old_head);let s=D(o).extractedSourceCids.has(r.new_head)&&fe(o,n).length>0,i=t.childSession?.(n);return Y(n,(a,d)=>{let l=i&&{id:i.id,register:async c=>{await i.register(c),j.add(c),a(c)}};return l||a(),t.runPostureChild?t.runPostureChild(n,r,l):G({mode:W,posture:"reconcile",source:n,changeContext:r,...s?{force:!0}:{},...l?{sessionId:l.id,registerSession:c=>l.register(c)}:{}},d)})},requestPause(){return q=!0,B?(B(),!0):!1},async steer(n){let e=L(o,k,y);if(!e)return t.note?.("nothing is held to steer \u2014 the review has no changeset"),2;if(o.sessions().isLive(e.sid))return t.note?.(`session ${e.sid} is running \u2014 steer it there`),2;let r=g.verdicts(e.proposalId);return r.steer={text:n,at:new Date().toISOString(),seq:o.sessions().peek(e.sid)?.checkpoint?.seq??0},g.saveVerdicts(e.proposalId,r),ee(e.sid,e.proposalId,e.source,n)}};return F}export{Ce as a,He as b,Pe as c,Ne as d};