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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (634) hide show
  1. package/dist/ChatSurface-6NZGMNHL.js +2 -0
  2. package/dist/ChromeProfilePicker-M4WXOB5O.js +2 -0
  3. package/dist/CliFeedbackPrompt-6MJA7DF6.js +2 -0
  4. package/dist/CliUploadProgress-6NLS7XHH.js +2 -0
  5. package/dist/ConfigView-O4WKZ5PU.js +2 -0
  6. package/dist/EvidenceViewOffer-WIEWCZUP.js +2 -0
  7. package/dist/FolderPicker-AF7ZMV3M.js +2 -0
  8. package/dist/InfoBox-D7GGZJU4.js +2 -0
  9. package/dist/LinksBox-DXP66H3H.js +2 -0
  10. package/dist/ProfilesView-TWOY5PVC.js +2 -0
  11. package/dist/ProjectPicker-OBYHJJLU.js +2 -0
  12. package/dist/SaveSessionPrompt-7XSHS4NL.js +2 -0
  13. package/dist/ScrollbackTap-4SPXGFMU.js +2 -0
  14. package/dist/SingleShotApp-XQUDR36R.js +2 -0
  15. package/dist/SummaryBox-IA2KS6GT.js +2 -0
  16. package/dist/TestMdRunView-LS2QUFWR.js +2 -0
  17. package/dist/TestrunEvidenceTable-HNDVJDIF.js +2 -0
  18. package/dist/WhoamiView-SNL75TEF.js +2 -0
  19. package/dist/{agent-parse-2MLJOJTH.js → agent-parse-CAS45UKA.js} +1 -1
  20. package/dist/app-client-U2YYF65L.js +2 -0
  21. package/dist/app-download-UI4ABEIX.js +2 -0
  22. package/dist/assurance-job-FFSSS4XV.js +7 -0
  23. package/dist/auth-7Z54TMQQ.js +2 -0
  24. package/dist/{binary-LVHXED3O.js → binary-THPLXCOD.js} +1 -1
  25. package/dist/bind-4XWK3DG2.js +2 -0
  26. package/dist/bootstrap-6ACT4ALI.js +2 -0
  27. package/dist/bridge-T6QMYKED.js +2 -0
  28. package/dist/build-5ZN47FAT.js +2 -0
  29. package/dist/catalog-MYPS2BXY.js +2 -0
  30. package/dist/{changelog-N5AZHXOS.js → changelog-SU674BVE.js} +1 -1
  31. package/dist/chat-committer-ZCSRJEUB.js +2 -0
  32. package/dist/chat-controller-XINCDH6Z.js +2 -0
  33. package/dist/child-G2GCW73X.js +2 -0
  34. package/dist/chunk-22PIMG52.js +2 -0
  35. package/dist/chunk-2DYHAP4E.js +2 -0
  36. package/dist/chunk-2TVPA3LL.js +2 -0
  37. package/dist/{chunk-FMUV6UCX.js → chunk-2XW33VOK.js} +1 -1
  38. package/dist/chunk-33DWJV67.js +235 -0
  39. package/dist/chunk-34R7BNZ2.js +2 -0
  40. package/dist/chunk-35ECWCCK.js +2 -0
  41. package/dist/{chunk-OHOJSADN.js → chunk-36N3EHW5.js} +1 -1
  42. package/dist/chunk-3BSYOCSW.js +3 -0
  43. package/dist/chunk-3E4ZO73O.js +6 -0
  44. package/dist/chunk-3F5FMH76.js +2 -0
  45. package/dist/chunk-3G2LSTK5.js +2 -0
  46. package/dist/chunk-3GXN6VF6.js +2 -0
  47. package/dist/chunk-3JLEDSG5.js +4 -0
  48. package/dist/chunk-3OQW2GTA.js +2 -0
  49. package/dist/chunk-3QICDXY5.js +5 -0
  50. package/dist/chunk-3RJHXOZH.js +3 -0
  51. package/dist/{chunk-Q5RDCSYM.js → chunk-3YTCKCBG.js} +1 -1
  52. package/dist/chunk-42PALMW2.js +4 -0
  53. package/dist/chunk-44B6THYK.js +2 -0
  54. package/dist/chunk-457Y5TEC.js +19 -0
  55. package/dist/chunk-47WQBG5I.js +6 -0
  56. package/dist/chunk-4I7YN6YY.js +3 -0
  57. package/dist/chunk-4IEQNX7F.js +2 -0
  58. package/dist/chunk-4LTHDJ3D.js +2 -0
  59. package/dist/chunk-4QFTHUJA.js +34 -0
  60. package/dist/chunk-4QTH7VYE.js +2 -0
  61. package/dist/chunk-4YW767UV.js +47 -0
  62. package/dist/chunk-54XA5MZH.js +2 -0
  63. package/dist/chunk-5AKJPYUW.js +11 -0
  64. package/dist/{chunk-AKE2CTV6.js → chunk-5D7ENQTQ.js} +1 -1
  65. package/dist/chunk-63EKRZKI.js +2 -0
  66. package/dist/{chunk-EHN5HTUD.js → chunk-65VANXOF.js} +51 -51
  67. package/dist/{chunk-J3BGYSMD.js → chunk-6DZX5HLZ.js} +8 -8
  68. package/dist/{chunk-YBAVDT3G.js → chunk-6EB5VRAN.js} +1 -1
  69. package/dist/chunk-6NFOH4AC.js +4 -0
  70. package/dist/chunk-6PIIUAZF.js +3 -0
  71. package/dist/chunk-6UVIY56J.js +2 -0
  72. package/dist/chunk-72KYMWQ5.js +2 -0
  73. package/dist/chunk-72RC7JSA.js +21 -0
  74. package/dist/chunk-734ORT6O.js +4 -0
  75. package/dist/chunk-77ZZQJLX.js +2 -0
  76. package/dist/chunk-7AET4JKQ.js +2 -0
  77. package/dist/chunk-7DFBOVUB.js +2 -0
  78. package/dist/chunk-7HMSMAUG.js +29 -0
  79. package/dist/chunk-7HO4NX5W.js +1 -0
  80. package/dist/chunk-7KX2BHKG.js +2 -0
  81. package/dist/{chunk-ULGZPRKU.js → chunk-7NCJMWFX.js} +1 -1
  82. package/dist/chunk-7NPTL66J.js +2 -0
  83. package/dist/chunk-7RWP4Y3H.js +2 -0
  84. package/dist/{chunk-PCKIANML.js → chunk-7SY34IIL.js} +1 -1
  85. package/dist/chunk-7V4BQSSV.js +2 -0
  86. package/dist/chunk-7XBNMOH4.js +6 -0
  87. package/dist/{chunk-SOCHN2PY.js → chunk-7YT4TTKL.js} +1 -1
  88. package/dist/{chunk-C25M2J5Q.js → chunk-ACMBMZDQ.js} +1 -1
  89. package/dist/chunk-AEWNWAXW.js +18 -0
  90. package/dist/chunk-AQ2OG2EF.js +2 -0
  91. package/dist/chunk-AUJSC7PU.js +4 -0
  92. package/dist/chunk-AVI5H4UM.js +13 -0
  93. package/dist/chunk-AVSMXDTX.js +2 -0
  94. package/dist/chunk-AZLNLHUA.js +4 -0
  95. package/dist/{chunk-HGFWIBVF.js → chunk-B7ZX5HEN.js} +5 -5
  96. package/dist/{chunk-66MOZKD2.js → chunk-BSRSXYDZ.js} +1 -1
  97. package/dist/chunk-BWXLZS5O.js +2 -0
  98. package/dist/chunk-BY65QAAN.js +4 -0
  99. package/dist/chunk-C2RUDJ46.js +2 -0
  100. package/dist/chunk-C5Z7MQE6.js +2 -0
  101. package/dist/{chunk-WDMUPK6I.js → chunk-C62QWG4B.js} +1 -1
  102. package/dist/chunk-C6HI6Y3S.js +2 -0
  103. package/dist/chunk-CB4ARIHR.js +2 -0
  104. package/dist/{chunk-7WXMV3O3.js → chunk-CCP4X75B.js} +1 -1
  105. package/dist/chunk-CGITGJ3I.js +4 -0
  106. package/dist/chunk-CM4CHYSN.js +2 -0
  107. package/dist/{chunk-ZXY4P76I.js → chunk-CUXY6KQ2.js} +1 -1
  108. package/dist/chunk-D36V5OX6.js +2 -0
  109. package/dist/chunk-D756UWY2.js +6 -0
  110. package/dist/chunk-D7TKE7LK.js +2 -0
  111. package/dist/{chunk-UWXDURAB.js → chunk-D7U2M26S.js} +1 -1
  112. package/dist/chunk-DBMW3VUN.js +4 -0
  113. package/dist/chunk-DDZLCAEO.js +5 -0
  114. package/dist/chunk-DJC7NTLA.js +3 -0
  115. package/dist/chunk-DPGOAFKF.js +2 -0
  116. package/dist/chunk-DREQ3RAA.js +2 -0
  117. package/dist/chunk-DTUPEKEO.js +2 -0
  118. package/dist/chunk-DZOYYWOW.js +2 -0
  119. package/dist/chunk-E6KSRQXL.js +8 -0
  120. package/dist/chunk-EBPRPNSA.js +2 -0
  121. package/dist/chunk-ECPFI75W.js +5 -0
  122. package/dist/chunk-EECDDDSB.js +3 -0
  123. package/dist/chunk-EF47KRUK.js +2 -0
  124. package/dist/chunk-ETZMFRD6.js +2 -0
  125. package/dist/chunk-EZN7CF45.js +4 -0
  126. package/dist/{chunk-CNUCP6DK.js → chunk-F22K3RRX.js} +1 -1
  127. package/dist/{chunk-WRSIKZ2V.js → chunk-F5NHG7VB.js} +1 -1
  128. package/dist/{chunk-DHJSM5DT.js → chunk-FCD3NYOM.js} +1 -1
  129. package/dist/chunk-FIP5L6LV.js +9 -0
  130. package/dist/chunk-FOJHSG5M.js +6 -0
  131. package/dist/chunk-FSYOTRMC.js +2 -0
  132. package/dist/chunk-FWDUVFS6.js +26 -0
  133. package/dist/chunk-FWUPJORV.js +6 -0
  134. package/dist/chunk-GFLB2SHW.js +2 -0
  135. package/dist/chunk-GMTHZUZ3.js +2 -0
  136. package/dist/chunk-GQRU3B54.js +1397 -0
  137. package/dist/chunk-GRURFGBP.js +2 -0
  138. package/dist/chunk-GXKY5A46.js +9 -0
  139. package/dist/chunk-HAW5WEKT.js +13 -0
  140. package/dist/chunk-HCJ2N3XB.js +12 -0
  141. package/dist/chunk-HHW6MRU3.js +6 -0
  142. package/dist/chunk-HIUAUZNL.js +2 -0
  143. package/dist/chunk-HJLMH7ZM.js +2 -0
  144. package/dist/{chunk-YWYORBY3.js → chunk-HJMCXSUJ.js} +1 -1
  145. package/dist/chunk-HK62JVQM.js +3 -0
  146. package/dist/{chunk-5GUD3CIH.js → chunk-HQ2E2XCU.js} +1 -1
  147. package/dist/chunk-I2MC6VVX.js +2 -0
  148. package/dist/chunk-I4RVVBG3.js +10 -0
  149. package/dist/chunk-I4WXALQR.js +2 -0
  150. package/dist/chunk-ICLUC44J.js +2 -0
  151. package/dist/{chunk-6HU5M2DS.js → chunk-IGEAET7M.js} +1 -1
  152. package/dist/{chunk-GCISXCDU.js → chunk-IINZZ4BZ.js} +1 -1
  153. package/dist/chunk-IJ2AHSWW.js +2 -0
  154. package/dist/{chunk-CSNJPD2J.js → chunk-IUQOG7Z5.js} +3 -3
  155. package/dist/chunk-IZ65ZPWY.js +3 -0
  156. package/dist/chunk-JGRXMTME.js +15 -0
  157. package/dist/{chunk-NBXYL2JT.js → chunk-JIRNI5TB.js} +7 -7
  158. package/dist/chunk-JNSWKGTB.js +2 -0
  159. package/dist/chunk-JZP3Y4ZM.js +2 -0
  160. package/dist/chunk-KF4DKXSS.js +2 -0
  161. package/dist/chunk-KGNE5CIM.js +2 -0
  162. package/dist/chunk-KM3YCIDV.js +3 -0
  163. package/dist/{chunk-HAYV4D2I.js → chunk-KODJVOCN.js} +1 -1
  164. package/dist/chunk-KU3YHPWZ.js +2 -0
  165. package/dist/{chunk-M3UAZTDK.js → chunk-KXHJMAZU.js} +2 -2
  166. package/dist/chunk-L5DALV5N.js +2 -0
  167. package/dist/chunk-LAOTVZHV.js +6 -0
  168. package/dist/chunk-LCSJ7GOG.js +2 -0
  169. package/dist/{chunk-DWMESHFI.js → chunk-LIGTP3A3.js} +1 -1
  170. package/dist/chunk-LKQFG4RW.js +5 -0
  171. package/dist/{chunk-EBLXHOE3.js → chunk-LQQNPMOD.js} +1 -1
  172. package/dist/chunk-LSDJOVWW.js +6 -0
  173. package/dist/{chunk-C6S2RPZA.js → chunk-LUR7JFPP.js} +1 -1
  174. package/dist/chunk-LUZBGTYB.js +2 -0
  175. package/dist/chunk-LX2I4JEH.js +2 -0
  176. package/dist/{chunk-7GAHJZLH.js → chunk-M43WH5DQ.js} +1 -1
  177. package/dist/chunk-MEKPGQAM.js +21 -0
  178. package/dist/chunk-MNBGG4H3.js +16 -0
  179. package/dist/chunk-MYVKUJGS.js +2 -0
  180. package/dist/chunk-MYZHOBS4.js +2 -0
  181. package/dist/chunk-NC7D7GOM.js +21 -0
  182. package/dist/chunk-NIVFEACM.js +2 -0
  183. package/dist/chunk-NLZZLANH.js +4 -0
  184. package/dist/{chunk-XT7XA4DN.js → chunk-NXAJBSIF.js} +1 -1
  185. package/dist/chunk-NXRF7FFS.js +2 -0
  186. package/dist/chunk-NZ6AV2TA.js +4 -0
  187. package/dist/chunk-O3HHTKZ5.js +6 -0
  188. package/dist/chunk-OCDBTAYS.js +12 -0
  189. package/dist/chunk-OFSDB7B4.js +3 -0
  190. package/dist/{chunk-Q5CINJYL.js → chunk-OGFU4YY4.js} +1 -1
  191. package/dist/chunk-OJ33Q6DU.js +2 -0
  192. package/dist/chunk-P2ZQDQDB.js +2 -0
  193. package/dist/{chunk-KXEE6VCA.js → chunk-P3JXJ4BW.js} +1 -1
  194. package/dist/chunk-PAWQ4AKN.js +2 -0
  195. package/dist/chunk-PUVMC4PX.js +26 -0
  196. package/dist/{chunk-SEEEGDVK.js → chunk-PZA3BSOE.js} +1 -1
  197. package/dist/chunk-Q3C6NDGI.js +2 -0
  198. package/dist/chunk-QBYENBMB.js +2 -0
  199. package/dist/chunk-QDFY5GGO.js +5 -0
  200. package/dist/chunk-QDXKEOKI.js +16 -0
  201. package/dist/{chunk-6VY62QC2.js → chunk-QENCC2ZS.js} +1 -1
  202. package/dist/chunk-QI5RZ7LL.js +2 -0
  203. package/dist/chunk-QXQ7KVEN.js +2 -0
  204. package/dist/chunk-R4JUKTDO.js +2 -0
  205. package/dist/chunk-R7KXAISS.js +12 -0
  206. package/dist/chunk-RDP7GWSY.js +2 -0
  207. package/dist/chunk-REKHAN53.js +5 -0
  208. package/dist/chunk-RF37IJNN.js +2 -0
  209. package/dist/{chunk-KWEOLPBJ.js → chunk-RFEON5GN.js} +1 -1
  210. package/dist/chunk-RHGW7B5Q.js +2 -0
  211. package/dist/chunk-RPRXRKKR.js +2 -0
  212. package/dist/{chunk-EOA6YPES.js → chunk-RTVHJ23A.js} +4 -4
  213. package/dist/chunk-RTVWQK7I.js +2 -0
  214. package/dist/chunk-RX6776AI.js +5 -0
  215. package/dist/{chunk-F7NSSQYZ.js → chunk-SGPAM5DZ.js} +1 -1
  216. package/dist/chunk-SMTBOSEJ.js +2 -0
  217. package/dist/chunk-SMXABALN.js +2 -0
  218. package/dist/{chunk-TM7VRLWS.js → chunk-SXRHKXSE.js} +1 -1
  219. package/dist/chunk-TNORODUF.js +2 -0
  220. package/dist/chunk-TU42YZOJ.js +6 -0
  221. package/dist/chunk-TU7TVFBK.js +2 -0
  222. package/dist/chunk-TW5AA5A7.js +8 -0
  223. package/dist/chunk-UEE3RZN4.js +14 -0
  224. package/dist/chunk-URH4FX3H.js +2 -0
  225. package/dist/chunk-UTM7D4PI.js +2 -0
  226. package/dist/chunk-UUJIGOEO.js +2 -0
  227. package/dist/chunk-UYDHOHSZ.js +2 -0
  228. package/dist/{chunk-4BZOG6PE.js → chunk-V7USCQWO.js} +1 -1
  229. package/dist/chunk-VJGWVBZR.js +1 -0
  230. package/dist/chunk-VLDCHFXF.js +2 -0
  231. package/dist/chunk-VO66KP2W.js +2 -0
  232. package/dist/chunk-VRIZDOO5.js +2 -0
  233. package/dist/{chunk-DOOI2JBD.js → chunk-VSVWNRI2.js} +1 -1
  234. package/dist/chunk-VUFIL5VR.js +6 -0
  235. package/dist/chunk-VX657KIK.js +2 -0
  236. package/dist/chunk-VXGN3IV7.js +2 -0
  237. package/dist/chunk-VZ4A6WMK.js +97 -0
  238. package/dist/chunk-VZJ6LUXX.js +2 -0
  239. package/dist/{chunk-RWSOZPJQ.js → chunk-W4QSZNMB.js} +1 -1
  240. package/dist/chunk-W54OT2FU.js +9 -0
  241. package/dist/{chunk-BL3SJDCG.js → chunk-W6HZF56M.js} +1 -1
  242. package/dist/chunk-W72ACCFL.js +27 -0
  243. package/dist/chunk-W7FLXW6Q.js +5 -0
  244. package/dist/chunk-WAOUE7MP.js +9 -0
  245. package/dist/chunk-WEIPY3CI.js +16 -0
  246. package/dist/chunk-WMGKUERB.js +6 -0
  247. package/dist/{chunk-DFS4RMVP.js → chunk-WN5VKKJ3.js} +1 -1
  248. package/dist/chunk-WOSANGV6.js +5 -0
  249. package/dist/{chunk-K3IQEL7R.js → chunk-WXJCJL5L.js} +1 -1
  250. package/dist/chunk-WZXPF3BI.js +2 -0
  251. package/dist/chunk-XB6BJPDL.js +2 -0
  252. package/dist/{chunk-4FHK4LKQ.js → chunk-XLEGGC4Y.js} +1 -1
  253. package/dist/chunk-XMPTFXPW.js +5 -0
  254. package/dist/chunk-XQMWHPZI.js +3 -0
  255. package/dist/{chunk-75MMTNPB.js → chunk-XRNQSXOM.js} +2 -2
  256. package/dist/{chunk-2PKME4VT.js → chunk-XZGEN4NU.js} +4 -4
  257. package/dist/chunk-XZYA7DNH.js +2 -0
  258. package/dist/{chunk-OIUV3ISA.js → chunk-Y6Y6RAY4.js} +1 -1
  259. package/dist/chunk-Y7E5L42F.js +3 -0
  260. package/dist/{chunk-GFBAK7WQ.js → chunk-YAW6JW6D.js} +7 -7
  261. package/dist/chunk-YDPTSDIJ.js +2 -0
  262. package/dist/chunk-YDSGXB25.js +2 -0
  263. package/dist/chunk-YGRULEZY.js +2 -0
  264. package/dist/chunk-YHFZFV3A.js +22 -0
  265. package/dist/chunk-YIKF4ERQ.js +375 -0
  266. package/dist/chunk-YLXWAY7D.js +2 -0
  267. package/dist/{chunk-UA2QDAWT.js → chunk-YPFQ4UGF.js} +1 -1
  268. package/dist/{chunk-4CYBXJIA.js → chunk-YQ5C6UDG.js} +1 -1
  269. package/dist/chunk-Z55KBMYV.js +2 -0
  270. package/dist/chunk-ZAFJQ3SM.js +2 -0
  271. package/dist/chunk-ZCRZFAOT.js +2 -0
  272. package/dist/chunk-ZFM77AQU.js +2 -0
  273. package/dist/{chunk-Q6F23V7L.js → chunk-ZFMRQ57Y.js} +1 -1
  274. package/dist/chunk-ZHWU6L2G.js +5 -0
  275. package/dist/chunk-ZTHYAHDN.js +17 -0
  276. package/dist/{chunk-X2A6CC6B.js → chunk-ZTRRFG52.js} +1 -1
  277. package/dist/chunk-ZU4W2QGM.js +3 -0
  278. package/dist/committer-JGY66PFM.js +2 -0
  279. package/dist/config-754B73XK.js +2 -0
  280. package/dist/controller-client-PB3AZAGG.js +2 -0
  281. package/dist/cover-cmd-NBNZCR6C.js +2 -0
  282. package/dist/{credentials-QD32Y7K7.js → credentials-F7DYLVWY.js} +1 -1
  283. package/dist/{deps-bundle-OI7JJ22L.js → deps-bundle-PW3WEQJ7.js} +1 -1
  284. package/dist/{deps-resolve-ZOALDS6H.js → deps-resolve-SQYVN76L.js} +1 -1
  285. package/dist/descriptor-7T32VRMB.js +2 -0
  286. package/dist/design-chat-F3OEZPNJ.js +2 -0
  287. package/dist/design-committer-TRYP3LOZ.js +2 -0
  288. package/dist/design-headless-OTHYOX3E.js +2 -0
  289. package/dist/design-remote-2BEGCVCX.js +3 -0
  290. package/dist/device-env-CHFRRV6W.js +2 -0
  291. package/dist/dispatch-DVQ3H7EJ.js +2 -0
  292. package/dist/doctor-XY26Z35T.js +2 -0
  293. package/dist/docx-convert-6IZO5P5K.js +2 -0
  294. package/dist/{dossier-7HVC6BNK.js → dossier-NROC2MCY.js} +1 -1
  295. package/dist/evidence-P6FFKC7B.js +2 -0
  296. package/dist/evidence-presentation-YYTIDCBS.js +2 -0
  297. package/dist/evolve-cmd-WWOB3QJR.js +2 -0
  298. package/dist/evolve-remote-WLVY3QID.js +2 -0
  299. package/dist/{exit-manager-ZLDO54S4.js → exit-manager-EDHCETUN.js} +1 -1
  300. package/dist/explain-DGJ5T6V5.js +2 -0
  301. package/dist/explain-cmd-OP5I5W3O.js +12 -0
  302. package/dist/explain-cmd-VYAANFFZ.js +4 -0
  303. package/dist/explore-K5YBGHK6.js +2 -0
  304. package/dist/explore-context-tty-RZ7D2TBV.js +2 -0
  305. package/dist/explore-entry-EKXJ67BD.js +6 -0
  306. package/dist/explore-live-2YVRAQZO.js +5 -0
  307. package/dist/explore-run-tty-D47FGPX7.js +5 -0
  308. package/dist/extract-bind-W2NET364.js +14 -0
  309. package/dist/extract-chat-M65NWGUK.js +2 -0
  310. package/dist/extract-cmd-FTFLETOP.js +6 -0
  311. package/dist/extract-headless-G6W6JQ27.js +2 -0
  312. package/dist/feeder-NY45UFJK.js +2 -0
  313. package/dist/folder-flags-KKIH654K.js +2 -0
  314. package/dist/gaps-cmd-OIDDLRYL.js +3 -0
  315. package/dist/gate-7AKRPRMK.js +2 -0
  316. package/dist/gate-WISOUTHQ.js +2 -0
  317. package/dist/{generate-headless-6WMJYNI6.js → generate-headless-RURIEKVS.js} +3 -3
  318. package/dist/headless-io-FFM5T6KL.js +2 -0
  319. package/dist/hold-passthrough-IOWPVB4W.js +2 -0
  320. package/dist/identity-HL5CJJXR.js +2 -0
  321. package/dist/index.js +178 -160
  322. package/dist/ingest-PDGS5ZTL.js +2 -0
  323. package/dist/ingest-cmd-4G2AK4Y2.js +8 -0
  324. package/dist/ingest-remote-SSLUHQVG.js +2 -0
  325. package/dist/ink-screen-RZ7QDIUI.js +2 -0
  326. package/dist/install-ZVBHPXGP.js +2 -0
  327. package/dist/interactive-bind-SI2ZS55Q.js +26 -0
  328. package/dist/interactive-remote-J56EWJGA.js +65 -0
  329. package/dist/interrupt-guard-QETBPINI.js +2 -0
  330. package/dist/lane-AQYRIW24.js +2 -0
  331. package/dist/lattice-auth-6FEVSR7E.js +2 -0
  332. package/dist/lifecycle-cmd-HJ37LTXE.js +2 -0
  333. package/dist/list-cmd-6XL2FYLQ.js +3 -0
  334. package/dist/list-commands-5DCCKU3L.js +2 -0
  335. package/dist/list-remote-LXPQNXYN.js +15 -0
  336. package/dist/locks-cmd-JJ2QNTNY.js +2 -0
  337. package/dist/logical-ids-RXAQJZ3T.js +2 -0
  338. package/dist/login-flow-WEK3E476.js +2 -0
  339. package/dist/maintenance-cmd-BXXHP36K.js +2 -0
  340. package/dist/mobile-prompts-CECJ5UY2.js +2 -0
  341. package/dist/{next-KZXH4UA4.js → next-O6SUSX3R.js} +1 -1
  342. package/dist/{objective-variable-gate-CG2KK5UX.js → objective-variable-gate-3Z7DNVVC.js} +1 -1
  343. package/dist/onboarding-PDVYMTY5.js +5 -0
  344. package/dist/open-provider-OZAG6WZS.js +2 -0
  345. package/dist/{paths-JCYX6UWL.js → paths-UMIX3RJF.js} +1 -1
  346. package/dist/pdf-convert-447ACUB3.js +2 -0
  347. package/dist/persist-recorded-session-A3ID7JFA.js +3 -0
  348. package/dist/phase-seed-LCJ4WSYV.js +2 -0
  349. package/dist/pipeline-GX3LKPI5.js +2 -0
  350. package/dist/prepare-target-FMT6QFHZ.js +2 -0
  351. package/dist/pull-cmd-UPFQYUND.js +2 -0
  352. package/dist/pull-route-FWBXJMR7.js +2 -0
  353. package/dist/readmodel-INMP6MNW.js +2 -0
  354. package/dist/real-device-run-X7JJWOIK.js +2 -0
  355. package/dist/reconcile-cmd-JBH365JL.js +5 -0
  356. package/dist/reconcile-deps-TWJ3FTSU.js +2 -0
  357. package/dist/reconcile-remote-BCX6SWFC.js +13 -0
  358. package/dist/recording-banner-YKBAL6UB.js +2 -0
  359. package/dist/registry-VQC757MJ.js +2 -0
  360. package/dist/remote-entry-X6JMPC2K.js +2 -0
  361. package/dist/remote-mode-FDPA7EWG.js +4 -0
  362. package/dist/remote-words-YVB66R3F.js +2 -0
  363. package/dist/require-project-folder-MLMEQJYP.js +2 -0
  364. package/dist/resolve-run-intent-PC7TQZUL.js +2 -0
  365. package/dist/resolver-EID34LQE.js +2 -0
  366. package/dist/revert-FHOBLZWF.js +2 -0
  367. package/dist/review-cmd-EUHFLFMY.js +5 -0
  368. package/dist/run-5RQUCNYP.js +2 -0
  369. package/dist/run-PC5YO4AS.js +2 -0
  370. package/dist/run-channel-63SVP5OI.js +2 -0
  371. package/dist/run-remote-SJCRTL7O.js +2 -0
  372. package/dist/run-startup-gate-YO66G6LS.js +2 -0
  373. package/dist/run-test-md-BLNBK4MH.js +17 -0
  374. package/dist/scrollback-GGNBDFQV.js +2 -0
  375. package/dist/session-target-DD53UXO7.js +2 -0
  376. package/dist/session-worker.js +12 -0
  377. package/dist/sessions-CFV7FOIT.js +2 -0
  378. package/dist/sessions-cmd-S7WZBUCN.js +26 -0
  379. package/dist/sessions-remote-IWHWIQ2T.js +3 -0
  380. package/dist/shell-arg-FN3MT5U7.js +2 -0
  381. package/dist/{skill-installer-32YYMM4N.js → skill-installer-MAVQY6GW.js} +1 -1
  382. package/dist/spawner-C7NLLM4F.js +2 -0
  383. package/dist/store-MSA7KASS.js +2 -0
  384. package/dist/store-choice-3OJCV26J.js +2 -0
  385. package/dist/store-guard-OOSDLMEC.js +2 -0
  386. package/dist/store-id-YZ5WKJ25.js +2 -0
  387. package/dist/store-site-KA2DNBGY.js +2 -0
  388. package/dist/stream-warnings-GEQKKJU7.js +2 -0
  389. package/dist/structured-answers-EQ2AP3F7.js +2 -0
  390. package/dist/sync-cmd-RDFDMVKQ.js +2 -0
  391. package/dist/sync-setup-RBRDUV7Q.js +2 -0
  392. package/dist/{sync-setup-ui-RC727VK6.js → sync-setup-ui-XITPGSO4.js} +2 -2
  393. package/dist/tcg-generate-KIECTZ2C.js +2 -0
  394. package/dist/test-definition-VRI4YIYL.js +2 -0
  395. package/dist/testmd-actions-CMAG6HWI.js +2 -0
  396. package/dist/testmd-sync-UPAA5UMD.js +2 -0
  397. package/dist/tms-client-NXAB6VJD.js +2 -0
  398. package/dist/token-refresh-KP3AYMYK.js +2 -0
  399. package/dist/trust-gate-AT2XBWN4.js +2 -0
  400. package/dist/turn-preflight-LHYLRL7G.js +2 -0
  401. package/dist/ui-SNV3FD2G.js +4 -0
  402. package/dist/use-case-ref-NE4X4MZN.js +2 -0
  403. package/dist/validate-basic-M5JHHNZA.js +2 -0
  404. package/dist/{variable-receipt-YWNS24TH.js → variable-receipt-BXSZO36E.js} +1 -1
  405. package/dist/verdicts-XK3GAUX3.js +2 -0
  406. package/dist/version-check-Q737BE65.js +2 -0
  407. package/dist/{view-cmd-3WHG6MVB.js → view-cmd-XSNL5DGI.js} +4 -3
  408. package/dist/walk-session-SHGYLFRB.js +2 -0
  409. package/dist/with-telemetry-PM2HVN2B.js +2 -0
  410. package/package.json +11 -11
  411. package/dist/ChatSurface-FJPK3XEJ.js +0 -8
  412. package/dist/ChromeProfilePicker-7DUDJTE2.js +0 -2
  413. package/dist/CliFeedbackPrompt-ZZPYC6OS.js +0 -2
  414. package/dist/CliUploadProgress-WQYKIBAR.js +0 -2
  415. package/dist/ConfigView-KXNOODDW.js +0 -2
  416. package/dist/EvidenceViewOffer-BTBVPBZX.js +0 -2
  417. package/dist/FolderPicker-H4YEX5LV.js +0 -2
  418. package/dist/InfoBox-DTM7X24Z.js +0 -2
  419. package/dist/LinksBox-KFG3FVOT.js +0 -2
  420. package/dist/ProfilesView-KBZHT4KL.js +0 -2
  421. package/dist/ProjectPicker-OARWULNN.js +0 -2
  422. package/dist/SaveSessionPrompt-37SMU5MC.js +0 -2
  423. package/dist/ScrollbackTap-QHJOFYMC.js +0 -2
  424. package/dist/SingleShotApp-UYCAW65Y.js +0 -2
  425. package/dist/SummaryBox-6RB5DSAH.js +0 -2
  426. package/dist/TestMdRunView-ZMOII3PL.js +0 -2
  427. package/dist/TestrunEvidenceTable-3UP2EYIV.js +0 -2
  428. package/dist/WhoamiView-MC62GERR.js +0 -2
  429. package/dist/app-client-PQFJAB63.js +0 -2
  430. package/dist/app-download-P6YXWSVQ.js +0 -2
  431. package/dist/auth-LXW4OFKF.js +0 -2
  432. package/dist/bind-ZYESQSCJ.js +0 -15
  433. package/dist/bootstrap-DI4UGMH3.js +0 -2
  434. package/dist/bridge-7J3JE3JS.js +0 -2
  435. package/dist/build-JIKYOZUH.js +0 -2
  436. package/dist/catalog-LLME3744.js +0 -2
  437. package/dist/chat-committer-6D7AQI6Z.js +0 -2
  438. package/dist/chat-controller-UJQ6Z4RE.js +0 -2
  439. package/dist/chunk-243ZJHT6.js +0 -4
  440. package/dist/chunk-2KVECC36.js +0 -2
  441. package/dist/chunk-2YEHV2CX.js +0 -2
  442. package/dist/chunk-3MCPTVJX.js +0 -2
  443. package/dist/chunk-3UI5VTQS.js +0 -4
  444. package/dist/chunk-3VAU3PNU.js +0 -2
  445. package/dist/chunk-3YIZG7WZ.js +0 -3
  446. package/dist/chunk-4Y2WH77W.js +0 -2
  447. package/dist/chunk-5EOX4MEY.js +0 -2
  448. package/dist/chunk-5HMN74RZ.js +0 -9
  449. package/dist/chunk-5LJRZI7S.js +0 -6
  450. package/dist/chunk-5RCS2LIQ.js +0 -26
  451. package/dist/chunk-5TQFOPJV.js +0 -2
  452. package/dist/chunk-5ZFOKYFB.js +0 -5
  453. package/dist/chunk-63DYVWNX.js +0 -2
  454. package/dist/chunk-6MD7SR7D.js +0 -9
  455. package/dist/chunk-7N6OCHPC.js +0 -7
  456. package/dist/chunk-A2SQD2AY.js +0 -4
  457. package/dist/chunk-AACQE24F.js +0 -2
  458. package/dist/chunk-AHFIRHSP.js +0 -18
  459. package/dist/chunk-AJT34ESA.js +0 -38
  460. package/dist/chunk-AUMJ4RVA.js +0 -21
  461. package/dist/chunk-AXTPNZPX.js +0 -2
  462. package/dist/chunk-BB2W35TW.js +0 -2
  463. package/dist/chunk-BKM2LWU2.js +0 -3
  464. package/dist/chunk-BUPRL2TE.js +0 -2
  465. package/dist/chunk-C44QQJR4.js +0 -239
  466. package/dist/chunk-CW3RHKLA.js +0 -5
  467. package/dist/chunk-D6E6KRVX.js +0 -2
  468. package/dist/chunk-DTRKTBCE.js +0 -17
  469. package/dist/chunk-DTRSYWZE.js +0 -2
  470. package/dist/chunk-EVFFDODK.js +0 -5
  471. package/dist/chunk-F2OBORCG.js +0 -2
  472. package/dist/chunk-FQNQVC5O.js +0 -5
  473. package/dist/chunk-FY7TCYPK.js +0 -6
  474. package/dist/chunk-GTVQYT3D.js +0 -35
  475. package/dist/chunk-HG5LLZBU.js +0 -2
  476. package/dist/chunk-I7TIGB7K.js +0 -2
  477. package/dist/chunk-IICT4VOU.js +0 -2
  478. package/dist/chunk-ILDHE4P4.js +0 -6
  479. package/dist/chunk-IPXKUYUK.js +0 -2
  480. package/dist/chunk-JQY5HRZ4.js +0 -15
  481. package/dist/chunk-JX6BFEDO.js +0 -4
  482. package/dist/chunk-K2UJYY2U.js +0 -2
  483. package/dist/chunk-KBM3XHAM.js +0 -2
  484. package/dist/chunk-KDNNMU7Q.js +0 -4
  485. package/dist/chunk-KJQNAOOE.js +0 -6
  486. package/dist/chunk-LH4IPANP.js +0 -2
  487. package/dist/chunk-LLG7NEGX.js +0 -6
  488. package/dist/chunk-LSDWPG6C.js +0 -2
  489. package/dist/chunk-MSGW4JDG.js +0 -2
  490. package/dist/chunk-NJ4BXZBX.js +0 -2
  491. package/dist/chunk-NLCCBXXV.js +0 -2
  492. package/dist/chunk-NMSZ7G6P.js +0 -2
  493. package/dist/chunk-OC6H6BYI.js +0 -6
  494. package/dist/chunk-OJAXOOZ5.js +0 -8
  495. package/dist/chunk-OMNLAGQC.js +0 -29
  496. package/dist/chunk-OOCCUUR2.js +0 -2
  497. package/dist/chunk-OXC6O5O7.js +0 -2
  498. package/dist/chunk-OZQDD2EX.js +0 -94
  499. package/dist/chunk-PEDINHVU.js +0 -2
  500. package/dist/chunk-PNUAP3RY.js +0 -8
  501. package/dist/chunk-Q2F5QB2W.js +0 -2
  502. package/dist/chunk-Q4YYAN6E.js +0 -2
  503. package/dist/chunk-Q6AHSGOE.js +0 -5
  504. package/dist/chunk-QAB3Y5FQ.js +0 -4
  505. package/dist/chunk-RDHWNSDP.js +0 -7
  506. package/dist/chunk-RKXHVP2Z.js +0 -2
  507. package/dist/chunk-RRY5IXOB.js +0 -2
  508. package/dist/chunk-RSSOJ3L2.js +0 -21
  509. package/dist/chunk-RTSBKCZY.js +0 -16
  510. package/dist/chunk-SID4X77D.js +0 -370
  511. package/dist/chunk-SRTKRHYI.js +0 -12
  512. package/dist/chunk-T2ONUKTL.js +0 -5
  513. package/dist/chunk-U6OTFMIT.js +0 -4
  514. package/dist/chunk-UD7KKHPW.js +0 -5
  515. package/dist/chunk-USOYXCZ4.js +0 -2
  516. package/dist/chunk-USY7VAO6.js +0 -2
  517. package/dist/chunk-V4B5QA3U.js +0 -4
  518. package/dist/chunk-VBS33P2C.js +0 -2
  519. package/dist/chunk-VHW7BMZQ.js +0 -2
  520. package/dist/chunk-VIO7CCFW.js +0 -5
  521. package/dist/chunk-VORWZLS3.js +0 -9
  522. package/dist/chunk-VVOKM2VO.js +0 -2
  523. package/dist/chunk-W5TTF7GB.js +0 -6
  524. package/dist/chunk-WESMQEPO.js +0 -2
  525. package/dist/chunk-WMI4P76K.js +0 -27
  526. package/dist/chunk-WNOC6MQC.js +0 -2
  527. package/dist/chunk-WVHMPIDQ.js +0 -2
  528. package/dist/chunk-XBX643ZD.js +0 -2
  529. package/dist/chunk-XKHWWKJZ.js +0 -3
  530. package/dist/chunk-XLSOQLVT.js +0 -2
  531. package/dist/chunk-Y3ZYN6AK.js +0 -4
  532. package/dist/chunk-YCCUBQY4.js +0 -2
  533. package/dist/chunk-YKTYVJBN.js +0 -3
  534. package/dist/chunk-YLQHY4A7.js +0 -2
  535. package/dist/chunk-Z7IGTVJW.js +0 -2
  536. package/dist/chunk-ZC2CKWLB.js +0 -2
  537. package/dist/chunk-ZER3FZSZ.js +0 -22
  538. package/dist/chunk-ZJYT72BA.js +0 -9
  539. package/dist/chunk-ZKSN2SJ7.js +0 -2
  540. package/dist/chunk-ZLWURCJ7.js +0 -2
  541. package/dist/committer-2QPBANRD.js +0 -2
  542. package/dist/config-YGTHSGQN.js +0 -2
  543. package/dist/controller-client-ZF5IXRUV.js +0 -2
  544. package/dist/cover-cmd-6RO366CC.js +0 -3
  545. package/dist/descriptor-3JJUOHBM.js +0 -2
  546. package/dist/design-committer-D44GSUXY.js +0 -2
  547. package/dist/device-env-DXDJJMTL.js +0 -2
  548. package/dist/dispatch-7EWWQRQ5.js +0 -2
  549. package/dist/doctor-TPYPEEUL.js +0 -2
  550. package/dist/docx-convert-SQRTF7XS.js +0 -2
  551. package/dist/evidence-NPFTBGDF.js +0 -2
  552. package/dist/evidence-presentation-XF23B7F2.js +0 -2
  553. package/dist/evolve-cmd-VGVXV6XW.js +0 -2
  554. package/dist/explain-NEFBUX5G.js +0 -2
  555. package/dist/explain-cmd-GOP5TE63.js +0 -9
  556. package/dist/explain-cmd-M7IX2YNB.js +0 -3
  557. package/dist/extract-bind-CKIRLXAJ.js +0 -14
  558. package/dist/extract-cmd-3EWLSPGS.js +0 -5
  559. package/dist/feeder-66TUPB2R.js +0 -2
  560. package/dist/gaps-cmd-WVC5GXQC.js +0 -3
  561. package/dist/gate-OYRDJMF6.js +0 -2
  562. package/dist/headless-io-75HUMWZB.js +0 -2
  563. package/dist/identity-ADZ4PAJF.js +0 -2
  564. package/dist/ingest-OSNNM3DH.js +0 -2
  565. package/dist/ingest-cmd-AECK5T4H.js +0 -2
  566. package/dist/install-ZV3KJZV4.js +0 -2
  567. package/dist/interactive-bind-IYS6KDOH.js +0 -26
  568. package/dist/interrupt-guard-UREUWNRL.js +0 -2
  569. package/dist/lifecycle-cmd-XCSBELFQ.js +0 -2
  570. package/dist/list-cmd-S4DSN2ET.js +0 -3
  571. package/dist/list-commands-GLNGHPDU.js +0 -2
  572. package/dist/locks-cmd-67OHQZNV.js +0 -2
  573. package/dist/logical-ids-GLVM2SVR.js +0 -2
  574. package/dist/login-flow-ASUUU7SO.js +0 -2
  575. package/dist/maintenance-cmd-K5KXRIFL.js +0 -2
  576. package/dist/mobile-prompts-ZUZTA3RV.js +0 -2
  577. package/dist/open-provider-YIBB77FE.js +0 -2
  578. package/dist/pdf-convert-RLXSXFWN.js +0 -2
  579. package/dist/persist-recorded-session-EWV56TSZ.js +0 -3
  580. package/dist/phase-seed-MKHEWUN6.js +0 -2
  581. package/dist/pipeline-LAWACB2O.js +0 -2
  582. package/dist/prepare-target-WGPCZKLE.js +0 -2
  583. package/dist/readmodel-FVLRQWZ7.js +0 -2
  584. package/dist/real-device-run-MDLFKFVQ.js +0 -2
  585. package/dist/reconcile-cmd-XFM2ZXUJ.js +0 -2
  586. package/dist/reconcile-deps-V5VLDPYT.js +0 -4
  587. package/dist/reconcile-engine-VZBTMPUK.js +0 -2
  588. package/dist/recording-banner-CJHRPHHF.js +0 -2
  589. package/dist/records-LMCVKPE5.js +0 -2
  590. package/dist/registry-3JXQFZEG.js +0 -2
  591. package/dist/require-project-folder-SE5GVCYJ.js +0 -2
  592. package/dist/resolve-run-intent-DD4MB6UD.js +0 -2
  593. package/dist/resolver-TLO4SRWV.js +0 -2
  594. package/dist/revert-NOUECRW4.js +0 -2
  595. package/dist/review-cmd-7EOYQMPE.js +0 -5
  596. package/dist/run-EHUNJPW6.js +0 -2
  597. package/dist/run-OTMPUQSH.js +0 -2
  598. package/dist/run-channel-RGH4WIQX.js +0 -2
  599. package/dist/run-test-md-KBDEHGXJ.js +0 -17
  600. package/dist/scrollback-JLPJR25X.js +0 -2
  601. package/dist/session-items-2ATN7VXG.js +0 -2
  602. package/dist/session-target-UMNASXI7.js +0 -2
  603. package/dist/sessions-NH7WQWMX.js +0 -2
  604. package/dist/sessions-cmd-M3SECFKQ.js +0 -25
  605. package/dist/spawner-DPT2RLAO.js +0 -2
  606. package/dist/store-guard-U32JE6JJ.js +0 -2
  607. package/dist/store-id-EOSGEKVK.js +0 -2
  608. package/dist/structured-answers-ZI2B6JJE.js +0 -2
  609. package/dist/sync-cmd-3EP7LZGL.js +0 -2
  610. package/dist/sync-setup-SWTBVQEV.js +0 -2
  611. package/dist/tcg-generate-KXU7E2GF.js +0 -2
  612. package/dist/testmd-actions-PEWCPQ5R.js +0 -2
  613. package/dist/testmd-sync-ZWFQWZ2X.js +0 -2
  614. package/dist/tms-client-KU6HCA23.js +0 -2
  615. package/dist/token-refresh-QD3OCGJJ.js +0 -2
  616. package/dist/trust-gate-EX7R2P4Y.js +0 -2
  617. package/dist/turn-preflight-JGYT7LXP.js +0 -2
  618. package/dist/ui-JEJGTURD.js +0 -4
  619. package/dist/validate-basic-AAIXSAWH.js +0 -2
  620. package/dist/verdicts-LAB5BGCC.js +0 -2
  621. package/dist/version-check-EHOLX3YH.js +0 -2
  622. package/dist/walk-session-XP4KYFKO.js +0 -2
  623. package/dist/with-telemetry-FJMJQDCM.js +0 -2
  624. /package/dist/{chunk-BKHXPBWN.js → chunk-2RUSXQ3O.js} +0 -0
  625. /package/dist/{chunk-6J5T5FEY.js → chunk-3AGP2BVN.js} +0 -0
  626. /package/dist/{chunk-CH273NAE.js → chunk-73Y6T2UK.js} +0 -0
  627. /package/dist/{chunk-ZMNJBUAO.js → chunk-73ZFOJOK.js} +0 -0
  628. /package/dist/{chunk-NOL7MNZH.js → chunk-A7RJQJNT.js} +0 -0
  629. /package/dist/{chunk-N2P4MI32.js → chunk-FWGUISUG.js} +0 -0
  630. /package/dist/{chunk-UJZZDPDY.js → chunk-HD6NR44L.js} +0 -0
  631. /package/dist/{chunk-LDPLJFCV.js → chunk-I6S6DZ2E.js} +0 -0
  632. /package/dist/{chunk-427OQS2N.js → chunk-LD5B3QFW.js} +0 -0
  633. /package/dist/{chunk-2UIHS2FH.js → chunk-PGESS7BW.js} +0 -0
  634. /package/dist/{chunk-BZAGVBCX.js → chunk-ZCIWQHCO.js} +0 -0
