@testmuai/kane-cli 0.10.3 → 0.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/dist/ChatSurface-WKYH5MYP.js +2 -0
  2. package/dist/ChromeProfilePicker-ROQIRMWR.js +2 -0
  3. package/dist/{CliFeedbackPrompt-JWCTMIGI.js → CliFeedbackPrompt-55OKAT4W.js} +1 -1
  4. package/dist/{CliUploadProgress-XFRRFRL4.js → CliUploadProgress-NK2U3CKQ.js} +1 -1
  5. package/dist/{ConfigView-6JF4DOJN.js → ConfigView-7A5JTKLF.js} +1 -1
  6. package/dist/EvidenceViewOffer-U7J5ZRVK.js +2 -0
  7. package/dist/FolderPicker-R4QDIFTW.js +2 -0
  8. package/dist/InfoBox-SRQ4TSUT.js +2 -0
  9. package/dist/LinksBox-7BWLLQVR.js +2 -0
  10. package/dist/ProfilesView-TQTJR4WQ.js +2 -0
  11. package/dist/ProjectPicker-A5SXNDUL.js +2 -0
  12. package/dist/SaveSessionPrompt-IECYZMXW.js +2 -0
  13. package/dist/SingleShotApp-MN5IE6EU.js +2 -0
  14. package/dist/SummaryBox-WFOS6GON.js +2 -0
  15. package/dist/TestMdRunView-URNSXIVC.js +2 -0
  16. package/dist/TestrunEvidenceTable-SZPZMW3J.js +2 -0
  17. package/dist/{WhoamiView-H7JNLLCY.js → WhoamiView-G6QP4SID.js} +1 -1
  18. package/dist/{app-client-U2YYF65L.js → app-client-2RR5ATI6.js} +1 -1
  19. package/dist/app-download-UGLDWWTX.js +2 -0
  20. package/dist/{assurance-job-F4L3T4VJ.js → assurance-job-V5QB36WJ.js} +1 -1
  21. package/dist/{binary-K3XMILST.js → binary-32FXH6PQ.js} +1 -1
  22. package/dist/bind-3PB77PWJ.js +2 -0
  23. package/dist/bootstrap-A2O4UZUJ.js +2 -0
  24. package/dist/{bridge-2UHJOVLX.js → bridge-SPGIYAAG.js} +1 -1
  25. package/dist/{catalog-YCU6OHNV.js → catalog-P5IOIVYP.js} +1 -1
  26. package/dist/{catalog-client-MVEEHTG2.js → catalog-client-LR2KPSU7.js} +1 -1
  27. package/dist/{changelog-5UB3AQT6.js → changelog-GKIKDJ32.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-5YYCCM6K.js → chunk-2AHQ3D3D.js} +1 -1
  32. package/dist/{chunk-UWPG5MWM.js → chunk-2EKLTUY2.js} +1 -1
  33. package/dist/{chunk-KL7XFNSD.js → chunk-2G7UYQOW.js} +1 -1
  34. package/dist/{chunk-GXQYFOBD.js → chunk-2MBNAW2G.js} +1 -1
  35. package/dist/{chunk-Y2HQMJGS.js → chunk-2NP3THOE.js} +1 -1
  36. package/dist/chunk-37KFCYHG.js +18 -0
  37. package/dist/{chunk-ZHAMVLQZ.js → chunk-3A4KK22B.js} +1 -1
  38. package/dist/{chunk-L3BUPFAQ.js → chunk-3CFAE36M.js} +1 -1
  39. package/dist/{chunk-TU2KPOW2.js → chunk-3DFBFYTD.js} +2 -2
  40. package/dist/{chunk-QE4AWNOV.js → chunk-3RJRCAUX.js} +6 -6
  41. package/dist/chunk-3UY4WPMQ.js +8 -0
  42. package/dist/{chunk-3NWUXRSI.js → chunk-4DM5EWEV.js} +1 -1
  43. package/dist/{chunk-ZMWTRXFH.js → chunk-4DRFMDAW.js} +1 -1
  44. package/dist/{chunk-PI7OXS62.js → chunk-5EAJO372.js} +1 -1
  45. package/dist/{chunk-4KL3TSTT.js → chunk-5K7PCSTP.js} +4 -4
  46. package/dist/{chunk-HV2CDY4K.js → chunk-5LKDOE3P.js} +1 -1
  47. package/dist/{chunk-AT7AT3AR.js → chunk-5OFHMBZC.js} +5 -5
  48. package/dist/{chunk-CQDCNP7V.js → chunk-5ORBAYTU.js} +1 -1
  49. package/dist/{chunk-2TK4MDF2.js → chunk-63BFLTJI.js} +1 -1
  50. package/dist/{chunk-BBJAKSA7.js → chunk-642GD7E6.js} +2 -2
  51. package/dist/{chunk-KKLCXRW6.js → chunk-642LB5R2.js} +1 -1
  52. package/dist/{chunk-Q4SMITTV.js → chunk-66C5A2F5.js} +1 -1
  53. package/dist/{chunk-X6FCXBXU.js → chunk-6FVGPKVX.js} +1 -1
  54. package/dist/{chunk-32HED7X2.js → chunk-6KUUSONE.js} +1 -1
  55. package/dist/{chunk-6FFX4S7N.js → chunk-6OL5EVRC.js} +1 -1
  56. package/dist/{chunk-SXBPUUQ5.js → chunk-6PZ3SVWE.js} +1 -1
  57. package/dist/{chunk-SJQTTEXQ.js → chunk-6VG2FG67.js} +1 -1
  58. package/dist/chunk-6WN4WSXR.js +2 -0
  59. package/dist/{chunk-CB2BWDHG.js → chunk-76MKY7FG.js} +4 -4
  60. package/dist/{chunk-LRNUGKYH.js → chunk-77BZTEHJ.js} +1 -1
  61. package/dist/chunk-7TSM2FCL.js +5 -0
  62. package/dist/{chunk-KQ4XKTIZ.js → chunk-A5C7HIAH.js} +1 -1
  63. package/dist/{chunk-ENRFXGID.js → chunk-ABAUIIPD.js} +1 -1
  64. package/dist/{chunk-JTNEF5ZP.js → chunk-AL6IAMYV.js} +1 -1
  65. package/dist/{chunk-4CJQ7XZP.js → chunk-AXOSLGQ4.js} +1 -1
  66. package/dist/{chunk-CNHKZE4F.js → chunk-BDZWRJAL.js} +1 -1
  67. package/dist/{chunk-VCVEZEVS.js → chunk-BFRWZPIK.js} +1 -1
  68. package/dist/{chunk-IZ66FKPC.js → chunk-BIGOLVK6.js} +1 -1
  69. package/dist/{chunk-Q4ALB7SH.js → chunk-BLHFNL5K.js} +1 -1
  70. package/dist/chunk-BRWCWZE3.js +2 -0
  71. package/dist/{chunk-X7S7IGCV.js → chunk-BXJNL22L.js} +1 -1
  72. package/dist/chunk-BZEW7CSM.js +3 -0
  73. package/dist/{chunk-Z24SD2EJ.js → chunk-C3DMMAFP.js} +1 -1
  74. package/dist/{chunk-DQXQJJOP.js → chunk-C466XER3.js} +2 -2
  75. package/dist/{chunk-BLVDV3QQ.js → chunk-C4UME2PA.js} +1 -1
  76. package/dist/chunk-CBEMXSWF.js +2 -0
  77. package/dist/{chunk-6QCCTZO3.js → chunk-CBPACEYQ.js} +1 -1
  78. package/dist/{chunk-MD3RABID.js → chunk-CJGQFKLJ.js} +1 -1
  79. package/dist/{chunk-YVVFXBT5.js → chunk-CQBLJTDU.js} +1 -1
  80. package/dist/{chunk-X2MDL6S4.js → chunk-CVVUBCB7.js} +1 -1
  81. package/dist/{chunk-35BG2EMW.js → chunk-E3C4OWSD.js} +1 -1
  82. package/dist/{chunk-ERRIDBE7.js → chunk-EIQSXD7B.js} +1 -1
  83. package/dist/{chunk-YPGZ5E4I.js → chunk-EP4WGGMY.js} +1 -1
  84. package/dist/{chunk-GAKBHNC4.js → chunk-EUGFABAS.js} +1 -1
  85. package/dist/{chunk-HBLHKQR7.js → chunk-F4GWIX66.js} +1 -1
  86. package/dist/{chunk-SALZ6WSF.js → chunk-F4XCCOWC.js} +1 -1
  87. package/dist/{chunk-NHGPMYM3.js → chunk-FHULYIG3.js} +1 -1
  88. package/dist/{chunk-7RELCXRW.js → chunk-FKA5SWWF.js} +1 -1
  89. package/dist/{chunk-OCVDMZWB.js → chunk-FLGOQ6Q6.js} +1 -1
  90. package/dist/{chunk-YILRYMMG.js → chunk-FNBHP75S.js} +1 -1
  91. package/dist/{chunk-JBKHX5ES.js → chunk-FOURJ24E.js} +1 -1
  92. package/dist/{chunk-DC5F2ADJ.js → chunk-FOUUD3LI.js} +1 -1
  93. package/dist/{chunk-IEHJG6J4.js → chunk-FP6JCXOS.js} +1 -1
  94. package/dist/{chunk-ZDCXWEQG.js → chunk-GRQKMOKE.js} +1 -1
  95. package/dist/{chunk-XKOVEMVZ.js → chunk-H23ZMHHC.js} +1 -1
  96. package/dist/{chunk-E4GIGM5V.js → chunk-H6IPGZTP.js} +1 -1
  97. package/dist/{chunk-MINDIQET.js → chunk-HBGYEA3O.js} +1 -1
  98. package/dist/{chunk-KBGMQYMD.js → chunk-HHF7AM3D.js} +1 -1
  99. package/dist/{chunk-PCQK62MP.js → chunk-HTJDMLZS.js} +1 -1
  100. package/dist/{chunk-ZPU3WAC4.js → chunk-HY5BBSYX.js} +1 -1
  101. package/dist/{chunk-TM6VLC6V.js → chunk-IPIARGHE.js} +1 -1
  102. package/dist/{chunk-M2E5CPPV.js → chunk-IPXITNFD.js} +1 -1
  103. package/dist/{chunk-NI3TIAD7.js → chunk-IT6M7OMG.js} +1 -1
  104. package/dist/{chunk-Y3RJHWNK.js → chunk-ITG5WMQG.js} +1 -1
  105. package/dist/{chunk-WEJR2V7R.js → chunk-J3XOEMKO.js} +1 -1
  106. package/dist/{chunk-OHGL4GEJ.js → chunk-J3YID4A5.js} +1 -1
  107. package/dist/{chunk-OCMPWCKQ.js → chunk-J44FV6CH.js} +1 -1
  108. package/dist/{chunk-3MD2XLE7.js → chunk-J5D4IGAM.js} +9 -8
  109. package/dist/{chunk-6QH75BPJ.js → chunk-J5QFO7LW.js} +1 -1
  110. package/dist/{chunk-GJXO6FF7.js → chunk-JBUKEIYL.js} +1 -1
  111. package/dist/{chunk-EJGCIGQY.js → chunk-JGQ3VB44.js} +1 -1
  112. package/dist/{chunk-GEZVC4S3.js → chunk-JM6AKCN4.js} +1 -1
  113. package/dist/{chunk-3KY7HHQU.js → chunk-JSSM2TWY.js} +1 -1
  114. package/dist/{chunk-3ZC7GSMM.js → chunk-JVXEAO62.js} +1 -1
  115. package/dist/{chunk-TM45NPWL.js → chunk-JYH7CTF7.js} +1 -1
  116. package/dist/{chunk-YNDELIXL.js → chunk-JZ7GFPKZ.js} +1 -1
  117. package/dist/{chunk-CTHUX7O4.js → chunk-KUSHV5SR.js} +1 -1
  118. package/dist/{chunk-LTPOMMAB.js → chunk-LB5NIDW6.js} +1 -1
  119. package/dist/{chunk-SIHX5FW5.js → chunk-LJKTIKZY.js} +1 -1
  120. package/dist/{chunk-LPJKNX6D.js → chunk-LMOW4NM5.js} +1 -1
  121. package/dist/{chunk-WIVKLNIO.js → chunk-LPJX5L3F.js} +1 -1
  122. package/dist/{chunk-HRIDAK6Y.js → chunk-LWP7E5FU.js} +1 -1
  123. package/dist/{chunk-YWWVF5OU.js → chunk-LXYXCANZ.js} +1 -1
  124. package/dist/{chunk-35WUYKGO.js → chunk-MAQVRBUQ.js} +1 -1
  125. package/dist/{chunk-NPAUSUNM.js → chunk-MBNSCXVK.js} +1 -1
  126. package/dist/{chunk-ZMIKNNO6.js → chunk-MIQ6J5YG.js} +1 -1
  127. package/dist/chunk-MTMHB5LF.js +2 -0
  128. package/dist/{chunk-RNHSULQM.js → chunk-MUL2QFG2.js} +1 -1
  129. package/dist/{chunk-MEBEVHGP.js → chunk-N4XUGIAK.js} +1 -1
  130. package/dist/{chunk-GQAWZEA4.js → chunk-NAUIJF72.js} +1 -1
  131. package/dist/{chunk-PB6RXDWQ.js → chunk-NFDVDEOH.js} +2 -2
  132. package/dist/{chunk-LHJSIHLC.js → chunk-NGBXXBHP.js} +1 -1
  133. package/dist/{chunk-YCVEI7BT.js → chunk-NIBNVPAE.js} +1 -1
  134. package/dist/chunk-NKJRAQ6L.js +6 -0
  135. package/dist/{chunk-OZNYQONA.js → chunk-NNVHWFLI.js} +3 -3
  136. package/dist/{chunk-7SU53QGU.js → chunk-NZ7UCAN6.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-VO2NNXKR.js → chunk-OPR5XIPT.js} +1 -1
  140. package/dist/{chunk-EZMRWXRT.js → chunk-OVB5GVRB.js} +1 -1
  141. package/dist/{chunk-LV7224DG.js → chunk-PCL2FYPE.js} +1 -1
  142. package/dist/{chunk-AVLYSNEG.js → chunk-PE3CEG6E.js} +1 -1
  143. package/dist/{chunk-MEMXFTLD.js → chunk-PEHVBCXM.js} +1 -1
  144. package/dist/{chunk-6HRNG4CK.js → chunk-PKXWYYVK.js} +1 -1
  145. package/dist/{chunk-YQZ736IQ.js → chunk-PSBR2LVL.js} +1 -1
  146. package/dist/{chunk-R6TFRAMZ.js → chunk-PUNFWBRW.js} +1 -1
  147. package/dist/{chunk-7Y55CO42.js → chunk-PZOQ2IQK.js} +1 -1
  148. package/dist/{chunk-SMGRXKXX.js → chunk-Q4QCSO6Y.js} +1 -1
  149. package/dist/{chunk-TUSG7DIL.js → chunk-QJ5XHVS5.js} +1 -1
  150. package/dist/{chunk-TAY7J5VS.js → chunk-QLGQDNA3.js} +1 -1
  151. package/dist/{chunk-QEM5ZRDN.js → chunk-QRUAI2ST.js} +1 -1
  152. package/dist/{chunk-C4KAPGBS.js → chunk-QWEQ742S.js} +3 -3
  153. package/dist/{chunk-Z47ZEFH7.js → chunk-R6S4EJ5R.js} +1 -1
  154. package/dist/{chunk-WE7HRAGO.js → chunk-RHQLDNZL.js} +1 -1
  155. package/dist/{chunk-3RO2YGKH.js → chunk-RM5ZVDVR.js} +1 -1
  156. package/dist/{chunk-N7IWR45S.js → chunk-RU3SWHRE.js} +1 -1
  157. package/dist/{chunk-OBNVGD5H.js → chunk-S5UITUBB.js} +1 -1
  158. package/dist/chunk-SACFQNUH.js +47 -0
  159. package/dist/{chunk-X45RZIAJ.js → chunk-SDIHDYWT.js} +1 -1
  160. package/dist/{chunk-AHT2ORJT.js → chunk-SFHDRKUX.js} +1 -1
  161. package/dist/{chunk-OTMHCHH6.js → chunk-SLISNOG6.js} +1 -1
  162. package/dist/{chunk-T77LTLAD.js → chunk-SULRMI2J.js} +1 -1
  163. package/dist/{chunk-OOGKX4Y6.js → chunk-TC2PHBPH.js} +1 -1
  164. package/dist/{chunk-HVOXMCKE.js → chunk-TCK7WR3M.js} +1 -1
  165. package/dist/{chunk-FOLUB336.js → chunk-TFSWG7AS.js} +1 -1
  166. package/dist/{chunk-PRBWZXFA.js → chunk-TOOJTCON.js} +6 -6
  167. package/dist/chunk-TPCW5OU5.js +3 -0
  168. package/dist/chunk-U5V3L5QH.js +2 -0
  169. package/dist/{chunk-LXK4B2FE.js → chunk-UJYC2XDD.js} +1 -1
  170. package/dist/chunk-UV7FPIBL.js +2 -0
  171. package/dist/{chunk-23DKB2MT.js → chunk-UVL6XQHU.js} +1 -1
  172. package/dist/{chunk-M7A66MSK.js → chunk-UWEBI76C.js} +1 -1
  173. package/dist/{chunk-PTLOOVV4.js → chunk-UWQ4KXLB.js} +1 -1
  174. package/dist/{chunk-ZCBOHWN3.js → chunk-V24LUINK.js} +1 -1
  175. package/dist/{chunk-ND6OP3O2.js → chunk-V3IWCGZT.js} +1 -1
  176. package/dist/{chunk-YDB72F4K.js → chunk-V4SL74TK.js} +1 -1
  177. package/dist/chunk-VEE2O524.js +34 -0
  178. package/dist/{chunk-VKVYT6KZ.js → chunk-VJRXJJML.js} +2 -2
  179. package/dist/{chunk-NRAPCFI2.js → chunk-VKIUHHNT.js} +2 -2
  180. package/dist/{chunk-QHH42RH5.js → chunk-W3PQMIXE.js} +1 -1
  181. package/dist/{chunk-LLQWEGXD.js → chunk-W5EDS4DF.js} +1 -1
  182. package/dist/{chunk-LUA25RYS.js → chunk-WAC5WISH.js} +1 -1
  183. package/dist/{chunk-W54BX6HC.js → chunk-WCIRLITM.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-GLM5UGTF.js → chunk-X66NIHT4.js} +1 -1
  188. package/dist/{chunk-B7ZX5HEN.js → chunk-XDAFRUAJ.js} +1 -1
  189. package/dist/{chunk-JNPFEBUR.js → chunk-XDAHKZ4J.js} +1 -1
  190. package/dist/chunk-XJV5SF3X.js +26 -0
  191. package/dist/{chunk-ZCL7XIVS.js → chunk-XKJZG4GR.js} +1 -1
  192. package/dist/{chunk-EBJW6POT.js → chunk-XRJH4UF3.js} +1 -1
  193. package/dist/chunk-XTQUCCJH.js +2 -0
  194. package/dist/chunk-Y3RDLUH5.js +7 -0
  195. package/dist/{chunk-SVIIUKJ2.js → chunk-Y7GSOKXS.js} +1 -1
  196. package/dist/{chunk-UJ37XGSP.js → chunk-YF22VTR5.js} +3 -3
  197. package/dist/chunk-YIBLZIXF.js +13 -0
  198. package/dist/{chunk-2JFRN62I.js → chunk-YLI7DQMJ.js} +2 -2
  199. package/dist/chunk-YQXOD7SV.js +102 -0
  200. package/dist/{chunk-4UX5N7YI.js → chunk-YTWBNACA.js} +1 -1
  201. package/dist/{chunk-KCXLRR3Q.js → chunk-YUFXE6WU.js} +1 -1
  202. package/dist/{chunk-SSOUYKVG.js → chunk-ZIRSTOEV.js} +1 -1
  203. package/dist/command-span-HZSKIZH7.js +2 -0
  204. package/dist/commands-TRAUFCRZ.js +2 -0
  205. package/dist/{committer-UO3B3S5Y.js → committer-L2HXEODA.js} +1 -1
  206. package/dist/{config-7WTZPMAH.js → config-O3BWQUP4.js} +1 -1
  207. package/dist/cover-cmd-SAWVP7TL.js +2 -0
  208. package/dist/{credentials-5WIFF5DG.js → credentials-NNNODDXF.js} +1 -1
  209. package/dist/{deps-bundle-BLLJ2BQ4.js → deps-bundle-CXKBCA7W.js} +1 -1
  210. package/dist/{deps-resolve-WQ6J6RLI.js → deps-resolve-K7XNTRZX.js} +1 -1
  211. package/dist/design-chat-S4KYE6PP.js +2 -0
  212. package/dist/{design-committer-7YIPFKMO.js → design-committer-ZKNW5LUS.js} +1 -1
  213. package/dist/design-headless-DDAFAJNR.js +2 -0
  214. package/dist/design-remote-UITWJ72Q.js +3 -0
  215. package/dist/device-env-SBTHFSVK.js +2 -0
  216. package/dist/dispatch-BGH5PVZ4.js +2 -0
  217. package/dist/doctor-SRMLENYN.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-FOWW3MOS.js +2 -0
  221. package/dist/evolve-cmd-MDK2H4JY.js +2 -0
  222. package/dist/evolve-remote-4G7YFC5H.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-Q4NLNJFB.js +12 -0
  226. package/dist/explore-MWUMVGRM.js +2 -0
  227. package/dist/explore-context-tty-QLMZGYBX.js +2 -0
  228. package/dist/explore-entry-QMCVGRP4.js +6 -0
  229. package/dist/{explore-live-XIWWUV52.js → explore-live-QIET6WO4.js} +1 -1
  230. package/dist/{explore-run-tty-M56I23IF.js → explore-run-tty-6UTBRCEF.js} +2 -2
  231. package/dist/{extract-bind-LZ22VFKB.js → extract-bind-UTERWZMW.js} +3 -3
  232. package/dist/extract-chat-4WBNRVPG.js +2 -0
  233. package/dist/{extract-cmd-46E2XDWZ.js → extract-cmd-SYZX6CML.js} +2 -2
  234. package/dist/extract-headless-QBF77JWP.js +2 -0
  235. package/dist/{feeder-NGWIPZ26.js → feeder-VAY4NYBX.js} +1 -1
  236. package/dist/folder-flags-IJ556UET.js +2 -0
  237. package/dist/gaps-cmd-E55OGZ7P.js +3 -0
  238. package/dist/gate-5UIJVMHL.js +2 -0
  239. package/dist/gate-VJ7W5QIH.js +2 -0
  240. package/dist/{generate-headless-HXAVEAEZ.js → generate-headless-VYD2QIUO.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-3P6SKFJC.js} +2 -2
  244. package/dist/index.js +185 -184
  245. package/dist/ingest-6UQGSQYU.js +2 -0
  246. package/dist/ingest-cmd-HMTLO5MB.js +8 -0
  247. package/dist/ingest-remote-NIW5VAGW.js +2 -0
  248. package/dist/install-KJDAGU2R.js +2 -0
  249. package/dist/{interactive-bind-SOD7VTAY.js → interactive-bind-K3ZQFHLH.js} +4 -4
  250. package/dist/{interactive-remote-7ZSTI66T.js → interactive-remote-SGM76D6M.js} +2 -2
  251. package/dist/lane-EHU4JRRU.js +2 -0
  252. package/dist/lattice-auth-DCAVEQKY.js +2 -0
  253. package/dist/lifecycle-cmd-Y5DH2PL5.js +2 -0
  254. package/dist/list-cmd-RYHICCUV.js +3 -0
  255. package/dist/list-commands-QFTIQE6Q.js +2 -0
  256. package/dist/{list-remote-EFCET42K.js → list-remote-PWAQBF57.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-W7RAVXSD.js +2 -0
  260. package/dist/maintenance-cmd-JNP2KCSI.js +2 -0
  261. package/dist/mobile-prompts-SP2RULD7.js +2 -0
  262. package/dist/onboarding-YPIKXNYA.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-BWGA7WXR.js +3 -0
  266. package/dist/phase-seed-G5JSYKSL.js +2 -0
  267. package/dist/pipeline-YE4IRKQX.js +2 -0
  268. package/dist/{policy-commands-4PUGESCW.js → policy-commands-MSJIPHDB.js} +1 -1
  269. package/dist/prepare-target-G7LU4LYX.js +2 -0
  270. package/dist/pull-cmd-G3PVSSFP.js +2 -0
  271. package/dist/pull-route-5JQUUSU7.js +2 -0
  272. package/dist/readmodel-FARAAPUU.js +2 -0
  273. package/dist/real-device-run-425XK527.js +2 -0
  274. package/dist/reconcile-cmd-QJBYZVUB.js +5 -0
  275. package/dist/reconcile-deps-TILDRCHG.js +2 -0
  276. package/dist/{reconcile-remote-3W6ZTO3G.js → reconcile-remote-JMV26DLX.js} +2 -2
  277. package/dist/recording-banner-VZ67EWWQ.js +2 -0
  278. package/dist/registry-3YMKU5GC.js +2 -0
  279. package/dist/remote-entry-6LQRYR5F.js +2 -0
  280. package/dist/remote-mode-35BQUMEL.js +4 -0
  281. package/dist/remote-words-QXVFVHOB.js +2 -0
  282. package/dist/{require-project-folder-3DTI2CVB.js → require-project-folder-O2XCXDRE.js} +1 -1
  283. package/dist/resolve-run-intent-QCRZPYXM.js +2 -0
  284. package/dist/{resolver-CDF7QKVD.js → resolver-LWXOB7PH.js} +1 -1
  285. package/dist/revert-F6MKJ73M.js +2 -0
  286. package/dist/review-cmd-PYU7YCAC.js +5 -0
  287. package/dist/run-EABFRFOF.js +2 -0
  288. package/dist/run-LX3ARF53.js +2 -0
  289. package/dist/run-remote-PS45MTHW.js +2 -0
  290. package/dist/run-startup-gate-YBQB2JLF.js +2 -0
  291. package/dist/run-test-md-XYOCVA6F.js +20 -0
  292. package/dist/session-worker.js +2 -2
  293. package/dist/{sessions-cmd-TLUITRG5.js → sessions-cmd-WUWZYZJW.js} +2 -2
  294. package/dist/{sessions-remote-INO7AWKB.js → sessions-remote-4J7ITZB4.js} +1 -1
  295. package/dist/{skill-installer-7JH5QCJF.js → skill-installer-54ZAFNOB.js} +1 -1
  296. package/dist/store-2F26FIUS.js +2 -0
  297. package/dist/store-choice-ZE7AZMRC.js +2 -0
  298. package/dist/store-guard-X5FIEZWZ.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-TAVE44DU.js +2 -0
  303. package/dist/sync-setup-M65RX34Y.js +2 -0
  304. package/dist/tcg-generate-OXZF7TNQ.js +2 -0
  305. package/dist/{test-definition-53XNBEDE.js → test-definition-GXEKFRRB.js} +1 -1
  306. package/dist/testmd-actions-4OHRME2Z.js +2 -0
  307. package/dist/{testmd-sync-LYHEXWCT.js → testmd-sync-HM24JCS7.js} +1 -1
  308. package/dist/token-refresh-3SEDPIXO.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-HWDR665U.js} +1 -1
  311. package/dist/verdicts-KB6YTIY6.js +2 -0
  312. package/dist/{version-check-SHNVYTMU.js → version-check-DRE5KT7F.js} +1 -1
  313. package/dist/{view-cmd-QOB3O6YW.js → view-cmd-3UKV3YEX.js} +1 -1
  314. package/dist/walk-session-W6OLG5NT.js +2 -0
  315. package/dist/with-telemetry-BF4BGK5S.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-J4FIESTB.js +0 -2
  346. package/dist/chunk-NZJSGINB.js +0 -47
  347. package/dist/chunk-SXRHKXSE.js +0 -2
  348. package/dist/chunk-UJLULWSR.js +0 -21
  349. package/dist/chunk-ULIIYKZB.js +0 -7
  350. package/dist/chunk-UXGMKRS4.js +0 -102
  351. package/dist/chunk-VO66KP2W.js +0 -2
  352. package/dist/chunk-X52YIWGG.js +0 -13
  353. package/dist/chunk-ZIHQ5JGB.js +0 -18
  354. package/dist/commands-JBFLLT7A.js +0 -2
  355. package/dist/cover-cmd-DU6ZYJFL.js +0 -2
  356. package/dist/design-chat-ZICGVYIH.js +0 -2
  357. package/dist/design-headless-HYWZIIDS.js +0 -2
  358. package/dist/design-remote-HPX4VZ63.js +0 -3
  359. package/dist/device-env-4P4GUVBW.js +0 -2
  360. package/dist/dispatch-BV6XMCN3.js +0 -2
  361. package/dist/doctor-Z2YQ2DBX.js +0 -2
  362. package/dist/evidence-BJIID6VT.js +0 -2
  363. package/dist/evolve-cmd-GZCUSCEK.js +0 -2
  364. package/dist/evolve-remote-LILOAHYH.js +0 -2
  365. package/dist/exit-manager-EGWAZHCR.js +0 -2
  366. package/dist/explain-cmd-LXIVHGN7.js +0 -12
  367. package/dist/explore-SA2P3SGX.js +0 -2
  368. package/dist/explore-context-tty-PERKIWXD.js +0 -2
  369. package/dist/explore-entry-E6EY3VV3.js +0 -6
  370. package/dist/extract-chat-Z64LEAJ5.js +0 -2
  371. package/dist/extract-headless-XLS56LMN.js +0 -2
  372. package/dist/folder-flags-ZIDJVDKX.js +0 -2
  373. package/dist/gaps-cmd-XYOBJVTO.js +0 -3
  374. package/dist/gate-AK44VDHC.js +0 -2
  375. package/dist/gate-NB5CJMTN.js +0 -2
  376. package/dist/hold-passthrough-JGHWMYDM.js +0 -2
  377. package/dist/identity-HL5CJJXR.js +0 -2
  378. package/dist/ingest-ZHHHBUXR.js +0 -2
  379. package/dist/ingest-cmd-OJSKTSQK.js +0 -8
  380. package/dist/ingest-remote-2WM6PYUW.js +0 -2
  381. package/dist/install-JBWBF3WX.js +0 -2
  382. package/dist/lane-CNGO7LH5.js +0 -2
  383. package/dist/lattice-auth-UQPFQSG7.js +0 -2
  384. package/dist/lifecycle-cmd-DGIO3VAO.js +0 -2
  385. package/dist/list-cmd-HQIN3HX4.js +0 -3
  386. package/dist/list-commands-OFRRBU3D.js +0 -2
  387. package/dist/login-flow-SYKXXDLH.js +0 -2
  388. package/dist/maintenance-cmd-X5247RSJ.js +0 -2
  389. package/dist/mobile-prompts-I66ENBDW.js +0 -2
  390. package/dist/onboarding-6HIP3KW6.js +0 -5
  391. package/dist/open-provider-XDJKT3W3.js +0 -2
  392. package/dist/persist-recorded-session-RSSMTVF3.js +0 -3
  393. package/dist/phase-seed-ZZSJME7M.js +0 -2
  394. package/dist/pipeline-NTJDH5TC.js +0 -2
  395. package/dist/prepare-target-AI3GGZF6.js +0 -2
  396. package/dist/pull-cmd-NRVB5ZN7.js +0 -2
  397. package/dist/pull-route-FWCZW76M.js +0 -2
  398. package/dist/readmodel-TRV4E3MW.js +0 -2
  399. package/dist/real-device-run-NQ7RNH7C.js +0 -2
  400. package/dist/reconcile-cmd-7B7THAFJ.js +0 -5
  401. package/dist/reconcile-deps-UDQBWSLE.js +0 -2
  402. package/dist/recording-banner-WVDTWTSE.js +0 -2
  403. package/dist/registry-PFOSXOIH.js +0 -2
  404. package/dist/remote-entry-BZU4NFNS.js +0 -2
  405. package/dist/remote-mode-NXUKDUXG.js +0 -4
  406. package/dist/remote-words-JRDDNOZ6.js +0 -2
  407. package/dist/resolve-run-intent-QCL7QXIB.js +0 -2
  408. package/dist/revert-QKHPCRT6.js +0 -2
  409. package/dist/review-cmd-XBK3TGRE.js +0 -5
  410. package/dist/run-CSYGVV3D.js +0 -2
  411. package/dist/run-YUHHD54J.js +0 -2
  412. package/dist/run-remote-SFR3F2T5.js +0 -2
  413. package/dist/run-startup-gate-QSFJRYUY.js +0 -2
  414. package/dist/run-test-md-ZSREINDQ.js +0 -20
  415. package/dist/store-X4UK4AP7.js +0 -2
  416. package/dist/store-choice-27HDIFTU.js +0 -2
  417. package/dist/store-guard-ZXKB5DQH.js +0 -2
  418. package/dist/sync-cmd-2PCO7LZA.js +0 -2
  419. package/dist/sync-setup-5WQO73Y5.js +0 -2
  420. package/dist/tcg-generate-DGJD5KSM.js +0 -2
  421. package/dist/testmd-actions-XE2JPQHB.js +0 -2
  422. package/dist/token-refresh-E4FTJVHY.js +0 -2
  423. package/dist/verdicts-PVB7TV5S.js +0 -2
  424. package/dist/walk-session-WIEROYOT.js +0 -2
  425. 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-FKA5SWWF.js";import"./chunk-J5QFO7LW.js";import"./chunk-H23ZMHHC.js";import"./chunk-AL6IAMYV.js";import"./chunk-JGQ3VB44.js";import"./chunk-LXYXCANZ.js";import"./chunk-3AGP2BVN.js";import"./chunk-FNBHP75S.js";import"./chunk-5Y2G4NC7.js";import"./chunk-SMXABALN.js";import"./chunk-V3IWCGZT.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-77BZTEHJ.js";import"./chunk-3A4KK22B.js";import"./chunk-RHQLDNZL.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-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.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-BRWCWZE3.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-2MBNAW2G.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-IPXITNFD.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-J3YID4A5.js";import"./chunk-Q4QCSO6Y.js";import"./chunk-5Y2G4NC7.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-V3IWCGZT.js";import{a as x}from"./chunk-HCBYKLMW.js";import{A as n}from"./chunk-BRWCWZE3.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-BDZWRJAL.js";import"./chunk-76MKY7FG.js";import"./chunk-MAQVRBUQ.js";import"./chunk-FP6JCXOS.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-IT6M7OMG.js";import"./chunk-RM5ZVDVR.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-YLI7DQMJ.js";import"./chunk-Z36KVIRR.js";import"./chunk-Q4JV4U65.js";import"./chunk-RFHMDQXZ.js";import"./chunk-63BFLTJI.js";import"./chunk-2AHQ3D3D.js";import"./chunk-WLEWXE6L.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-FHULYIG3.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-VKIUHHNT.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-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-RHQLDNZL.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-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.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-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-5LKDOE3P.js";import"./chunk-UJYC2XDD.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-CQBLJTDU.js";import"./chunk-V3IWCGZT.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-YTWBNACA.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-PE3CEG6E.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-LPJX5L3F.js";import"./chunk-UJYC2XDD.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-UWEBI76C.js";import"./chunk-S3DAAAE5.js";import"./chunk-CQBLJTDU.js";import"./chunk-V3IWCGZT.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-NGBXXBHP.js";import"./chunk-6VG2FG67.js";import"./chunk-CJGQFKLJ.js";import"./chunk-37KFCYHG.js";import"./chunk-72KYMWQ5.js";import"./chunk-CCOD4GQJ.js";import"./chunk-JQ64X2TO.js";import"./chunk-TDPWFYTJ.js";import"./chunk-SDIHDYWT.js";import"./chunk-LPJX5L3F.js";import"./chunk-5LKDOE3P.js";import"./chunk-UJYC2XDD.js";import"./chunk-SMXABALN.js";import"./chunk-PCL2FYPE.js";import"./chunk-VE3SUJMA.js";import"./chunk-5D7ENQTQ.js";import"./chunk-2AHQ3D3D.js";import"./chunk-WLEWXE6L.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-SB26HQO7.js";import"./chunk-HTJDMLZS.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-TZXXJWHA.js";import"./chunk-NIBNVPAE.js";import"./chunk-HCBYKLMW.js";import"./chunk-Z7S3IWUX.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-LWP7E5FU.js";import"./chunk-CQBLJTDU.js";import"./chunk-V3IWCGZT.js";import"./chunk-HCBYKLMW.js";import"./chunk-BRWCWZE3.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-C4UME2PA.js";import"./chunk-5K7PCSTP.js";import"./chunk-Y3RDLUH5.js";import"./chunk-Q4QCSO6Y.js";import"./chunk-5Y2G4NC7.js";import"./chunk-IINZZ4BZ.js";import"./chunk-TDPWFYTJ.js";import"./chunk-PCL2FYPE.js";import"./chunk-F2F257PU.js";import"./chunk-5D7ENQTQ.js";import"./chunk-QWEQ742S.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-VKIUHHNT.js";import"./chunk-CQBLJTDU.js";import"./chunk-V3IWCGZT.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-TD6GCEIK.js";import"./chunk-UV7FPIBL.js";import"./chunk-HYJVYYAZ.js";import"./chunk-GMTHZUZ3.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-ITG5WMQG.js";import"./chunk-MAQVRBUQ.js";import"./chunk-RFHMDQXZ.js";import"./chunk-V3IWCGZT.js";import"./chunk-HCBYKLMW.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-V3IWCGZT.js";import{a as s}from"./chunk-HCBYKLMW.js";import{A as o}from"./chunk-BRWCWZE3.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-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-BRWCWZE3.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-N4XUGIAK.js";import{d as $e}from"./chunk-KUSHV5SR.js";import"./chunk-OPR5XIPT.js";import{c as Ae,e as Ie,f as ve}from"./chunk-YF22VTR5.js";import{f as Ee,k as ye}from"./chunk-NZ7UCAN6.js";import"./chunk-6PZ3SVWE.js";import"./chunk-PKXWYYVK.js";import"./chunk-FOURJ24E.js";import"./chunk-AXOSLGQ4.js";import"./chunk-QLGQDNA3.js";import"./chunk-IT6M7OMG.js";import{g as le}from"./chunk-RM5ZVDVR.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-CVVUBCB7.js";import"./chunk-JZ7GFPKZ.js";import"./chunk-77BZTEHJ.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-PSBR2LVL.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-XRJH4UF3.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-RHQLDNZL.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-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.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-V24LUINK.js";import"./chunk-JYH7CTF7.js";import{a as x}from"./chunk-BRWCWZE3.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-HHF7AM3D.js";import"./chunk-UWQ4KXLB.js";import"./chunk-BRWCWZE3.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-3RJRCAUX.js";import"./chunk-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.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-BRWCWZE3.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-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import{a}from"./chunk-UV7FPIBL.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-BRWCWZE3.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-A5C7HIAH.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-FHULYIG3.js";import"./chunk-VZ7KXRXB.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.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-BRWCWZE3.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{e as k,f as l}from"./chunk-WLEWXE6L.js";import{b as p}from"./chunk-LPJKNX6D.js";import{a as f}from"./chunk-ZCBOHWN3.js";import{a as d}from"./chunk-RZ4F3BHX.js";import{promises as g}from"fs";import{basename as _,join as w}from"path";var D=3e3,S="/deviceSkin";function b(e){return e.replace(/\([^)]*\)/g," ").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||void 0}function v(e){if(e.model){let r=b(e.model);return r?`real-${r}`:void 0}let n=e.name?.trim();return n&&!k(n)?n:void 0}function y(e){let n=e?.data?.skin,r=typeof n?.skin_url=="string"?n.skin_url.trim():"",t=n?.skin_data??{},i=u=>typeof u=="number"&&Number.isFinite(u)?u:void 0,s=i(t.width),o=i(t.height);if(!r||!s||!o)return;let m={width:s,height:o};for(let u of["top","right","bottom","left","radius"]){let c=i(t[u]);c!==void 0&&(m[u]=c)}return{skin_url:r,skin_data:m}}var a=new Map;async function h(e,n,r={}){let t=`${f(e).lrmaaBaseUrl}${S}/${encodeURIComponent(n)}`;if(a.has(t))return a.get(t);try{let i=await(r.request??d)(t,{method:"GET",signal:AbortSignal.timeout(D)});if(!i.ok)return;let s=y(await i.json());return a.set(t,s),s}catch{return}}function A(e){let n=(e??"").trim().replace(/^lt:\/\//i,"").trim();if(n)return(p(n)?n:_(n))||void 0}async function P(e){try{let n=w(e,"steps"),r=(await g.readdir(n,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,i)=>(parseInt(t,10)||0)-(parseInt(i,10)||0));for(let t of r)try{let i=await g.readFile(w(n,t,"step.json"),"utf8"),o=JSON.parse(i).basis?.window;if(Array.isArray(o)&&o.length===2&&Number.isFinite(Number(o[0]))&&Number.isFinite(Number(o[1]))&&Number(o[0])>0&&Number(o[1])>0)return`${Math.round(Number(o[0]))}x${Math.round(Number(o[1]))}`}catch{}return}catch{return}}async function T(e,n,r){if(!e.native_platform||!n.environment)return e;let t=v({model:n.deviceModel,name:l(n.runnerEnvironment?.device)});if(!t)return e;let i=await h(n.environment,t,r);return i?{...e,skin_url:i.skin_url,skin_data:i.skin_data}:e}export{v as a,h as b,A as c,P as d,T as e};
