@testmuai/kane-cli 0.10.3 → 0.10.4

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 (424) hide show
  1. package/dist/ChatSurface-DN7VVN3Y.js +2 -0
  2. package/dist/ChromeProfilePicker-TVGWXTUU.js +2 -0
  3. package/dist/{CliFeedbackPrompt-JWCTMIGI.js → CliFeedbackPrompt-L5ILK66U.js} +1 -1
  4. package/dist/{CliUploadProgress-XFRRFRL4.js → CliUploadProgress-IU6BQLMV.js} +1 -1
  5. package/dist/{ConfigView-6JF4DOJN.js → ConfigView-LU5IRRQU.js} +1 -1
  6. package/dist/EvidenceViewOffer-DNTARDEL.js +2 -0
  7. package/dist/FolderPicker-6E5GE2K2.js +2 -0
  8. package/dist/InfoBox-SFFPLWCV.js +2 -0
  9. package/dist/LinksBox-6YDTIO6I.js +2 -0
  10. package/dist/ProfilesView-6C5HJQ3Y.js +2 -0
  11. package/dist/ProjectPicker-YIQIVXGK.js +2 -0
  12. package/dist/SaveSessionPrompt-X3N6OGYB.js +2 -0
  13. package/dist/SingleShotApp-MXNJPU6A.js +2 -0
  14. package/dist/SummaryBox-T7PDXDKS.js +2 -0
  15. package/dist/TestMdRunView-HRJSBP2C.js +2 -0
  16. package/dist/TestrunEvidenceTable-OGMWTJQF.js +2 -0
  17. package/dist/{WhoamiView-H7JNLLCY.js → WhoamiView-WGCWD7GP.js} +1 -1
  18. package/dist/{app-client-U2YYF65L.js → app-client-2RR5ATI6.js} +1 -1
  19. package/dist/app-download-ZS6ZMX2Z.js +2 -0
  20. package/dist/{assurance-job-F4L3T4VJ.js → assurance-job-QO4VJJCL.js} +1 -1
  21. package/dist/{binary-K3XMILST.js → binary-CCCTW3QQ.js} +1 -1
  22. package/dist/bind-JU4XPDN3.js +2 -0
  23. package/dist/bootstrap-BV7HAARR.js +2 -0
  24. package/dist/{bridge-2UHJOVLX.js → bridge-SPGIYAAG.js} +1 -1
  25. package/dist/{catalog-YCU6OHNV.js → catalog-ZAROGOJA.js} +1 -1
  26. package/dist/{catalog-client-MVEEHTG2.js → catalog-client-QLHCEPPZ.js} +1 -1
  27. package/dist/{changelog-5UB3AQT6.js → changelog-6L7W76ZH.js} +1 -1
  28. package/dist/chat-committer-7E3TRZ6P.js +2 -0
  29. package/dist/chat-controller-5ZBG23L6.js +2 -0
  30. package/dist/child-MNLSG77W.js +2 -0
  31. package/dist/{chunk-LRNUGKYH.js → chunk-2CJ75THZ.js} +1 -1
  32. package/dist/{chunk-UWPG5MWM.js → chunk-2EKLTUY2.js} +1 -1
  33. package/dist/{chunk-C4KAPGBS.js → chunk-2KPJ62RZ.js} +3 -3
  34. package/dist/{chunk-SMGRXKXX.js → chunk-2VLM4L3S.js} +1 -1
  35. package/dist/{chunk-ZHAMVLQZ.js → chunk-3A4KK22B.js} +1 -1
  36. package/dist/{chunk-L3BUPFAQ.js → chunk-3CFAE36M.js} +1 -1
  37. package/dist/{chunk-TU2KPOW2.js → chunk-3DFBFYTD.js} +2 -2
  38. package/dist/{chunk-6FFX4S7N.js → chunk-3HGKFRFL.js} +1 -1
  39. package/dist/{chunk-VKVYT6KZ.js → chunk-3JATEWA5.js} +2 -2
  40. package/dist/{chunk-GXQYFOBD.js → chunk-3O2RPYPM.js} +1 -1
  41. package/dist/chunk-3UY4WPMQ.js +8 -0
  42. package/dist/{chunk-6HRNG4CK.js → chunk-3VSAAB2W.js} +1 -1
  43. package/dist/{chunk-RNHSULQM.js → chunk-454IWKHT.js} +1 -1
  44. package/dist/{chunk-ZMWTRXFH.js → chunk-4DRFMDAW.js} +1 -1
  45. package/dist/{chunk-HRIDAK6Y.js → chunk-4FA44D6S.js} +1 -1
  46. package/dist/{chunk-YVVFXBT5.js → chunk-4G2T54FE.js} +1 -1
  47. package/dist/{chunk-N7IWR45S.js → chunk-4KFSSETE.js} +1 -1
  48. package/dist/chunk-4QV2RL6P.js +34 -0
  49. package/dist/{chunk-ERRIDBE7.js → chunk-4WFN23DE.js} +1 -1
  50. package/dist/{chunk-NPAUSUNM.js → chunk-4WKFM72U.js} +1 -1
  51. package/dist/{chunk-BLVDV3QQ.js → chunk-55W3WAAL.js} +1 -1
  52. package/dist/{chunk-YQZ736IQ.js → chunk-56NUPYFG.js} +1 -1
  53. package/dist/{chunk-PI7OXS62.js → chunk-5EAJO372.js} +1 -1
  54. package/dist/{chunk-35WUYKGO.js → chunk-5HJRYEOT.js} +1 -1
  55. package/dist/{chunk-Y3RJHWNK.js → chunk-5OGYXLOR.js} +1 -1
  56. package/dist/{chunk-CQDCNP7V.js → chunk-5ORBAYTU.js} +1 -1
  57. package/dist/{chunk-KKLCXRW6.js → chunk-642LB5R2.js} +1 -1
  58. package/dist/{chunk-OBNVGD5H.js → chunk-662MCICY.js} +1 -1
  59. package/dist/{chunk-PCQK62MP.js → chunk-6CMBA5SG.js} +1 -1
  60. package/dist/{chunk-X6FCXBXU.js → chunk-6FVGPKVX.js} +1 -1
  61. package/dist/{chunk-32HED7X2.js → chunk-6KUUSONE.js} +1 -1
  62. package/dist/{chunk-VCVEZEVS.js → chunk-6PURZLKM.js} +1 -1
  63. package/dist/{chunk-ZCBOHWN3.js → chunk-73EHVDL5.js} +1 -1
  64. package/dist/{chunk-QHH42RH5.js → chunk-7KASYSFM.js} +1 -1
  65. package/dist/{chunk-SJQTTEXQ.js → chunk-7V6JPZBM.js} +1 -1
  66. package/dist/{chunk-WE7HRAGO.js → chunk-7WWCIS2B.js} +1 -1
  67. package/dist/{chunk-M7A66MSK.js → chunk-A74JRNNX.js} +1 -1
  68. package/dist/{chunk-ENRFXGID.js → chunk-ABAUIIPD.js} +1 -1
  69. package/dist/{chunk-YILRYMMG.js → chunk-ABNQL3PQ.js} +1 -1
  70. package/dist/{chunk-GQAWZEA4.js → chunk-ACBNVGVJ.js} +1 -1
  71. package/dist/{chunk-YPGZ5E4I.js → chunk-AFOP7DVG.js} +1 -1
  72. package/dist/{chunk-JTNEF5ZP.js → chunk-AL6IAMYV.js} +1 -1
  73. package/dist/chunk-APXJRWIJ.js +2 -0
  74. package/dist/{chunk-EBJW6POT.js → chunk-ATCJ7EHL.js} +1 -1
  75. package/dist/{chunk-IZ66FKPC.js → chunk-BIGOLVK6.js} +1 -1
  76. package/dist/{chunk-LHJSIHLC.js → chunk-BIXABKSK.js} +1 -1
  77. package/dist/chunk-BK3LWNKB.js +102 -0
  78. package/dist/{chunk-X2MDL6S4.js → chunk-BPTWMV5L.js} +1 -1
  79. package/dist/{chunk-4CJQ7XZP.js → chunk-BV7NUIRT.js} +1 -1
  80. package/dist/{chunk-UJ37XGSP.js → chunk-BXAPTB2H.js} +3 -3
  81. package/dist/{chunk-X7S7IGCV.js → chunk-BXJNL22L.js} +1 -1
  82. package/dist/{chunk-Z24SD2EJ.js → chunk-C3DMMAFP.js} +1 -1
  83. package/dist/chunk-CBEMXSWF.js +2 -0
  84. package/dist/{chunk-IEHJG6J4.js → chunk-CVVZ6NWR.js} +1 -1
  85. package/dist/{chunk-OZNYQONA.js → chunk-DAV4ONGS.js} +3 -3
  86. package/dist/{chunk-MEBEVHGP.js → chunk-DBMDAWTA.js} +1 -1
  87. package/dist/{chunk-CNHKZE4F.js → chunk-DJ76NDW6.js} +1 -1
  88. package/dist/{chunk-ZPU3WAC4.js → chunk-DRWHVVW6.js} +1 -1
  89. package/dist/{chunk-Z47ZEFH7.js → chunk-DXXHCLFC.js} +1 -1
  90. package/dist/{chunk-35BG2EMW.js → chunk-E3C4OWSD.js} +1 -1
  91. package/dist/{chunk-KQ4XKTIZ.js → chunk-ECPSBI2Z.js} +1 -1
  92. package/dist/{chunk-X45RZIAJ.js → chunk-EG3B52WU.js} +1 -1
  93. package/dist/{chunk-EJGCIGQY.js → chunk-EOLMWSLX.js} +1 -1
  94. package/dist/{chunk-GAKBHNC4.js → chunk-EUGFABAS.js} +1 -1
  95. package/dist/{chunk-OTMHCHH6.js → chunk-EWK3UPEN.js} +1 -1
  96. package/dist/{chunk-NI3TIAD7.js → chunk-EWSNJ3IX.js} +1 -1
  97. package/dist/{chunk-SALZ6WSF.js → chunk-F4XCCOWC.js} +1 -1
  98. package/dist/{chunk-YNDELIXL.js → chunk-FH4FWIET.js} +1 -1
  99. package/dist/chunk-FQ2AMM3E.js +3 -0
  100. package/dist/{chunk-5YYCCM6K.js → chunk-FTP2K6RS.js} +1 -1
  101. package/dist/{chunk-JBKHX5ES.js → chunk-GJYMR4RT.js} +1 -1
  102. package/dist/{chunk-NHGPMYM3.js → chunk-GMSWZIAS.js} +1 -1
  103. package/dist/{chunk-AHT2ORJT.js → chunk-GPIVYCHQ.js} +1 -1
  104. package/dist/{chunk-ZDCXWEQG.js → chunk-GRQKMOKE.js} +1 -1
  105. package/dist/{chunk-E4GIGM5V.js → chunk-H6IPGZTP.js} +1 -1
  106. package/dist/{chunk-7Y55CO42.js → chunk-H6QHG62O.js} +1 -1
  107. package/dist/{chunk-MINDIQET.js → chunk-HBGYEA3O.js} +1 -1
  108. package/dist/{chunk-VO2NNXKR.js → chunk-HGKAUG7L.js} +1 -1
  109. package/dist/{chunk-Q4SMITTV.js → chunk-HMGM4KO6.js} +1 -1
  110. package/dist/{chunk-CTHUX7O4.js → chunk-I3G3IUKY.js} +1 -1
  111. package/dist/{chunk-MD3RABID.js → chunk-IDWAG6L4.js} +1 -1
  112. package/dist/{chunk-TM6VLC6V.js → chunk-IPIARGHE.js} +1 -1
  113. package/dist/chunk-IQMJJN52.js +3 -0
  114. package/dist/{chunk-WEJR2V7R.js → chunk-J3XOEMKO.js} +1 -1
  115. package/dist/{chunk-GJXO6FF7.js → chunk-JBUKEIYL.js} +1 -1
  116. package/dist/{chunk-7RELCXRW.js → chunk-JE5M5QIK.js} +1 -1
  117. package/dist/{chunk-QEM5ZRDN.js → chunk-JJDD4HPX.js} +1 -1
  118. package/dist/{chunk-NRAPCFI2.js → chunk-JM45SLKV.js} +2 -2
  119. package/dist/{chunk-GEZVC4S3.js → chunk-JM6AKCN4.js} +1 -1
  120. package/dist/{chunk-3KY7HHQU.js → chunk-JSSM2TWY.js} +1 -1
  121. package/dist/{chunk-3MD2XLE7.js → chunk-JYSIPTX3.js} +9 -8
  122. package/dist/{chunk-AVLYSNEG.js → chunk-KJZD2ADR.js} +1 -1
  123. package/dist/chunk-KLY6IQD5.js +26 -0
  124. package/dist/{chunk-LTPOMMAB.js → chunk-LB5NIDW6.js} +1 -1
  125. package/dist/{chunk-HV2CDY4K.js → chunk-LCBDNZL3.js} +1 -1
  126. package/dist/{chunk-SIHX5FW5.js → chunk-LJKTIKZY.js} +1 -1
  127. package/dist/{chunk-SXBPUUQ5.js → chunk-LLDEAV3W.js} +1 -1
  128. package/dist/{chunk-PTLOOVV4.js → chunk-LV7OWLJK.js} +1 -1
  129. package/dist/{chunk-TUSG7DIL.js → chunk-MNELOQ4J.js} +1 -1
  130. package/dist/{chunk-3ZC7GSMM.js → chunk-MOAZZKIZ.js} +1 -1
  131. package/dist/{chunk-YWWVF5OU.js → chunk-MQU6EA44.js} +1 -1
  132. package/dist/chunk-MTMHB5LF.js +2 -0
  133. package/dist/{chunk-Q4ALB7SH.js → chunk-MWLRLQ27.js} +1 -1
  134. package/dist/{chunk-OHGL4GEJ.js → chunk-MZ4GTIO2.js} +1 -1
  135. package/dist/chunk-NKJRAQ6L.js +6 -0
  136. package/dist/{chunk-LPJKNX6D.js → chunk-NMCE7VR2.js} +1 -1
  137. package/dist/{chunk-7V34ZMMS.js → chunk-OKCVG7AG.js} +1 -1
  138. package/dist/{chunk-LZGAFKYH.js → chunk-OMCJD4LH.js} +1 -1
  139. package/dist/{chunk-OOGKX4Y6.js → chunk-OSEXVHEN.js} +1 -1
  140. package/dist/{chunk-EZMRWXRT.js → chunk-OVB5GVRB.js} +1 -1
  141. package/dist/{chunk-ND6OP3O2.js → chunk-OX3ZAGCH.js} +1 -1
  142. package/dist/{chunk-LXK4B2FE.js → chunk-P43YHCF3.js} +1 -1
  143. package/dist/{chunk-ZMIKNNO6.js → chunk-P7V24ZXP.js} +1 -1
  144. package/dist/{chunk-3NWUXRSI.js → chunk-PBVNX43X.js} +1 -1
  145. package/dist/{chunk-MEMXFTLD.js → chunk-PEHVBCXM.js} +1 -1
  146. package/dist/{chunk-4UX5N7YI.js → chunk-PHKJIJ7D.js} +1 -1
  147. package/dist/{chunk-BBJAKSA7.js → chunk-PMYN3XMN.js} +2 -2
  148. package/dist/{chunk-R6TFRAMZ.js → chunk-PUNFWBRW.js} +1 -1
  149. package/dist/chunk-Q5B54TR5.js +2 -0
  150. package/dist/{chunk-KCXLRR3Q.js → chunk-QEBVYQNC.js} +1 -1
  151. package/dist/{chunk-PB6RXDWQ.js → chunk-QFA6JPVE.js} +2 -2
  152. package/dist/{chunk-TAY7J5VS.js → chunk-QLGQDNA3.js} +1 -1
  153. package/dist/{chunk-7SU53QGU.js → chunk-QOXUGYEA.js} +1 -1
  154. package/dist/{chunk-LV7224DG.js → chunk-QXZGBYGQ.js} +1 -1
  155. package/dist/{chunk-4KL3TSTT.js → chunk-QYWWL7M7.js} +4 -4
  156. package/dist/{chunk-M2E5CPPV.js → chunk-RG3FNO37.js} +1 -1
  157. package/dist/{chunk-YCVEI7BT.js → chunk-RNKJXVG2.js} +1 -1
  158. package/dist/{chunk-HBLHKQR7.js → chunk-S5PIVHPC.js} +1 -1
  159. package/dist/{chunk-LUA25RYS.js → chunk-S74NLCFZ.js} +1 -1
  160. package/dist/chunk-SBW3QVHN.js +7 -0
  161. package/dist/{chunk-2TK4MDF2.js → chunk-SMSQVGLH.js} +1 -1
  162. package/dist/{chunk-Y2HQMJGS.js → chunk-SO3IXFAJ.js} +1 -1
  163. package/dist/{chunk-T77LTLAD.js → chunk-SULRMI2J.js} +1 -1
  164. package/dist/{chunk-KL7XFNSD.js → chunk-SZQNYDST.js} +1 -1
  165. package/dist/chunk-T5FQRUI2.js +47 -0
  166. package/dist/{chunk-HVOXMCKE.js → chunk-TCK7WR3M.js} +1 -1
  167. package/dist/{chunk-OCMPWCKQ.js → chunk-TELSHQ3W.js} +1 -1
  168. package/dist/{chunk-FOLUB336.js → chunk-TFSWG7AS.js} +1 -1
  169. package/dist/{chunk-2JFRN62I.js → chunk-TLYFHPNM.js} +2 -2
  170. package/dist/{chunk-CB2BWDHG.js → chunk-TO2ROHIJ.js} +4 -4
  171. package/dist/{chunk-PRBWZXFA.js → chunk-TOOJTCON.js} +6 -6
  172. package/dist/{chunk-DQXQJJOP.js → chunk-TXRWH6HL.js} +2 -2
  173. package/dist/chunk-U5V3L5QH.js +2 -0
  174. package/dist/{chunk-WIVKLNIO.js → chunk-UVBPUZC4.js} +1 -1
  175. package/dist/{chunk-23DKB2MT.js → chunk-UVL6XQHU.js} +1 -1
  176. package/dist/{chunk-DC5F2ADJ.js → chunk-UZKVV3LW.js} +1 -1
  177. package/dist/{chunk-YDB72F4K.js → chunk-V4SL74TK.js} +1 -1
  178. package/dist/chunk-V57R4X3O.js +5 -0
  179. package/dist/{chunk-LLQWEGXD.js → chunk-W5EDS4DF.js} +1 -1
  180. package/dist/{chunk-6QH75BPJ.js → chunk-WB4JZ67W.js} +1 -1
  181. package/dist/{chunk-W54BX6HC.js → chunk-WCIRLITM.js} +1 -1
  182. package/dist/{chunk-OCVDMZWB.js → chunk-WHMCVH3T.js} +1 -1
  183. package/dist/{chunk-XKOVEMVZ.js → chunk-WMIR4UXG.js} +1 -1
  184. package/dist/chunk-WMXBRC4B.js +21 -0
  185. package/dist/{chunk-RQKMSNEU.js → chunk-WTMCDYR3.js} +1 -1
  186. package/dist/{chunk-DXIQVBMI.js → chunk-WZ3FE5MT.js} +1 -1
  187. package/dist/{chunk-3RO2YGKH.js → chunk-X3O4VGTM.js} +1 -1
  188. package/dist/{chunk-GLM5UGTF.js → chunk-X66NIHT4.js} +1 -1
  189. package/dist/{chunk-B7ZX5HEN.js → chunk-XDAFRUAJ.js} +1 -1
  190. package/dist/{chunk-JNPFEBUR.js → chunk-XDAHKZ4J.js} +1 -1
  191. package/dist/{chunk-ZCL7XIVS.js → chunk-XKJZG4GR.js} +1 -1
  192. package/dist/chunk-XTQUCCJH.js +2 -0
  193. package/dist/{chunk-SVIIUKJ2.js → chunk-Y7GSOKXS.js} +1 -1
  194. package/dist/chunk-YIBLZIXF.js +13 -0
  195. package/dist/{chunk-J4FIESTB.js → chunk-YKOZBFR3.js} +1 -1
  196. package/dist/{chunk-TM45NPWL.js → chunk-YWQNZRJG.js} +1 -1
  197. package/dist/chunk-YZP4F23B.js +18 -0
  198. package/dist/{chunk-QE4AWNOV.js → chunk-Z4O5HOFX.js} +6 -6
  199. package/dist/{chunk-KBGMQYMD.js → chunk-ZFKR5I3J.js} +1 -1
  200. package/dist/{chunk-6QCCTZO3.js → chunk-ZHENGHYZ.js} +1 -1
  201. package/dist/{chunk-SSOUYKVG.js → chunk-ZIRSTOEV.js} +1 -1
  202. package/dist/{chunk-AT7AT3AR.js → chunk-ZVSZ6DIQ.js} +5 -5
  203. package/dist/command-span-HZSKIZH7.js +2 -0
  204. package/dist/commands-X5T6YANK.js +2 -0
  205. package/dist/{committer-UO3B3S5Y.js → committer-L2HXEODA.js} +1 -1
  206. package/dist/{config-7WTZPMAH.js → config-F5Q6QX27.js} +1 -1
  207. package/dist/cover-cmd-PWUZU4HK.js +2 -0
  208. package/dist/{credentials-5WIFF5DG.js → credentials-D5KQMHCK.js} +1 -1
  209. package/dist/{deps-bundle-BLLJ2BQ4.js → deps-bundle-R7FNIV4M.js} +1 -1
  210. package/dist/{deps-resolve-WQ6J6RLI.js → deps-resolve-IF6P6NWI.js} +1 -1
  211. package/dist/design-chat-HYK3HNIM.js +2 -0
  212. package/dist/{design-committer-7YIPFKMO.js → design-committer-ZKNW5LUS.js} +1 -1
  213. package/dist/design-headless-DR7WB37W.js +2 -0
  214. package/dist/design-remote-TGUNEWEM.js +3 -0
  215. package/dist/device-env-LZB3PKMA.js +2 -0
  216. package/dist/dispatch-BGH5PVZ4.js +2 -0
  217. package/dist/doctor-PLFEA2HM.js +2 -0
  218. package/dist/{docx-convert-DO5AQYD3.js → docx-convert-PA5S2S7P.js} +1 -1
  219. package/dist/{dossier-5XKNAK6Q.js → dossier-B6KBSRJY.js} +1 -1
  220. package/dist/evidence-SRWISQMQ.js +2 -0
  221. package/dist/evolve-cmd-2BALEYZU.js +2 -0
  222. package/dist/evolve-remote-OHOUWO65.js +2 -0
  223. package/dist/exit-manager-UZ7DGXS4.js +2 -0
  224. package/dist/{explain-cmd-KNDORU2D.js → explain-cmd-A5YMPXAJ.js} +1 -1
  225. package/dist/explain-cmd-VTDAMXAW.js +12 -0
  226. package/dist/explore-UZWQRJ7H.js +2 -0
  227. package/dist/explore-context-tty-PAKJVDJU.js +2 -0
  228. package/dist/explore-entry-ZOPO7DBZ.js +6 -0
  229. package/dist/{explore-live-XIWWUV52.js → explore-live-RUAAZGX4.js} +1 -1
  230. package/dist/{explore-run-tty-M56I23IF.js → explore-run-tty-DYLMHI7F.js} +2 -2
  231. package/dist/{extract-bind-LZ22VFKB.js → extract-bind-WPICR4IC.js} +3 -3
  232. package/dist/extract-chat-KVUB5HPM.js +2 -0
  233. package/dist/{extract-cmd-46E2XDWZ.js → extract-cmd-OJ7LXSKL.js} +2 -2
  234. package/dist/extract-headless-OQJSUSG4.js +2 -0
  235. package/dist/{feeder-NGWIPZ26.js → feeder-VAY4NYBX.js} +1 -1
  236. package/dist/folder-flags-MEZUAXTT.js +2 -0
  237. package/dist/gaps-cmd-2R4RMWN6.js +3 -0
  238. package/dist/gate-SM4HPJLA.js +2 -0
  239. package/dist/gate-VJ7W5QIH.js +2 -0
  240. package/dist/{generate-headless-HXAVEAEZ.js → generate-headless-XR3RVULC.js} +3 -3
  241. package/dist/hold-passthrough-ZHOC2Q26.js +2 -0
  242. package/dist/identity-66TGWITQ.js +2 -0
  243. package/dist/{impact-cmd-TJTUFAFO.js → impact-cmd-EL3QSOAF.js} +2 -2
  244. package/dist/index.js +185 -184
  245. package/dist/ingest-6UQGSQYU.js +2 -0
  246. package/dist/ingest-cmd-N3USC7TW.js +8 -0
  247. package/dist/ingest-remote-2VKWAFJZ.js +2 -0
  248. package/dist/install-3IEM3I3X.js +2 -0
  249. package/dist/{interactive-bind-SOD7VTAY.js → interactive-bind-F7QTQOKC.js} +4 -4
  250. package/dist/{interactive-remote-7ZSTI66T.js → interactive-remote-A33J4KMP.js} +2 -2
  251. package/dist/lane-EHU4JRRU.js +2 -0
  252. package/dist/lattice-auth-IJT542IF.js +2 -0
  253. package/dist/lifecycle-cmd-OKUFZKEX.js +2 -0
  254. package/dist/list-cmd-7OTI66MQ.js +3 -0
  255. package/dist/list-commands-FZPVH76I.js +2 -0
  256. package/dist/{list-remote-EFCET42K.js → list-remote-BQ4NILCA.js} +1 -1
  257. package/dist/{locks-cmd-AZKCSGHI.js → locks-cmd-76IU4JB7.js} +1 -1
  258. package/dist/{logical-ids-74PLU3VR.js → logical-ids-YMNV2MDB.js} +1 -1
  259. package/dist/login-flow-BYQ7SYGB.js +2 -0
  260. package/dist/maintenance-cmd-BLV7K4RK.js +2 -0
  261. package/dist/mobile-prompts-5TGLJUBV.js +2 -0
  262. package/dist/onboarding-F4EIJ4GD.js +5 -0
  263. package/dist/open-provider-LXCPVNUU.js +2 -0
  264. package/dist/{pdf-convert-YB6PJFMI.js → pdf-convert-N2C3KB4Q.js} +1 -1
  265. package/dist/persist-recorded-session-WYMOHDTB.js +3 -0
  266. package/dist/phase-seed-G5JSYKSL.js +2 -0
  267. package/dist/pipeline-XYM6HIDZ.js +2 -0
  268. package/dist/{policy-commands-4PUGESCW.js → policy-commands-AOLVAZZD.js} +1 -1
  269. package/dist/prepare-target-P4AZWC37.js +2 -0
  270. package/dist/pull-cmd-C4HMYD4I.js +2 -0
  271. package/dist/pull-route-MHW5PWDW.js +2 -0
  272. package/dist/readmodel-FARAAPUU.js +2 -0
  273. package/dist/real-device-run-WAOWKEFJ.js +2 -0
  274. package/dist/reconcile-cmd-VXY737OT.js +5 -0
  275. package/dist/reconcile-deps-TILDRCHG.js +2 -0
  276. package/dist/{reconcile-remote-3W6ZTO3G.js → reconcile-remote-UGW2433E.js} +2 -2
  277. package/dist/recording-banner-EPOTSMYF.js +2 -0
  278. package/dist/registry-WTWTFRXD.js +2 -0
  279. package/dist/remote-entry-SPA4CSJJ.js +2 -0
  280. package/dist/remote-mode-QO6BDGXM.js +4 -0
  281. package/dist/remote-words-TAZT4YBT.js +2 -0
  282. package/dist/{require-project-folder-3DTI2CVB.js → require-project-folder-WBCAVVMB.js} +1 -1
  283. package/dist/resolve-run-intent-RBOCIYEA.js +2 -0
  284. package/dist/{resolver-CDF7QKVD.js → resolver-3BGIXYYJ.js} +1 -1
  285. package/dist/revert-F6MKJ73M.js +2 -0
  286. package/dist/review-cmd-WE6I5XTY.js +5 -0
  287. package/dist/run-EABFRFOF.js +2 -0
  288. package/dist/run-LX3ARF53.js +2 -0
  289. package/dist/run-remote-6Y62RWMJ.js +2 -0
  290. package/dist/run-startup-gate-Q7FP2IRE.js +2 -0
  291. package/dist/run-test-md-24MBKBC6.js +20 -0
  292. package/dist/session-worker.js +2 -2
  293. package/dist/{sessions-cmd-TLUITRG5.js → sessions-cmd-5NS5P4CP.js} +2 -2
  294. package/dist/{sessions-remote-INO7AWKB.js → sessions-remote-75PDRPOY.js} +1 -1
  295. package/dist/{skill-installer-7JH5QCJF.js → skill-installer-7PK64TZE.js} +1 -1
  296. package/dist/store-AVYBL5HB.js +2 -0
  297. package/dist/store-choice-ZWU3PDNL.js +2 -0
  298. package/dist/store-guard-ETUXXG7X.js +2 -0
  299. package/dist/{store-site-K5NHLI7D.js → store-site-AFXB6SBW.js} +1 -1
  300. package/dist/{stream-warnings-GM7YEOVG.js → stream-warnings-I5LUWVFU.js} +1 -1
  301. package/dist/support-id-RISKXA53.js +2 -0
  302. package/dist/sync-cmd-CSTMT6E6.js +2 -0
  303. package/dist/sync-setup-Y53K6TJ6.js +2 -0
  304. package/dist/tcg-generate-VQLI6NGK.js +2 -0
  305. package/dist/{test-definition-53XNBEDE.js → test-definition-GXEKFRRB.js} +1 -1
  306. package/dist/testmd-actions-BE4YJ6ZZ.js +2 -0
  307. package/dist/{testmd-sync-LYHEXWCT.js → testmd-sync-QZWVWTZZ.js} +1 -1
  308. package/dist/token-refresh-PZ3TOKAL.js +2 -0
  309. package/dist/{use-case-ref-44BPIP4N.js → use-case-ref-E3PJDHQB.js} +1 -1
  310. package/dist/{validate-basic-66XDPA3S.js → validate-basic-QWPESO74.js} +1 -1
  311. package/dist/verdicts-KB6YTIY6.js +2 -0
  312. package/dist/{version-check-SHNVYTMU.js → version-check-EOYWTY3Z.js} +1 -1
  313. package/dist/{view-cmd-QOB3O6YW.js → view-cmd-KG4HI334.js} +1 -1
  314. package/dist/walk-session-WM4S2JMV.js +2 -0
  315. package/dist/with-telemetry-RJM3JKL6.js +2 -0
  316. package/package.json +11 -11
  317. package/dist/ChatSurface-Z26BOE5U.js +0 -2
  318. package/dist/ChromeProfilePicker-ODRIAXL3.js +0 -2
  319. package/dist/EvidenceViewOffer-6344EX74.js +0 -2
  320. package/dist/FolderPicker-4PCYHE75.js +0 -2
  321. package/dist/InfoBox-NJ2DL7YC.js +0 -2
  322. package/dist/LinksBox-HNDNFVUT.js +0 -2
  323. package/dist/ProfilesView-DEJKJOHY.js +0 -2
  324. package/dist/ProjectPicker-DTWMWOH7.js +0 -2
  325. package/dist/SaveSessionPrompt-3GCLB3ZT.js +0 -2
  326. package/dist/SingleShotApp-HMOXO5DW.js +0 -2
  327. package/dist/SummaryBox-7PPDMSSM.js +0 -2
  328. package/dist/TestMdRunView-QLKRUU4V.js +0 -2
  329. package/dist/TestrunEvidenceTable-T2JUB4TE.js +0 -2
  330. package/dist/app-download-GKRF2EIM.js +0 -2
  331. package/dist/bind-SSHAZAB3.js +0 -2
  332. package/dist/bootstrap-XGKU4WXB.js +0 -2
  333. package/dist/chat-committer-ZKEKJA2R.js +0 -2
  334. package/dist/chat-controller-FXRJXUG3.js +0 -2
  335. package/dist/child-JHYENXE7.js +0 -2
  336. package/dist/chunk-2RBMQTYS.js +0 -26
  337. package/dist/chunk-5F5IVART.js +0 -8
  338. package/dist/chunk-6SD4XTYC.js +0 -6
  339. package/dist/chunk-7YV2FCN4.js +0 -3
  340. package/dist/chunk-A2DODRHG.js +0 -2
  341. package/dist/chunk-BJO6J5X2.js +0 -3
  342. package/dist/chunk-DIOK3SER.js +0 -34
  343. package/dist/chunk-DREQ3RAA.js +0 -2
  344. package/dist/chunk-HC6VLPUB.js +0 -5
  345. package/dist/chunk-NZJSGINB.js +0 -47
  346. package/dist/chunk-SXRHKXSE.js +0 -2
  347. package/dist/chunk-UJLULWSR.js +0 -21
  348. package/dist/chunk-ULIIYKZB.js +0 -7
  349. package/dist/chunk-UXGMKRS4.js +0 -102
  350. package/dist/chunk-VO66KP2W.js +0 -2
  351. package/dist/chunk-X52YIWGG.js +0 -13
  352. package/dist/chunk-ZIHQ5JGB.js +0 -18
  353. package/dist/commands-JBFLLT7A.js +0 -2
  354. package/dist/cover-cmd-DU6ZYJFL.js +0 -2
  355. package/dist/design-chat-ZICGVYIH.js +0 -2
  356. package/dist/design-headless-HYWZIIDS.js +0 -2
  357. package/dist/design-remote-HPX4VZ63.js +0 -3
  358. package/dist/device-env-4P4GUVBW.js +0 -2
  359. package/dist/dispatch-BV6XMCN3.js +0 -2
  360. package/dist/doctor-Z2YQ2DBX.js +0 -2
  361. package/dist/evidence-BJIID6VT.js +0 -2
  362. package/dist/evolve-cmd-GZCUSCEK.js +0 -2
  363. package/dist/evolve-remote-LILOAHYH.js +0 -2
  364. package/dist/exit-manager-EGWAZHCR.js +0 -2
  365. package/dist/explain-cmd-LXIVHGN7.js +0 -12
  366. package/dist/explore-SA2P3SGX.js +0 -2
  367. package/dist/explore-context-tty-PERKIWXD.js +0 -2
  368. package/dist/explore-entry-E6EY3VV3.js +0 -6
  369. package/dist/extract-chat-Z64LEAJ5.js +0 -2
  370. package/dist/extract-headless-XLS56LMN.js +0 -2
  371. package/dist/folder-flags-ZIDJVDKX.js +0 -2
  372. package/dist/gaps-cmd-XYOBJVTO.js +0 -3
  373. package/dist/gate-AK44VDHC.js +0 -2
  374. package/dist/gate-NB5CJMTN.js +0 -2
  375. package/dist/hold-passthrough-JGHWMYDM.js +0 -2
  376. package/dist/identity-HL5CJJXR.js +0 -2
  377. package/dist/ingest-ZHHHBUXR.js +0 -2
  378. package/dist/ingest-cmd-OJSKTSQK.js +0 -8
  379. package/dist/ingest-remote-2WM6PYUW.js +0 -2
  380. package/dist/install-JBWBF3WX.js +0 -2
  381. package/dist/lane-CNGO7LH5.js +0 -2
  382. package/dist/lattice-auth-UQPFQSG7.js +0 -2
  383. package/dist/lifecycle-cmd-DGIO3VAO.js +0 -2
  384. package/dist/list-cmd-HQIN3HX4.js +0 -3
  385. package/dist/list-commands-OFRRBU3D.js +0 -2
  386. package/dist/login-flow-SYKXXDLH.js +0 -2
  387. package/dist/maintenance-cmd-X5247RSJ.js +0 -2
  388. package/dist/mobile-prompts-I66ENBDW.js +0 -2
  389. package/dist/onboarding-6HIP3KW6.js +0 -5
  390. package/dist/open-provider-XDJKT3W3.js +0 -2
  391. package/dist/persist-recorded-session-RSSMTVF3.js +0 -3
  392. package/dist/phase-seed-ZZSJME7M.js +0 -2
  393. package/dist/pipeline-NTJDH5TC.js +0 -2
  394. package/dist/prepare-target-AI3GGZF6.js +0 -2
  395. package/dist/pull-cmd-NRVB5ZN7.js +0 -2
  396. package/dist/pull-route-FWCZW76M.js +0 -2
  397. package/dist/readmodel-TRV4E3MW.js +0 -2
  398. package/dist/real-device-run-NQ7RNH7C.js +0 -2
  399. package/dist/reconcile-cmd-7B7THAFJ.js +0 -5
  400. package/dist/reconcile-deps-UDQBWSLE.js +0 -2
  401. package/dist/recording-banner-WVDTWTSE.js +0 -2
  402. package/dist/registry-PFOSXOIH.js +0 -2
  403. package/dist/remote-entry-BZU4NFNS.js +0 -2
  404. package/dist/remote-mode-NXUKDUXG.js +0 -4
  405. package/dist/remote-words-JRDDNOZ6.js +0 -2
  406. package/dist/resolve-run-intent-QCL7QXIB.js +0 -2
  407. package/dist/revert-QKHPCRT6.js +0 -2
  408. package/dist/review-cmd-XBK3TGRE.js +0 -5
  409. package/dist/run-CSYGVV3D.js +0 -2
  410. package/dist/run-YUHHD54J.js +0 -2
  411. package/dist/run-remote-SFR3F2T5.js +0 -2
  412. package/dist/run-startup-gate-QSFJRYUY.js +0 -2
  413. package/dist/run-test-md-ZSREINDQ.js +0 -20
  414. package/dist/store-X4UK4AP7.js +0 -2
  415. package/dist/store-choice-27HDIFTU.js +0 -2
  416. package/dist/store-guard-ZXKB5DQH.js +0 -2
  417. package/dist/sync-cmd-2PCO7LZA.js +0 -2
  418. package/dist/sync-setup-5WQO73Y5.js +0 -2
  419. package/dist/tcg-generate-DGJD5KSM.js +0 -2
  420. package/dist/testmd-actions-XE2JPQHB.js +0 -2
  421. package/dist/token-refresh-E4FTJVHY.js +0 -2
  422. package/dist/verdicts-PVB7TV5S.js +0 -2
  423. package/dist/walk-session-WIEROYOT.js +0 -2
  424. package/dist/with-telemetry-T2PWI5CY.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-JE5M5QIK.js";import"./chunk-WB4JZ67W.js";import"./chunk-WMIR4UXG.js";import"./chunk-AL6IAMYV.js";import"./chunk-EOLMWSLX.js";import"./chunk-MQU6EA44.js";import"./chunk-3AGP2BVN.js";import"./chunk-ABNQL3PQ.js";import"./chunk-5Y2G4NC7.js";import"./chunk-SMXABALN.js";import"./chunk-OX3ZAGCH.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-HD6NR44L.js";import"./chunk-BWXLZS5O.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-2CJ75THZ.js";import"./chunk-3A4KK22B.js";import"./chunk-7WWCIS2B.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-DXXHCLFC.js";import"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-YKOZBFR3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChatSurface,b as reviewReadLine,a as tailVisualRows};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-3O2RPYPM.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ChromeProfilePicker,b as formatChromeProfileLine,a as listChromeProfiles};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as r}from"./chunk-M2E5CPPV.js";import"./chunk-YCVEI7BT.js";import"./chunk-HCBYKLMW.js";import{c as e}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as i}from"./chunk-6YGTRKDT.js";import"./chunk-J4FIESTB.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