@@ -0,0 +1,47 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{c as Ut}from"./chunk-VX657KIK.js";import{a as lt,b as ut}from"./chunk-LAOTVZHV.js";import{b as xt,c as bt,d as yt,e as vt,f as _t}from"./chunk-WEIPY3CI.js";import{a as wt,b as kt,c as Rt,d as Et,e as St}from"./chunk-GQRU3B54.js";import{c as q,d as Ie,f as It,g as Lt,k as At,l as ce,m as pe,q as J,v as Ot}from"./chunk-OCDBTAYS.js";import{b as Ee,d as se}from"./chunk-ZUZ6QJRA.js";import{b as Se,c as ct,d as pt,e as dt,f as ie,g as ae,h as mt,i as ft,j as gt,k as ht,m as h,n as X,o as $t,p as je,q as Te,r as Ce,s as Pe}from"./chunk-WAOUE7MP.js";import{a as le,b as S}from"./chunk-KGNE5CIM.js";import{e as W,l as ue,n as Le,q as jt,r as Tt,s as Ct,t as Pt}from"./chunk-HK62JVQM.js";import{a as st,b as it}from"./chunk-Y7E5L42F.js";import{d as Re,f as H}from"./chunk-3E4ZO73O.js";import{a as nt}from"./chunk-2DYHAP4E.js";import{l as at}from"./chunk-HCJ2N3XB.js";import{a as ot}from"./chunk-UTM7D4PI.js";import{a as Ze,b as ke,d as et}from"./chunk-WXJCJL5L.js";import{a as tt}from"./chunk-DREQ3RAA.js";import{b as Ye}from"./chunk-CGITGJ3I.js";import{e as ze}from"./chunk-FWUPJORV.js";import{d as Qe}from"./chunk-C6HI6Y3S.js";import{a as qe}from"./chunk-FCD3NYOM.js";import{a as rt}from"./chunk-XZYA7DNH.js";import{n as Xe,o as Je}from"./chunk-NC7D7GOM.js";import{a as oe}from"./chunk-C2RUDJ46.js";import{a as K}from"./chunk-4QTH7VYE.js";import{a as F}from"./chunk-RZ4F3BHX.js";import{a as ne}from"./chunk-HJMCXSUJ.js";import{a as We}from"./chunk-FOJHSG5M.js";import{a as M,b as re,y as Ke}from"./chunk-D36V5OX6.js";import{join as Ne}from"path";import{appendFileSync as or,mkdirSync as sr}from"fs";import{dirname as ir}from"path";function Nt(e,t,n){if(t)try{sr(ir(t),{recursive:!0})}catch{}let r="",o=c=>{if(!(!t||!c))try{or(t,n(c))}catch{}};e.child.stderr?.on("data",c=>{r+=c.toString();let g=r.lastIndexOf(`
3
+ `);g<0||(o(r.slice(0,g+1)),r=r.slice(g+1))}),e.child.stderr?.on("end",()=>{o(r),r=""});let i=e.getStderr.bind(e);return Object.assign(e,{getStderr:()=>n(i())})}var ar={seeding:"seeding",replay:"replaying",walking:"walking",settling:"settling",verifying:"verifying"},lr=8,ur=6,k=e=>typeof e=="string"&&e?e:null,V=e=>typeof e=="number"&&Number.isFinite(e)?e:null,de=class{s={run_id:null,exploration_id:null,status:"running",stop_reason:null,progress:null,browsers:[],version:0,updated_at:0};subs=new Set;now;constructor(t={}){this.now=t.now??Date.now}snapshot(){return structuredClone(this.s)}subscribe(t){return this.subs.add(t),()=>{this.subs.delete(t)}}end(t){this.s.status!=="ended"&&(this.s.status="ended",this.s.stop_reason=t,this.s.browsers=[],this.changed())}apply(t){this.reduce(t)&&this.changed()}changed(){if(this.s.version+=1,this.s.updated_at=this.now(),!this.subs.size)return;let t=this.snapshot();for(let n of this.subs)try{n(t)}catch{}}browser(t,n){let r=this.s.browsers.find(o=>o.worker===t)??null;return!r&&n&&(r={worker:t,state:"opening",since:this.now(),lease:null,step:null,steps:[],trail:[],held:null},this.s.browsers.push(r),this.s.browsers.sort((o,i)=>o.worker-i.worker)),r}setState(t,n){t.state!==n&&(t.state=n,t.since=this.now())}reduce(t){let n=V(t.worker_index);switch(t.type){case"explore_start":return this.s.run_id=k(t.run_id),this.s.exploration_id=k(t.exploration_id),this.s.status="running",!0;case"browser_request":return n===null?!1:(this.browser(n,!0),!0);case"browser_release":{if(n===null)return!1;let r=this.s.browsers.length;return this.s.browsers=this.s.browsers.filter(o=>o.worker!==n),this.s.browsers.length!==r}case"lease_start":{if(n===null||!k(t.lease_id))return!1;let r=this.browser(n,!0),o=t.reach&&typeof t.reach=="object"&&!Array.isArray(t.reach)?t.reach:null;return r.lease={id:String(t.lease_id),kind:String(t.kind??""),target:k(t.target),reach:o,started_at:this.now()},r.step=null,r.steps=[],this.setState(r,"starting"),!0}case"lease_step":{if(n===null)return!1;let r=this.browser(n,!1);if(!r||!r.lease||r.lease.id!==t.lease_id)return!1;let o={ordinal:V(t.ordinal)??r.steps.length,phase:String(t.phase??""),intent:k(t.intent),junction_id:k(t.junction_id),known:t.known===!0,url_pattern:k(t.url_pattern),flow_id:k(t.flow_id),navigated:t.navigated===!0,at:this.now()};return r.step=o,r.steps=[...r.steps,o].slice(-lr),o.junction_id&&r.trail[r.trail.length-1]!==o.junction_id&&(r.trail=[...r.trail,o.junction_id].slice(-ur)),this.setState(r,ar[o.phase]??"walking"),!0}case"lease_end":{let r=this.s.browsers.find(o=>o.lease?.id===t.lease_id);return r?(r.lease=null,r.step=null,r.steps=[],this.setState(r,r.held?"holding":"idle"),!0):!1}case"session_held":{if(n===null)return!1;let r=this.browser(n,!0);return r.held={kind:String(t.kind??""),start_flow:k(t.start_flow),junction_id:k(t.junction_id),url_pattern:k(t.url_pattern)},r.lease||this.setState(r,"holding"),!0}case"session_released":{if(n===null)return!1;let r=this.browser(n,!1);return!r||!r.held?!1:(r.held=null,r.lease||this.setState(r,"idle"),!0)}case"progress":return this.s.progress={frontier:V(t.frontier)??0,visited:V(t.visited)??0,active_workers:V(t.active_workers)??0,elapsed_s:V(t.elapsed_s)??0},!0;case"explore_control":return t.control!=="stop"||this.s.status!=="running"?!1:(this.s.status="paused",!0);case"explore_end":return this.s.status="ended",this.s.stop_reason=k(t.stop_reason),this.s.browsers=[],!0;default:return!1}}};var me=class{link=null;wanted=new Map;source=async(t,n)=>(this.wanted.set(t,n),this.link?.start(t),{stop:async()=>{this.wanted.get(t)===n&&(this.wanted.delete(t),this.link?.stop(t))}});attach(t){if(this.link=t,t)for(let n of this.wanted.keys())t.start(n)}frame(t,n){this.wanted.get(t)?.(n)}};var cr=500,pr=1e4,Bt=5e3,dr=async(e,t)=>{let n=new AbortController,r=()=>n.abort(),o=setTimeout(r,t.timeoutMs);t.signal.addEventListener("abort",r,{once:!0});try{let i=await F(e,{method:"POST",headers:t.headers,body:t.body,signal:n.signal}),c=null;try{c=await i.json()}catch{}return{status:i.status,body:c}}finally{clearTimeout(o),t.signal.removeEventListener("abort",r)}},fe=class{constructor(t){this.opts=t;this.post=t.post??dr,this.unsubscribeModel=t.model.subscribe(()=>this.stateChanged())}post;target=null;off=!1;framesOff=!1;abort=new AbortController;unsubscribeModel;stateInFlight=!1;stateDirty=!1;lastStateAt=0;stateTimer=null;heartbeat=null;watched=new Map;stopAsked=!1;waiting=new Map;sending=new Set;arm(t){this.off||(this.letAllGo(),this.abort.abort(),this.abort=new AbortController,this.stateInFlight=!1,this.target=t,this.framesOff=!1,this.stateDirty=!0,this.sendState())}async close(){this.off=!0,this.unsubscribeModel(),this.clearTimers(),this.letAllGo(),this.abort.abort()}url(t,n=""){let r=this.target;return`${r.baseUrl.replace(/\/+$/,"")}${n}/exploration/${encodeURIComponent(r.explorationId)}/runs/${encodeURIComponent(r.runId)}/live/${t}`}stateChanged(){if(this.off||!this.target||(this.stateDirty=!0,this.stateInFlight||this.stateTimer))return;let t=cr-(Date.now()-this.lastStateAt);t<=0?this.sendState():this.stateTimer=setTimeout(()=>{this.stateTimer=null,this.sendState()},t)}sendState(){if(this.off||!this.target||this.stateInFlight)return;let t=this.target;this.stateDirty=!1,this.stateInFlight=!0,this.lastStateAt=Date.now(),this.heartbeat&&clearTimeout(this.heartbeat),this.heartbeat=null;let n;try{n=JSON.stringify(this.opts.model.snapshot())}catch{this.stateInFlight=!1;return}this.post(this.url("state"),{headers:{Authorization:t.authHeader,"Content-Type":"application/json"},body:n,timeoutMs:Bt,signal:this.abort.signal}).then(r=>{if(this.target===t){if(r.status===404||r.status===403||r.status===401)return this.turnOff(r.status);r.status>=200&&r.status<300&&(this.stopIfAsked(r.body),this.follow(r.body))}},()=>{}).finally(()=>{this.target!==t||this.off||(this.stateInFlight=!1,this.heartbeat=setTimeout(()=>{this.heartbeat=null,this.stateDirty=!0,this.sendState()},pr),this.stateDirty&&this.stateChanged())})}turnOff(t){this.off||(this.off=!0,this.clearTimers(),this.letAllGo(),this.abort.abort(),this.opts.onWarn?.(`live view is off for this run: the controller has no live routes (HTTP ${t})`))}stopIfAsked(t){this.stopAsked||!t||typeof t!="object"||t.stop!==!0||(this.stopAsked=!0,this.opts.onStop?.())}follow(t){let n=t&&typeof t=="object"?t.watched:void 0;if(!Array.isArray(n)||this.framesOff)return;let r=new Set(n.filter(o=>Number.isInteger(o)&&o>=0));for(let o of[...this.watched.keys()])r.has(o)||this.letGo(o);for(let o of r)this.watched.has(o)||this.watched.set(o,this.opts.frames.subscribe(new Map([[o,Rt]]),i=>this.frame(i)))}frame(t){t.kind!=="frame"||this.off||!this.watched.has(t.worker)||(this.waiting.set(t.worker,{data:t.data,at:t.at}),this.sendFrame(t.worker))}sendFrame(t){if(this.sending.has(t)||!this.target)return;let n=this.waiting.get(t);if(n===void 0)return;this.waiting.delete(t);let r=this.target;this.sending.add(t);let o=Number.isFinite(n.at)?`&at=${Math.round(n.at)}`:"";this.post(`${this.url("frames","/public")}?worker=${t}${o}`,{headers:{"X-Live-Token":r.liveToken,"Content-Type":"image/jpeg"},body:Buffer.from(n.data,"base64"),timeoutMs:Bt,signal:this.abort.signal}).then(i=>{this.target===r&&(i.status===410?this.letGo(t):i.status===401&&!this.framesOff&&(this.framesOff=!0,this.letAllGo(),this.opts.onWarn?.("live frames are off for this run: the controller refused its live token (HTTP 401)")))},()=>{}).finally(()=>{this.target===r&&(this.sending.delete(t),!this.off&&this.watched.has(t)&&this.sendFrame(t))})}letGo(t){let n=this.watched.get(t);this.watched.delete(t),this.waiting.delete(t),n?.()}letAllGo(){for(let t of[...this.watched.keys()])this.letGo(t);this.sending.clear()}clearTimers(){this.stateTimer&&clearTimeout(this.stateTimer),this.heartbeat&&clearTimeout(this.heartbeat),this.stateTimer=this.heartbeat=null}};function ge(e,t){return`watch live: kane-cli explore view --exploration-id ${e}${t?` --env ${t}`:""}`}async function Mt(e){let t=new de,n=new me,r=new kt({start:e.startSource??n.source}),o=new fe({model:t,frames:r,post:e.post,onWarn:e.onWarn,onStop:e.onStop}),i=!1,c=!1,g=!1;return{model:t,frames:r,onBrowser(a){c||r.addBrowser(a)},offBrowser(a){r.removeBrowser(a)},attachRunner(a){n.attach(c?null:a)},runnerFrame(a,u){c||n.frame(a,u)},onEvent(a){t.apply(a),a.type==="explore_start"&&!i&&typeof a.exploration_id=="string"&&a.exploration_id&&(i=!0,e.onExploration?.(a.exploration_id))},armRun(a){if(!c){if(!a.liveToken){g||e.onWarn?.("live view is off for this run: the controller handed out no live token"),g=!0;return}o.arm({...e.controller,explorationId:a.explorationId,runId:a.runId,liveToken:a.liveToken})}},async close(a){c||(c=!0,await o.close(),n.attach(null),t.end(a),await r.close())}}}import{readFileSync as fr}from"fs";import{basename as gr}from"path";import{randomUUID as Kt}from"crypto";function $e(e){let t=[];for(let[n,r]of Object.entries(e)){if(r.type==="parameter")continue;let o=n.replace(/^(secrets\.user\.|global\.|environment\.)/,"");t.push({name:o,secret:!!r.secret,value:String(r.value??"")})}return t}async function Ht(e,t){if(t.activeRun){let u=null;try{u=await t.activeRun()}catch{u=null}if(u)return{ok:!1,error:`RUN_ACTIVE: run ${u.runId} is ${u.state} on exploration ${u.explorationId}; stop it or wait for it to end`}}let n=e.variables.filter(u=>u.secret),r=e.variables.filter(u=>!u.secret),o=[["LT_USERNAME",e.login.username],["LT_ACCESS_KEY",e.login.accessKey],...n.map(u=>[u.name,u.value])];for(let[u,l]of o){if(e.dev?.skipPush===u){e.onNote?.(`dev: not pushing secret ${u} (KANE_EXPLORE_DEV_SKIP_SECRET_PUSH)`);continue}try{await t.pushSecret(u,l)}catch(f){return{ok:!1,error:`could not push secret ${u} to HyperExecute Secrets: ${z(f)}`}}}for(let u of r)try{await t.upsertGlobal(u.name,u.value)}catch(l){return{ok:!1,error:`could not push variable ${u.name} to Test Manager: ${z(l)}`}}let i=o.map(([u])=>u);if(e.dev?.skipCheck)return e.onNote?.("dev: not checking the HyperExecute secrets list (KANE_EXPLORE_DEV_SKIP_SECRET_CHECK); the VM's check must refuse a missing secret"),a();let c;try{c=await t.hxSecretNames(i)}catch(u){return{ok:!1,error:`could not read your HyperExecute secrets to check them: ${z(u)}`}}let g=i.filter(u=>!c.includes(u));if(g.length)return{ok:!1,error:`HyperExecute Secrets does not list ${g.join(", ")} after the push; the VM would run without ${g.length===1?"it":"them"}`};return a();async function a(){let u=e.body;if(e.devBundle)try{let{kane_version:l,...f}=e.body;u={...f,dev:await e.devBundle()}}catch(l){return{ok:!1,error:`--dev-bundle: could not upload the bundle: ${z(l)}`}}try{return{ok:!0,reply:await t.remoteRun({...u,variables:e.variables.map(f=>({name:f.name,secret:f.secret}))})}}catch(l){if(l instanceof le&&l.code==="SECRETS_MISSING"){let f=l.body??{};return{ok:!1,secretsMissing:!0,error:typeof f.error=="string"&&f.error?f.error:"HyperExecute refused the job: a secret it names is missing",explorationId:typeof f.exploration_id=="string"?f.exploration_id:null,runId:typeof f.run_id=="string"?f.run_id:null}}return{ok:!1,error:`could not launch the remote run: ${z(l)}`}}}}async function Vt(e,t,n){let r={Authorization:K(t.username,t.accessKey),Accept:"application/json"},o=new URLSearchParams({username:t.username});for(let a of n)o.append("secretKey",a);let i=await F(`${e}/logistics/v1.0/all-secrets/list?${o}`,{method:"GET",headers:r});if(i.status===404&&(i=await F(`${e}/logistics/v1.0/secrets/list/${encodeURIComponent(t.username)}`,{method:"GET",headers:r})),!i.ok)throw new Error(`HTTP ${i.status}`);let c=null;try{c=await i.json()}catch{c=null}let g=mr(c);return n.filter(a=>g.has(a))}function mr(e){let t=new Set,n=e&&typeof e=="object"?e:{},r=Array.isArray(n.Data)?n.Data:Array.isArray(n.data)?n.data:Array.isArray(e)?e:[];for(let o of r)if(typeof o=="string")t.add(o);else if(o&&typeof o=="object"){let i=o,c=i.key??i.secretKey??i.Key??i.name;typeof c=="string"&&t.add(c)}return t}var Dt=["allowDomain","deny","allowPost","depthCaps","slowBudget","recheck","focus","hpsRegion","tunnel","tunnelName"];function Ae(e,t){let n={};t&&(n.deps=t);for(let r of Dt){let o=e[r];o===void 0||Array.isArray(o)&&!o.length||(n[r]=o)}return n}function Gt(e){let t=e.args&&typeof e.args=="object"?e.args:{},n={url:e.url,prompt:e.prompt,browser:"remote",headless:!0};typeof e.max_parallel=="number"&&e.max_parallel>0&&(n.maxParallel=e.max_parallel),typeof e.max_leases=="number"&&e.max_leases>0&&(n.maxLeases=e.max_leases),Array.isArray(e.allowed_domains)&&(n.allowDomain=e.allowed_domains),typeof e.policy=="string"&&e.policy&&(n.policy=e.policy);for(let r of Dt)t[r]!==void 0&&(n[r]=t[r]);return typeof t.deps=="string"&&t.deps&&(n.depsText=t.deps),n}function Ft(e,t){let n={},r=[];for(let o of e){if(!o.secret){n[o.name]={value:"",secret:!1};continue}let i=t[o.name];if(!i||i.includes("${{.secrets.")){r.push(o.name);continue}n[o.name]={value:i,secret:!0}}return r.length?{ok:!1,missing:r}:{ok:!0,variables:n}}function z(e){return e instanceof Error?e.message:String(e)}function Wt(e){let t=$e(e.variables).map(n=>({name:n.name,secret:n.secret}));return{url:e.url,prompt:e.prompt,policy:e.policy??ue,...t.length?{variables:t}:{},...e.maxParallel?{max_parallel:e.maxParallel}:{},...e.maxLeases?{max_leases:e.maxLeases}:{},args:Ae({...e.opts,allowDomain:e.allowedDomains},e.depsText)}}function hr(e){let t={},n=(e.KANE_EXPLORE_DEV_SKIP_SECRET_PUSH??"").trim();return n&&(t.skipPush=n),(e.KANE_EXPLORE_DEV_SKIP_SECRET_CHECK??"").trim()==="1"&&(t.skipCheck=!0),t}async function wr(e,t){let n=fr(t),r=new qe(e.controllerBaseUrl,{username:e.basic.username,accessKey:e.basic.access_key}),o=`${Kt()}-${gr(t)}`,c=(await r.getPresignedUrls("explore-dev",Kt(),[{key:"bundle",content_type:"application/gzip",filename:o}])).urls.bundle;if(!c)throw new Error("the presign reply named no URL for the bundle");return await ot(c.upload_url,n,"application/gzip"),c.blob_url}function xr(e){return{project_id:e.projectId,url:e.url,prompt:e.prompt,policy:e.policy??ue,...e.allowedDomains.length?{allowed_domains:e.allowedDomains}:{},...e.contextEnabled===!1?{context_enabled:!1}:{},...e.maxParallel?{max_parallel:e.maxParallel}:{},...e.maxLeases?{max_leases:e.maxLeases}:{},args:Ae(e.opts,e.depsText),kane_version:e.kaneVersion}}async function qt(e,t){let n=new S({baseUrl:e.controllerBaseUrl,auth:e.basic}),r=new st(e.secretsBaseUrl),o=new it(e.tmsBaseUrl,e.basic.username,e.basic.access_key),i={username:e.basic.username,accessKey:e.basic.access_key},c=xr(t),g=t.dev,a=await Ht({variables:$e(t.variables),login:i,body:c,...g?{dev:hr(process.env),onNote:u=>e.emit({type:"warning",message:u}),devBundle:async()=>({bundle_url:await wr(e,g.bundlePath),controller_url:g.controllerUrl})}:{}},{pushSecret:(u,l)=>r.pushSecret({secretKey:u,secretValue:l,username:i.username,accessKey:i.accessKey,orgId:e.orgId}),upsertGlobal:async(u,l)=>{await o.upsertVariable({name:u,value:l})},hxSecretNames:u=>Vt(e.secretsBaseUrl,i,u),remoteRun:u=>n.remoteRun(u),activeRun:async()=>{if(!t.projectId)return null;let l=(await n.listExplorations({state:"running",project:t.projectId,limit:1})).explorations.find(f=>f.project_id===t.projectId&&f.current_session);return l&&l.current_session?{explorationId:l.exploration_id,runId:l.current_session.run_id,state:l.current_session.state}:null}});if(!a.ok&&a.secretsMissing)return{ok:!1,error:a.error,exitCode:2,stopped:{explorationId:a.explorationId,runId:a.runId}};if(!a.ok){if(t.contextEnabled===!1&&vt(a.error))return{ok:!1,error:yt,exitCode:2};let u=/could not launch/.test(a.error)||a.error.startsWith("RUN_ACTIVE:");return{ok:!1,error:a.error,exitCode:u?1:2}}return e.emit({type:"explore_remote_started",exploration_id:a.reply.exploration_id,run_id:a.reply.run_id,state:a.reply.state,hx_job_id:a.reply.hx_job_id,job_link:a.reply.job_link,created:a.reply.created,policy:c.policy??ue}),t.contextEnabled===!1&&!a.reply.created&&e.emit({type:"warning",message:`exploration ${a.reply.exploration_id} already exists; its assurance context is unchanged \u2014 use \`kane-cli explore context off ${a.reply.exploration_id}\``}),e.terminal||(process.stderr.write(`exploration ${a.reply.exploration_id}, run ${a.reply.run_id}: queued on HyperExecute
4
+ `),a.reply.job_link&&process.stderr.write(`job: ${a.reply.job_link}
5
+ `),process.stderr.write(ge(a.reply.exploration_id,e.env)+`
6
+ `)),{ok:!0,explorationId:a.reply.exploration_id,runId:a.reply.run_id}}async function Xt(e,t,n,r){let o=new S({baseUrl:e.controllerBaseUrl,auth:e.basic}),i;try{i=await o.runRequest(t,n)}catch(l){let f=l instanceof le?l.code:"";return{ok:!1,error:`could not read run ${n}'s request${f?` (${f})`:""}: ${l.message}`,exitCode:2,stopped:!1}}let c=i.requested&&typeof i.requested=="object"?i.requested:{},g=Array.isArray(c.variables)?c.variables:[],a=Ft(g,r);if(!a.ok){let l=`secret${a.missing.length===1?"":"s"} ${a.missing.join(", ")} not set on this machine (HyperExecute Secrets has no value for ${a.missing.length===1?"it":"them"})`,f=W("secrets_missing",l);try{let y=await o.startRun(t,{run_id:n,sessions:1,client_release:M});await o.endRun(t,n,{remark:f,stop_reason:"secrets_missing",last_seq:y.next_seq-1,complete:!1,totals:{},unacked:0})}catch(y){return{ok:!1,error:`${l}; stopping the run also failed: ${y.message}`,exitCode:1,stopped:!1}}return{ok:!1,error:l,exitCode:1,stopped:!0}}return{ok:!0,opts:{...Gt({...c,url:c.url??i.target_url,prompt:c.prompt??i.prompt}),explorationId:t,claimRunId:n,variables:JSON.stringify(a.variables)}}}import{existsSync as kr}from"fs";function he(e,t,n){let r=typeof e.explorationId=="string"?e.explorationId.trim():"";return r&&t?{explorationId:r}:n?{projectId:n}:null}function Jt(e){let t=e.trim();try{let n=new URL(t);return`${n.protocol}//${n.host}${n.pathname.replace(/\/+$/,"")}${n.search}${n.hash}`}catch{return t.replace(/\/+$/,"").toLowerCase()}}function br(e,t){return Jt(e)===Jt(t)}var yr=10;async function Oe(e,t){let n;for(let r=0;r<yr;r++){let o=await e.listExplorations({state:"all",limit:100,...n?{cursor:n}:{},..."projectId"in t?{project:t.projectId}:{}}),i=o.explorations.find(c=>"projectId"in t?c.project_id===t.projectId:c.exploration_id===t.explorationId);if(i)return i;if(!o.next_cursor)return null;n=o.next_cursor}return null}function vr(e){return`use a new --project for another site, or kane-cli explore delete ${e} first`}function Ue(e,t){let n=e.target_url??"";return!n||!t.trim()||br(n,t)?null:{error:`--url ${t.trim()} is not exploration ${e.exploration_id}'s URL (${n}): one exploration per project explores one URL`,next:vr(e.exploration_id)}}var _r=e=>We.hex(Ke.dim)(e),Rr=`error: --setup and --setup-check were replaced by --deps <plain language> (repeatable, or @file), which the recon runs once as its setup walk; see kane-cli explore run --help
7
+ `,Er=`
8
+ One project has one exploration, of one URL: a re-run takes the exploration's
9
+ URL, and a different --url is refused (use a new --project for another site,
10
+ or kane-cli explore delete <id> first).
11
+
12
+ Examples:
13
+ # a project's first run, on HyperExecute (exits once the run is queued)
14
+ $ kane-cli explore run --project <id> --url https://example.com \\
15
+ --prompt "Explore checkout"
16
+ # run again: the URL is the project's exploration's
17
+ $ kane-cli explore run --project <id> --max-leases 40
18
+ # a read-only run on this machine
19
+ $ kane-cli explore run --project <id> --policy read_only --local-orchestration
20
+ # a local app, through your LT tunnel (start LT first)
21
+ $ kane-cli explore run --project <id> --url http://localhost:3000 \\
22
+ --tunnel-name dev
23
+ `;function zt(e){let t=Number(e);if(!Number.isInteger(t)||t<1)throw new Ee("must be a positive integer");return t}function uo(e){let t=e.command("explore").description("Explore an app into a map of its screens and flows").enablePositionalOptions().option("--exploration-id <id>",X({purpose:"On a terminal: open this exploration's card",values:"an id from kane-cli explore list --all",dflt:"pick a project first"})).option("--env <name>",Te).option("--username <user>",Ce).option("--access-key <key>",Pe).option("--agent",je).configureHelp({sortSubcommands:!0,...pe([{title:"Target",flags:["--exploration-id"]},{title:"Output",flags:["--agent","--help"]},{title:"Account",flags:["--env","--username","--access-key"]}])}).addHelpText("after",`
24
+ On a terminal, plain \`kane-cli explore\` opens the project picker, then the
25
+ exploration's card (run again, watch, stop, map, sessions, context, delete);
26
+ with --agent or a pipe it prints this help. Each command's --help lists its
27
+ options, grouped, with their values, defaults and examples.
28
+ `).action(async(n,r)=>{if(r.args.length>0&&r.error(`error: unknown command '${r.args[0]}'`,{exitCode:2}),ce(n,At()))return r.help();let{runExploreEntryAction:o}=await import("./explore-entry-EKXJ67BD.js");process.exitCode=await o(n)});t.command("run").description("Run one exploration of an app into its project's map: on HyperExecute by default (exits once the run is queued; stop it with explore stop), or on this machine with --local-orchestration. A terminal opens a setup form and a review first; --agent or a pipe gets NDJSON on stdout, done last").option("--url <url>",h("url")).option("--project <id>",h("project")).option("--exploration-id <id>",h("explorationId")).option("--prompt <text>",h("prompt"),"Explore the app").option("--max-leases <n>",h("maxLeases"),zt).option("--max-parallel <n>",h("maxParallel"),zt).option("--depth-caps <depth:cap,\u2026>",h("depthCaps")).option("--slow-budget <spec>",h("slowBudget")).option("--no-recheck",h("recheck")).option("--policy <policy>",h("policy")).option("--allow-domain <host>",h("allowDomain"),we,[]).option("--deny <name>",h("deny"),we,[]).option("--allow-post <host/path>",h("allowPost"),we,[]).option("--focus <screen>",h("focus")).option("--local-orchestration",h("localOrchestration")).option("--browser <where>",h("browser"),"local").option("--headless",h("headless")).option("--tunnel",h("tunnel")).option("--tunnel-name <name>",h("tunnelName")).option("--deps <text>",h("deps"),we,[]).option("--variables <json>",h("variables")).option("--variables-file <path>",h("variablesFile")).option("--no-context",h("context")).option("--agent",h("agent")).option("--env <name>",h("env")).option("--username <user>",h("username")).option("--access-key <key>",h("accessKey")).addOption(new se("--claim-run <run-id>","On a HyperExecute VM: take over this queued run (the job's own command; needs --exploration-id)").hideHelp()).addOption(new se("--dev-bundle <tgz>","Dev only: the VM installs this kane-cli bundle and talks to EXPLORE_DEV_CONTROLLER_URL").hideHelp()).addOption(new se("--hps-region <region>",`With remote browsers on prod: the regional host (${ae.join(", ")})`).hideHelp()).configureHelp(pe($t())).addHelpText("after",Er).configureOutput({outputError:(n,r)=>r(/\'--setup(?:-check)?(?:=|\')/.test(n)?Rr:n)}).action(async n=>{process.exitCode=await Or(n)}),t.command("view").description("Serve a live graph of an exploration's map on 127.0.0.1 (polls the service; Ctrl-C to stop)").option("--exploration-id <id>",X({purpose:"The exploration to view",values:"an id from kane-cli explore list --all"})).option("--project <id>",X({purpose:"View this project's exploration instead (a project has one)",values:"a project id"})).option("--port <n>",X({purpose:"The port on 127.0.0.1",values:"1-65535",dflt:"the first free of 7420-7429"}),Sr).option("--agent",je).option("--env <name>",Te).option("--username <user>",Ce).option("--access-key <key>",Pe).configureHelp(pe([{title:"Target",flags:["--exploration-id","--project"]},{title:"Server",flags:["--port"]},{title:"Output",flags:["--agent","--help"]},{title:"Account",flags:["--env","--username","--access-key"]}])).addHelpText("after",`
29
+ Name the exploration with --exploration-id or --project, not both.
30
+
31
+ Examples:
32
+ $ kane-cli explore view --project <id>
33
+ $ kane-cli explore view --exploration-id <id> --port 7430
34
+ `).action(async n=>{process.exitCode=await Nr(n)}),Ot(t),Ut(t),t.command("assurance-job",{hidden:!0}).description("One cut of an exploration into its project's assurance (the controller's job; input from the environment)").action(async()=>{let{runAssuranceJob:n}=await import("./assurance-job-FFSSS4XV.js");process.exitCode=await n()})}function Sr(e){let t=Number(e);if(!Number.isInteger(t)||t<1||t>65535)throw new Ee("must be an integer 1-65535");return t}function we(e,t){return[...t,e]}function Qt(e){let t=new Set;for(let n of e){let r=n.trim().toLowerCase();if(r){try{r.includes("://")&&(r=new URL(r).hostname)}catch{}r=r.replace(/\/.*$/,"").replace(/^www\./,"").replace(/\.$/,""),r&&t.add(r)}}return[...t]}function Ir(e,t){if(e.some(r=>r.trim()==="*"))return{posts:["*"]};let n=new Set;for(let r of e){let o=r.trim();if(!o)continue;let i=y=>({error:`--allow-post ${JSON.stringify(o)}: ${y}; write it as host/path, e.g. api.example.com/v1/flags`});if(o.includes("://"))return i("no scheme");if(/[?#]/.test(o))return i("no query or fragment (the match is on host and path only)");if(o.includes("*"))return i("no partial wildcards (name the endpoint exactly, or pass a bare * for every POST)");if(/\s/.test(o))return i("no whitespace");let c=o.indexOf("/");if(c<=0)return i("a host followed by a path starting with /");let g=o.slice(0,c).toLowerCase(),a=o.slice(c),u=/^([^:]+?)\.?(?::(\d+))?$/.exec(g);if(!u)return i("an invalid host");let l=u[1],f=u[2]&&u[2]!=="80"&&u[2]!=="443"?`:${u[2]}`:"";if(g=l+f,!t.some(y=>l===y||l.endsWith(`.${y}`)))return i(`host ${l} is outside the run's domains (${t.join(", ")||"none"}); add it with --allow-domain first`);n.add(g+a)}return{posts:[...n]}}function Lr(e){if(e===void 0)return{caps:{}};let t={};for(let n of e.split(",").map(r=>r.trim()).filter(Boolean)){let r=/^(\d+):(\d+)$/.exec(n);if(!r)return{error:`--depth-caps "${e}": each entry is depth:cap with whole numbers, e.g. 0:0,1:3,2:1`};t[String(Number(r[1]))]=Number(r[2])}return Object.keys(t).length?{caps:t}:{error:`--depth-caps "${e}": give at least one depth:cap pair`}}var jr={response:"response_ms",page:"page_ready_ms",step:"step_ms"};function Tr(e){if(e===void 0)return{budgets:{}};let t={};for(let n of e.split(",").map(r=>r.trim()).filter(Boolean)){let r=/^(response|page|step)=(\d+(?:\.\d+)?)(s|ms)$/.exec(n);if(!r)return{error:`--slow-budget "${e}": each entry is response|page|step=<number>s or ms, e.g. response=3s,page=4s,step=2.5s`};let o=Math.round(Number(r[2])*(r[3]==="s"?1e3:1));if(o<1)return{error:`--slow-budget "${e}": a budget is more than 0`};t[jr[r[1]]]=o}return Object.keys(t).length?{budgets:t}:{error:`--slow-budget "${e}": give at least one budget`}}function Yt(e){return e.context===!1?{contextEnabled:!1}:{}}function Cr(e){let t=e.tunnelName;if(t!==void 0){let n=String(t).trim();return!n||/[\u0000-\u001f\u007f]/.test(n)?{error:"--tunnel-name: the name the LT tunnel was started with (--tunnelName)"}:{tunnel:{name:n}}}return{tunnel:e.tunnel===!0?{name:null}:null}}var Pr="--tunnel on a remote run: the remote browsers reach your apps through the LT tunnel on this machine; keep it (and this machine) up until the run ends, or its pages fail to load";function Be(e){return async t=>{let n=await J(e,"explore run");return n.ok?Oe(new S({baseUrl:n.controllerBaseUrl,auth:n.basic,timeoutMs:5e3}),t):null}}async function tr(e){let t=typeof e.project=="string"?e.project:"";if(!t)return null;try{let n=await J(e,"explore run");if(!n.ok)return null;let r=oe(e.env??new ne().getDefaultEnv()??"prod"),o=new Qe(r.tmsBaseUrl,n.basic.username,n.basic.access_key);return await wt((async()=>{try{let c=await o.getProject(t);if(c?.name)return c.name}catch{}return(await o.listProjects()).find(c=>String(c.project_id)===t)?.name??null})(),4e3,()=>null)}catch{return null}}var $r=async(e,t=Be(e))=>{let n=null,r=typeof e.project=="string"?e.project:"",o=he(e,!!e.localOrchestration,r||null),i=null;if(o)try{i=await t(o)}catch{i=null}if(i){let g=Ue(i,typeof e.url=="string"?e.url:"");if(g){for(let a of Ie(g.error,g.next))process.stderr.write(a+`
35
+ `);return 2}n=i.target_url??null}let c=await(await import("./explore-run-tty-D47FGPX7.js")).setupRunOpts(e,n,await tr(e));return"opts"in c?c.opts:c.code};function Ar(e){if(e.startsWith("RUN_ACTIVE:"))return"watch it (kane-cli explore view) or stop it (kane-cli explore stop) first \u2014 one run per exploration";if(/HyperExecute Secrets does not list/.test(e))return"check the secret's name in HyperExecute Secrets and your variables files, then launch again; or run it here with --local-orchestration";if(/a secret it names is missing|SECRETS_MISSING/.test(e))return"add the missing secret to your variables files (secret: true) and launch again";if(/REMOTE_UNAVAILABLE|503|could not launch the remote run|could not read your HyperExecute secrets|could not push/.test(e))return"try again in a minute, or run it on this machine with --local-orchestration"}async function Or(e,t,n={}){let r=ce(e,t),o=r?Re("explore"):null,i=s=>s,c=null,g=s=>{o?o.emit(i(s)):c?.(i(s))},a=s=>{o?H(i(s)):process.stderr.write(`${s.type}: ${i(s).message}
36
+ `)},u=s=>(g({...bt({state:s.state??null,remark:s.remark??null,exitCode:s.exitCode,explorationId:s.explorationId??null,runId:s.runId??null,committed:s.committed??0,pending:s.pending??0,lastSeq:s.lastSeq??0,stopReason:s.stopReason??null,complete:s.complete??!1,runDir:s.runDir??null,error:s.error}),...s.teardown?{teardown:s.teardown}:{},...s.credits?{credits:s.credits}:{},...typeof s.creditsConsumed=="number"?{credits_consumed:s.creditsConsumed}:{},...s.focus?{focus:s.focus}:{},...s.refused?{refused:s.refused}:{},...s.parallelism?{parallelism:s.parallelism}:typeof s.peakParallel=="number"?{peak_parallel:s.peakParallel}:{}}),s.exitCode),l=(s,p)=>(a({type:"error",message:s}),p&&!o&&process.stderr.write(`next: ${p}
37
+ `),u({exitCode:2,error:s})),f=typeof e.claimRun=="string"&&e.claimRun?e.claimRun:null;if(f&&!r)return l("--claim-run is the HyperExecute VM's own mode; it never runs on a terminal");let y=Le(e);if("error"in y)return l(y.error,y.next);if(!r){let s=await(n.setup??(p=>$r(p,n.lookupExploration??Be(p))))(e);if(s===null)return 0;if(typeof s=="number")return s;e=s}if(!f&&!(typeof e.url=="string"&&e.url.trim())){let s=he(e,!!e.localOrchestration,typeof e.project=="string"&&e.project?e.project:null),p=null;if(s)try{p=await(n.lookupExploration??Be(e))(s)}catch{p=null}p?.target_url&&(e={...e,url:p.target_url})}if(!f&&!(typeof e.url=="string"&&e.url.trim()))return l("required option '--url <url>' not specified");let I=!!e.localOrchestration||!!f;if(f&&e.localOrchestration)return l("--claim-run is the VM's own mode; it takes no --local-orchestration");if(e.devBundle&&I)return l("--dev-bundle is for a remote run (the default), not --local-orchestration or --claim-run");if(f){let s=String(e.explorationId??"").trim();if(!s)return l("--claim-run needs --exploration-id");let p=await J(e,"explore run --claim-run");if(!p.ok)return l(p.error);let m=String(e.env??new ne().getDefaultEnv()??"prod"),d=await Xt(er(m,p.basic,"",A=>g(A)),s,f,process.env);if(!d.ok)return H(i({type:"error",message:d.error})),d.stopped?u({exitCode:d.exitCode,error:d.error,state:"stopped",remark:W("secrets_missing",d.error),explorationId:s,runId:f}):u({exitCode:d.exitCode,error:d.error,explorationId:s,runId:f});e={...e,...d.opts,env:e.env,username:e.username,accessKey:e.accessKey}}let _=Le(e);if("error"in _)return l(_.error,_.next);let x=_.policy,U={prompt:"",deps:""},R={},N="";try{let s=typeof e.depsText=="string"?e.depsText:lt(e.deps??[]);N=s;let p=ut({prompt:e.prompt??"Explore the app",deps:s},{globalDir:Ne(re,"variables"),localDir:Ne(process.cwd(),".testmuai","variables"),file:e.variablesFile,inline:e.variables,onLoadError:m=>a({type:"warning",message:m})});if("error"in p)return l(p.error);U={prompt:p.prompt,deps:p.deps},R=p.variables}catch(s){return l(`variables: ${s.message}`)}let w=Qt(e.allowDomain??[]);if(U.deps&&w.length===0)return l("--deps needs --allow-domain for every host the app signs in or writes on (e.g. --allow-domain testmuai.com --allow-domain lambdatest.com)");let L=[...new Set([...w,...Qt([String(e.url??"")])])],b=I?String(e.browser??"local"):"remote";if(!I&&e.browser!==void 0&&e.browser!=="local")return l("--browser applies to --local-orchestration; a remote run always uses remote browsers");if(b!=="local"&&b!=="remote")return l(`--browser ${b}: local or remote`);let j=e.hpsRegion;if(j!==void 0&&b!=="remote")return l("--hps-region needs --browser remote");if(j!==void 0&&!ae.includes(j))return l(`--hps-region ${j}: one of ${ae.join(", ")}`);let T=Cr(e);if("error"in T)return l(T.error);if(T.tunnel&&b!=="remote")return l("--tunnel needs remote browsers (a remote run, or --browser remote): a local Chrome already reaches this machine");let D=e.maxParallel??1;if(b==="local"&&D>Se)return l(`--max-parallel ${D}: at most ${Se} browsers run on this machine at once (--browser remote runs up to ${ie})`);if(b==="remote"&&D>ie)return l(`--max-parallel ${D}: at most ${ie} remote browsers at once`);let xe=Lr(e.depthCaps);if("error"in xe)return l(xe.error);let be=Tr(e.slowBudget);if("error"in be)return l(be.error);let Q=Ir(e.allowPost??[],L);if("error"in Q)return l(Q.error);x==="mutating"&&Q.posts.length&&a({type:"warning",code:"allow_post_ignored",message:jt});let Y=new ne,E=e.env??Y.getDefaultEnv()??"prod",O=oe(E),G=new Ye().load(),rr=Y.loadProfileConfig(Y.getActiveProfile()??"default",E)?.project_id??null,C=e.project??G.project_id??rr??null;if(x==="mutating"){let s=Tt(String(e.url??"")),p=Ct(String(e.url??""));o?H(i({type:"warning",code:"policy_mutating",policy:x,host:s,message:p})):process.stderr.write((process.stderr.columns?at(p,process.stderr.columns):p)+`
38
+ `);let m=n.mutatingMemory??Pt();if(!r&&!(C&&m.confirmed(C))){let A=await(n.confirmMutating??(async B=>(await import("./explore-run-tty-D47FGPX7.js")).confirmMutatingRun({...B,projectName:B.projectName??(B.projectId?await tr({...e,project:B.projectId}):null)})))({host:s,projectId:C,projectName:C===G.project_id?G.project_name??null:null});if(A!==!0)return process.stderr.write(`setup discarded; nothing launched
39
+ `),A===null?130:0;C&&m.remember(C)}}if(!r&&n.afterChecks)return n.afterChecks();let Me=new Set;r||(c=s=>{s.type==="explore_remote_started"?process.stderr.write(q("queued on HyperExecute",` \xB7 run ${String(s.run_id).slice(0,8)}${s.job_link?` \xB7 ${String(s.job_link)}`:""}`,"done")+`
40
+ `):(s.type==="warning"||s.type==="error")&&process.stderr.write(`${String(s.type)}: ${String(s.message)}
41
+ `);for(let p of Me)p(s)});let He=(s,p)=>{if(o)H(i({type:"error",message:s}));else for(let m of Ie(i({message:s}).message,p??Ar(s)))process.stderr.write(m+`
42
+ `)},v,Ve="";try{let s=await nt({creds:Y,env:E,usernameFlag:e.username,accessKeyFlag:e.accessKey,log:()=>{}});v=s.basicAuth,Ve=String(s.resolvedCreds?.org_id??"")}catch(s){return s instanceof rt&&s.code==="not_authenticated"?l("not authenticated: pass --username/--access-key or run 'kane-cli login'"):l(`auth resolution failed: ${s.message}`)}if(!v)return l("explore needs Basic credentials (username + access key); none resolved");if(!f){let s=he(e,I,C),p=null,m=v;if(s)try{p=await(n.lookupExploration??(A=>Oe(new S({baseUrl:O.controllerBaseUrl,auth:m,timeoutMs:5e3}),A)))(s)}catch{p=null}let d=p?Ue(p,String(e.url??"")):null;if(d)return He(d.error,d.next),u({exitCode:2,error:d.error})}if(n.afterUrlCheck)return n.afterUrlCheck();if(!I){T.tunnel&&g({type:"warning",message:Pr});let s={...er(E,v,Ve,te=>g(te)),terminal:!r},p;if(typeof e.devBundle=="string"&&e.devBundle){let te=(process.env.EXPLORE_DEV_CONTROLLER_URL??"").trim();if(!te)return l("--dev-bundle needs EXPLORE_DEV_CONTROLLER_URL (the controller the VM talks to: the tunnel URL)");if(!kr(e.devBundle))return l(`--dev-bundle ${e.devBundle}: no such file`);p={bundlePath:e.devBundle,controllerUrl:te}}let m=C;if(!m)return l("a remote run needs a project: pass --project <id> or set one (kane-cli config set-project); one project has one exploration");r||process.stderr.write(q("launching on HyperExecute")+`
43
+ `);let d=await qt(s,{opts:e,variables:R,depsText:N,prompt:e.prompt??"Explore the app",url:String(e.url),projectId:m,allowedDomains:w,policy:x,...Yt(e),maxParallel:e.maxParallel,maxLeases:e.maxLeases,kaneVersion:M,...p?{dev:p}:{}});if(!d.ok)return He(d.error,d.stopped?"add the missing secret to your variables files (secret: true) or HyperExecute Secrets, then launch again":void 0),d.stopped?u({exitCode:d.exitCode,error:d.error,state:"stopped",remark:W("secrets_missing",d.error),explorationId:d.stopped.explorationId,runId:d.stopped.runId}):u({exitCode:d.exitCode,error:d.error});let A=u({exitCode:0,state:"queued",explorationId:d.explorationId,runId:d.runId});if(r)return A;let{runLiveView:B}=await import("./explore-live-2YVRAQZO.js");return(await B({client:new S({baseUrl:O.controllerBaseUrl,auth:v}),explorationId:d.explorationId,runId:d.runId,mode:"remote",env:E,policy:x})).exitCode}let ye=Ze();if(!ye)return l("v16-runner not found");let De=G.window_size?.width??1280,Ge=G.window_size?.height??800,Fe=C,$,Z={explorationId:null,runId:null};if(b==="remote"){if(E!=="stage"&&E!=="prod")return l(`--browser remote: no remote browsers for env ${E}`);let s;try{s=mt(E,j??null)}catch(m){return l(m.message)}let p=v;i=dt([p.access_key]),$=ht({hpsBase:s,auth:p,forge:ft(O.tmsBaseUrl,p,()=>({exploration_id:Z.explorationId,run_id:Z.runId,project_id:Fe,hx_job_id:tt().jobId??null,kane_version:M,region:j??null,tunnel:!!T.tunnel,tunnel_name:T.tunnel?.name??null})),tunnel:T.tunnel,releaseSync:m=>gt(O.tmsBaseUrl,p,m),onEvent:m=>g({type:"remote_browser",...m})})}else $=ct({launch:ze,width:De,height:Ge,headless:!!e.headless});Xe("explore-browsers",()=>$.releaseAllSync());let P=null,ve=null;try{P=await Mt({controller:{baseUrl:O.controllerBaseUrl,authHeader:K(v.username,v.access_key)},onWarn:s=>g({type:"warning",message:s}),onExploration:s=>{process.stderr.write(ge(s,e.env)+`
44
+ `)},onStop:()=>{g({type:"warning",message:"explore stop: the run is stopping cleanly"}),ve?.()}})}catch(s){g({type:"warning",message:`live mode is off for this run: ${s.message}`})}let _e=()=>{},nr=new Promise(s=>{_e=s}),ee=null;r||Me.add(s=>{s.type!=="explore_run_started"||ee||(ee=import("./explore-live-2YVRAQZO.js").then(({runLiveView:p})=>p({client:new S({baseUrl:O.controllerBaseUrl,auth:v}),explorationId:String(s.exploration_id),runId:String(s.run_id),mode:"local",env:E,policy:x,ended:nr})))});try{let s=await _t({url:e.url,prompt:U.prompt,maxLeases:e.maxLeases,explorationId:e.explorationId,...typeof e.claimRunId=="string"?{claimRunId:e.claimRunId}:{requested:Wt({opts:e,url:String(e.url),prompt:e.prompt??"Explore the app",depsText:N,variables:R,allowedDomains:w,policy:x,maxParallel:e.maxParallel,maxLeases:e.maxLeases})},projectId:Fe,policy:x,context:U,variables:R,allowedDomains:w,...Yt(e),allowPosts:x==="read_only"?Q.posts:[],depthCaps:xe.caps,slowBudgets:be.budgets,recheck:e.recheck!==!1,maxParallel:D,...typeof e.focus=="string"?{focus:e.focus}:{},denyNames:(e.deny??[]).map(m=>m.trim()).filter(Boolean),headless:!!e.headless,width:De,height:Ge,auth:v,clientRelease:M},{client:new S({baseUrl:O.controllerBaseUrl,auth:v}),spawnRunner:m=>{let d=et({environment:E,username:v.username,accessKey:v.access_key,sessionId:m});return $.kind==="local"?ke({env:d,runner:ye,sessionId:m}):Nt(ke({env:d,runner:ye}),Ne(re,"sessions",m,"runner-stderr.log"),pt([v.access_key]))},acquireBrowser:async m=>{let d=await $.acquire(m);return P?.onBrowser(m),{cdpEndpoint:d.cdpEndpoint,release:()=>{P?.offBrowser(m),d.release()}}},releaseBrowsersOnInterrupt:$.kind==="remote",frameLink:m=>P?.attachRunner(m),onFrame:(m,d)=>P?.runnerFrame(m,d),onLiveRun:m=>{Z.explorationId=m.explorationId,Z.runId=m.runId,P?.armRun(m)},emit:m=>{let d=i(m);o?o.emit(d):c?.(d),P?.onEvent(d)},baseDir:re,onInterrupt:m=>{ve=m;let d=Mr(m);return()=>{ve=null,d()}}});await $.releaseAll(),await P?.close(s.stopReason??s.remark?.code??"stopped");let p=u(f?{...s,exitCode:xt(s)}:s);return _e(p),ee&&await ee,p}finally{_e(1),await P?.close("stopped"),await $.releaseAll(),Je("explore-browsers")}}var Ur=3e3;async function Nr(e,t={}){let n=t.tty??!ce(e),r=t.out??(w=>{process.stdout.write(w+`
45
+ `)}),o=n?null:Re("explore"),i=String(e.explorationId??"").trim(),c=String(e.project??"").trim(),g=(w,L,b)=>(o?.emit({type:"done",status:L,exit_code:w,exploration_id:i||null,...b?{error:b}:{}}),w),a=(w,L)=>{if(o)H({type:"error",message:w});else{let b=t.err??(j=>{process.stderr.write(j+`
46
+ `)});b(`error: ${w}`),L&&b(`next: ${L}`)}return g(2,"error",w)};if(i&&c)return a("--exploration-id or --project, not both","kane-cli explore view --exploration-id <id>");if(!i&&!c)return a("name the exploration: --exploration-id or --project","kane-cli explore list --all names them (or plain kane-cli explore to pick one)");let u=await J(e,"explore view");if(!u.ok)return a(u.error,"kane-cli login");let l=u.basic,f={controllerBaseUrl:u.controllerBaseUrl};if(c){try{i=(await new S({baseUrl:f.controllerBaseUrl,auth:l}).listExplorations({state:"all",project:c})).explorations.find(L=>L.project_id===c)?.exploration_id??""}catch(w){return a(`could not find project ${c}'s exploration: ${w.message}`)}if(!i)return a(`project ${c} has no exploration`,`start one: kane-cli explore run --project ${c} --url <app>`)}let y=K(l.username,l.access_key),I={controllerBaseUrl:f.controllerBaseUrl,authHeader:y,explorationId:i,port:e.port,live:{controller:{baseUrl:f.controllerBaseUrl,authHeader:y}}},_=await Et(I);if(_.kind==="not_found")return a(`exploration ${i} not found`,"kane-cli explore list --all");if(_.kind==="error")return a(`could not read the map: ${_.message}`);let x;try{x=await St(I)}catch(w){return a(`could not bind 127.0.0.1${I.port?`:${I.port}`:""}: ${w.message}`,"pass another --port, or leave it out for the first free one")}let U=t.hold?null:Hr(),R=null;try{R=await new S({baseUrl:f.controllerBaseUrl,auth:l,timeoutMs:Ur}).getContext(i)}catch{}o&&o.emit({type:"explore_view_started",url:x.url,exploration_id:i,context:R});let N=null;if(!o){let w=!t.out&&!!process.stdin.isTTY&&!!process.stdout.isTTY;w&&Zt(x.url),r(q("map viewer ready",` \xB7 ${x.url}`)),r(_r(` ${w?"opened in your browser \xB7 ":""}live when a run is going`)),r("");let L=_.kind==="ok"&&_.body.counts&&typeof _.body.counts=="object"?_.body.counts:null,b=R?`context ${R.enabled?"on":"off"}${R.last_job?` \xB7 ${R.last_job.status}`:""}`:"";for(let j of It({status:q("serving"),meta:["explore",i.slice(0,8),u.environment??""],tallies:[...Lt(L).filter(T=>!T.endsWith("findings")&&!T.endsWith("finding")),...b?[b]:[]],keys:[...w?["o open again"]:[],"ctrl+c stop serving"]}))r(j);w&&!t.hold&&(N=Br(()=>{Zt(x.url)}))}t.onStarted?.(x);try{await(U??t.hold())}finally{N?.()}return await x.close(),g(0,"stopped")}async function Zt(e){try{let{default:t}=await import("./open-MQLQKFAW.js");await t(e)}catch{process.stderr.write(`could not open a browser: open ${e}
47
+ `)}}function Br(e){let t=process.stdin;if(!t.isTTY)return()=>{};let n=r=>{let o=r.toString("utf8");o===""?process.kill(process.pid,"SIGINT"):(o==="o"||o==="O")&&e()};return t.setRawMode(!0),t.resume(),t.on("data",n),()=>{t.off("data",n);try{t.setRawMode(!1)}catch{}t.pause()}}function Mr(e){let t=process.listeners("SIGINT");for(let n of t)process.removeListener("SIGINT",n);return process.on("SIGINT",e),()=>{process.removeListener("SIGINT",e);for(let n of t)process.on("SIGINT",n)}}function Hr(){return new Promise(e=>{let t=process.listeners("SIGINT"),n=process.listeners("SIGTERM");process.removeAllListeners("SIGINT"),process.removeAllListeners("SIGTERM");let r=()=>{process.removeListener("SIGINT",r),process.removeListener("SIGTERM",r);for(let o of t)process.on("SIGINT",o);for(let o of n)process.on("SIGTERM",o);e()};process.once("SIGINT",r),process.once("SIGTERM",r)})}function er(e,t,n,r){let o=oe(e);return{env:e,controllerBaseUrl:o.controllerBaseUrl,secretsBaseUrl:o.secretsBaseUrl,tmsBaseUrl:o.tmsBaseUrl,basic:t,orgId:n,emit:r}}export{Rr as a,Er as b,uo as c,Qt as d,Ir as e,Lr as f,Tr as g,Yt as h,Cr as i,Pr as j,Or as k,Ur as l,Nr as m,Mr as n};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{L as N,a as k,pa as S,r as w}from"./chunk-UEE3RZN4.js";import{f as _,h as $}from"./chunk-KU3YHPWZ.js";var T=3,F={edit:"edit",reject:"mistake",dedup_dropped:"mistake",approve:"usage",enhance:"directed-edit",add:"directed-edit",default_accepted:"usage",default_overridden:"edit",gap_resolution:"usage",dedup_kept:"usage"};function P(m){let{store:u,graph:s,watermark:v,by:f}=m,{signals:b}=u.signals().snapshot(v),E=b.filter(e=>e.event_id===void 0||s.appliedEvents.has(e.event_id)),n=new Map;for(let e of E){let t=e.event_id??`${e.ts}|${e.id}|${e.verdict}|${e.polarity}`;n.has(`${t}|${e.polarity}|${e.verdict}`)||n.set(`${t}|${e.polarity}|${e.verdict}`,e)}let j=[...n.values()].sort((e,t)=>(e.event_id??e.ts)<(t.event_id??t.ts)?-1:1),i=new Map;for(let e of j){let t=`${e.verdict}|${e.tag??""}`,r=i.get(t)??{verdict:e.verdict,tag:e.tag,events:new Set};r.events.add(e.event_id??e.ts),i.set(t,r)}let d=[],a=[],g=new Set,c=[],y=0;for(let[,e]of[...i.entries()].sort(([t],[r])=>t<r?-1:1)){if(e.events.size<T)continue;let r={derived:!0,statement:`${e.verdict}${e.tag?`/${e.tag}`:""} recurs (${e.events.size} distinct events) \u2014 bias future proposals ${e.verdict==="approve"?"toward":"away from"} this pattern`,learned_from_kind:F[e.verdict]??"usage",learned_from:[...e.events].sort()},h=$("stylenote",r);if(h.length>0)return{record:null,errors:h.map(o=>({code:o.code,detail:o.detail})),minted:0};let p=k("stylenote",r);if(s.hasNode(p))continue;d.push({cid:p,label:_.STYLENOTE,content:r});for(let o of r.learned_from)c.includes(o)||c.push(o);let l=S("stylenote",o=>g.has(o),s.names.keys());l!==null&&(g.add(l),a.push({cid:p,slug:l,by:f})),y+=1}return d.length===0?{record:null,errors:null,minted:0}:{record:N(u,{ts:new Date().toISOString(),proposal_id:null,nodes:d,edges:[],review:[],supersessions:[],source_head_moves:{},...a.length>0?{names:a}:{}},{graph:s,expectPrev:s.latestHash,intent:{v:1,verb:"distill",args:w({watermark:v,by:f}),pins:{events:c}},provenance:m.provenance}).record,errors:null,minted:y}}export{P as a};
@@ -0,0 +1,11 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{d as V,e as P,f as Ve,k as He}from"./chunk-3RJHXOZH.js";import{b as Pe}from"./chunk-CM4CHYSN.js";import{j as Oe,k as X}from"./chunk-HCJ2N3XB.js";import{e as Re}from"./chunk-3F5FMH76.js";import{e as ge,i as he}from"./chunk-XMPTFXPW.js";import{h as Y}from"./chunk-ZU4W2QGM.js";import{a as Me,b as Ue,c as De,d as te,g as Ce,m as ne,n as G,o as Ae,p as se,q as Be,r as je,s as re,t as Fe,u as Ge}from"./chunk-457Y5TEC.js";import{e as Te}from"./chunk-7NPTL66J.js";import{a as ee,b as Se,c as _e}from"./chunk-JNSWKGTB.js";import{c as Ne,h as Ee}from"./chunk-UUJIGOEO.js";import{j as Le,k as $e}from"./chunk-ZTHYAHDN.js";import{f as xe,g as q,j as Z,n as ve}from"./chunk-AZLNLHUA.js";import{j as ke}from"./chunk-REKHAN53.js";import{b as F}from"./chunk-ZFM77AQU.js";import{b as Q}from"./chunk-RF37IJNN.js";import{B as we,Ha as m,f as pe,p as Ie,w as be}from"./chunk-7HMSMAUG.js";import{a as E,e as ye}from"./chunk-I2MC6VVX.js";import{j as J}from"./chunk-UEE3RZN4.js";import{d as j}from"./chunk-DBMW3VUN.js";import{a as me}from"./chunk-FOJHSG5M.js";import{existsSync as oe,readFileSync as ae,statSync as H}from"fs";import{basename as de,extname as K}from"path";var ie=1024*1024,qe=1e3,Ze=e=>12e4+Math.ceil(e/ie)*1e3,v=e=>e>=ie?`${(e/ie).toFixed(1).replace(/\.0$/,"")} MB`:`${Math.max(1,Math.round(e/1024))} KB`,et=e=>new Promise(i=>setTimeout(i,e)),tt=e=>/^[a-z][a-z0-9+.-]*:/i.test(e)&&!oe(e);async function Ke(e,i,s,l){let o=new Map(l.map(a=>[a.sourceId,a.head])),d=[];for(let a of s){let r=o.get(a.sourceId);(r?await e.mainNode(i,r).then(f=>f.content.blob,()=>null):null)!==F(a.bytes)&&d.push(a)}return d}var nt=new Set(["KIND_MISMATCH","SITE_MOVED","UUID_MOVED","WEB_URL_CHANGED"]);function T(e){let i=e.code==="PLUGIN_HOOK_FAILED"||e.code==="PLUGIN_HOOK_TIMEOUT";return{refusal:{code:e.code,message:e.message,remedy:e.remedy??"check the source, then run the command again",...i?{support:!0}:{}},exit:i?1:2}}async function st(e,i,s){let l=i.plugin.manifest.id,o=ee(e),d;try{d=await _e(i.plugin,"claim",j.hookMs,()=>i.plugin.claim({ref:i.ref,named:i.named,isFile:o}))}catch(t){if(t instanceof Ne)return T(t.refusal);throw t}if(d==null)return T({code:"PLUGIN_NOT_CLAIMED",message:`plugin ${l} does not read ${i.ref}`,remedy:i.named?`drop the ${l}: prefix, or name the plugin that reads it`:"ingest it as a file of a built-in kind"});let a=d.sourceId;if(typeof a!="string")return T({code:"PLUGIN_HOOK_FAILED",message:`plugin ${l} answered claim with something that is not a claim`});let r=s??a;if(!Se(r))return T({code:"PLUGIN_SOURCE_ID_INVALID",message:`${JSON.stringify(r)} is not an id a source may have: it starts with a letter or digit and holds letters, digits and . _ -, at most 128 characters`,remedy:s===void 0?"give the source an id with --as <id>":"give another id with --as <id>"});let y={id:l,ref:i.ref,named:i.named,isFile:o},f=v(j.contentBytes);if(!o)return{item:{kind:"file",path:e,node:`ref:${e}`,file:e,bytes:Buffer.alloc(0),sourceId:r,limit:f,plugin:y}};let I=de(e),c;try{c=ae(e)}catch{return{refusal:m.ingestCantOpen(I),exit:2}}if(c.byteLength>j.contentBytes)return{refusal:m.ingestTooLarge(I,v(c.byteLength),f),exit:2};let{dev:u,ino:p}=H(e);return{item:{kind:"file",path:e,node:`${u}:${p}`,file:I,bytes:c,sourceId:r,limit:f,plugin:y}}}var S=e=>e.kind==="file"?e.path:e.address;function We(e){if(e.provider.name==="web")return`web|${e.sourceId}`;let i=new URL(e.address),s=e.provider.name.startsWith("linear")?`${i.host}/${i.pathname.split("/")[1]??""}`:i.host;return`${e.provider.name}|${s.toLowerCase()}|${e.sourceId}`}var rt=(e,i)=>e.kind==="file"?i.kind==="file"&&e.node===i.node:i.kind==="link"&&We(e)===We(i);async function it(e,i,s){let l=new Map;for(let t of e)l.set(t.sourceId,[...l.get(t.sourceId)??[],t]);let o=[...l.values()].filter(t=>t.length>1);if(o.length===0)return null;let d=i?.map(t=>t.sourceId)??null,a=new Set(o.flatMap(t=>t.slice(1))),r=new Set([...l.keys(),...d??[]]),y=t=>{if(d===null)return null;let R=2;for(;r.has(`${t}-${R}`);)R++;return r.add(`${t}-${R}`),`${t}-${R}`},f=t=>t.kind==="file"?t.path:te(t.provider.name,t.address),I=new Set(i?.filter(t=>t.head!==null).map(t=>t.sourceId)),c=e.filter(t=>!a.has(t)&&I.has(t.sourceId)),u=await s(c.flatMap(t=>t.kind==="file"?[t]:[])),p=e.filter(t=>!a.has(t)&&!u.includes(t));return je(o.map(t=>({names:t.map(f),id:t[0].sourceId})),p.map(S),e.filter(t=>a.has(t)).map(t=>({ref:S(t),as:y(t.sourceId),place:l.get(t.sourceId).indexOf(t)+1})),{reviews:u.flatMap(t=>t.kind==="file"?[{name:t.file,ref:t.path,id:t.sourceId}]:[]),link:c.some(t=>t.kind==="link"),firstTwin:p.some(t=>l.get(t.sourceId).length>1)})}async function Ft(e){try{return await ot(e)}finally{await be()}}async function ot(e){let i=e.mode==="agent",s=n=>i?ke(ge("ndjson",n,e.testing?.agentLines?{stdout:e.testing.agentLines,stderr:()=>{}}:void 0),{atQuestionsOnly:!0}):null,l=s("extract");l&&e.choice.onboarded&&l.event({type:"folder_linked",project_id:e.choice.projectId,project:e.choice.projectName});let o=(n,h,g=!1,O=l)=>O?(O.event({type:"error",code:n.code,message:n.message,...we(n),...n.notAdded?{not_added:n.notAdded}:{}}),O.done(h,"refused")):(g&&e.choice.onboarded?process.stdout.write(`${Oe(e.choice.projectName)}
3
+ `):e.mode==="interactive"&&process.stdout.write(`
4
+ `),X(n),process.stdout.write(`
5
+ `),h),d=(n,h)=>o(n,h,!0),a=(n,h)=>h.length>0?{...n,detail:Fe(h.map(g=>g.name)),notAdded:h.map(g=>g.ref)}:n;if(e.opts.plan)return d(m.notYet("context ingest --plan"),2);if(e.opts.as!==void 0&&e.paths.length>1)return d(Be(e.paths),2);let r=[],y=n=>{r.some(h=>rt(h,n))||r.push(n)},f=q.flatMap(n=>n.extensions).join(" ");for(let n of e.paths){let h=r.map(k=>({name:k.kind==="file"?k.file:te(k.provider.name,k.address),ref:S(k)})),g=(k,Ye)=>d(a(k,h),Ye),O=Ee().route(n,ee);if(O!==null){let k=await st(n,O,e.opts.as);if("refusal"in k)return g(k.refusal,k.exit);y(k.item);continue}if(Le(n)){let k=$e(n);if(!k?.fetch)return g(se(n),2);if(e.opts.as!==void 0&&!J(e.opts.as))return g(m.ingestBadSourceId(e.opts.as),2);y({kind:"link",address:n,provider:k,sourceId:e.opts.as??k.sourceIdFor(n)??n});continue}if(tt(n))return g(se(n),2);let w=de(n),L=Z(n);if(!L.ok)return g(m.ingestUnsupported(`${w} is a file type kane can't ingest (${K(n)||"no extension"}) \u2014 supported: ${f}`),2);if(!oe(n)||!H(n).isFile())return g(m.ingestNoFile(n),2);let D;try{D=ae(n)}catch{return g(m.ingestCantOpen(w),2)}if(D.byteLength>L.media.maxBytes)return g(m.ingestTooLarge(w,v(D.byteLength),v(L.media.maxBytes)),2);if(L.media.sniff&&!L.media.sniff(D))return g(m.ingestNotItsType(w,K(n).slice(1)),2);if(e.opts.as!==void 0&&!J(e.opts.as))return g(m.ingestBadSourceId(e.opts.as),2);let fe;try{fe=e.opts.as??ve(n)}catch{return g(m.ingestNoSourceId(w),2)}let{dev:Je,ino:Qe}=H(n);y({kind:"file",path:n,node:`${Je}:${Qe}`,file:w,bytes:D,sourceId:fe,limit:v(L.media.maxBytes)})}let I=r[0],c;try{c=e.testing?.basicAuth??await Re()}catch(n){if(!(n instanceof he))throw n;return d({code:n.code,message:n.message,...n.remedy?{remedy:n.remedy}:{}},2)}let u=pe({url:e.choice.latticeUrl,basicAuth:c,...e.testing?.run?.fetch?{fetch:e.testing.run.fetch}:{}}),p=e.choice.projectId,t=null,R=null;try{t=await u.sources(p)}catch(n){n instanceof E&&(n.code==="NO_CONTEXT"||n.code==="NOT_FOUND")?t=[]:R=n}let b=await it(r,t,n=>Ke(u,p,n,t??[]));if(b)return d(b,2);if(t===null){let{exit:n,...h}=Pe(R,e.choice,null);return d(h,n)}let x=new Set(t.filter(n=>n.head!==null).map(n=>n.sourceId)),$=r.filter(n=>x.has(n.sourceId)),N=$.flatMap(n=>n.kind==="file"?[n]:[]);if(r.length>1&&N.length>0&&N.length===$.length){let n=await Ke(u,p,N,t);if(n.length>0){let h=n.map(g=>({name:g.file,ref:S(g),id:g.sourceId}));return d(re(h,r.filter(g=>!n.includes(g)).map(S),e.choice.projectName),2)}}let M=r.length===1?$[0]:void 0;if(M){let{reviewNewVersion:n}=await import("./reconcile-remote-BCX6SWFC.js"),h=e.mode==="interactive";h&&!e.choice.onboarded&&process.stdout.write(`using project "${e.choice.projectName}", shared with your team
6
+ `);let g=s("reconcile");return n({choice:e.choice,person:u,basicAuth:c,item:M,...e.opts.as!==void 0?{as:e.opts.as}:{},supported:f,mode:e.mode==="agent"?"agent":h?"interactive":"ci",io:g,refuse:(O,w=2)=>o(O,w,!1,g),projectLine:h,nothing:(O,w)=>`${h?` ${me.green("\u2714")} `:""}${O} is already in "${w}", unchanged`,...e.testing?{testing:e.testing}:{}})}let C=e.testing?.run?.retryDeadlineMs??12e4,ze=dt(e.testing?.remoteDeps),le=[],_=r.map((n,h)=>{let g=at({person:u,choice:e.choice,item:n,first:h===0,then:e.mode==="ci"?"pause":"extract",...e.opts.as!==void 0?{as:e.opts.as}:{},supported:f,retryMs:C,remoteDeps:ze,refusal:O=>a(O,_.slice(0,h).map(w=>({name:w.name??w.file,ref:w.path??w.file}))),alone:O=>re(O.map(w=>{let L=_[w].remote;return{name:_[w].name??_[w].file,ref:S(r[w]),id:r[w].sourceId,...L?{shown:Te({source:r[w].sourceId,page:Ce({...L,address:L.origin.url})})}:{}}}),r.filter((w,L)=>!O.includes(L)).map(S),e.choice.projectName),...e.testing?{testing:e.testing}:{}});return le.push(g.ended),g.step}),ce={verb:"extract",choice:e.choice,start:{kind:"new",body:{projectId:p,verb:"extract",mode:e.mode==="interactive"?"interactive":"agent",sourceId:I.sourceId}},run:{source:I.sourceId,...e.opts.force?{force:!0}:{},...e.opts.trust!==void 0?{trust:e.opts.trust}:{}}},A=e.testing?.remoteDeps?{...e.testing.run,remoteDeps:e.testing.remoteDeps}:e.testing?.run,U;if(e.mode==="interactive"){let{runInteractiveRemote:n}=await import("./interactive-remote-J56EWJGA.js");U=await n({...ce,subject:I.kind==="link"?De(I.provider.name,I.address):I.sourceId,ingest:_,testing:{basicAuth:c,...e.testing?.check?{check:e.testing.check}:{},...A?{run:A}:{},...e.testing?.mount?{mount:e.testing.mount}:{},...e.testing?.onController?{onController:e.testing.onController}:{}}})}else U=await He({...ce,mode:"agent",basicAuth:c,io:l,check:e.testing?.check??Ve,onProgress:()=>{},ingest:_,signals:!0,onRefusal:n=>{X(n),process.stdout.write(`
7
+ `)},...A?{testing:A}:{}});let W=le.map(n=>n()),B=[...W].reverse().find(n=>n.sid!==null)?.sid??null,ue=W.flatMap(n=>n.added!==null?[{name:n.name,status:n.added}]:[]),z=W.find(n=>n.refused!==null)?.refused??null;if(z!==null)return o(z.refusal,z.exit);if(e.mode==="ci"&&ue.length>0&&B!==null){let n=ue.map(({name:h,status:g})=>g==="unchanged"?`${h} is already in "${e.choice.projectName}", unchanged`:g==="versioned"?`added a new version of ${h} to session ${B}, not saved yet`:`added ${h} to session ${B}, not saved yet`);return process.stdout.write(`${n.join(`
8
+ `)}
9
+ extract: kane-cli context extract --resume ${B}
10
+
11
+ `),U}return l?l.done(U):U}function at(e){let{person:i,item:s}=e,l=e.choice.projectId,o={sid:null,added:null,behind:0,unread:!1,refused:null},d=()=>{},a=null,r=s.kind==="link"?s:null,y=e.refusal??(u=>u),f=s.kind==="file"?s.limit:"",I=s.kind==="file"?s.plugin:void 0,c={...I?{plugin:I,...I.isFile?{}:{deferred:!0}}:{},file:s.kind==="file"?s.file:Ue(s.provider.name,s.address),path:s.kind==="file"?s.path:s.address,bytes:s.kind==="file"?s.bytes:Buffer.alloc(0),sourceId:s.sourceId,then:e.then,...r?{fetch:async u=>{u({kind:"fetching",file:c.file,ref:r.address,provider:r.provider.name,...e.first?{subject:!0}:{}});let p=await r.provider.fetch(r.address,e.as,await e.remoteDeps());if(!p.ok){let R=ne(r.provider.name,r.address,p.failure);throw new P(y(R),R.support?1:2,`the fetch refused ${r.address}: ${p.failure.code}`)}let t=p.fetched;if(f=v(t.media.maxBytes),t.bytes.byteLength>t.media.maxBytes)throw new P(y(G(r.provider.name,r.address,v(t.bytes.byteLength),f)),2,`${t.bytes.byteLength} bytes`);c.name=c.file=Me(t),c.bytes=t.bytes,c.sourceId=t.sourceId,c.remote={provider:t.provider,mediaType:t.media.media_type,label:t.label,display:t.display,...t.title!==void 0?{title:t.title}:{},origin:t.origin,identity:t.identity,...t.downloads?{downloads:t.downloads}:{}}}}:{},upload:(u,p)=>{d=u;let{file:t,bytes:R}=c;return ft(i,l,{file:t,name:c.name??t,bytes:R,sourceId:c.sourceId,...c.remote?{typed:{mediaType:c.remote.mediaType,origin:c.remote.origin}}:I?{typed:{mediaType:xe.media_type}}:{},tooLarge:()=>r?G(r.provider.name,r.address,v(R.byteLength),f):m.ingestTooLarge(t,v(R.byteLength),f),supported:e.supported,projectName:e.choice.projectName,onboarded:e.choice.onboarded===!0,progress:u,...e.first?{subject:!0}:{},stopped:p,hashedCapMs:e.testing?.hashedCapMs??Ze(R.byteLength),pollMs:e.testing?.pollMs??qe,seen:e.testing?.onUploadState},b=>a=b).catch(b=>{throw b instanceof P?new P(y(b.refusal),b.exit,b.detail):b})},result:async(u,p,t)=>{if(o.sid=p,I&&a===null){if(u.outcome!=="refused")return!0;t(`the plugin lane refused ${c.file}: ${u.code}: ${u.message}`);let x=T({code:u.code,message:u.message,...u.facts?.remedy?{remedy:u.facts.remedy}:{}});return o.refused??={refusal:y(x.refusal),exit:x.exit},!1}let R=u.outcome==="refused"?{sessionId:p,outcome:"refused",code:u.code,message:u.message}:{sessionId:p,outcome:u.outcome};u.outcome==="refused"&&t(`the conversion refused ${c.file}: ${u.code}: ${u.message}`);let b=await lt(i,l,a,R,e.retryMs,d);if(b.taken?e.testing?.onUploadState?.(a,b.state):t(`the upload's result (${R.outcome}) was not taken: ${b.why}`),u.outcome==="refused"){let{code:x,message:$,facts:N}=u;if(x==="NEW_VERSION_ALONE"&&e.alone)return o.refused??={refusal:e.alone((N?.newVersions??"").split(",").map(Number)),exit:2},!1;let M=v(c.bytes.byteLength),C=r?ut(r.provider.name,r.address,e.choice.projectName,{code:x,message:$,...N?{facts:N}:{}},M,f):I&&x.startsWith("PLUGIN_")?T({code:x,message:$,...N?.remedy?{remedy:N.remedy}:{}}):ct(c.file,x,$,M,f);return o.refused??={refusal:y(C.refusal),exit:C.exit},!1}if(b.taken)return!0;if(o.refused??={refusal:y(m.resultRefused(c.name??c.file)),exit:1},b.refusedBy){let x=b.refusedBy;await i.uploadResult(l,a,{sessionId:p,outcome:"refused",code:x.code,message:x.message}).catch($=>t(`the refused result was not posted: ${$ instanceof Error?$.message:String($)}`))}return!1},cancel:async u=>{a!==null&&await i.uploadResult(l,a,{sessionId:u,outcome:"refused",code:"CANCELLED",message:"stopped before the file was added"})},onAdded:(u,p,t)=>{o.sid=p,o.added=u,o.behind=t.behind??0,o.unread=t.unread===!0},onUnwritten:u=>{o.sid=u,o.refused??={refusal:y(m.resultRefused(c.name??c.file)),exit:1}}};return{step:c,ended:()=>({...o,name:c.name??c.file})}}function dt(e){return async()=>{if(!e)return{credentials:Q};let i=await import(e.module);return{credentials:Q,...i.remoteDepsFor(e.name)}}}function Gt(e){let i=de(e),s=Z(e),l=q.flatMap(a=>a.extensions).join(" "),o=a=>({ok:!1,refusal:a});if(!s.ok)return o(m.ingestUnsupported(`${i} is a file type kane can't ingest (${K(e)||"no extension"}) \u2014 supported: ${l}`));if(!oe(e)||!H(e).isFile())return o(m.ingestNoFile(e));let d;try{d=ae(e)}catch{return o(m.ingestCantOpen(i))}return d.byteLength>s.media.maxBytes?o(m.ingestTooLarge(i,v(d.byteLength),v(s.media.maxBytes))):s.media.sniff&&!s.media.sniff(d)?o(m.ingestNotItsType(i,K(e).slice(1))):{ok:!0,file:i,bytes:d,limit:v(s.media.maxBytes),supported:l}}async function lt(e,i,s,l,o,d){let a=ye(o),r=null;for(;;)try{return{taken:!0,state:(await e.uploadResult(i,s,l)).state}}catch(f){if(r=f,!(f instanceof E))break;if(!f.retryable)return{taken:!1,why:`${f.code}: ${f.message}`,refusedBy:f};let I=c=>d({kind:"retry",attempt:a.attempt,nextInS:Math.ceil(c/1e3),giveUpAt:new Date(a.endsAt()??Date.now()).toISOString(),cause:Ie(f)});if(!await a.again(I))break}let y=await e.getUpload(i,s).catch(()=>null);return y!==null&&y.state===l.outcome&&y.sessionId===l.sessionId?{taken:!0,state:y.state}:{taken:!1,why:`no answer, and the upload reads ${y?.state??"unknown"}: ${r instanceof Error?r.message:String(r)}`}}function ct(e,i,s,l,o){if(i==="FILE_TOO_LARGE")return{refusal:m.ingestTooLarge(e,l,o),exit:2};if(i==="UNSUPPORTED_MEDIA")return{refusal:m.ingestUnsupported(s),exit:2};if(i==="PROJECTION_TOO_LARGE")return{refusal:m.ingestTextTooLarge(e),exit:2};let d=m.conversionRefused(e,i);return{refusal:d,exit:d.support?1:2}}function ut(e,i,s,l,o,d){if(nt.has(l.code))return{refusal:Ae(e,i,l,s),exit:2};if(l.code==="FILE_TOO_LARGE"||l.code==="PROJECTION_TOO_LARGE")return{refusal:G(e,i,o,d),exit:2};let a=ne(e,i,l);return{refusal:a,exit:a.support?1:2}}async function ft(e,i,s,l){let{file:o,name:d,bytes:a}=s,r=(t,R,b)=>{throw new P(t,R,b instanceof Error?b.message:String(b))},y=t=>{if(!(t instanceof E))throw t;return t.code==="UNREACHABLE"?r(/no answer within/.test(t.message)?m.uploadStalled(d):m.uploadDropped(d),/no answer within/.test(t.message)?1:2,t):t.code==="TOO_LARGE"?r(s.tooLarge(),2,t):t.code==="UPLOAD_NOT_OPEN"&&t.extra.state==="expired"?r(m.uploadExpired(d),2,t):t.code==="MARK_REFUSED"?(s.onboarded&&Y(process.cwd()),r(m.markRefused(s.projectName,s.onboarded),2,t)):t.code==="PROJECT_NOT_MARKED"?(s.onboarded&&Y(process.cwd()),r(m.assuranceOff(s.projectName),2,t)):r(m.uploadNotTaken(d),1,t)},f;try{f=await e.openUpload(i,s.typed?{sourceId:s.sourceId,bytes:a.byteLength,mediaType:s.typed.mediaType,...s.typed.origin?{origin:s.typed.origin}:{}}:{sourceId:s.sourceId,filename:o,bytes:a.byteLength})}catch(t){return s.typed&&t instanceof E&&t.code==="BAD_REQUEST"?r(Ge(s.projectName),2,t):t instanceof E&&t.code==="BAD_REQUEST"&&/not a type a source can be/.test(t.message)?r(m.ingestUnsupported(`${o} is a file type kane can't ingest \u2014 supported: ${s.supported}`),2,t):y(t)}l(f.uploadId),s.seen?.(f.uploadId,"open");let I=s.subject?{subject:!0}:{};s.progress({kind:"upload",file:o,sentBytes:0,totalBytes:a.byteLength,...I});let c;try{if({etag:c}=await e.putUpload(f.url,f.headers,a,(R,b)=>s.progress({kind:"upload",file:o,sentBytes:R,totalBytes:b,...I})),s.progress({kind:"upload",file:o,sentBytes:a.byteLength,totalBytes:a.byteLength,...I}),s.stopped())throw new V;let t=await e.completeUpload(i,f.uploadId,c);s.seen?.(f.uploadId,t.state)}catch(t){if(t instanceof V)throw t;t instanceof E&&t.code==="UPLOAD_NOT_OPEN"&&["hashed","created","unchanged","refused"].includes(String(t.extra.state))||y(t)}s.progress({kind:"reading",file:o});let u=Date.now()+s.hashedCapMs,p;for(;;){if(s.stopped())throw new V;try{p=await e.getUpload(i,f.uploadId)}catch(t){return y(t)}if(s.seen?.(f.uploadId,p.state),p.state==="hashed")break;if(p.state==="failed")return r(m.uploadNotTaken(d),1,`the hash failed: ${p.reason?.code??""}`);if(p.state==="expired")return r(m.uploadExpired(d),2,"the upload's window ended");if(Date.now()>=u)return r(m.uploadStalled(d),1,`not hashed within ${s.hashedCapMs} ms (${p.state})`);await et(s.pollMs)}return p.fingerprint!==F(a)?r(m.uploadNotTaken(d),1,`Lattice hashed ${p.fingerprint}, not ${F(a)}`):{uploadId:f.uploadId,fingerprint:p.fingerprint}}export{tt as a,T as b,st as c,Ft as d,at as e,dt as f,Gt as g};
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import{j as n}from"./chunk-NOL7MNZH.js";var o={command:"set-auto-grant-permissions",capability:"auto_grant_permissions",label:"Auto Grant Permissions",onHint:"grant Android runtime permissions at session start (default)",offHint:"leave permission dialogs on screen"},r={command:"set-auto-accept-alerts",capability:"auto_accept_alerts",label:"Auto Accept Alerts",onHint:"accept iOS alerts, incl. permission prompts (default)",offHint:"leave alerts on screen"},s=[{target:"emulator",key:"auto_grant_permissions",...o},{target:"simulator",key:"auto_accept_alerts",...r},{target:"android",key:"android_auto_grant_permissions",...o},{target:"ios",key:"ios_auto_accept_alerts",...r}],g=s.map(e=>e.key);function i(e){return s.find(t=>t.target===e)}function c(e,t){return e?.[i(t).key]!==!1}function u(e,t){return{[i(t).capability]:c(e,t)}}function l(e){return e.label.charAt(0)+e.label.slice(1).toLowerCase()}function d(e){return`${l(e)} (${n(e.target)})`}function m(e,t){let a=c(e,t);return i(t).capability==="auto_grant_permissions"?{autoGrantPermissions:a}:{autoAcceptAlerts:a}}export{s as a,g as b,i as c,c as d,u as e,l as f,d as g,m as h};
2
+ import{j as n}from"./chunk-A7RJQJNT.js";var o={command:"set-auto-grant-permissions",capability:"auto_grant_permissions",label:"Auto Grant Permissions",onHint:"grant Android runtime permissions at session start (default)",offHint:"leave permission dialogs on screen"},r={command:"set-auto-accept-alerts",capability:"auto_accept_alerts",label:"Auto Accept Alerts",onHint:"accept iOS alerts, incl. permission prompts (default)",offHint:"leave alerts on screen"},s=[{target:"emulator",key:"auto_grant_permissions",...o},{target:"simulator",key:"auto_accept_alerts",...r},{target:"android",key:"android_auto_grant_permissions",...o},{target:"ios",key:"ios_auto_accept_alerts",...r}],g=s.map(e=>e.key);function i(e){return s.find(t=>t.target===e)}function c(e,t){return e?.[i(t).key]!==!1}function u(e,t){return{[i(t).capability]:c(e,t)}}function l(e){return e.label.charAt(0)+e.label.slice(1).toLowerCase()}function d(e){return`${l(e)} (${n(e.target)})`}function m(e,t){let a=c(e,t);return i(t).capability==="auto_grant_permissions"?{autoGrantPermissions:a}:{autoAcceptAlerts:a}}export{s as a,g as b,i as c,c as d,u as e,l as f,d as g,m as h};
@@ -0,0 +1,2 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import{a as n,b as r}from"./chunk-22PIMG52.js";function g(){return{currentAttempt:null,liveThinking:"",thinkingLog:[],activity:[]}}var a={dedup_candidate:"checking a possible duplicate",context_read:"checking what's already there",version_history:"checking an item's past versions",corpus_roster:"checking which sources there are",provenance_check:"checking what came from a source",freshness_check:"checking what's out of date",evidence_readback:"checking what the source says",evidence_search:"searching the source",mechanics:"working out the scenarios",owner_provided_source:"adding the source you gave",ambiguity:"asking about something unclear",validation_failed:"fixing a problem in its draft",validation_repair:"fixing a problem in its draft",terminal_call:"putting the result together",finalize:"putting the result together",truncated:"picking up where it stopped",malformed_tool_call:"trying that step again",no_tool_calls:"trying that step again"};function o(t){return a[t.reason_code]??n}function c(t){let e=r({name:t.name});return t.status==="started"?`\u2192 ${e}\u2026`:t.status==="error"||t.status==="aborted"?`\u2717 ${e}`:`\u2713 ${e}`}function s(t,e){return e.turn_id!==t.turn_id?e.turn_id<t.turn_id:e.attempt<t.attempt}function h(t,e){let i=t.currentAttempt;if(i===null||i.turn_id!==e.turn_id||i.attempt!==e.attempt){if(i!==null&&s(i,e))return t;t={...t,currentAttempt:{turn_id:e.turn_id,attempt:e.attempt},liveThinking:""}}switch(e.type){case"reasoning_delta":return{...t,liveThinking:t.liveThinking+e.text};case"reasoning_done":return e.present?{...t,thinkingLog:[...t.thinkingLog,{text:t.liveThinking,tookMs:e.took_ms}],liveThinking:""}:{...t,liveThinking:""};case"tool_activity":return{...t,activity:[...t.activity,{name:e.name,status:e.status,label:c(e)}]};case"decision_activity":return{...t,activity:[...t.activity,{name:e.action,status:"decision",label:o(e)}]}}}export{g as a,h as b};