2
+ import{e as k,f as l}from"./chunk-WLEWXE6L.js";import{b as p}from"./chunk-LMOW4NM5.js";import{a as f}from"./chunk-V24LUINK.js";import{a as d}from"./chunk-RZ4F3BHX.js";import{promises as g}from"fs";import{basename as _,join as w}from"path";var D=3e3,S="/deviceSkin";function b(e){return e.replace(/\([^)]*\)/g," ").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||void 0}function v(e){if(e.model){let r=b(e.model);return r?`real-${r}`:void 0}let n=e.name?.trim();return n&&!k(n)?n:void 0}function y(e){let n=e?.data?.skin,r=typeof n?.skin_url=="string"?n.skin_url.trim():"",t=n?.skin_data??{},i=u=>typeof u=="number"&&Number.isFinite(u)?u:void 0,s=i(t.width),o=i(t.height);if(!r||!s||!o)return;let m={width:s,height:o};for(let u of["top","right","bottom","left","radius"]){let c=i(t[u]);c!==void 0&&(m[u]=c)}return{skin_url:r,skin_data:m}}var a=new Map;async function h(e,n,r={}){let t=`${f(e).lrmaaBaseUrl}${S}/${encodeURIComponent(n)}`;if(a.has(t))return a.get(t);try{let i=await(r.request??d)(t,{method:"GET",signal:AbortSignal.timeout(D)});if(!i.ok)return;let s=y(await i.json());return a.set(t,s),s}catch{return}}function A(e){let n=(e??"").trim().replace(/^lt:\/\//i,"").trim();if(n)return(p(n)?n:_(n))||void 0}async function P(e){try{let n=w(e,"steps"),r=(await g.readdir(n,{withFileTypes:!0})).filter(t=>t.isDirectory()).map(t=>t.name).sort((t,i)=>(parseInt(t,10)||0)-(parseInt(i,10)||0));for(let t of r)try{let i=await g.readFile(w(n,t,"step.json"),"utf8"),o=JSON.parse(i).basis?.window;if(Array.isArray(o)&&o.length===2&&Number.isFinite(Number(o[0]))&&Number.isFinite(Number(o[1]))&&Number(o[0])>0&&Number(o[1])>0)return`${Math.round(Number(o[0]))}x${Math.round(Number(o[1]))}`}catch{}return}catch{return}}async function T(e,n,r){if(!e.native_platform||!n.environment)return e;let t=v({model:n.deviceModel,name:l(n.runnerEnvironment?.device)});if(!t)return e;let i=await h(n.environment,t,r);return i?{...e,skin_url:i.skin_url,skin_data:i.skin_data}:e}export{v as a,h as b,A as c,P as d,T as e};
@@ -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,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{h as I}from"./chunk-SXRHKXSE.js";import{f as c,h as w,i as y,l,q as f,t as A}from"./chunk-A7RJQJNT.js";import{b as m}from"./chunk-J4FIESTB.js";import{createHash as U}from"crypto";import{createReadStream as F}from"fs";import{mkdir as x,readFile as P,rename as $,writeFile as D}from"fs/promises";import{dirname as b,join as E}from"path";var k=60,S=5;function C(){return{entries:[]}}function v(){return E(m,"mobile","app-cache.json")}async function h(e){let r=U("sha256");for await(let t of F(e))r.update(t);return r.digest("hex")}function N(){return{readFile:e=>P(e,"utf8"),writeFile:async(e,r)=>{await x(b(e),{recursive:!0});let t=`${e}.tmp`;await D(t,r),await $(t,e)},hashFile:h,now:()=>new Date}}function g(e){if(!e)return;let r=/\/(\d{4})\/(\d{2})\/(\d{2})\//.exec(e);if(!r)return;let[,t,a,i]=r,o=new Date(`${t}-${a}-${i}T00:00:00Z`);return Number.isNaN(o.getTime())?void 0:o.toISOString()}function O(e,r){if(!e.storedAt)return!0;let t=new Date(e.storedAt).getTime();return Number.isNaN(t)?!0:(r.getTime()-t)/864e5>=k-S}var d=class{deps;constructor(r={}){this.deps={...N(),...r}}async read(){try{let r=JSON.parse(await this.deps.readFile(v()));if(!r||typeof r!="object")return C();let t=r;return{entries:Array.isArray(t.entries)?t.entries:[]}}catch{return C()}}async write(r){await this.deps.writeFile(v(),JSON.stringify(r,null,2))}async hashOf(r){return this.deps.hashFile(r)}async lookup(r){return(await this.read()).entries.find(a=>a.sha256===r.sha256&&a.env===r.env&&a.orgId===r.orgId&&a.type===r.type)}async remember(r){let t=await this.read();t.entries=[...t.entries.filter(a=>!(a.sha256===r.sha256&&a.env===r.env&&a.orgId===r.orgId&&a.type===r.type)),r],await this.write(t)}async forget(r){let t=await this.read(),a=t.entries.length;t.entries=t.entries.filter(i=>!(i.sha256===r.sha256&&i.env===r.env&&i.orgId===r.orgId&&i.type===r.type)),t.entries.length!==a&&await this.write(t)}isNearExpiry(r){return O(r,this.deps.now())}};import{createHash as j}from"crypto";import{readdir as T,stat as _}from"fs/promises";import{basename as p,extname as B,join as R,relative as Y}from"path";function ae(e){return e.skipped===!0}function H(e,r){return A(r,e)?null:B(e).toLowerCase()===".ipa"&&!c(r)?`${p(e)} is a device build \u2014 .ipa is not accepted for ${r} runs.`:c(r)?`${p(e)} is not an ${y(w(r))} build \u2014 ${l(r)} takes ${f(r).join(" or ")}.`:`${p(e)} cannot be uploaded for ${l(r)} \u2014 expected one of ${f(r).join(", ")}.`}async function J(e,r){if(!(await _(e)).isDirectory())return r.hashOf(e);let a=[],i=async n=>{for(let s of await T(n,{withFileTypes:!0})){let u=R(n,s.name);s.isDirectory()?await i(u):s.isFile()&&a.push(u)}};await i(e),a.sort();let o=j("sha256");for(let n of a)o.update(Y(e,n)),o.update("\0"),o.update(await h(n)),o.update("\0");return o.digest("hex")}async function se(e){let r=H(e.path,e.type);if(r)return{skipped:!0,reason:r};let t=e.cache??new d,a=e.client??new I(e.baseUrl,{...e.auth,orgId:e.orgId}),i;try{i=await J(e.path,t)}catch(s){return{skipped:!0,reason:`could not read ${p(e.path)}: ${s.message}`}}let o={sha256:i,env:e.env,orgId:e.orgId,type:e.type},n=await t.lookup(o);if(n){if(await a.liveness(n.appId)!=="gone")return{appId:n.appId,...n.appUrl?{appUrl:n.appUrl}:{},fromCache:!0};e.onProgress?.(`${n.appId} is no longer in the cloud \u2014 uploading again`),await t.forget(o)}try{e.onProgress?.(`uploading ${p(e.path)}\u2026`);let s=await a.upload(e.path,e.type);return await t.remember({sha256:i,env:e.env,orgId:e.orgId,type:e.type,appId:s.appId,...s.appUrl?{appUrl:s.appUrl}:{},...g(s.url)?{storedAt:g(s.url)}:{},sourcePath:e.path}),e.onProgress?.(s.cached?`${p(e.path)} already in the cloud (${s.appId})`:`${p(e.path)} uploaded (${s.appId})`),{appId:s.appId,...s.appUrl?{appUrl:s.appUrl}:{},fromCache:!1}}catch(s){return{skipped:!0,reason:s.message}}}export{d as a,ae as b,H as c,J as d,se as e};
2
+ import{h as I}from"./chunk-MTMHB5LF.js";import{b as m}from"./chunk-BRWCWZE3.js";import{f as c,h as w,i as y,l,q as f,t as A}from"./chunk-A7RJQJNT.js";import{createHash as U}from"crypto";import{createReadStream as F}from"fs";import{mkdir as x,readFile as P,rename as $,writeFile as D}from"fs/promises";import{dirname as b,join as E}from"path";var k=60,S=5;function C(){return{entries:[]}}function v(){return E(m,"mobile","app-cache.json")}async function h(e){let r=U("sha256");for await(let t of F(e))r.update(t);return r.digest("hex")}function N(){return{readFile:e=>P(e,"utf8"),writeFile:async(e,r)=>{await x(b(e),{recursive:!0});let t=`${e}.tmp`;await D(t,r),await $(t,e)},hashFile:h,now:()=>new Date}}function g(e){if(!e)return;let r=/\/(\d{4})\/(\d{2})\/(\d{2})\//.exec(e);if(!r)return;let[,t,a,i]=r,o=new Date(`${t}-${a}-${i}T00:00:00Z`);return Number.isNaN(o.getTime())?void 0:o.toISOString()}function O(e,r){if(!e.storedAt)return!0;let t=new Date(e.storedAt).getTime();return Number.isNaN(t)?!0:(r.getTime()-t)/864e5>=k-S}var d=class{deps;constructor(r={}){this.deps={...N(),...r}}async read(){try{let r=JSON.parse(await this.deps.readFile(v()));if(!r||typeof r!="object")return C();let t=r;return{entries:Array.isArray(t.entries)?t.entries:[]}}catch{return C()}}async write(r){await this.deps.writeFile(v(),JSON.stringify(r,null,2))}async hashOf(r){return this.deps.hashFile(r)}async lookup(r){return(await this.read()).entries.find(a=>a.sha256===r.sha256&&a.env===r.env&&a.orgId===r.orgId&&a.type===r.type)}async remember(r){let t=await this.read();t.entries=[...t.entries.filter(a=>!(a.sha256===r.sha256&&a.env===r.env&&a.orgId===r.orgId&&a.type===r.type)),r],await this.write(t)}async forget(r){let t=await this.read(),a=t.entries.length;t.entries=t.entries.filter(i=>!(i.sha256===r.sha256&&i.env===r.env&&i.orgId===r.orgId&&i.type===r.type)),t.entries.length!==a&&await this.write(t)}isNearExpiry(r){return O(r,this.deps.now())}};import{createHash as j}from"crypto";import{readdir as T,stat as _}from"fs/promises";import{basename as p,extname as B,join as R,relative as Y}from"path";function ae(e){return e.skipped===!0}function H(e,r){return A(r,e)?null:B(e).toLowerCase()===".ipa"&&!c(r)?`${p(e)} is a device build \u2014 .ipa is not accepted for ${r} runs.`:c(r)?`${p(e)} is not an ${y(w(r))} build \u2014 ${l(r)} takes ${f(r).join(" or ")}.`:`${p(e)} cannot be uploaded for ${l(r)} \u2014 expected one of ${f(r).join(", ")}.`}async function J(e,r){if(!(await _(e)).isDirectory())return r.hashOf(e);let a=[],i=async n=>{for(let s of await T(n,{withFileTypes:!0})){let u=R(n,s.name);s.isDirectory()?await i(u):s.isFile()&&a.push(u)}};await i(e),a.sort();let o=j("sha256");for(let n of a)o.update(Y(e,n)),o.update("\0"),o.update(await h(n)),o.update("\0");return o.digest("hex")}async function se(e){let r=H(e.path,e.type);if(r)return{skipped:!0,reason:r};let t=e.cache??new d,a=e.client??new I(e.baseUrl,{...e.auth,orgId:e.orgId}),i;try{i=await J(e.path,t)}catch(s){return{skipped:!0,reason:`could not read ${p(e.path)}: ${s.message}`}}let o={sha256:i,env:e.env,orgId:e.orgId,type:e.type},n=await t.lookup(o);if(n){if(await a.liveness(n.appId)!=="gone")return{appId:n.appId,...n.appUrl?{appUrl:n.appUrl}:{},fromCache:!0};e.onProgress?.(`${n.appId} is no longer in the cloud \u2014 uploading again`),await t.forget(o)}try{e.onProgress?.(`uploading ${p(e.path)}\u2026`);let s=await a.upload(e.path,e.type);return await t.remember({sha256:i,env:e.env,orgId:e.orgId,type:e.type,appId:s.appId,...s.appUrl?{appUrl:s.appUrl}:{},...g(s.url)?{storedAt:g(s.url)}:{},sourcePath:e.path}),e.onProgress?.(s.cached?`${p(e.path)} already in the cloud (${s.appId})`:`${p(e.path)} uploaded (${s.appId})`),{appId:s.appId,...s.appUrl?{appUrl:s.appUrl}:{},fromCache:!1}}catch(s){return{skipped:!0,reason:s.message}}}export{d as a,ae as b,H as c,J as d,se as e};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as b}from"./chunk-YCVEI7BT.js";import{a as L}from"./chunk-HCBYKLMW.js";import{a as d,b as c,i as A}from"./chunk-33DWJV67.js";import{a as D}from"./chunk-6YGTRKDT.js";import{m as u,z as o}from"./chunk-J4FIESTB.js";import{e as h}from"./chunk-UR6MHSHU.js";var x=h(D(),1);import{readdirSync as N,mkdirSync as B,statSync as k}from"fs";import{join as P}from"path";var r=h(L(),1);function O(n){try{return N(n).filter(l=>{try{return k(P(n,l)).isDirectory()}catch{return!1}})}catch{return[]}}function E(n,l,f,v){return{name:n,path:l,label:n,isActive:v}}function H({currentPath:n,onSelect:l,onCancel:f}){let s=O(u).map(i=>{let e=P(u,i);return E(i,e,n,e===n)}),p=!n,R=s.length+2,[a,C]=(0,x.useState)(()=>{if(p)return 0;let i=s.findIndex(e=>e.isActive);return i>=0?i+1:0}),[T,I]=(0,x.useState)(!1),[S,g]=(0,x.useState)("");return A((i,e)=>{if(T){if(e.escape){I(!1),g("");return}if(e.return){let t=S.trim();if(t){let m=P(u,t);B(m,{recursive:!0}),l(m),f()}return}if(e.backspace||e.delete){g(t=>t.slice(0,-1));return}i&&!e.ctrl&&!e.meta&&g(t=>t+i);return}if(e.escape){f();return}if(e.upArrow){C(t=>Math.max(0,t-1));return}if(e.downArrow){C(t=>Math.min(R-1,t+1));return}if(e.return){if(a===0){p||l(""),f();return}if(a===s.length+1){B(u,{recursive:!0}),I(!0),g("");return}let t=s[a-1];t&&!t.isActive&&l(t.path),f();return}}),T?(0,r.jsxs)(d,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile \u203A New"}),(0,r.jsxs)(d,{marginTop:1,children:[(0,r.jsx)(c,{color:o.secondary,children:"Name: "}),(0,r.jsx)(c,{children:S}),(0,r.jsx)(c,{color:o.dim,children:"\u2588"})]}),(0,r.jsx)(b,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:"back"})]}):(0,r.jsxs)(d,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile"}),(0,r.jsxs)(d,{flexDirection:"column",marginTop:1,children:[(0,r.jsxs)(c,{color:p?o.green:a===0?o.orange:o.dim,children:[a===0?"\u276F ":" ","Use temporary (no profile)",p?" \u25CF active":""]}),s.map((i,e)=>{let m=e+1===a,w=m?"\u276F ":" ",y=i.isActive?o.green:m?o.orange:void 0;return(0,r.jsxs)(c,{color:y,children:[w,i.label,i.isActive?" \u25CF active":""]},i.name)}),(0,r.jsxs)(c,{color:a===s.length+1?o.orange:o.dim,children:[a===s.length+1?"\u276F ":" ","+ Create new"]})]}),(0,r.jsx)(b,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"select"}],escBackLabel:"back"})]})}export{O as a,E as b,H as c};
2
+ import{a as b}from"./chunk-NIBNVPAE.js";import{a as L}from"./chunk-HCBYKLMW.js";import{A as o,n as u}from"./chunk-BRWCWZE3.js";import{a as d,b as c,i as A}from"./chunk-33DWJV67.js";import{a as D}from"./chunk-6YGTRKDT.js";import{e as h}from"./chunk-UR6MHSHU.js";var x=h(D(),1);import{readdirSync as N,mkdirSync as B,statSync as k}from"fs";import{join as P}from"path";var r=h(L(),1);function O(n){try{return N(n).filter(l=>{try{return k(P(n,l)).isDirectory()}catch{return!1}})}catch{return[]}}function E(n,l,f,v){return{name:n,path:l,label:n,isActive:v}}function H({currentPath:n,onSelect:l,onCancel:f}){let s=O(u).map(i=>{let e=P(u,i);return E(i,e,n,e===n)}),p=!n,R=s.length+2,[a,C]=(0,x.useState)(()=>{if(p)return 0;let i=s.findIndex(e=>e.isActive);return i>=0?i+1:0}),[T,I]=(0,x.useState)(!1),[S,g]=(0,x.useState)("");return A((i,e)=>{if(T){if(e.escape){I(!1),g("");return}if(e.return){let t=S.trim();if(t){let m=P(u,t);B(m,{recursive:!0}),l(m),f()}return}if(e.backspace||e.delete){g(t=>t.slice(0,-1));return}i&&!e.ctrl&&!e.meta&&g(t=>t+i);return}if(e.escape){f();return}if(e.upArrow){C(t=>Math.max(0,t-1));return}if(e.downArrow){C(t=>Math.min(R-1,t+1));return}if(e.return){if(a===0){p||l(""),f();return}if(a===s.length+1){B(u,{recursive:!0}),I(!0),g("");return}let t=s[a-1];t&&!t.isActive&&l(t.path),f();return}}),T?(0,r.jsxs)(d,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile \u203A New"}),(0,r.jsxs)(d,{marginTop:1,children:[(0,r.jsx)(c,{color:o.secondary,children:"Name: "}),(0,r.jsx)(c,{children:S}),(0,r.jsx)(c,{color:o.dim,children:"\u2588"})]}),(0,r.jsx)(b,{bindings:[{keys:"\u21B5",label:"create"}],escBackLabel:"back"})]}):(0,r.jsxs)(d,{flexDirection:"column",borderStyle:"round",borderColor:o.orange,paddingX:2,paddingY:1,children:[(0,r.jsx)(c,{color:o.orange,bold:!0,children:"Chrome Profile"}),(0,r.jsxs)(d,{flexDirection:"column",marginTop:1,children:[(0,r.jsxs)(c,{color:p?o.green:a===0?o.orange:o.dim,children:[a===0?"\u276F ":" ","Use temporary (no profile)",p?" \u25CF active":""]}),s.map((i,e)=>{let m=e+1===a,w=m?"\u276F ":" ",y=i.isActive?o.green:m?o.orange:void 0;return(0,r.jsxs)(c,{color:y,children:[w,i.label,i.isActive?" \u25CF active":""]},i.name)}),(0,r.jsxs)(c,{color:a===s.length+1?o.orange:o.dim,children:[a===s.length+1?"\u276F ":" ","+ Create new"]})]}),(0,r.jsx)(b,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"select"}],escBackLabel:"back"})]})}export{O as a,E as b,H as c};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as l}from"./chunk-WD52ZNQY.js";import{b as i,d as p,e as f,g,h as u}from"./chunk-77ZZQJLX.js";import{b as d}from"./chunk-LV7224DG.js";import{existsSync as t,mkdirSync as w,readFileSync as S,renameSync as y,writeFileSync as D}from"fs";import{join as j}from"path";function O(r){l(i(r));let a=i(r);if(!t(a))return;let s=j(a,"meta.json"),n=f(r);if(t(s)&&!t(n))try{w(p(r),{recursive:!0}),y(s,n)}catch(e){process.stderr.write(`warn: meta.json migration failed: ${e.message}
2
+ import{b as l}from"./chunk-WD52ZNQY.js";import{b as i,d as p,e as f,g,h as u}from"./chunk-77ZZQJLX.js";import{b as d}from"./chunk-PCL2FYPE.js";import{existsSync as t,mkdirSync as w,readFileSync as S,renameSync as y,writeFileSync as D}from"fs";import{join as j}from"path";function O(r){l(i(r));let a=i(r);if(!t(a))return;let s=j(a,"meta.json"),n=f(r);if(t(s)&&!t(n))try{w(p(r),{recursive:!0}),y(s,n)}catch(e){process.stderr.write(`warn: meta.json migration failed: ${e.message}
3
3
  `)}let c=u(r);if(t(c)){let e="python";try{let o=new d().load();o.code_export?.language&&(e=o.code_export.language)}catch{}let m=g(r,"playwright",e);if(!t(m))try{y(c,m)}catch(o){process.stderr.write(`warn: generated-code migration failed: ${o.message}
4
4
  `)}}if(t(n))try{let e=JSON.parse(S(n,"utf8"));"md5sum"in e&&(delete e.md5sum,D(n,JSON.stringify(e,null,2)+`
5
5
  `,"utf8"))}catch(e){process.stderr.write(`warn: meta.json md5sum strip failed: ${e.message}
@@ -0,0 +1,18 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{b as y,c as I}from"./chunk-72KYMWQ5.js";import{b}from"./chunk-CCOD4GQJ.js";import{a as x}from"./chunk-TDPWFYTJ.js";import{c as R}from"./chunk-VZ7KXRXB.js";import{b as f}from"./chunk-BRWCWZE3.js";import{f as S}from"./chunk-WMXBRC4B.js";import{a as v}from"./chunk-RZ4F3BHX.js";import{randomUUID as U}from"crypto";import{mkdirSync as P,writeFileSync as h,appendFileSync as B,existsSync as _,readFileSync as G}from"fs";import{join as u}from"path";import{writeFileSync as T,mkdirSync as w,existsSync as A}from"fs";import{join as m,relative as N}from"path";function C(r){let t=Object.keys(r.frontmatter).length>0?R(r.frontmatter).trimEnd():"",s=["---"];return t&&s.push(t),s.push("---",""),s.push(`# ${r.heading}`,""),r.steps.forEach((n,i)=>{s.push(`## Step ${i+1}`,n,"")}),s.join(`
3
+ `)}var k=new Set(["username","access_key","oauth","profile","project_id","folder_id"]),D=new Set(["model","env"]),c=class{constructor(e){this.opts=e}objectives=[];flushed=!1;lastWrittenPath=null;lastCollisionSuffixed=!1;appendObjective(e){this.objectives.push(e)}flush(){if(this.flushed||(this.flushed=!0,this.objectives.length===0))return;let e=this.opts.getName();if(!e)return;let t=m(this.opts.cwd,".testmuai","tests");try{w(t,{recursive:!0})}catch(l){process.stderr.write(`
4
+ \u26A0 Failed to create ${N(this.opts.cwd,t)}/
5
+ ${l.message}
6
+ Your test recording was NOT saved.
7
+
8
+ `);return}let s=m(t,`${e}_test.md`),n=2,i=!1;for(;A(s);)s=m(t,`${e}-${n}_test.md`),n++,i=!0;let a=I(j(this.opts.getResolvedGlobal())),o=C({frontmatter:a,heading:`Session: ${e}`,steps:this.objectives.map(y)});try{T(s,o,"utf8")}catch(l){process.stderr.write(`
9
+ \u26A0 Failed to save your test recording.
10
+ ${l.message}
11
+ Path: ${s}
12
+
13
+ `);return}this.lastWrittenPath=s,this.lastCollisionSuffixed=i}};function j(r){let e={};for(let[t,s]of Object.entries(r))k.has(t)||D.has(t)||(e[t]=s);return e}var O="kaneCliSessionCompleted",$={prod:"https://test-backend.lambdatest.com/api/analytics/event",stage:"https://stage-test-backend.lambdatestinternal.com/api/analytics/event"};function F(r,e=process.env){return e.KANE_ANALYTICS_API_URL||$[r]}var p=class{constructor(e,t=3e3){this.endpoint=e;this.timeoutMs=t}async sendSessionCompleted(e,t){let s=new AbortController,n=setTimeout(()=>s.abort(),this.timeoutMs);try{let i=await v(this.endpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({userId:e,event:O,data:t}),signal:s.signal});return{ok:i.ok,status:i.status}}catch{return{ok:!1,status:null}}finally{clearTimeout(n)}}};async function g(r,e,t){return new p(F(r)).sendSessionCompleted(e,t)}function M(r){let e=Math.max(0,(Date.parse(r.completedAt)-Date.parse(r.startedAt))/1e3);return{referenceId:r.referenceId,startedAt:r.startedAt,completedAt:r.completedAt,durationSeconds:Math.round(Math.max(0,r.durationSeconds??e)*1e3)/1e3,creditsConsumed:Number.isFinite(r.creditsConsumed)?Math.max(0,r.creditsConsumed):0,runType:r.runType,target:r.target}}function te(r){let e=r.find(t=>t.mobile);return e?e.platform==="ios"?"simulator":"emulator":"desktop"}async function E(r,e=g){if(process.env.KANE_CLI_MODE==="hyperexecute"||!Number.isInteger(r.userId)||r.userId<=0||!r.data.referenceId||r.runsCompleted<=0)return;let t=M(r.data),s=await e(r.env,r.userId,t).catch(()=>({ok:!1,status:null}));r.log?.(s.ok?"info":"warn",s.ok?"CRM_EVENT_SENT":"CRM_EVENT_FAILED",s.ok?"CRM event delivered":"CRM event delivery failed",{event:"kaneCliSessionCompleted",reference_id:r.data.referenceId,status_code:s.status})}var K=u(f,"sessions"),J=1e3,L=class{sessionId;sessionDir;runs=[];_flows=[];_nextIndex=0;_activeRunIndex=null;_screenshotQueue=null;_surface=null;_logTarget=null;_runType=null;_lineage={};_runStartedAtMs=null;_sessionEndLogged=!1;_dropExitTail=null;_screenshotSummaryLogged=!1;_started=!1;_testId=null;_saveBlocker=null;_testcaseId=null;_projectId=null;_orgId=null;_userName=null;_userEmail=null;_uploadStatus="pending";_uploadAttempts=0;_uploadError=null;_firstObjective=null;_firstUrl=null;_auteurVariables={};_screenshotSas=null;_model="";_environment="";_profile=null;_plan=null;_startedAt="";_remoteLogger=null;_earlyLogBuffer=[];_recorder=null;_resolvedGlobal={};_sessionName=null;_recordingEnabled=!0;_stepRunRecords=[];_completionUserId=null;_completionMetadata=null;_completionReporter;_reportCompletion;_completionReported=!1;constructor(e){this.sessionId=U();let t=e?.baseDir?u(e.baseDir,"sessions"):K;this.sessionDir=u(t,this.sessionId),this._completionReporter=e?.reporter??((s,n)=>g(this._environment==="stage"?"stage":"prod",s,n)),this._reportCompletion=e?.report!==!1}setCompletionIdentity(e){Number.isInteger(e)&&e>0&&(this._completionUserId=e)}setCompletionMetadata(e){this._completionMetadata??=e}async reportCompletedSession(e){if(this.recordCreditsConsumed(e.creditsConsumed),e.runsCompleted<=0||this._completionReported||!this._reportCompletion||this._completionUserId===null||this._completionMetadata===null||!this._startedAt)return;this._completionReported=!0;let t=e.completedAt??new Date().toISOString();await E({env:this._environment==="stage"?"stage":"prod",userId:this._completionUserId,runsCompleted:e.runsCompleted,data:{referenceId:this.sessionId,startedAt:this._startedAt,completedAt:t,durationSeconds:e.durationSeconds,creditsConsumed:e.creditsConsumed,...this._completionMetadata},log:(s,n,i,a)=>this.log(s,n,i,a)},(s,n,i)=>this._completionReporter(n,i))}recordCreditsConsumed(e){let t=u(this.sessionDir,"session.json");if(_(t))try{let s=JSON.parse(G(t,"utf8"));s.credits_consumed=Number.isFinite(e)?Math.max(0,e):0,h(t,JSON.stringify(s,null,2)+`
14
+ `)}catch{}}setResolvedGlobal(e){this._resolvedGlobal={...this._resolvedGlobal,...e}}setSessionName(e){this._sessionName=e}get sessionName(){return this._sessionName}setRecordingEnabled(e){this._recordingEnabled=e}get recorder(){return this._recorder}flushRecorder(){try{this._recorder?.flush()}catch(e){process.stderr.write(`[recorder] flush failed: ${e.message}
15
+ `)}}get started(){return this._started}start(e){if(!this._started){this._started=!0,this._dropExitTail=S(t=>this.endOnExit(t)),e.surface&&!this._surface&&(this._surface=e.surface),e.runType&&!this._runType&&(this._runType=e.runType),e.target&&!this._logTarget&&(this._logTarget=e.target),this._model=e.model,this._environment=e.environment,this._profile=e.profile,this._startedAt=new Date().toISOString();try{P(this.sessionDir,{recursive:!0}),this._recorder=new c({cwd:process.cwd(),getResolvedGlobal:()=>this._resolvedGlobal,getName:()=>this._sessionName});let t={session_id:this.sessionId,started_at:this._startedAt,model:e.model,environment:e.environment,profile:e.profile,plan:this._plan,objectives:[],runs:[],status:"in_progress"};h(u(this.sessionDir,"session.json"),JSON.stringify(t,null,2)+`
16
+ `)}catch{}this._log(`SESSION START session_id=${this.sessionId}`),this._log(`CONFIG model=${e.model} env=${e.environment} profile=${e.profile}`),this._earlyLogBuffer.push({level:"info",event:"SESSION_START",message:"Session started",context:{session_id:this.sessionId,surface:this._surface,run_type:this._runType,target:this._logTarget?.target??null,device_kind:this._logTarget?.device_kind??null,model:e.model,environment:e.environment,profile:e.profile,...this._lineage}})}}setLineage(e){e.surface&&(this._surface=e.surface);let{surface:t,...s}=e;this._lineage={...this._lineage,...s}}setRunTarget(e){if(this._logTarget&&this._logTarget.target===e.target&&this._logTarget.device_kind===e.device_kind||(this._logTarget=e,!this._started))return;let t=this._earlyLogBuffer.find(s=>s.event==="SESSION_START");if(t){t.context={...t.context,target:e.target,device_kind:e.device_kind};return}this._remoteLogger?.amendUnsent("SESSION_START",{target:e.target,device_kind:e.device_kind})||this.log("info","SESSION_TARGET","Session target",{target:e.target,device_kind:e.device_kind})}setPlan(e){this._plan=e;let t={level:"info",event:"SESSION_INFO",message:"Session info",context:{session_id:this.sessionId,plan:e??null}};this._remoteLogger?this._remoteLogger.log(t.level,t.event,t.message,t.context):this._earlyLogBuffer.push(t)}get plan(){return this._plan}get apMode(){return x()??"v2"}setRemoteLogger(e){this._remoteLogger=e;for(let t of this._earlyLogBuffer)e.log(t.level,t.event,t.message,t.context);this._earlyLogBuffer=[]}get hasRemoteLogger(){return this._remoteLogger!==null}setAuteurVariables(e){Object.assign(this._auteurVariables,e)}get auteurVariables(){return this._auteurVariables}setScreenshotSas(e){this._screenshotSas=e}get screenshotSas(){return this._screenshotSas}get screenshotBaseUrl(){return this._screenshotSas?`${this._screenshotSas.base_url}/${this._screenshotSas.container}`:""}get startedAt(){return this._startedAt||new Date().toISOString()}log(e,t,s,n){if(t===void 0){this._log(e);let o=e.indexOf(" "),l=o>0?e.slice(0,o):e,d=o>0?e.slice(o+1):"";this._remoteLogger?.log("info",l,d||e);return}let i=e,a=s;this._log(`${t} ${a}`,n),this._remoteLogger?this._remoteLogger.log(i,t,a,n):this._earlyLogBuffer.length<J&&this._earlyLogBuffer.push({level:i,event:t,message:a,context:n})}logStep(e,t,s){this._log(`${e} ${t}`,s),this._remoteLogger?.logStep(this.activeRunIndex,e,t,s)}get activeRunIndex(){return this._activeRunIndex??this._nextIndex}logCommand(e){this._log(`COMMAND ${e}`)}logRunStart(e,t,s){this._log(`RUN ${e} START objective="${t.slice(0,100)}" url=${s}`),this._activeRunIndex=e,this._runStartedAtMs=Date.now(),this._remoteLogger?.setRunIndex(e,`run-${e}`),this._remoteLogger?.log("info","RUN_START",`Run ${e} started`,{run_index:e,run_id:`run-${e}`,surface:this._surface,objective:t,url:s})}logRunEnd(e,t,s,n,i){let a=(s??0).toFixed(1),o=(n??"").slice(0,100),l=i==null||i===""||Number.isNaN(Number(i))?null:Number(i);this._log(`RUN ${e} END status=${t} duration=${a}s summary="${o}"`,l!=null?{result_code:l}:void 0),this._remoteLogger?.log("info","RUN_END",`Run ${e} ended`,{run_index:e,run_id:`run-${e}`,surface:this._surface,status:t,duration:s??0,duration_ms:this._runStartedAtMs!=null?Date.now()-this._runStartedAtMs:Math.round((s??0)*1e3),summary:n??"",result_code:l}),t!=="passed"?this._remoteLogger?.escalate(e):this._remoteLogger?.discardSteps(e),this._activeRunIndex===e&&(this._activeRunIndex=null),this._runStartedAtMs=null,this._remoteLogger?.setRunIndex(null)}enterRun(e){this._activeRunIndex=e,this._remoteLogger?.setRunIndex(e,`run-${e}`)}exitRun(){this._activeRunIndex=null,this._remoteLogger?.setRunIndex(null)}escalateRun(e=this.activeRunIndex){this._remoteLogger?.escalate(e)}setScreenshotQueue(e){this._screenshotQueue=e}escalateAll(){this._remoteLogger?.escalateAll()}discardAll(){this._remoteLogger?.discardAll()}logChromeLaunch(e,t){this._log(`CHROME LAUNCH port=${e} endpoint=${t}`),this._remoteLogger?.log("info","CHROME_LAUNCH","Chrome launched",{port:e,cdp_endpoint:t})}async finish(e="complete"){let t=typeof e=="string"?e:"complete",s=typeof e=="string"?void 0:e,n=s?.status??this.deriveSessionStatus(),i=new Date().toISOString();this._log(`SESSION END status=${n} total_runs=${this.runs.length}`),this._screenshotQueue&&!this._screenshotSummaryLogged&&(this._screenshotSummaryLogged=!0,this._remoteLogger?.log("info","SCREENSHOT_SUMMARY","Screenshot uploads",this._screenshotQueue.stats())),this._dropExitTail?.(),this._dropExitTail=null,this.logSessionEnd(n,s?.reason),await this._remoteLogger?.flushNow();let a={session_id:this.sessionId,started_at:this._startedAt,ended_at:i,model:this._model,environment:this._environment,profile:this._profile,plan:this._plan,status:t,outcome:n,total_runs:this.runs.length,test_id:this._testId,testcase_id:this._testcaseId,commit_id:this.sessionId,project_id:this._projectId,upload_status:this._uploadStatus,upload_attempts:this._uploadAttempts,last_upload_attempt:this._uploadAttempts>0?new Date().toISOString():null,upload_error:this._uploadError,runs:this.runs.map(o=>({index:o.index,objective:o.objective,status:o.status,summary:o.summary,run_dir:o.run_dir}))};if(_(this.sessionDir)&&h(u(this.sessionDir,"session.json"),JSON.stringify(a,null,2)+`
17
+ `),this.flushRecorder(),this._recorder=null,this._flows.length>0){let o=this._flows.reduce((l,d)=>l+(Number.isFinite(d.creditsConsumed)?d.creditsConsumed??0:0),0);await this.reportCompletedSession({runsCompleted:this._flows.length,completedAt:i,creditsConsumed:o})}}runCounts(){let e=this._flows.length>0?this._flows.map(t=>t.status):this.runs.map(t=>String(t.status));return{total:e.length,passed:e.filter(t=>t==="passed").length,failed:e.filter(t=>t==="failed").length,error:e.filter(t=>t==="error").length}}logSessionEnd(e,t){if(this._sessionEndLogged)return;this._sessionEndLogged=!0;let s=this.runCounts();this._remoteLogger?.log("info","SESSION_END","Session ended",{status:e,...t?{reason:t}:{},total_runs:this.runs.length,runs_total:s.total,runs_passed:s.passed,runs_failed:s.failed,runs_error:s.error,duration_ms:this._startedAt?Date.now()-Date.parse(this._startedAt):null,surface:this._surface,run_type:this._runType,...this._lineage})}endOnExit(e){if(this._dropExitTail=null,this._sessionEndLogged)return;let t=e.kind==="signal"?e.signal.toLowerCase():e.kind==="crash"?"crash":"exit";this._activeRunIndex!==null&&this.logRunEnd(this._activeRunIndex,e.kind==="crash"?"error":"cancelled",void 0,t,null);let s=e.kind==="signal"?"cancelled":e.kind==="crash"?"error":this.deriveSessionStatus();this.logSessionEnd(s,t);try{this._remoteLogger?.shutdownSync()}catch{}}deriveSessionStatus(){let e=this.runCounts();return e.total===0?"no_runs":e.error>0?"error":e.failed>0||e.passed<e.total?"failed":"passed"}nextRunIndex(){return this._nextIndex}addRunResult(e,t){this.runs.push(e),this._nextIndex+=t??1,this._recordingEnabled&&this._recorder?.appendObjective(e.objective)}getContext(){return{prior_runs:this.runs.map(e=>({index:e.index,objective:e.objective,summary:e.summary,status:e.status,memory:e.context.memory,variables:e.context.variables,pointer:e.context.pointer}))}}addFlow(e){let t={...e,index:this._flows.length+1};return this._flows.push(t),t}getFlows(){return[...this._flows]}getFlow(e){return this._flows.find(t=>t.index===e)}clearFlows(){this._flows=[]}recordStepRun(e){this._stepRunRecords.push(e)}getStepRunRecords(){return[...this._stepRunRecords]}getRunsAsStepRecords(){return this.runs.map((e,t)=>({testmdStepIndex:t+1,runIndex:e.index,totalRunDirs:e.run_dirs?.length??1}))}snapshot(){return{runsLen:this.runs.length,nextRunIndex:this._nextIndex,stepRunRecordsLen:this._stepRunRecords.length}}rollback(e){this.runs.length=e.runsLen,this._nextIndex=e.nextRunIndex,this._stepRunRecords.length=e.stepRunRecordsLen}setTestId(e){this._testId=e,this._saveBlocker=null}get testId(){return this._testId}setSaveBlocker(e){this._saveBlocker=e}get saveBlocker(){return this._saveBlocker}setTestcaseId(e){this._testcaseId=e}get testcaseId(){return this._testcaseId}setProjectId(e){this._projectId=e}setOrgId(e){this._orgId=e}get orgId(){return this._orgId}setUserIdentity(e,t){e&&(this._userName=e),t&&(this._userEmail=t)}get userName(){return this._userName}get userEmail(){return this._userEmail}setFirstRun(e,t){this._firstObjective||(this._firstObjective=e,this._firstUrl=t)}get firstObjective(){return this._firstObjective}get firstUrl(){return this._firstUrl}getRunDirs(){let e=[];for(let t of this.runs)t.run_dirs&&t.run_dirs.length>0?e.push(...t.run_dirs):t.run_dir&&e.push(t.run_dir);return e}getRunObjectives(){let e=[];for(let t of this.runs)t.flow_objectives&&t.flow_objectives.length>0?e.push(...t.flow_objectives):e.push(t.objective);return e}getRunMetadata(){let e=[];for(let t of this.runs)if(t.perFlowMetadata&&t.perFlowMetadata.length>0)e.push(...t.perFlowMetadata);else{let s={resultCode:t.resultCode,reasonCode:t.reasonCode,errorMessage:t.status==="failed"?t.summary??null:null,summary:t.summary,oneLiner:t.oneLiner},n=t.run_dirs?.length??1;for(let i=0;i<n;i++)e.push(s)}return e}setUploadStatus(e,t){this._uploadStatus=e,this._uploadAttempts+=1,this._uploadError=t??null}_log(e,t){if(!(!this._started||!_(this.sessionDir)))try{let s=new Date().toISOString().slice(0,19).replace("T"," "),n=u(this.sessionDir,"tui.log"),i=t&&Object.keys(t).length>0?` ${JSON.stringify(t)}`:"";B(n,b(`[${s}] ${e}${i}
18
+ `))}catch{}}};export{C as a,te as b,E as c,L as d};
@@ -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};
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as xe}from"./chunk-GBQ4K25P.js";import{a as W,b as H}from"./chunk-PGESS7BW.js";import{a as G}from"./chunk-FWGUISUG.js";import{a as se,b as ae,c as ce,d as ue,e as le,q as U}from"./chunk-Z24SD2EJ.js";import{b as V}from"./chunk-CQDCNP7V.js";import{M as F,j as D,k as N}from"./chunk-PI7OXS62.js";import{g as Ue,o as v}from"./chunk-HYJVYYAZ.js";var A="https://integrations.lambdatest.com",y=class extends Error{constructor(t,r){super(r);this.code=t;this.name="LisError"}};function Nt(e){let n=e.TESTMUAI_ENV==="stage"?"stage":"prod";return`${Ue().authEnvironments[n].shareApiBaseUrl}/lis/api/v1`}function Pt(e){let n=e.env??process.env,t=e.auth?.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH;if(t)return{authorization:`Basic ${t}`};let r=e.auth?.TESTMUAI_API_KEY||n.TESTMUAI_API_KEY;return r?{authorization:`Bearer ${r}`}:{}}function C(e){let n=e.split(`
2
+ import{a as xe}from"./chunk-GBQ4K25P.js";import{a as W,b as H}from"./chunk-PGESS7BW.js";import{a as G}from"./chunk-FWGUISUG.js";import{a as se,b as ae,c as ce,d as ue,e as le,q as U}from"./chunk-C3DMMAFP.js";import{b as V}from"./chunk-5ORBAYTU.js";import{M as F,j as D,k as N}from"./chunk-5EAJO372.js";import{g as Ue,o as v}from"./chunk-HYJVYYAZ.js";var A="https://integrations.lambdatest.com",y=class extends Error{constructor(t,r){super(r);this.code=t;this.name="LisError"}};function Nt(e){let n=e.TESTMUAI_ENV==="stage"?"stage":"prod";return`${Ue().authEnvironments[n].shareApiBaseUrl}/lis/api/v1`}function Pt(e){let n=e.env??process.env,t=e.auth?.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH;if(t)return{authorization:`Basic ${t}`};let r=e.auth?.TESTMUAI_API_KEY||n.TESTMUAI_API_KEY;return r?{authorization:`Bearer ${r}`}:{}}function C(e){let n=e.split(`
3
3
  `,1)[0].replace(/[\u0000-\u001f\u007f-\u009f]/g,"");return n.length>200?`${n.slice(0,200)}\u2026`:n}function Tt(e,n,t="the issue"){return e===401||e===403?new y("LIS_AUTH",v().text("LIS_AUTH",{})):e>=500?new y("LIS_UNAVAILABLE",`the integrations service returned an error (HTTP ${e}) \u2014 retry later`):new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch ${t}: ${C(n)||`HTTP ${e}`}`)}function P(e){try{return JSON.parse(e.bytes.toString("utf8"))}catch{throw new y("LIS_UNAVAILABLE","the integrations service returned a malformed response \u2014 retry later")}}function be(e){try{return JSON.parse(e.bytes.toString("utf8"))}catch{return{}}}function Be(e){return be(e).code}function R(e,n="the issue",t="Atlassian"){let r=be(e),i=t==="Atlassian"?"Confluence":t;switch(r.code){case"TOKEN_EXPIRED":return new y("LIS_SETUP",`your ${t} connection needs a resync \u2014 reconnect at ${A} and retry`);case"NOT_INSTALLED":return new y("LIS_SETUP",`no ${t} connection for this account \u2014 create one at ${A} and retry`);case"SCOPE_MISSING":return new y("LIS_SETUP",`the connection has no ${i} access \u2014 reconnect with ${i} at ${A} and retry`);case"FORBIDDEN":return new y("LIS_FORBIDDEN",`you don't have access to ${n}`);case"NOT_FOUND":return new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch ${n}: ${C(r.message??"")||"not found"}`);case"PAYLOAD_TOO_LARGE":return new y("ATTACHMENT_TOO_LARGE","the attachment exceeds the integrations service's size cap");case"INVALID_PAYLOAD":return new y("LIS_UNAVAILABLE",`the integrations service rejected the request (${C(r.message??"")||"invalid payload"}) \u2014 retry later`);case"NOT_SUPPORTED":return new y("LIS_UNAVAILABLE","the integrations service does not support this operation yet");case"UPSTREAM_ERROR":case"UPSTREAM_TIMEOUT":return new y("LIS_UNAVAILABLE",`${t} is not responding through the integrations service \u2014 retry later`);default:return Tt(e.status,r.message??"",n)}}var Dt=3e4,Ut=5;async function k(e,n,t){let r=t.env??process.env,i=t.fetchImpl??fetch;for(let o=0;;o++){let u=new AbortController,l=setTimeout(()=>u.abort(),Dt);try{let s=await i(`${Nt(r)}${e}`,{...n,headers:{"content-type":"application/json",...Pt(t),...n.headers??{}},signal:u.signal}),c=await Promise.race([s.arrayBuffer(),new Promise((f,p)=>{u.signal.addEventListener("abort",()=>p(new DOMException("aborted","AbortError")),{once:!0})})]),a={status:s.status,ok:s.ok,headers:s.headers,bytes:Buffer.from(c)};if(a.status===429){if(o>0)throw new y("LIS_RATE_LIMITED","the integrations service is busy \u2014 try again in a moment");let f=be(a).data?.retry_after_sec,p=Math.min(Math.max(typeof f=="number"&&Number.isFinite(f)?f:1,0),Ut);clearTimeout(l),await new Promise(h=>setTimeout(h,p*1e3));continue}return a}catch(s){throw s instanceof y?s:u.signal.aborted?new y("LIS_UNAVAILABLE","the integrations service did not respond within 30 seconds \u2014 retry later"):new y("LIS_UNAVAILABLE",`could not reach the integrations service (${C(s instanceof Error?s.message:String(s))}) \u2014 check your connection and retry`)}finally{clearTimeout(l)}}}function Y(e){let n=e.headers.get("content-type")??"application/octet-stream";if(n.includes("json"))try{let t=JSON.parse(e.bytes.toString("utf8")),r=t.content??t.data?.content;if(typeof r=="string")return{bytes:Buffer.from(r,"base64"),mediaType:t.mime_type??t.data?.mime_type??"application/octet-stream"}}catch{}return{bytes:e.bytes,mediaType:n}}async function q(e={}){let n=await k("/jira/info",{method:"GET"},e);if(!n.ok)throw R(n);let t=P(n),r=(t.data?.SELECTED_PROJECTS??[]).map(i=>i?.key).filter(i=>typeof i=="string"&&i.length>0);return{installed:t.data?.INSTALLED==="YES",selectAll:t.data?.SELECT_ALL===!0,selectedProjects:r,capabilities:{document:t.data?.capabilities?.document===!0,comments:t.data?.capabilities?.comments===!0}}}async function Q(e,n={}){let t=await k("/jira/issue?details=true",{method:"POST",body:JSON.stringify({plugin_code:"jira",issueKey:e})},n);if(!t.ok)throw R(t);let r=P(t);if(r.type==="error"||!r.data)throw new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch the issue: ${C(r.message??"")||"issue not found or not accessible"}`);return r.data}var je=100,xt=5e3,Bt=60;async function ee(e,n={}){let t=[],r=new Set,i=null,o=0;for(let u=0;;u++){if(u>=Bt)throw new y("LIS_UNAVAILABLE","the integrations service kept returning comment pages without finishing \u2014 retry later");let l=await k("/jira/issue/comments",{method:"POST",body:JSON.stringify({resource_id:e,max_results:je,cursor:i,start_at:o,order_by:"created",fetch_all:!1})},n);if(!l.ok)throw R(l,"the issue's comments");let s=P(l);if(s.type==="error"||!s.data)throw new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch the issue's comments: ${C(s.message??"")||"unavailable"}`);for(let g of s.data.comments??[]){let d=String(g.id);r.has(d)||(r.add(d),t.push(g))}let c=s.data.pagination;if(!c?.has_more)return t;if(t.length>=xt)throw new y("JIRA_ISSUE_UNAVAILABLE","the issue has more comments than can be ingested \u2014 cannot build a complete identity");let a=c.next_cursor??null,f=c.next_start_at!=null,p=f?c.next_start_at:o+je;if(!(a!=null&&a!==i||a==null&&f&&p!==o))throw new y("LIS_UNAVAILABLE","the integrations service returned a non-advancing comments page \u2014 retry later");i=a,o=p}}async function te(e,n={}){let t=await k("/jira/attachment",{method:"POST",body:JSON.stringify({attachment_id:e})},n);if(!t.ok){if(Be(t)===void 0){if(t.status===413)throw new y("ATTACHMENT_TOO_LARGE","the attachment exceeds the integrations service's size cap");if(t.status===404)throw new y("JIRA_NOT_CONNECTED",`Jira is not connected for this account \u2014 connect it at ${A} and retry`)}throw R(t,`attachment ${e}`)}return Y(t)}var de="kane.source.jira/2";function Me(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){let n=e.map(Me).filter(t=>t!==null);return n.length===0?null:n.join(", ")}if(e!==null&&typeof e=="object"){let n=e;for(let t of["name","value","displayName"])if(typeof n[t]=="string")return n[t];return null}return null}function Fe(e,n,t){let r=[],i={},o=e.additional_fields??{};for(let a of Object.keys(o).sort()){let f=Me(o[a]);if(f===null){r.push(`field "${a}" has no stable text form \u2014 dropped from the envelope`);continue}i[a]=f}let u=[...e.attachments??[]].map(a=>({id:String(a.id),filename:a.filename??"",media_type:a.mime_type??"application/octet-stream",size:a.size??0})).sort((a,f)=>{let p=Number(a.id),h=Number(f.id);return Number.isFinite(p)&&Number.isFinite(h)?p-h:a.id<f.id?-1:a.id>f.id?1:0}),l=t.map(a=>({id:String(a.id),author:a.author?.display_name??"",body:a.body??"",created:a.created??""})).sort((a,f)=>{if(a.created!==f.created)return a.created<f.created?-1:1;let p=Number(a.id),h=Number(f.id);return Number.isFinite(p)&&Number.isFinite(h)&&p!==h?p-h:a.id<f.id?-1:a.id>f.id?1:0}),s=e.key;if(!/^[A-Za-z][A-Za-z0-9_]*-\d+$/.test(s))throw new Error(`cannot build a stable identity for issue key "${s}" \u2014 expected a PROJECT-NUMBER key`);let c={schema:de,site:n,project:s.slice(0,s.lastIndexOf("-")),issue:{id:e.id,key:s},content:{summary:e.summary??"",description:e.description??"",fields:i},attachments:u,comments:l};return{bytes:Buffer.from(JSON.stringify(c),"utf8"),envelope:c,warnings:r}}var Je=64,jt=16,Mt=6e6,Ft=5e7,Jt=12e6,Kt={png:"image/png",jpeg:"image/jpeg",webp:"image/webp",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",emf:"image/emf",wmf:"image/wmf",unknown:"application/octet-stream"},Vt=new Set(["png","jpeg","webp"]);function _e(e){return async n=>{let t;try{t=JSON.parse(n.toString("utf8"))}catch{throw new Error("JIRA_ENVELOPE_SCHEMA: source bytes are not a kane jira envelope")}if(t.schema!==de)throw new Error(`JIRA_ENVELOPE_SCHEMA: unknown envelope schema "${t.schema}" \u2014 this CLI understands ${de}`);let r=[],i=new Map,o=[],u=0,l=new Map,s=[];for(let f=0;f<t.attachments.length;f++){let p=t.attachments[f],h=`i${f+1}`,g=`attachment:${p.filename}`,d=S=>`[img#${h}] ${p.filename} (${p.media_type}, ${p.size} bytes${S?"":" \u2014 not delivered"})`,m=(S,O,M)=>{r.push({ref:h,loc:g,media_type:S,...M?.blob?{blob:M.blob}:{},...M?.appearance?{appearance:M.appearance}:{},delivery:O,...M?.duplicate_of?{duplicate_of:M.duplicate_of}:{}})};if(!p.media_type.startsWith("image/")){m(p.media_type,"unsupported-vision-media-type"),s.push(d(!1));continue}let E;try{E=await e.fetchAttachment(p.id)}catch{m(p.media_type,"external-image-not-fetched"),s.push(d(!1));continue}let I=E.bytes,w=W(I),b=Kt[w.format],L=V(I);if(i.set(L,I),!Vt.has(w.format)){let S=w.format==="gif"||w.format==="bmp"||w.format==="tiff"?"unsupported-vision-media-type":"unsupported-image-kind";m(b,S,{blob:L}),s.push(d(!1));continue}if(w.width===void 0||w.height===void 0||w.width*w.height>Ft){m(b,"undecodable",{blob:L}),s.push(d(!1));continue}let _;if(w.format==="png"||w.format==="jpeg"){let S=H(I,w.format);if(S===null){m(b,"undecodable",{blob:L}),s.push(d(!1));continue}_=G(S.data,{width:S.width,height:S.height,channels:S.channels})}if(w.width<Je||w.height<Je){m(b,"below-dimension-floor",{blob:L,appearance:_}),s.push(d(!1));continue}let T=l.get(L);if(T!==void 0){m(b,"duplicate",{blob:L,appearance:_,duplicate_of:T}),s.push(d(!1));continue}if(I.byteLength>Mt){m(b,"image-too-large",{blob:L,appearance:_}),s.push(d(!1));continue}if(u+I.byteLength>Jt){m(b,"vision-byte-budget-reached",{blob:L,appearance:_}),s.push(d(!1));continue}if(o.length>=jt){m(b,"image-cap-reached",{blob:L,appearance:_}),s.push(d(!1));continue}l.set(L,h),u+=I.byteLength,o.push(h),m(b,"selected",{blob:L,appearance:_}),s.push(d(!0))}let c=[];c.push(`${t.issue.key} \xB7 ${t.site}/${t.project}`,`Summary: ${t.content.summary}`),t.content.description!==""&&c.push("",...t.content.description.split(`
4
4
  `));let a=Object.keys(t.content.fields);return a.length>0&&c.push("","--- fields ---",...a.map(f=>`${f}: ${t.content.fields[f]}`)),s.length>0&&c.push("","--- attachments ---",...s),t.comments.length>0&&(c.push("","--- comments ---"),t.comments.forEach((f,p)=>{p>0&&c.push(""),c.push(`[${p+1}] ${f.author} \xB7 ${f.created}`,...f.body.split(`
5
5
  `))})),{projection:c.join(`