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

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 (421) hide show
  1. package/dist/ChatSurface-FIYDTZSI.js +2 -0
  2. package/dist/{ChromeProfilePicker-M4WXOB5O.js → ChromeProfilePicker-Q6FIGVYU.js} +1 -1
  3. package/dist/{CliFeedbackPrompt-6MJA7DF6.js → CliFeedbackPrompt-2NV2G65E.js} +1 -1
  4. package/dist/{CliUploadProgress-6NLS7XHH.js → CliUploadProgress-JZ5FXODE.js} +1 -1
  5. package/dist/{ConfigView-O4WKZ5PU.js → ConfigView-TZ4YINOE.js} +1 -1
  6. package/dist/EvidenceViewOffer-LKPN5BHX.js +2 -0
  7. package/dist/FolderPicker-H5K74PCH.js +2 -0
  8. package/dist/InfoBox-DNSOAK5L.js +2 -0
  9. package/dist/{LinksBox-DXP66H3H.js → LinksBox-32TZOANP.js} +1 -1
  10. package/dist/{ProfilesView-TWOY5PVC.js → ProfilesView-UC4MPM54.js} +1 -1
  11. package/dist/ProjectPicker-ZJ5RW6XL.js +2 -0
  12. package/dist/SaveSessionPrompt-F327WC7A.js +2 -0
  13. package/dist/SingleShotApp-OMLRYOSI.js +2 -0
  14. package/dist/{SummaryBox-IA2KS6GT.js → SummaryBox-XGFO5X76.js} +1 -1
  15. package/dist/TestMdRunView-ZZ77QTAQ.js +2 -0
  16. package/dist/TestrunEvidenceTable-G7MPF55X.js +2 -0
  17. package/dist/{WhoamiView-SNL75TEF.js → WhoamiView-4XIJXMTU.js} +1 -1
  18. package/dist/{app-download-UI4ABEIX.js → app-download-XEDO3EMV.js} +1 -1
  19. package/dist/{assurance-job-FFSSS4XV.js → assurance-job-MD65GQLC.js} +1 -1
  20. package/dist/{auth-7Z54TMQQ.js → auth-WBIEHHDS.js} +1 -1
  21. package/dist/{binary-THPLXCOD.js → binary-NVYLR36K.js} +1 -1
  22. package/dist/bind-H3ALI2NG.js +2 -0
  23. package/dist/bootstrap-JEVSVPQ2.js +2 -0
  24. package/dist/bridge-2UHJOVLX.js +2 -0
  25. package/dist/{catalog-MYPS2BXY.js → catalog-5UYBWA4W.js} +1 -1
  26. package/dist/catalog-client-VVKV4JKW.js +2 -0
  27. package/dist/{changelog-SU674BVE.js → changelog-FPWJXERY.js} +1 -1
  28. package/dist/chat-committer-ZKEKJA2R.js +2 -0
  29. package/dist/chat-controller-FXRJXUG3.js +2 -0
  30. package/dist/child-JHYENXE7.js +2 -0
  31. package/dist/chunk-226AGYHB.js +87 -0
  32. package/dist/{chunk-MNBGG4H3.js → chunk-23DKB2MT.js} +1 -1
  33. package/dist/{chunk-EECDDDSB.js → chunk-2COXO5LQ.js} +1 -1
  34. package/dist/{chunk-LUR7JFPP.js → chunk-2GEAKFAV.js} +1 -1
  35. package/dist/{chunk-7SY34IIL.js → chunk-2QKBXRLI.js} +1 -1
  36. package/dist/{chunk-AVSMXDTX.js → chunk-2ULYGALF.js} +1 -1
  37. package/dist/{chunk-JNSWKGTB.js → chunk-32HED7X2.js} +1 -1
  38. package/dist/{chunk-GRURFGBP.js → chunk-32MFECUA.js} +1 -1
  39. package/dist/{chunk-MYVKUJGS.js → chunk-35BG2EMW.js} +1 -1
  40. package/dist/{chunk-3GXN6VF6.js → chunk-3KY7HHQU.js} +1 -1
  41. package/dist/{chunk-7NPTL66J.js → chunk-3V4J65GN.js} +1 -1
  42. package/dist/{chunk-457Y5TEC.js → chunk-3YIA3DSL.js} +1 -1
  43. package/dist/{chunk-36N3EHW5.js → chunk-44SIFDNY.js} +1 -1
  44. package/dist/{chunk-MEKPGQAM.js → chunk-45NM23EQ.js} +2 -2
  45. package/dist/{chunk-I2MC6VVX.js → chunk-4C7WVQOD.js} +1 -1
  46. package/dist/{chunk-TU42YZOJ.js → chunk-4HARMERK.js} +1 -1
  47. package/dist/{chunk-ICLUC44J.js → chunk-4HYPMGDF.js} +1 -1
  48. package/dist/{chunk-7KX2BHKG.js → chunk-4KCYNP2K.js} +1 -1
  49. package/dist/{chunk-IJ2AHSWW.js → chunk-4LGQHTXM.js} +1 -1
  50. package/dist/{chunk-ETZMFRD6.js → chunk-4NEPHIAO.js} +1 -1
  51. package/dist/{chunk-3E4ZO73O.js → chunk-54NJJVG5.js} +1 -1
  52. package/dist/{chunk-734ORT6O.js → chunk-5F44KH3R.js} +1 -1
  53. package/dist/{chunk-E6KSRQXL.js → chunk-5F5IVART.js} +1 -1
  54. package/dist/{chunk-EBPRPNSA.js → chunk-5KJU4MG4.js} +1 -1
  55. package/dist/{chunk-JZP3Y4ZM.js → chunk-5MFPQYW3.js} +1 -1
  56. package/dist/{chunk-QENCC2ZS.js → chunk-5WLXAQ4H.js} +1 -1
  57. package/dist/{chunk-RFEON5GN.js → chunk-5XVWT6UK.js} +1 -1
  58. package/dist/{chunk-W4QSZNMB.js → chunk-6CS23F3E.js} +1 -1
  59. package/dist/{chunk-DZOYYWOW.js → chunk-6JUS2ULI.js} +1 -1
  60. package/dist/chunk-6K5BEEAJ.js +2 -0
  61. package/dist/{chunk-4QFTHUJA.js → chunk-6LEHGRRG.js} +1 -1
  62. package/dist/{chunk-LSDJOVWW.js → chunk-6SD4XTYC.js} +1 -1
  63. package/dist/{chunk-TW5AA5A7.js → chunk-6SWHEBPR.js} +1 -1
  64. package/dist/{chunk-URH4FX3H.js → chunk-6YBH3WUW.js} +1 -1
  65. package/dist/{chunk-ZAFJQ3SM.js → chunk-73HMW2WA.js} +1 -1
  66. package/dist/{chunk-NXAJBSIF.js → chunk-75FF7J5R.js} +1 -1
  67. package/dist/{chunk-P3JXJ4BW.js → chunk-7DLDADQR.js} +1 -1
  68. package/dist/{chunk-7NCJMWFX.js → chunk-7LYLJ75Z.js} +1 -1
  69. package/dist/chunk-7O2FIZB7.js +9 -0
  70. package/dist/chunk-7PCLHURF.js +101 -0
  71. package/dist/{chunk-PUVMC4PX.js → chunk-7V34ZMMS.js} +1 -1
  72. package/dist/{chunk-AEWNWAXW.js → chunk-7XJNYLQW.js} +2 -2
  73. package/dist/{chunk-WEIPY3CI.js → chunk-7ZR5CQY3.js} +1 -1
  74. package/dist/{chunk-2DYHAP4E.js → chunk-A474TUCE.js} +1 -1
  75. package/dist/chunk-A4ZV2SHL.js +5 -0
  76. package/dist/chunk-A7IMHUFY.js +27 -0
  77. package/dist/{chunk-XLEGGC4Y.js → chunk-ABMM37L2.js} +1 -1
  78. package/dist/{chunk-NIVFEACM.js → chunk-AUSLHNXQ.js} +1 -1
  79. package/dist/{chunk-YPFQ4UGF.js → chunk-B226SFOV.js} +1 -1
  80. package/dist/{chunk-DJC7NTLA.js → chunk-B57ZRHEQ.js} +1 -1
  81. package/dist/{chunk-CGITGJ3I.js → chunk-BHQIH2FE.js} +1 -1
  82. package/dist/{chunk-FWUPJORV.js → chunk-BJT6PZXL.js} +1 -1
  83. package/dist/{chunk-VX657KIK.js → chunk-C6P6YUCR.js} +1 -1
  84. package/dist/chunk-CB344EDO.js +2 -0
  85. package/dist/chunk-CCOD4GQJ.js +2 -0
  86. package/dist/{chunk-ZFM77AQU.js → chunk-CQDCNP7V.js} +1 -1
  87. package/dist/{chunk-VUFIL5VR.js → chunk-D4QXYAYA.js} +2 -2
  88. package/dist/{chunk-Y7E5L42F.js → chunk-DLP5S3TO.js} +1 -1
  89. package/dist/{chunk-35ECWCCK.js → chunk-DXIQVBMI.js} +1 -1
  90. package/dist/chunk-DXLZCJH5.js +7 -0
  91. package/dist/{chunk-OJ33Q6DU.js → chunk-E4GIGM5V.js} +1 -1
  92. package/dist/{chunk-I4WXALQR.js → chunk-EAWU2TOG.js} +1 -1
  93. package/dist/{chunk-ACMBMZDQ.js → chunk-EEOAU43D.js} +1 -1
  94. package/dist/{chunk-MYZHOBS4.js → chunk-EHB55V23.js} +1 -1
  95. package/dist/{chunk-UYDHOHSZ.js → chunk-ENRFXGID.js} +1 -1
  96. package/dist/{chunk-RTVHJ23A.js → chunk-ET5EK2CM.js} +1 -1
  97. package/dist/{chunk-EF47KRUK.js → chunk-EZMRWXRT.js} +1 -1
  98. package/dist/chunk-FAMQ4DHU.js +2 -0
  99. package/dist/{chunk-C2RUDJ46.js → chunk-FI2DVNRT.js} +1 -1
  100. package/dist/{chunk-AUJSC7PU.js → chunk-FNUGDPTS.js} +1 -1
  101. package/dist/{chunk-VLDCHFXF.js → chunk-FOLUB336.js} +1 -1
  102. package/dist/{chunk-NZ6AV2TA.js → chunk-FYPIF3BE.js} +1 -1
  103. package/dist/{chunk-HHW6MRU3.js → chunk-G4K3TP2I.js} +1 -1
  104. package/dist/{chunk-P2ZQDQDB.js → chunk-GAKBHNC4.js} +1 -1
  105. package/dist/{chunk-DPGOAFKF.js → chunk-GBQ4K25P.js} +1 -1
  106. package/dist/{chunk-O3HHTKZ5.js → chunk-GEZVC4S3.js} +1 -1
  107. package/dist/chunk-GJ7MO2FW.js +9 -0
  108. package/dist/{chunk-EZN7CF45.js → chunk-GJXO6FF7.js} +1 -1
  109. package/dist/{chunk-QDFY5GGO.js → chunk-GLM5UGTF.js} +1 -1
  110. package/dist/{chunk-HK62JVQM.js → chunk-GQARXS6F.js} +1 -1
  111. package/dist/{chunk-I4RVVBG3.js → chunk-GT3JDX5H.js} +1 -1
  112. package/dist/{chunk-YLXWAY7D.js → chunk-GZQAETB2.js} +1 -1
  113. package/dist/{chunk-7HMSMAUG.js → chunk-H4TIVILC.js} +5 -5
  114. package/dist/{chunk-VXGN3IV7.js → chunk-HG2ILWCE.js} +1 -1
  115. package/dist/{chunk-M43WH5DQ.js → chunk-HHOVANJ7.js} +1 -1
  116. package/dist/{chunk-CM4CHYSN.js → chunk-HM6LZ2KM.js} +1 -1
  117. package/dist/{chunk-QDXKEOKI.js → chunk-HNF3PWF3.js} +6 -6
  118. package/dist/{chunk-R7KXAISS.js → chunk-HVOXMCKE.js} +1 -1
  119. package/dist/{chunk-D7U2M26S.js → chunk-HWPWCCEV.js} +1 -1
  120. package/dist/{chunk-XRNQSXOM.js → chunk-HX5OLRKU.js} +2 -2
  121. package/dist/{chunk-4I7YN6YY.js → chunk-HYJVYYAZ.js} +2 -2
  122. package/dist/{chunk-CUXY6KQ2.js → chunk-I52NWH4U.js} +1 -1
  123. package/dist/{chunk-IGEAET7M.js → chunk-IB5WG5YY.js} +1 -1
  124. package/dist/{chunk-LAOTVZHV.js → chunk-IH73ZCBB.js} +1 -1
  125. package/dist/{chunk-TU7TVFBK.js → chunk-IT5JVCZN.js} +1 -1
  126. package/dist/{chunk-54XA5MZH.js → chunk-IZ66FKPC.js} +1 -1
  127. package/dist/{chunk-44B6THYK.js → chunk-JNPFEBUR.js} +1 -1
  128. package/dist/{chunk-RX6776AI.js → chunk-JTNEF5ZP.js} +1 -1
  129. package/dist/{chunk-QBYENBMB.js → chunk-JUVY6PHY.js} +1 -1
  130. package/dist/{chunk-5AKJPYUW.js → chunk-K4K2BGQC.js} +3 -3
  131. package/dist/{chunk-HJMCXSUJ.js → chunk-K75WIRI5.js} +1 -1
  132. package/dist/{chunk-FSYOTRMC.js → chunk-KKLCXRW6.js} +1 -1
  133. package/dist/{chunk-7YT4TTKL.js → chunk-KN7GZWKK.js} +1 -1
  134. package/dist/{chunk-ZTHYAHDN.js → chunk-L3BUPFAQ.js} +4 -4
  135. package/dist/{chunk-7XBNMOH4.js → chunk-LLQWEGXD.js} +1 -1
  136. package/dist/chunk-LTPOMMAB.js +2 -0
  137. package/dist/{chunk-CCP4X75B.js → chunk-LWCP4GLY.js} +1 -1
  138. package/dist/chunk-LXCTV75T.js +12 -0
  139. package/dist/{chunk-RDP7GWSY.js → chunk-LZGAFKYH.js} +1 -1
  140. package/dist/{chunk-3QICDXY5.js → chunk-LZPYIFHZ.js} +1 -1
  141. package/dist/{chunk-3OQW2GTA.js → chunk-M3TFOFUQ.js} +1 -1
  142. package/dist/{chunk-V7USCQWO.js → chunk-M7Y5GGVJ.js} +1 -1
  143. package/dist/{chunk-SMTBOSEJ.js → chunk-MEMXFTLD.js} +1 -1
  144. package/dist/{chunk-D756UWY2.js → chunk-MINDIQET.js} +1 -1
  145. package/dist/{chunk-ZTRRFG52.js → chunk-MP6NCJFE.js} +1 -1
  146. package/dist/{chunk-GXKY5A46.js → chunk-MSYRAPDK.js} +1 -1
  147. package/dist/{chunk-HJLMH7ZM.js → chunk-MUX2A37P.js} +1 -1
  148. package/dist/{chunk-YHFZFV3A.js → chunk-NCP54AIQ.js} +9 -9
  149. package/dist/{chunk-ZU4W2QGM.js → chunk-NVD2MXHQ.js} +1 -1
  150. package/dist/{chunk-FWDUVFS6.js → chunk-O2Y46A3G.js} +17 -17
  151. package/dist/{chunk-XZGEN4NU.js → chunk-O3TXAMFW.js} +1 -1
  152. package/dist/{chunk-YGRULEZY.js → chunk-O5KTMDTH.js} +1 -1
  153. package/dist/{chunk-PAWQ4AKN.js → chunk-OK6NLITG.js} +1 -1
  154. package/dist/{chunk-7AET4JKQ.js → chunk-OKA6FPJM.js} +1 -1
  155. package/dist/{chunk-3YTCKCBG.js → chunk-OVNTCBNS.js} +1 -1
  156. package/dist/{chunk-YQ5C6UDG.js → chunk-P4VFC6HO.js} +1 -1
  157. package/dist/{chunk-LQQNPMOD.js → chunk-PC22QRIY.js} +1 -1
  158. package/dist/{chunk-XQMWHPZI.js → chunk-PEUIHME2.js} +1 -1
  159. package/dist/{chunk-UEE3RZN4.js → chunk-PI7OXS62.js} +1 -1
  160. package/dist/{chunk-D7TKE7LK.js → chunk-POA336CU.js} +1 -1
  161. package/dist/{chunk-WZXPF3BI.js → chunk-PR5EGLEI.js} +1 -1
  162. package/dist/{chunk-YIKF4ERQ.js → chunk-PRBWZXFA.js} +2 -2
  163. package/dist/{chunk-XZYA7DNH.js → chunk-PVN64537.js} +1 -1
  164. package/dist/{chunk-VSVWNRI2.js → chunk-PWNYTIVA.js} +1 -1
  165. package/dist/chunk-Q4JV4U65.js +161 -0
  166. package/dist/{chunk-LUZBGTYB.js → chunk-Q5AKIQIE.js} +1 -1
  167. package/dist/{chunk-6EB5VRAN.js → chunk-QB77LRF4.js} +1 -1
  168. package/dist/{chunk-GQRU3B54.js → chunk-QUNIY6NN.js} +1 -1
  169. package/dist/{chunk-KODJVOCN.js → chunk-QVMXL675.js} +1 -1
  170. package/dist/{chunk-LCSJ7GOG.js → chunk-R6TFRAMZ.js} +1 -1
  171. package/dist/{chunk-4YW767UV.js → chunk-RAVAJZV2.js} +7 -7
  172. package/dist/{chunk-DDZLCAEO.js → chunk-RDAIOJCR.js} +1 -1
  173. package/dist/{chunk-RPRXRKKR.js → chunk-RQKMSNEU.js} +1 -1
  174. package/dist/{chunk-ECPFI75W.js → chunk-RRKYHUOD.js} +1 -1
  175. package/dist/{chunk-3RJHXOZH.js → chunk-S7XCOBYD.js} +1 -1
  176. package/dist/{chunk-Q3C6NDGI.js → chunk-SALZ6WSF.js} +1 -1
  177. package/dist/{chunk-ZFMRQ57Y.js → chunk-SIHX5FW5.js} +1 -1
  178. package/dist/{chunk-FIP5L6LV.js → chunk-SSOUYKVG.js} +1 -1
  179. package/dist/{chunk-TNORODUF.js → chunk-SVIIUKJ2.js} +1 -1
  180. package/dist/{chunk-7RWP4Y3H.js → chunk-T77LTLAD.js} +1 -1
  181. package/dist/{chunk-NLZZLANH.js → chunk-TAY7J5VS.js} +1 -1
  182. package/dist/chunk-TD6GCEIK.js +2 -0
  183. package/dist/{chunk-LKQFG4RW.js → chunk-TM6VLC6V.js} +1 -1
  184. package/dist/{chunk-YAW6JW6D.js → chunk-TMH4TPMB.js} +1 -1
  185. package/dist/{chunk-OFSDB7B4.js → chunk-TU2KPOW2.js} +2 -2
  186. package/dist/{chunk-3BSYOCSW.js → chunk-U2VYTVKV.js} +1 -1
  187. package/dist/{chunk-LIGTP3A3.js → chunk-UCVP7ZY4.js} +1 -1
  188. package/dist/{chunk-RHGW7B5Q.js → chunk-UICJ2KLJ.js} +1 -1
  189. package/dist/chunk-UJLULWSR.js +21 -0
  190. package/dist/{chunk-OCDBTAYS.js → chunk-UMNCM4RJ.js} +2 -2
  191. package/dist/{chunk-WOSANGV6.js → chunk-UWPG5MWM.js} +1 -1
  192. package/dist/{chunk-W6HZF56M.js → chunk-V3OZJO7Y.js} +1 -1
  193. package/dist/{chunk-3F5FMH76.js → chunk-VE4HLIGA.js} +1 -1
  194. package/dist/{chunk-RF37IJNN.js → chunk-W2HRX3DR.js} +1 -1
  195. package/dist/{chunk-NXRF7FFS.js → chunk-W54BX6HC.js} +1 -1
  196. package/dist/{chunk-IZ65ZPWY.js → chunk-W5HFUBXD.js} +1 -1
  197. package/dist/{chunk-HAW5WEKT.js → chunk-WEJR2V7R.js} +1 -1
  198. package/dist/{chunk-F5NHG7VB.js → chunk-X3A4QPA3.js} +1 -1
  199. package/dist/{chunk-AVI5H4UM.js → chunk-X52YIWGG.js} +1 -1
  200. package/dist/{chunk-72RC7JSA.js → chunk-X6FCXBXU.js} +1 -1
  201. package/dist/{chunk-PZA3BSOE.js → chunk-X7S7IGCV.js} +1 -1
  202. package/dist/{chunk-6DZX5HLZ.js → chunk-XCUF5AVM.js} +1 -1
  203. package/dist/{chunk-F22K3RRX.js → chunk-XHFU5TGS.js} +1 -1
  204. package/dist/chunk-XNXJXGVB.js +4 -0
  205. package/dist/{chunk-C62QWG4B.js → chunk-XZ6J3Y2W.js} +1 -1
  206. package/dist/{chunk-JGRXMTME.js → chunk-YDB72F4K.js} +1 -1
  207. package/dist/{chunk-7DFBOVUB.js → chunk-YJAQZMJT.js} +1 -1
  208. package/dist/chunk-YO6SNXBJ.js +2 -0
  209. package/dist/{chunk-AZLNLHUA.js → chunk-Z24SD2EJ.js} +1 -1
  210. package/dist/{chunk-HQ2E2XCU.js → chunk-Z36KVIRR.js} +1 -1
  211. package/dist/{chunk-WAOUE7MP.js → chunk-Z6SI7YNV.js} +1 -1
  212. package/dist/{chunk-6NFOH4AC.js → chunk-ZAQGIC33.js} +1 -1
  213. package/dist/{chunk-6UVIY56J.js → chunk-ZCL7XIVS.js} +1 -1
  214. package/dist/{chunk-UUJIGOEO.js → chunk-ZDCXWEQG.js} +1 -1
  215. package/dist/{chunk-SGPAM5DZ.js → chunk-ZDQYGLCZ.js} +1 -1
  216. package/dist/{chunk-42PALMW2.js → chunk-ZHAMVLQZ.js} +1 -1
  217. package/dist/{chunk-W7FLXW6Q.js → chunk-ZMWTRXFH.js} +1 -1
  218. package/dist/{chunk-KXHJMAZU.js → chunk-ZO3ZAMUU.js} +2 -2
  219. package/dist/{chunk-L5DALV5N.js → chunk-ZZZGTDYE.js} +1 -1
  220. package/dist/commands-R5AYK6XM.js +2 -0
  221. package/dist/{committer-JGY66PFM.js → committer-UO3B3S5Y.js} +1 -1
  222. package/dist/{config-754B73XK.js → config-YMHI3H3Y.js} +1 -1
  223. package/dist/cover-cmd-DVQIGFDY.js +2 -0
  224. package/dist/{credentials-F7DYLVWY.js → credentials-BCR73VGS.js} +1 -1
  225. package/dist/{deps-bundle-PW3WEQJ7.js → deps-bundle-6WLX44OA.js} +1 -1
  226. package/dist/{deps-resolve-SQYVN76L.js → deps-resolve-DSAKPZ3T.js} +1 -1
  227. package/dist/{design-chat-F3OEZPNJ.js → design-chat-YUI2JPO6.js} +1 -1
  228. package/dist/design-committer-7YIPFKMO.js +2 -0
  229. package/dist/design-headless-KIP6R7UV.js +2 -0
  230. package/dist/{design-remote-2BEGCVCX.js → design-remote-XMSHDDUX.js} +2 -2
  231. package/dist/device-env-K7J5NN66.js +2 -0
  232. package/dist/dispatch-BV6XMCN3.js +2 -0
  233. package/dist/{doctor-XY26Z35T.js → doctor-PGTNOMSP.js} +1 -1
  234. package/dist/{docx-convert-6IZO5P5K.js → docx-convert-DO5AQYD3.js} +1 -1
  235. package/dist/{dossier-NROC2MCY.js → dossier-5XKNAK6Q.js} +1 -1
  236. package/dist/evidence-RO3RDZXO.js +2 -0
  237. package/dist/evidence-presentation-LSFOZGLH.js +2 -0
  238. package/dist/evolve-cmd-U2ALVGMT.js +2 -0
  239. package/dist/evolve-remote-K2MCCVMM.js +2 -0
  240. package/dist/{exit-manager-EDHCETUN.js → exit-manager-EGWAZHCR.js} +1 -1
  241. package/dist/{explain-cmd-VYAANFFZ.js → explain-cmd-KNDORU2D.js} +1 -1
  242. package/dist/{explain-cmd-OP5I5W3O.js → explain-cmd-UWK5YVXG.js} +1 -1
  243. package/dist/explore-S2BGQUIF.js +2 -0
  244. package/dist/{explore-context-tty-RZ7D2TBV.js → explore-context-tty-WJHUSP3A.js} +1 -1
  245. package/dist/{explore-entry-EKXJ67BD.js → explore-entry-3EX2T3NS.js} +4 -4
  246. package/dist/{explore-live-2YVRAQZO.js → explore-live-TRY5A2ME.js} +1 -1
  247. package/dist/{explore-run-tty-D47FGPX7.js → explore-run-tty-ZV5XFKZA.js} +2 -2
  248. package/dist/{extract-bind-W2NET364.js → extract-bind-TXUBMK3T.js} +3 -3
  249. package/dist/extract-chat-VPYDGQKO.js +2 -0
  250. package/dist/{extract-cmd-FTFLETOP.js → extract-cmd-YUOYMVF5.js} +2 -2
  251. package/dist/extract-headless-UWTAPOET.js +2 -0
  252. package/dist/{feeder-NY45UFJK.js → feeder-NGWIPZ26.js} +1 -1
  253. package/dist/folder-flags-WV7UV3JG.js +2 -0
  254. package/dist/gaps-cmd-PFV3FZCM.js +3 -0
  255. package/dist/gate-7ALXLCNB.js +2 -0
  256. package/dist/gate-NB5CJMTN.js +2 -0
  257. package/dist/{generate-headless-RURIEKVS.js → generate-headless-KMBBZTLS.js} +2 -2
  258. package/dist/hold-passthrough-JGHWMYDM.js +2 -0
  259. package/dist/impact-cmd-PW33L5RF.js +11 -0
  260. package/dist/index.js +4150 -180
  261. package/dist/ingest-ZHHHBUXR.js +2 -0
  262. package/dist/{ingest-cmd-4G2AK4Y2.js → ingest-cmd-MXYILQLV.js} +3 -3
  263. package/dist/ingest-remote-2EEJP6ML.js +2 -0
  264. package/dist/install-7J34AYB6.js +2 -0
  265. package/dist/{interactive-bind-SI2ZS55Q.js → interactive-bind-FDWJUTI6.js} +4 -4
  266. package/dist/{interactive-remote-J56EWJGA.js → interactive-remote-O2Q2FNOH.js} +2 -2
  267. package/dist/lane-CNGO7LH5.js +2 -0
  268. package/dist/lattice-auth-TXNDLHM6.js +2 -0
  269. package/dist/{lifecycle-cmd-HJ37LTXE.js → lifecycle-cmd-GFHDBRXX.js} +1 -1
  270. package/dist/{list-cmd-6XL2FYLQ.js → list-cmd-RR75PMPE.js} +1 -1
  271. package/dist/list-commands-3QGZWJ5P.js +2 -0
  272. package/dist/{list-remote-LXPQNXYN.js → list-remote-AA3VSWOI.js} +1 -1
  273. package/dist/{locks-cmd-JJ2QNTNY.js → locks-cmd-AZKCSGHI.js} +1 -1
  274. package/dist/{logical-ids-RXAQJZ3T.js → logical-ids-74PLU3VR.js} +1 -1
  275. package/dist/login-flow-ZQ6UFTS2.js +2 -0
  276. package/dist/{maintenance-cmd-BXXHP36K.js → maintenance-cmd-OHGVARQ2.js} +1 -1
  277. package/dist/{mobile-prompts-CECJ5UY2.js → mobile-prompts-FZRKLLTN.js} +1 -1
  278. package/dist/{objective-variable-gate-3Z7DNVVC.js → objective-variable-gate-V5HHFOUS.js} +1 -1
  279. package/dist/{onboarding-PDVYMTY5.js → onboarding-NXGMV3VG.js} +1 -1
  280. package/dist/open-provider-XDJKT3W3.js +2 -0
  281. package/dist/pdf-convert-YB6PJFMI.js +2 -0
  282. package/dist/persist-recorded-session-INFN4JZT.js +3 -0
  283. package/dist/phase-seed-ZZSJME7M.js +2 -0
  284. package/dist/pipeline-MVZRI6YZ.js +2 -0
  285. package/dist/policy-commands-3YJ6YCDN.js +8 -0
  286. package/dist/prepare-target-DII5WZCX.js +2 -0
  287. package/dist/{pull-cmd-UPFQYUND.js → pull-cmd-XZN53XFZ.js} +1 -1
  288. package/dist/pull-route-R33BVADE.js +2 -0
  289. package/dist/readmodel-TRV4E3MW.js +2 -0
  290. package/dist/real-device-run-DGENHGUV.js +2 -0
  291. package/dist/{reconcile-cmd-JBH365JL.js → reconcile-cmd-KFPRCCJB.js} +4 -4
  292. package/dist/reconcile-deps-UDQBWSLE.js +2 -0
  293. package/dist/{reconcile-remote-BCX6SWFC.js → reconcile-remote-6WISFGRG.js} +2 -2
  294. package/dist/{recording-banner-YKBAL6UB.js → recording-banner-XOX2CDCF.js} +1 -1
  295. package/dist/registry-NV3EMDMK.js +2 -0
  296. package/dist/remote-entry-BCTFT643.js +2 -0
  297. package/dist/remote-mode-4HN27MD4.js +4 -0
  298. package/dist/{remote-words-YVB66R3F.js → remote-words-LFDYKIZ7.js} +1 -1
  299. package/dist/{require-project-folder-MLMEQJYP.js → require-project-folder-ZK4JJCDB.js} +1 -1
  300. package/dist/{resolve-run-intent-PC7TQZUL.js → resolve-run-intent-LYLVNNDZ.js} +1 -1
  301. package/dist/{resolver-EID34LQE.js → resolver-RMHGGYRP.js} +1 -1
  302. package/dist/revert-QKHPCRT6.js +2 -0
  303. package/dist/{review-cmd-EUHFLFMY.js → review-cmd-UGF2FC5Y.js} +1 -1
  304. package/dist/run-CSYGVV3D.js +2 -0
  305. package/dist/run-YUHHD54J.js +2 -0
  306. package/dist/{run-channel-63SVP5OI.js → run-channel-IIIYXOIW.js} +1 -1
  307. package/dist/run-remote-BGKQDAOA.js +2 -0
  308. package/dist/{run-startup-gate-YO66G6LS.js → run-startup-gate-4XE73OON.js} +1 -1
  309. package/dist/run-test-md-G6U3RU2Q.js +19 -0
  310. package/dist/session-worker.js +2 -2
  311. package/dist/{sessions-CFV7FOIT.js → sessions-NH2EG7BP.js} +1 -1
  312. package/dist/{sessions-cmd-S7WZBUCN.js → sessions-cmd-CABAX7BO.js} +2 -2
  313. package/dist/{sessions-remote-IWHWIQ2T.js → sessions-remote-Y4FTZL7Y.js} +1 -1
  314. package/dist/{skill-installer-MAVQY6GW.js → skill-installer-FS2AV7GX.js} +1 -1
  315. package/dist/spawner-MQ4XEHIX.js +2 -0
  316. package/dist/{store-MSA7KASS.js → store-PLKJZTGC.js} +1 -1
  317. package/dist/store-choice-UAB6Z4AL.js +2 -0
  318. package/dist/store-guard-DUN2X3SR.js +2 -0
  319. package/dist/{store-site-KA2DNBGY.js → store-site-K5NHLI7D.js} +1 -1
  320. package/dist/stream-warnings-GM7YEOVG.js +2 -0
  321. package/dist/sync-cmd-AGTOGPYM.js +2 -0
  322. package/dist/{sync-setup-RBRDUV7Q.js → sync-setup-4KIY3PDO.js} +1 -1
  323. package/dist/tcg-generate-CUY4AZ2V.js +2 -0
  324. package/dist/{test-definition-VRI4YIYL.js → test-definition-53XNBEDE.js} +1 -1
  325. package/dist/testmd-actions-UD6PAWUX.js +2 -0
  326. package/dist/{testmd-sync-UPAA5UMD.js → testmd-sync-EEJ7GPLR.js} +1 -1
  327. package/dist/tms-client-XWCR7O7J.js +2 -0
  328. package/dist/token-refresh-K6PVBBFE.js +2 -0
  329. package/dist/{trust-gate-AT2XBWN4.js → trust-gate-674C2NZS.js} +1 -1
  330. package/dist/{turn-preflight-LHYLRL7G.js → turn-preflight-R4PU6NYY.js} +1 -1
  331. package/dist/{use-case-ref-NE4X4MZN.js → use-case-ref-44BPIP4N.js} +1 -1
  332. package/dist/{validate-basic-M5JHHNZA.js → validate-basic-3JZRZL45.js} +1 -1
  333. package/dist/{variable-receipt-BXSZO36E.js → variable-receipt-7PRKDTRJ.js} +1 -1
  334. package/dist/verdicts-PVB7TV5S.js +2 -0
  335. package/dist/{version-check-Q737BE65.js → version-check-IY3YSQIP.js} +1 -1
  336. package/dist/{view-cmd-XSNL5DGI.js → view-cmd-WUIGTRFX.js} +1 -1
  337. package/dist/{walk-session-SHGYLFRB.js → walk-session-EH7227WR.js} +1 -1
  338. package/dist/with-telemetry-7JMZUBUZ.js +2 -0
  339. package/package.json +17 -17
  340. package/dist/ChatSurface-6NZGMNHL.js +0 -2
  341. package/dist/EvidenceViewOffer-WIEWCZUP.js +0 -2
  342. package/dist/FolderPicker-AF7ZMV3M.js +0 -2
  343. package/dist/InfoBox-D7GGZJU4.js +0 -2
  344. package/dist/ProjectPicker-OBYHJJLU.js +0 -2
  345. package/dist/SaveSessionPrompt-7XSHS4NL.js +0 -2
  346. package/dist/SingleShotApp-XQUDR36R.js +0 -2
  347. package/dist/TestMdRunView-LS2QUFWR.js +0 -2
  348. package/dist/TestrunEvidenceTable-HNDVJDIF.js +0 -2
  349. package/dist/bind-4XWK3DG2.js +0 -2
  350. package/dist/bootstrap-6ACT4ALI.js +0 -2
  351. package/dist/bridge-T6QMYKED.js +0 -2
  352. package/dist/chat-committer-ZCSRJEUB.js +0 -2
  353. package/dist/chat-controller-XINCDH6Z.js +0 -2
  354. package/dist/child-G2GCW73X.js +0 -2
  355. package/dist/chunk-34R7BNZ2.js +0 -2
  356. package/dist/chunk-65VANXOF.js +0 -147
  357. package/dist/chunk-C6HI6Y3S.js +0 -2
  358. package/dist/chunk-D36V5OX6.js +0 -2
  359. package/dist/chunk-HCJ2N3XB.js +0 -12
  360. package/dist/chunk-IUQOG7Z5.js +0 -5
  361. package/dist/chunk-KF4DKXSS.js +0 -2
  362. package/dist/chunk-NC7D7GOM.js +0 -21
  363. package/dist/chunk-OGFU4YY4.js +0 -2
  364. package/dist/chunk-R4JUKTDO.js +0 -2
  365. package/dist/chunk-VZ4A6WMK.js +0 -97
  366. package/dist/chunk-W54OT2FU.js +0 -9
  367. package/dist/chunk-W72ACCFL.js +0 -27
  368. package/dist/chunk-WXJCJL5L.js +0 -7
  369. package/dist/cover-cmd-NBNZCR6C.js +0 -2
  370. package/dist/design-committer-TRYP3LOZ.js +0 -2
  371. package/dist/design-headless-OTHYOX3E.js +0 -2
  372. package/dist/device-env-CHFRRV6W.js +0 -2
  373. package/dist/dispatch-DVQ3H7EJ.js +0 -2
  374. package/dist/evidence-P6FFKC7B.js +0 -2
  375. package/dist/evidence-presentation-YYTIDCBS.js +0 -2
  376. package/dist/evolve-cmd-WWOB3QJR.js +0 -2
  377. package/dist/evolve-remote-WLVY3QID.js +0 -2
  378. package/dist/explore-K5YBGHK6.js +0 -2
  379. package/dist/extract-chat-M65NWGUK.js +0 -2
  380. package/dist/extract-headless-G6W6JQ27.js +0 -2
  381. package/dist/folder-flags-KKIH654K.js +0 -2
  382. package/dist/gaps-cmd-OIDDLRYL.js +0 -3
  383. package/dist/gate-7AKRPRMK.js +0 -2
  384. package/dist/gate-WISOUTHQ.js +0 -2
  385. package/dist/hold-passthrough-IOWPVB4W.js +0 -2
  386. package/dist/ingest-PDGS5ZTL.js +0 -2
  387. package/dist/ingest-remote-SSLUHQVG.js +0 -2
  388. package/dist/install-ZVBHPXGP.js +0 -2
  389. package/dist/lane-AQYRIW24.js +0 -2
  390. package/dist/lattice-auth-6FEVSR7E.js +0 -2
  391. package/dist/list-commands-5DCCKU3L.js +0 -2
  392. package/dist/login-flow-WEK3E476.js +0 -2
  393. package/dist/open-provider-OZAG6WZS.js +0 -2
  394. package/dist/pdf-convert-447ACUB3.js +0 -2
  395. package/dist/persist-recorded-session-A3ID7JFA.js +0 -3
  396. package/dist/phase-seed-LCJ4WSYV.js +0 -2
  397. package/dist/pipeline-GX3LKPI5.js +0 -2
  398. package/dist/prepare-target-FMT6QFHZ.js +0 -2
  399. package/dist/pull-route-FWBXJMR7.js +0 -2
  400. package/dist/readmodel-INMP6MNW.js +0 -2
  401. package/dist/real-device-run-X7JJWOIK.js +0 -2
  402. package/dist/reconcile-deps-TWJ3FTSU.js +0 -2
  403. package/dist/registry-VQC757MJ.js +0 -2
  404. package/dist/remote-entry-X6JMPC2K.js +0 -2
  405. package/dist/remote-mode-FDPA7EWG.js +0 -4
  406. package/dist/revert-FHOBLZWF.js +0 -2
  407. package/dist/run-5RQUCNYP.js +0 -2
  408. package/dist/run-PC5YO4AS.js +0 -2
  409. package/dist/run-remote-SJCRTL7O.js +0 -2
  410. package/dist/run-test-md-BLNBK4MH.js +0 -17
  411. package/dist/spawner-C7NLLM4F.js +0 -2
  412. package/dist/store-choice-3OJCV26J.js +0 -2
  413. package/dist/store-guard-OOSDLMEC.js +0 -2
  414. package/dist/stream-warnings-GEQKKJU7.js +0 -2
  415. package/dist/sync-cmd-RDFDMVKQ.js +0 -2
  416. package/dist/tcg-generate-KIECTZ2C.js +0 -2
  417. package/dist/testmd-actions-CMAG6HWI.js +0 -2
  418. package/dist/tms-client-NXAB6VJD.js +0 -2
  419. package/dist/token-refresh-KP3AYMYK.js +0 -2
  420. package/dist/verdicts-XK3GAUX3.js +0 -2
  421. package/dist/with-telemetry-PM2HVN2B.js +0 -2
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{a as T}from"./chunk-3G2LSTK5.js";import{a as d}from"./chunk-RZ4F3BHX.js";var h=class extends Error{constructor(t,e){super(t);this.status=e}name="EndTestError"},l=class extends Error{constructor(r){super(`Test Manager couldn't be reached: ${r}`),this.name="TmsUnreachable"}},b=class extends Error{constructor(t,e,s){super(t);this.status=e;this.body=s;this.name="TmsHttpError"}},P=class extends T{constructor(r,t,e){super(r,{username:t,accessKey:e})}async listProjects(r){let t=[],e=!1;for await(let s of this.listProjectsStream({log:r})){if(r&&!e&&s.projects.length>0){let n=s.projects[0];r("info","PROJECT_SAMPLE","Project list sample",{project_id:n.project_id,name:n.name}),e=!0}t.push(...s.projects)}return t}async*listProjectsStream(r){let t=r?.perPage??200,e=r?.maxPages??100,s=r?.signal,n=r?.log,a=r?.name?.trim(),o=0,c=null;for(let i=1;i<=e;i++){if(s?.aborted)return;let u=`${this.baseUrl}/v1/projects?page=${i}&per_page=${t}&sort=${r?.sort??"created_at"}&filter[product]=KTM`;a&&(u+=`&filter[name]=${encodeURIComponent(a)}`);let j=AbortSignal.timeout(15e3),S=s?AbortSignal.any([s,j]):j,g;try{g=await d(u,{method:"GET",headers:this.headers(),signal:S})}catch(p){if(s?.aborted)return;if(i===1)throw p;n?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped mid-page",{page:i,total_loaded:o,error:p instanceof Error?p.message:String(p)}),yield{page:i,projects:[],totalLoaded:o,done:!0,total:c};return}if(!g.ok){if(i===1)throw new Error(`listProjects ${g.status}: ${await g.text()}`);n?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped on non-OK response",{page:i,status:g.status,total_loaded:o}),yield{page:i,projects:[],totalLoaded:o,done:!0,total:c};return}let w=await g.json(),y=w.data??[];o+=y.length;let _=y.length<t;if(typeof w.pagination?.total=="number"&&(c=w.pagination.total),yield{page:i,projects:y,totalLoaded:o,done:_,total:c},_)return}n?.("warn","PROJECTS_STREAM_MAXPAGES","max pages reached",{max_pages:e,total_loaded:o}),yield{page:e,projects:[],totalLoaded:o,done:!0,total:c}}async getProject(r){let t;try{t=await d(`${this.baseUrl}/v1/projects/${encodeURIComponent(r)}`,{method:"GET",headers:this.headers(),signal:AbortSignal.timeout(15e3)})}catch(n){throw new l(n instanceof Error?n.message:String(n))}if(t.status===408||t.status===429)throw new l(`HTTP ${t.status}`);if(t.status>=400&&t.status<500)return null;if(!t.ok)throw new l(`HTTP ${t.status}`);let e;try{e=await t.json()}catch(n){throw new l(`an answer that isn't JSON: ${n instanceof Error?n.message:String(n)}`)}let s=typeof e.data?.name=="string"?e.data.name:typeof e.data?.project_name=="string"?e.data.project_name:null;if(s===null)throw new l("an answer with no project name");return{id:r,name:s}}async getDefaultFolder(r){let t=await d(`${this.baseUrl}/v1/projects/${r}/folder/default`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`Get default folder failed: ${t.status} ${await t.text()}`);return(await t.json()).id}async listFolders(r){let t=await d(`${this.baseUrl}/v1/folder/entity/${r}`,{method:"GET",headers:this.headers()});if(!t.ok)throw new Error(`List folders failed: ${t.status} ${await t.text()}`);return(await t.json()).data??[]}async validateProjectFolder(r,t){let e;try{e=await d(`${this.baseUrl}/v1/folder/entity/${r}`,{method:"GET",headers:this.headers()})}catch{return{project:"error",folder:"error"}}if(e.status>=400&&e.status<500)return{project:"missing",folder:"missing"};if(!e.ok)return{project:"error",folder:"error"};let s;try{s=await e.json()}catch{return{project:"error",folder:"error"}}return{project:"ok",folder:(s.data??[]).some(o=>o.id===t)?"ok":"missing"}}async createProject(r,t=""){let e=await d(`${this.baseUrl}/v1/projects`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({name:r,description:t,tags:[],source:"KTM"})});if(!e.ok){let n=await e.text(),a;try{a=JSON.parse(n)}catch{a=void 0}throw new b(`Create project failed: ${e.status} ${n}`,e.status,a)}let s=await e.json();return{id:s.id,name:r,...s.created===!1?{created:!1}:{}}}async createFolder(r,t,e=""){let s=await d(`${this.baseUrl}/v1/folder`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({folders:[{name:t,description:e,entity_id:r,entity_type:"project"}]})});if(!s.ok)throw new Error(`Create folder failed: ${s.status} ${await s.text()}`);return{id:(await s.json()).id,name:t}}async createAtmTest(r,t){let e=t?`Bearer ${t}`:this.authHeader,s=await d(`${this.baseUrl}/kane-cli/v1/test`,{method:"POST",headers:{Authorization:e,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!s.ok)throw new Error(`Create ATM test failed: ${s.status} ${await s.text()}`);let n=await s.json();if(!n.test_id)throw new Error("Create ATM test returned no test_id");return n.test_id}async createAttachedTest(r,t){let e;try{e=await d(`${this.baseUrl}/kane-cli/v1/test`,{method:"POST",headers:{Authorization:t?`Bearer ${t}`:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)})}catch{return{ok:!1,reason:"failed",status:null}}let s=await e.json().catch(()=>null);if(e.status>=500)return{ok:!1,reason:"failed",status:e.status};if(!e.ok){let o=s?.error;return{ok:!1,reason:"refused",code:typeof s?.code=="string"?s.code:typeof o?.code=="string"?o.code:`HTTP_${e.status}`,status:e.status}}let n=typeof s?.test_id=="string"?s.test_id:"";if(n==="")return{ok:!1,reason:"failed",status:e.status};let a=s?.test_case_id;return typeof a!="string"&&typeof a!="number"||String(a)!==r.test_case_id?{ok:!1,reason:"outdated"}:{ok:!0,testId:n}}async createMobileAtmTest(r,t){let e=t?`Bearer ${t}`:this.authHeader,s=await d(`${this.baseUrl}/kane-cli/v1/mobile/test`,{method:"POST",headers:{Authorization:e,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!s.ok)throw new Error(`Create mobile ATM test failed: ${s.status} ${await s.text()}`);let n=await s.json();if(!n.test_id)throw new Error("Create mobile ATM test returned no test_id");return n.test_id}async createBrowserSession(r,t={}){let e=await d(`${this.baseUrl}/kane-cli/v1/browser-sessions`,{...t.signal?{signal:t.signal}:{},method:"POST",headers:{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({metadata:r})});if(!e.ok)throw await f.from(e);let s=await e.json().catch(()=>null);if(typeof s?.id!="string"||!s.id)throw new Error("Create browser session returned no id");return s.id}async endBrowserSession(r,t={}){let e=await d(`${this.baseUrl}/kane-cli/v1/browser-sessions/${encodeURIComponent(r)}`,{...t.signal?{signal:t.signal}:{},method:"DELETE",headers:{Authorization:this.authHeader,Accept:"application/json"}});if(!e.ok)throw await f.from(e)}async endTest(r,t,e){let s=e?`Bearer ${e}`:this.authHeader,n=new URLSearchParams({commit_id:t.commit_id,time_taken:String(t.time_taken),steps_count:String(t.steps_count),commit_message:t.commit_message}),a={};t.objectives&&t.objectives.length>0&&(a.objectives=t.objectives),t.assurance&&(a.assurance={test:t.assurance.test,definition_id:t.assurance.definitionId});let o;try{o=await d(`${this.baseUrl}/kane-cli/v1/test/${r}?${n.toString()}`,{method:"DELETE",headers:{Authorization:s,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)})}catch(i){throw new h(`End test failed: ${i instanceof Error?i.message:String(i)}`,null)}if(!o.ok){let i=await o.text().catch(u=>u instanceof Error?u.message:String(u));throw new h(`End test failed: ${o.status} ${i}`,o.status)}let c;try{c=await o.json()}catch(i){throw new h(`End test failed: ${i instanceof Error?i.message:String(i)}`,null)}return{testcase_id:c.data?.testcase_id??"",test_id:c.data?.test_id??r,project_id:c.data?.project_id??"",...typeof c.data?.commit_id=="string"?{commit_id:c.data.commit_id}:{}}}async submitFeedback(r,t){let e=t?`Bearer ${t}`:this.authHeader,s={instruction_id:r.instruction_id,test_id:r.test_id,feedback_type:r.feedback_type,mode:r.mode??"human"};r.details&&(s.details=r.details);let n=await d(`${this.baseUrl}/atm/v1/generative-feedback`,{method:"POST",headers:{Authorization:e,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)});if(!n.ok)throw new Error(`Submit feedback failed: ${n.status} ${await n.text()}`);return await n.json()}async ingestEvidence(r,t){let e=await d(`${this.baseUrl}/kane-cli/v1/evidence/ingest`,{method:"POST",headers:{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({evidence_id:r,project_id:t})});if(!e.ok)throw new Error(`Evidence ingest failed: ${e.status} ${await e.text()}`)}},f=class m extends Error{constructor(t,e,s,n){super(`Browser session failed: ${t} ${e}`);this.status=t;this.text=e;this.code=s;this.detail=n;this.name="BrowserSessionRefusal"}static async from(t){let e=await t.text().catch(()=>""),s=null;try{s=JSON.parse(e)}catch{}let n=s?.error&&typeof s.error=="object"?s.error:null,a=o=>typeof o=="string"&&o.trim()?o:null;return new m(t.status,e,a(s?.errorCode)??a(s?.code)??a(n?.code),a(s?.message)??a(n?.message))}};export{h as a,l as b,b as c,P as d,f as e};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{homedir as s}from"os";import{join as t}from"path";var b="0.10.0-rc.3";var a=t(s(),".testmuai","kaneai"),g=t(a,"profiles"),h=t(a,"tui-config.json"),u=t(a,"media"),U="https://registry.npmjs.org/@testmuai/kane-cli",_="https://api.github.com/repos/LambdaTest/kane-cli/releases",i="@testmuai/kane-cli-skill",A=`https://registry.npmjs.org/${i}`,r="kane-cli",x=[{dir:t(s(),".claude","skills",r),agent:"Claude Code"},{dir:t(s(),".agents","skills",r),agent:"Codex CLI"},{dir:t(s(),".gemini","skills",r),agent:"Gemini CLI"}],L="https://dd-proxy.lambdatest.com/intake/kane-cli",R="https://kaneai-playground.lambdatest.io",I=9222,E=9230,C=t(a,"chrome-profiles"),o=t(a,"hints"),v=t(o,"state.json");function B(e){return t(o,`catalog-${e}.json`)}var l=t(a,"mobile");function f(e,n="android"){return t(l,n==="ios"?`device-catalog-ios-${e}.json`:`device-catalog-${e}.json`)}var m="127.0.0.1",S=18392,T=18400,c="/callback";function N(e){return`http://${m}:${e}${c}`}var O="KANE CLI",P="*",k={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",testGeneratorBaseUrl:"https://test-manager-api.lambdatest.com",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server",evidenceViewerUrl:"https://evidence.lambdatest.com",mediaArtefactsHost:"prod-mobile-artefacts.lambdatest.com",mobileAppBaseUrl:"https://api.lambdatest.com",mobileHubUrl:"https://mobile-hub.lambdatest.com/wd/hub",lrmaaBaseUrl:"https://mobile-api.lambdatest.com/mobile-automation/api/v1",latticeBaseUrl:"https://kaneai-api.lambdatest.com/v16-lattice",deviceStreamUrl:"https://stream-microfrontend.lambdatest.com"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",testGeneratorBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server",evidenceViewerUrl:"https://stage-evidence.lambdatestinternal.com",mediaArtefactsHost:"stage-mobile-artefacts.lambdatestinternal.com",mobileAppBaseUrl:"https://stage-api.lambdatestinternal.com",mobileHubUrl:"https://stage-mobile-hub.lambdatestinternal.com/wd/hub",lrmaaBaseUrl:"https://stage-mobile-api.lambdatestinternal.com/mobile-automation/api/v1",latticeBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-lattice",deviceStreamUrl:"https://stage-stream-microfrontend.lambdatestinternal.com"}},D={orange:"#ff9500",generateAccent:"#0d9488",assuranceAccent:"#b388ff",purple:"#b388ff",secondary:"#888888",dim:"#666666",muted:"#444444",green:"#4ade80",red:"#ef4444",amber:"#fbbf24"};export{b as a,a as b,h as c,u as d,U as e,_ as f,i as g,x as h,L as i,R as j,I as k,E as l,C as m,v as n,B as o,f as p,m as q,S as r,T as s,c as t,N as u,O as v,P as w,k as x,D as y};
@@ -1,12 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{e as c,h as p}from"./chunk-XMPTFXPW.js";import{b as l}from"./chunk-ZU4W2QGM.js";import{b as f}from"./chunk-REKHAN53.js";import{Ha as i,s as g}from"./chunk-7HMSMAUG.js";import{a as d}from"./chunk-FOJHSG5M.js";var h=new Set(["context extract","design tests","context sessions","context ingest","context list","maintain reconcile","maintain evolve","cover","context pull"]),I=new Set(["context ingest","context extract"]),y=new Set(["testmd run","testrun run"]),w=new Set(["context","design","maintain","cover"]);function $(e,n){return n.kind==="local"||n.kind==="pick"||!w.has(e.split(" ")[0])?null:n.kind==="refuse"?n.refusal:w.has(e)||h.has(e)||y.has(e)?null:i.notYet(e)}var R={tests:"design",sessions:"save","sessions discard":"discard",ingest:"extract",list:"list",reconcile:"reconcile"};function a(e,n,t){return t?p(c("ndjson",R[n]??n),e.message,e.code,e.remedy):(k(e),2)}function G(e,n,t){if(e.code!=="LIST_FAILED"&&e.code!=="COVERAGE_FAILED")return a(e,n,t);if(t){let r=c("ndjson",R[n]??n);return r.event({type:"error",code:e.code,message:e.message,...e.remedy?{remedy:e.remedy}:{}}),r.done(1)}return k(e),1}function E(e,n){if(!e.answer?.length)return null;let t=f({answer:e.answer});return t.ok?e.resume?e.mode!=="agent"?i.answerAgentOnly(n,e.resume):null:i.answerNeedsResume():i.answerParse(t.error)}function v(e,n){if(!e.answer?.length||l(process.cwd()).kind!=="remote")return null;let t=E(e,n);return t===null?null:a(t,n.split(" ")[1],e.mode==="agent")}var B=e=>`${d.green(`\u2713 Project: "${e}"`)}
3
- ${d.dim(" this folder is now linked to it; what you save goes to the project")}
4
- `;function k(e){if(process.stderr.write(`${u(`error: ${e.message}`)}
5
- `),e.detail&&process.stderr.write(`${d.dim(` ${e.detail}`)}
6
- `),e.remedy){let[n,...t]=e.remedy.split(`
7
- `);process.stderr.write(`${u(`next: ${n}`,!0,e.ownLine)}
8
- `);for(let r of t)process.stderr.write(`${r}
9
- `)}e.support&&process.stderr.write(`${u(`if this keeps failing, share this id with support: ${g(`refused_${e.code}`)}`)}
10
- `)}function u(e,n=!1,t=!1){let r=process.stderr.columns;if(!r||e.length<=r&&!t)return e;let s=e.lastIndexOf(": ");return n&&s>=0&&/^(kane-cli|npm|brew) /.test(e.slice(s+2))?`${x(e.slice(0,s+1),r)}
11
- ${e.slice(s+2)}`:x(e,r)}function x(e,n){let t=[],r=e;for(;r.length>n;){let s=r.lastIndexOf(" ",n);if(s<=0)break;t.push(r.slice(0,s)),r=r.slice(s+1)}return[...t,r].join(`
12
- `)}var A=e=>e.mode==="agent"||e.agent===!0;function L(e){e.hook("preAction",(n,t)=>{let r=[];for(let o=t;o!==null&&o.parent!==null;o=o.parent)r.unshift(o.name());let s=l(process.cwd()),m=$(r.join(" "),s);if(r.join(" ")==="cover"&&s.kind==="remote"&&t.args.length>0&&t.error(`error: unknown command '${t.args[0]}'`,{exitCode:2}),m===null)return;let S=t.name()==="sessions"&&t.args[0]==="discard"?"sessions discard":t.name();process.exit(a(m,S,A(t.opts())))})}export{h as a,I as b,y as c,w as d,$ as e,a as f,G as g,E as h,v as i,B as j,k,x as l,A as m,L as n};
@@ -1,5 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as et,c as nt}from"./chunk-W3USRQX6.js";import{a as Z}from"./chunk-JQ64X2TO.js";import{a as Lt}from"./chunk-JIRNI5TB.js";import{a as k}from"./chunk-UTM7D4PI.js";import{Y as tt}from"./chunk-W54OT2FU.js";import{b as Q}from"./chunk-HQ2E2XCU.js";import{a as W,d as X}from"./chunk-C6HI6Y3S.js";import{a as Y}from"./chunk-FCD3NYOM.js";import{a as J}from"./chunk-4QTH7VYE.js";import{a as R}from"./chunk-RZ4F3BHX.js";import{e as Nt}from"./chunk-UR6MHSHU.js";import{readFileSync as T,existsSync as G,readdirSync as be,mkdirSync as K,writeFileSync as w}from"fs";import{readFile as Ot,unlink as ye}from"fs/promises";import{join as y}from"path";import{existsSync as ae,mkdirSync as ce,readdirSync as At,writeFileSync as ue}from"fs";import{join as S}from"path";import{randomUUID as v}from"crypto";var it=["children","instructions","branches","module_content","true_branch","false_branch"];function D(e){let t=new Map,n=r=>{if(!r||typeof r!="object")return;let o=r;if(Array.isArray(o.operations))for(let i of o.operations){let s=i.operation_id;if(typeof s!="string"||!s)continue;let a=t.get(s)??[];a.includes(o)||a.push(o),t.set(s,a)}for(let i of it){let s=o[i];Array.isArray(s)?s.forEach(n):s&&typeof s=="object"&&n(s)}};return e.forEach(n),t}function Tt(e,t){if(!t||t.length===0)return;if(t.length===1)return t[0];let n=e.action_params?.script;if(typeof n=="string"&&n.trim()){let r=n.trim(),o=t.find(i=>jt(i)?.trim()===r);if(o)return o}return t[0]}function jt(e){let t=e,n=t.script_content??t.js_snippet;return typeof n=="string"?n:void 0}function U(e,t){let n=new Map;for(let r of e){let o=Tt(r,r.action_id?t.get(r.action_id):void 0);if(!o)continue;let i=n.get(o)??[];i.push(r),n.set(o,i)}return n.size===0?null:[...n].map(([r,o])=>Bt(r,o))}function ot(e,t){let n=D(t.authoredInstructions),r=[];for(let o of e){if(o.flatIndex===void 0||!t.replayOnlyFlatIndices.has(o.flatIndex))continue;let i=U(o.records,n);i&&r.push(...i)}return r}function st(e,t){let n=new Map(t.map(a=>[a.instruction_id,a])),r=[],o=a=>{if(!a||typeof a!="object")return;let c=a.instruction_id,u=typeof c=="string"?n.get(c):void 0;return u&&r.push(c),u},i=a=>{if(!a||typeof a!="object")return;let c=a;for(let u of it){let l=c[u];if(Array.isArray(l))s(l);else if(l&&typeof l=="object"){let _=o(l);_&&(c[u]=_),i(_??l)}}},s=a=>{for(let c=0;c<a.length;c++){let u=o(a[c]);u&&(a[c]=u),i(u??a[c])}};return s(e),r}function Ct(e){if(!e.timestamp||e.duration_ms==null)return"";let t=new Date(e.timestamp);return isNaN(t.getTime())?"":new Date(t.getTime()+e.duration_ms).toISOString()}function j(e){if(e!=null)try{return JSON.parse(e)}catch{return e}}function Dt(e){return typeof e=="string"?"string":typeof e=="boolean"?"bool":typeof e=="number"?Number.isInteger(e)?"int":"float":Array.isArray(e)?"list":e==null?"NoneType":"JSON"}function C(e,t,n){let r=e.user_variables,o=typeof r=="string",i;try{i=o?JSON.parse(r):r??[]}catch{return}if(!Array.isArray(i)||i.length===0)return;let s=i.find(a=>t&&a.name===t)??(i.length===1?i[0]:void 0);s&&(s.value=n,s.value_type=Dt(n),e.user_variables=o?JSON.stringify(i):i)}function rt(e){e.user_variables!==void 0&&(e.user_variables=typeof e.user_variables=="string"?"[]":[])}function Ut(e,t){let n=e.operations??[],r=new Set(t.map(i=>i.action_id).filter(Boolean)),o=n.filter(i=>r.has(i.operation_id));return o.length>0?o:n.length===1?n:[]}function Ft(e){let t=e.error??"Script execution failed";return{error:t,error_code:"SCRIPT_EXECUTION_ERROR",error_message:t,reason:t}}function Bt(e,t){let n=structuredClone(e),r=t[0],o=t[t.length-1];n.status=t.find(s=>s.status!=="success")?.status??r.status,n.start_timestamp=r.timestamp??n.start_timestamp,n.end_timestamp=Ct(o)||n.end_timestamp;let i=Ut(n,t);for(let s of i)s.status=n.status,s.operation_start=n.start_timestamp,s.operation_end=n.end_timestamp;switch(n.content_type){case"api":{let s=o.action_params?.api_data?.response;if(s&&typeof s=="object")for(let a of[n,...i])a.api_data={...a.api_data??{},response:s},C(a,o.output_variable,s);break}case"script":{let s=o.output_variable??n.output_variable_name;if(n.status!=="success"){let a=Ft(o);n.code_error=a,rt(n);for(let c of i)c.execution_result=a,c.code_error=a,rt(c)}else if(o.output_value!=null){let a=j(o.output_value);C(n,s,a);for(let c of i)c.execution_result={value:a},C(c,s,a)}break}case"db_query":{o.output_value!=null&&(n.db_details={...n.db_details??{},carried_out_query:j(o.output_value)});break}case"screenshot_command":{let s=j(o.output_value);s&&typeof s=="object"&&(n.smartui_results=s);break}case"network_assertion":case"network_query":break;default:break}return n}var Mt="/home/kaneai/Downloads";function O(e){return`${Mt}/${e}`}function ut(e){return"FILE__"+e.replace(/[^A-Za-z0-9]/g,"_")}function M(e){return"file."+e}function N(e){let t=e?.media;return!t||!t.name||!t.media_url?null:{media_id:t.media_id??"",name:t.name,media_url:t.media_url,type:t.type??"doc",...t.alias?{alias:t.alias}:{}}}function lt(e){return e?e.includes(`
3
- `)?e.split(`
4
- `).map(t=>t.trim()).filter(Boolean):e.split(". ").map(t=>t.trim()).filter(Boolean).map(t=>t.endsWith(".")?t:t+"."):[]}function F(e){return typeof e=="string"&&e.includes("{{secrets.")}var zt={click:"CLICK",double_click:"CLICK",type:"TYPE",fill:"TYPE",clear:"CLEAR",select:"SELECT",hover:"HOVER",drag:"DRAG_DROP",upload_files:"UPLOAD_FILE",navigate:"OPEN",go_back:"NAVIGATE",go_forward:"NAVIGATE",refresh:"REFRESH",press_key:"SENDKEYS",scroll:"SCROLL_PIXELS",scroll_into_view:"SCROLL_UNTIL_ELEMENT",wait:"WAIT",wait_until:"WAIT_UNTIL",wait_for_load:"WAIT_FOR_LOAD",switch_tab:"SWITCH_TAB",new_tab:"NEW_TAB",close_tab:"CLOSE_TAB",api:"API",evaluate_js:"EVALUATE_JS",vision_query:"VISION_QUERY",textual_query:"TEXTUAL_QUERY",get_url:"GET_URL",get_title:"GET_TITLE",assert:"ASSERTION",math:"MATHEMATICAL_OPERATION",set_cookies:"SET_COOKIES",delete_cookies:"DELETE_COOKIES",clear_cookies:"CLEAR_COOKIES",set_local_storage:"SET_LOCAL_STORAGE",delete_local_storage:"DELETE_LOCAL_STORAGE",clear_local_storage:"CLEAR_LOCAL_STORAGE",set_clipboard:"SET_CLIPBOARD",paste_clipboard:"PASTE_CLIPBOARD",clear_clipboard:"CLEAR_CLIPBOARD",device_control:"DEVICE_CONTROL",device_control_query:"DEVICE_CONTROL_QUERY"},dt={literal:"SET_VARIABLE",condition:"SET_VARIABLE",visual:"VISION_QUERY",dom:"TEXTUAL_QUERY",url:"GET_URL",title:"GET_TITLE",devtool_network:"DEVTOOLS_NETWORK_QUERY",devtool_console:"DEVTOOLS_CONSOLE_QUERY",devtool_cookies:"DEVTOOLS_COOKIES_QUERY",devtool_storage:"DEVTOOLS_STORAGE_QUERY",devtool_performance:"DEVTOOLS_PERFORMANCE",api_response:"API_CALLS_QUERY",textual_visual:"TEXTUAL_ANALYZER"},Vt=new Set(["CLICK","TYPE","FILL","HOVER","SCROLL_UNTIL_ELEMENT","UPLOAD_FILE","VISION_QUERY","DRAG_DROP","SELECT"]);function _t(e,t){if(e==="analyze"){let r=t?.action_params?.analyzer_type??"";return dt[r]}if(e==="scroll"&&t?.action_params?.into_view===!0)return"SCROLL_UNTIL_ELEMENT";let n=zt[e];return n||console.warn(`[migrator] UNKNOWN action_type "${e}" \u2014 falling back to "${e.toUpperCase()}"; explicit mapping required`),n??e.toUpperCase()}function pt(e,t){if(!e||!t)return"";try{let n=new Date(e);return isNaN(n.getTime())?"":new Date(n.getTime()+t).toISOString()}catch{return""}}function ft(e){try{return JSON.parse(e.output_value??"{}")}catch{return{}}}function $t(e){let t=e.output_variable??"";if(!t)return"[]";let r={...ft(e)};return delete r.body,JSON.stringify([{name:t,unique_key:(e.action_id??"").replace(/-/g,"").slice(0,8)||v().replace(/-/g,"").slice(0,8),value:r,variable_description:"API Response"}])}function qt(e,t,n){let r=e.action_params??{},o=Vt.has(t)?"Vision Agent":"Operation Agent",i={operation_type:t};t==="OPEN"&&(i.url=r.url??""),t==="SET_VARIABLE"&&(i.variable_name=e.output_variable??r.key??"",i.variable_value=e.output_value??"");let s=t==="UPLOAD_FILE"?N(r):null;s&&(i.value=O(s.name));let a={},c={},u=e.action_instruction??"",l=r.text??"",_=r.url??"",p=[["intent",u],["value",l],["url",_]];for(let[h,A]of Object.entries(n)){let I=String(A);if(h.startsWith("secrets."))for(let[b,E]of p)E.includes(I)&&(c[b]=h);for(let[b,E]of p)E.includes(I)&&!(b in a)&&(a[b]=E)}s?.alias&&(a.value=`{{${M(s.alias)}}}`);let d=e.action_type,f={operation:e.action_instruction??"",agent:o,operation_dict:i,reasoning:d==="analyze"?r.query??"":e.intent??e.action_instruction??"",variable:a,secrets:c,params:{}};d==="analyze"&&typeof r.code=="string"&&r.code&&(f.code=r.code),d==="analyze"&&typeof r.code_js=="string"&&r.code_js&&(f.code_js=r.code_js),d==="analyze"&&typeof r.condition_expression=="string"&&r.condition_expression&&(f.condition_expression=r.condition_expression),r.uses_websocket===!0&&(f.uses_websocket=!0),r.uses_sse===!0&&(f.uses_sse=!0),d==="analyze"&&r.analyzer_type==="textual_visual"&&(typeof r.wrapped_js=="string"&&(f.wrapped_js=r.wrapped_js),Array.isArray(r.locators)&&(f.locators=r.locators),typeof r.operator=="string"&&(f.operator=r.operator),Array.isArray(r.transforms)&&(f.transforms=r.transforms),typeof r.query=="string"&&(f.query=r.query),typeof r.expected_value=="string"&&(f.expected_value=r.expected_value),typeof r.needs_unit_conversion=="boolean"&&(f.needs_unit_conversion=r.needs_unit_conversion),typeof r.condition=="string"&&(f.condition=r.condition));let m={set_cookies:"cookies",set_clipboard:"text",delete_cookies:"names",set_local_storage:"items",delete_local_storage:"keys"}[d];return m&&r[m]!==void 0&&(f[m]=r[m]),d==="set_clipboard"&&typeof r.html=="string"&&r.html&&(f.html=r.html),f}function L(e){let t=e.assertion_tree;return t&&typeof t=="object"&&Object.keys(t).length>0?t:Array.isArray(e.sub_results)?e:{}}function Gt(e){let t=L(e);if(typeof t.passed=="boolean")return t.passed;let n=t.sub_results??[];return n.length===0?t.status==="passed":(t.composite_operator??"and")==="or"?n.some(o=>o.passed===!0):n.every(o=>o.passed===!0)}function gt(e){return e.map(t=>({description:t.description??"",store_key:t.store_key??"",expected_value:t.expected??"",extracted_value:t.extracted_value??"",operator:t.operator??"equals",transforms:t.transforms??[]}))}function Kt(e){let t=L(e),n=t.sub_results??[],r=gt(n);return{operator:[],assertion_operands:[],left_operand:null,right_operand:null,operands:[],sub_results:n,sub_checks:r,composite_operator:t.composite_operator??"and",verification:t.verification??"",claim:t.description??""}}function Ht(e){let t=e.action_params??{},n=L(t),r=n.sub_results??[],o=gt(r);return[{operation:e.action_instruction??"",agent:"Operation Agent",operation_dict:{operation_type:"ASSERTION",assertion_tree:{sub_results:r,sub_checks:o,composite_operator:n.composite_operator??"and",verification:"",claim:n.description??e.action_instruction??"",operator:[],assertion_operands:[],left_operand:null,right_operand:null,operands:[]}},variable:{},secrets:{},params:{}}]}function Jt(e,t,n,r){let o=e.visual_data;if(!o||o.x==null||o.y==null)return null;let i=t?`${t}/test_screenshots`:"";return{x:o.x,y:o.y,confidence:0,bbox:o.bbox??null,bbox_source:o.bbox?"accessibility_tree":"fallback",viewport_width:o.viewport_width??1280,viewport_height:o.viewport_height??800,scale_factor:null,raw_image_url:i?`${i}/untagged_screenshot/${n}.${r?.get(n)??"png"}`:"",raw_image_sas_url:"",annotated_image_url:"",annotated_image_sas_url:""}}function Yt(e){if(!e)return"";let t=e;return typeof e=="object"&&!Array.isArray(e)&&Array.isArray(e.frameInfo)&&(t=e.frameInfo),!Array.isArray(t)||t.length===0?"":JSON.stringify(t)}function Wt(e){return/^(android|ios)_native$/i.test(e.platform??"")}function mt(e,t){return e.map(n=>({...n,type:t?n.strategy??n.type??"native":n.isXPath?"xpath":"css"}))}function Xt(e,t,n){let r={selector_target:"",drag_displacement:{},hold_duration_ms:null,move_duration_ms:null,hold_at_destination_ms:null};if(e!=="drag")return r;let o=t.target_selectors,i={};typeof t.direction=="string"&&t.direction&&(i.direction=t.direction,typeof t.fraction=="number"&&(i.fraction=t.fraction));let s=a=>typeof t[a]=="number"?Math.trunc(t[a]):null;return{selector_target:Array.isArray(o)&&o.length>0?mt(o,n):"",drag_displacement:i,hold_duration_ms:s("hold_duration_ms"),move_duration_ms:s("move_duration_ms"),hold_at_destination_ms:s("hold_at_destination_ms")}}function at(e,t="",n){let r=e.action_type,o=_t(r,e),i=e.action_params??{},s=e.coordinates??null,a=e.selectors??null,c=!!(a&&a.length>0),u=Wt(e),l=Xt(r,i,u),_=e.timestamp??"",p=e.duration_ms??0,d=e.variables_used??{},f=e.action_id??v(),g=v(),m=pt(_,p),h="",A="";if(r==="navigate")A=i.url??"",h=A;else if(r==="type"||r==="fill")h=i.text??"";else if(r==="press_key")h=i.key??"";else if(r==="wait")h=String(i.ms??i.timeout_ms??"");else if(r==="evaluate_js")h=i.script??"";else if(r==="upload_files"){let H=N(i);H&&(h=O(H.name))}else r==="analyze"&&o==="SET_VARIABLE"&&(h=e.output_value??"");let I="";r==="go_back"?I="back":r==="go_forward"&&(I="forward");let b=e.action_instruction??"",E=F(h)||F(A)||F(b),x=qt(e,o,d);return{operation_id:f,instruction_id:g,instruction:b,intent:b,operation_start:_,operation_end:m,status:e.status??"",command:o,name:"",target:"",value:h,message:"",operation_dict:"",frame:Yt(e.frame_info),surface:typeof i.surface=="string"?i.surface:"",frame_path:typeof i.frame_path=="string"?i.frame_path:"",grounded_by:typeof i.grounded_by=="string"?i.grounded_by:"",error_message:e.error??"",code_snippet:"",sub_instruction_obj:JSON.stringify(x),test_id:"",test_version:"",action:"",string_to_float:!1,feedback_msg:"",time_taken:"",create_time_stamp:"",update_time_stamp:"",locator_variable:"",locator_variable_name:"",image_url:t?`${t}/test_screenshots/untagged_screenshot/${f}.${n?.get(f)??"png"}`:"",alternative_xpaths:[],attribute:"",value_description:"",url:A,navigation_direction:I,tagified_image_url:"",query_variable_name:e.output_variable??"",query_variable_value:e.output_value??"",query_variable_type:"",expected_value:"",queried_value:"",operator:"",assertion_status:o==="ASSERTION"?Gt(i):"",query_info_dict:{},query_content_confidence:"none",debugging_logs:[],locator_index:0,query_html:"",user_variables:"[]",optional_flag:!1,max_retries:0,retries_delay:0,explicit_wait:0,implicit_wait:0,tab_index:String(i.tab_index??""),tab_identifier:String(i.tab_identifier??""),scroll_value:i.amount??1,scroll_direction:i.direction??"",mi_scroll_payload:{},sleep_duration:0,app_id:"",manual_interaction_tag:"",string_to_float_list:[],js_snippet:r==="evaluate_js"?i.script??"":"",code_error:"",hide:E,dismiss_dialog:!1,use_v2_mobile_tagging:u,multiple_inputs:!1,dialog_action:"",dialog_type:"",is_coordinates_used_for_interaction:s!==null&&!c,element_coordinates_ratio:[],element_bounds_ratio:[],x_coord:c?null:s?.x??null,y_coord:c?null:s?.y??null,target_x_coord:i.target_x??null,target_y_coord:i.target_y??null,source_description:i.source_description??null,target_description:i.target_description??null,use_coordinates:s!==null&&!c,kaneaiMobileTaggingImageLimit:1,clicks_order_code:"se_js_ac",selector:c?mt(a,u):"",selector_target:l.selector_target,math_result_variable_name:"",math_result_variable_value:"",expression_tree:o==="ASSERTION"?Kt(i):i.expression_tree??{},assertion_tree:o==="ASSERTION"?L(i):i.assertion_tree??{},assertion_tree_simplified:{},network_throttle:{},is_mobile_offline:!1,autoheal:!1,reprobe:e.reprobe??!1,click_modifier:(i.click_count??1)>=2?{kind:"multi_click",frequency:i.click_count}:null,db_query:"",db_details:{},db_query_decoded:"",is_global_variable:!1,is_global_variable_persist:!1,global_variable_id:"",wait_for_element_timeout:0,failure_condition:o==="ASSERTION"?"Fail test immediately":"",screenshot_command:"",smartui_contents:{},smartui_results:{},result_type:"",result_hint:"",drag_offset:{},drag_displacement:l.drag_displacement,hold_duration_ms:l.hold_duration_ms,move_duration_ms:l.move_duration_ms,hold_at_destination_ms:l.hold_at_destination_ms,start_coordinates:i.source_coordinates?{x:i.source_coordinates[0],y:i.source_coordinates[1]}:{},end_coordinates:i.target_coordinates?{x:i.target_coordinates[0],y:i.target_coordinates[1]}:{},element_rect:null,is_canvas:!1,until_condition:"",until_max_retries:0,until_settle_ms:0,api_data:r==="api"?{request:e.action_params?.api_data?.request??{}}:{},output_variables:r==="api"?e.output_variable?{[e.output_variable]:null}:{}:e.output_variable?{[e.output_variable]:e.output_value??""}:{},visual_context:Jt(e,t,f,n),reasoning:r==="analyze"?i.query??"":e.intent??e.action_instruction??""}}function ct(e,t){let n=e.action_type,r=_t(n,e),o=e.timestamp??"",i=e.duration_ms??0,s=pt(o,i),a=r==="ASSERTION"||r==="MATHEMATICAL_OPERATION";return{instruction_id:t.instruction_id,instruction_class:a?"non_driver_action":"driver_action",module_id:"",instruction:e.action_instruction??"",command:r,error:null,parent_instruction_id:"",classification_layer_resp:r==="ASSERTION"?Ht(e):[],classification_error:{},operations:[t],status:e.status??"",start_timestamp:o,end_timestamp:s,type:"agent_generated",tags:[],html_paths:[],optional_flag:!1,max_retries:0,retries_delay:0,explicit_wait:0,implicit_wait:0,content_type:n==="api"?"api":n==="analyze"&&e.action_params?.analyzer_type==="api_response"?"api_calls_query":n==="analyze"&&e.action_params?.analyzer_type?.startsWith("devtool_")?e.action_params.analyzer_type.replace("devtool_","devtools_"):"instruction",js_snippet:n==="evaluate_js"?e.action_params?.script??"":"",user_variables:n==="api"?$t(e):"[]",api_data:n==="api"?{request:e.action_params?.api_data?.request??{},response:ft(e)}:{},params_used:!1,hard_assertion:r==="ASSERTION"?e.action_params?.failure_condition==="hard":!1,expected_outcome:"",module_execution_index:0,module_version:null,network_throttle:{},isEdited:!1,use_query_assertion_v2:!1,db_query:"",db_details:{},network_assertion_content:{},screenshot_command:"",smartui_contents:{},generative_id:"",plan_id:"",generative_objective:"",error_message:"",error_code:"",reason:"",title:"",used_variables:[],reasoning:n==="analyze"?e.action_params?.query??"":e.intent??e.action_instruction??""}}function Zt(e,t=[]){let n=e.action_params??{},r=n.branches??[],o=n.winning_index??-1,i=n.sub_results??[],s={};for(let c of i){let u=c.sub_results;if(u)for(let l of u){let _=l.store_key;_&&(s[_]=l)}}let a=r.map((c,u)=>{let l=u===o,_=(c.sub_checks??[]).map(p=>{let d=s[p.store_key];return{description:p.description,store_key:p.store_key,expected_value:p.expected_value,stored_value:d?.extracted_value??p.stored_value,operator:p.operator??d?.operator??"equals",transforms:p.transforms??d?.transforms??[]}});if(_.length===0&&c.condition&&i.length>0){let d=i.find(f=>f.branch_index===u)?.sub_results??[];d.length>0&&(_=d.map(f=>({description:f.description??c.condition,store_key:f.store_key??"",expected_value:f.expected??"true",stored_value:f.extracted_value??void 0,operator:f.operator??"equals",transforms:f.transforms??[]})))}return{branch_index:u,condition:c.condition??null,branch_type:c.branch_type??"sub_objective",passed:l,sub_objective:null,custom_event:c.custom_event??null,children:l?t:[],sub_checks:c.condition?_:[],composite_operator:c.composite_operator??"and"}});return{content_type:"conditional_block",instruction_id:`if_else_${v().slice(0,8)}`,instruction:e.action_instruction??"",instruction_class:"driver_action",command:"",status:e.status??"success",resolved_branch_index:o,branches:a,generative_id:"",generative_objective:"",variables_used:{},classification_layer_resp:[],classification_error:{},used_variables:[],user_variables:"[]",module_id:"",module_execution_index:0,module_version:"",plan_id:"",optional_flag:!1,max_retries:0,retries_delay:0,explicit_wait:0,implicit_wait:0,error:null,error_message:"",error_code:"",reason:"",start_timestamp:e.timestamp??"",end_timestamp:"",type:"agent_generated",hook:null,hook_type:null,evaluation_context:{},query_variables:{}}}function ht(e,t,n){for(let r of e)r.content_type==="instruction"&&"generative_id"in r&&(r.generative_id=t,r.generative_objective=n)}function B(e,t="",n,r){let o=[],i=0;for(;i<e.length;){let s=e[i],a=s.action_type;if(!r?.keepFailedActions&&s.status==="error"&&a!=="assert"&&a!=="if_else"&&a!=="child_agent_start"&&a!=="child_agent_end"&&!(s.until_condition&&!s.error)){i+=1;continue}if(a==="analyze"&&(!dt[s.action_params?.analyzer_type??""]||s.action_params?.analyzer_type==="textual_visual"&&s.action_params?.code)){i+=1;continue}if(a==="child_agent_start"){let c=s.action_params?.child_id??"",u=s.action_params?.objective??"",l=[];i+=1;let _=1,p="error",d;for(;i<e.length&&_>0;){let E=e[i],x=E.action_type;if(x==="child_agent_start")_+=1;else if(x==="child_agent_end"&&(_-=1,_===0)){p=E.status??"success",d=E,i+=1;break}_>0&&l.push(E),i+=1}let f=B(l,t,n);ht(f,c,u);let g=d?.action_params?.result_code??null,m=d?.action_params?.reason_code??null,h=d?.action_params?.error_message??null,A=d?.action_params?.summary??null,I=d?.action_params?.one_liner??null,b=p==="error";o.push({content_type:"generative_block",instruction_id:`generative_block_${c}`,generative_id:c,objective:u,status:p,children:f,error_message:b?h??null:null,error_code:b?m??null:null,result_code:g??null,bifurcation_context:[],approach_reason:lt(A),one_liner:I??null});continue}else if(a==="child_agent_end"){i+=1;continue}else if(a==="if_else"){i+=1;let c=[];for(;i<e.length&&e[i].action_type==="child_agent_start";){let u=e[i],l=u.action_params?.child_id??"",_=u.action_params?.objective??"",p=[];i+=1;let d=1,f="error";for(;i<e.length&&d>0;){let m=e[i];if(m.action_type==="child_agent_start")d+=1;else if(m.action_type==="child_agent_end"&&(d-=1,d===0)){f=m.status??"success",i+=1;break}d>0&&p.push(m),i+=1}let g=B(p,t,n);c.push(...g)}o.push(Zt(s,c));continue}else if(a==="query_tool"){i+=1;continue}else if(s.until_condition){let c=at(s,t,n),u=ct(s,c),l=typeof s.until_condition_met=="boolean"?s.until_condition_met:s.status==="success";o.push({content_type:"until_block",instruction_id:`until_${v().slice(0,8)}`,condition:s.until_condition,max_retries:s.until_max_retries??10,settle_ms:s.until_settle_ms??500,current_count:0,condition_met:l,children:[u],generative_id:"",generative_objective:"",variables_used:{},status:s.status??"success"})}else{let c=at(s,t,n),u=ct(s,c);o.push(u)}i+=1}return o}function P(e,t="",n,r){let o=[],i=[],s=r?.passthrough,a=s?D(s.authoredInstructions):null;for(let d of e){if(s&&a&&d.flatIndex!==void 0&&s.replayOnlyFlatIndices.has(d.flatIndex)){let b=U(d.records,a);if(b){for(let E of b)o.push(E),i.push(d.flatIndex);continue}console.warn(`[migrator] replay-only passthrough: no authored operation matched step ${d.flatIndex} (action_id \u2260 any operation_id in the authored blob) \u2014 falling back to this run's records`)}let f=B(d.records,t,n,r);if(f.length===0)continue;let g=v().replace(/-/g,"");ht(f,g,d.objective);let m=f.some(b=>"status"in b&&typeof b.status=="string"?b.status==="error"||b.status==="failed":!1),h=d.resultCode?parseInt(d.resultCode,10):null,A=h!==null&&!isNaN(h)&&h>=200,I=m||A?"error":"success";o.push({content_type:"generative_block",instruction_id:`generative_block_${g}`,generative_id:g,objective:d.objective,status:I,children:f,error_message:I==="error"?d.errorMessage??null:null,error_code:I==="error"?d.reasonCode??null:null,result_code:d.resultCode??null,bifurcation_context:[],approach_reason:lt(d.summary),one_liner:d.oneLiner??null}),i.push(d.flatIndex)}let c=o.map((d,f)=>({block:d,flat:i[f]})),u=r?.moduleSpans??[],l=r?.blockSpans??[],_=r?.authoredBlocks??[];u.length>0&&(c=bt(c,u,l,_));let p=It(l,u);return p.length>0&&(c=z(c,p,_)),{instructions:c.map(d=>d.block)}}function bt(e,t,n,r){let o=[],i=a=>a===void 0?void 0:t.find(c=>a>=c.flatFrom&&a<=c.flatTo),s=0;for(;s<e.length;){let a=i(e[s].flat);if(!a){o.push(e[s]),s++;continue}let c=[];for(;s<e.length&&i(e[s].flat)===a;)c.push(e[s++]);let u=bt(c,a.children,n,r),l=It(Et(n,a),a.children);l.length>0&&(u=z(u,l,r)),o.push({block:se(a,u.map(_=>_.block)),flat:c[0].flat})}return o}function yt(e,t){return e.flatFrom>=t.flatFrom&&e.flatTo<=t.flatTo}function Et(e,t){let n=[];for(let r of e)yt(r,t)?n.push(r):n.push(...Et(r.children,t));return n}function It(e,t){let n=[],r=i=>{for(let s of i)n.push(s),r(s.children)};r(t);let o=i=>i.filter(s=>!n.some(a=>yt(s,a))).map(s=>({...s,children:o(s.children)}));return n.length>0?o(e):e}function z(e,t,n){let r=[...t].sort((u,l)=>u.flatFrom-l.flatFrom),o=[],i=(u,l)=>{o.push({block:re(u,l,n),flat:u.flatFrom})},s=(u,l)=>u!==void 0&&u>=l.flatFrom&&u<=l.flatTo,a=0,c=0;for(;c<e.length;){let u=e[c].flat;for(;a<r.length&&u!==void 0&&r[a].flatTo<u;)i(r[a++],[]);let l=a<r.length&&s(u,r[a])?r[a]:void 0;if(!l){o.push(e[c]),c++;continue}let _=[];for(;c<e.length&&s(e[c].flat,l);)_.push(e[c++]);i(l,_),a++}for(;a<r.length;)i(r[a++],[]);return o}function Qt(e){let t=new Map;for(let n of e)t.set(n.flat,n);return e.filter(n=>t.get(n.flat)===n)}var te=["children","instructions","branches","module_content","true_branch","false_branch"];function ee(e,t){if(!t)return;let n=[...e];for(;n.length>0;){let r=n.pop();if(!r||typeof r!="object")continue;let o=r;if(o.instruction_id===t&&(o.content_type==="conditional_block"||o.content_type==="until_block"))return o;for(let i of te){let s=o[i];Array.isArray(s)?n.push(...s):s&&typeof s=="object"&&n.push(s)}}}function ne(e,t,n){if(!e)return[];if(t==="while")return Array.isArray(e.children)?e.children:[];let o=(Array.isArray(e.branches)?e.branches:[])[n];return o&&Array.isArray(o.children)?o.children:[]}function re(e,t,n){let r=ee(n,e.blockId),o=e.branches.map((i,s)=>{let a=t.filter(l=>l.flat!==void 0&&l.flat>=i.flatFrom&&l.flat<=i.flatTo);e.kind==="while"&&(a=Qt(a));let c=z(a,e.children,n).map(l=>l.block);if(c.length>0)return c;let u=ne(r,e.kind,s);return u.length===0&&!i.taken&&console.warn(`[migrator] control-flow: branch ${s} of block ${e.blockId||e.instruction} did not run and no authored block matched \u2014 emitted empty`),u});return e.kind==="if"?ie(e,o,r):oe(e,o[0]??[],r)}function ie(e,t,n){let r=Array.isArray(n?.branches)?n.branches:[],o=V(t.flat()),i=e.branches.map((s,a)=>{let c=r[a];return{branch_index:a,condition:s.branch_type==="else"?null:s.condition,branch_type:s.branch_type,passed:s.taken,sub_objective:null,custom_event:c?.custom_event??null,children:t[a],sub_checks:Array.isArray(c?.sub_checks)?c.sub_checks:[],composite_operator:c?.composite_operator??"and"}});return{content_type:"conditional_block",instruction_id:e.blockId||`if_else_${v().slice(0,8)}`,instruction:e.instruction,instruction_class:"driver_action",command:"",status:o?"error":"success",resolved_branch_index:e.branches.findIndex(s=>s.taken),branches:i,generative_id:"",generative_objective:"",variables_used:{},classification_layer_resp:[],classification_error:{},used_variables:[],user_variables:"[]",module_id:"",module_execution_index:0,module_version:"",plan_id:"",optional_flag:!1,max_retries:0,retries_delay:0,explicit_wait:0,implicit_wait:0,error:null,error_message:o?.message??"",error_code:o?.code??"",reason:"",start_timestamp:"",end_timestamp:"",type:"agent_generated",hook:null,hook_type:null,evaluation_context:{},query_variables:{}}}function oe(e,t,n){let r=e.whileCfg??{max_retries:5,settle_ms:500,on_exhaust:"fail",iterations:0,condition_met:!1},o=V(t),i=(s,a)=>n&&n[s]!==void 0?n[s]:a;return{content_type:"until_block",instruction_id:e.blockId||`until_${v().slice(0,8)}`,condition:e.instruction,max_retries:r.max_retries,settle_ms:r.settle_ms,current_count:r.iterations,condition_met:r.condition_met,children:t,generative_id:"",generative_objective:"",variables_used:{},status:o?"error":"success",on_exhaust:i("on_exhaust",r.on_exhaust),mode:i("mode",""),check:i("check",""),conditions:i("conditions",[]),connectors:i("connectors",[]),sub_checks:i("sub_checks",[]),composite_operator:i("composite_operator","and")}}function V(e){for(let t of e){let n="status"in t&&typeof t.status=="string"?t.status:"";if(n==="error"||n==="failed"){let r="error_message"in t?t.error_message:void 0,o="error_code"in t?t.error_code:void 0;return{message:r??null,code:o??null}}}return null}function se(e,t){let n=e.meta,r=(u,l="")=>typeof n[u]=="string"?n[u]:l,o=(u,l=!1)=>typeof n[u]=="boolean"?n[u]:l,i=u=>Array.isArray(n[u])?n[u]:[],s=typeof n.module_version=="number"||typeof n.module_version=="string"?n.module_version:null,a=r("module_id"),c=V(t);return{content_type:tt,instruction_id:`module_block_${a}`,module_id:a,module_version:s,module_instance_id:v(),module_name:r("module_name"),module_description:r("module_description"),module_platform:r("module_platform"),creation_mode:r("creation_mode","Agent"),tms_status:r("tms_status","active"),is_validated:o("is_validated"),is_dirty:e.dirty,enrichment_id:r("enrichment_id"),tags:i("tags"),project_ids:i("project_ids"),link_to_all:o("link_to_all"),status:c?"error":"success",children:t,error_message:c?.message??null,error_code:c?.code??null,update_available:!1,update_info:{}}}function vt(e,t){let n;try{n=At(e)}catch{return 0}let r=0,o=n.filter(i=>/^\d+$/.test(i)).sort((i,s)=>Number(i)-Number(s));for(let i of o){let s=S(e,i),a=S(s,"logs");if(!ae(a))continue;let c;try{c=At(a)}catch{continue}let u=c.filter(p=>p.endsWith("-actions.ndjson")).sort((p,d)=>(parseInt(p,10)||0)-(parseInt(d,10)||0)),l=[];for(let p of u){let d=t.readActions(S(a,p));d.length&&l.push({objective:t.objective??"",records:d})}if(l.length===0)continue;let{instructions:_}=P(l,t.screenshotBaseUrl??"",t.extMap,{keepFailedActions:!0});if(_.length!==0)try{let p=S(s,"auteur");ce(p,{recursive:!0}),ue(S(p,"execution.json"),JSON.stringify(t.buildBlob(_),null,2)),r++,t.log?.("info","EVIDENCE_ARCHIVED_ATTEMPT_BLOB","Derived nested attempt blob",{attempt:i,instructions:_.length})}catch(p){t.log?.("debug","EVIDENCE_ARCHIVED_ATTEMPT_BLOB_FAILED","Nested attempt blob derivation failed",{attempt:i,error:p instanceof Error?p.message:String(p)})}}return r}import{existsSync as le,readFileSync as de}from"fs";function kt(e){try{return le(e)?JSON.parse(de(e,"utf-8")):void 0}catch{return}}function $(e,t){if(!e||typeof e!="object")return;let n=e,r=n.project_token;if(typeof r!="string"||!r)return;let o={project_token:r},i=n[t];typeof i=="string"&&i&&(o.project_name=i);let s=n.project_id;return typeof s=="string"&&s&&(o.project_id=s),o}function q(e){if(Array.isArray(e)){for(let r of e){let o=q(r);if(o)return o}return}if(!e||typeof e!="object")return;let t=e,n=t.smartui_results;if(n&&typeof n=="object"){let r=$(n.project,"name");if(r)return r}for(let r of Object.values(t)){let o=q(r);if(o)return o}}function Rt(e){for(let t of e.runMetaPaths){let n=kt(t),r=$(n?.smartui,"project_name");if(r)return r}if(e.authoredBlobPath){let t=kt(e.authoredBlobPath),n=$(t?.smartui,"project_name");if(n)return n}return q(e.instructions)??{}}var Pt=Nt(Lt(),1);import{createWriteStream as _e}from"fs";import{readFile as pe}from"fs/promises";import{join as fe,basename as ge}from"path";import{tmpdir as me}from"os";var he=["**/screenshots/**","**/annotated/**","**/tcg/**","**/bifurcation/**"];async function St(e){let t=fe(me(),`${ge(e)}_artifacts.zip`);return new Promise((n,r)=>{let o=_e(t),i=(0,Pt.default)("zip",{zlib:{level:6}});o.on("close",()=>n(t)),i.on("error",r),i.pipe(o),i.glob("**/*",{cwd:e,ignore:he}),i.finalize()})}async function wt(e){return pe(e)}async function Ee(e,t){return Ot(Q(e,t))}function Ie(e){return{key:"artifacts",content_type:"application/zip",filename:`${e}.evidence`}}var Ae=[1e3,2e3,4e3],xt=class{config;controller;testId;constructor(t){this.config=t,this.controller=new Y(t.controllerBaseUrl,t.auth),this.testId=t.testId}log(t,n,r,o){this.config.log?.(t,n,r,o)}async execute(){let{onProgress:t}=this.config;try{if(!this.testId)return this.log("error","PIPELINE_ABORT","No test_id available"),{success:!1,testId:null,error:"No test_id available"};let n=this.config.evidence,r=null;if(this.config.shouldUploadArtifacts!==!1){t("convert","running");let a=this.collectNdjsonPerRun(),c=a.reduce((g,m)=>g+m.records.length,0);this.log("info","PIPELINE_CONVERT","Collected NDJSON records",{total_records:c,run_groups:a.length});let u=this.loadReplayOnlyPassthrough(),{instructions:l}=a.length>0?P(a,this.config.screenshotBaseUrl??"",this.config.screenshotExtMap,{moduleSpans:this.config.moduleSpans,...u?{passthrough:u}:{},...this.config.blockSpans?.length?{blockSpans:this.config.blockSpans,authoredBlocks:this.loadAuthoredBlocks()}:{}}):{instructions:[]};this.log("info","PIPELINE_CONVERT_INSTRUCTIONS","Auteur instructions produced",{count:l.length});let _=this.buildExecutionEnvelope(l),p=Buffer.from(JSON.stringify(_));this.log("info","PIPELINE_CONVERT_BLOB","Blob created",{size_kb:+(p.length/1024).toFixed(1)});let d=y(this.config.sessionDir,"execution.json");w(d,JSON.stringify(_,null,2)),this.log("info","PIPELINE_CONVERT_LOCAL_SAVE","Execution blob saved locally",{path:d});let f=n?.packTestDir??this.config.evidenceRead?.packTestDir;if(f){let g=y(f,"auteur");K(g,{recursive:!0}),w(y(g,"execution.json"),JSON.stringify(_,null,2)),this.log("info","PIPELINE_CONVERT_PACK_COPY","Execution blob copied into pack",{path:y(g,"execution.json")}),this.deriveArchivedAttemptBlobs(f)}if(t("convert","done"),n)r=p;else{t("zip","running"),this.log("info","PIPELINE_ZIP_START","Zipping session",{session_dir:this.config.sessionDir});let g=null,m;try{g=await St(this.config.sessionDir),m=await wt(g),this.log("info","PIPELINE_ZIP_DONE","Zip complete",{size_mb:+(m.length/1024/1024).toFixed(1),path:g}),t("zip","done",`${(m.length/1024/1024).toFixed(1)}MB`)}finally{g&&await ye(g).catch(()=>{})}t("presign","running"),this.log("info","PIPELINE_PRESIGN_START","Requesting presigned URLs",{url:`${this.config.controllerBaseUrl}/upload/presign`,test_id:this.testId,session_id:this.config.sessionId});let h=await this.controller.getPresignedUrls(this.testId,this.config.sessionId,[{key:"artifacts",content_type:"application/zip",filename:`${this.config.sessionId}_artifacts.zip`},{key:"blob",content_type:"application/json",filename:`${this.config.commitId}.json`}]);this.log("info","PIPELINE_PRESIGN_OK","Presigned URLs received",{artifacts_url:h.urls.artifacts?.blob_url,blob_url:h.urls.blob?.blob_url}),t("presign","done"),t("upload","running"),this.log("info","PIPELINE_UPLOAD_START","Uploading artifacts and blob",{artifact_size_mb:+(m.length/1024/1024).toFixed(1),blob_size_kb:+(p.length/1024).toFixed(1)}),await Promise.all([k(h.urls.artifacts.upload_url,m,"application/zip"),k(h.urls.blob.upload_url,p,"application/json")]),this.log("info","PIPELINE_UPLOAD_OK","Upload complete"),t("upload","done")}}else{let a=this.collectNdjsonPerRun(),c=this.loadReplayOnlyPassthrough(),{instructions:u}=a.length>0?P(a,this.config.screenshotBaseUrl??"",this.config.screenshotExtMap,{keepFailedActions:!0,moduleSpans:this.config.moduleSpans,...c?{passthrough:c}:{},...this.config.blockSpans?.length?{blockSpans:this.config.blockSpans,authoredBlocks:this.loadAuthoredBlocks()}:{}}):{instructions:[]},l=this.buildExecutionEnvelope(u),_=y(this.config.sessionDir,"execution.json");w(_,JSON.stringify(l,null,2)),this.log("info","PIPELINE_LOCAL_SAVE","Execution blob saved locally (no upload)",{path:_});let p=this.config.evidence?.packTestDir??this.config.evidenceRead?.packTestDir;if(p){let d=y(p,"auteur");K(d,{recursive:!0});let f=this.readAuthoredExecution(),g=f?this.refreshReplayOnlyInPack(f,a,c):null;w(y(d,"execution.json"),g?.raw??JSON.stringify(l,null,2)),this.log("info","PIPELINE_CONVERT_PACK_COPY","Execution blob copied into pack (gated)",{path:y(d,"execution.json"),source:g?g.refreshed.length>0?"authored+replay_results":"authored":"run_envelope",...g&&g.refreshed.length>0?{refreshed_instruction_ids:g.refreshed}:{}}),this.deriveArchivedAttemptBlobs(p)}t("convert","skipped"),t("zip","skipped"),t("presign","skipped"),t("upload","skipped"),this.log("info","PIPELINE_UPLOAD_SKIPPED","Upload steps skipped (gate disabled)")}if(this.config.shouldReplaceLocalOutput&&this.config.onAtomicReplace){t("atomic_replace","running");try{await this.config.onAtomicReplace(),this.log("info","PIPELINE_ATOMIC_REPLACE_OK","Local output replaced"),t("atomic_replace","done")}catch(a){let c=a instanceof Error?a.message:String(a);throw this.log("error","PIPELINE_ATOMIC_REPLACE_FAILED","Atomic-replace failed",{error:c}),t("atomic_replace","failed",c),a}}else t("atomic_replace","skipped");let o,i;if(this.config.shouldCommit&&!this.config.isFirstRun&&this.config.onCommitLock){t("commit_lock","running");let a=await this.config.onCommitLock();if(a.ok)o=a.testcaseId||void 0,this.log("info","PIPELINE_COMMIT_LOCK_OK","Commit lock acquired",{testcase_id:o??"none",trigger:a.trigger??null,test_instance_id:a.testInstanceId??null}),t("commit_lock","done");else return this.log("error","PIPELINE_COMMIT_LOCK_FAILED","Commit lock failed",{reason:a.reason,message:a.message}),t("commit_lock","failed",`${a.reason??"unknown"}: ${a.message??""}`),{success:!1,testId:this.testId,error:`commit-lock failed: ${a.reason??"unknown"}`}}else t("commit_lock","skipped");if(this.config.isFirstRun&&!this.config.skipTmsFinalize){t("finalize","running"),this.log("info","PIPELINE_FINALIZE_START","Finalizing test (first-run)",{test_id:this.testId,commit_id:this.config.commitId});let a=new X(this.config.tmsBaseUrl,this.config.tmsUsername,this.config.tmsAccessKey),c=this.config.runObjectives&&this.config.runObjectives.length>0?this.config.runObjectives:[this.config.firstObjective],u={commit_id:this.config.commitId,time_taken:Math.round(this.config.totalDuration),steps_count:this.config.totalSteps,commit_message:this.config.firstObjective.slice(0,255),objectives:c,...this.config.assuranceStamp?{assurance:this.config.assuranceStamp}:{}},l;try{l=await this.stop(a,u)}catch(_){if(!this.config.attachedStop)throw _;let p=_ instanceof Error?_.message:String(_);this.log("error","PIPELINE_FINALIZE_NOT_SAVED","Attached test's stop did not finalize after its retries",{test_id:this.testId,error:p}),t("finalize","failed",p);try{await this.config.onFinalizeGaveUp?.()}catch(d){this.log("warn","PIPELINE_FINALIZE_META_FAILED","Meta-rewrite after a stop that did not finalize failed",{error:String(d)})}return{success:!1,testId:this.testId,error:`finalize failed: ${p}`,notSaved:!0}}if(o=l.testcase_id||void 0,this.log("info","PIPELINE_FINALIZE_OK","Test finalized",{testcase_id:o??"none",commit_id:l.commit_id??null}),this.config.onFinalizeSuccess)try{await this.config.onFinalizeSuccess(o,l.commit_id)}catch(_){this.log("warn","PIPELINE_FINALIZE_META_FAILED","Meta-rewrite after endTest failed",{error:String(_)})}t("finalize","done")}else t("finalize","skipped"),this.log("info","PIPELINE_FINALIZE_SKIPPED","Finalize skipped (evolve flow or first-run disabled)");if(o&&this.config.shareApiBaseUrl)try{i=await this.generateShareLink(o),this.log("info","PIPELINE_SHARE_OK","Share link generated",{share_id:i})}catch(a){this.log("warn","PIPELINE_SHARE_FAILED","Share link failed",{error:String(a)})}if(n&&r){let a=null;t("zip","running");try{await n.sealFn({testcaseId:o,shareId:i}),a=n.sealedPackPath?await Ot(n.sealedPackPath):await Ee(n.executionId,n.cwd),this.log("info","PIPELINE_EVIDENCE_SEALED","Evidence pack sealed",{execution_id:n.executionId}),this.log("info","PIPELINE_PACK_READ","Sealed pack read",{size_mb:+(a.length/1024/1024).toFixed(1)})}catch(c){let u=c instanceof Error?c.message:String(c);this.log("warn","PIPELINE_EVIDENCE_UPLOAD_SKIPPED","Evidence seal/read failed \u2014 uploading blob only",{execution_id:n.executionId,error:u})}if(a){t("zip","done",`${(a.length/1024/1024).toFixed(1)}MB`),t("presign","running");let c=await this.controller.getPresignedUrls(this.testId,this.config.sessionId,[Ie(n.executionId),{key:"blob",content_type:"application/json",filename:`${this.config.commitId}.json`}]);this.log("info","PIPELINE_PRESIGN_OK","Presigned URLs received",{artifacts_url:c.urls.artifacts?.blob_url,blob_url:c.urls.blob?.blob_url}),t("presign","done"),t("upload","running"),this.log("info","PIPELINE_UPLOAD_START","Uploading pack and blob",{artifact_size_mb:+(a.length/1024/1024).toFixed(1),blob_size_kb:+(r.length/1024).toFixed(1)}),await Promise.all([k(c.urls.artifacts.upload_url,a,"application/zip"),k(c.urls.blob.upload_url,r,"application/json")]),this.log("info","PIPELINE_UPLOAD_OK","Upload complete"),t("upload","done")}else{t("zip","skipped"),t("presign","running");let c=await this.controller.getPresignedUrls(this.testId,this.config.sessionId,[{key:"blob",content_type:"application/json",filename:`${this.config.commitId}.json`}]);t("presign","done"),t("upload","running"),this.log("info","PIPELINE_UPLOAD_START","Uploading blob only (evidence skipped)",{blob_size_kb:+(r.length/1024).toFixed(1)}),await k(c.urls.blob.upload_url,r,"application/json"),this.log("info","PIPELINE_UPLOAD_OK","Blob upload complete (pack skipped)"),t("upload","done")}}let s;if(this.config.codeExport?.enabled&&o){let a=!1;try{await this.triggerCodeExport(o),this.log("info","PIPELINE_CODE_EXPORT_START","Code export triggered"),a=!0}catch(c){let u=c instanceof Error?c.message:String(c);this.log("error","PIPELINE_CODE_EXPORT_FAILED","Code export trigger failed; skipping poll",{error:u}),t("code_export","failed",`trigger failed: ${u}`)}if(a){t("code_export","running","Waiting for code generation\u2026");try{s=await this.pollAndDownloadCode(o,t),this.log("info","PIPELINE_CODE_EXPORT_OK","Code export complete",{dir:s}),t("code_export","done",s)}catch(c){let u=c instanceof Error?c.message:String(c);this.log("error","PIPELINE_CODE_EXPORT_FAILED","Code export failed",{error:u}),t("code_export","failed",u)}}}else t("code_export","skipped");return this.log("info","PIPELINE_COMPLETE","Pipeline complete"),{success:!0,testId:this.testId,testcaseId:o,shareId:i,codeExportDir:s}}catch(n){return{success:!1,testId:this.testId,error:n instanceof Error?n.message:String(n)}}}async stop(t,n){let r=this.config.attachedStop?this.config.stopRetryDelaysMs??Ae:[];for(let o=0;;o++)try{return await t.endTest(this.testId,n)}catch(i){if(!(i instanceof W&&(i.status===null||i.status>=500)&&o<r.length))throw i;this.log("warn","PIPELINE_FINALIZE_RETRY","Attached test's stop sent again",{attempt:o+1,status:i.status}),await new Promise(a=>setTimeout(a,r[o]))}}async runCodeExport(t,n){let r=n??this.config.onProgress,o=!1;try{await this.triggerCodeExport(t),this.log("info","PIPELINE_CODE_EXPORT_TRIGGER","Code export triggered",{testcase_id:t}),o=!0}catch(i){let s=i instanceof Error?i.message:String(i);this.log("error","PIPELINE_CODE_EXPORT_TRIGGER_FAILED","Code export trigger failed; skipping poll",{error:s}),r("code_export","failed",`trigger failed: ${s}`)}if(o){r("code_export","running","Waiting for code generation\u2026");try{let i=await this.pollAndDownloadCode(t,r);return this.log("info","PIPELINE_CODE_EXPORT_OK","Code export complete",{dir:i}),r("code_export","done",i),i}catch(i){let s=i instanceof Error?i.message:String(i);this.log("error","PIPELINE_CODE_EXPORT_FAILED","Code export failed",{error:s}),r("code_export","failed",s);return}}}deriveArchivedAttemptBlobs(t){try{let n=vt(t,{readActions:r=>this.readNdjsonFromFile(r),buildBlob:r=>this.buildExecutionEnvelope(r),objective:this.config.firstObjective,screenshotBaseUrl:this.config.screenshotBaseUrl??"",extMap:this.config.screenshotExtMap,log:(r,o,i,s)=>this.log(r,o,i,s)});n>0&&this.log("info","PIPELINE_ARCHIVED_ATTEMPTS","Nested retry-attempt blobs derived",{count:n})}catch(n){this.log("debug","PIPELINE_ARCHIVED_ATTEMPTS_FAILED","Nested attempt blob pass failed",{error:n instanceof Error?n.message:String(n)})}}collectNdjsonPerRun(){let t=[],n=this.config.runObjectives??[],r=this.config.runMetadata??[],o=this.config.evidence??this.config.evidenceRead;for(let i=0;i<this.config.runDirs.length;i++){let s=this.config.runDirs[i],a=n[i]||this.config.firstObjective,c=r[i],u=o?this.readNdjsonFromFile(y(o.packTestDir,"logs",`${o.runIndices?.[i]??i}-actions.ndjson`)):this.readNdjsonFromDir(s);if(u.length>0){let l=o?.runIndices?.[i]??i,_=this.config.runFlatIndex?.[l];t.push({objective:a,records:u,..._!==void 0?{flatIndex:_}:{},resultCode:c?.resultCode,reasonCode:c?.reasonCode,errorMessage:c?.errorMessage,summary:c?.summary,oneLiner:c?.oneLiner})}}if(t.length===0){let i=y(this.config.sessionDir,"runs");if(G(i))try{let a=be(i,{withFileTypes:!0}).filter(c=>c.isDirectory()).map(c=>c.name).sort();for(let c of a){let u=y(i,c),l=this.readNdjsonFromDir(u);l.length>0&&t.push({objective:this.config.firstObjective,records:l})}}catch{}}return t}readNdjsonFromDir(t){let n=[y(t,"run-test","actions.ndjson"),y(t,"actions.ndjson")];for(let r of n)if(G(r))return this.readNdjsonFromFile(r);return[]}readNdjsonFromFile(t){let n=[];if(!G(t))return n;this.log("debug","PIPELINE_COLLECT_READ","Reading NDJSON file",{path:t});let r=T(t,"utf-8");for(let o of r.split(`
5
- `)){let i=o.trim();if(i)try{n.push(JSON.parse(i))}catch{}}return n}async generateShareLink(t){let n=`${this.config.shareApiBaseUrl}/lshs/api/v1.0/share-item/generate-sharable-link`;this.log("info","PIPELINE_SHARE_START","Requesting share link",{url:n,testcase_id:t});let r={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({entityIds:[t],entityType:"Test Case Details",expiresAt:7})},o=!!this.config.authResolver;this.log("debug","PIPELINE_SHARE_AUTH","Share link auth config",{resolver:o,fallback_auth_type:typeof this.config.auth=="string"?"bearer":"basic",tms_user:this.config.tmsUsername});let i=o?await this.config.authResolver.fetch(n,r):await R(n,{...r,headers:{...r.headers,Authorization:this.buildAuthHeader()}});if(!i.ok)throw new Error(`Share link API failed: ${i.status} ${await i.text()}`);let s=await i.json();if(!s.shareId)throw new Error("Share link API returned no shareId");return s.shareId}async triggerCodeExport(t){if(!this.config.codeExport)throw new Error("triggerCodeExport called without resolved codeExport config");let{url:n,body:r}=et({tmsBaseUrl:this.config.tmsBaseUrl,testcaseId:t,codeExport:this.config.codeExport,mobile:this.config.mobile});this.log("info","PIPELINE_CODE_EXPORT_POST","Triggering code export",{url:n});let o={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)},i=this.config.authResolver?await this.config.authResolver.fetch(n,o):await R(n,{...o,headers:{...o.headers,Authorization:this.buildAuthHeader()}});if(!i.ok)throw new Error(`Code export failed: ${i.status} ${await i.text()}`)}async pollAndDownloadCode(t,n){let r=nt({tmsBaseUrl:this.config.tmsBaseUrl,testcaseId:t}),o=this.config.exitTimeoutMs??3e5,i=5e3,s=Date.now()+o;this.log("info","PIPELINE_CODE_EXPORT_POLL","Polling for code export",{url:r,timeout_ms:o});let a=(c,u)=>this.config.authResolver?this.config.authResolver.fetch(c,u):R(c,{...u,headers:{...u?.headers,Authorization:this.buildAuthHeader()}});for(;Date.now()<s;){let c=await a(r,{method:"GET",headers:{Accept:"application/json"}});if(!c.ok){let d=await c.text().catch(()=>"");throw this.log("warn","PIPELINE_CODE_EXPORT_POLL_FAILED","Code export poll non-200; skipping",{status:c.status,body:d.slice(0,200)}),new Error(`code export poll skipped: HTTP ${c.status}`)}let l=(await c.json()).data?.find(d=>d.code_name==="kane-cli-trigger");if(!l){this.log("debug","PIPELINE_CODE_EXPORT_WAITING","No kane-cli-trigger entry yet"),n("code_export","running","Waiting for code generation\u2026"),await this.sleep(i);continue}let _=l.status.toLowerCase();if(_==="in progress"||_==="in_progress"||_==="pending"){this.log("debug","PIPELINE_CODE_EXPORT_IN_PROGRESS","Code export in progress",{status:l.status}),n("code_export","running","Generating code\u2026"),await this.sleep(i);continue}if(!l.url||l.url.length===0)throw new Error(`Code export status=${l.status} but no files returned`);let p=this.config.codeExportDir??y(this.config.sessionDir,"code-export");K(p,{recursive:!0}),this.log("info","PIPELINE_CODE_EXPORT_DOWNLOAD","Downloading code files",{file_count:l.url.length,dir:p}),n("code_export","running",`Downloading ${l.url.length} files\u2026`);for(let d of l.url){let f=y(p,d.file_name),g=await R(d.file_url);if(!g.ok){this.log("warn","PIPELINE_CODE_EXPORT_FILE_FAILED","Failed to download file",{file_name:d.file_name,status:g.status});continue}let m=await g.text();w(f,m,"utf-8"),this.log("info","PIPELINE_CODE_EXPORT_FILE_SAVED","File saved",{file_name:d.file_name,size_bytes:m.length})}return p}throw new Error("Code export timed out")}sleep(t){return new Promise(n=>setTimeout(n,t))}buildAuthHeader(){return typeof this.config.auth=="string"?`Bearer ${this.config.auth}`:J(this.config.auth.username,this.config.auth.accessKey)}readAuthoredExecution(){let t=this.config.authoredExecutionPath;if(!t)return null;try{let n=T(t,"utf8");return JSON.parse(n),n}catch{return this.log("warn","PIPELINE_AUTHORED_BLOB_UNREADABLE","Authored execution.json missing/unreadable \u2014 pack gets this run's envelope",{path:t}),null}}refreshReplayOnlyInPack(t,n,r){if(!r)return{raw:t,refreshed:[]};let o=ot(n,r);if(o.length===0)return{raw:t,refreshed:[]};let i=JSON.parse(t);if(!Array.isArray(i.instructions))return{raw:t,refreshed:[]};let s=st(i.instructions,o);return s.length===0?{raw:t,refreshed:s}:{raw:JSON.stringify(i,null,2),refreshed:s}}loadAuthoredBlocks(){let t=this.config.blockAuthoredExecutionPath;if(!t)return[];try{let n=JSON.parse(T(t,"utf8"));return Array.isArray(n.instructions)?n.instructions:[]}catch(n){return this.log("warn","PIPELINE_AUTHORED_BLOB_UNREADABLE","Authored execution.json missing/unreadable \u2014 branches that did not run this time upload empty",{path:t,error:n instanceof Error?n.message:String(n)}),[]}}loadReplayOnlyPassthrough(){let t=this.config.replayOnlyPassthrough;if(!(!t||t.flatIndices.length===0))try{let n=JSON.parse(T(t.authoredExecutionPath,"utf8"));if(!Array.isArray(n.instructions))throw new Error("no instructions array");return{authoredInstructions:n.instructions,replayOnlyFlatIndices:new Set(t.flatIndices)}}catch(n){this.log("warn","PIPELINE_PASSTHROUGH_BLOB_UNREADABLE","Authored execution.json missing/unreadable \u2014 replay-only steps convert from this run's records",{path:t.authoredExecutionPath,flat_indices:t.flatIndices,error:n instanceof Error?n.message:String(n)});return}}smartuiProject(t){let n=this.config.evidence??this.config.evidenceRead,r=this.config.runDirs.map((i,s)=>n?y(n.packTestDir,"logs",`${n.runIndices?.[s]??s}-run_meta.json`):y(i,"run_meta.json"));return{...Rt({runMetaPaths:r,authoredBlobPath:this.config.replayOnlyPassthrough?.authoredExecutionPath??this.config.authoredExecutionPath,instructions:t})}}buildExecutionEnvelope(t){let n=this.config.runStatuses.every(u=>u==="passed")?"success":"error",r=this.config.variableIds??{},o=[];if(this.config.variables)for(let[u,l]of Object.entries(this.config.variables)){if(l.secret||Z(l))continue;let _=u.startsWith("global.")?u.slice(7):u;o.push({id:r[_]??0,name:_,value:l.value,session_value:l.value,is_persist:!1,environment_id:0,environment_name:"No Env"})}let i=[],s=u=>{let l=i.find(_=>_.name===u.name);l?l.value=u.value:i.push(u)},a=[],c=new Set;for(let u of this.collectNdjsonPerRun())for(let l of u.records)if(l.output_variable&&l.output_value!=null&&s({name:l.output_variable,value:String(l.output_value),value_type:"test_level",variable_description:"ANALYZE result"}),l.action_type==="upload_files"){let _=N(l.action_params);if(_){let p=_.media_id||_.media_url;if(!c.has(p)){c.add(p),a.push({media_url:_.media_url,media_id:_.media_id,name:_.name,type:_.type,..._.alias?{alias:_.alias}:{}});let d=O(_.name);_.alias?s({name:M(_.alias),type:"file",value:d,value_type:"string",scope:_.alias.startsWith("local.")?"local":"global",media_id:_.media_id}):s({name:ut(_.name),value:d,value_type:"string",variable_description:`variable for ${d}`})}}}return{test_id:this.testId,version:"v4",auto_heal_version:this.config.apMode==="v2"?"AH2":"",session_id:this.config.sessionId,org_id:String(this.config.orgId),user_id:String(this.config.userId),url:this.config.firstUrl??"",start_timestamp:this.config.startedAt,end_timestamp:this.config.endedAt,status:n,commit_id:this.config.commitId,instructions:t,modules:[],uploaded_files:a,test_params:this.config.testParams??[],test_level_variables:JSON.stringify(i),test_global_variables:o,max_network_wait:0,wait_buffer:0,network_throttle:{},secrets:this.config.secrets??[],totp:[],environment_id:this.config.environmentId??0,environment:"",mobile_browser:!1,native_popups:[],smartui:this.smartuiProject(t),module_index:0}}};export{Ee as a,Ie as b,Ae as c,xt as d};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{b as f}from"./chunk-AUJSC7PU.js";import{c as d}from"./chunk-I2MC6VVX.js";import{g}from"./chunk-4I7YN6YY.js";import{existsSync as a}from"fs";import{resolve as i}from"path";function E(){let n=g().packageRoot;return n===null?[]:[n]}function A(n){return{"darwin-arm64":"kane-cli-darwin-arm64","darwin-x64":"kane-cli-darwin-x64","linux-x64":"kane-cli-linux-x64","linux-arm64":"kane-cli-linux-arm64","win32-x64":"kane-cli-win-x64"}[n]??null}function S(n){return{"darwin-arm64":"kane-cli-assurance-darwin-arm64","darwin-x64":"kane-cli-assurance-darwin-x64","linux-x64":"kane-cli-assurance-linux-x64","linux-arm64":"kane-cli-assurance-linux-arm64","win32-x64":"kane-cli-assurance-win-x64"}[n]??null}function v(n=E()){let e=A(`${process.platform}-${process.arch}`),c=S(`${process.platform}-${process.arch}`),t=process.platform==="win32"?"assurance-agent.exe":"assurance-agent";for(let r of n){for(let s of c?["@testmuai","@lambdatestincprivate"]:[]){let o=i(r,"node_modules",s,c,"bin",t);if(a(o))return{cmd:o,args:[],tier:"platform"}}for(let s of e?["@testmuai","@lambdatestincprivate"]:[]){let o=i(r,"node_modules",s,e,"bin",t);if(a(o))return{cmd:o,args:[],tier:"platform"}}let m=i(r,"dist","bin",t);if(a(m))return{cmd:m,args:[],tier:"embedded"};let u=i(r,"../assurance-agent/dist",t);if(a(u))return{cmd:u,args:[],tier:"sibling"};let l=i(r,"../assurance-agent/main.py");if(a(l)){let s=i(r,"../assurance-agent/.venv/bin/python");return{cmd:a(s)?s:"python3",args:[l],tier:"dev-python"}}}return null}var _=12e4+d;function P(n,e={}){return{...process.env,...e,...f(),TESTMUAI_SOURCE:"kane-cli",TESTMUAI_SESSION_ID:n,ASSURANCE_LOG_LEVEL:process.env.ASSURANCE_LOG_LEVEL??"info",PYTHONIOENCODING:"utf-8",PYTHONUTF8:"1",ASSURANCE_CHECKPOINT_SAVE_DEADLINE_S:String(_/1e3)}}async function C(n,e=process.env){if(e.TESTMUAI_API_KEY||e.TESTMUAI_BASIC_AUTH)return{};try{let t={TESTMUAI_ENV:e.TESTMUAI_ENV==="stage"?"stage":"prod"},r=await n.controller();return r.basic?(t.TESTMUAI_BASIC_AUTH=Buffer.from(`${r.basic.username}:${r.basic.accessKey}`,"utf8").toString("base64"),t):r.token?(t.TESTMUAI_API_KEY=r.token,t):{}}catch{return{}}}export{A as a,S as b,v as c,_ as d,P as e,C as f};
@@ -1,21 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{e as R}from"./chunk-ZCRZFAOT.js";import{a as O}from"./chunk-RZ4F3BHX.js";var C={ASR_CMD_START:"info",ASR_CMD_END:"info",ASR_AGENT_SPAWN:"info",ASR_WORK_ITEM_START:"info",ASR_WORK_ITEM_END:"info",ASR_PROPOSAL:"info",ASR_VALIDATE_FAILED:"warn",ASR_COMMIT:"info",ASR_SESSION_PAUSED:"info",ASR_SESSION_RESUMED:"info",ASR_SESSION_COMPLETE:"info",ASR_AGENT_EXIT:"warn",ASR_RECONCILE_PLAN:"info",ASR_RECONCILE_ROW_END:"info",ASR_HIGH_RISK_CI:"warn",ASR_INGEST:"info",ASR_EMBED_DEGRADED:"warn",ASR_CONTEXT_CLONED:"warn",ASR_ERROR:"error",ASR_CRASH:"error",ASR_FSCK_REPORT:"warn"},L={ASR_CMD_START:["source_count","resumed","applied_plan"],ASR_CMD_END:["exit_code","duration_ms","credits_total","work_items_total","work_items_failed"],ASR_AGENT_SPAWN:["tier","duration_ms"],ASR_WORK_ITEM_START:["work_item_index","work_item_count","source_kind"],ASR_WORK_ITEM_END:["work_item_index","work_item_count","outcome","duration_ms","error_domain","error_code"],ASR_PROPOSAL:["item_count","turn_index"],ASR_VALIDATE_FAILED:["error_code","count","turn_index"],ASR_COMMIT:["trusted","derived","archived","items","items_dropped","record_seq","phase","duration_ms"],ASR_SESSION_PAUSED:["pending_questions","pending_proposals"],ASR_SESSION_RESUMED:["resume_count","expired_session_id"],ASR_SESSION_COMPLETE:["duration_ms","credits_total"],ASR_AGENT_EXIT:["exit_code","signal"],ASR_RECONCILE_PLAN:["row_count","add_count","modify_count","archive_count"],ASR_RECONCILE_ROW_END:["row_index","kind","outcome","duration_ms"],ASR_HIGH_RISK_CI:["count"],ASR_INGEST:["work_item_index","work_item_count","format","bytes","media_facts"],ASR_EMBED_DEGRADED:["held"],ASR_CONTEXT_CLONED:[],ASR_ERROR:["error_domain","error_code","exit_code","turn_index","request_id"],ASR_CRASH:["error_domain","error_code","error_name"],ASR_FSCK_REPORT:["issue_count","records","pending","codes","issues","issues_truncated"]},U=[[/^lattice_/,"lattice"],[/^refused_/,"refused"],[/^(auth_expired|401|preflight_auth|AUTH)/i,"auth"],[/^(credit_denied|402|CREDIT)/i,"credit"],[/^(stream_drop|read_timeout|connect_failed|dns|E(CONN|AI_AGAIN|TIMEDOUT)|network)/i,"network"],[/^(frame_parse|post_terminal_data|eof_without_terminal|turn_id_mismatch|binding_mismatch|schema_invalid|frame_too_large|protocol)/i,"protocol"],[/^(provider_error|http_5\d\d|turn_exhausted|adapter_integrity)/i,"provider"],[/^(STALE_BASIS|R\d+|validation|criteria)/i,"validation"],[/^(CHAIN_ERROR|DERIVED_(MISSING|DRIFT)|NODE_FILE_(MISSING|MISMATCH|CORRUPT)|CARDINALITY_VIOLATION|SUPERSEDE_(UNKNOWN_(OLD|NEW|ECID)|CYCLE)|DOUBLE_SUPERSEDE|NAME_UNKNOWN_TARGET|EDGE_CYCLE|UNKNOWN_(LABEL|FIELD|EDGE_TYPE|EDGE_PROP)|BAD_(CHECK|ENUM)|MISSING_(FIELD|SALIENT)|ILLEGAL_EDGE)$/,"graph"],[/^(BLOB_MISSING|SOURCE_UNKNOWN|SESSION_(LOCKED|EXPIRED|MISSING|LOCK_LOST)|NO_STORE|fsck|store)/i,"store"],[/^(usage|EX2|SOURCE_WITH_RESUME|HIGH_RISK_CI|bad_flag|no_tty)/i,"usage"],[/^exit_\d+_unattributed$/,"unattributed"],[/^agent_(crash|exit)/i,"agent_crash"]];function v(e){let t=(e||"unknown").slice(0,64);for(let[n,r]of U)if(n.test(t))return{error_domain:r,error_code:t};return{error_domain:"cli_crash",error_code:t}}import{randomBytes as w}from"crypto";var b=/^(uc|sc|ac|t|gap|sty)-\d+$/,K="0123456789abcdefghijklmnopqrstuvwxyz";function W(e){let t="",n=w(e);for(let r=0;r<e;r++)t+=K[n[r]%36];return t}function se(e=new Date){let t=(r,o)=>String(r).padStart(o,"0");return`as-${`${e.getUTCFullYear()}${t(e.getUTCMonth()+1,2)}${t(e.getUTCDate(),2)}T${t(e.getUTCHours(),2)}${t(e.getUTCMinutes(),2)}`}-${W(8)}`}var M=-1,S=0;function ce(e=new Date){let t=e.getTime(),n=w(10);t===M?S=S+1&4095:(M=t,S=(n[0]<<8|n[1])&4095);let r=Buffer.alloc(16);r.writeUIntBE(t,0,6),r[6]=112|S>>8,r[7]=S&255,r[8]=128|n[2]&63,n.copy(r,9,3,10);let o=r.toString("hex");return`${o.slice(0,8)}-${o.slice(8,12)}-${o.slice(12,16)}-${o.slice(16,20)}-${o.slice(20)}`}var B=64,P=128,$=/^[A-Za-z0-9._:@\/-]+$/,j={codes:512},H={ASR_FSCK_REPORT:["issues"]},X=20480,V=0;function q(e,t){if(typeof t=="number"&&Number.isFinite(t)||typeof t=="boolean")return t;if(typeof t!="string")return;let n=e.endsWith("_id")||e==="signal"?P:j[e]??B;if(!(t.length===0||t.length>n)&&$.test(t))return t}var k=e=>e!==void 0&&e.length>0&&e.length<=P&&$.test(e);function F(e,t,n={}){let r=L[t],o={};for(let s of r){let i=n[s];if(i==null)continue;if(H[t]?.includes(s)){if(typeof i!="string"||i.length===0)continue;let _=i.replace(/[\u0000-\u001F\u007F]/g,"");if(Buffer.byteLength(_,"utf8")>X)continue;o[s]=_;continue}if(s==="items"){let _=Array.isArray(i)?i.filter(E=>typeof E=="string"):[],u=_.filter(E=>b.test(E));u.length>0&&(o.items=u.slice(0,50).join(","));let p=_.length-u.length;p>0&&(o.items_dropped=p);continue}let a=q(s,i);a!==void 0&&(o[s]=a)}if(typeof n.error_code=="string"&&r.includes("error_code")){let{error_domain:s,error_code:i}=v(n.error_code);o.error_code=i,r.includes("error_domain")&&(o.error_domain=s)}return{level:C[t],event:t,message:t,session_id:e.session_id,operation_id:e.operation_id,...e.parent_operation_id?{parent_operation_id:e.parent_operation_id}:{},...e.agent_session_id?{agent_session_id:e.agent_session_id}:{},context_lineage_id:e.context_lineage_id??null,context_instance_id:e.context_instance_id??null,...k(e.lattice_session_id)?{lattice_session_id:e.lattice_session_id}:{},...k(e.project_id)?{project_id:e.project_id}:{},verb:e.verb,mode:e.mode,component:"kane-cli",seq:V++,event_time:new Date().toISOString(),context:o}}import c from"fs";import A from"path";var z=500,Y=7,J=512*1024,Z=15*6e4;function y(e){if(e.length!==0)try{let t=R();c.mkdirSync(A.dirname(t),{recursive:!0});let n=e.map(o=>JSON.stringify(o)).join(`
3
- `)+`
4
- `;c.appendFileSync(t,n,{flag:"a",mode:384});let r=0;try{r=c.statSync(t).size}catch{r=0}r>J&&re()}catch{}}function Q(e){try{let t=A.dirname(e),n=A.basename(e);for(let r of c.readdirSync(t)){if(!r.startsWith(`${n}.claim-`)&&!r.startsWith(`${n}.prune-`))continue;let o=A.join(t,r),s=Number(r.slice(r.lastIndexOf("-")+1));if(s===process.pid)continue;let i=!1;if(Number.isFinite(s)&&s>0)try{process.kill(s,0),i=!0}catch{i=!1}let a=!i;if(i)try{a=Date.now()-c.statSync(o).mtimeMs>Z}catch{a=!1}if(a)try{let _=c.readFileSync(o,"utf8");_.trim()&&c.appendFileSync(e,_.endsWith(`
5
- `)?_:_+`
6
- `,{flag:"a",mode:384}),c.unlinkSync(o)}catch{}}}catch{}}function Se(e){ee(e).catch(()=>{})}function ee(e){return te(async t=>{try{return(await O(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).ok}catch{return!1}})}var G=Promise.resolve();function te(e){let t=G.then(()=>ne(e));return G=t.catch(()=>{}),t}async function ne(e){let t=R();Q(t);let n=`${t}.claim-${process.pid}`,r;try{c.renameSync(t,n),r=c.readFileSync(n,"utf8")}catch{return}let o=[];for(let s of r.split(`
7
- `))if(s.trim())try{o.push(JSON.parse(s))}catch{}try{(o.length===0?!0:await e(o))?c.unlinkSync(n):(c.appendFileSync(t,r,{flag:"a",mode:384}),c.unlinkSync(n))}catch{try{c.appendFileSync(t,r,{flag:"a",mode:384}),c.unlinkSync(n)}catch{}}}function re(e=z,t=Y){try{let n=R(),r=`${n}.prune-${process.pid}`;c.renameSync(n,r);let s=c.readFileSync(r,"utf8").split(`
8
- `).filter(u=>u.trim()),i=Date.now()-t*24*3600*1e3,_=s.filter(u=>{try{let p=JSON.parse(u),E=Date.parse(p.event_time??p.timestamp??"");return Number.isNaN(E)||E>=i}catch{return!1}}).slice(-e);_.length>0&&c.appendFileSync(n,_.join(`
9
- `)+`
10
- `,{flag:"a",mode:384}),c.unlinkSync(r)}catch{}}var f=null;function Ae(e){f=e}function ye(){return f}var N=()=>!!process.env.KANE_DEV_MODE,d=[],h=!1,D=null,m=null,T=null,l=null,g=[];function Ie(e){if(l=e,e&&g.length>0){let t=g;g=[];for(let n of t)try{e.log(n.level,n.event,n.message,n.context)}catch{}}}function he(e,t,n,r){if(l){try{l.log(e,t,n,r)}catch{}return}g.push({level:e,event:t,message:n,context:r})}function Te(){return l}function Ne(){return h}function De(e,t){d=d.filter(n=>n.name!==e),d.push({name:e,fn:t})}function xe(e){d=d.filter(t=>t.name!==e)}function Oe(e,t){let n=d.find(o=>o.name===e);if(!n)return;d=d.filter(o=>o.name!==e);let r=!0;try{n.fn()}catch(o){r=!1,process.stderr.write(`[exit-manager] cleanup(${e}) failed: ${o instanceof Error?o.message:String(o)}
11
- `)}t&&r&&N()&&process.stderr.write(`[exit-manager] cleanup(${e}): ${t}
12
- `)}async function Ce(e=1e3){let t=l;if(!(!t?.stopAndFlushOnce||!t.drainBuffer))try{let n=await t.stopAndFlushOnce(e);if(n!=="sent"&&n!=="empty"){let r=t.drainBuffer();r.length>0&&y(r)}}catch{}}function I(e,t,n=!1,r){if(h){process.exit(D??e);return}if(h=!0,D=e,n&&l)try{l.log("error","CRASH",t);let i=l.drainBuffer?.()??[];i.length>0&&y(i),l.shutdownSync()}catch{}if(n&&f&&e!==130&&e!==143)try{let i=/Uncaught exception:\s*([A-Za-z0-9_$]+)/.exec(t)?.[1]??"crash";y([F(f,"ASR_CRASH",{error_code:"cli_crash",error_name:i})])}catch{}let o=[...d].reverse(),s=[];for(let i of o)try{i.fn(),s.push(i.name)}catch(a){process.stderr.write(`[exit-manager] cleanup(${i.name}) failed: ${a instanceof Error?a.message:String(a)}
13
- `)}if(d=[],N()&&(process.stderr.write(`[exit-manager] shutdown(${e}): ${t}
14
- `),s.length>0&&process.stderr.write(`[exit-manager] cleaned up: ${s.join(", ")}
15
- `)),n){if(T)try{T()}catch{}e===130||e===143||(process.stderr.write(`
16
- kane-cli crashed: ${t}
17
- `+(s.length>0?`Resources cleaned up (${s.join(", ")}).
18
- `:"")),f&&process.stderr.write(`session: ${f.session_id} \u2014 share this id with support
19
- `),r&&N()?process.stderr.write(`${r}
20
- `):process.stderr.write(`(re-run with KANE_DEV_MODE=1 for the full stack)
21
- `)),process.exit(e);return}if(m&&!n){m();return}process.exit(e)}function Le(e){m=e}function ve(){m=null}function Me(e){T=e}var x=!1;function we(){x||(x=!0,process.on("SIGINT",()=>{I(130,"Received SIGINT",!0)}),process.on("SIGTERM",()=>{I(143,"Received SIGTERM",!0)}),process.on("uncaughtException",e=>{I(1,`Uncaught exception: ${e.name}: ${e.message}`,!0,e.stack)}),process.on("unhandledRejection",e=>{I(1,`Unhandled rejection: ${String(e)}`,!0,e instanceof Error?e.stack:void 0)}))}function be(){d=[],h=!1,D=null,m=null,T=null,l=null,g=[],x=!1,f=null}export{se as a,ce as b,C as c,F as d,y as e,Se as f,ee as g,Ae as h,ye as i,Ie as j,he as k,Te as l,Ne as m,De as n,xe as o,Oe as p,Ce as q,I as r,Le as s,ve as t,Me as u,we as v,be as w};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{f as d}from"./chunk-3E4ZO73O.js";function w(r){let{isAgent:c,log:m}=r,a=r.stdout??process.stderr,s=r.stdin??process.stdin,p=t=>{c&&d(t)};return{async runSteps(t){let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-5ZN47FAT.js"),{TestMdRunView:i}=await import("./TestMdRunView-LS2QUFWR.js"),{ScrollbackProvider:n}=await import("./scrollback-GGNBDFQV.js"),{waitUntilExit:l}=o(e.createElement(n,null,e.createElement(i,t)),{stdout:a,stdin:s,exitOnCtrlC:!1});await l()},async runUpload(t,e){let{renderUploadProgress:o}=await import("./CliUploadProgress-6NLS7XHH.js");return await o(t,e)},async onSummary(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-5ZN47FAT.js"),{AutoExitSummaryBox:i}=await import("./SummaryBox-IA2KS6GT.js"),{waitUntilExit:n}=o(e.createElement(i,{data:t}),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_SUMMARY_RENDER_FAILED","Summary box render failed",{error:String(e)})}},async onLinks(t){try{let{default:e}=await import("./react-QWOAB3TB.js"),{render:o}=await import("./build-5ZN47FAT.js"),{LinksBox:i}=await import("./LinksBox-DXP66H3H.js"),{waitUntilExit:n}=o(e.createElement(i,t),{stdout:a,stdin:s});await n()}catch(e){m("warn","TEST_MD_LINKS_RENDER_FAILED","LinksBox render failed",{error:String(e)})}},onLockState(t){p({type:"test_md_lock_state",...t})},onAdaptiveHeal(t){p({type:"test_md_adaptive_heal",...t})},onAgentEvent(t){p(t)}}}export{w as a};
@@ -1,2 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{c as h}from"./chunk-OJ33Q6DU.js";import{P as v,ta as O,xb as y,yb as G,zb as b}from"./chunk-UEE3RZN4.js";import{f as i,g as a,i as S}from"./chunk-KU3YHPWZ.js";import{m}from"./chunk-4I7YN6YY.js";var C=new Set([a.BELONGS_TO,a.SCOPED_TO]),N="re-pinned onto the use case's live version: its update changed nothing";function A(e,s){let n=e.tipOf(s);return e.superseded.has(n)?[]:b(e,n).filter(t=>t!==n).flatMap(t=>e.edgesInto(t).filter(r=>C.has(r.type)&&!e.superseded.has(r.src)))}function k(e,s){for(let n of e.edgesFrom(s)){if(S(n.type)?.pin?.comparesTo!=="dst_tip"||!e.superseded.has(n.dst))continue;let t=e.tipOf(n.dst);if(e.superseded.has(t)||e.nodeLabel.get(t)===i.USECASE&&!C.has(n.type))return!1}return!0}function U(e){let{store:s,graph:n,by:t}=e,r=A(n,e.ucTip);if(r.length===0)return{record:null,moved:0,errors:null};let c=n.tipOf(e.ucTip),l=r.flatMap(o=>[{kind:"retract",target:o.src,expectedCid:o.src,edgeEcid:o.ecid,reason:N,eventId:`repin:${o.ecid}`},{kind:"enhance",target:o.src,expectedCid:o.src,edges:[{type:o.type,src:o.src,dst:c,props:o.props}],eventId:`repin:${o.ecid}:live`}]),d=h({store:s,graph:n,ops:l,by:t,mintable:[],learn:!1,...e.sid?{sid:e.sid}:{}});return d.errors?{record:null,moved:0,errors:d.errors}:{record:d.record,moved:r.length,errors:null}}var L=new Set([i.USECASE,i.SCENARIO,i.AC,i.TEST]);function $(e,s){return!e.superseded.has(s)&&e.trust.get(s)!=="archived"}function f(e,s,n){let t=e.edgesFrom(s).find(r=>r.type===n);return t?e.tipOf(t.dst):null}function D(e,s,n){if(n===i.USECASE)return s;if(n===i.SCENARIO)return f(e,s,a.BELONGS_TO);if(n===i.AC){let t=f(e,s,a.SCOPED_TO);return t?e.nodeLabel.get(t)===i.USECASE?t:f(e,t,a.BELONGS_TO):null}if(n===i.TEST){let t=f(e,s,a.AUTOMATES);return t?f(e,t,a.BELONGS_TO):null}return null}function*x(e,s){for(let{cid:n,state:t}of e.staleList()){if(t==="superseded")continue;let r=e.nodeLabel.get(n);!r||!L.has(r)||!$(e,n)||D(e,n,r)===s&&(yield{cid:n,label:r})}}function T(e,s){for(let{cid:n}of x(e,s))if(y(e,n))return!0;return!1}function q(e,s){let n=new Set,t=!1,r=!0;for(let{cid:c,label:l}of x(e,s)){let d=G(e,c);if(l===i.USECASE)for(let o of d.sources)n.add(o);else d.sources.length>0&&([t,r]=[!0,!1]);d.pin&&([t,r]=[!0,r&&k(e,c)])}return{sources:[...n].sort(),design:t,repinnable:t&&r}}var z=e=>e.sources.length>0&&!e.design;function _(e,s){let n=null;for(let[t,r]of e.designOf)t!==s&&e.tipOf(t)!==s||(n==null||r.seq>n.seq)&&(n={...r,designed_at_cid:t});return n}function F(e,s){let n=_(e,s);if(n!=null)return n.designed_at_cid===s||!T(e,s)?"current":"stale"}function R(e,s){let n=O(e.superseded,c=>e.nodeLabel.get(c)),t=[s],r=s;for(;n.has(r);)r=n.get(r),t.unshift(r);return t}function Y(e,s,n){let t=v(e,s);if(!t.ok&&t.why==="unknown"){let u=[...e.names.keys()].filter(w=>w.startsWith("uc-")).sort().slice(0,6);return{ok:!1,code:2,message:`unknown use-case '${s}' \u2014 no live node by that logical id or cid${u.length?` (known: ${u.join(", ")})`:""}`}}if(!t.ok&&t.why==="removed")return{ok:!1,code:2,message:`use-case '${s}' was removed (tombstoned) \u2014 nothing to design`};if(!t.ok)return{ok:!1,code:2,message:`'${s}' is a ${t.label??"missing node"}, not a use-case \u2014 design runs per use-case`};let r=t.cid,c=e.resolve(s)?.cid,l=e.nameOf.get(r)??(c?e.nameOf.get(c):void 0)??e.displayNameOf(r)??r.slice(0,19);if(e.trust.get(r)==="archived"){let u=e.archivedReason.get(r);return{ok:!1,code:2,message:`use-case '${l}' is archived${u?` (${u})`:""} \u2014 design runs only over live use-cases`}}let d=_(e,r);if(d==null||n)return{ok:!0};let o=R(e,r),p=o.length;if(F(e,r)==="current")return{ok:!1,code:2,message:m().text("note.already_designed",{use_case:l,version:p}),wall:{kind:"already-designed",display:l,currentV:p}};let g=o.indexOf(d.designed_at_cid),E=g>=0?`v${g+1}`:"an earlier version";return{ok:!1,code:2,message:m().text("note.design_stale",{use_case:l,designed:E,current:p}),wall:{kind:"designed-stale",display:l,currentV:p,designedV:E}}}export{U as a,L as b,$ as c,D as d,T as e,q as f,z as g,_ as h,F as i,Y as j};