2
+ import{a as r}from"./chunk-RG3FNO37.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import{c as e}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as i}from"./chunk-6YGTRKDT.js";import{e as m}from"./chunk-UR6MHSHU.js";var t=m(i(),1);async function d(){return new Promise(o=>{let c=e(t.default.createElement(r,{onSubmit:n=>{c.unmount(),o(n)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{d as renderFeedbackPrompt};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as P,b as g,c as f}from"./chunk-OHGL4GEJ.js";import"./chunk-SMGRXKXX.js";import"./chunk-5Y2G4NC7.js";import{a as c}from"./chunk-HCBYKLMW.js";import{c as d}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as h}from"./chunk-6YGTRKDT.js";import"./chunk-J4FIESTB.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
2
+ import{a as P,b as g,c as f}from"./chunk-MZ4GTIO2.js";import"./chunk-2VLM4L3S.js";import"./chunk-5Y2G4NC7.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import{c as d}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as h}from"./chunk-6YGTRKDT.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(h(),1);var m=p(c(),1);function w({pipeline:t,buildShareUrl:r,onDone:o}){let[n,i]=(0,e.useState)(P()),[S,l]=(0,e.useState)("uploading"),[U,R]=(0,e.useState)(),[C,E]=(0,e.useState)();return(0,e.useEffect)(()=>{let x=t.config.onProgress;t.config.onProgress=(s,u,a)=>{x(s,u,a),i(y=>g(y,s,u,a))},t.execute().then(s=>{s.success?(R(r?.(s)),l("success")):(E(s.error),l("failed")),setTimeout(()=>o(s),1500)})},[]),(0,m.jsx)(f,{steps:n,status:S,testUrl:U,error:C})}async function O(t,r){return new Promise(o=>{let n=d(e.default.createElement(w,{pipeline:t,buildShareUrl:r,onDone:i=>{n.unmount(),o(i)}}),{stdout:process.stderr,exitOnCtrlC:!1})})}export{O as renderUploadProgress};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as h,b as l,c as i}from"./chunk-ND6OP3O2.js";import{a as x}from"./chunk-HCBYKLMW.js";import{a as s,j as C}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as S}from"./chunk-6YGTRKDT.js";import{z as n}from"./chunk-J4FIESTB.js";import{e as u}from"./chunk-UR6MHSHU.js";var B=u(S(),1);var e=u(x(),1);function T({model:D,authLabel:w,profile:$,env:y,defaultUrl:d,projectId:a,projectName:v,folderId:t,folderName:g,windowSize:P,chromeProfile:R,target:r,deviceName:m,osVersion:f,appLabel:b,deviceSettings:c=[]}){let V=a?v?`${v} (${a})`:a:"(none)",A=t?g?`${g} (${t})`:t:"(none)",{exit:p}=C();return(0,B.useEffect)(()=>{let o=setTimeout(()=>p(),50);return()=>clearTimeout(o)},[p]),(0,e.jsx)(s,{flexDirection:"column",children:(0,e.jsx)(h,{title:"Configuration",children:(0,e.jsxs)(s,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:w}),(0,e.jsx)(l,{label:" profile",value:$}),(0,e.jsx)(l,{label:" env",value:y}),(0,e.jsx)(i,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:d??"(none)",valueColor:d?n.orange:n.dim}),(0,e.jsx)(l,{label:" model",value:D}),(0,e.jsx)(l,{label:" window",value:P}),(0,e.jsx)(l,{label:" project",value:V}),(0,e.jsx)(l,{label:" folder",value:A}),r!==void 0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" target",value:r}),r!=="desktop"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" device_name",value:m??"(not set)",valueColor:m?void 0:n.dim}),(0,e.jsx)(l,{label:" os_version",value:f??"(not set)",valueColor:f?void 0:n.dim}),(0,e.jsx)(l,{label:" app",value:b??"(not set)",valueColor:b?void 0:n.dim})]})]}),c.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{label:"Device settings"}),c.map(o=>(0,e.jsx)(l,{label:` ${o.label}`,value:o.value},o.label))]}),(0,e.jsx)(i,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:R,valueColor:n.dim})]})})})}export{T as ConfigView};
2
+ import{a as h,b as l,c as i}from"./chunk-OX3ZAGCH.js";import{a as x}from"./chunk-HCBYKLMW.js";import{z as n}from"./chunk-YKOZBFR3.js";import{a as s,j as C}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as S}from"./chunk-6YGTRKDT.js";import{e as u}from"./chunk-UR6MHSHU.js";var B=u(S(),1);var e=u(x(),1);function T({model:D,authLabel:w,profile:$,env:y,defaultUrl:d,projectId:a,projectName:v,folderId:t,folderName:g,windowSize:P,chromeProfile:R,target:r,deviceName:m,osVersion:f,appLabel:b,deviceSettings:c=[]}){let V=a?v?`${v} (${a})`:a:"(none)",A=t?g?`${g} (${t})`:t:"(none)",{exit:p}=C();return(0,B.useEffect)(()=>{let o=setTimeout(()=>p(),50);return()=>clearTimeout(o)},[p]),(0,e.jsx)(s,{flexDirection:"column",children:(0,e.jsx)(h,{title:"Configuration",children:(0,e.jsxs)(s,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{label:"Auth"}),(0,e.jsx)(l,{label:" method",value:w}),(0,e.jsx)(l,{label:" profile",value:$}),(0,e.jsx)(l,{label:" env",value:y}),(0,e.jsx)(i,{label:"Defaults"}),(0,e.jsx)(l,{label:" url",value:d??"(none)",valueColor:d?n.orange:n.dim}),(0,e.jsx)(l,{label:" model",value:D}),(0,e.jsx)(l,{label:" window",value:P}),(0,e.jsx)(l,{label:" project",value:V}),(0,e.jsx)(l,{label:" folder",value:A}),r!==void 0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" target",value:r}),r!=="desktop"&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{label:" device_name",value:m??"(not set)",valueColor:m?void 0:n.dim}),(0,e.jsx)(l,{label:" os_version",value:f??"(not set)",valueColor:f?void 0:n.dim}),(0,e.jsx)(l,{label:" app",value:b??"(not set)",valueColor:b?void 0:n.dim})]})]}),c.length>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{label:"Device settings"}),c.map(o=>(0,e.jsx)(l,{label:` ${o.label}`,value:o.value},o.label))]}),(0,e.jsx)(i,{label:"Paths"}),(0,e.jsx)(l,{label:" chrome",value:R,valueColor:n.dim})]})})})}export{T as ConfigView};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-DJ76NDW6.js";import"./chunk-TO2ROHIJ.js";import"./chunk-5HJRYEOT.js";import"./chunk-CVVZ6NWR.js";import"./chunk-PEHVBCXM.js";import"./chunk-ZIRSTOEV.js";import"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-QLGQDNA3.js";import"./chunk-2EKLTUY2.js";import"./chunk-IINZZ4BZ.js";import"./chunk-EWSNJ3IX.js";import"./chunk-X3O4VGTM.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-TLYFHPNM.js";import"./chunk-Z36KVIRR.js";import"./chunk-Q4JV4U65.js";import"./chunk-RFHMDQXZ.js";import"./chunk-SMSQVGLH.js";import"./chunk-FTP2K6RS.js";import"./chunk-WLEWXE6L.js";import"./chunk-NMCE7VR2.js";import"./chunk-MTMHB5LF.js";import"./chunk-GMSWZIAS.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-JM45SLKV.js";import"./chunk-HCBYKLMW.js";import"./chunk-4JOD47QI.js";import"./chunk-TFSWG7AS.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import"./chunk-ATCJ7EHL.js";import"./chunk-PVN64537.js";import"./chunk-7WWCIS2B.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-DXXHCLFC.js";import"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-GMTHZUZ3.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{a as EvidenceViewOffer};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-LCBDNZL3.js";import"./chunk-P43YHCF3.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-4QTH7VYE.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as FolderPicker,a as formatFolderLine};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-4G2T54FE.js";import"./chunk-OX3ZAGCH.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as InfoBox};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a}from"./chunk-PHKJIJ7D.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as LinksBox};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-KJZD2ADR.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{b as ProfilesView,a as formatProfileLine};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-UVBPUZC4.js";import"./chunk-P43YHCF3.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-4QTH7VYE.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ProjectPicker,b as RUN_GATE_PICKER,a as formatProjectLine};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c}from"./chunk-A74JRNNX.js";import"./chunk-S3DAAAE5.js";import"./chunk-4G2T54FE.js";import"./chunk-OX3ZAGCH.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as SaveSessionPrompt,b as defaultSessionTimestamp,c as renderSavePrompt};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-BIXABKSK.js";import"./chunk-7V6JPZBM.js";import"./chunk-IDWAG6L4.js";import"./chunk-YZP4F23B.js";import"./chunk-72KYMWQ5.js";import"./chunk-CCOD4GQJ.js";import"./chunk-JQ64X2TO.js";import"./chunk-TDPWFYTJ.js";import"./chunk-EG3B52WU.js";import"./chunk-UVBPUZC4.js";import"./chunk-LCBDNZL3.js";import"./chunk-P43YHCF3.js";import"./chunk-SMXABALN.js";import"./chunk-QXZGBYGQ.js";import"./chunk-VE3SUJMA.js";import"./chunk-5D7ENQTQ.js";import"./chunk-FTP2K6RS.js";import"./chunk-WLEWXE6L.js";import"./chunk-NMCE7VR2.js";import"./chunk-MTMHB5LF.js";import"./chunk-SB26HQO7.js";import"./chunk-6CMBA5SG.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-TZXXJWHA.js";import"./chunk-RNKJXVG2.js";import"./chunk-HCBYKLMW.js";import"./chunk-Z7S3IWUX.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{b as SingleShotApp,a as phaseAfterAuth};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-4FA44D6S.js";import"./chunk-4G2T54FE.js";import"./chunk-OX3ZAGCH.js";import"./chunk-HCBYKLMW.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{d as AutoExitSummaryBox,c as SummaryBox,b as buildSummaryEvent,a as buildSummaryRendered};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{g as a}from"./chunk-55W3WAAL.js";import"./chunk-QYWWL7M7.js";import"./chunk-SBW3QVHN.js";import"./chunk-2VLM4L3S.js";import"./chunk-5Y2G4NC7.js";import"./chunk-IINZZ4BZ.js";import"./chunk-TDPWFYTJ.js";import"./chunk-QXZGBYGQ.js";import"./chunk-F2F257PU.js";import"./chunk-5D7ENQTQ.js";import"./chunk-2KPJ62RZ.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-JM45SLKV.js";import"./chunk-4G2T54FE.js";import"./chunk-OX3ZAGCH.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-TD6GCEIK.js";import"./chunk-APXJRWIJ.js";import"./chunk-HYJVYYAZ.js";import"./chunk-GMTHZUZ3.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{a as TestMdRunView};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-5OGYXLOR.js";import"./chunk-5HJRYEOT.js";import"./chunk-RFHMDQXZ.js";import"./chunk-OX3ZAGCH.js";import"./chunk-HCBYKLMW.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{a as buildServeMap,b as renderTestrunEvidenceTable};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as f,b as r}from"./chunk-ND6OP3O2.js";import{a as s}from"./chunk-HCBYKLMW.js";import{a as i,b as l,j as x}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as B}from"./chunk-6YGTRKDT.js";import{z as o}from"./chunk-J4FIESTB.js";import{e as a}from"./chunk-UR6MHSHU.js";var p=a(B(),1);var e=a(s(),1);function V({profile:b,env:g,authenticated:n,authMethod:v,username:c,tokenStatus:t,serverStatus:d,detail:u}){let{exit:m}=x();return(0,p.useEffect)(()=>{let h=setTimeout(()=>m(),50);return()=>clearTimeout(h)},[m]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(f,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:d==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):d==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:b}),(0,e.jsx)(r,{label:"Environment",value:g}),(0,e.jsx)(r,{label:"Method",value:v}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),u&&(0,e.jsx)(r,{label:"Detail",value:u})]})]})})})}export{V as WhoamiView};
2
+ import{a as f,b as r}from"./chunk-OX3ZAGCH.js";import{a as s}from"./chunk-HCBYKLMW.js";import{z as o}from"./chunk-YKOZBFR3.js";import{a as i,b as l,j as x}from"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as B}from"./chunk-6YGTRKDT.js";import{e as a}from"./chunk-UR6MHSHU.js";var p=a(B(),1);var e=a(s(),1);function V({profile:b,env:g,authenticated:n,authMethod:v,username:c,tokenStatus:t,serverStatus:d,detail:u}){let{exit:m}=x();return(0,p.useEffect)(()=>{let h=setTimeout(()=>m(),50);return()=>clearTimeout(h)},[m]),(0,e.jsx)(i,{flexDirection:"column",children:(0,e.jsx)(f,{title:"Identity",variant:n?"success":"warning",children:(0,e.jsxs)(i,{flexDirection:"column",paddingY:1,children:[(0,e.jsx)(i,{children:d==="rejected"?(0,e.jsx)(l,{color:o.red,bold:!0,children:"\u2717 Not authenticated"}):d==="unreachable"?(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Couldn't verify"}):n?(0,e.jsx)(l,{color:o.green,bold:!0,children:"\u2713 Authenticated"}):(0,e.jsx)(l,{color:o.orange,bold:!0,children:"\u26A0 Not logged in"})}),(0,e.jsxs)(i,{flexDirection:"column",marginTop:1,children:[(0,e.jsx)(r,{label:"Profile",value:b}),(0,e.jsx)(r,{label:"Environment",value:g}),(0,e.jsx)(r,{label:"Method",value:v}),c&&(0,e.jsx)(r,{label:"User",value:c}),t&&(0,e.jsx)(r,{label:"Token",value:t,valueColor:t==="valid"?o.green:t==="expired"?o.red:o.dim}),u&&(0,e.jsx)(r,{label:"Detail",value:u})]})]})})})}export{V as WhoamiView};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h}from"./chunk-SXRHKXSE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{h as AppClient,g as AppUploadError,a as UPLOAD_CONTENT_TYPE,e as parseAppDetails,b as parseAppListPage,d as parseSignedDownload,c as parseUploadResponse,f as transportReason};
2
+ import{a,b,c,d,e,f,g,h}from"./chunk-MTMHB5LF.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{h as AppClient,g as AppUploadError,a as UPLOAD_CONTENT_TYPE,e as parseAppDetails,b as parseAppListPage,d as parseSignedDownload,c as parseUploadResponse,f as transportReason};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as a,c as b}from"./chunk-NMCE7VR2.js";import"./chunk-MTMHB5LF.js";import"./chunk-YKOZBFR3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{a as isAppId,b as resolveCloudApp};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as q,b as Ne}from"./chunk-MEBEVHGP.js";import{d as $e}from"./chunk-CTHUX7O4.js";import"./chunk-VO2NNXKR.js";import{c as Ae,e as Ie,f as ve}from"./chunk-UJ37XGSP.js";import{f as Ee,k as ye}from"./chunk-7SU53QGU.js";import"./chunk-SXBPUUQ5.js";import"./chunk-6HRNG4CK.js";import"./chunk-JBKHX5ES.js";import"./chunk-4CJQ7XZP.js";import"./chunk-TAY7J5VS.js";import{g as le}from"./chunk-3RO2YGKH.js";import"./chunk-73Y6T2UK.js";import"./chunk-NI3TIAD7.js";import{e as ue}from"./chunk-XMPTFXPW.js";import"./chunk-GAKBHNC4.js";import"./chunk-U2VYTVKV.js";import{a as pe}from"./chunk-32HED7X2.js";import"./chunk-HIUAUZNL.js";import"./chunk-X2MDL6S4.js";import"./chunk-YNDELIXL.js";import"./chunk-LRNUGKYH.js";import"./chunk-ZHAMVLQZ.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import{a as H,b as j,d as ge,e as me,f as he,g as _e,i as we}from"./chunk-YQZ736IQ.js";import{h as fe}from"./chunk-ZDCXWEQG.js";import"./chunk-LZPYIFHZ.js";import"./chunk-L3BUPFAQ.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-Z24SD2EJ.js";import"./chunk-AQ2OG2EF.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import"./chunk-23DKB2MT.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-CQDCNP7V.js";import"./chunk-EHB55V23.js";import"./chunk-TD6GCEIK.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import{c as B}from"./chunk-EBJW6POT.js";import"./chunk-PVN64537.js";import{a as V,ba as de,c as G,e as ie,f as ae,fa as ce}from"./chunk-WE7HRAGO.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import{a as I}from"./chunk-4C7WVQOD.js";import"./chunk-QXQ7KVEN.js";import"./chunk-Z47ZEFH7.js";import"./chunk-7YV2FCN4.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-PI7OXS62.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-ZAQGIC33.js";import"./chunk-VO66KP2W.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import{a as ne,c as re}from"./chunk-ZCBOHWN3.js";import{a as oe}from"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-TM45NPWL.js";import"./chunk-FOJHSG5M.js";import{a as x}from"./chunk-J4FIESTB.js";import"./chunk-UR6MHSHU.js";import{mkdtempSync as We}from"fs";import{tmpdir as Xe}from"os";import{join as Ye}from"path";function W(e){if(e<1e3)return`${Math.max(0,Math.round(e))}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m${String(t%60).padStart(2,"0")}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,"0")}m`}var be=e=>e===null?"none":`${e.run}@v${e.run_version}+${e.deltas}${e.cut!==void 0?` cut ${String(e.cut)}`:""}`;function Te(e,t){return[`assurance-job: job ${e.jobId} \xB7 attempt ${e.attempt} \xB7 trigger ${e.trigger} \xB7 kane-cli ${t} \xB7 ${e.env}`,`assurance-job: exploration ${e.explorationId} \xB7 run ${e.runId} \xB7 cut ${String(e.cut)} \xB7 project ${e.projectId}`,`assurance-job: cursor ${be(e.cursorFrom)} \u2192 ${be(e.cursorTo)}${e.cursorFromUnreadable?" (KANE_AJ_CURSOR_FROM unreadable: ignored)":""}`]}function Be(e){return e==null?null:typeof e=="string"?e.length>120?`${JSON.stringify(e.slice(0,117))}\u2026`:/[\s"]/.test(e)?JSON.stringify(e):e:typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?`[${e.length}]`:typeof e=="object"?"{\u2026}":null}var He=new Set(["type","v","ts","kind","verb"]);function O(e,t){if(typeof t=="string")return`${e} ${t.length>400?`${t.slice(0,397)}\u2026`:t}`;let n=typeof t.type=="string"?t.type:typeof t.kind=="string"?t.kind:"line",o=[];for(let[s,r]of Object.entries(t)){if(He.has(s))continue;let u=Be(r);if(u!==null&&(o.push(`${s}=${u}`),o.length===8))break}return`${e} ${n}${o.length?` ${o.join(" ")}`:""}`}function Re(e){if(e.length===0)return["assurance-job: summary: no session ran"];let t=e.map(r=>[r.verb,r.target,r.status,r.tests===null?"-":String(r.tests),r.ms===null?"-":`${Math.round(r.ms/100)/10}s`]),n=["verb","target","status","tests","seconds"],o=n.map((r,u)=>Math.max(r.length,...t.map(a=>a[u].length))),s=r=>`assurance-job: ${r.map((u,a)=>u.padEnd(o[a])).join(" ").trimEnd()}`;return["assurance-job: summary",s(n),...t.map(s)]}var je="assurance-job-outcome/1",Se=["run_end","checkpoint","manual","catch_up"],X=e=>typeof e=="number"&&Number.isInteger(e)&&e>=0,U=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;function J(e){let t;try{t=JSON.parse(e)}catch{return null}if(Array.isArray(t)){let[s,r,u,a,i,c]=t;t={export_version:s,run:r,run_version:u,deltas:a,...t.length>=6?{cut:i,provisional:c}:{}}}if(typeof t!="object"||t===null)return null;let n=t;if(typeof n.export_version!="string"||n.export_version===""||typeof n.run!="string"||n.run===""||!X(n.run_version)||!X(n.deltas))return null;let o={export_version:n.export_version,run:n.run,run_version:n.run_version,deltas:n.deltas};if(n.cut!==void 0||n.provisional!==void 0){if(n.cut!=="end"&&!X(n.cut)||typeof n.provisional!="boolean")return null;o.cut=n.cut,o.provisional=n.provisional}return o}var xe=new Set(["exploration-export/1","exploration-export/2"]);function v(e,t){return!xe.has(e.export_version)||!xe.has(t.export_version)?"unordered":e.run_version<t.run_version?"older":e.run_version>t.run_version?"at-or-past":e.deltas<t.deltas?"older":e.deltas>t.deltas?"at-or-past":!Oe(e)&&Oe(t)?"older":"at-or-past"}var Oe=e=>e.cut===void 0||e.cut==="end";function Je(e,t){let n=[],o={KANE_AJ_JOB_ID:e.KANE_AJ_JOB_ID,KANE_AJ_ATTEMPT:e.KANE_AJ_ATTEMPT,KANE_AJ_TRIGGER:e.KANE_AJ_TRIGGER,KANE_AJ_EXPLORATION_ID:e.KANE_AJ_EXPLORATION_ID,KANE_AJ_RUN_ID:e.KANE_AJ_RUN_ID,KANE_AJ_CUT:e.KANE_AJ_CUT,KANE_AJ_PROJECT_ID:e.KANE_AJ_PROJECT_ID,KANE_AJ_CURSOR_FROM:e.KANE_AJ_CURSOR_FROM,KANE_AJ_CURSOR_TO:e.KANE_AJ_CURSOR_TO,KANE_AJ_REPORT_URL:e.KANE_AJ_REPORT_URL,TESTMUAI_ENV:e.TESTMUAI_ENV,LT_USERNAME:e.LT_USERNAME,LT_ACCESS_KEY:e.LT_ACCESS_KEY},s=$=>{let S=o[$];return S===void 0||S.trim()===""?(n.push(`${$} is not set`),null):S.trim()},r={},u=s("KANE_AJ_JOB_ID");u!==null&&(U.test(u)?r.jobId=u:n.push("KANE_AJ_JOB_ID is not an id"));let a=s("KANE_AJ_ATTEMPT");a!==null&&(a==="1"||a==="2"?r.attempt=Number(a):n.push("KANE_AJ_ATTEMPT is not 1 or 2"));let i=s("KANE_AJ_TRIGGER");i!==null&&(Se.includes(i)?r.trigger=i:n.push(`KANE_AJ_TRIGGER is not one of ${Se.join(" | ")}`));let c=s("KANE_AJ_EXPLORATION_ID");c!==null&&(U.test(c)?r.explorationId=c:n.push("KANE_AJ_EXPLORATION_ID is not an id"));let f=s("KANE_AJ_RUN_ID");f!==null&&(U.test(f)?r.runId=f:n.push("KANE_AJ_RUN_ID is not an id"));let g=s("KANE_AJ_CUT");g!==null&&(g==="end"?r.cut="end":/^\d{1,9}$/.test(g)?r.cut=Number(g):n.push('KANE_AJ_CUT is not a whole number or "end"'));let h=s("KANE_AJ_PROJECT_ID");h!==null&&!U.test(h)&&n.push("KANE_AJ_PROJECT_ID is not an id");let d=o.KANE_AJ_CURSOR_FROM?.trim()??"",_=d===""?null:J(d),l=s("KANE_AJ_CURSOR_TO"),m=l===null?null:J(l);l!==null&&m===null&&n.push("KANE_AJ_CURSOR_TO is not a cursor"),m!==null&&r.runId!==void 0&&m.run!==r.runId&&n.push("KANE_AJ_CURSOR_TO names another run than KANE_AJ_RUN_ID");let p=s("TESTMUAI_ENV"),y=p==="prod"||p==="stage";p!==null&&!y&&n.push("TESTMUAI_ENV is not prod or stage");let w=s("KANE_AJ_REPORT_URL"),R=!1;if(w!==null){let $=null;try{$=new URL(w)}catch{$=null}let S=M=>M==="localhost"||M==="127.0.0.1"||M==="[::1]",P=null;if(y)try{P=t(p)}catch{P=null}$===null||!($.protocol==="https:"||$.protocol==="http:"&&S($.hostname))?n.push("KANE_AJ_REPORT_URL is not an https address"):y?P===null?n.push("TESTMUAI_BASE_URL is not a URL, so KANE_AJ_REPORT_URL can't be checked"):$.origin!==P?n.push("KANE_AJ_REPORT_URL is not on the controller's origin"):R=!0:n.push("KANE_AJ_REPORT_URL can't be checked without a valid TESTMUAI_ENV")}let N=s("LT_USERNAME"),A=s("LT_ACCESS_KEY");if(n.length>0){let $=r.jobId!==void 0&&R&&N!==null&&A!==null?{url:w,login:{username:N,accessKey:A}}:null;return{ok:!1,identity:r,message:n.join("; "),report:$}}return{ok:!0,input:{jobId:r.jobId,attempt:r.attempt,trigger:r.trigger,explorationId:r.explorationId,runId:r.runId,cut:r.cut,projectId:h,cursorFrom:_,cursorFromUnreadable:d!==""&&_===null,cursorTo:m,reportUrl:w,env:p,login:{username:N,accessKey:A}}}}function Y(e,t){return{v:je,job_id:e.jobId??null,attempt:e.attempt??null,trigger:e.trigger??null,exploration_id:e.explorationId??null,run_id:e.runId??null,cut:e.cut??null,cursor:{from:null,to:null},status:"failed",use_cases:{added:[],modified:[]},tests:{designed:0,saved:0,updated:0,failed:[],saved_cases:[]},held:[],sessions:[],credits:null,duration_s:0,kane_cli_version:t,error:null,errors:[]}}function z(e){if(e===null||e.accessKey==="")return n=>n;let t=[e.accessKey,Buffer.from(`${e.username}:${e.accessKey}`,"utf8").toString("base64")].filter(n=>n.length>=4);return n=>t.reduce((o,s)=>o.split(s).join("[redacted]"),n)}var Q=(e,t)=>t(JSON.stringify(e));async function Z(e,t,n,o={}){let s=o.fetch??fetch,r=o.backoffMs??[1e3,2e3,4e3],u=o.sleep??(i=>new Promise(c=>setTimeout(c,i))),a=`Basic ${Buffer.from(`${n.username}:${n.accessKey}`,"utf8").toString("base64")}`;for(let i=0;i<=r.length;i++){i>0&&await u(r[i-1]);try{let c=await s(e,{method:"POST",headers:{authorization:a,"content-type":"application/json"},body:t,signal:AbortSignal.timeout(3e4)});if(c.ok)return!0;if(c.status!==429&&c.status<500)return!1}catch{}}return!1}var b=class extends Error{constructor(n,o,s){super(s);this.status=n;this.code=o}},E=(e,t)=>{throw new b("failed",e,t)};async function Ce(e,t,n,o){let s;try{s=await e.sources(t)}catch(i){if(i instanceof I&&(i.code==="NO_CONTEXT"||i.code==="NOT_FOUND"))return{source:null,cursor:null};throw i}let r=s.find(i=>i.sourceId===n&&i.head!==null)??null,u=r?.media?.format==="plugin"&&r.media.plugin?.id==="explore"?r.media.plugin.fetch:void 0,a=u?.ref===o&&typeof u.cursor=="string"?J(u.cursor):null;return{source:r,cursor:a}}async function ze(e,t,n){return n.head===null||n.completeness?.sourceCid===n.head?!1:!(await e.mainNode(t,n.head)).edgesOut.some(s=>s.type==="DERIVES"&&s.other?.label==="usecase")}async function De(e,t){let n=j("explore",t?{fetchImpl:t}:{});if(n===void 0)return E("INTERNAL","this build has no connection for the explore plugin");let o=`${H().replace(/\/+$/,"")}/exploration/${encodeURIComponent(e.explorationId)}/assurance/head?cut=${e.cut}&run=${encodeURIComponent(e.runId)}`,s;try{s=await n.request({url:o,headers:{accept:"application/json"}})}catch(a){return E("INGEST_FAILED",`the controller could not be read for exploration ${e.explorationId}: ${a instanceof Error?a.message:String(a)}`)}finally{n.close()}let r={};try{r=JSON.parse(new TextDecoder().decode(s.body))}catch{r={}}if((s.status===401||s.status===403)&&E("AUTH_FAILED",`the controller refused the job's credentials (${s.status})`),s.status===409&&r.code==="RUN_ACTIVE"&&E("RUN_ACTIVE",`a run of exploration ${e.explorationId} is in progress${typeof r.active_run=="string"?` (run ${r.active_run})`:""}: its export is read once it ends`),s.status===404&&r.code==="NO_ENDED_RUN"&&E("NO_ENDED_RUN",`exploration ${e.explorationId} has no ended run yet`),s.status===409&&r.code==="CUT_SUPERSEDED")throw new b("noop",null,"");s.status===404&&r.code==="CUT_NOT_FOUND"&&E("CUT_NOT_FOUND",`cut ${e.cut} of run ${e.runId} of exploration ${e.explorationId} was never taken`),s.status!==200&&E("INGEST_FAILED",`the controller answered ${s.status} for the head of exploration ${e.explorationId}`);let u=J(JSON.stringify(r.cursor??null));return u===null?E("INGEST_FAILED",`the controller's head of exploration ${e.explorationId} carries no cursor`):u}async function Qe(e,t){let n=j("explore",t?{fetchImpl:t}:{});if(n===void 0)return!1;try{let o={exploration:e.explorationId,run:e.runId,cut:e.cut},s=await n.request({url:he(H(),o,"export"),headers:{accept:"application/json"}});return s.status!==200?!1:me(_e(s,o)).units.length===0}catch{return!1}finally{n.close()}}function L(e){return e==="MARK_REFUSED"||e==="PERMISSION_REQUIRED"?"MARK_REFUSED":e==="PROJECT_NOT_MARKED"||e==="ASSURANCE_OFF"?"PROJECT_NOT_MARKED":null}function Pe(e){return/\(CUT_NOT_FOUND\)/.test(e)?"CUT_NOT_FOUND":/is in progress/.test(e)?"RUN_ACTIVE":/no ended run/.test(e)?"NO_ENDED_RUN":/refused (kane-cli's credentials|the credential)/.test(e)?"AUTH_FAILED":"INGEST_FAILED"}async function D(e,t){let n=e.deps.now??Date.now,o=n(),s=`[${t.verb} ${t.log.target}]`,r=t.verb==="extract"||t.verb==="reconcile"?`source ${t.log.target}`:`use case ${t.log.target}`;e.diag(`[${t.log.step}] ${t.verb} starting (${r})${t.resume!==void 0?`: resuming session ${t.resume}`:""}`);let u=[],a=m=>{for(let p of m.split(`
2
+ import{a as q,b as Ne}from"./chunk-DBMDAWTA.js";import{d as $e}from"./chunk-I3G3IUKY.js";import"./chunk-HGKAUG7L.js";import{c as Ae,e as Ie,f as ve}from"./chunk-BXAPTB2H.js";import{f as Ee,k as ye}from"./chunk-QOXUGYEA.js";import"./chunk-LLDEAV3W.js";import"./chunk-3VSAAB2W.js";import"./chunk-GJYMR4RT.js";import"./chunk-BV7NUIRT.js";import"./chunk-QLGQDNA3.js";import"./chunk-EWSNJ3IX.js";import{g as le}from"./chunk-X3O4VGTM.js";import"./chunk-73Y6T2UK.js";import{e as ue}from"./chunk-XMPTFXPW.js";import"./chunk-EUGFABAS.js";import"./chunk-U2VYTVKV.js";import"./chunk-HIUAUZNL.js";import"./chunk-BPTWMV5L.js";import"./chunk-FH4FWIET.js";import"./chunk-2CJ75THZ.js";import"./chunk-3A4KK22B.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import{a as pe}from"./chunk-6KUUSONE.js";import{a as H,b as j,d as ge,e as me,f as he,g as _e,i as we}from"./chunk-56NUPYFG.js";import"./chunk-LZPYIFHZ.js";import{h as fe}from"./chunk-GRQKMOKE.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-REKHAN53.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import"./chunk-TD6GCEIK.js";import"./chunk-5ORBAYTU.js";import{c as B}from"./chunk-ATCJ7EHL.js";import"./chunk-PVN64537.js";import{a as V,ba as de,c as G,e as ie,f as ae,fa as ce}from"./chunk-7WWCIS2B.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import{a as I}from"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-DXXHCLFC.js";import"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import{a as oe}from"./chunk-4QTH7VYE.js";import{a as ne,c as re}from"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import{a as x}from"./chunk-YKOZBFR3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-FOJHSG5M.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";import{mkdtempSync as We}from"fs";import{tmpdir as Xe}from"os";import{join as Ye}from"path";function W(e){if(e<1e3)return`${Math.max(0,Math.round(e))}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m${String(t%60).padStart(2,"0")}s`:`${Math.floor(n/60)}h${String(n%60).padStart(2,"0")}m`}var be=e=>e===null?"none":`${e.run}@v${e.run_version}+${e.deltas}${e.cut!==void 0?` cut ${String(e.cut)}`:""}`;function Te(e,t){return[`assurance-job: job ${e.jobId} \xB7 attempt ${e.attempt} \xB7 trigger ${e.trigger} \xB7 kane-cli ${t} \xB7 ${e.env}`,`assurance-job: exploration ${e.explorationId} \xB7 run ${e.runId} \xB7 cut ${String(e.cut)} \xB7 project ${e.projectId}`,`assurance-job: cursor ${be(e.cursorFrom)} \u2192 ${be(e.cursorTo)}${e.cursorFromUnreadable?" (KANE_AJ_CURSOR_FROM unreadable: ignored)":""}`]}function Be(e){return e==null?null:typeof e=="string"?e.length>120?`${JSON.stringify(e.slice(0,117))}\u2026`:/[\s"]/.test(e)?JSON.stringify(e):e:typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?`[${e.length}]`:typeof e=="object"?"{\u2026}":null}var He=new Set(["type","v","ts","kind","verb"]);function O(e,t){if(typeof t=="string")return`${e} ${t.length>400?`${t.slice(0,397)}\u2026`:t}`;let n=typeof t.type=="string"?t.type:typeof t.kind=="string"?t.kind:"line",o=[];for(let[s,r]of Object.entries(t)){if(He.has(s))continue;let u=Be(r);if(u!==null&&(o.push(`${s}=${u}`),o.length===8))break}return`${e} ${n}${o.length?` ${o.join(" ")}`:""}`}function Re(e){if(e.length===0)return["assurance-job: summary: no session ran"];let t=e.map(r=>[r.verb,r.target,r.status,r.tests===null?"-":String(r.tests),r.ms===null?"-":`${Math.round(r.ms/100)/10}s`]),n=["verb","target","status","tests","seconds"],o=n.map((r,u)=>Math.max(r.length,...t.map(a=>a[u].length))),s=r=>`assurance-job: ${r.map((u,a)=>u.padEnd(o[a])).join(" ").trimEnd()}`;return["assurance-job: summary",s(n),...t.map(s)]}var je="assurance-job-outcome/1",Se=["run_end","checkpoint","manual","catch_up"],X=e=>typeof e=="number"&&Number.isInteger(e)&&e>=0,U=/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;function J(e){let t;try{t=JSON.parse(e)}catch{return null}if(Array.isArray(t)){let[s,r,u,a,i,c]=t;t={export_version:s,run:r,run_version:u,deltas:a,...t.length>=6?{cut:i,provisional:c}:{}}}if(typeof t!="object"||t===null)return null;let n=t;if(typeof n.export_version!="string"||n.export_version===""||typeof n.run!="string"||n.run===""||!X(n.run_version)||!X(n.deltas))return null;let o={export_version:n.export_version,run:n.run,run_version:n.run_version,deltas:n.deltas};if(n.cut!==void 0||n.provisional!==void 0){if(n.cut!=="end"&&!X(n.cut)||typeof n.provisional!="boolean")return null;o.cut=n.cut,o.provisional=n.provisional}return o}var xe=new Set(["exploration-export/1","exploration-export/2"]);function v(e,t){return!xe.has(e.export_version)||!xe.has(t.export_version)?"unordered":e.run_version<t.run_version?"older":e.run_version>t.run_version?"at-or-past":e.deltas<t.deltas?"older":e.deltas>t.deltas?"at-or-past":!Oe(e)&&Oe(t)?"older":"at-or-past"}var Oe=e=>e.cut===void 0||e.cut==="end";function Je(e,t){let n=[],o={KANE_AJ_JOB_ID:e.KANE_AJ_JOB_ID,KANE_AJ_ATTEMPT:e.KANE_AJ_ATTEMPT,KANE_AJ_TRIGGER:e.KANE_AJ_TRIGGER,KANE_AJ_EXPLORATION_ID:e.KANE_AJ_EXPLORATION_ID,KANE_AJ_RUN_ID:e.KANE_AJ_RUN_ID,KANE_AJ_CUT:e.KANE_AJ_CUT,KANE_AJ_PROJECT_ID:e.KANE_AJ_PROJECT_ID,KANE_AJ_CURSOR_FROM:e.KANE_AJ_CURSOR_FROM,KANE_AJ_CURSOR_TO:e.KANE_AJ_CURSOR_TO,KANE_AJ_REPORT_URL:e.KANE_AJ_REPORT_URL,TESTMUAI_ENV:e.TESTMUAI_ENV,LT_USERNAME:e.LT_USERNAME,LT_ACCESS_KEY:e.LT_ACCESS_KEY},s=$=>{let S=o[$];return S===void 0||S.trim()===""?(n.push(`${$} is not set`),null):S.trim()},r={},u=s("KANE_AJ_JOB_ID");u!==null&&(U.test(u)?r.jobId=u:n.push("KANE_AJ_JOB_ID is not an id"));let a=s("KANE_AJ_ATTEMPT");a!==null&&(a==="1"||a==="2"?r.attempt=Number(a):n.push("KANE_AJ_ATTEMPT is not 1 or 2"));let i=s("KANE_AJ_TRIGGER");i!==null&&(Se.includes(i)?r.trigger=i:n.push(`KANE_AJ_TRIGGER is not one of ${Se.join(" | ")}`));let c=s("KANE_AJ_EXPLORATION_ID");c!==null&&(U.test(c)?r.explorationId=c:n.push("KANE_AJ_EXPLORATION_ID is not an id"));let f=s("KANE_AJ_RUN_ID");f!==null&&(U.test(f)?r.runId=f:n.push("KANE_AJ_RUN_ID is not an id"));let g=s("KANE_AJ_CUT");g!==null&&(g==="end"?r.cut="end":/^\d{1,9}$/.test(g)?r.cut=Number(g):n.push('KANE_AJ_CUT is not a whole number or "end"'));let h=s("KANE_AJ_PROJECT_ID");h!==null&&!U.test(h)&&n.push("KANE_AJ_PROJECT_ID is not an id");let d=o.KANE_AJ_CURSOR_FROM?.trim()??"",_=d===""?null:J(d),l=s("KANE_AJ_CURSOR_TO"),m=l===null?null:J(l);l!==null&&m===null&&n.push("KANE_AJ_CURSOR_TO is not a cursor"),m!==null&&r.runId!==void 0&&m.run!==r.runId&&n.push("KANE_AJ_CURSOR_TO names another run than KANE_AJ_RUN_ID");let p=s("TESTMUAI_ENV"),y=p==="prod"||p==="stage";p!==null&&!y&&n.push("TESTMUAI_ENV is not prod or stage");let w=s("KANE_AJ_REPORT_URL"),R=!1;if(w!==null){let $=null;try{$=new URL(w)}catch{$=null}let S=M=>M==="localhost"||M==="127.0.0.1"||M==="[::1]",P=null;if(y)try{P=t(p)}catch{P=null}$===null||!($.protocol==="https:"||$.protocol==="http:"&&S($.hostname))?n.push("KANE_AJ_REPORT_URL is not an https address"):y?P===null?n.push("TESTMUAI_BASE_URL is not a URL, so KANE_AJ_REPORT_URL can't be checked"):$.origin!==P?n.push("KANE_AJ_REPORT_URL is not on the controller's origin"):R=!0:n.push("KANE_AJ_REPORT_URL can't be checked without a valid TESTMUAI_ENV")}let N=s("LT_USERNAME"),A=s("LT_ACCESS_KEY");if(n.length>0){let $=r.jobId!==void 0&&R&&N!==null&&A!==null?{url:w,login:{username:N,accessKey:A}}:null;return{ok:!1,identity:r,message:n.join("; "),report:$}}return{ok:!0,input:{jobId:r.jobId,attempt:r.attempt,trigger:r.trigger,explorationId:r.explorationId,runId:r.runId,cut:r.cut,projectId:h,cursorFrom:_,cursorFromUnreadable:d!==""&&_===null,cursorTo:m,reportUrl:w,env:p,login:{username:N,accessKey:A}}}}function Y(e,t){return{v:je,job_id:e.jobId??null,attempt:e.attempt??null,trigger:e.trigger??null,exploration_id:e.explorationId??null,run_id:e.runId??null,cut:e.cut??null,cursor:{from:null,to:null},status:"failed",use_cases:{added:[],modified:[]},tests:{designed:0,saved:0,updated:0,failed:[],saved_cases:[]},held:[],sessions:[],credits:null,duration_s:0,kane_cli_version:t,error:null,errors:[]}}function z(e){if(e===null||e.accessKey==="")return n=>n;let t=[e.accessKey,Buffer.from(`${e.username}:${e.accessKey}`,"utf8").toString("base64")].filter(n=>n.length>=4);return n=>t.reduce((o,s)=>o.split(s).join("[redacted]"),n)}var Q=(e,t)=>t(JSON.stringify(e));async function Z(e,t,n,o={}){let s=o.fetch??fetch,r=o.backoffMs??[1e3,2e3,4e3],u=o.sleep??(i=>new Promise(c=>setTimeout(c,i))),a=`Basic ${Buffer.from(`${n.username}:${n.accessKey}`,"utf8").toString("base64")}`;for(let i=0;i<=r.length;i++){i>0&&await u(r[i-1]);try{let c=await s(e,{method:"POST",headers:{authorization:a,"content-type":"application/json"},body:t,signal:AbortSignal.timeout(3e4)});if(c.ok)return!0;if(c.status!==429&&c.status<500)return!1}catch{}}return!1}var b=class extends Error{constructor(n,o,s){super(s);this.status=n;this.code=o}},E=(e,t)=>{throw new b("failed",e,t)};async function Ce(e,t,n,o){let s;try{s=await e.sources(t)}catch(i){if(i instanceof I&&(i.code==="NO_CONTEXT"||i.code==="NOT_FOUND"))return{source:null,cursor:null};throw i}let r=s.find(i=>i.sourceId===n&&i.head!==null)??null,u=r?.media?.format==="plugin"&&r.media.plugin?.id==="explore"?r.media.plugin.fetch:void 0,a=u?.ref===o&&typeof u.cursor=="string"?J(u.cursor):null;return{source:r,cursor:a}}async function ze(e,t,n){return n.head===null||n.completeness?.sourceCid===n.head?!1:!(await e.mainNode(t,n.head)).edgesOut.some(s=>s.type==="DERIVES"&&s.other?.label==="usecase")}async function De(e,t){let n=j("explore",t?{fetchImpl:t}:{});if(n===void 0)return E("INTERNAL","this build has no connection for the explore plugin");let o=`${H().replace(/\/+$/,"")}/exploration/${encodeURIComponent(e.explorationId)}/assurance/head?cut=${e.cut}&run=${encodeURIComponent(e.runId)}`,s;try{s=await n.request({url:o,headers:{accept:"application/json"}})}catch(a){return E("INGEST_FAILED",`the controller could not be read for exploration ${e.explorationId}: ${a instanceof Error?a.message:String(a)}`)}finally{n.close()}let r={};try{r=JSON.parse(new TextDecoder().decode(s.body))}catch{r={}}if((s.status===401||s.status===403)&&E("AUTH_FAILED",`the controller refused the job's credentials (${s.status})`),s.status===409&&r.code==="RUN_ACTIVE"&&E("RUN_ACTIVE",`a run of exploration ${e.explorationId} is in progress${typeof r.active_run=="string"?` (run ${r.active_run})`:""}: its export is read once it ends`),s.status===404&&r.code==="NO_ENDED_RUN"&&E("NO_ENDED_RUN",`exploration ${e.explorationId} has no ended run yet`),s.status===409&&r.code==="CUT_SUPERSEDED")throw new b("noop",null,"");s.status===404&&r.code==="CUT_NOT_FOUND"&&E("CUT_NOT_FOUND",`cut ${e.cut} of run ${e.runId} of exploration ${e.explorationId} was never taken`),s.status!==200&&E("INGEST_FAILED",`the controller answered ${s.status} for the head of exploration ${e.explorationId}`);let u=J(JSON.stringify(r.cursor??null));return u===null?E("INGEST_FAILED",`the controller's head of exploration ${e.explorationId} carries no cursor`):u}async function Qe(e,t){let n=j("explore",t?{fetchImpl:t}:{});if(n===void 0)return!1;try{let o={exploration:e.explorationId,run:e.runId,cut:e.cut},s=await n.request({url:he(H(),o,"export"),headers:{accept:"application/json"}});return s.status!==200?!1:me(_e(s,o)).units.length===0}catch{return!1}finally{n.close()}}function L(e){return e==="MARK_REFUSED"||e==="PERMISSION_REQUIRED"?"MARK_REFUSED":e==="PROJECT_NOT_MARKED"||e==="ASSURANCE_OFF"?"PROJECT_NOT_MARKED":null}function Pe(e){return/\(CUT_NOT_FOUND\)/.test(e)?"CUT_NOT_FOUND":/is in progress/.test(e)?"RUN_ACTIVE":/no ended run/.test(e)?"NO_ENDED_RUN":/refused (kane-cli's credentials|the credential)/.test(e)?"AUTH_FAILED":"INGEST_FAILED"}async function D(e,t){let n=e.deps.now??Date.now,o=n(),s=`[${t.verb} ${t.log.target}]`,r=t.verb==="extract"||t.verb==="reconcile"?`source ${t.log.target}`:`use case ${t.log.target}`;e.diag(`[${t.log.step}] ${t.verb} starting (${r})${t.resume!==void 0?`: resuming session ${t.resume}`:""}`);let u=[],a=m=>{for(let p of m.split(`
3
3
  `)){if(p.trim()==="")continue;let y;try{y=JSON.parse(p)}catch{e.diag(O(s,e.redact(p)));continue}u.push(y);let w;try{w=JSON.parse(e.redact(p))}catch{w=e.redact(p)}e.diag(O(s,w))}},i=m=>{for(let p of m.split(`
4
4
  `))p.trim()!==""&&e.diag(O(`${s} stderr:`,e.redact(p)))},c=ue("ndjson",t.verb,{stdout:a,stderr:i}),f=null,g=await ye({verb:t.verb,mode:"agent",choice:e.choice,basicAuth:e.basicAuth,start:t.resume!==void 0?{kind:"resume",sessionId:t.resume}:{kind:"new",body:{projectId:e.input.projectId,verb:t.verb,mode:"agent",...t.body}},run:t.run,io:c,check:e.deps.check??Ee,onProgress:()=>{},onOpened:m=>{f=m.sessionId,e.diag(`[${t.log.step}] ${t.verb} started: session ${m.sessionId} (${r})`)},...t.step?{ingest:[t.step.step]}:{},signals:!1,onRefusal:m=>{u.push({type:"error",code:m.code??null,message:m.message}),e.diag(O(s,{type:"refused",code:m.code??null,message:e.redact(m.message)}))},...e.deps.run?{testing:e.deps.run}:{}}),h=t.step?t.step.ended():null;f??=h?.sid??null,f!==null&&!e.outcome.sessions.includes(f)&&e.outcome.sessions.push(f);let d=null;for(let m of u){let p=m.credits_consumed??m.credits;typeof p=="number"&&Number.isFinite(p)&&(d=(d??0)+p)}d!==null&&(e.credits=(e.credits??0)+d);let _=n()-o;e.diag(`[${t.log.step}] ${t.verb} ended exit ${g} \xB7 ${W(_)}${d!==null?` \xB7 ${d} credits`:""}${f!==null?` \xB7 session ${f}`:" \xB7 no session opened"}`);let l={verb:t.verb,target:t.log.target,status:g===0?"ran":g===3?"paused":`exit ${g}`,tests:null,ms:_};return e.summary.push(l),{code:g,sid:f,lines:u,end:h,row:l}}function Ke(e,t,n,o,s,r){s.tests=r.tests,r.ok?s.status=s.status==="ran"?"saved":`saved (${s.status})`:s.status="save failed",e.diag(r.ok?`[${t}] ${n} saved: session ${o} \xB7 ${r.tests} test(s)`:`[${t}] ${n} NOT saved: session ${o} \xB7 ${r.message}`)}async function Me(e,t){let n=0,o="",s=null,r=new Proxy(e.person,{get(a,i,c){let f=Reflect.get(a,i,c);return i!=="land"||typeof f!="function"?f:async(...g)=>(s=await f.apply(a,g),s)}}),u=await $e({person:r,projectId:e.input.projectId,projectName:e.choice.projectName,sid:t,mode:"agent",yes:!0,confirm:async()=>!0,onProgress:a=>{let i=a;i.kind==="save"&&i.phase==="check"&&(n=i.counts?.tests??0)},emit:a=>{let i=a;i.type==="error"&&typeof i.message=="string"&&(o=i.message)},print:()=>{}});return u===0&&s!==null&&await et(e,t,s,n),u===0?{ok:!0,tests:n,message:o}:{ok:!1,tests:n,message:o||`the save of session ${t} ended with exit ${u}`}}async function F(e,t,n){let o=new Array(e.length),s=0,r=async()=>{for(;s<e.length;){let u=s++;o[u]=await n(e[u])}};return await Promise.all(Array.from({length:Math.min(t,e.length)},r)),o}function Ze(e,t){for(let n of t){let o=new Map;for(let s of ie(n)){let r=e.get(s.old);r!==void 0&&e.delete(s.old),s.new!==null&&o.set(s.new,r?.change??"updated")}for(let s of G(n)){if(s.label!=="test")continue;let r=typeof s.content.definitionId=="string"?s.content.definitionId:null;e.set(s.cid,{change:o.get(s.cid)??"added",definitionId:r})}}}async function et(e,t,n,o){let s=Array.from({length:Math.max(0,n.position-n.basePosition)},(u,a)=>n.basePosition+1+a),r;try{r=await F(s,8,u=>e.person.mainRecord(e.input.projectId,u))}catch(u){e.savedUnlisted+=o,e.diag(`assurance-job: session ${t}'s landed records couldn't be read (${u instanceof Error?u.message:String(u)}): its ${o} test(s) counted, not listed`);return}Ze(e.savedTests,r.map(u=>u.record))}async function tt(e,t,n){let{person:o}=e,s=Date.now(),r=(await o.project(t))?.mainPosition??0,u=[];for(let a=1;a<=r;a+=1){let{record:i}=await o.mainRecord(t,a);for(let c of G(i))c.label==="source"&&c.content.source_id===n&&!u.includes(c.cid)&&u.push(c.cid)}return e.diag(`assurance-job: scope walk read ${r} main position(s) in ${Date.now()-s}ms, ${u.length} version(s) of ${n}`),u}async function se(e,t,n){let o=new Set;for(let s of await tt(e,t,n)){let r=await e.person.mainNode(t,s);for(let u of r.edgesOut)u.type==="DERIVES"&&u.other?.label==="usecase"&&u.other.name&&o.add(u.other.name)}return o}async function st(e,t,n){return(await e.stale(t)).some(o=>o.label==="usecase"&&o.name!==null&&n.has(o.name))}function te(e,t){let n=null;for(let o of t){if(o.type==="extract_use_cases"&&Array.isArray(o.use_cases))for(let s of o.use_cases)typeof s.id=="string"&&!e.outcome.use_cases.added.includes(s.id)&&e.outcome.use_cases.added.push(s.id);if(o.type==="reconcile_use_cases"&&Array.isArray(o.use_cases))for(let s of o.use_cases)s.state==="new"&&typeof s.id=="string"&&!e.outcome.use_cases.added.includes(s.id)&&e.outcome.use_cases.added.push(s.id);if(o.type==="reconcile_held"&&Array.isArray(o.held))for(let s of o.held)typeof s.ref=="string"&&!e.outcome.held.some(r=>r.ref===s.ref)&&e.outcome.held.push({ref:s.ref,why:typeof s.why=="string"?s.why:""});o.type==="error"&&n===null&&(n={code:typeof o.code=="string"?o.code:"",message:typeof o.message=="string"?o.message:""})}return{error:n}}var nt=e=>`resume it with \`kane-cli design tests --resume ${e} --mode override\``,rt={connection_lost:{why:"it lost its connection to the project",resumable:!0},not_accepted:{why:"the project didn't accept a save",resumable:!0},computer_slept:{why:"its hold on the session lapsed",resumable:!0},resumed_elsewhere:{why:"the session was resumed elsewhere",resumable:!1}};function ot(e){let t=e.filter(a=>a.type==="session_paused");if(t.length===0)return null;let n=Math.max(...t.map(a=>Array.isArray(a.pending_questions)?a.pending_questions.length:0)),o=t.map(a=>typeof a.reason=="string"?rt[a.reason]:void 0).find(a=>a!==void 0);if(o!==void 0)return{questions:n,...o};let s=t.some(a=>a.crashed===!0),r=t.map(a=>a.cause?.message).find(a=>typeof a=="string"),u=s?"its agent stopped mid-turn":r!==void 0?`the model service did not answer: ${String(r)}`:"its checkpoint wasn't acknowledged in time";return{questions:n,why:u,resumable:!0}}var T=(e,t,n)=>{e.failure??={code:t,message:n},e.errors.push({code:t,message:n})},Ve=(e,t)=>e==="design"?nt(t):e==="evolve"?"resume or discard it from the project's sessions (`kane-cli context sessions`)":`resume it with \`kane-cli context extract --resume ${t} --mode override\``;function it(e,t,n,o,s){let r=e==="extract"||e==="reconcile"?"the next job reviews the source again":e==="design"?"the next job designs it again":"the next job evolves it again";switch(s){case"paused":case"running":return`${n}; session ${o} is left ${s==="paused"?"paused":"open"}: ${Ve(e,o)}`;case"discarded":return`whose run discarded session ${o}, which held nothing: ${r}`;case"saved":return`${n}; session ${o} was saved already, with nothing of this run in it`;case"failed":return`${n}; session ${o} ended failed: ${r}`;case"ready_to_save":return`${n}; session ${o} is left unsaved, ready to save with nothing in it: ${r}`;default:return`${n}; session ${o}'s state couldn't be read after it, so it is left as it is`}}var at=e=>e.scope?.position??e.basePosition;async function Ge(e,t,n){let o=t.resumeVerb??t.verb,s=n;for(let r=!1;;r=!0){let u=s.code===3&&s.sid!==null?ot(s.lines):null;if(u===null)return{go:s};let a=s.sid,i=await e.person.getSession(a).catch(()=>null),c=i===null?null:V(i),f=`[${t.step}] ${t.verb} ${t.target} paused (${u.why}; ${u.questions} question(s) pending)`;if(c==="ready_to_save"||c==="saved")return e.diag(`${f}: decision save, its session finished`),s.row.status=r?"paused, resumed, finished":"paused, finished",{go:{...s,code:0}};if(c==="failed"||c==="discarded"||c===null){e.diag(`${f}: decision fail, its session ${c===null?"unread":c}`),s.row.status="failed (paused)";let h=c==="failed"?"ended failed":c==="discarded"?"was discarded":"couldn't be read";return{failed:`${t.target}: its ${t.verb} paused (${u.why}) and its session ${a} ${h}`}}if(!r&&u.questions===0&&u.resumable){e.diag(`${f}: decision resume once`),e.diag(`assurance-job: ${t.target}: its ${t.verb} paused with no question pending (${u.why}); resumed once`),s.row.status="paused, resumed";let h=await t.resume(a);if(s={...h,sid:h.sid??a,end:h.end??s.end},s.code!==0){if(s.code===3)continue;return{go:s}}let d=await e.person.getSession(a).catch(()=>null),_=d===null?!1:ce(await de(e.person,t.projectId,a).catch(()=>({})),at(d)>d.basePosition),l=t.verb==="design"||t.verb==="evolve"||s.lines.some(y=>y.type==="session_complete"||y.type==="done");if(_&&l)return{go:s};let m=l?"which left nothing to save":"which never reached its end",p=d===null?"unread":V(d);return e.diag(`[${t.step}] ${t.verb} ${t.target} resumed once through ${o}, ${m}: decision fail, nothing saved`),s.row.status="failed (resumed, nothing to save)",{failed:`${t.target}: its ${t.verb} paused (${u.why}); resumed once through ${o}, ${it(t.verb,o,m,a,p)}`}}let g=r?u.questions>0?"paused again, with a question pending":`paused twice with no question pending (${u.why})`:u.questions>0?"paused with a question pending":`paused and was not resumed here (${u.why})`;return e.diag(`${f}: decision fail, session left paused`),s.row.status=r?"failed (paused twice)":"failed (paused)",{failed:`${t.target}: its ${t.verb} ${g}; session ${a} is left paused: ${Ve(t.verb,a)}`}}}async function Ue(e,t,n){let{input:o,person:s}=e,r=`explore://${o.explorationId}?run=${o.runId}&cut=${o.cut}`,u=fe().route(r,pe);if(u===null||u.plugin.manifest.id!=="explore")return E("INTERNAL","this build routes explore:// to no explore plugin");let a=await Ae(r,u,void 0);if("refusal"in a)return E("INGEST_FAILED",a.refusal.message);let i=a.item,c=t.source===null,f=Ie({person:s,choice:e.choice,item:i,first:c,then:c?"extract":"review",supported:"",retryMs:e.deps.run?.retryDeadlineMs??12e4,remoteDeps:ve(e.deps.run?.remoteDeps)}),g=c?"extract":"reconcile",h=c?null:await ke(s,o.projectId),d=await D(e,{verb:g,body:{sourceId:i.sourceId},run:{source:i.sourceId,override:!0},step:f,log:{step:5,target:n}}),_=te(e,d.lines),l=p=>p!==void 0&&/\(CUT_SUPERSEDED\)/.test(p);if(l(d.end?.refused?.refusal.message)||l(_.error?.message))throw d.row.status="superseded",e.diag(`[5] the cut was superseded by a later one: nothing to do here${d.sid!==null?`; session ${d.sid} discarded`:""}`),d.sid!==null&&(await s.discard(d.sid).catch(()=>{}),e.outcome.sessions=e.outcome.sessions.filter(p=>p!==d.sid)),new b("noop",null,"");if(d.end?.refused&&E(L(d.end.refused.refusal.code)??Pe(d.end.refused.refusal.message),d.end.refused.refusal.message),!c&&d.end?.added==="unchanged"&&d.end.behind===0&&!d.end.unread)return d.row.status="nothing to read",e.diag(`assurance-job: the review of ${n} found nothing to read (unchanged, no use case behind, its head read)${d.sid!==null?`; session ${d.sid} discarded`:""}`),d.sid!==null&&(await s.discard(d.sid).catch(()=>{}),e.outcome.sessions=e.outcome.sessions.filter(p=>p!==d.sid)),"unchanged";if(d.sid===null&&E(_.error?L(_.error.code)??Pe(_.error.message):"INGEST_FAILED",_.error?.message??`the ${g} opened no session (exit ${d.code})`),d.code===3){let p=await Ge(e,{verb:g,target:n,step:5,projectId:o.projectId,resumeVerb:"extract",resume:y=>D(e,{verb:"extract",body:{},run:{source:i.sourceId,override:!0},resume:y,log:{step:5,target:n}})},d);"failed"in p?E("INGEST_FAILED",p.failed):p.go!==d&&(d=p.go,_=te(e,d.lines))}d.code===3&&e.diag(`[5] ${g} ended exit 3 with no pause said: decision fail, nothing saved; session ${d.sid} left as it is`),d.code===3&&E("INGEST_FAILED",`the ${g} session ${d.sid} paused before it ended`);for(let p of d.lines)p.type!=="error"||p.code!=="DESIGN_CHILD_FAILED"||typeof p.use_case!="string"||(e.outcome.tests.failed.includes(p.use_case)||e.outcome.tests.failed.push(p.use_case),T(e,"DESIGN_FAILED",`${p.use_case}: ${typeof p.message=="string"?p.message:"its redesign failed"}`));d.code!==0&&T(e,"INGEST_FAILED",_.error?.message??`the ${g} session ${d.sid} ended with exit ${d.code}`);let m=await Me(e,d.sid);if(Ke(e,5,g,d.sid,d.row,m),!m.ok&&d.code!==0&&E("INGEST_FAILED",`the ${g} session ${d.sid} ended with exit ${d.code} before it finished: ${_.error?.message??m.message}`),m.ok||E("SAVE_FAILED",`the ${g} session ${d.sid} was not saved: ${m.message}`),e.outcome.tests.designed+=m.tests,h!==null){let p=await se(e,o.projectId,n);for(let[y,w]of await ke(s,o.projectId))p.has(y)&&h.has(y)&&h.get(y)!==w&&!e.outcome.use_cases.modified.includes(y)&&e.outcome.use_cases.modified.push(y)}return d.end?.added??null}async function ke(e,t){let n=new Map,o=[];try{o=await e.nodes(t,"usecase")}catch(s){if(s instanceof I&&(s.code==="NO_CONTEXT"||s.code==="NOT_FOUND"))return n;throw s}for(let s of o)s.name!==null&&s.trust!=="archived"&&n.set(s.name,s.cid);return n}var C=e=>`run ${e.run} (run_version ${e.run_version}, deltas ${e.deltas}${e.cut!==void 0?`, cut ${String(e.cut)}`:""})`;function ut(e,t){return v(e,t)==="unordered"?"unordered":v(e,t)==="at-or-past"&&v(t,e)==="at-or-past"}function Le(e,t,n=new Set,o=new Set){let s=r=>t.has(r.id)&&r.upToDate==="tests_out_of_date"||r.upToDate==="yes"&&n.has(r.id);return[...e.filter(r=>!t.has(r.id)&&r.upToDate==="yes"&&!n.has(r.id)).map(r=>({id:r.id,verb:o.has(r.id)?"hold":"design"})),...e.filter(s).map(r=>({id:r.id,verb:"evolve"}))]}var ee="designed, no testable scenario";async function dt(e,t){let{person:n,input:o}=e,s=new Set;if(t.length===0)return s;let r=new Set(t),u=[];try{u=await n.edges(o.projectId,"belongs_to")}catch(i){if(!(i instanceof I&&(i.code==="NO_CONTEXT"||i.code==="NOT_FOUND")))throw i}if(u.length>0){let i=new Map((await n.nodes(o.projectId,"usecase")).flatMap(f=>f.name!==null?[[f.cid,f.name]]:[])),c=[...new Set(u.map(f=>f.dst).filter(f=>!i.has(f)))];for(let[f,g]of await F(c,8,async h=>[h,await n.mainNode(o.projectId,h).catch(()=>null)]))g?.label==="usecase"&&g.name!==null&&i.set(f,g.name);for(let f of u){let g=i.get(f.dst);g!==void 0&&r.has(g)&&s.add(g)}}let a=t.filter(i=>!s.has(i));for(let[i,c]of await F(a,8,async f=>[f,await n.listSessions(o.projectId,{useCase:f})]))c.some(f=>f.verb==="design"&&f.useCase===i&&f.scope?.state==="finalized")&&s.add(i);return s}async function Fe(e,t){let n=new Set,o=async r=>(await e.mainNode(t,r)).edgesOut.find(i=>i.type==="belongs_to"&&i.other?.label==="usecase")?.other?.name??null,s;try{s=await e.stale(t)}catch(r){if(r instanceof I&&(r.code==="NO_CONTEXT"||r.code==="NOT_FOUND"))return n;throw r}for(let r of s){if(r.freshness!=="stale"||!["ac","scenario","test"].includes(r.label))continue;let u=await e.mainNode(t,r.cid),a=null;if(r.label==="scenario")a=u.edgesOut.find(i=>i.type==="belongs_to"&&i.other?.label==="usecase")?.other?.name??null;else if(r.label==="ac"){let i=u.edgesOut.find(c=>c.type==="scoped_to");i?.other?.label==="usecase"?a=i.other.name??null:i?.other?.label==="scenario"&&(a=await o(i.dst))}else if(r.label==="test"){let i=u.edgesOut.find(c=>c.type==="automates"&&c.other?.label==="scenario");i&&(a=await o(i.dst))}a!==null&&n.add(a)}return n}async function ct(e,t,n,o,s){let r=(await e.listSessions(t,{useCase:n})).filter(p=>p.verb==="evolve"&&p.useCase===n&&p.scope?.state==="finalized");if(r.length===0)return null;let u=Math.max(...r.map(p=>p.scope.position)),[a,i]=await Promise.all([e.nodes(t,"usecase"),e.nodes(t,"source")]);if((a.find(p=>p.name===n)?.position??Number.POSITIVE_INFINITY)>u)return null;let f=i.filter(p=>p.title===o).map(p=>p.position);if(f.length===0)return null;let g=Math.max(...f),h=`its last evolve landed at position ${u}`;if(g<=u)return{landedAt:u,why:`${h}; nothing it rests on has moved since; still out of date (upstream); not retried until the source moves`};if(s.cut==="end")return null;let d=f.filter(p=>p<=u);if(d.length===0)return null;let l=(await e.mainRecord(t,Math.max(...d))).record.media?.[o]?.plugin?.fetch?.cursor,m=typeof l=="string"?ge(l)?.run:void 0;return m===void 0||m!==s.runId?null:{landedAt:u,why:`${h}, while the source was of run ${m}; this run's cuts don't retry it; still out of date (upstream); retried at the run's end or in a new run`}}async function lt(e,t){let{person:n,input:o,outcome:s}=e,r=await se(e,o.projectId,t);for(let l of s.use_cases.added)r.add(l);let u=(await q(n,o.projectId,["usecase"])).filter(l=>r.has(l.id)&&l.upToDate!=="archived"),a=await Ne(n,o.projectId),i=await Fe(n,o.projectId),c=Le(u,a,i).filter(l=>l.verb==="design").map(l=>l.id),f=await dt(e,c),g=Le(u,a,i,f),h=new Map;for(let{id:l,verb:m}of g){let p=m==="evolve"?await ct(n,o.projectId,l,t,{cut:o.cut,runId:o.runId}):null;p!==null&&h.set(l,p)}let d=l=>g.filter(m=>m.verb===l&&!h.has(m.id)).map(m=>m.id).join(", ")||"none",_=[...g.filter(l=>l.verb==="hold").map(l=>`${l.id} (${ee})`),...[...h].map(([l,m])=>`${l} (${m.why})`)].join("; ")||"none";e.diag(`[6] targets: design ${d("design")} \xB7 evolve ${d("evolve")} \xB7 held ${_}`);for(let{id:l,verb:m}of g){if(m==="hold"){s.held.some(A=>A.ref===l)||s.held.push({ref:l,why:ee}),e.summary.push({verb:"design",target:l,status:"held",tests:null,ms:null}),e.diag(`[6] design ${l} held: ${ee}; no session`);continue}let p=h.get(l)??null;if(p!==null){let A=p.why;s.held.some($=>$.ref===l)||s.held.push({ref:l,why:A}),e.summary.push({verb:m,target:l,status:"held",tests:null,ms:null}),T(e,"DESIGN_FAILED",`${l}: ${A}`);continue}let y={ref:l,useCase:l,override:!0},w=m==="design"?await D(e,{verb:"design",body:{useCase:l},run:{useCase:l,allowUnreviewed:!0,override:!0},log:{step:6,target:l}}):await D(e,{verb:"evolve",body:{useCase:l},run:{ref:l,useCase:l,override:!0,answer:[`evolve:${l}=proceed`]},log:{step:6,target:l}});if(w.code===3){let A=await Ge(e,{verb:m,target:l,step:6,projectId:o.projectId,resume:$=>D(e,{verb:m,body:{},run:m==="design"?{allowUnreviewed:!0,override:!0}:y,resume:$,log:{step:6,target:l}})},w);if("failed"in A){s.tests.failed.push(l),T(e,"DESIGN_FAILED",A.failed);continue}w=A.go}let R=te(e,w.lines);if(m==="evolve"&&R.error?.code==="NOTHING_CHANGED"){w.row.status="nothing changed",e.diag(`assurance-job: ${l}: its evolve found nothing changed in its design; left as it is`),w.sid!==null&&(s.sessions=s.sessions.filter(A=>A!==w.sid));continue}if(w.code!==0||w.sid===null){w.row.status=`failed (exit ${w.code})`,s.tests.failed.push(l),T(e,"DESIGN_FAILED",`${l}: ${R.error?.message??`the ${m} ended with exit ${w.code}`}`);continue}let N=await Me(e,w.sid);if(Ke(e,6,m,w.sid,w.row,N),s.tests.designed+=N.tests,!N.ok){s.tests.failed.push(l),T(e,"SAVE_FAILED",`${l}: ${N.message}`);continue}if(m==="evolve"){let A=(await q(n,o.projectId,["usecase"])).find($=>$.id===l);A?.upToDate==="tests_out_of_date"||(await Fe(n,o.projectId)).has(l)?(w.row.status="saved, still out of date",s.tests.failed.push(l),T(e,"DESIGN_FAILED",`${l}: its evolve was saved, and its ${A?.upToDate==="tests_out_of_date"?"tests are":"design is"} still out of date`)):s.use_cases.modified.includes(l)||s.use_cases.modified.push(l)}}await pt(e)}async function ft(e,t){try{return await e.nodes(t,"test")}catch(n){if(n instanceof I&&(n.code==="NO_CONTEXT"||n.code==="NOT_FOUND"))return[];throw n}}async function pt(e){let{person:t,input:n,outcome:o}=e;if(e.savedTests.size===0)return;let s=new Map((await ft(t,n.projectId)).map(a=>[a.cid,a])),r=[...e.savedTests].flatMap(([a,i])=>{let c=s.get(a)?.name??null;return c!==null?[{cid:a,name:c,...i}]:[]}),u=await F(r,8,async a=>{try{let i=a.definitionId??String((await t.mainNode(n.projectId,a.cid)).content.definitionId??""),c=await t.testCase(n.projectId,a.name,i);return"linked"in c?{test:a.name,change:a.change,case_id:c.linked.caseId,tc:c.linked.internalId,refused:null}:{test:a.name,change:a.change,case_id:null,tc:null,refused:c.refused.code??"REFUSED"}}catch(i){return{test:a.name,change:a.change,case_id:null,tc:null,refused:i instanceof I?i.code:"UNREAD"}}});o.tests.saved_cases.push(...u)}function gt(e,t){return new URL(ne(e,t).controllerBaseUrl).origin}async function Wt(e={}){let t=e.env??process.env,n=e.out??(d=>{process.stdout.write(`${d}
5
5
  `)}),o=e.now??Date.now,s=o(),r=Je(t,d=>gt(d,t));if(!r.ok){let d=Y(r.identity,x);d.status="failed",d.error={code:"INPUT_INVALID",message:r.message},d.errors=[d.error];let _=typeof t.LT_ACCESS_KEY=="string"&&t.LT_ACCESS_KEY!==""?{username:t.LT_USERNAME??"",accessKey:t.LT_ACCESS_KEY}:null,l=Q(d,z(_));return r.report!==null&&(await Z(r.report.url,l,r.report.login,e.post)||(e.diag??(p=>{process.stderr.write(`${p}
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-KBGMQYMD.js";import"./chunk-PTLOOVV4.js";import"./chunk-J4FIESTB.js";import"./chunk-UR6MHSHU.js";export{b as ensureHyperexecuteBinary,a as hyperexecuteDownloadUrl};
2
+ import{a,b}from"./chunk-ZFKR5I3J.js";import"./chunk-LV7OWLJK.js";import"./chunk-YKOZBFR3.js";import"./chunk-UR6MHSHU.js";export{b as ensureHyperexecuteBinary,a as hyperexecuteDownloadUrl};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b}from"./chunk-Z4O5HOFX.js";import"./chunk-DAV4ONGS.js";import"./chunk-H6QHG62O.js";import"./chunk-ABNQL3PQ.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-2EKLTUY2.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-YKOZBFR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{b as designTestsCommand,a as normalizeOpts};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{e as b,f as c,g as d,h as e}from"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import{a}from"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-YKOZBFR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-UR6MHSHU.js";export{d as replaySpoolEarly,e as telemetryBootstrap,c as telemetryEnabled,b as telemetryEnvName,a as telemetryProxyUrl};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b}from"./chunk-6SD4XTYC.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import"./chunk-TD6GCEIK.js";import"./chunk-4C7WVQOD.js";import"./chunk-HYJVYYAZ.js";import"./chunk-UR6MHSHU.js";export{a as KILL_GRACE_MS,b as runAgent};
2
+ import{a,b}from"./chunk-NKJRAQ6L.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import"./chunk-TD6GCEIK.js";import"./chunk-4C7WVQOD.js";import"./chunk-HYJVYYAZ.js";import"./chunk-UR6MHSHU.js";export{a as KILL_GRACE_MS,b as runAgent};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-KQ4XKTIZ.js";import"./chunk-ZCBOHWN3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-TM45NPWL.js";import"./chunk-J4FIESTB.js";import"./chunk-UR6MHSHU.js";export{a as ANY_REAL_DEVICE,g as checkRealDevice,c as fetchRealDeviceCatalog,e as isAnyRealDevice,f as matchRealDevice,d as osMajorOf,b as parseRealDeviceCatalog};
2
+ import{f as a,g as b,h as c,i as d,j as e,k as f,l as g}from"./chunk-ECPSBI2Z.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";export{a as ANY_REAL_DEVICE,g as checkRealDevice,c as fetchRealDeviceCatalog,e as isAnyRealDevice,f as matchRealDevice,d as osMajorOf,b as parseRealDeviceCatalog};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a,b,c,d,e}from"./chunk-NHGPMYM3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-ZCBOHWN3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-TM45NPWL.js";import"./chunk-J4FIESTB.js";import"./chunk-UR6MHSHU.js";export{b as bundledEvidenceCatalog,d as evidenceCatalogFor,c as fetchEvidenceCatalog,a as parseCatalogYaml,e as writeCatalogSnapshot};
2
+ import{a,b,c,d,e}from"./chunk-GMSWZIAS.js";import"./chunk-VZ7KXRXB.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";export{b as bundledEvidenceCatalog,d as evidenceCatalogFor,c as fetchEvidenceCatalog,a as parseCatalogYaml,e as writeCatalogSnapshot};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as l}from"./chunk-RZ4F3BHX.js";import{b as i,f as c}from"./chunk-J4FIESTB.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
2
+ import{b as i,f as c}from"./chunk-YKOZBFR3.js";import{a as l}from"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";import{readFileSync as u,writeFileSync as g,mkdirSync as d}from"fs";import{join as f}from"path";var h=f(i,"changelog-cache.json"),p=3600*1e3;function y(){try{let e=JSON.parse(u(h,"utf-8"));if(Date.now()-e.cachedAt<p)return e}catch{}return null}function m(e){try{d(i,{recursive:!0}),g(h,JSON.stringify({entries:e,cachedAt:Date.now()}))}catch{}}async function A(e){try{let t=y();if(t){let r=t.entries;return e?.all?r:r.slice(0,5)}let n=new AbortController,o=setTimeout(()=>n.abort(),5e3),a=await l(`${c}?per_page=30`,{headers:{Accept:"application/vnd.github+json"},signal:n.signal});if(clearTimeout(o),!a.ok)return[];let s=(await a.json()).map(r=>({version:r.tag_name.replace(/^v/,""),date:r.published_at?r.published_at.slice(0,10):"",body:r.body??""}));return m(s),e?.all?s:s.slice(0,5)}catch{return[]}}function v(e){if(e.length===0)return"Could not fetch changelog. Visit https://github.com/LambdaTest/kane-cli/releases";let t=["kane-cli Changelog","\u2500".repeat(40),""];for(let n of e){if(t.push(`v${n.version} (${n.date})`),n.body){let o=n.body.split(`
3
3
  `).filter(a=>a.trim());for(let a of o)t.push(` ${a}`)}t.push("")}return t.join(`
4
4
  `)}export{A as fetchChangelog,v as formatChangelog};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{c as a}from"./chunk-H6IPGZTP.js";import"./chunk-LD5B3QFW.js";import"./chunk-3A4KK22B.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-YJAQZMJT.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-UR6MHSHU.js";export{a as commitChatTurn};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a,b,c,d}from"./chunk-AL6IAMYV.js";import"./chunk-BWXLZS5O.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-3A4KK22B.js";import"./chunk-22PIMG52.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-YJAQZMJT.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-UR6MHSHU.js";export{d as makeChatController,b as optionLabel,c as questionStub,a as recommendationPicks};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as b,b as c,c as d}from"./chunk-XKJZG4GR.js";import"./chunk-RTVWQK7I.js";import{a}from"./chunk-TOOJTCON.js";import"./chunk-QI5RZ7LL.js";import"./chunk-4KCYNP2K.js";import"./chunk-WCIRLITM.js";import"./chunk-XDAHKZ4J.js";import"./chunk-4DRFMDAW.js";import"./chunk-HBGYEA3O.js";import"./chunk-LX2I4JEH.js";import"./chunk-JM6AKCN4.js";import"./chunk-3UY4WPMQ.js";import"./chunk-X66NIHT4.js";import"./chunk-BIGOLVK6.js";import"./chunk-VZJ6LUXX.js";import"./chunk-WZ3FE5MT.js";import"./chunk-W5HFUBXD.js";import"./chunk-OVB5GVRB.js";import"./chunk-JSSM2TWY.js";import"./chunk-Z55KBMYV.js";import"./chunk-LB5NIDW6.js";import"./chunk-H6IPGZTP.js";import"./chunk-LD5B3QFW.js";import"./chunk-U2VYTVKV.js";import"./chunk-BWXLZS5O.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-3A4KK22B.js";import"./chunk-FNUGDPTS.js";import"./chunk-6KUUSONE.js";import"./chunk-LJKTIKZY.js";import"./chunk-BXJNL22L.js";import"./chunk-2RUSXQ3O.js";import"./chunk-GRQKMOKE.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import"./chunk-W5EDS4DF.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GMTHZUZ3.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{c as designLanded,b as lastLandedPhase,d as launchDesignChild,a as testsWrittenBy};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{K as $,s as p}from"./chunk-WE7HRAGO.js";import{a as f}from"./chunk-QXQ7KVEN.js";import{oa as u}from"./chunk-PI7OXS62.js";var w=e=>e===1?"1 change":`${e} changes`,v=e=>e===1?"waits":"wait";function c(e){let t=/^(\S+-\d+) · (.+)$/.exec(e.title);return t?`${u(t[1])} "${t[2]}"`:`"${e.title}"`}var y=e=>typeof e=="string"?`"${e}"`:e.bare,d=y,j=e=>typeof e=="string"?e:e.bare;function D(e,t){return t.page?{...e,page:t.page}:null}var m=e=>e.page?.bare?{bare:e.page.shown}:e.page?.shown??e.source,O={header:e=>`reviewing what changed in ${d(e)}`,held:(e,t)=>{let n=t.filter(s=>s==="ADD").length,i=t.filter(s=>s==="ARCHIVE").length,r=t.length-n-i,o=[n>0?`${n} new ${n===1?"use-case":"use-cases"}`:null,r>0?`${r} changed`:null,i>0?`${i} no longer in it`:null].filter(s=>s!==null);return`${w(t.length)} from ${d(e)} ${v(t.length)} for your review: ${o.join(", ")}`},waiting:(e,t)=>`${w(t)} from ${d(e)} ${v(t)} for your review`,reviewRow:(e,t)=>`review ${w(t)} from ${d(e)}`,finishForNow:{label:"finish for now",detail:"the review waits in this session"},adjust:"adjust \u2014 tell me what to change",reviewed:(e,t)=>{let n=t.approved+t.rejected+t.deferred,i=[t.approved>0?`${t.approved} approved`:null,t.rejected>0?t.rejected===1?"1 kept as it was":`${t.rejected} kept as they were`:null,t.deferred>0?`${t.deferred} left for later`:null].filter(r=>r!==null);return`reviewed ${n===1?"the change":`the ${n} changes`} from ${d(e)}: ${i.join(" \xB7 ")}`},finishSession:"finish the session",diffTitle:e=>c(e),receipt:(e,t)=>{let n=c(e),i=e.kind==="ADD",r="nothing is saved for this change, and it may be suggested again";return t==="approve"?{line:i?`added ${n} to this session`:e.kind==="ARCHIVE"?`archived ${n} in this session`:`approved the change to ${n} in this session`}:t==="reject"?{line:i?`left ${n} out of this session`:`kept ${n} as it is`,note:r}:{line:i?`left ${n} out for now, as an open question`:`left ${n} as it is for now, as an open question`}},refused:(e,t,n)=>t==="TARGET_RETIRED"?{line:`${c(e)} was archived while you were reviewing, so nothing changed`}:t==="SOURCE_MOVED"?{line:`${d(m(n))} changed again while you were reviewing, so this change wasn't taken`,next:["next: to review the latest version, run:",n.page?` kane-cli context ingest ${f(n.page.address)}${n.page.as?` --as ${f(n.page.as)}`:""}`:` kane-cli maintain reconcile --from ${n.file} --source-id ${n.source}`]}:t==="SOURCE_UNRESOLVED"?{line:`${d(m(n))} was removed while you were reviewing, so this change can't be taken`}:t==="ARCHIVE_UNRESOLVED"?{line:`${c(e)} changed while you were reviewing, so it can't be archived`,moveOn:!0}:t==="CONCURRENT_APPEND"?{line:"that didn't go through: the project was busy; try the card again"}:t==="ALREADY_VERDICTED"||t==="CARD_GONE"||t==="HOLD_GONE"?{line:"that change isn't in this review anymore, so nothing was done"}:{line:"that change can't be taken, so nothing was done",next:[`if this keeps failing, share this id with support: ${p(`refused_${t}`)}`]},chatRefused:e=>{let t=[];for(let n of e){let i=n.ref?`${u(n.ref)}${n.title?` "${n.title}"`:""}`:null;n.code==="EXPECTED_CID_MOVED"&&i?n.moved?t.push(`${i} changed after the agent read it, so this edit wasn't made`,"continue, and the agent works from its latest version"):t.push(`the agent's edit to ${i} didn't match it as it is now, so it wasn't made`,"continue, and the agent reads it again"):t.push("continue, and the agent tries again",`if this keeps failing, share this id with support: ${p(`refused_${n.code}`)}`)}return[...new Set(t)]},approveRefused:e=>{let t=e.find(n=>n.code==="EXPECTED_CID_MOVED"&&n.ref);return t?{line:`${`${u(t.ref)}${t.title?` "${t.title}"`:""}`} changed after it was shown to you, so nothing was approved`,notes:['view what was added to see it as it is now, then pick "looks good" again']}:{line:"that didn't go through, so nothing was approved",notes:['pick "looks good" again',`if this keeps failing, share this id with support: ${p(`refused_${e[0]?.code??"APPROVE"}`)}`]}},diffSummary:e=>{let t=e.filter(s=>s.field==="criteria"),n=Math.max(t.filter(s=>s.op==="+").length,t.filter(s=>s.op==="-").length),i=[...new Set(e.filter(s=>s.field!=="criteria").map(s=>s.field))],r=i.length>0?`its ${i.join(" and ")}`:null,o=n>0?`${n} acceptance ${n===1?"criterion":"criteria"} changed`:null;return o&&r?`${o}, and ${r}`:o??`${r} changed`},steering:"reading the change again, with your words",steerNothing:"your words left nothing to review",steerFailed:"that didn't go through; the changes wait as they were",offerAsks:e=>e>0?"design its tests again?":"design its tests?",notLanded:"that didn't go through; try the card again",offer:(e,t)=>t>0?{headline:t===1?`the test of "${e}" was designed for its old version`:`the ${t} tests of "${e}" were designed for its old version`,rows:[{key:"run",label:t===1?"design it again now":"design them again now",detail:t===1?"replaces it if it no longer fits":"replaces any that no longer fit"},{key:"later",label:"later",detail:`kane-cli context list --stale lists ${t===1?"it":"them"}`}]}:{headline:`"${e}" has no tests yet`,rows:[{key:"run",label:"design its tests now"},{key:"later",label:"later",detail:"design them after you save"}]},childOpen:(e,t)=>`designing the tests of "${t}"${e==="evolve"?" again":""}`,childClosed:(e,t,n)=>[`designed the tests of "${t}"${e==="evolve"?" again":""}`,n.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),childTests:(e,t)=>`${l(t)}${e==="evolve"?"":" added"}`,back:e=>`back to the review \u2014 ${l(e)} added in this session`,againBack:e=>{let t=(a,h)=>a===1?`its test ${h}`:`its ${a} tests ${h}`,i=[e.replaced.scenarios+e.replaced.tests>0&&"replaced",e.updated>0&&"updated",e.kept>0&&"kept"].filter(a=>a!==!1);if(i.length===0)return null;let r=`${[...e.replaced.scenarios>0?[k(e.replaced.scenarios)]:[],...e.replaced.tests>0?[l(e.replaced.tests)]:[]].join(" and ")} replaced`;if(i.length===1)return`back to the review \u2014 ${i[0]==="replaced"?e.replaced.scenarios===0?t(e.replaced.tests,"replaced"):r:i[0]==="updated"?t(e.updated,"updated"):e.kept===1?"its test kept as it was":`its ${e.kept} tests kept as they were`}`;let o=[],s=0;return i.forEach((a,h)=>{let b=h===i.length-1;if(a==="replaced"){o.push(r),s+=e.replaced.tests;return}let g=a==="updated"?e.updated:e.kept;b?o.push(s>0?`the other ${g===1?"test":`${g} tests`} ${a}`:t(g,a)):(o.push(`${l(g)} ${a}`),s+=g)}),`back to the review \u2014 ${o.join(", ")}`},childUnfinished:e=>e==="evolve"?"designing its tests again didn't finish":"designing its tests didn't finish",childFailed:(e,t)=>`couldn't design the tests of "${t}"${e==="evolve"?" again":""}`,childFailedNext:(e,t)=>t==="evolve"?["next: to update them later, run:",` kane-cli maintain evolve ${e}`]:["next: to design its tests later, run:",` kane-cli design tests --use-case ${e}`],childFailedNew:"its tests can be designed after you save this session",updateOpen:(e,t)=>`updating the tests of "${e}"${t?" \u2014 its use-case changed":""}`,updateClosed:(e,t)=>[`updated the tests of "${e}"`,t.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),updateTests:e=>[...e.added>0?[`${l(e.added)} added`]:[],...$({changes:{tests:e.updated}})].join(", ")||null,updateUnfinished:e=>`updating the tests of "${e}" didn't finish`,updateFinishing:"finishing the update\u2026",updateFailed:e=>`couldn't update the tests of "${e}"`,updateUntouched:e=>`finished here: the tests of "${e}" weren't changed`,childHeld:(e,t)=>[{text:` \u2717 its tests can't be designed again now: ${e?"you're designing them in another session":"someone else is designing them"}`},{text:" the change stays approved in this session; to update its tests later, run:",dim:!0},{text:` kane-cli maintain evolve ${t}`,dim:!0}]},l=e=>e===1?"1 test":`${e} tests`,k=e=>e===1?"1 scenario":`${e} scenarios`;function S(e){return/^\S+-\d+ · (.+)$/.exec(e.title)?.[1]??e.title}export{c as a,y as b,j as c,D as d,m as e,O as f,S as g};
2
+ import{K as $,s as p}from"./chunk-7WWCIS2B.js";import{oa as u}from"./chunk-5EAJO372.js";import{a as f}from"./chunk-QXQ7KVEN.js";var w=e=>e===1?"1 change":`${e} changes`,v=e=>e===1?"waits":"wait";function c(e){let t=/^(\S+-\d+) · (.+)$/.exec(e.title);return t?`${u(t[1])} "${t[2]}"`:`"${e.title}"`}var y=e=>typeof e=="string"?`"${e}"`:e.bare,d=y,j=e=>typeof e=="string"?e:e.bare;function D(e,t){return t.page?{...e,page:t.page}:null}var m=e=>e.page?.bare?{bare:e.page.shown}:e.page?.shown??e.source,O={header:e=>`reviewing what changed in ${d(e)}`,held:(e,t)=>{let n=t.filter(s=>s==="ADD").length,i=t.filter(s=>s==="ARCHIVE").length,r=t.length-n-i,o=[n>0?`${n} new ${n===1?"use-case":"use-cases"}`:null,r>0?`${r} changed`:null,i>0?`${i} no longer in it`:null].filter(s=>s!==null);return`${w(t.length)} from ${d(e)} ${v(t.length)} for your review: ${o.join(", ")}`},waiting:(e,t)=>`${w(t)} from ${d(e)} ${v(t)} for your review`,reviewRow:(e,t)=>`review ${w(t)} from ${d(e)}`,finishForNow:{label:"finish for now",detail:"the review waits in this session"},adjust:"adjust \u2014 tell me what to change",reviewed:(e,t)=>{let n=t.approved+t.rejected+t.deferred,i=[t.approved>0?`${t.approved} approved`:null,t.rejected>0?t.rejected===1?"1 kept as it was":`${t.rejected} kept as they were`:null,t.deferred>0?`${t.deferred} left for later`:null].filter(r=>r!==null);return`reviewed ${n===1?"the change":`the ${n} changes`} from ${d(e)}: ${i.join(" \xB7 ")}`},finishSession:"finish the session",diffTitle:e=>c(e),receipt:(e,t)=>{let n=c(e),i=e.kind==="ADD",r="nothing is saved for this change, and it may be suggested again";return t==="approve"?{line:i?`added ${n} to this session`:e.kind==="ARCHIVE"?`archived ${n} in this session`:`approved the change to ${n} in this session`}:t==="reject"?{line:i?`left ${n} out of this session`:`kept ${n} as it is`,note:r}:{line:i?`left ${n} out for now, as an open question`:`left ${n} as it is for now, as an open question`}},refused:(e,t,n)=>t==="TARGET_RETIRED"?{line:`${c(e)} was archived while you were reviewing, so nothing changed`}:t==="SOURCE_MOVED"?{line:`${d(m(n))} changed again while you were reviewing, so this change wasn't taken`,next:["next: to review the latest version, run:",n.page?` kane-cli context ingest ${f(n.page.address)}${n.page.as?` --as ${f(n.page.as)}`:""}`:` kane-cli maintain reconcile --from ${n.file} --source-id ${n.source}`]}:t==="SOURCE_UNRESOLVED"?{line:`${d(m(n))} was removed while you were reviewing, so this change can't be taken`}:t==="ARCHIVE_UNRESOLVED"?{line:`${c(e)} changed while you were reviewing, so it can't be archived`,moveOn:!0}:t==="CONCURRENT_APPEND"?{line:"that didn't go through: the project was busy; try the card again"}:t==="ALREADY_VERDICTED"||t==="CARD_GONE"||t==="HOLD_GONE"?{line:"that change isn't in this review anymore, so nothing was done"}:{line:"that change can't be taken, so nothing was done",next:[`if this keeps failing, share this id with support: ${p(`refused_${t}`)}`]},chatRefused:e=>{let t=[];for(let n of e){let i=n.ref?`${u(n.ref)}${n.title?` "${n.title}"`:""}`:null;n.code==="EXPECTED_CID_MOVED"&&i?n.moved?t.push(`${i} changed after the agent read it, so this edit wasn't made`,"continue, and the agent works from its latest version"):t.push(`the agent's edit to ${i} didn't match it as it is now, so it wasn't made`,"continue, and the agent reads it again"):t.push("continue, and the agent tries again",`if this keeps failing, share this id with support: ${p(`refused_${n.code}`)}`)}return[...new Set(t)]},approveRefused:e=>{let t=e.find(n=>n.code==="EXPECTED_CID_MOVED"&&n.ref);return t?{line:`${`${u(t.ref)}${t.title?` "${t.title}"`:""}`} changed after it was shown to you, so nothing was approved`,notes:['view what was added to see it as it is now, then pick "looks good" again']}:{line:"that didn't go through, so nothing was approved",notes:['pick "looks good" again',`if this keeps failing, share this id with support: ${p(`refused_${e[0]?.code??"APPROVE"}`)}`]}},diffSummary:e=>{let t=e.filter(s=>s.field==="criteria"),n=Math.max(t.filter(s=>s.op==="+").length,t.filter(s=>s.op==="-").length),i=[...new Set(e.filter(s=>s.field!=="criteria").map(s=>s.field))],r=i.length>0?`its ${i.join(" and ")}`:null,o=n>0?`${n} acceptance ${n===1?"criterion":"criteria"} changed`:null;return o&&r?`${o}, and ${r}`:o??`${r} changed`},steering:"reading the change again, with your words",steerNothing:"your words left nothing to review",steerFailed:"that didn't go through; the changes wait as they were",offerAsks:e=>e>0?"design its tests again?":"design its tests?",notLanded:"that didn't go through; try the card again",offer:(e,t)=>t>0?{headline:t===1?`the test of "${e}" was designed for its old version`:`the ${t} tests of "${e}" were designed for its old version`,rows:[{key:"run",label:t===1?"design it again now":"design them again now",detail:t===1?"replaces it if it no longer fits":"replaces any that no longer fit"},{key:"later",label:"later",detail:`kane-cli context list --stale lists ${t===1?"it":"them"}`}]}:{headline:`"${e}" has no tests yet`,rows:[{key:"run",label:"design its tests now"},{key:"later",label:"later",detail:"design them after you save"}]},childOpen:(e,t)=>`designing the tests of "${t}"${e==="evolve"?" again":""}`,childClosed:(e,t,n)=>[`designed the tests of "${t}"${e==="evolve"?" again":""}`,n.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),childTests:(e,t)=>`${l(t)}${e==="evolve"?"":" added"}`,back:e=>`back to the review \u2014 ${l(e)} added in this session`,againBack:e=>{let t=(a,h)=>a===1?`its test ${h}`:`its ${a} tests ${h}`,i=[e.replaced.scenarios+e.replaced.tests>0&&"replaced",e.updated>0&&"updated",e.kept>0&&"kept"].filter(a=>a!==!1);if(i.length===0)return null;let r=`${[...e.replaced.scenarios>0?[k(e.replaced.scenarios)]:[],...e.replaced.tests>0?[l(e.replaced.tests)]:[]].join(" and ")} replaced`;if(i.length===1)return`back to the review \u2014 ${i[0]==="replaced"?e.replaced.scenarios===0?t(e.replaced.tests,"replaced"):r:i[0]==="updated"?t(e.updated,"updated"):e.kept===1?"its test kept as it was":`its ${e.kept} tests kept as they were`}`;let o=[],s=0;return i.forEach((a,h)=>{let b=h===i.length-1;if(a==="replaced"){o.push(r),s+=e.replaced.tests;return}let g=a==="updated"?e.updated:e.kept;b?o.push(s>0?`the other ${g===1?"test":`${g} tests`} ${a}`:t(g,a)):(o.push(`${l(g)} ${a}`),s+=g)}),`back to the review \u2014 ${o.join(", ")}`},childUnfinished:e=>e==="evolve"?"designing its tests again didn't finish":"designing its tests didn't finish",childFailed:(e,t)=>`couldn't design the tests of "${t}"${e==="evolve"?" again":""}`,childFailedNext:(e,t)=>t==="evolve"?["next: to update them later, run:",` kane-cli maintain evolve ${e}`]:["next: to design its tests later, run:",` kane-cli design tests --use-case ${e}`],childFailedNew:"its tests can be designed after you save this session",updateOpen:(e,t)=>`updating the tests of "${e}"${t?" \u2014 its use-case changed":""}`,updateClosed:(e,t)=>[`updated the tests of "${e}"`,t.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),updateTests:e=>[...e.added>0?[`${l(e.added)} added`]:[],...$({changes:{tests:e.updated}})].join(", ")||null,updateUnfinished:e=>`updating the tests of "${e}" didn't finish`,updateFinishing:"finishing the update\u2026",updateFailed:e=>`couldn't update the tests of "${e}"`,updateUntouched:e=>`finished here: the tests of "${e}" weren't changed`,childHeld:(e,t)=>[{text:` \u2717 its tests can't be designed again now: ${e?"you're designing them in another session":"someone else is designing them"}`},{text:" the change stays approved in this session; to update its tests later, run:",dim:!0},{text:` kane-cli maintain evolve ${t}`,dim:!0}]},l=e=>e===1?"1 test":`${e} tests`,k=e=>e===1?"1 scenario":`${e} scenarios`;function S(e){return/^\S+-\d+ · (.+)$/.exec(e.title)?.[1]??e.title}export{c as a,y as b,j as c,D as d,m as e,O as f,S as g};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{j as f,xa as a}from"./chunk-PI7OXS62.js";import{join as m}from"path";function Q(n,o){if(!f(o))throw new Error(`proposal id ${JSON.stringify(o)} is not a plain name (letters, digits, . _ - after a letter or digit)`);return m(n,"proposals",o,"proposal.json")}import{appendFileSync as g,readdirSync as l,readFileSync as u,rmSync as S,statSync as y}from"fs";import{join as t}from"path";import{randomBytes as E}from"crypto";var j="pending-facts.ndjson",h=/^pending-facts\.(\d+)-[0-9a-f]+\.ndjson$/,N=()=>`pending-facts.${process.pid}-${E(4).toString("hex")}.ndjson`;function v(n,o=1/0){let r=[];for(let i of l(n)){let s=h.exec(i);if(!s)continue;let e=Number(s[1]),c=Date.now()-y(t(n,i)).mtimeMs;if(e!==process.pid&&a(e)&&c<o){r.push(i);continue}let p=u(t(n,i),"utf8").split(`
2
+ import{j as f,xa as a}from"./chunk-5EAJO372.js";import{join as m}from"path";function Q(n,o){if(!f(o))throw new Error(`proposal id ${JSON.stringify(o)} is not a plain name (letters, digits, . _ - after a letter or digit)`);return m(n,"proposals",o,"proposal.json")}import{appendFileSync as g,readdirSync as l,readFileSync as u,rmSync as S,statSync as y}from"fs";import{join as t}from"path";import{randomBytes as E}from"crypto";var j="pending-facts.ndjson",h=/^pending-facts\.(\d+)-[0-9a-f]+\.ndjson$/,N=()=>`pending-facts.${process.pid}-${E(4).toString("hex")}.ndjson`;function v(n,o=1/0){let r=[];for(let i of l(n)){let s=h.exec(i);if(!s)continue;let e=Number(s[1]),c=Date.now()-y(t(n,i)).mtimeMs;if(e!==process.pid&&a(e)&&c<o){r.push(i);continue}let p=u(t(n,i),"utf8").split(`
3
3
  `).filter(d=>d!=="");p.length>0&&g(t(n,j),p.join(`
4
4
  `)+`
5
5
  `),S(t(n,i))}return r}export{Q as a,j as b,h as c,N as d,v as e};
@@ -1,11 +1,11 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as ae}from"./chunk-MMBBQ4OZ.js";import{j as R}from"./chunk-NRAPCFI2.js";import{c as ie,e as ne,i as re,j as K}from"./chunk-Z7S3IWUX.js";import{d as $,e as oe}from"./chunk-4JOD47QI.js";import{a as se}from"./chunk-RZ4F3BHX.js";import{spawn as ze}from"child_process";import{closeSync as Xe,existsSync as Ge,mkdirSync as We,openSync as Ye,readFileSync as Ze,rmSync as Qe}from"fs";import{homedir as ge}from"os";import{dirname as X,join as S}from"path";import{access as Re,mkdir as de,readFile as Le}from"fs/promises";import{homedir as Ce}from"os";import{arch as Fe,platform as Be}from"process";import{join as M}from"path";var Ue=35,qe="google_apis",Ve="KaneCLI_Pixel_API35",He="KaneAI_Pixel_API35";function Ht(t){return t===He?Ve:t}var je=1;function Ke(t,e){return t==="darwin"&&e==="arm64"?"arm64-v8a":"x86_64"}function Je(){return{home:Ce(),os:Be,arch:Fe}}async function le(t){try{return await Re(t),!0}catch{return!1}}var J=class{deps;constructor(e={}){this.deps={...Je(),...e}}paths(){let e=M(this.deps.home,".testmuai","kaneai","mobile"),r=M(e,"android-sdk");return{root:r,emulatorDir:M(r,"emulator"),systemImageDir:M(r,"system-images",`android-${Ue}`,qe,Ke(this.deps.os,this.deps.arch)),avdHome:M(e,"avd"),manifest:M(r,"sdk-manifest.json")}}environment(){let e=this.paths();return{ANDROID_HOME:e.root,ANDROID_SDK_ROOT:e.root,ANDROID_AVD_HOME:e.avdHome}}async ensureSdkRootMarkers(){let e=this.paths().root;await de(M(e,"platforms"),{recursive:!0}),await de(M(e,"platform-tools"),{recursive:!0})}async status(){let e=this.paths(),r=null;try{r=JSON.parse(await Le(e.manifest,"utf8"))}catch{}if(!r||r.schemaVersion!==je)return{emulator:!1,systemImage:!1};let o=this.deps.os==="win32"?"emulator.exe":"emulator";return{emulator:!!r.components.emulator&&await le(M(e.emulatorDir,o)),systemImage:!!r.components.systemImage&&await le(M(e.systemImageDir,"system.img"))}}},ue;function B(){return ue??=new J,ue}var G="android",et="http://127.0.0.1:4723/status",tt=2e3,z=(()=>{let t=Number(process.env.KANE_CLI_EMULATOR_BOOT_TIMEOUT_MS);return Number.isFinite(t)&&t>=3e4?t:3e5})(),it=1e3,nt=3e5;var rt=5,ce="Run `kane-cli doctor --target emulator --install` to install the managed Appium tree.",st={device:"ready",unauthorized:"unauthorized",offline:"offline"};function ot(t){let e={};for(let r of t){let o=r.indexOf(":");o<=0||(e[r.slice(0,o)]=r.slice(o+1))}return e}function at(t){let e=[];for(let r of t.split(`
2
+ import{a as ae}from"./chunk-MMBBQ4OZ.js";import{j as R}from"./chunk-JM45SLKV.js";import{c as ne,e as re,i as se,j as K}from"./chunk-Z7S3IWUX.js";import{d as $,e as oe}from"./chunk-4JOD47QI.js";import{a as ie}from"./chunk-RZ4F3BHX.js";import{spawn as ze}from"child_process";import{closeSync as Xe,existsSync as Ge,mkdirSync as We,openSync as Ye,readFileSync as Ze,rmSync as Qe}from"fs";import{homedir as ge}from"os";import{dirname as X,join as S}from"path";import{access as Re,mkdir as de,readFile as Le}from"fs/promises";import{homedir as Ce}from"os";import{arch as Fe,platform as Be}from"process";import{join as M}from"path";var Ue=35,qe="google_apis",Ve="KaneCLI_Pixel_API35",He="KaneAI_Pixel_API35";function Ht(t){return t===He?Ve:t}var je=1;function Ke(t,e){return t==="darwin"&&e==="arm64"?"arm64-v8a":"x86_64"}function Je(){return{home:Ce(),os:Be,arch:Fe}}async function le(t){try{return await Re(t),!0}catch{return!1}}var J=class{deps;constructor(e={}){this.deps={...Je(),...e}}paths(){let e=M(this.deps.home,".testmuai","kaneai","mobile"),r=M(e,"android-sdk");return{root:r,emulatorDir:M(r,"emulator"),systemImageDir:M(r,"system-images",`android-${Ue}`,qe,Ke(this.deps.os,this.deps.arch)),avdHome:M(e,"avd"),manifest:M(r,"sdk-manifest.json")}}environment(){let e=this.paths();return{ANDROID_HOME:e.root,ANDROID_SDK_ROOT:e.root,ANDROID_AVD_HOME:e.avdHome}}async ensureSdkRootMarkers(){let e=this.paths().root;await de(M(e,"platforms"),{recursive:!0}),await de(M(e,"platform-tools"),{recursive:!0})}async status(){let e=this.paths(),r=null;try{r=JSON.parse(await Le(e.manifest,"utf8"))}catch{}if(!r||r.schemaVersion!==je)return{emulator:!1,systemImage:!1};let o=this.deps.os==="win32"?"emulator.exe":"emulator";return{emulator:!!r.components.emulator&&await le(M(e.emulatorDir,o)),systemImage:!!r.components.systemImage&&await le(M(e.systemImageDir,"system.img"))}}},ue;function B(){return ue??=new J,ue}var G="android",et="http://127.0.0.1:4723/status",tt=2e3,z=(()=>{let t=Number(process.env.KANE_CLI_EMULATOR_BOOT_TIMEOUT_MS);return Number.isFinite(t)&&t>=3e4?t:3e5})(),it=1e3,nt=3e5;var rt=5,ce="Run `kane-cli doctor --target emulator --install` to install the managed Appium tree.",st={device:"ready",unauthorized:"unauthorized",offline:"offline"};function ot(t){let e={};for(let r of t){let o=r.indexOf(":");o<=0||(e[r.slice(0,o)]=r.slice(o+1))}return e}function at(t){let e=[];for(let r of t.split(`
3
3
  `)){let o=r.trim();if(!o||o.startsWith("*"))continue;let u=o.toLowerCase();if(u.startsWith("list of devices")||u.startsWith("adb server"))continue;let g=o.split(/\s+/),p=g[0],w=g[1];if(!p||!w)continue;let v=ot(g.slice(2)),x=/^(localhost|127\.0\.0\.1):\d{1,5}$/.test(p),P=/^[A-Za-z0-9._-]+:\d{1,5}$/.test(p),C=/^sdk_/.test(v.product??"")||/^sdk_/.test(v.model??"")||/^emu/.test(v.device??"");if(!p.startsWith("emulator-")&&!x&&!(P&&C))continue;let l=v.model?v.model.replace(/_/g," "):void 0;e.push({platform:G,kind:"emulator",id:p,displayName:l??p,state:st[w]??"offline"})}return e}function me(t){let e=[];for(let r of t.split(`
4
4
  `)){let o=r.trim();o&&/^[A-Za-z0-9._-]+$/.test(o)&&(e.includes(o)||e.push(o))}return e}function dt(t){for(let e of t.split(`
5
5
  `)){let r=e.trim();if(!(!r||r==="OK"))return r}}function lt(t){let e=/^Version\s+(\S+)/m.exec(t);return e?.[1]?e[1].split("-")[0]:/Android Debug Bridge version\s+(\S+)/.exec(t)?.[1]}function ut(t){let e=[];for(let r of t.split(`
6
6
  `)){let o=r.trim();if(!o.startsWith("package:"))continue;let u=o.slice(8).trim();u&&!e.includes(u)&&e.push(u)}return e.sort()}function ct(t){let e=Number(t.trim());return Number.isInteger(e)&&e>0?e:void 0}function mt(t){return[...new Set(t.split(",").map(e=>e.trim()).filter(Boolean))]}var pt=[{match:/INSTALL_FAILED_VERIFICATION|verif(?:ier|ication)/i,hint:`Package verification blocked the install. Disable it for adb installs:
7
7
  adb -s <device> shell settings put global verifier_verify_adb_installs 0`},{match:/INSTALL_FAILED_UPDATE_INCOMPATIBLE|INSTALL_FAILED_VERSION_DOWNGRADE|signatures do not match/i,hint:`A different build of this package is already installed. Uninstall it first:
8
- adb -s <device> uninstall <package>`},{match:/INSUFFICIENT_STORAGE/i,hint:"The device is out of storage. Free space on the device and retry."}];function ft(t){for(let{match:e,hint:r}of pt)if(e.test(t))return r}function W(t,e,r=rt){let o=t.toLowerCase(),u=e.filter(w=>w.toLowerCase().includes(o)),g=Math.max(6,Math.floor(o.length/2)),p=e.filter(w=>!u.includes(w)&&gt(w.toLowerCase(),o)>=g);return[...u,...p].slice(0,r)}function gt(t,e){let r=Math.min(t.length,e.length),o=0;for(;o<r&&t[o]===e[o];)o++;return o}function ht(t){if(!t)return;let e=/^image\.sysdir\.\d+\s*=.*?android-(\d+)/m.exec(t),r=e?.[1]?Number(e[1]):NaN;return Number.isInteger(r)&&r>0?r:void 0}var vt={36:"16",35:"15",34:"14",33:"13",32:"12",31:"12",30:"11",29:"10",28:"9",27:"8.1",26:"8.0",25:"7.1",24:"7.0",23:"6.0",22:"5.1",21:"5.0"};function wt(t){return t===void 0?void 0:vt[t]}function pe(t){let e=bt(t),r=ht(t),o=wt(r);return{...e?{modelIdentifier:e}:{},...r!==void 0?{androidApiLevel:r}:{},...o?{osVersion:o}:{}}}function bt(t){return t&&/^hw\.device\.name\s*=\s*(.+)\s*$/m.exec(t)?.[1]?.trim()||void 0}function yt(){return se(et,{signal:AbortSignal.timeout(tt)}).then(t=>t.ok,()=>!1)}function fe(t){return S(ge(),".testmuai","kaneai","mobile",`emulator-${t}.log`)}function At(t,e,r,o){let u="ignore";if(o)try{We(X(o),{recursive:!0}),u=Ye(o,"w")}catch{u="ignore"}if(ze(t,e,{stdio:["ignore",u,u],detached:!0,...r?{env:{...process.env,...r}}:{}}).unref(),typeof u=="number")try{Xe(u)}catch{}}function V(t){try{return Ze(t,"utf8")}catch{return}}function he(t){try{Qe(t,{force:!0})}catch{}}async function ve(t){if(process.platform==="win32"){let o=await $("tasklist",["/FI",`PID eq ${t}`,"/FO","CSV","/NH"],{timeoutMs:5e3});return o.code===0&&o.stdout.trim()!==""?o.stdout:void 0}let e=await $("ps",["-p",String(t),"-o","command="],{timeoutMs:5e3}),r=e.stdout.trim();return e.code===0&&r!==""?r:void 0}function St(){return{exec:$,spawnDetached:At,readFileIfAny:V,removeFile:he,processCommand:ve,fileExists:Ge,env:process.env,home:ge(),os:process.platform,probeAppiumServer:yt,now:()=>Date.now(),sleep:oe,mobileDeps:{status:t=>R().status(t),environment:t=>R().environment(t)},sdkSuite:{status:()=>B().status(),environment:()=>B().environment(),emulatorPath:()=>{let t=B().paths().emulatorDir;return S(t,process.platform==="win32"?"emulator.exe":"emulator")},ensureSdkRootMarkers:()=>B().ensureSdkRootMarkers()}}}function we(t={}){let e={...St(),...t},r={},o=new Set;function u(i){return e.os==="win32"?`${i}.exe`:i}function g(i){if(e.readAvdConfig)return e.readAvdConfig(i);let n=p(i);if(n)return(e.readFileIfAny??V)(S(n,"config.ini"))}function p(i){let n=[e.env.ANDROID_AVD_HOME,S(e.home,".android","avd"),e.sdkSuite.environment().ANDROID_AVD_HOME];for(let s of n){if(!s)continue;let a=S(s,`${i}.avd`);if(e.fileExists(S(a,"config.ini")))return a}}let w=["hardware-qemu.ini.lock","multiinstance.lock"];async function v(i){let n=p(i);if(!n)return{state:"free"};let s=w.map(h=>S(n,h)).filter(h=>e.fileExists(h));if(s.length===0)return{state:"free"};let d=(e.readFileIfAny??V)(S(n,"hardware-qemu.ini.lock")),c=Number(String(d??"").replace(/\0/g,"").trim());if(Number.isInteger(c)&&c>0){let h=await(e.processCommand??ve)(c);if(h&&/qemu|emulator/i.test(h))return{state:"held",pid:c}}return{state:"stale",paths:s}}function x(){return e.os==="win32"?"appium.cmd":"appium"}function P(){let i=[];for(let n of["ANDROID_HOME","ANDROID_SDK_ROOT"]){let s=e.env[n];s&&s.trim()!==""&&i.push(s.trim())}return e.os==="darwin"?i.push(S(e.home,"Library","Android","sdk")):e.os==="win32"?i.push(S(e.home,"AppData","Local","Android","Sdk")):i.push(S(e.home,"Android","Sdk")),i}function C(i){let n=i==="adb"?"platform-tools":"emulator";return P().map(s=>S(s,n,u(i)))}async function l(i){let n=e.os==="win32"?"where":"which",s=await e.exec(n,[u(i)],{timeoutMs:5e3});if(s.code!==0)return null;let a=s.stdout.split(`
8
+ adb -s <device> uninstall <package>`},{match:/INSUFFICIENT_STORAGE/i,hint:"The device is out of storage. Free space on the device and retry."}];function ft(t){for(let{match:e,hint:r}of pt)if(e.test(t))return r}function W(t,e,r=rt){let o=t.toLowerCase(),u=e.filter(w=>w.toLowerCase().includes(o)),g=Math.max(6,Math.floor(o.length/2)),p=e.filter(w=>!u.includes(w)&&gt(w.toLowerCase(),o)>=g);return[...u,...p].slice(0,r)}function gt(t,e){let r=Math.min(t.length,e.length),o=0;for(;o<r&&t[o]===e[o];)o++;return o}function ht(t){if(!t)return;let e=/^image\.sysdir\.\d+\s*=.*?android-(\d+)/m.exec(t),r=e?.[1]?Number(e[1]):NaN;return Number.isInteger(r)&&r>0?r:void 0}var vt={36:"16",35:"15",34:"14",33:"13",32:"12",31:"12",30:"11",29:"10",28:"9",27:"8.1",26:"8.0",25:"7.1",24:"7.0",23:"6.0",22:"5.1",21:"5.0"};function wt(t){return t===void 0?void 0:vt[t]}function pe(t){let e=bt(t),r=ht(t),o=wt(r);return{...e?{modelIdentifier:e}:{},...r!==void 0?{androidApiLevel:r}:{},...o?{osVersion:o}:{}}}function bt(t){return t&&/^hw\.device\.name\s*=\s*(.+)\s*$/m.exec(t)?.[1]?.trim()||void 0}function yt(){return ie(et,{signal:AbortSignal.timeout(tt)}).then(t=>t.ok,()=>!1)}function fe(t){return S(ge(),".testmuai","kaneai","mobile",`emulator-${t}.log`)}function At(t,e,r,o){let u="ignore";if(o)try{We(X(o),{recursive:!0}),u=Ye(o,"w")}catch{u="ignore"}if(ze(t,e,{stdio:["ignore",u,u],detached:!0,...r?{env:{...process.env,...r}}:{}}).unref(),typeof u=="number")try{Xe(u)}catch{}}function V(t){try{return Ze(t,"utf8")}catch{return}}function he(t){try{Qe(t,{force:!0})}catch{}}async function ve(t){if(process.platform==="win32"){let o=await $("tasklist",["/FI",`PID eq ${t}`,"/FO","CSV","/NH"],{timeoutMs:5e3});return o.code===0&&o.stdout.trim()!==""?o.stdout:void 0}let e=await $("ps",["-p",String(t),"-o","command="],{timeoutMs:5e3}),r=e.stdout.trim();return e.code===0&&r!==""?r:void 0}function St(){return{exec:$,spawnDetached:At,readFileIfAny:V,removeFile:he,processCommand:ve,fileExists:Ge,env:process.env,home:ge(),os:process.platform,probeAppiumServer:yt,now:()=>Date.now(),sleep:oe,mobileDeps:{status:t=>R().status(t),environment:t=>R().environment(t)},sdkSuite:{status:()=>B().status(),environment:()=>B().environment(),emulatorPath:()=>{let t=B().paths().emulatorDir;return S(t,process.platform==="win32"?"emulator.exe":"emulator")},ensureSdkRootMarkers:()=>B().ensureSdkRootMarkers()}}}function we(t={}){let e={...St(),...t},r={},o=new Set;function u(i){return e.os==="win32"?`${i}.exe`:i}function g(i){if(e.readAvdConfig)return e.readAvdConfig(i);let n=p(i);if(n)return(e.readFileIfAny??V)(S(n,"config.ini"))}function p(i){let n=[e.env.ANDROID_AVD_HOME,S(e.home,".android","avd"),e.sdkSuite.environment().ANDROID_AVD_HOME];for(let s of n){if(!s)continue;let a=S(s,`${i}.avd`);if(e.fileExists(S(a,"config.ini")))return a}}let w=["hardware-qemu.ini.lock","multiinstance.lock"];async function v(i){let n=p(i);if(!n)return{state:"free"};let s=w.map(h=>S(n,h)).filter(h=>e.fileExists(h));if(s.length===0)return{state:"free"};let d=(e.readFileIfAny??V)(S(n,"hardware-qemu.ini.lock")),c=Number(String(d??"").replace(/\0/g,"").trim());if(Number.isInteger(c)&&c>0){let h=await(e.processCommand??ve)(c);if(h&&/qemu|emulator/i.test(h))return{state:"held",pid:c}}return{state:"stale",paths:s}}function x(){return e.os==="win32"?"appium.cmd":"appium"}function P(){let i=[];for(let n of["ANDROID_HOME","ANDROID_SDK_ROOT"]){let s=e.env[n];s&&s.trim()!==""&&i.push(s.trim())}return e.os==="darwin"?i.push(S(e.home,"Library","Android","sdk")):e.os==="win32"?i.push(S(e.home,"AppData","Local","Android","Sdk")):i.push(S(e.home,"Android","Sdk")),i}function C(i){let n=i==="adb"?"platform-tools":"emulator";return P().map(s=>S(s,n,u(i)))}async function l(i){let n=e.os==="win32"?"where":"which",s=await e.exec(n,[u(i)],{timeoutMs:5e3});if(s.code!==0)return null;let a=s.stdout.split(`
9
9
  `)[0]?.trim();return a&&a!==""?a:null}async function m(i){let n=await e.exec(i,["-version"],{timeoutMs:1e4});return/Android emulator version/i.test(`${n.stdout}
10
10
  ${n.stderr}`)}async function f(i){if(i==="adb"){let n=ae(e.env);if(n){let a=S(n.platformToolsDir,u("adb"));if(e.fileExists(a)){let d={path:a,source:"sdk"};return r[i]=d,d}return delete r[i],null}if((await e.mobileDeps.status("emulator")).installed){let a=await e.mobileDeps.environment("emulator");if(a.platformToolsDir){let d={path:S(a.platformToolsDir,u("adb")),source:"local"};return r[i]=d,d}}return delete r[i],null}if(i==="emulator"){if((await e.sdkSuite.status()).emulator){let d={path:e.sdkSuite.emulatorPath(),source:"local"};return r[i]=d,d}let s=C(i).filter(d=>e.fileExists(d)),a=await l(i);a&&!s.includes(a)&&s.push(a);for(let d of s){if(!await m(d))continue;let c={path:d,source:"sdk"};return r[i]=c,c}}return delete r[i],null}async function b(){let i=await f("adb");if(!i)throw new Error("Managed adb is not installed.\nRun `kane-cli doctor --target emulator --install` to install the pinned Android platform-tools.");return i.path}async function D(i){let n=await e.exec(i,["devices","-l"],{timeoutMs:2e4});return at(n.stdout)}async function y(i,n){let s=await e.exec(i,["-s",n,"shell","getprop","ro.boot.qemu.avd_name"],{timeoutMs:1e4});if(s.code===0){let d=s.stdout.split(`
11
11
  `)[0]?.trim();if(d)return d}let a=await e.exec(i,["-s",n,"emu","avd","name"],{timeoutMs:1e4});if(a.code===0)return dt(a.stdout)}async function E(i){let n=await f("emulator");if(!n)return[];let s=await e.exec(n.path,["-list-avds"],{timeoutMs:2e4}),a=s.code===0?me(s.stdout):[];if(o.clear(),(await e.sdkSuite.status()).emulator){let c=await e.exec(n.path,["-list-avds"],{timeoutMs:2e4,env:{...e.env,...e.sdkSuite.environment()}});if(c.code===0)for(let h of me(c.stdout))o.add(h),a.includes(h)||a.push(h)}return a.filter(c=>!i.has(c)).map(c=>({platform:G,kind:"emulator",id:c,displayName:c,state:"stopped",virtualName:c,...pe(g(c))}))}async function I(){let i=await f("adb");if(!i)return[];let n=await D(i.path),s=new Set;for(let d of n){if(d.kind!=="emulator"||d.state!=="ready")continue;let c=await y(i.path,d.id);if(c&&(d.virtualName=c,d.displayName=c,Object.assign(d,pe(g(c))),s.add(c)),!d.osVersion&&d.state==="ready"){let h=await e.exec(i.path,["-s",d.id,"shell","getprop","ro.build.version.release"],{timeoutMs:1e4}),A=h.code===0?h.stdout.trim():"";A!==""&&(d.osVersion=A)}}let a=await E(s);return[...n,...a]}function F(i){let n=(e.readFileIfAny??V)(i);if(!n)return;let s=n.split(/\r?\n/).find(a=>/^FATAL\b/.test(a.trim()));return s?s.replace(/^FATAL\s*\|\s*/,"").trim():void 0}function j(i,n,s){let a=[`${i} could not start: ${n}`];return/multiple emulators with the same AVD/i.test(n)&&a.push(`Another emulator is already using ${i}. Close it (or quit the Android`,"Emulator app), then retry \u2014 kane-cli clears the lock a killed emulator","leaves behind, but it will not take an AVD away from a live one."),a.push(`Full output: ${s}`),a.join(`
@@ -17,4 +17,4 @@ ${d.stderr}`;if(d.code===0&&!/\bFailure\b/i.test(c))return;let h=ft(c),A=[`Insta
17
17
  `))}async function Ie(i,n,s){if(n.kind==="package"){let a=await ee(i);if(a.includes(n.value))return n.value;let d=W(n.value,a),c=[`${n.value} is not installed on ${i.displayName} (${i.id}).`];throw d.length>0?c.push("Close matches:",...d.map(h=>` ${h}`)):c.push("Pass a local .apk path to --app to install it instead."),new Error(c.join(`
18
18
  `))}if(n.kind!=="apk"){let a=n.kind==="aab"?"Android app bundles are not directly installable; build an APK first.":n.kind==="apks"?"Split bundles are not supported yet.":`${n.kind} artifacts are not installable on Android.`;throw new Error(a)}return await Me(i,n.value,s),_e(n.value)}async function $e(){let i=await e.mobileDeps.status("emulator");return i.installed?{status:i,env:await e.mobileDeps.environment("emulator")}:null}async function Ee(i={}){let n=[],s=await $e(),a=await e.mobileDeps.status("emulator"),d=await f("adb");if(d){let O=await e.exec(d.path,["version"],{timeoutMs:1e4}),k=lt(O.stdout);n.push({id:"android.adb",fixedByBundle:!0,label:"adb",required:!0,status:"pass",detail:k?`platform-tools ${k} \xB7 ${d.path}`:d.path})}else n.push({id:"android.adb",fixedByBundle:!0,label:"adb",required:!0,status:"fail",detail:a.corrupt??"managed mobile dependencies are not installed",fixText:"Run `kane-cli doctor --target emulator --install` to download the managed mobile deps bundle under ~/.testmuai/kaneai/mobile."});let c=!i.appiumUrl;s?.env.appiumHome?n.push({id:"android.appium",fixedByBundle:!0,label:"Appium",required:c,status:"pass",detail:S(X(s.env.appiumHome),"appium","node_modules",".bin",x())}):n.push({id:"android.appium",fixedByBundle:!0,label:"Appium",required:c,status:c?"fail":"info",detail:i.appiumUrl?`managed Appium not required because --appium-url is set (${i.appiumUrl})`:a.corrupt??"managed Appium is not installed",...c?{fixText:ce}:{}}),n.push({id:"android.uiautomator2",fixedByBundle:!0,label:"uiautomator2 driver",required:c,status:s?"pass":c?"fail":"info",detail:s?"bundled in the managed mobile deps":i.appiumUrl?"managed driver not required because --appium-url is set":"not installed in the managed deps tree",...s||!c?{}:{fixText:ce}});let h=S(e.home,".testmuai","kaneai","mobile","trees");e.fileExists(h)&&n.push({id:"android.legacy-trees",label:"legacy toolchain trees",required:!1,status:"info",detail:`${h} predates the deps bundle \u2014 removed automatically by the next bundle install`});let A=await l("adb");A&&n.push({id:"android.system-adb",label:"system adb",required:!1,status:"info",detail:`${A} (ignored; managed adb always wins and may restart its server)`});let T=await l("appium");T&&n.push({id:"android.system-appium",label:"system Appium",required:!1,status:"info",detail:`${T} (ignored; managed Appium always wins)`});let U=await e.sdkSuite.status(),q=await f("emulator");if(U.emulator?n.push({id:"android.emulator",label:"emulator",required:!1,status:"pass",detail:`managed emulator \xB7 ${e.sdkSuite.emulatorPath()}`}):q?n.push({id:"android.emulator",label:"emulator",required:!1,status:"info",detail:`${q.path} (system install)`}):n.push({id:"android.emulator",label:"emulator",required:!1,status:"info",detail:"not installed, so stopped AVDs are not listed. Install it with the Android SDK (Android Studio \u2192 SDK Manager \u2192 Android Emulator)."}),e.os==="darwin"){let O=await e.exec("sysctl",["-n","kern.hv_support"],{timeoutMs:5e3});n.push({id:"android.virtualization",label:"virtualization",required:!1,status:"info",detail:O.code===0&&O.stdout.trim()==="1"?"Hypervisor.framework available":"Hypervisor.framework not reported \u2014 emulator boots may hang"})}else e.os==="linux"?n.push({id:"android.virtualization",label:"virtualization",required:!1,status:"info",detail:e.fileExists("/dev/kvm")?"/dev/kvm present":"/dev/kvm missing \u2014 enable KVM or emulator boots will hang"}):n.push({id:"android.virtualization",label:"virtualization",required:!1,status:"info",detail:"not checked on this host"});return n}async function Ne(i){let n=await e.mobileDeps.environment("emulator"),s=[...n.dirs],a=r.emulator,d=a?.source==="sdk"?X(a.path):void 0;return d&&!s.includes(d)&&s.push(d),{...n,dirs:s}}async function Oe(i,n){let s=await b(),a=[];return n.appPackage&&a.push({label:`closing ${n.appPackage}`,file:s,args:["-s",i.id,"shell","am","force-stop",n.appPackage]}),n.shutdown&&a.push({label:`shutting down ${i.displayName}`,file:s,args:["-s",i.id,"emu","kill"]}),a}return{platform:G,available:()=>!0,checks:Ee,discover:I,prepare:Pe,listApps:ee,ensureApp:Ie,teardownPlan:Oe,toolEnv:Ne}}import{mkdtemp as be,readdir as xt,rm as ye,writeFile as kt}from"fs/promises";import{tmpdir as Ae}from"os";import{join as L}from"path";var Se="ios",Dt=12e4,Tt=3e5,Pt="an .ipa cannot be installed on a simulator \u2014 use a .zip of the .app build";function _t(t){let e=/\.iOS-(\d+)-(\d+)$/.exec(t);return e?`${e[1]}.${e[2]}`:void 0}function Mt(t){let e;try{e=JSON.parse(t)}catch{return[]}let r=[];for(let[o,u]of Object.entries(e.devices??{})){let g=_t(o);for(let p of u??[]){let w=typeof p.udid=="string"?p.udid:void 0,v=typeof p.name=="string"?p.name:void 0;if(!w||!v)continue;let x=p.state==="Booted"?"ready":p.state==="Shutdown"?"stopped":"offline",P=typeof p.deviceTypeIdentifier=="string"?p.deviceTypeIdentifier.replace(/^com\.apple\.CoreSimulator\.SimDeviceType\./,""):void 0;r.push({platform:Se,kind:"simulator",id:w,displayName:v,state:x,virtualName:v,...g?{osVersion:g}:{},...P?{modelIdentifier:P}:{}})}}return r}function It(t){let e;try{e=JSON.parse(t)}catch{return[]}let r=[];for(let[o,u]of Object.entries(e)){if(u?.ApplicationType!=="User")continue;let g=u.CFBundleIdentifier??o;r.includes(g)||r.push(g)}return r.sort()}function $t(t){let e;try{e=JSON.parse(t)}catch{return[]}let r=[];for(let[o,u]of Object.entries(e)){let g=u?.CFBundleIdentifier??o;g&&!r.includes(g)&&r.push(g)}return r.sort()}var Y=16;function Et(t){return/^Xcode (\d+(?:\.\d+)*)/m.exec(t)?.[1]}async function Nt(t){let e=await be(L(Ae(),"kane-app-unzip-")),r=()=>ye(e,{recursive:!0,force:!0}),o=await $("unzip",["-q",t,"-d",e],{timeoutMs:10*6e4});if(o.code!==0)throw await r(),new Error(`Could not unpack ${t}: ${o.stderr.trim()||`unzip exited ${o.code}`}`);for(let u of[e,L(e,"Payload")]){let g;try{g=await xt(u)}catch{continue}let p=g.find(w=>w.toLowerCase().endsWith(".app"));if(p)return{appPath:L(u,p),cleanup:r}}throw await r(),new Error(`${t} does not contain a .app bundle.`)}async function Ot(t){let e=await be(L(Ae(),"kane-plist-"));try{let r=L(e,"input.plist");await kt(r,t);let o=await $("plutil",["-convert","json","-o","-",r],{timeoutMs:15e3});if(o.code!==0)throw new Error(`plutil could not convert simctl output: ${o.stderr.trim()}`);return o.stdout}finally{await ye(e,{recursive:!0,force:!0})}}function Rt(){return{exec:$,os:process.platform,convertPlistToJson:Ot,mobileDeps:{status:()=>R().status("simulator"),environment:()=>R().environment("simulator")}}}function xe(t={}){let e={...Rt(),...t};async function r(l,m=3e4){return e.exec("xcrun",["simctl",...l],{timeoutMs:m})}async function o(){let l=await r(["list","devices","available","--json"]);return l.code!==0?[]:Mt(l.stdout)}async function u(){return o()}async function g(l,m){let f=await e.exec("open",["-a","Simulator","--args","-CurrentDeviceUDID",l],{timeoutMs:15e3});f.code!==0&&m?.(`could not open Simulator.app (${f.stderr.trim()||`exit ${f.code}`}); the device is booted and the run continues headless`)}async function p(l,m){if(l.state!=="ready"&&l.state!=="stopped")throw new Error(`${l.displayName} (${l.id}) is ${l.state}; open Simulator.app to inspect it, then retry.`);l.kind==="simulator"&&await g(l.id,m),l.state==="stopped"&&m?.(`booting ${l.displayName}\u2026`);let f=await r(["bootstatus",l.id,"-b"],Dt);if(f.code!==0)throw new Error(`Could not boot ${l.displayName}: ${f.stderr.trim()||f.stdout.trim()||`simctl bootstatus exited ${f.code}`}`);let b=(await o()).find(D=>D.id===l.id);if(b?.state==="ready")return b;throw new Error(`${l.displayName} finished booting but simctl still reports it as ${b?.state??"missing"}.`)}async function w(l){let m=await r(["listapps",l.id]);if(m.code!==0)throw new Error(`Could not list apps on ${l.displayName}: ${m.stderr.trim()||`simctl exited ${m.code}`}`);return It(await e.convertPlistToJson(m.stdout))}async function v(l){let m=L(l,"Info.plist"),f=await e.exec("plutil",["-convert","json","-o","-",m],{timeoutMs:15e3});if(f.code!==0)throw new Error(`${l} Info.plist could not be read: ${f.stderr.trim()||`plutil exited ${f.code}`}`);let b;try{b=JSON.parse(f.stdout)}catch{throw new Error(`${l} Info.plist did not contain valid JSON from plutil.`)}if(!b.CFBundleIdentifier)throw new Error(`${l} has no CFBundleIdentifier in its Info.plist.`);return b.CFBundleIdentifier}async function x(l,m,f){if(m.kind==="package"){let y=await r(["listapps",l.id]);if(y.code!==0)throw new Error(`Could not list apps on ${l.displayName}: ${y.stderr.trim()||`simctl exited ${y.code}`}`);let E=$t(await e.convertPlistToJson(y.stdout));if(E.includes(m.value))return m.value;let I=W(m.value,E),F=[`${m.value} is not installed on ${l.displayName} (${l.id}).`];throw I.length>0?F.push("Close matches:",...I.map(j=>` ${j}`)):F.push("Pass a .zip of the .app bundle to install it instead."),new Error(F.join(`
19
19
  `))}if(m.kind==="ipa")throw new Error(`${Pt}.`);if(m.kind!=="app"&&m.kind!=="zip")throw new Error(`${m.kind} artifacts are Android-only and not installable on iOS.`);let b=m.value,D;if(m.kind==="zip"){f?.(`unpacking ${m.value}\u2026`);let y=await Nt(m.value);b=y.appPath,D=y.cleanup}f?.(`installing ${b} on ${l.displayName}\u2026`);try{let y=await r(["install",l.id,b],Tt);if(y.code!==0)throw new Error(`Installing ${m.value} on ${l.displayName} failed: ${y.stderr.trim()||y.stdout.trim()}`);return await v(b)}finally{await D?.()}}async function P(l={}){let m=[],f=await e.exec("xcode-select",["-p"],{timeoutMs:1e4});if(f.code===0&&f.stdout.trim()!==""){let E=await e.exec("xcodebuild",["-version"],{timeoutMs:3e4}),I=E.code===0?Et(E.stdout):void 0;I?Number(I.split(".")[0])<Y?m.push({id:"ios.xcode",label:"Xcode",required:!0,status:"fail",detail:`Xcode ${I} is older than the required Xcode ${Y}`,fixText:`Update Xcode to ${Y} or newer from the App Store.`}):m.push({id:"ios.xcode",label:"Xcode",required:!0,status:"pass",detail:`Xcode ${I} \xB7 ${f.stdout.trim()}`}):m.push({id:"ios.xcode",label:"Xcode",required:!0,status:"fail",detail:`${f.stdout.trim()} has no usable xcodebuild (Command Line Tools only?)`,fixText:"Install full Xcode from the App Store, then run `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`."})}else m.push({id:"ios.xcode",label:"Xcode",required:!0,status:"fail",detail:"xcode-select reports no developer directory",fixText:"Install Xcode from the App Store, then run `xcode-select --install`."});let b=await e.exec("xcrun",["simctl","help"],{timeoutMs:15e3});m.push(b.code===0?{id:"ios.xcrun",label:"xcrun",required:!0,status:"pass",detail:"simctl reachable"}:{id:"ios.xcrun",label:"xcrun",required:!0,status:"fail",detail:`xcrun cannot run simctl: ${b.stderr.trim()||b.stdout.trim()||`exit ${b.code}`}`,fixText:"Run `xcode-select --install`, then confirm with `xcrun simctl list devices`. If Xcode is installed, `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer` repoints it."});let D=!l.appiumUrl,y=await e.mobileDeps.status();return m.push({id:"ios.xcuitest",fixedByBundle:!0,label:"xcuitest driver",required:D,status:y.installed?"pass":D?"fail":"info",detail:y.installed?"bundled in the managed mobile deps (with prebuilt WDA)":l.appiumUrl?"managed driver not required because --appium-url is set":y.corrupt??"the simulator deps bundle is not installed",...y.installed||!D?{}:{fixText:"Run `kane-cli doctor --target simulator --install` to download the simulator deps bundle."}}),m}async function C(l,m){let f=[];return m.appPackage&&f.push({label:`closing ${m.appPackage}`,file:"xcrun",args:["simctl","terminate",l.id,m.appPackage]}),m.shutdown&&f.push({label:`shutting down ${l.displayName}`,file:"xcrun",args:["simctl","shutdown",l.id]}),f}return{platform:Se,available:()=>e.os==="darwin",checks:P,discover:u,prepare:p,listApps:w,ensureApp:x,teardownPlan:C,toolEnv:()=>e.mobileDeps.environment()}}var ke=[we(),xe()];function H(){return ke.filter(t=>t.available())}function mi(){return H().map(t=>t.platform)}function pi(){return ke.map(t=>t.platform)}function Lt(t){let e=t.toLowerCase();return H().find(r=>r.platform.toLowerCase()===e)}async function Ct(t){let e=t?H().filter(o=>o.platform.toLowerCase()===t.toLowerCase()):H(),r=[];for(let o of e)try{r.push(...await o.discover())}catch{}return r}function Ft(t){return t.name!==void 0?`--device-name "${t.name}" --os-version ${t.osVersion}`:`os_version ${t.osVersion}`}function Z(t){return`
20
- See devices: kane-cli devices list --target ${t?.toLowerCase()==="ios"?"simulator":t?.toLowerCase()==="android"?"emulator":"<emulator|simulator>"}`}async function fi(t,e={}){let r=e.discover??Ct,o=e.providerFor??Lt,u=await r(t.platform),g=v=>{let x=o(v.platform);return x?{ok:!0,target:v,provider:x}:{ok:!1,reason:"not-found",candidates:u,message:`No provider is registered for platform '${v.platform}'.`}};if(t.device){let v=u.filter(x=>ie(x,t.device));return v.length===0?{ok:!1,reason:"not-found",candidates:u,message:`No device matches ${Ft(t.device)}.`+(u.length>0?Z(t.platform):" No devices were found \u2014 run `kane-cli doctor --target <emulator|simulator>`.")}:g(K(v))}let p=t.defaultTarget;if(p&&(!t.platform||t.platform.toLowerCase()===p.platform.toLowerCase())){let v=u.filter(P=>ne(P,p)),x=K(v);return x?g(x):{ok:!1,reason:t.interactive?"needs-picker":"not-found",candidates:u,message:`The saved default device ${re(p)} (${p.platform} \xB7 ${p.kind}) is not connected. `+(t.interactive?"Pick a target to bind this run.":"Pass --device-name <name> --os-version <version> explicitly \u2014 kane-cli never binds a different device on its own.")+(u.length>0?Z(p.platform):"")}}if(u.length===0)return{ok:!1,reason:"none-found",candidates:[],message:"No emulator or simulator found. Start an Android emulator or boot an iOS simulator, then run `kane-cli devices list --target <emulator|simulator>`."};let w=u.filter(v=>v.state==="ready");return w.length===1?g(w[0]):t.interactive?{ok:!1,reason:"needs-picker",candidates:u,message:w.length===0?"No target is ready \u2014 pick one to prepare it.":"More than one target is ready \u2014 pick one."}:{ok:!1,reason:"ambiguous",candidates:u,message:(w.length===0?"No target is ready.":`${w.length} targets are ready.`)+" Pass --device-name <name> --os-version <version>."+Z(t.platform)}}export{Ht as a,mi as b,pi as c,Lt as d,Ct as e,fi as f};
20
+ See devices: kane-cli devices list --target ${t?.toLowerCase()==="ios"?"simulator":t?.toLowerCase()==="android"?"emulator":"<emulator|simulator>"}`}async function fi(t,e={}){let r=e.discover??Ct,o=e.providerFor??Lt,u=await r(t.platform),g=v=>{let x=o(v.platform);return x?{ok:!0,target:v,provider:x}:{ok:!1,reason:"not-found",candidates:u,message:`No provider is registered for platform '${v.platform}'.`}};if(t.device){let v=u.filter(x=>ne(x,t.device));return v.length===0?{ok:!1,reason:"not-found",candidates:u,message:`No device matches ${Ft(t.device)}.`+(u.length>0?Z(t.platform):" No devices were found \u2014 run `kane-cli doctor --target <emulator|simulator>`.")}:g(K(v))}let p=t.defaultTarget;if(p&&(!t.platform||t.platform.toLowerCase()===p.platform.toLowerCase())){let v=u.filter(P=>re(P,p)),x=K(v);return x?g(x):{ok:!1,reason:t.interactive?"needs-picker":"not-found",candidates:u,message:`The saved default device ${se(p)} (${p.platform} \xB7 ${p.kind}) is not connected. `+(t.interactive?"Pick a target to bind this run.":"Pass --device-name <name> --os-version <version> explicitly \u2014 kane-cli never binds a different device on its own.")+(u.length>0?Z(p.platform):"")}}if(u.length===0)return{ok:!1,reason:"none-found",candidates:[],message:"No emulator or simulator found. Start an Android emulator or boot an iOS simulator, then run `kane-cli devices list --target <emulator|simulator>`."};let w=u.filter(v=>v.state==="ready");return w.length===1?g(w[0]):t.interactive?{ok:!1,reason:"needs-picker",candidates:u,message:w.length===0?"No target is ready \u2014 pick one to prepare it.":"More than one target is ready \u2014 pick one."}:{ok:!1,reason:"ambiguous",candidates:u,message:(w.length===0?"No target is ready.":`${w.length} targets are ready.`)+" Pass --device-name <name> --os-version <version>."+Z(t.platform)}}export{Ht as a,mi as b,pi as c,Lt as d,Ct as e,fi as f};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a}from"./chunk-5Y2G4NC7.js";import{a as n}from"./chunk-HCBYKLMW.js";import{b as o}from"./chunk-33DWJV67.js";import{a as s}from"./chunk-6YGTRKDT.js";import{z as t}from"./chunk-J4FIESTB.js";import{e as r}from"./chunk-UR6MHSHU.js";var l=r(s(),1);var m=r(n(),1),i=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function b({active:e=!0}){let[p,c]=(0,l.useState)(0);return a(()=>{c(f=>(f+1)%i.length)},e?80:null),(0,m.jsx)(o,{color:t.orange,children:e?i[p]:"\u25CF"})}export{b as a};
2
+ import{a}from"./chunk-5Y2G4NC7.js";import{a as n}from"./chunk-HCBYKLMW.js";import{z as t}from"./chunk-YKOZBFR3.js";import{b as o}from"./chunk-33DWJV67.js";import{a as s}from"./chunk-6YGTRKDT.js";import{e as r}from"./chunk-UR6MHSHU.js";var l=r(s(),1);var m=r(n(),1),i=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function b({active:e=!0}){let[p,c]=(0,l.useState)(0);return a(()=>{c(f=>(f+1)%i.length)},e?80:null),(0,m.jsx)(o,{color:t.orange,children:e?i[p]:"\u25CF"})}export{b as a};
@@ -1,4 +1,4 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{L as _,a as b,c as x,r as S,x as k,y as O}from"./chunk-PI7OXS62.js";import{f as v,h as C}from"./chunk-KU3YHPWZ.js";var F=e=>`conv#turn=${e}`,$=(e,r)=>`${e}:turn:${r}`,N=/^(.+):turn:(\d+)$/,G=e=>N.test(e);function P(e){return e.flatMap(r=>{let t=r;return t.kind==="user_message"&&typeof t.data?.message_id=="string"?[t.data.message_id]:[]})}function L(e,r,t,n,o=[]){let a=e.parse(t);if(a!==null&&e.resolveToken(a)===null)return[];let m=new Set(P(n)),s=new Set;for(let i of e.recordsSince(a))i.conv?.source_id===r&&i.conv.turn>=1&&s.add(i.conv.turn);for(let i of o){let c=N.exec(i);c&&c[1]===r&&s.add(Number(c[2]))}if(s.size===0)return[];let d=e.headOf(r,{token:null}),l=typeof d=="string"?e.getNode(d,{token:null})?.content?.blob:void 0,f=typeof l=="string"?e.getBlob(l)?.toString("utf8")??"":"",p=[];for(let i of[...s].sort((c,u)=>c-u)){let c=$(r,i),u=m.has(c)?null:y(f,i);u?.speaker==="person"&&p.push({message_id:c,text:u.text})}return p}function y(e,r){for(let t of e.split(`
2
+ import{L as _,a as b,c as x,r as S,x as k,y as O}from"./chunk-5EAJO372.js";import{f as v,h as C}from"./chunk-KU3YHPWZ.js";var F=e=>`conv#turn=${e}`,$=(e,r)=>`${e}:turn:${r}`,N=/^(.+):turn:(\d+)$/,G=e=>N.test(e);function P(e){return e.flatMap(r=>{let t=r;return t.kind==="user_message"&&typeof t.data?.message_id=="string"?[t.data.message_id]:[]})}function L(e,r,t,n,o=[]){let a=e.parse(t);if(a!==null&&e.resolveToken(a)===null)return[];let m=new Set(P(n)),s=new Set;for(let i of e.recordsSince(a))i.conv?.source_id===r&&i.conv.turn>=1&&s.add(i.conv.turn);for(let i of o){let c=N.exec(i);c&&c[1]===r&&s.add(Number(c[2]))}if(s.size===0)return[];let d=e.headOf(r,{token:null}),l=typeof d=="string"?e.getNode(d,{token:null})?.content?.blob:void 0,f=typeof l=="string"?e.getBlob(l)?.toString("utf8")??"":"",p=[];for(let i of[...s].sort((c,u)=>c-u)){let c=$(r,i),u=m.has(c)?null:y(f,i);u?.speaker==="person"&&p.push({message_id:c,text:u.text})}return p}function y(e,r){for(let t of e.split(`
3
3
  `))if(t.trim())try{let n=JSON.parse(t);if(n.turn===r){let o=n.speaker==="person"||n.speaker==="agent"||n.speaker==="kane"?n.speaker:null;return{text:k(n.text).text,speaker:o}}}catch{}return null}function H(e,r){return y(e,r)?.text??null}var E={format:"conversation",media_type:"text/x-conversation",anchors_supported:["#turn="]},V="su-conv-";function J(e){let{store:r,graph:t,sessionStamp:n}=e,o=`${V}${n}`,a=t.heads.get(o);if(typeof a=="string")return{record:null,errors:[{code:"CONV_SOURCE_EXISTS",detail:`${o} already exists \u2014 resume it`}],sourceId:o,cid:a};let m=r.putBlob(Buffer.from("","utf8")),s=x(o,m),d=C("source",s);if(d.length>0)return{record:null,errors:d.map(p=>({code:p.code,detail:p.detail})),sourceId:o,cid:""};let l=b("source",s);return{record:_(r,{ts:new Date().toISOString(),proposal_id:null,nodes:[{cid:l,label:v.SOURCE,content:s}],edges:[],review:[],supersessions:[],source_head_moves:{[o]:l},media:{[o]:E},conv:{source_id:o,turn:0,append_of:null}},{graph:t,scope:{sourcePins:[{source_id:o}]},expectPrev:t.latestHash,intent:{v:1,verb:"conv-mint",args:S({sessionStamp:n,by:e.by}),pins:{}},provenance:e.provenance}).record,errors:null,sourceId:o,cid:l}}function X(e){let{store:r,graph:t,sourceId:n,force:o}=e,{text:a,replaced:m}=k(e.text),s=t.heads.get(n),d=t.convChains.get(n);if(typeof s!="string"||!d)return{record:null,errors:[{code:"CONV_SOURCE_MISSING",detail:`${n} is not a live conversation source`}]};let f=t.getNode(s)?.content?.blob;if(typeof f!="string")return{record:null,errors:[{code:"CONV_SOURCE_MISSING",detail:`${n} head node unreadable`}]};let p=r.getBlob(f)?.toString("utf8")??"",i=d.turns,c=i>0?y(p,i):null;if(!o&&c!==null&&c.text===a&&c.speaker===(e.speaker??null))return{record:null,errors:null,turn:i,cid:s,idempotent:!0};let u=i+1,I=e.speaker?{turn:u,text:a,speaker:e.speaker}:{turn:u,text:a},T=`${p}${JSON.stringify(I)}
4
4
  `,w=r.putBlob(Buffer.from(T,"utf8")),h=x(n,w),g=b("source",h),R=_(r,{ts:new Date().toISOString(),proposal_id:null,nodes:[{cid:g,label:v.SOURCE,content:h}],edges:[],review:[],supersessions:[],source_head_moves:{[n]:g},media:{[n]:E},conv:{source_id:n,turn:u,append_of:s}},{graph:t,scope:{sourcePins:[{source_id:n}]},expectPrev:t.latestHash,intent:{v:1,verb:"conv-turn",args:S({sourceId:n,text:a,force:o??!1,by:e.by,...e.speaker?{speaker:e.speaker}:{}}),pins:{append_of:s}},provenance:e.provenance}),B=m>0?{warnings:[O(n,m)]}:{};return{record:R.record,errors:null,turn:u,cid:g,idempotent:!1,...B}}export{F as a,$ as b,G as c,P as d,L as e,H as f,V as g,J as h,X as i};