@testmuai/kane-cli 0.10.0-rc.3 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatSurface-FIYDTZSI.js +2 -0
- package/dist/{ChromeProfilePicker-M4WXOB5O.js → ChromeProfilePicker-Q6FIGVYU.js} +1 -1
- package/dist/{CliFeedbackPrompt-6MJA7DF6.js → CliFeedbackPrompt-2NV2G65E.js} +1 -1
- package/dist/{CliUploadProgress-6NLS7XHH.js → CliUploadProgress-JZ5FXODE.js} +1 -1
- package/dist/{ConfigView-O4WKZ5PU.js → ConfigView-TZ4YINOE.js} +1 -1
- package/dist/EvidenceViewOffer-LKPN5BHX.js +2 -0
- package/dist/FolderPicker-H5K74PCH.js +2 -0
- package/dist/InfoBox-DNSOAK5L.js +2 -0
- package/dist/{LinksBox-DXP66H3H.js → LinksBox-32TZOANP.js} +1 -1
- package/dist/{ProfilesView-TWOY5PVC.js → ProfilesView-UC4MPM54.js} +1 -1
- package/dist/ProjectPicker-ZJ5RW6XL.js +2 -0
- package/dist/SaveSessionPrompt-F327WC7A.js +2 -0
- package/dist/SingleShotApp-OMLRYOSI.js +2 -0
- package/dist/{SummaryBox-IA2KS6GT.js → SummaryBox-XGFO5X76.js} +1 -1
- package/dist/TestMdRunView-ZZ77QTAQ.js +2 -0
- package/dist/TestrunEvidenceTable-G7MPF55X.js +2 -0
- package/dist/{WhoamiView-SNL75TEF.js → WhoamiView-4XIJXMTU.js} +1 -1
- package/dist/{app-download-UI4ABEIX.js → app-download-XEDO3EMV.js} +1 -1
- package/dist/{assurance-job-FFSSS4XV.js → assurance-job-MD65GQLC.js} +1 -1
- package/dist/{auth-7Z54TMQQ.js → auth-WBIEHHDS.js} +1 -1
- package/dist/{binary-THPLXCOD.js → binary-NVYLR36K.js} +1 -1
- package/dist/bind-H3ALI2NG.js +2 -0
- package/dist/bootstrap-JEVSVPQ2.js +2 -0
- package/dist/bridge-2UHJOVLX.js +2 -0
- package/dist/{catalog-MYPS2BXY.js → catalog-5UYBWA4W.js} +1 -1
- package/dist/catalog-client-VVKV4JKW.js +2 -0
- package/dist/{changelog-SU674BVE.js → changelog-FPWJXERY.js} +1 -1
- package/dist/chat-committer-ZKEKJA2R.js +2 -0
- package/dist/chat-controller-FXRJXUG3.js +2 -0
- package/dist/child-JHYENXE7.js +2 -0
- package/dist/chunk-226AGYHB.js +87 -0
- package/dist/{chunk-MNBGG4H3.js → chunk-23DKB2MT.js} +1 -1
- package/dist/{chunk-EECDDDSB.js → chunk-2COXO5LQ.js} +1 -1
- package/dist/{chunk-LUR7JFPP.js → chunk-2GEAKFAV.js} +1 -1
- package/dist/{chunk-7SY34IIL.js → chunk-2QKBXRLI.js} +1 -1
- package/dist/{chunk-AVSMXDTX.js → chunk-2ULYGALF.js} +1 -1
- package/dist/{chunk-JNSWKGTB.js → chunk-32HED7X2.js} +1 -1
- package/dist/{chunk-GRURFGBP.js → chunk-32MFECUA.js} +1 -1
- package/dist/{chunk-MYVKUJGS.js → chunk-35BG2EMW.js} +1 -1
- package/dist/{chunk-3GXN6VF6.js → chunk-3KY7HHQU.js} +1 -1
- package/dist/{chunk-7NPTL66J.js → chunk-3V4J65GN.js} +1 -1
- package/dist/{chunk-457Y5TEC.js → chunk-3YIA3DSL.js} +1 -1
- package/dist/{chunk-36N3EHW5.js → chunk-44SIFDNY.js} +1 -1
- package/dist/{chunk-MEKPGQAM.js → chunk-45NM23EQ.js} +2 -2
- package/dist/{chunk-I2MC6VVX.js → chunk-4C7WVQOD.js} +1 -1
- package/dist/{chunk-TU42YZOJ.js → chunk-4HARMERK.js} +1 -1
- package/dist/{chunk-ICLUC44J.js → chunk-4HYPMGDF.js} +1 -1
- package/dist/{chunk-7KX2BHKG.js → chunk-4KCYNP2K.js} +1 -1
- package/dist/{chunk-IJ2AHSWW.js → chunk-4LGQHTXM.js} +1 -1
- package/dist/{chunk-ETZMFRD6.js → chunk-4NEPHIAO.js} +1 -1
- package/dist/{chunk-3E4ZO73O.js → chunk-54NJJVG5.js} +1 -1
- package/dist/{chunk-734ORT6O.js → chunk-5F44KH3R.js} +1 -1
- package/dist/{chunk-E6KSRQXL.js → chunk-5F5IVART.js} +1 -1
- package/dist/{chunk-EBPRPNSA.js → chunk-5KJU4MG4.js} +1 -1
- package/dist/{chunk-JZP3Y4ZM.js → chunk-5MFPQYW3.js} +1 -1
- package/dist/{chunk-QENCC2ZS.js → chunk-5WLXAQ4H.js} +1 -1
- package/dist/{chunk-RFEON5GN.js → chunk-5XVWT6UK.js} +1 -1
- package/dist/{chunk-W4QSZNMB.js → chunk-6CS23F3E.js} +1 -1
- package/dist/{chunk-DZOYYWOW.js → chunk-6JUS2ULI.js} +1 -1
- package/dist/chunk-6K5BEEAJ.js +2 -0
- package/dist/{chunk-4QFTHUJA.js → chunk-6LEHGRRG.js} +1 -1
- package/dist/{chunk-LSDJOVWW.js → chunk-6SD4XTYC.js} +1 -1
- package/dist/{chunk-TW5AA5A7.js → chunk-6SWHEBPR.js} +1 -1
- package/dist/{chunk-URH4FX3H.js → chunk-6YBH3WUW.js} +1 -1
- package/dist/{chunk-ZAFJQ3SM.js → chunk-73HMW2WA.js} +1 -1
- package/dist/{chunk-NXAJBSIF.js → chunk-75FF7J5R.js} +1 -1
- package/dist/{chunk-P3JXJ4BW.js → chunk-7DLDADQR.js} +1 -1
- package/dist/{chunk-7NCJMWFX.js → chunk-7LYLJ75Z.js} +1 -1
- package/dist/chunk-7O2FIZB7.js +9 -0
- package/dist/chunk-7PCLHURF.js +101 -0
- package/dist/{chunk-PUVMC4PX.js → chunk-7V34ZMMS.js} +1 -1
- package/dist/{chunk-AEWNWAXW.js → chunk-7XJNYLQW.js} +2 -2
- package/dist/{chunk-WEIPY3CI.js → chunk-7ZR5CQY3.js} +1 -1
- package/dist/{chunk-2DYHAP4E.js → chunk-A474TUCE.js} +1 -1
- package/dist/chunk-A4ZV2SHL.js +5 -0
- package/dist/chunk-A7IMHUFY.js +27 -0
- package/dist/{chunk-XLEGGC4Y.js → chunk-ABMM37L2.js} +1 -1
- package/dist/{chunk-NIVFEACM.js → chunk-AUSLHNXQ.js} +1 -1
- package/dist/{chunk-YPFQ4UGF.js → chunk-B226SFOV.js} +1 -1
- package/dist/{chunk-DJC7NTLA.js → chunk-B57ZRHEQ.js} +1 -1
- package/dist/{chunk-CGITGJ3I.js → chunk-BHQIH2FE.js} +1 -1
- package/dist/{chunk-FWUPJORV.js → chunk-BJT6PZXL.js} +1 -1
- package/dist/{chunk-VX657KIK.js → chunk-C6P6YUCR.js} +1 -1
- package/dist/chunk-CB344EDO.js +2 -0
- package/dist/chunk-CCOD4GQJ.js +2 -0
- package/dist/{chunk-ZFM77AQU.js → chunk-CQDCNP7V.js} +1 -1
- package/dist/{chunk-VUFIL5VR.js → chunk-D4QXYAYA.js} +2 -2
- package/dist/{chunk-Y7E5L42F.js → chunk-DLP5S3TO.js} +1 -1
- package/dist/{chunk-35ECWCCK.js → chunk-DXIQVBMI.js} +1 -1
- package/dist/chunk-DXLZCJH5.js +7 -0
- package/dist/{chunk-OJ33Q6DU.js → chunk-E4GIGM5V.js} +1 -1
- package/dist/{chunk-I4WXALQR.js → chunk-EAWU2TOG.js} +1 -1
- package/dist/{chunk-ACMBMZDQ.js → chunk-EEOAU43D.js} +1 -1
- package/dist/{chunk-MYZHOBS4.js → chunk-EHB55V23.js} +1 -1
- package/dist/{chunk-UYDHOHSZ.js → chunk-ENRFXGID.js} +1 -1
- package/dist/{chunk-RTVHJ23A.js → chunk-ET5EK2CM.js} +1 -1
- package/dist/{chunk-EF47KRUK.js → chunk-EZMRWXRT.js} +1 -1
- package/dist/chunk-FAMQ4DHU.js +2 -0
- package/dist/{chunk-C2RUDJ46.js → chunk-FI2DVNRT.js} +1 -1
- package/dist/{chunk-AUJSC7PU.js → chunk-FNUGDPTS.js} +1 -1
- package/dist/{chunk-VLDCHFXF.js → chunk-FOLUB336.js} +1 -1
- package/dist/{chunk-NZ6AV2TA.js → chunk-FYPIF3BE.js} +1 -1
- package/dist/{chunk-HHW6MRU3.js → chunk-G4K3TP2I.js} +1 -1
- package/dist/{chunk-P2ZQDQDB.js → chunk-GAKBHNC4.js} +1 -1
- package/dist/{chunk-DPGOAFKF.js → chunk-GBQ4K25P.js} +1 -1
- package/dist/{chunk-O3HHTKZ5.js → chunk-GEZVC4S3.js} +1 -1
- package/dist/chunk-GJ7MO2FW.js +9 -0
- package/dist/{chunk-EZN7CF45.js → chunk-GJXO6FF7.js} +1 -1
- package/dist/{chunk-QDFY5GGO.js → chunk-GLM5UGTF.js} +1 -1
- package/dist/{chunk-HK62JVQM.js → chunk-GQARXS6F.js} +1 -1
- package/dist/{chunk-I4RVVBG3.js → chunk-GT3JDX5H.js} +1 -1
- package/dist/{chunk-YLXWAY7D.js → chunk-GZQAETB2.js} +1 -1
- package/dist/{chunk-7HMSMAUG.js → chunk-H4TIVILC.js} +5 -5
- package/dist/{chunk-VXGN3IV7.js → chunk-HG2ILWCE.js} +1 -1
- package/dist/{chunk-M43WH5DQ.js → chunk-HHOVANJ7.js} +1 -1
- package/dist/{chunk-CM4CHYSN.js → chunk-HM6LZ2KM.js} +1 -1
- package/dist/{chunk-QDXKEOKI.js → chunk-HNF3PWF3.js} +6 -6
- package/dist/{chunk-R7KXAISS.js → chunk-HVOXMCKE.js} +1 -1
- package/dist/{chunk-D7U2M26S.js → chunk-HWPWCCEV.js} +1 -1
- package/dist/{chunk-XRNQSXOM.js → chunk-HX5OLRKU.js} +2 -2
- package/dist/{chunk-4I7YN6YY.js → chunk-HYJVYYAZ.js} +2 -2
- package/dist/{chunk-CUXY6KQ2.js → chunk-I52NWH4U.js} +1 -1
- package/dist/{chunk-IGEAET7M.js → chunk-IB5WG5YY.js} +1 -1
- package/dist/{chunk-LAOTVZHV.js → chunk-IH73ZCBB.js} +1 -1
- package/dist/{chunk-TU7TVFBK.js → chunk-IT5JVCZN.js} +1 -1
- package/dist/{chunk-54XA5MZH.js → chunk-IZ66FKPC.js} +1 -1
- package/dist/{chunk-44B6THYK.js → chunk-JNPFEBUR.js} +1 -1
- package/dist/{chunk-RX6776AI.js → chunk-JTNEF5ZP.js} +1 -1
- package/dist/{chunk-QBYENBMB.js → chunk-JUVY6PHY.js} +1 -1
- package/dist/{chunk-5AKJPYUW.js → chunk-K4K2BGQC.js} +3 -3
- package/dist/{chunk-HJMCXSUJ.js → chunk-K75WIRI5.js} +1 -1
- package/dist/{chunk-FSYOTRMC.js → chunk-KKLCXRW6.js} +1 -1
- package/dist/{chunk-7YT4TTKL.js → chunk-KN7GZWKK.js} +1 -1
- package/dist/{chunk-ZTHYAHDN.js → chunk-L3BUPFAQ.js} +4 -4
- package/dist/{chunk-7XBNMOH4.js → chunk-LLQWEGXD.js} +1 -1
- package/dist/chunk-LTPOMMAB.js +2 -0
- package/dist/{chunk-CCP4X75B.js → chunk-LWCP4GLY.js} +1 -1
- package/dist/chunk-LXCTV75T.js +12 -0
- package/dist/{chunk-RDP7GWSY.js → chunk-LZGAFKYH.js} +1 -1
- package/dist/{chunk-3QICDXY5.js → chunk-LZPYIFHZ.js} +1 -1
- package/dist/{chunk-3OQW2GTA.js → chunk-M3TFOFUQ.js} +1 -1
- package/dist/{chunk-V7USCQWO.js → chunk-M7Y5GGVJ.js} +1 -1
- package/dist/{chunk-SMTBOSEJ.js → chunk-MEMXFTLD.js} +1 -1
- package/dist/{chunk-D756UWY2.js → chunk-MINDIQET.js} +1 -1
- package/dist/{chunk-ZTRRFG52.js → chunk-MP6NCJFE.js} +1 -1
- package/dist/{chunk-GXKY5A46.js → chunk-MSYRAPDK.js} +1 -1
- package/dist/{chunk-HJLMH7ZM.js → chunk-MUX2A37P.js} +1 -1
- package/dist/{chunk-YHFZFV3A.js → chunk-NCP54AIQ.js} +9 -9
- package/dist/{chunk-ZU4W2QGM.js → chunk-NVD2MXHQ.js} +1 -1
- package/dist/{chunk-FWDUVFS6.js → chunk-O2Y46A3G.js} +17 -17
- package/dist/{chunk-XZGEN4NU.js → chunk-O3TXAMFW.js} +1 -1
- package/dist/{chunk-YGRULEZY.js → chunk-O5KTMDTH.js} +1 -1
- package/dist/{chunk-PAWQ4AKN.js → chunk-OK6NLITG.js} +1 -1
- package/dist/{chunk-7AET4JKQ.js → chunk-OKA6FPJM.js} +1 -1
- package/dist/{chunk-3YTCKCBG.js → chunk-OVNTCBNS.js} +1 -1
- package/dist/{chunk-YQ5C6UDG.js → chunk-P4VFC6HO.js} +1 -1
- package/dist/{chunk-LQQNPMOD.js → chunk-PC22QRIY.js} +1 -1
- package/dist/{chunk-XQMWHPZI.js → chunk-PEUIHME2.js} +1 -1
- package/dist/{chunk-UEE3RZN4.js → chunk-PI7OXS62.js} +1 -1
- package/dist/{chunk-D7TKE7LK.js → chunk-POA336CU.js} +1 -1
- package/dist/{chunk-WZXPF3BI.js → chunk-PR5EGLEI.js} +1 -1
- package/dist/{chunk-YIKF4ERQ.js → chunk-PRBWZXFA.js} +2 -2
- package/dist/{chunk-XZYA7DNH.js → chunk-PVN64537.js} +1 -1
- package/dist/{chunk-VSVWNRI2.js → chunk-PWNYTIVA.js} +1 -1
- package/dist/chunk-Q4JV4U65.js +161 -0
- package/dist/{chunk-LUZBGTYB.js → chunk-Q5AKIQIE.js} +1 -1
- package/dist/{chunk-6EB5VRAN.js → chunk-QB77LRF4.js} +1 -1
- package/dist/{chunk-GQRU3B54.js → chunk-QUNIY6NN.js} +1 -1
- package/dist/{chunk-KODJVOCN.js → chunk-QVMXL675.js} +1 -1
- package/dist/{chunk-LCSJ7GOG.js → chunk-R6TFRAMZ.js} +1 -1
- package/dist/{chunk-4YW767UV.js → chunk-RAVAJZV2.js} +7 -7
- package/dist/{chunk-DDZLCAEO.js → chunk-RDAIOJCR.js} +1 -1
- package/dist/{chunk-RPRXRKKR.js → chunk-RQKMSNEU.js} +1 -1
- package/dist/{chunk-ECPFI75W.js → chunk-RRKYHUOD.js} +1 -1
- package/dist/{chunk-3RJHXOZH.js → chunk-S7XCOBYD.js} +1 -1
- package/dist/{chunk-Q3C6NDGI.js → chunk-SALZ6WSF.js} +1 -1
- package/dist/{chunk-ZFMRQ57Y.js → chunk-SIHX5FW5.js} +1 -1
- package/dist/{chunk-FIP5L6LV.js → chunk-SSOUYKVG.js} +1 -1
- package/dist/{chunk-TNORODUF.js → chunk-SVIIUKJ2.js} +1 -1
- package/dist/{chunk-7RWP4Y3H.js → chunk-T77LTLAD.js} +1 -1
- package/dist/{chunk-NLZZLANH.js → chunk-TAY7J5VS.js} +1 -1
- package/dist/chunk-TD6GCEIK.js +2 -0
- package/dist/{chunk-LKQFG4RW.js → chunk-TM6VLC6V.js} +1 -1
- package/dist/{chunk-YAW6JW6D.js → chunk-TMH4TPMB.js} +1 -1
- package/dist/{chunk-OFSDB7B4.js → chunk-TU2KPOW2.js} +2 -2
- package/dist/{chunk-3BSYOCSW.js → chunk-U2VYTVKV.js} +1 -1
- package/dist/{chunk-LIGTP3A3.js → chunk-UCVP7ZY4.js} +1 -1
- package/dist/{chunk-RHGW7B5Q.js → chunk-UICJ2KLJ.js} +1 -1
- package/dist/chunk-UJLULWSR.js +21 -0
- package/dist/{chunk-OCDBTAYS.js → chunk-UMNCM4RJ.js} +2 -2
- package/dist/{chunk-WOSANGV6.js → chunk-UWPG5MWM.js} +1 -1
- package/dist/{chunk-W6HZF56M.js → chunk-V3OZJO7Y.js} +1 -1
- package/dist/{chunk-3F5FMH76.js → chunk-VE4HLIGA.js} +1 -1
- package/dist/{chunk-RF37IJNN.js → chunk-W2HRX3DR.js} +1 -1
- package/dist/{chunk-NXRF7FFS.js → chunk-W54BX6HC.js} +1 -1
- package/dist/{chunk-IZ65ZPWY.js → chunk-W5HFUBXD.js} +1 -1
- package/dist/{chunk-HAW5WEKT.js → chunk-WEJR2V7R.js} +1 -1
- package/dist/{chunk-F5NHG7VB.js → chunk-X3A4QPA3.js} +1 -1
- package/dist/{chunk-AVI5H4UM.js → chunk-X52YIWGG.js} +1 -1
- package/dist/{chunk-72RC7JSA.js → chunk-X6FCXBXU.js} +1 -1
- package/dist/{chunk-PZA3BSOE.js → chunk-X7S7IGCV.js} +1 -1
- package/dist/{chunk-6DZX5HLZ.js → chunk-XCUF5AVM.js} +1 -1
- package/dist/{chunk-F22K3RRX.js → chunk-XHFU5TGS.js} +1 -1
- package/dist/chunk-XNXJXGVB.js +4 -0
- package/dist/{chunk-C62QWG4B.js → chunk-XZ6J3Y2W.js} +1 -1
- package/dist/{chunk-JGRXMTME.js → chunk-YDB72F4K.js} +1 -1
- package/dist/{chunk-7DFBOVUB.js → chunk-YJAQZMJT.js} +1 -1
- package/dist/chunk-YO6SNXBJ.js +2 -0
- package/dist/{chunk-AZLNLHUA.js → chunk-Z24SD2EJ.js} +1 -1
- package/dist/{chunk-HQ2E2XCU.js → chunk-Z36KVIRR.js} +1 -1
- package/dist/{chunk-WAOUE7MP.js → chunk-Z6SI7YNV.js} +1 -1
- package/dist/{chunk-6NFOH4AC.js → chunk-ZAQGIC33.js} +1 -1
- package/dist/{chunk-6UVIY56J.js → chunk-ZCL7XIVS.js} +1 -1
- package/dist/{chunk-UUJIGOEO.js → chunk-ZDCXWEQG.js} +1 -1
- package/dist/{chunk-SGPAM5DZ.js → chunk-ZDQYGLCZ.js} +1 -1
- package/dist/{chunk-42PALMW2.js → chunk-ZHAMVLQZ.js} +1 -1
- package/dist/{chunk-W7FLXW6Q.js → chunk-ZMWTRXFH.js} +1 -1
- package/dist/{chunk-KXHJMAZU.js → chunk-ZO3ZAMUU.js} +2 -2
- package/dist/{chunk-L5DALV5N.js → chunk-ZZZGTDYE.js} +1 -1
- package/dist/commands-R5AYK6XM.js +2 -0
- package/dist/{committer-JGY66PFM.js → committer-UO3B3S5Y.js} +1 -1
- package/dist/{config-754B73XK.js → config-YMHI3H3Y.js} +1 -1
- package/dist/cover-cmd-DVQIGFDY.js +2 -0
- package/dist/{credentials-F7DYLVWY.js → credentials-BCR73VGS.js} +1 -1
- package/dist/{deps-bundle-PW3WEQJ7.js → deps-bundle-6WLX44OA.js} +1 -1
- package/dist/{deps-resolve-SQYVN76L.js → deps-resolve-DSAKPZ3T.js} +1 -1
- package/dist/{design-chat-F3OEZPNJ.js → design-chat-YUI2JPO6.js} +1 -1
- package/dist/design-committer-7YIPFKMO.js +2 -0
- package/dist/design-headless-KIP6R7UV.js +2 -0
- package/dist/{design-remote-2BEGCVCX.js → design-remote-XMSHDDUX.js} +2 -2
- package/dist/device-env-K7J5NN66.js +2 -0
- package/dist/dispatch-BV6XMCN3.js +2 -0
- package/dist/{doctor-XY26Z35T.js → doctor-PGTNOMSP.js} +1 -1
- package/dist/{docx-convert-6IZO5P5K.js → docx-convert-DO5AQYD3.js} +1 -1
- package/dist/{dossier-NROC2MCY.js → dossier-5XKNAK6Q.js} +1 -1
- package/dist/evidence-RO3RDZXO.js +2 -0
- package/dist/evidence-presentation-LSFOZGLH.js +2 -0
- package/dist/evolve-cmd-U2ALVGMT.js +2 -0
- package/dist/evolve-remote-K2MCCVMM.js +2 -0
- package/dist/{exit-manager-EDHCETUN.js → exit-manager-EGWAZHCR.js} +1 -1
- package/dist/{explain-cmd-VYAANFFZ.js → explain-cmd-KNDORU2D.js} +1 -1
- package/dist/{explain-cmd-OP5I5W3O.js → explain-cmd-UWK5YVXG.js} +1 -1
- package/dist/explore-S2BGQUIF.js +2 -0
- package/dist/{explore-context-tty-RZ7D2TBV.js → explore-context-tty-WJHUSP3A.js} +1 -1
- package/dist/{explore-entry-EKXJ67BD.js → explore-entry-3EX2T3NS.js} +4 -4
- package/dist/{explore-live-2YVRAQZO.js → explore-live-TRY5A2ME.js} +1 -1
- package/dist/{explore-run-tty-D47FGPX7.js → explore-run-tty-ZV5XFKZA.js} +2 -2
- package/dist/{extract-bind-W2NET364.js → extract-bind-TXUBMK3T.js} +3 -3
- package/dist/extract-chat-VPYDGQKO.js +2 -0
- package/dist/{extract-cmd-FTFLETOP.js → extract-cmd-YUOYMVF5.js} +2 -2
- package/dist/extract-headless-UWTAPOET.js +2 -0
- package/dist/{feeder-NY45UFJK.js → feeder-NGWIPZ26.js} +1 -1
- package/dist/folder-flags-WV7UV3JG.js +2 -0
- package/dist/gaps-cmd-PFV3FZCM.js +3 -0
- package/dist/gate-7ALXLCNB.js +2 -0
- package/dist/gate-NB5CJMTN.js +2 -0
- package/dist/{generate-headless-RURIEKVS.js → generate-headless-KMBBZTLS.js} +2 -2
- package/dist/hold-passthrough-JGHWMYDM.js +2 -0
- package/dist/impact-cmd-PW33L5RF.js +11 -0
- package/dist/index.js +4150 -180
- package/dist/ingest-ZHHHBUXR.js +2 -0
- package/dist/{ingest-cmd-4G2AK4Y2.js → ingest-cmd-MXYILQLV.js} +3 -3
- package/dist/ingest-remote-2EEJP6ML.js +2 -0
- package/dist/install-7J34AYB6.js +2 -0
- package/dist/{interactive-bind-SI2ZS55Q.js → interactive-bind-FDWJUTI6.js} +4 -4
- package/dist/{interactive-remote-J56EWJGA.js → interactive-remote-O2Q2FNOH.js} +2 -2
- package/dist/lane-CNGO7LH5.js +2 -0
- package/dist/lattice-auth-TXNDLHM6.js +2 -0
- package/dist/{lifecycle-cmd-HJ37LTXE.js → lifecycle-cmd-GFHDBRXX.js} +1 -1
- package/dist/{list-cmd-6XL2FYLQ.js → list-cmd-RR75PMPE.js} +1 -1
- package/dist/list-commands-3QGZWJ5P.js +2 -0
- package/dist/{list-remote-LXPQNXYN.js → list-remote-AA3VSWOI.js} +1 -1
- package/dist/{locks-cmd-JJ2QNTNY.js → locks-cmd-AZKCSGHI.js} +1 -1
- package/dist/{logical-ids-RXAQJZ3T.js → logical-ids-74PLU3VR.js} +1 -1
- package/dist/login-flow-ZQ6UFTS2.js +2 -0
- package/dist/{maintenance-cmd-BXXHP36K.js → maintenance-cmd-OHGVARQ2.js} +1 -1
- package/dist/{mobile-prompts-CECJ5UY2.js → mobile-prompts-FZRKLLTN.js} +1 -1
- package/dist/{objective-variable-gate-3Z7DNVVC.js → objective-variable-gate-V5HHFOUS.js} +1 -1
- package/dist/{onboarding-PDVYMTY5.js → onboarding-NXGMV3VG.js} +1 -1
- package/dist/open-provider-XDJKT3W3.js +2 -0
- package/dist/pdf-convert-YB6PJFMI.js +2 -0
- package/dist/persist-recorded-session-INFN4JZT.js +3 -0
- package/dist/phase-seed-ZZSJME7M.js +2 -0
- package/dist/pipeline-MVZRI6YZ.js +2 -0
- package/dist/policy-commands-3YJ6YCDN.js +8 -0
- package/dist/prepare-target-DII5WZCX.js +2 -0
- package/dist/{pull-cmd-UPFQYUND.js → pull-cmd-XZN53XFZ.js} +1 -1
- package/dist/pull-route-R33BVADE.js +2 -0
- package/dist/readmodel-TRV4E3MW.js +2 -0
- package/dist/real-device-run-DGENHGUV.js +2 -0
- package/dist/{reconcile-cmd-JBH365JL.js → reconcile-cmd-KFPRCCJB.js} +4 -4
- package/dist/reconcile-deps-UDQBWSLE.js +2 -0
- package/dist/{reconcile-remote-BCX6SWFC.js → reconcile-remote-6WISFGRG.js} +2 -2
- package/dist/{recording-banner-YKBAL6UB.js → recording-banner-XOX2CDCF.js} +1 -1
- package/dist/registry-NV3EMDMK.js +2 -0
- package/dist/remote-entry-BCTFT643.js +2 -0
- package/dist/remote-mode-4HN27MD4.js +4 -0
- package/dist/{remote-words-YVB66R3F.js → remote-words-LFDYKIZ7.js} +1 -1
- package/dist/{require-project-folder-MLMEQJYP.js → require-project-folder-ZK4JJCDB.js} +1 -1
- package/dist/{resolve-run-intent-PC7TQZUL.js → resolve-run-intent-LYLVNNDZ.js} +1 -1
- package/dist/{resolver-EID34LQE.js → resolver-RMHGGYRP.js} +1 -1
- package/dist/revert-QKHPCRT6.js +2 -0
- package/dist/{review-cmd-EUHFLFMY.js → review-cmd-UGF2FC5Y.js} +1 -1
- package/dist/run-CSYGVV3D.js +2 -0
- package/dist/run-YUHHD54J.js +2 -0
- package/dist/{run-channel-63SVP5OI.js → run-channel-IIIYXOIW.js} +1 -1
- package/dist/run-remote-BGKQDAOA.js +2 -0
- package/dist/{run-startup-gate-YO66G6LS.js → run-startup-gate-4XE73OON.js} +1 -1
- package/dist/run-test-md-G6U3RU2Q.js +19 -0
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-CFV7FOIT.js → sessions-NH2EG7BP.js} +1 -1
- package/dist/{sessions-cmd-S7WZBUCN.js → sessions-cmd-CABAX7BO.js} +2 -2
- package/dist/{sessions-remote-IWHWIQ2T.js → sessions-remote-Y4FTZL7Y.js} +1 -1
- package/dist/{skill-installer-MAVQY6GW.js → skill-installer-FS2AV7GX.js} +1 -1
- package/dist/spawner-MQ4XEHIX.js +2 -0
- package/dist/{store-MSA7KASS.js → store-PLKJZTGC.js} +1 -1
- package/dist/store-choice-UAB6Z4AL.js +2 -0
- package/dist/store-guard-DUN2X3SR.js +2 -0
- package/dist/{store-site-KA2DNBGY.js → store-site-K5NHLI7D.js} +1 -1
- package/dist/stream-warnings-GM7YEOVG.js +2 -0
- package/dist/sync-cmd-AGTOGPYM.js +2 -0
- package/dist/{sync-setup-RBRDUV7Q.js → sync-setup-4KIY3PDO.js} +1 -1
- package/dist/tcg-generate-CUY4AZ2V.js +2 -0
- package/dist/{test-definition-VRI4YIYL.js → test-definition-53XNBEDE.js} +1 -1
- package/dist/testmd-actions-UD6PAWUX.js +2 -0
- package/dist/{testmd-sync-UPAA5UMD.js → testmd-sync-EEJ7GPLR.js} +1 -1
- package/dist/tms-client-XWCR7O7J.js +2 -0
- package/dist/token-refresh-K6PVBBFE.js +2 -0
- package/dist/{trust-gate-AT2XBWN4.js → trust-gate-674C2NZS.js} +1 -1
- package/dist/{turn-preflight-LHYLRL7G.js → turn-preflight-R4PU6NYY.js} +1 -1
- package/dist/{use-case-ref-NE4X4MZN.js → use-case-ref-44BPIP4N.js} +1 -1
- package/dist/{validate-basic-M5JHHNZA.js → validate-basic-3JZRZL45.js} +1 -1
- package/dist/{variable-receipt-BXSZO36E.js → variable-receipt-7PRKDTRJ.js} +1 -1
- package/dist/verdicts-PVB7TV5S.js +2 -0
- package/dist/{version-check-Q737BE65.js → version-check-IY3YSQIP.js} +1 -1
- package/dist/{view-cmd-XSNL5DGI.js → view-cmd-WUIGTRFX.js} +1 -1
- package/dist/{walk-session-SHGYLFRB.js → walk-session-EH7227WR.js} +1 -1
- package/dist/with-telemetry-7JMZUBUZ.js +2 -0
- package/package.json +17 -17
- package/dist/ChatSurface-6NZGMNHL.js +0 -2
- package/dist/EvidenceViewOffer-WIEWCZUP.js +0 -2
- package/dist/FolderPicker-AF7ZMV3M.js +0 -2
- package/dist/InfoBox-D7GGZJU4.js +0 -2
- package/dist/ProjectPicker-OBYHJJLU.js +0 -2
- package/dist/SaveSessionPrompt-7XSHS4NL.js +0 -2
- package/dist/SingleShotApp-XQUDR36R.js +0 -2
- package/dist/TestMdRunView-LS2QUFWR.js +0 -2
- package/dist/TestrunEvidenceTable-HNDVJDIF.js +0 -2
- package/dist/bind-4XWK3DG2.js +0 -2
- package/dist/bootstrap-6ACT4ALI.js +0 -2
- package/dist/bridge-T6QMYKED.js +0 -2
- package/dist/chat-committer-ZCSRJEUB.js +0 -2
- package/dist/chat-controller-XINCDH6Z.js +0 -2
- package/dist/child-G2GCW73X.js +0 -2
- package/dist/chunk-34R7BNZ2.js +0 -2
- package/dist/chunk-65VANXOF.js +0 -147
- package/dist/chunk-C6HI6Y3S.js +0 -2
- package/dist/chunk-D36V5OX6.js +0 -2
- package/dist/chunk-HCJ2N3XB.js +0 -12
- package/dist/chunk-IUQOG7Z5.js +0 -5
- package/dist/chunk-KF4DKXSS.js +0 -2
- package/dist/chunk-NC7D7GOM.js +0 -21
- package/dist/chunk-OGFU4YY4.js +0 -2
- package/dist/chunk-R4JUKTDO.js +0 -2
- package/dist/chunk-VZ4A6WMK.js +0 -97
- package/dist/chunk-W54OT2FU.js +0 -9
- package/dist/chunk-W72ACCFL.js +0 -27
- package/dist/chunk-WXJCJL5L.js +0 -7
- package/dist/cover-cmd-NBNZCR6C.js +0 -2
- package/dist/design-committer-TRYP3LOZ.js +0 -2
- package/dist/design-headless-OTHYOX3E.js +0 -2
- package/dist/device-env-CHFRRV6W.js +0 -2
- package/dist/dispatch-DVQ3H7EJ.js +0 -2
- package/dist/evidence-P6FFKC7B.js +0 -2
- package/dist/evidence-presentation-YYTIDCBS.js +0 -2
- package/dist/evolve-cmd-WWOB3QJR.js +0 -2
- package/dist/evolve-remote-WLVY3QID.js +0 -2
- package/dist/explore-K5YBGHK6.js +0 -2
- package/dist/extract-chat-M65NWGUK.js +0 -2
- package/dist/extract-headless-G6W6JQ27.js +0 -2
- package/dist/folder-flags-KKIH654K.js +0 -2
- package/dist/gaps-cmd-OIDDLRYL.js +0 -3
- package/dist/gate-7AKRPRMK.js +0 -2
- package/dist/gate-WISOUTHQ.js +0 -2
- package/dist/hold-passthrough-IOWPVB4W.js +0 -2
- package/dist/ingest-PDGS5ZTL.js +0 -2
- package/dist/ingest-remote-SSLUHQVG.js +0 -2
- package/dist/install-ZVBHPXGP.js +0 -2
- package/dist/lane-AQYRIW24.js +0 -2
- package/dist/lattice-auth-6FEVSR7E.js +0 -2
- package/dist/list-commands-5DCCKU3L.js +0 -2
- package/dist/login-flow-WEK3E476.js +0 -2
- package/dist/open-provider-OZAG6WZS.js +0 -2
- package/dist/pdf-convert-447ACUB3.js +0 -2
- package/dist/persist-recorded-session-A3ID7JFA.js +0 -3
- package/dist/phase-seed-LCJ4WSYV.js +0 -2
- package/dist/pipeline-GX3LKPI5.js +0 -2
- package/dist/prepare-target-FMT6QFHZ.js +0 -2
- package/dist/pull-route-FWBXJMR7.js +0 -2
- package/dist/readmodel-INMP6MNW.js +0 -2
- package/dist/real-device-run-X7JJWOIK.js +0 -2
- package/dist/reconcile-deps-TWJ3FTSU.js +0 -2
- package/dist/registry-VQC757MJ.js +0 -2
- package/dist/remote-entry-X6JMPC2K.js +0 -2
- package/dist/remote-mode-FDPA7EWG.js +0 -4
- package/dist/revert-FHOBLZWF.js +0 -2
- package/dist/run-5RQUCNYP.js +0 -2
- package/dist/run-PC5YO4AS.js +0 -2
- package/dist/run-remote-SJCRTL7O.js +0 -2
- package/dist/run-test-md-BLNBK4MH.js +0 -17
- package/dist/spawner-C7NLLM4F.js +0 -2
- package/dist/store-choice-3OJCV26J.js +0 -2
- package/dist/store-guard-OOSDLMEC.js +0 -2
- package/dist/stream-warnings-GEQKKJU7.js +0 -2
- package/dist/sync-cmd-RDFDMVKQ.js +0 -2
- package/dist/tcg-generate-KIECTZ2C.js +0 -2
- package/dist/testmd-actions-CMAG6HWI.js +0 -2
- package/dist/tms-client-NXAB6VJD.js +0 -2
- package/dist/token-refresh-KP3AYMYK.js +0 -2
- package/dist/verdicts-XK3GAUX3.js +0 -2
- package/dist/with-telemetry-PM2HVN2B.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h}from"./chunk-
|
|
2
|
+
import{a as h}from"./chunk-4HYPMGDF.js";import{a as A}from"./chunk-HCBYKLMW.js";import{a as c,b as f,i as P}from"./chunk-33DWJV67.js";import{a as B}from"./chunk-6YGTRKDT.js";import{z as l}from"./chunk-FAMQ4DHU.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(B(),1);var n=x(A(),1);function S(r,d,s,u,m){let p=s==="basic"&&u?`basic (${u})`:s,i=20,a=`${r} [${d}]`,g="\xB7".repeat(Math.max(2,i-a.length+3));return{label:`${a} ${g} ${p}`,profile:r,env:d,isActive:m}}function M({creds:r,onSwitch:d,onCancel:s}){let u=r.listProfiles(),m=r.getActiveProfile(),p=r.getDefaultEnv(),i=u.map(e=>{let o=r.loadBasicAuth(e.profile,e.env),t=r.loadCredentials(e.profile,e.env)!==null,v=o?"basic":t?"oauth":"none",b=o?o.username:null,w=e.profile===m&&e.env===p;return S(e.profile,e.env,v,b,w)}),[a,g]=(0,L.useState)(()=>{let e=i.findIndex(o=>o.isActive);return e>=0?e:0});return P((e,o)=>{if(o.escape){s();return}if(o.upArrow){g(t=>Math.max(0,t-1));return}if(o.downArrow){g(t=>Math.min(i.length-1,t+1));return}if(o.return&&i[a]){let t=i[a];t.isActive||d(t.profile,t.env),s();return}}),i.length===0?(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{marginTop:1,children:(0,n.jsx)(f,{color:l.dim,children:"No profiles \u2014 use Login to create one"})}),(0,n.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{flexDirection:"column",marginTop:1,children:i.map((e,o)=>{let t=o===a,v=t?"\u276F ":" ",b=e.isActive?l.green:t?l.orange:void 0;return(0,n.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,n.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{S as a,M as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as p}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-32MFECUA.js";import{a as g}from"./chunk-EHB55V23.js";import{existsSync as f}from"fs";import{isAbsolute as m,join as d,relative as v}from"path";function c(t){let n=f(d(t,".context"))?"assurance.json":"variables.json";return d(".testmuai","variables",n)}function h(t,n){if(!m(t))return t;let e=v(n,t);return e.startsWith("..")?t:e}function w(t,n){let e=t.used_by;if(e.length===0||e.every(s=>s.file===p))return"";if(n===void 0||!e.every(s=>s.file===n))return e.map(s=>`${s.file} step ${s.step}`).join(" \xB7 ");let a=[...new Set(e.map(s=>s.step))].sort((s,i)=>s-i);return a.length===1?`step ${a[0]}`:`steps ${a.join(", ")}`}function b(t,n){let e=new Map,a=new Map,s={header:"Not in any variables file",rows:[],declare:!0};for(let i of t){if(i.reason==="not_a_dataset_column"){let l=i.dataset??"",u=a.get(l);u||(u={header:`Not a column of dataset ${l}`.trimEnd(),rows:[],declare:!1},a.set(l,u)),u.rows.push(i);continue}if(i.reason!=="value_missing"){s.rows.push(i);continue}let r=h(i.file??c(n),n),o=e.get(r);o||(o={header:r===g?"Waiting for a value passed with --variables":`Waiting for a value in ${r}`,rows:[],declare:!1},e.set(r,o)),o.rows.push(i)}return[...e.values(),...a.values(),...s.rows.length>0?[s]:[]]}function $(t,n){let e=c(n);if(f(d(n,e)))return["",` Add ${t.length===1?"it":"them"} to ${e}`];let a=t.map(r=>`${JSON.stringify(r.name)}:`),s=Math.max(...a.map(r=>r.length))+1,i=a.map((r,o)=>` ${r.padEnd(s)}{ "value": "" }${o<a.length-1?",":""}`);return["",` Create ${e}:`,""," {",...i," }"]}function _(t,n){let e=t.length,a=`warning: ${e} variable${e===1?" has":"s have"} no value`,s=Math.max(...t.map(r=>r.name.length),8)+2,i=b(t,n.cwd).map(r=>{let o=[` ${r.header}`];for(let l of r.rows)o.push(` ${l.name.padEnd(s)}${w(l,n.entryFile)}`.trimEnd());return r.declare&&o.push(...$(r.rows,n.cwd)),o.join(`
|
|
3
3
|
`)});return`${a}
|
|
4
4
|
|
|
5
5
|
${i.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{g as o,h as a}from"./chunk-
|
|
2
|
+
import{g as o,h as a}from"./chunk-HHOVANJ7.js";import{mkdirSync as p,writeFileSync as f,chmodSync as d,existsSync as m}from"fs";var y={darwin:"https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute",linux:"https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute",win32:"https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe"};function h(s){let t=y[s];if(!t)throw new Error(`unsupported platform for hyperexecute: ${s}`);return t}async function g(s,t={}){let i=t.platform??process.platform,u=t.existsImpl??m,c=t.fetchImpl??(r=>fetch(r)),e=a(s);if(u(e))return{status:"present",path:e};try{let r=h(i),n=await c(r);if(!n.ok)return{status:"failed",path:e,error:`download failed: HTTP ${n.status}`};let l=Buffer.from(await n.arrayBuffer());return p(o(s),{recursive:!0}),f(e,l),d(e,493),{status:"downloaded",path:e}}catch(r){return{status:"failed",path:e,error:r instanceof Error?r.message:String(r)}}}export{h as a,g as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as s}from"./chunk-HCBYKLMW.js";import{a as m,b as o}from"./chunk-33DWJV67.js";import{
|
|
2
|
+
import{a as s}from"./chunk-HCBYKLMW.js";import{a as m,b as o}from"./chunk-33DWJV67.js";import{z as i}from"./chunk-FAMQ4DHU.js";import{e as x}from"./chunk-UR6MHSHU.js";var t=x(s(),1);function d({label:r,text:c,accent:a,color:n,width:l=15}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(o,{color:i.dim,children:` ${r.padEnd(l)}`}),(0,t.jsx)(o,{color:n??(a?i.assuranceAccent:void 0),children:c})]})}function u({head:r,rows:c,minWidth:a=15}){let n=c.filter(e=>e.text),l=Math.max(a,...n.map(e=>e.label.length+2));return(0,t.jsxs)(m,{flexDirection:"column",children:[r?(0,t.jsx)(o,{bold:!0,children:r}):null,n.map((e,p)=>(0,t.jsx)(d,{label:e.label,text:e.text,color:e.color,width:l},p))]})}export{d as a,u as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as T}from"./chunk-3G2LSTK5.js";import{a as c}from"./chunk-RZ4F3BHX.js";var P=class extends Error{constructor(e,t){super(e);this.problems=t;this.name="PolicyRejectedError"}},p=class extends Error{constructor(e,t){super(e);this.status=t}name="EndTestError"},l=class extends Error{constructor(s){super(`Test Manager couldn't be reached: ${s}`),this.name="TmsUnreachable"}},y=class extends Error{constructor(e,t,r){super(e);this.status=t;this.body=r;this.name="TmsHttpError"}},$=class extends T{constructor(s,e,t){super(s,{username:e,accessKey:t})}async listProjects(s){let e=[],t=!1;for await(let r of this.listProjectsStream({log:s})){if(s&&!t&&r.projects.length>0){let n=r.projects[0];s("info","PROJECT_SAMPLE","Project list sample",{project_id:n.project_id,name:n.name}),t=!0}e.push(...r.projects)}return e}async*listProjectsStream(s){let e=s?.perPage??200,t=s?.maxPages??100,r=s?.signal,n=s?.log,o=s?.name?.trim(),a=0,d=null;for(let i=1;i<=t;i++){if(r?.aborted)return;let g=`${this.baseUrl}/v1/projects?page=${i}&per_page=${e}&sort=${s?.sort??"created_at"}&filter[product]=KTM`;o&&(g+=`&filter[name]=${encodeURIComponent(o)}`);let j=AbortSignal.timeout(15e3),S=r?AbortSignal.any([r,j]):j,m;try{m=await c(g,{method:"GET",headers:this.headers(),signal:S})}catch(h){if(r?.aborted)return;if(i===1)throw h;n?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped mid-page",{page:i,total_loaded:a,error:h instanceof Error?h.message:String(h)}),yield{page:i,projects:[],totalLoaded:a,done:!0,total:d};return}if(!m.ok){if(i===1)throw new Error(`listProjects ${m.status}: ${await m.text()}`);n?.("warn","PROJECTS_STREAM_PARTIAL","stream stopped on non-OK response",{page:i,status:m.status,total_loaded:a}),yield{page:i,projects:[],totalLoaded:a,done:!0,total:d};return}let w=await m.json(),b=w.data??[];a+=b.length;let _=b.length<e;if(typeof w.pagination?.total=="number"&&(d=w.pagination.total),yield{page:i,projects:b,totalLoaded:a,done:_,total:d},_)return}n?.("warn","PROJECTS_STREAM_MAXPAGES","max pages reached",{max_pages:t,total_loaded:a}),yield{page:t,projects:[],totalLoaded:a,done:!0,total:d}}async getProject(s){let e;try{e=await c(`${this.baseUrl}/v1/projects/${encodeURIComponent(s)}`,{method:"GET",headers:this.headers(),signal:AbortSignal.timeout(15e3)})}catch(n){throw new l(n instanceof Error?n.message:String(n))}if(e.status===408||e.status===429)throw new l(`HTTP ${e.status}`);if(e.status>=400&&e.status<500)return null;if(!e.ok)throw new l(`HTTP ${e.status}`);let t;try{t=await e.json()}catch(n){throw new l(`an answer that isn't JSON: ${n instanceof Error?n.message:String(n)}`)}let r=typeof t.data?.name=="string"?t.data.name:typeof t.data?.project_name=="string"?t.data.project_name:null;if(r===null)throw new l("an answer with no project name");return{id:s,name:r}}async getDefaultFolder(s){let e=await c(`${this.baseUrl}/v1/projects/${s}/folder/default`,{method:"GET",headers:this.headers()});if(!e.ok)throw new Error(`Get default folder failed: ${e.status} ${await e.text()}`);return(await e.json()).id}async listFolders(s){let e=await c(`${this.baseUrl}/v1/folder/entity/${s}`,{method:"GET",headers:this.headers()});if(!e.ok)throw new Error(`List folders failed: ${e.status} ${await e.text()}`);return(await e.json()).data??[]}async validateProjectFolder(s,e){let t;try{t=await c(`${this.baseUrl}/v1/folder/entity/${s}`,{method:"GET",headers:this.headers()})}catch{return{project:"error",folder:"error"}}if(t.status>=400&&t.status<500)return{project:"missing",folder:"missing"};if(!t.ok)return{project:"error",folder:"error"};let r;try{r=await t.json()}catch{return{project:"error",folder:"error"}}return{project:"ok",folder:(r.data??[]).some(a=>a.id===e)?"ok":"missing"}}async createProject(s,e=""){let t=await c(`${this.baseUrl}/v1/projects`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({name:s,description:e,tags:[],source:"KTM"})});if(!t.ok){let n=await t.text(),o;try{o=JSON.parse(n)}catch{o=void 0}throw new y(`Create project failed: ${t.status} ${n}`,t.status,o)}let r=await t.json();return{id:r.id,name:s,...r.created===!1?{created:!1}:{}}}async createFolder(s,e,t=""){let r=await c(`${this.baseUrl}/v1/folder`,{method:"POST",headers:{...this.headers(),"Content-Type":"application/json"},body:JSON.stringify({folders:[{name:e,description:t,entity_id:s,entity_type:"project"}]})});if(!r.ok)throw new Error(`Create folder failed: ${r.status} ${await r.text()}`);return{id:(await r.json()).id,name:e}}async createAtmTest(s,e){let t=e?`Bearer ${e}`:this.authHeader,r=await c(`${this.baseUrl}/kane-cli/v1/test`,{method:"POST",headers:{Authorization:t,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)});if(!r.ok)throw new Error(`Create ATM test failed: ${r.status} ${await r.text()}`);let n=await r.json();if(!n.test_id)throw new Error("Create ATM test returned no test_id");return n.test_id}async createAttachedTest(s,e){let t;try{t=await c(`${this.baseUrl}/kane-cli/v1/test`,{method:"POST",headers:{Authorization:e?`Bearer ${e}`:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)})}catch{return{ok:!1,reason:"failed",status:null}}let r=await t.json().catch(()=>null);if(t.status>=500)return{ok:!1,reason:"failed",status:t.status};if(!t.ok){let a=r?.error;return{ok:!1,reason:"refused",code:typeof r?.code=="string"?r.code:typeof a?.code=="string"?a.code:`HTTP_${t.status}`,status:t.status}}let n=typeof r?.test_id=="string"?r.test_id:"";if(n==="")return{ok:!1,reason:"failed",status:t.status};let o=r?.test_case_id;return typeof o!="string"&&typeof o!="number"||String(o)!==s.test_case_id?{ok:!1,reason:"outdated"}:{ok:!0,testId:n}}async createMobileAtmTest(s,e){let t=e?`Bearer ${e}`:this.authHeader,r=await c(`${this.baseUrl}/kane-cli/v1/mobile/test`,{method:"POST",headers:{Authorization:t,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(s)});if(!r.ok)throw new Error(`Create mobile ATM test failed: ${r.status} ${await r.text()}`);let n=await r.json();if(!n.test_id)throw new Error("Create mobile ATM test returned no test_id");return n.test_id}async createBrowserSession(s,e={}){let t=await c(`${this.baseUrl}/kane-cli/v1/browser-sessions`,{...e.signal?{signal:e.signal}:{},method:"POST",headers:{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({metadata:s})});if(!t.ok)throw await f.from(t);let r=await t.json().catch(()=>null);if(typeof r?.id!="string"||!r.id)throw new Error("Create browser session returned no id");return r.id}async endBrowserSession(s,e={}){let t=await c(`${this.baseUrl}/kane-cli/v1/browser-sessions/${encodeURIComponent(s)}`,{...e.signal?{signal:e.signal}:{},method:"DELETE",headers:{Authorization:this.authHeader,Accept:"application/json"}});if(!t.ok)throw await f.from(t)}async endTest(s,e,t){let r=t?`Bearer ${t}`:this.authHeader,n=new URLSearchParams({commit_id:e.commit_id,time_taken:String(e.time_taken),steps_count:String(e.steps_count),commit_message:e.commit_message}),o={};e.objectives&&e.objectives.length>0&&(o.objectives=e.objectives),e.assurance&&(o.assurance={test:e.assurance.test,definition_id:e.assurance.definitionId});let a;try{a=await c(`${this.baseUrl}/kane-cli/v1/test/${s}?${n.toString()}`,{method:"DELETE",headers:{Authorization:r,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)})}catch(i){throw new p(`End test failed: ${i instanceof Error?i.message:String(i)}`,null)}if(!a.ok){let i=await a.text().catch(g=>g instanceof Error?g.message:String(g));throw new p(`End test failed: ${a.status} ${i}`,a.status)}let d;try{d=await a.json()}catch(i){throw new p(`End test failed: ${i instanceof Error?i.message:String(i)}`,null)}return{testcase_id:d.data?.testcase_id??"",test_id:d.data?.test_id??s,project_id:d.data?.project_id??"",...typeof d.data?.commit_id=="string"?{commit_id:d.data.commit_id}:{}}}async submitFeedback(s,e){let t=e?`Bearer ${e}`:this.authHeader,r={instruction_id:s.instruction_id,test_id:s.test_id,feedback_type:s.feedback_type,mode:s.mode??"human"};s.details&&(r.details=s.details);let n=await c(`${this.baseUrl}/atm/v1/generative-feedback`,{method:"POST",headers:{Authorization:t,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(`Submit feedback failed: ${n.status} ${await n.text()}`);return await n.json()}async createPolicy(s){let e=await c(`${this.baseUrl}/kane-cli/v1/policies`,{method:"POST",headers:this.headers(),body:JSON.stringify({project_id:s.projectId,content:s.content,sha256:s.sha256})});if(e.status===422){let t=await e.text(),r={};try{r=JSON.parse(t)}catch{throw new Error(`Policy create failed: 422 ${t}`)}throw new P(typeof r.message=="string"?r.message:"policy rejected",r.errors?.problems??[])}if(!e.ok)throw new Error(`Policy create failed: ${e.status} ${await e.text()}`);return await e.json()}async listPolicies(s){let e=new URLSearchParams;s.projectId&&e.set("project_id",s.projectId),s.search&&e.set("search",s.search),e.set("page",String(s.page)),e.set("per_page",String(s.perPage));let t=await c(`${this.baseUrl}/kane-cli/v1/policies?${e}`,{headers:this.headers()});if(!t.ok)throw new Error(`Policy list failed: ${t.status} ${await t.text()}`);let r=await t.json(),n=r.pagination;return{policies:r.data,page:n.current_page,lastPage:n.last_page,perPage:n.per_page,total:n.total}}async getPolicy(s){let e=await c(`${this.baseUrl}/kane-cli/v1/policy/${encodeURIComponent(s)}`,{headers:this.headers()});if(e.status===404)throw new Error(`no policy with id "${s}" in Test Manager`);if(!e.ok)throw new Error(`Policy read failed: ${e.status} ${await e.text()}`);return await e.json()}async ingestEvidence(s,e,t={}){let r=await c(`${this.baseUrl}/kane-cli/v1/evidence/ingest`,{method:"POST",headers:{Authorization:this.authHeader,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({evidence_id:s,project_id:e,...t})});if(!r.ok)throw new y(`Evidence ingest failed: ${r.status} ${await r.text()}`,r.status)}},f=class u extends Error{constructor(e,t,r,n){super(`Browser session failed: ${e} ${t}`);this.status=e;this.text=t;this.code=r;this.detail=n;this.name="BrowserSessionRefusal"}static async from(e){let t=await e.text().catch(()=>""),r=null;try{r=JSON.parse(t)}catch{}let n=r?.error&&typeof r.error=="object"?r.error:null,o=a=>typeof a=="string"&&a.trim()?a:null;return new u(e.status,t,o(r?.errorCode)??o(r?.code)??o(n?.code),o(r?.message)??o(n?.message))}};export{P as a,p as b,l as c,y as d,$ as e,f};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as A,d as C}from"./chunk-
|
|
2
|
+
import{c as A,d as C}from"./chunk-BJT6PZXL.js";import{e as x}from"./chunk-5D7ENQTQ.js";import{b,e as R}from"./chunk-KN7GZWKK.js";import{f as D,h as S,l as E}from"./chunk-V3OZJO7Y.js";import{b as I,c as _,g as N,h as k}from"./chunk-Y6Y6RAY4.js";import{b as h}from"./chunk-75FF7J5R.js";import{a as v}from"./chunk-FI2DVNRT.js";import{h as y}from"./chunk-A7RJQJNT.js";import{mkdirSync as H,writeFileSync as q}from"fs";import{join as z}from"path";function P(e,t=process.env){return t.KANE_MOBILE_APP_BASE_URL||v(e).mobileAppBaseUrl}var J="device-config.json",$=new WeakMap;function G(e,t){let r=$.get(e)??new Map;$.set(e,r);let o=JSON.stringify([t.path,t.type,t.env,t.orgId]),i=r.get(o);if(i)return i;let n=e(t).finally(()=>r.delete(o));return r.set(o,n),n}function T(e){return e.startsWith("lt://")?e:`lt://${e}`}async function X(e,t){let r=await E(e.env,e.platform,{...e.selection.deviceName?{deviceName:e.selection.deviceName.value}:{},...e.selection.osVersion?{osVersion:e.selection.osVersion.value}:{}},t);if(r.kind==="unchecked"&&e.onWarning?.(`${r.reason} \u2014 the run continues, but the device and OS version are not checked before the session is requested.`),r.kind==="refused")throw new Error(r.detail)}async function Y(e,t){let r=e.selection.app.value.trim();if(h(r))return T(r);let o=e.credentials;if(!o?.orgId)throw new Error(`${r} has to be uploaded before it can run on a real device, but your account's org id was not found. Run kane-cli login, or set app: to an app ID from \`kane-cli apps list --target ${e.platform}\`.`);let i=await G(t,{path:r,type:e.platform,env:e.env,orgId:o.orgId,userId:o.userId??"",auth:{username:o.username,accessKey:o.accessKey,orgId:o.orgId},baseUrl:P(e.env),...e.onProgress?{onProgress:e.onProgress}:{}});if(b(i))throw new Error(`could not upload ${r} for this real-device run: ${i.reason}`);return T(i.appUrl??i.appId)}async function U(e,t={}){if(!e.credentials)throw new Error("a real-device run needs your TestMu AI username and access key, and none were found. Run kane-cli login, or pass --username and --access-key.");await X(e,t.fetchCatalog??S);let r=await Y(e,t.upload??R),{deviceName:o,osVersion:i}=e.selection,n={platform_name:e.platform,device_name:o?.value??D,...i?{platform_version:i.value}:{},app:r,...e.testName?{test_name:e.testName}:{},...e.tcId?{"tms.tc_id":e.tcId}:{},...e.capabilities},s=z(e.outDir,J);return H(e.outDir,{recursive:!0}),q(s,`${JSON.stringify(n,null,2)}
|
|
3
3
|
`),{device:{platform:e.platform,target:e.platform,device_config_path:s},...o?{deviceName:o.value}:{},...i?{osVersion:i.value}:{},app:r}}import{createServer as Q}from"http";import{randomBytes as Z}from"crypto";import{spawn as ee}from"child_process";import{mkdtempSync as re,readdirSync as te,readFileSync as oe,rmSync as ie,writeFileSync as ne}from"fs";import{tmpdir as W}from"os";import{join as w}from"path";function M(e,t,r,o){let i=Buffer.from(`${o.username}:${o.accessKey}`).toString("base64"),n=new URLSearchParams({session:r,auth:i});return t==="ios"&&n.set("mode","webrtc"),`${e.replace(/\/+$/,"")}/?${n.toString()}`}function V(e){return e.replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`)}function ae(e){return`<!doctype html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as y,e as k}from"./chunk-
|
|
2
|
+
import{c as y,e as k}from"./chunk-CB344EDO.js";import{spawn as A}from"child_process";var S=new Set(["progress","ask_user","graph_query","ingest_request","proposal","design","impact","error","done","reasoning_delta","reasoning_done","tool_activity","decision_activity","text_delta","usage","receipt","chat_ops","session_paused","session_complete","state_checkpoint","turn_retry"]),M=5e3,E=new Set(["done","session_paused","error"]);function R(u,t={}){let a=t.spawnCmd!==void 0?t.spawnCmd:y();if(!a)throw new Error("assurance agent not found \u2014 your platform package may be missing; reinstall kane-cli (npm i -g @testmuai/kane-cli)");let h=u.source.images?.length??0;a.tier==="dev-python"&&h>0&&t.onWarn?.("warn: development agent in use \u2014 if image citations are missing, update the agent package");let n=A(a.cmd,a.args,{stdio:["pipe","pipe","pipe"],env:k(u.session_id,t.auth)});if(n.stdin.on("error",e=>{e.code!=="EPIPE"&&t.onWarn?.(`agent stdin: ${e.message}`)}),n.stdin.write(JSON.stringify(u)+`
|
|
3
3
|
`),n.stdout.setEncoding("utf8"),n.stderr.setEncoding("utf8"),t.onStderr){let e="";n.stderr.on("data",r=>{e+=r;let i;for(;(i=e.indexOf(`
|
|
4
4
|
`))>=0;){let o=e.slice(0,i);e=e.slice(i+1),o.trim()&&t.onStderr(o)}})}let g=!1,d=new Promise(e=>{n.on("exit",(r,i)=>{g=!0,e({code:r,signal:i})})}),p=null,f=()=>(p??=(async()=>{if(g||n.pid===void 0)return;n.kill("SIGTERM");let e=setTimeout(()=>{g||n.kill("SIGKILL")},t.killGraceMs??M);e.unref?.(),await d,clearTimeout(e)})(),p),l,v=()=>{l===void 0&&(l=setTimeout(()=>{f()},t.killGraceMs??M),l.unref?.())};d.then(()=>clearTimeout(l));async function*w(){let e="",r=!1;for await(let i of n.stdout){e+=i;let o;for(;(o=e.indexOf(`
|
|
5
5
|
`))>=0;){let c=e.slice(0,o).trim();if(e=e.slice(o+1),!c)continue;let m;try{m=JSON.parse(c)}catch{t.onWarn?.(`agent: skipping malformed line: ${c.slice(0,120)}`);continue}let s=m;if(!s||typeof s!="object"||!S.has(s.type)){t.onWarn?.(`agent: skipping unknown event type "${s&&typeof s=="object"?String(s.type??"?"):"?"}"`);continue}if(E.has(s.type)&&v(),yield s,s.type==="done"){r=!0;break}}if(r)break}await d.catch(()=>{})}return{events:w(),send:e=>{n.stdin&&!n.stdin.destroyed&&n.stdin.write(JSON.stringify(e)+`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as Tr}from"./chunk-L5DALV5N.js";import{a as dn,c as mn,e as Et,f as Je,g as $r,h as Rr,i as gn,j as Cr}from"./chunk-IJ2AHSWW.js";import{a as ln,b as wr}from"./chunk-YLXWAY7D.js";import{a as St,b as un}from"./chunk-RX6776AI.js";import{a as xr,b as kr,c as vr}from"./chunk-RTVHJ23A.js";import{a as pr,b as ue}from"./chunk-VXGN3IV7.js";import{a as dr}from"./chunk-5Y2G4NC7.js";import{c as Rt}from"./chunk-SMXABALN.js";import{b as fr}from"./chunk-WN5VKKJ3.js";import{b as fn}from"./chunk-HD6NR44L.js";import{e as ze,f as S,g as br}from"./chunk-7NPTL66J.js";import{a as Ct,b as an,c as Ye,d as yr,e as cn}from"./chunk-BWXLZS5O.js";import{b as gr,c as Ge,d as hr}from"./chunk-22PIMG52.js";import{na as mr,oa as on}from"./chunk-UEE3RZN4.js";import{a as ur}from"./chunk-3OQW2GTA.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a as w,b as r,k as Me}from"./chunk-33DWJV67.js";import{a as cr}from"./chunk-6YGTRKDT.js";import{y as o}from"./chunk-D36V5OX6.js";import{e as U}from"./chunk-UR6MHSHU.js";var bn=U(cr(),1);var g=U(cr(),1);var m=U(Y(),1),Wi=60,Vi=100;function hn(e,s){let c=e.options.length,f=c,p=e.multi_select?f++:null,a=e.allow_free_text?f++:null,u=s?f++:null;return{optionCount:c,doneIdx:p,freeIdx:a,batchIdx:u,maxSel:f-1}}var Ki="\xA0",Ui={high:{text:`\u203C${Ki}high`,color:o.red},med:{text:"med",color:"yellow"},low:{text:"low",color:o.dim}};function Hi(e){let s=(e.header??e.text.split(/\s+/).slice(0,3).join(" ")).trim();return s.length>16?`${s.slice(0,15)}\u2026`:s}function Qi(e,s,c){let f=x=>e[x].length+6,p=f(s),a=s,u=s;for(;;){let x=u+1<e.length?f(u+1):1/0,y=a-1>=0?f(a-1):1/0;if(x===1/0&&y===1/0)break;if(x<=y){if(p+x>c)break;p+=x,u+=1}else{if(p+y>c)break;p+=y,a-=1}}return{lo:a,hi:u}}function Sr({batch:e,qView:s,sel:c=0,focused:f=!1,freeText:p=null,optionText:a=null,attach:u=null,multiSelFor:x,childPrefix:y,gapAbove:T=!0}){let{stdout:P}=Me(),V=P?.columns??80,re=V<Wi,C=Math.min(V-1,Vi),b=Math.max(0,Math.min(e.questions.length-1,s??(e.cursor<0?0:e.cursor))),I=e.questions[b],pe=e.resolution[b],q=e.resolution.filter(B=>!B).length,fe=e.questions.length-q,we=St(e),W=hn(I,we!==""),xe=x?x(b):[],ie=Ui[I.risk],Z=B=>f&&c===B?(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"}):" ",A=`? ${y??""}the agent needs ${q===1?"one answer":`${q} answers`}`,Pe=e.questions.length>1?` \xB7 ${b+1} of ${e.questions.length} \xB7 ${fe} answered`:"",H=(0,m.jsxs)(w,{flexDirection:"column",children:[(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsxs)(r,{bold:!0,children:[I.text,ie?(0,m.jsx)(r,{color:ie.color,bold:!1,children:` ${ie.text}`}):null]})}),(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsx)(r,{color:o.dim,children:I.rationale})}),(0,m.jsx)(r,{children:" "}),I.options.map((B,$)=>{let Q=f&&c===$;return a&&a.optionIndex===$?(0,m.jsx)(w,{flexDirection:"column",children:(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:`${$+1}. ${un(B.label)}`}),(0,m.jsx)(r,{color:o.dim,children:" \u270E "})]}),(0,m.jsx)(Rt,{value:a.value,onChange:a.onChange,onSubmit:a.onSubmit,onCancel:a.onCancel,placeholder:B.detail||"type your answer"})]})},`o-${$}`):(0,m.jsxs)(w,{flexDirection:"column",children:[(0,m.jsxs)(r,{children:[Z($)," ",I.multi_select?(0,m.jsx)(r,{color:xe.includes($)?o.green:o.dim,children:xe.includes($)?"[x] ":"[ ] "}):null,(0,m.jsx)(r,{color:Q?o.assuranceAccent:void 0,children:`${$+1}. ${un(B.label)}`}),$===I.recommended_index?(0,m.jsx)(r,{color:o.dim,children:" (recommended)"}):null,pe?.selected_index===$?(0,m.jsx)(r,{color:o.dim,children:" (current)"}):null]}),B.detail?(0,m.jsx)(w,{paddingLeft:5,children:(0,m.jsx)(r,{color:o.dim,children:B.detail})}):null]},`o-${$}`)}),I.multi_select&&W.doneIdx!=null?(0,m.jsxs)(r,{children:[Z(W.doneIdx)," ",(0,m.jsx)(r,{color:o.green,children:"\u2714"}),(0,m.jsx)(r,{color:f&&c===W.doneIdx?o.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,I.allow_free_text?(0,m.jsx)(r,{children:" "}):null,I.allow_free_text?p?(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.dim,children:"\u270E "})]}),(0,m.jsx)(Rt,{value:p.value,onChange:p.onChange,onSubmit:p.onSubmit,onCancel:p.onCancel,placeholder:"Tell me what to do"})]}):(0,m.jsxs)(r,{children:[W.freeIdx!=null?Z(W.freeIdx):" "," ",(0,m.jsx)(r,{color:f&&W.freeIdx!=null&&c===W.freeIdx?o.assuranceAccent:o.dim,children:"\u270E Tell me what to do"})]}):null,u?(0,m.jsxs)(w,{flexDirection:"column",marginTop:1,children:[(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:"@ attach a file or URL"}),(0,m.jsx)(r,{color:o.dim,children:" \u270E "})]}),(0,m.jsx)(Rt,{value:u.value,onChange:u.onChange,onSubmit:u.onSubmit,onCancel:u.onCancel,placeholder:"path or URL"})]}),(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsx)(r,{color:o.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),F=we!==""?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{children:" "}),(0,m.jsxs)(r,{children:[f&&W.batchIdx!=null&&c===W.batchIdx?(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"}):" "," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:"\xBB"}),(0,m.jsx)(r,{bold:!0,color:f&&W.batchIdx!=null&&c===W.batchIdx?o.assuranceAccent:void 0,children:" Go with recommendations"}),q>=5?(0,m.jsx)(r,{color:o.dim,children:` \u2014 resolves all ${q} open`}):null,(0,m.jsx)(r,{color:o.dim,children:" (tab)"})]})]}):null;if(re)return(0,m.jsxs)(w,{marginTop:T?1:0,marginBottom:1,flexDirection:"column",children:[(0,m.jsx)(r,{color:o.assuranceAccent,bold:!0,children:A}),e.questions.length>1?(0,m.jsx)(r,{color:o.dim,children:Pe.replace(/^ · /,"")}):null,(0,m.jsx)(r,{children:" "}),H,F]});let h=e.questions.map(B=>Hi(B)),me=e.questions.length>1?Qi(h,b,C-8):null;return(0,m.jsxs)(w,{marginTop:T?1:0,marginBottom:1,flexDirection:"column",children:[(0,m.jsxs)(r,{color:o.assuranceAccent,children:[(0,m.jsx)(r,{bold:!0,children:A}),Pe?(0,m.jsx)(r,{color:o.dim,children:Pe}):null]}),me?(0,m.jsx)(w,{marginTop:1,children:(0,m.jsxs)(r,{children:[me.lo>0?(0,m.jsx)(r,{color:o.dim,children:"\u25C0 "}):" ",e.questions.slice(me.lo,me.hi+1).map((B,$)=>{let Q=me.lo+$,et=$>0?" ":"";return Q===b?(0,m.jsxs)(r,{children:[et,(0,m.jsx)(r,{backgroundColor:o.assuranceAccent,color:"#0d1117",bold:!0,children:` ${h[Q]} `})]},B.id):(0,m.jsxs)(r,{children:[et,e.resolution[Q]?(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.green,children:"\u2713 "}),(0,m.jsx)(r,{color:o.dim,children:h[Q]})]}):(0,m.jsx)(r,{color:o.dim,children:`\u25CB ${h[Q]}`})]},B.id)}),me.hi<e.questions.length-1?(0,m.jsx)(r,{color:o.dim,children:" \u25B6"}):null]})}):null,(0,m.jsx)(r,{children:" "}),H,F]})}var Er={ac:["acceptance criterion","acceptance criteria"],gap:["open question","open questions"],scenario:["scenario","scenarios"],test:["test","tests"],"use-case":["use-case","use-cases"]},pn=e=>Er[e]?.[1]??`${e}s`,At={label:(e,s)=>s===1?Er[e]?.[0]??e:pn(e),skip:new Set(["exercise"])},xn={ac:null,test:null,gap:null,scenario:"kind"},Xi=(e,s,c)=>`${e} ${e===1?s:c}`,Gi=e=>e.length<2?e.join(""):`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`;function Ar(e){let s=e.covers?on(e.covers):"1 scenario",c=e.verifies.slice(0,2).map(on),f=e.verifiesTotal-c.length,p=c.length===0?Xi(e.verifiesTotal,"acceptance criterion","acceptance criteria"):Gi([...c,...f>0?[`${f} more`]:[]]);return`covers ${s} \xB7 verifies ${p}`}function Dr(e,s){let c=typeof s=="string"&&s!==""?s.split(", "):[],f=p=>typeof p=="string"&&mr.test(p);return{covers:f(e)?e:null,verifies:c.filter(f),verifiesTotal:c.length}}var Dt={"acceptance criteria":{name:"acceptance criteria",next:"scenarios",done:"acceptance criteria say what the use-case must always do"},scenarios:{name:"scenarios",next:"scenario checks",done:"scenarios are the paths a user takes that test the criteria"},"acceptance criteria + exercises":{name:"scenario checks",next:"tests",done:"scenario checks say which criteria each scenario checks"},"tests + gaps":{name:"tests"},tests:{name:"tests"}};function Ze(e){let s=Dt[e]?.name;if(s)return s;let c={exercises:"scenario checks",gaps:"open questions"};return[...new Set(e.split(" + ").map(f=>c[f]??f))].join(" + ")}var Ir={scenarios:"next, scenarios: the paths a user takes that test them","scenario checks":"next, scenario checks: which criteria each scenario checks",tests:"next, tests: runnable tests, and open questions for what can't run"},Br="phases: acceptance criteria \u2192 scenarios \u2192 scenario checks \u2192 tests";var k=U(Y(),1),zi=e=>e.startsWith("designing: ")?`designing: ${Ze(e.slice(11))}`:e;function Yi(e,s){let c=e.form==="assumed"?" (assumed)":e.form==="deferred"?"":" (you)",f=e.note?` \u2014 ${e.note}`:"",p=s?`"${e.stub}"`:`q${e.qNum} ${e.stub}`;return e.form==="deferred"?`\u21B3 deferred ${p}${f}`:e.form==="changed"?`\u21B3 changed ${p}: ${e.prev??"?"} \u2192 ${e.choice??"?"}${c}${f}`:`\u21B3 ${e.form} ${p}: ${e.choice??"?"}${c}${f}`}var Ji=()=>(process.stdout?.columns??100)-12,Zi=new Set(["banner","header","user","agent","worked","childOpen","lines"]);function Lr({block:e,annotations:s,remote:c=!1,afterHeader:f=!1}){let p=e.era??0,{stdout:a}=Me(),u=c||p>0?(a?.columns??100)-p*2:null,x=ns(e,s??null,c,u,(a?.columns??100)-p*2),y=p>0?(0,k.jsx)(w,{marginLeft:p*2,children:x}):x;return f&&!Zi.has(e.kind)?(0,k.jsx)(w,{marginTop:1,children:y}):y}var es=new RegExp("[\\u1100-\\u115F\\u2E80-\\u303E\\u3041-\\uA4CF\\uAC00-\\uD7A3\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE6F\\uFF00-\\uFF60\\uFFE0-\\uFFE6\\u{20000}-\\u{3FFFD}\u2714\u26A0]|\\p{Emoji_Presentation}","u"),It=e=>[...e].reduce((s,c)=>s+(es.test(c)?2:1),0);function ts(e,s,c){let f=Math.max(12,c-It(e)),p=[],a="";for(let u of s){let x=a?`${a} \xB7 ${u}`:u;It(x)>f&&a?(p.push(a),a=u):a=x}return p.push(a),p.map((u,x)=>(x===0?e:" ".repeat(e.length))+u)}function _e(e,s,c){let f=Math.max(12,c-It(e)),p=[],a="";for(let u of s.split(" ")){let x=a?`${a} ${u}`:u;It(x)>f&&a?(p.push(a),a=u):a=x}return p.push(a),p.map((u,x)=>(x===0?e:" ".repeat(e.length))+u)}function ns(e,s,c,f=null,p=100){switch(e.kind){case"banner":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(r,{bold:!0,color:o.assuranceAccent,children:` ${c?zi(e.text):e.text}`})});case"header":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsxs)(r,{color:o.assuranceAccent,children:[`\u25CF ${e.text}`,e.tail?(0,k.jsx)(r,{color:o.dim,children:` \u2014 ${e.tail}`}):null]})});case"user":return(0,k.jsxs)(w,{marginTop:1,children:[(0,k.jsx)(r,{color:o.orange,children:"\u276F "}),(0,k.jsx)(r,{children:e.text})]});case"note":return(0,k.jsx)(r,{color:o.dim,children:` ${e.text}`});case"lines":return(0,k.jsx)(w,{flexDirection:"column",marginTop:1,children:e.lines.map((a,u)=>(0,k.jsx)(r,{...a.dim?{color:o.dim}:{},children:a.text},u))});case"agent":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(kr,{text:e.text,accent:o.assuranceAccent,indent:f===null?0:(e.era??0)*2})});case"worked":return(0,k.jsx)(w,{marginTop:1,flexDirection:"column",children:ts(" \u2699 ",hr(e.durS,e.toolCalls,e.tools),p).map((a,u)=>(0,k.jsx)(r,{color:o.dim,children:a},u))});case"usage":return(0,k.jsx)(r,{color:o.dim,children:` \xB7 ${e.credits.toFixed(1)} credits \u2014 total ${e.total.toFixed(1)}`});case"turn":{let a=s,u=(a?a.fresh:e.items.map((C,b)=>({item:C,num:b+1,updated:!1}))).filter(C=>!(c&&At.skip?.has(C.item.kind??""))),x={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"risk",stylenote:"kind"},y=C=>C.kind??"use-case",T=new Map;for(let C of u){let b=C.item,I=y(C.item),pe=c&&I==="test"?{title:b.title,summary:Ar(b.links??Dr(b.extra?.automates,b.extra?.verifies)),badge:""}:c&&I==="gap"?{title:b.question??"",summary:b.rationale??"",badge:""}:null,q=b.risk==="high"||b.risk==="med"||b.risk==="low"?b.risk:void 0,fe=b.logical_id??(c?b.matched_id:void 0),we={id:fe??"",staged:!fe,...c&&b.held&&!fe?{held:!0}:{},title:pe?.title??b.title,badge:pe?.badge??b.badge??b.risk??"",summary:pe?.summary??b.why??b.summary??b.description??"",...q?{risk:q}:{},...C.updated?{marker:"\u21B3 changed"}:{}},W=T.get(I)??[];W.push(we),T.set(I,W)}let P=u.some(C=>!!C.item.kind),V=(a?.unchanged??[]).reduce((C,b)=>C+b.count,0),re=a?.headerStats?` \u2014 ${a.headerStats}${V>0?` (${V} unchanged)`:""}`:"";return(0,k.jsxs)(w,{flexDirection:"column",marginLeft:2,children:[(0,k.jsxs)(r,{bold:!0,children:[P?"design":e.heading,re?(0,k.jsx)(r,{bold:!1,color:o.dim,children:re}):null]}),[...T.entries()].map(([C,b])=>(0,k.jsxs)(w,{flexDirection:"column",children:[T.size>1?(0,k.jsx)(r,{color:o.dim,children:`${c?pn(C):Ct(C)} \xB7 ${b.length}`}):null,(0,k.jsx)(Tr,{rows:b,width:Ji(),badgeHeader:c&&C in xn?xn[C]:x[C]??"info"})]},C)),a&&a.unchanged.length>0&&(0,k.jsx)(r,{color:o.dim,children:` \u22EE unchanged: ${a.unchanged.map(C=>`${C.count} ${C.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,k.jsx)(r,{color:o.dim,children:Yi(e.receipt,c)});case"continued":return(0,k.jsx)(r,{color:o.dim,children:"\u21B3 continued"});case"childOpen":{if(c)return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(r,{color:o.assuranceAccent,children:`\u25CF ${e.update?S.updateOpen(e.subject,e.changed===!0):S.childOpen(e.verb,e.subject)}`})});let{ing:a}=fn(e.verb);return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsxs)(r,{color:o.assuranceAccent,children:[`\u25CF ${a} ${e.subject}`,e.sid?(0,k.jsx)(r,{color:o.dim,children:` \u2014 ${e.sid}`}):null,e.note?(0,k.jsx)(r,{color:o.dim,children:` ${e.note}`}):null]})})}case"childClose":{if(e.held)return(0,k.jsx)(w,{});if(c&&e.update){let x=[Ge(e.durS),...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]];if(!e.ok)return(0,k.jsx)(r,{color:o.red,children:`\u25CF ${S.updateFailed(e.subject)}`});if(e.untouched)return(0,k.jsx)(r,{children:`\u25CF ${S.updateUntouched(e.subject)} \u2014 ${x.join(" \xB7 ")}`});if(e.unfinished)return(0,k.jsx)(r,{children:`\u25CF ${S.updateUnfinished(e.subject)} \u2014 ${x.join(" \xB7 ")}`});let y=e.testsWritten?S.updateTests(e.testsWritten):null,T=[x[0],...y?[y]:[],...x.slice(1)];return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${S.updateClosed(e.subject,T)}`})}if(c){if(!e.ok)return(0,k.jsx)(r,{color:o.red,children:`\u25CF ${S.childFailed(e.verb,e.subject)}`});if(e.unfinished)return(0,k.jsx)(r,{children:`\u25CF ${[S.childUnfinished(e.verb),[Ge(e.durS),...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]].join(" \xB7 ")].join(" \u2014 ")}`});let x=[Ge(e.durS),...e.tests?[S.childTests(e.verb,e.tests)]:[],...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]];return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${S.childClosed(e.verb,e.subject,x)}`})}let{ed:a}=fn(e.verb);if(!e.ok)return(0,k.jsxs)(r,{color:o.red,children:[`\u25CF ${e.verb} failed \u2014 ${e.exitCode!=null?`exited ${e.exitCode}`:"error"}`,e.fixCmd?(0,k.jsx)(r,{color:o.dim,children:` \xB7 ${e.fixCmd}`}):null]});let u=[Ge(e.durS),...e.results?[e.results]:[],...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]].join(" \xB7 ");return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${a} ${e.subject} \u2014 ${u}`})}case"childBack":return(0,k.jsx)(r,{color:o.dim,children:`back with ${e.parentVerb} \u2014 ${e.context}`});case"commit":if(c&&e.person&&!e.ok&&e.refused?.length){let a=S.approveRefused(e.refused);return(0,k.jsxs)(w,{flexDirection:"column",children:[_e(" \u2717 ",a.line,f??100).map((u,x)=>(0,k.jsx)(r,{color:o.red,children:u},`p-${x}`)),a.notes.flatMap((u,x)=>_e(" ",u,f??100).map((y,T)=>(0,k.jsx)(r,{color:o.dim,children:y},`n-${x}-${T}`)))]})}return(0,k.jsxs)(w,{flexDirection:"column",children:[c&&e.held?_e(" \u2016 ",e.line,f??100).map((a,u)=>(0,k.jsx)(r,{children:a},`h-${u}`)):f!==null?_e(` ${e.ok?"\u2714":"\u2717"} `,e.line,f).map((a,u)=>(0,k.jsx)(r,{color:e.ok?o.green:o.red,children:a},`c-${u}`)):(0,k.jsx)(r,{color:e.ok?o.green:o.red,children:` ${e.ok?"\u2714":"\u2717"} ${e.line}`}),c&&e.refused?.length?S.chatRefused(e.refused).flatMap((a,u)=>_e(" ",a,f??100).map((x,y)=>(0,k.jsx)(r,{color:o.dim,children:x},`r-${u}-${y}`))):(e.warnings??[]).flatMap((a,u)=>!c&&f!==null&&(e.era??0)>0?_e(" \u26A0 ",a,f).map((x,y)=>(0,k.jsx)(r,{color:o.dim,children:x},`w-${u}-${y}`)):[(0,k.jsx)(r,{color:o.dim,children:` \u26A0 ${a}`},`w-${u}`)])]});case"error":return(0,k.jsxs)(ur,{variant:"error",paddingX:1,children:[(0,k.jsx)(r,{color:o.red,children:e.title}),e.detail.map((a,u)=>(0,k.jsx)(r,{color:o.dim,children:a},`d-${u}`))]})}}var Oe=U(Y(),1);function Mr({item:e}){return(0,Oe.jsxs)(w,{flexDirection:"column",marginLeft:2,children:[(e.cite??[]).map((s,c)=>(0,Oe.jsx)(r,{dimColor:!0,children:`cite ${s.anchor??"conv"} \u2014 "${s.quote??""}"`},`cite-${c}`)),(e.depends_on_hint??[]).length>0&&(0,Oe.jsx)(r,{dimColor:!0,children:`depends on: ${(e.depends_on_hint??[]).join(", ")}`}),Object.entries(e.extra??{}).map(([s,c])=>(0,Oe.jsx)(r,{dimColor:!0,children:`${s}: ${c}`},`extra-${s}`))]})}var E=U(Y(),1),kn=(e,s)=>Math.max(0,Math.min(s,e));function Lt(e,s,c){switch(s.type){case"move":return e.level==="detail"?{...e,scroll:Math.max(0,(e.scroll??0)+s.delta)}:{...e,cursor:kn(e.cursor+s.delta,Math.max(0,c-1))};case"enter":return e.level==="list"?{...e,level:"detail",scroll:0}:e;case"back":return e.level==="detail"?{...e,level:"list",scroll:0}:null}}var Or={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function Pr(e,s){if(e.level==="detail")return{level:"detail",cursor:kn(e.num-1,Math.max(0,s.entries.length-1))};if(e.section){let c=s.entries.findIndex(f=>Or[f.kind]===e.section);if(c>=0)return{level:"list",cursor:c}}return{level:"list",cursor:0}}function rs(e){let s=[];for(let c of e.entries){let f=s.find(p=>p.kind===c.kind);f?f.entries.push(c):s.push({kind:c.kind,entries:[c]})}return s}var _r=3;function is({items:e,cursor:s,verb:c,more:f}){let p=`view \xB7 ${c} so far \xB7 ${e.counts.map(u=>`${u.count} ${u.count===1?u.label.replace(/s$/,""):u.label}`).join(" \xB7 ")}`,a=e.entries[s];return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{bold:!0,color:o.assuranceAccent,children:p}),rs(e).map(({kind:u,entries:x})=>{let y=a?.kind===u,T=y?x.findIndex(C=>C.num===a.num):-1,P=y?kn(T-1,Math.max(0,x.length-_r)):0,V=x.slice(P,P+(y?_r:1)),re=x.length-V.length;return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{color:o.dim,children:`${Or[u]??Ct(u)} \xB7 ${x.length}`}),V.map(C=>{let b=y&&C.num===a.num,I=C.item.badge;return(0,E.jsxs)(r,{children:[(0,E.jsx)(r,{color:o.assuranceAccent,children:b?"\u203A ":" "}),(0,E.jsx)(r,{children:`${C.num} \xB7 ${C.item.title}`}),I?(0,E.jsx)(r,{color:o.dim,children:` \xB7 ${I}`}):null]},`${C.kind}:${C.num}`)}),re>0&&(0,E.jsx)(r,{color:o.dim,children:` \u22EE ${re} more`})]},u)}),f?(0,E.jsxs)(r,{children:[(0,E.jsx)(r,{color:o.assuranceAccent,children:s===e.entries.length?"\u203A ":" "}),(0,E.jsx)(r,{color:o.dim,children:`\u22EF show all \u2014 ${f.hidden} more from earlier turns`})]}):null]})}var Bt=14;function ss({items:e,cursor:s,explain:c,grandTotal:f,dossier:p,scroll:a=0}){let u=e.entries[s];if(!u)return(0,E.jsx)(r,{color:o.dim,children:"nothing to show"});if(p){let y=Math.max(0,Math.min(a,Math.max(0,p.lines.length-Bt))),T=p.lines.slice(y,y+Bt);return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsxs)(r,{bold:!0,children:[`view \xB7 ${p.id}`,p.id.toLowerCase()!==p.rawId?(0,E.jsx)(r,{bold:!1,color:o.dim,children:` \xB7 ${p.rawId}`}):null]}),(0,E.jsx)(r,{bold:!0,children:p.title}),y>0?(0,E.jsx)(r,{color:o.muted,children:`\u22EE ${y} above`}):null,T.map((P,V)=>(0,E.jsx)(r,{color:P.dim?o.dim:void 0,children:P.text},`dl-${V}`)),p.lines.length>y+Bt?(0,E.jsx)(r,{color:o.muted,children:`\u22EE ${p.lines.length-y-Bt} more`}):null]})}let x=u.item;return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{bold:!0,children:`view \xB7 ${u.kind} ${u.num} of ${f??e.entries.length}`}),(0,E.jsx)(r,{children:u.item.title}),x.badge?(0,E.jsx)(r,{color:o.dim,children:`kind: ${x.badge}`}):null,x.why?(0,E.jsx)(r,{color:o.dim,children:x.why}):null,(0,E.jsx)(Mr,{item:u.item}),c?.map((y,T)=>(0,E.jsx)(r,{color:o.dim,children:y},`ex-${T}`)),(0,E.jsx)(r,{color:o.dim,children:"view-only \u2014 approvals happen in chat"})]})}function jr({items:e,state:s,verb:c,more:f,explain:p,grandTotal:a,dossier:u=null}){return s.level==="list"?(0,E.jsx)(is,{items:e,cursor:s.cursor,verb:c,more:f}):(0,E.jsx)(ss,{items:e,cursor:s.cursor,explain:p,grandTotal:a,dossier:u,scroll:s.scroll??0})}var J=U(Y(),1),vn=14;function os(e){let s=[],c=null;for(let f of e)f.field!==c&&(c=f.field,s.push({kind:"field",field:c})),s.push({kind:"line",field:c,line:f});return s}function Fr({title:e,lines:s,offset:c=0,remote:f=!1}){let p=os(s),a=Math.max(0,Math.min(c,Math.max(0,p.length-vn))),u=p.slice(a,a+vn),x=a,y=Math.max(0,p.length-a-vn),T=f?`the change to ${e} \xB7 old \u2192 new`:`view \xB7 diff \xB7 ${e} \xB7 current \u2192 proposed`;return(0,J.jsxs)(w,{flexDirection:"column",children:[(0,J.jsx)(r,{bold:!0,color:o.assuranceAccent,children:T}),x>0?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:`\u22EE ${x} above`})}):null,u.map((P,V)=>P.kind==="field"?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:P.field==="criteria"?f?"acceptance criteria":"criteria":P.field})},`r-${a+V}`):(0,J.jsx)(w,{paddingLeft:4,children:(0,J.jsx)(r,{color:P.line.op==="-"?"red":"green",children:`${P.line.op==="-"?"\u2212":"+"} ${P.line.text}`})},`r-${a+V}`)),y>0?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:`\u22EE ${y} more`})}):null]})}var ls={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function qr(e){let s=(e??"").trim().toLowerCase();if(!s)return{level:"list"};if(/^\d+$/.test(s)){let f=parseInt(s,10);return f>=1?{level:"detail",num:f}:{error:"items are numbered from 1 \u2014 /view 1"}}let c=ls[s];return c?{level:"list",section:c}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var D=U(Y(),1),as=6,Nr=12;function cs(e,s,c){let f=Math.max(20,s),p=[];for(let u of e.split(`
|
|
2
|
+
import{b as Tr}from"./chunk-ZZZGTDYE.js";import{a as dn,c as mn,e as Et,f as Je,g as $r,h as Rr,i as gn,j as Cr}from"./chunk-4LGQHTXM.js";import{a as St,b as un}from"./chunk-JTNEF5ZP.js";import{a as ln,b as wr}from"./chunk-GZQAETB2.js";import{a as xr,b as kr,c as vr}from"./chunk-ET5EK2CM.js";import{a as pr,b as ue}from"./chunk-HG2ILWCE.js";import{a as dr}from"./chunk-5Y2G4NC7.js";import{c as Rt}from"./chunk-SMXABALN.js";import{b as fr}from"./chunk-WN5VKKJ3.js";import{b as fn}from"./chunk-HD6NR44L.js";import{a as Ct,b as an,c as Ye,d as yr,e as cn}from"./chunk-BWXLZS5O.js";import{e as ze,f as S,g as br}from"./chunk-3V4J65GN.js";import{b as gr,c as Ge,d as hr}from"./chunk-22PIMG52.js";import{na as mr,oa as on}from"./chunk-PI7OXS62.js";import{a as ur}from"./chunk-M3TFOFUQ.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a as w,b as r,k as Me}from"./chunk-33DWJV67.js";import{a as cr}from"./chunk-6YGTRKDT.js";import{z as o}from"./chunk-FAMQ4DHU.js";import{e as U}from"./chunk-UR6MHSHU.js";var bn=U(cr(),1);var g=U(cr(),1);var m=U(Y(),1),Wi=60,Vi=100;function hn(e,s){let c=e.options.length,f=c,p=e.multi_select?f++:null,a=e.allow_free_text?f++:null,u=s?f++:null;return{optionCount:c,doneIdx:p,freeIdx:a,batchIdx:u,maxSel:f-1}}var Ki="\xA0",Ui={high:{text:`\u203C${Ki}high`,color:o.red},med:{text:"med",color:"yellow"},low:{text:"low",color:o.dim}};function Hi(e){let s=(e.header??e.text.split(/\s+/).slice(0,3).join(" ")).trim();return s.length>16?`${s.slice(0,15)}\u2026`:s}function Qi(e,s,c){let f=x=>e[x].length+6,p=f(s),a=s,u=s;for(;;){let x=u+1<e.length?f(u+1):1/0,y=a-1>=0?f(a-1):1/0;if(x===1/0&&y===1/0)break;if(x<=y){if(p+x>c)break;p+=x,u+=1}else{if(p+y>c)break;p+=y,a-=1}}return{lo:a,hi:u}}function Sr({batch:e,qView:s,sel:c=0,focused:f=!1,freeText:p=null,optionText:a=null,attach:u=null,multiSelFor:x,childPrefix:y,gapAbove:T=!0}){let{stdout:P}=Me(),V=P?.columns??80,re=V<Wi,C=Math.min(V-1,Vi),b=Math.max(0,Math.min(e.questions.length-1,s??(e.cursor<0?0:e.cursor))),I=e.questions[b],pe=e.resolution[b],q=e.resolution.filter(B=>!B).length,fe=e.questions.length-q,we=St(e),W=hn(I,we!==""),xe=x?x(b):[],ie=Ui[I.risk],Z=B=>f&&c===B?(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"}):" ",A=`? ${y??""}the agent needs ${q===1?"one answer":`${q} answers`}`,Pe=e.questions.length>1?` \xB7 ${b+1} of ${e.questions.length} \xB7 ${fe} answered`:"",H=(0,m.jsxs)(w,{flexDirection:"column",children:[(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsxs)(r,{bold:!0,children:[I.text,ie?(0,m.jsx)(r,{color:ie.color,bold:!1,children:` ${ie.text}`}):null]})}),(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsx)(r,{color:o.dim,children:I.rationale})}),(0,m.jsx)(r,{children:" "}),I.options.map((B,$)=>{let Q=f&&c===$;return a&&a.optionIndex===$?(0,m.jsx)(w,{flexDirection:"column",children:(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:`${$+1}. ${un(B.label)}`}),(0,m.jsx)(r,{color:o.dim,children:" \u270E "})]}),(0,m.jsx)(Rt,{value:a.value,onChange:a.onChange,onSubmit:a.onSubmit,onCancel:a.onCancel,placeholder:B.detail||"type your answer"})]})},`o-${$}`):(0,m.jsxs)(w,{flexDirection:"column",children:[(0,m.jsxs)(r,{children:[Z($)," ",I.multi_select?(0,m.jsx)(r,{color:xe.includes($)?o.green:o.dim,children:xe.includes($)?"[x] ":"[ ] "}):null,(0,m.jsx)(r,{color:Q?o.assuranceAccent:void 0,children:`${$+1}. ${un(B.label)}`}),$===I.recommended_index?(0,m.jsx)(r,{color:o.dim,children:" (recommended)"}):null,pe?.selected_index===$?(0,m.jsx)(r,{color:o.dim,children:" (current)"}):null]}),B.detail?(0,m.jsx)(w,{paddingLeft:5,children:(0,m.jsx)(r,{color:o.dim,children:B.detail})}):null]},`o-${$}`)}),I.multi_select&&W.doneIdx!=null?(0,m.jsxs)(r,{children:[Z(W.doneIdx)," ",(0,m.jsx)(r,{color:o.green,children:"\u2714"}),(0,m.jsx)(r,{color:f&&c===W.doneIdx?o.assuranceAccent:void 0,children:" done \u2014 confirm selection"})]}):null,I.allow_free_text?(0,m.jsx)(r,{children:" "}):null,I.allow_free_text?p?(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.dim,children:"\u270E "})]}),(0,m.jsx)(Rt,{value:p.value,onChange:p.onChange,onSubmit:p.onSubmit,onCancel:p.onCancel,placeholder:"Tell me what to do"})]}):(0,m.jsxs)(r,{children:[W.freeIdx!=null?Z(W.freeIdx):" "," ",(0,m.jsx)(r,{color:f&&W.freeIdx!=null&&c===W.freeIdx?o.assuranceAccent:o.dim,children:"\u270E Tell me what to do"})]}):null,u?(0,m.jsxs)(w,{flexDirection:"column",marginTop:1,children:[(0,m.jsxs)(w,{children:[(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"})," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:"@ attach a file or URL"}),(0,m.jsx)(r,{color:o.dim,children:" \u270E "})]}),(0,m.jsx)(Rt,{value:u.value,onChange:u.onChange,onSubmit:u.onSubmit,onCancel:u.onCancel,placeholder:"path or URL"})]}),(0,m.jsx)(w,{paddingLeft:2,children:(0,m.jsx)(r,{color:o.dim,children:"the questions are set aside \u2014 the agent reads the source and re-asks what's still open"})})]}):null]}),F=we!==""?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{children:" "}),(0,m.jsxs)(r,{children:[f&&W.batchIdx!=null&&c===W.batchIdx?(0,m.jsx)(r,{color:o.assuranceAccent,children:"\u276F"}):" "," ",(0,m.jsx)(r,{color:o.assuranceAccent,children:"\xBB"}),(0,m.jsx)(r,{bold:!0,color:f&&W.batchIdx!=null&&c===W.batchIdx?o.assuranceAccent:void 0,children:" Go with recommendations"}),q>=5?(0,m.jsx)(r,{color:o.dim,children:` \u2014 resolves all ${q} open`}):null,(0,m.jsx)(r,{color:o.dim,children:" (tab)"})]})]}):null;if(re)return(0,m.jsxs)(w,{marginTop:T?1:0,marginBottom:1,flexDirection:"column",children:[(0,m.jsx)(r,{color:o.assuranceAccent,bold:!0,children:A}),e.questions.length>1?(0,m.jsx)(r,{color:o.dim,children:Pe.replace(/^ · /,"")}):null,(0,m.jsx)(r,{children:" "}),H,F]});let h=e.questions.map(B=>Hi(B)),me=e.questions.length>1?Qi(h,b,C-8):null;return(0,m.jsxs)(w,{marginTop:T?1:0,marginBottom:1,flexDirection:"column",children:[(0,m.jsxs)(r,{color:o.assuranceAccent,children:[(0,m.jsx)(r,{bold:!0,children:A}),Pe?(0,m.jsx)(r,{color:o.dim,children:Pe}):null]}),me?(0,m.jsx)(w,{marginTop:1,children:(0,m.jsxs)(r,{children:[me.lo>0?(0,m.jsx)(r,{color:o.dim,children:"\u25C0 "}):" ",e.questions.slice(me.lo,me.hi+1).map((B,$)=>{let Q=me.lo+$,et=$>0?" ":"";return Q===b?(0,m.jsxs)(r,{children:[et,(0,m.jsx)(r,{backgroundColor:o.assuranceAccent,color:"#0d1117",bold:!0,children:` ${h[Q]} `})]},B.id):(0,m.jsxs)(r,{children:[et,e.resolution[Q]?(0,m.jsxs)(r,{children:[(0,m.jsx)(r,{color:o.green,children:"\u2713 "}),(0,m.jsx)(r,{color:o.dim,children:h[Q]})]}):(0,m.jsx)(r,{color:o.dim,children:`\u25CB ${h[Q]}`})]},B.id)}),me.hi<e.questions.length-1?(0,m.jsx)(r,{color:o.dim,children:" \u25B6"}):null]})}):null,(0,m.jsx)(r,{children:" "}),H,F]})}var Er={ac:["acceptance criterion","acceptance criteria"],gap:["open question","open questions"],scenario:["scenario","scenarios"],test:["test","tests"],"use-case":["use-case","use-cases"]},pn=e=>Er[e]?.[1]??`${e}s`,At={label:(e,s)=>s===1?Er[e]?.[0]??e:pn(e),skip:new Set(["exercise"])},xn={ac:null,test:null,gap:null,scenario:"kind"},Xi=(e,s,c)=>`${e} ${e===1?s:c}`,Gi=e=>e.length<2?e.join(""):`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`;function Ar(e){let s=e.covers?on(e.covers):"1 scenario",c=e.verifies.slice(0,2).map(on),f=e.verifiesTotal-c.length,p=c.length===0?Xi(e.verifiesTotal,"acceptance criterion","acceptance criteria"):Gi([...c,...f>0?[`${f} more`]:[]]);return`covers ${s} \xB7 verifies ${p}`}function Dr(e,s){let c=typeof s=="string"&&s!==""?s.split(", "):[],f=p=>typeof p=="string"&&mr.test(p);return{covers:f(e)?e:null,verifies:c.filter(f),verifiesTotal:c.length}}var Dt={"acceptance criteria":{name:"acceptance criteria",next:"scenarios",done:"acceptance criteria say what the use-case must always do"},scenarios:{name:"scenarios",next:"scenario checks",done:"scenarios are the paths a user takes that test the criteria"},"acceptance criteria + exercises":{name:"scenario checks",next:"tests",done:"scenario checks say which criteria each scenario checks"},"tests + gaps":{name:"tests"},tests:{name:"tests"}};function Ze(e){let s=Dt[e]?.name;if(s)return s;let c={exercises:"scenario checks",gaps:"open questions"};return[...new Set(e.split(" + ").map(f=>c[f]??f))].join(" + ")}var Ir={scenarios:"next, scenarios: the paths a user takes that test them","scenario checks":"next, scenario checks: which criteria each scenario checks",tests:"next, tests: runnable tests, and open questions for what can't run"},Br="phases: acceptance criteria \u2192 scenarios \u2192 scenario checks \u2192 tests";var k=U(Y(),1),zi=e=>e.startsWith("designing: ")?`designing: ${Ze(e.slice(11))}`:e;function Yi(e,s){let c=e.form==="assumed"?" (assumed)":e.form==="deferred"?"":" (you)",f=e.note?` \u2014 ${e.note}`:"",p=s?`"${e.stub}"`:`q${e.qNum} ${e.stub}`;return e.form==="deferred"?`\u21B3 deferred ${p}${f}`:e.form==="changed"?`\u21B3 changed ${p}: ${e.prev??"?"} \u2192 ${e.choice??"?"}${c}${f}`:`\u21B3 ${e.form} ${p}: ${e.choice??"?"}${c}${f}`}var Ji=()=>(process.stdout?.columns??100)-12,Zi=new Set(["banner","header","user","agent","worked","childOpen","lines"]);function Lr({block:e,annotations:s,remote:c=!1,afterHeader:f=!1}){let p=e.era??0,{stdout:a}=Me(),u=c||p>0?(a?.columns??100)-p*2:null,x=ns(e,s??null,c,u,(a?.columns??100)-p*2),y=p>0?(0,k.jsx)(w,{marginLeft:p*2,children:x}):x;return f&&!Zi.has(e.kind)?(0,k.jsx)(w,{marginTop:1,children:y}):y}var es=new RegExp("[\\u1100-\\u115F\\u2E80-\\u303E\\u3041-\\uA4CF\\uAC00-\\uD7A3\\uF900-\\uFAFF\\uFE10-\\uFE19\\uFE30-\\uFE6F\\uFF00-\\uFF60\\uFFE0-\\uFFE6\\u{20000}-\\u{3FFFD}\u2714\u26A0]|\\p{Emoji_Presentation}","u"),It=e=>[...e].reduce((s,c)=>s+(es.test(c)?2:1),0);function ts(e,s,c){let f=Math.max(12,c-It(e)),p=[],a="";for(let u of s){let x=a?`${a} \xB7 ${u}`:u;It(x)>f&&a?(p.push(a),a=u):a=x}return p.push(a),p.map((u,x)=>(x===0?e:" ".repeat(e.length))+u)}function _e(e,s,c){let f=Math.max(12,c-It(e)),p=[],a="";for(let u of s.split(" ")){let x=a?`${a} ${u}`:u;It(x)>f&&a?(p.push(a),a=u):a=x}return p.push(a),p.map((u,x)=>(x===0?e:" ".repeat(e.length))+u)}function ns(e,s,c,f=null,p=100){switch(e.kind){case"banner":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(r,{bold:!0,color:o.assuranceAccent,children:` ${c?zi(e.text):e.text}`})});case"header":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsxs)(r,{color:o.assuranceAccent,children:[`\u25CF ${e.text}`,e.tail?(0,k.jsx)(r,{color:o.dim,children:` \u2014 ${e.tail}`}):null]})});case"user":return(0,k.jsxs)(w,{marginTop:1,children:[(0,k.jsx)(r,{color:o.orange,children:"\u276F "}),(0,k.jsx)(r,{children:e.text})]});case"note":return(0,k.jsx)(r,{color:o.dim,children:` ${e.text}`});case"lines":return(0,k.jsx)(w,{flexDirection:"column",marginTop:1,children:e.lines.map((a,u)=>(0,k.jsx)(r,{...a.dim?{color:o.dim}:{},children:a.text},u))});case"agent":return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(kr,{text:e.text,accent:o.assuranceAccent,indent:f===null?0:(e.era??0)*2})});case"worked":return(0,k.jsx)(w,{marginTop:1,flexDirection:"column",children:ts(" \u2699 ",hr(e.durS,e.toolCalls,e.tools),p).map((a,u)=>(0,k.jsx)(r,{color:o.dim,children:a},u))});case"usage":return(0,k.jsx)(r,{color:o.dim,children:` \xB7 ${e.credits.toFixed(1)} credits \u2014 total ${e.total.toFixed(1)}`});case"turn":{let a=s,u=(a?a.fresh:e.items.map((C,b)=>({item:C,num:b+1,updated:!1}))).filter(C=>!(c&&At.skip?.has(C.item.kind??""))),x={usecase:"risk","use-case":"risk",ac:"check",scenario:"kind",test:"check",gap:"risk",stylenote:"kind"},y=C=>C.kind??"use-case",T=new Map;for(let C of u){let b=C.item,I=y(C.item),pe=c&&I==="test"?{title:b.title,summary:Ar(b.links??Dr(b.extra?.automates,b.extra?.verifies)),badge:""}:c&&I==="gap"?{title:b.question??"",summary:b.rationale??"",badge:""}:null,q=b.risk==="high"||b.risk==="med"||b.risk==="low"?b.risk:void 0,fe=b.logical_id??(c?b.matched_id:void 0),we={id:fe??"",staged:!fe,...c&&b.held&&!fe?{held:!0}:{},title:pe?.title??b.title,badge:pe?.badge??b.badge??b.risk??"",summary:pe?.summary??b.why??b.summary??b.description??"",...q?{risk:q}:{},...C.updated?{marker:"\u21B3 changed"}:{}},W=T.get(I)??[];W.push(we),T.set(I,W)}let P=u.some(C=>!!C.item.kind),V=(a?.unchanged??[]).reduce((C,b)=>C+b.count,0),re=a?.headerStats?` \u2014 ${a.headerStats}${V>0?` (${V} unchanged)`:""}`:"";return(0,k.jsxs)(w,{flexDirection:"column",marginLeft:2,children:[(0,k.jsxs)(r,{bold:!0,children:[P?"design":e.heading,re?(0,k.jsx)(r,{bold:!1,color:o.dim,children:re}):null]}),[...T.entries()].map(([C,b])=>(0,k.jsxs)(w,{flexDirection:"column",children:[T.size>1?(0,k.jsx)(r,{color:o.dim,children:`${c?pn(C):Ct(C)} \xB7 ${b.length}`}):null,(0,k.jsx)(Tr,{rows:b,width:Ji(),badgeHeader:c&&C in xn?xn[C]:x[C]??"info"})]},C)),a&&a.unchanged.length>0&&(0,k.jsx)(r,{color:o.dim,children:` \u22EE unchanged: ${a.unchanged.map(C=>`${C.count} ${C.label}`).join(" \xB7 ")}`})]})}case"answer":return(0,k.jsx)(r,{color:o.dim,children:Yi(e.receipt,c)});case"continued":return(0,k.jsx)(r,{color:o.dim,children:"\u21B3 continued"});case"childOpen":{if(c)return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsx)(r,{color:o.assuranceAccent,children:`\u25CF ${e.update?S.updateOpen(e.subject,e.changed===!0):S.childOpen(e.verb,e.subject)}`})});let{ing:a}=fn(e.verb);return(0,k.jsx)(w,{marginTop:1,children:(0,k.jsxs)(r,{color:o.assuranceAccent,children:[`\u25CF ${a} ${e.subject}`,e.sid?(0,k.jsx)(r,{color:o.dim,children:` \u2014 ${e.sid}`}):null,e.note?(0,k.jsx)(r,{color:o.dim,children:` ${e.note}`}):null]})})}case"childClose":{if(e.held)return(0,k.jsx)(w,{});if(c&&e.update){let x=[Ge(e.durS),...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]];if(!e.ok)return(0,k.jsx)(r,{color:o.red,children:`\u25CF ${S.updateFailed(e.subject)}`});if(e.untouched)return(0,k.jsx)(r,{children:`\u25CF ${S.updateUntouched(e.subject)} \u2014 ${x.join(" \xB7 ")}`});if(e.unfinished)return(0,k.jsx)(r,{children:`\u25CF ${S.updateUnfinished(e.subject)} \u2014 ${x.join(" \xB7 ")}`});let y=e.testsWritten?S.updateTests(e.testsWritten):null,T=[x[0],...y?[y]:[],...x.slice(1)];return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${S.updateClosed(e.subject,T)}`})}if(c){if(!e.ok)return(0,k.jsx)(r,{color:o.red,children:`\u25CF ${S.childFailed(e.verb,e.subject)}`});if(e.unfinished)return(0,k.jsx)(r,{children:`\u25CF ${[S.childUnfinished(e.verb),[Ge(e.durS),...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]].join(" \xB7 ")].join(" \u2014 ")}`});let x=[Ge(e.durS),...e.tests?[S.childTests(e.verb,e.tests)]:[],...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]];return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${S.childClosed(e.verb,e.subject,x)}`})}let{ed:a}=fn(e.verb);if(!e.ok)return(0,k.jsxs)(r,{color:o.red,children:[`\u25CF ${e.verb} failed \u2014 ${e.exitCode!=null?`exited ${e.exitCode}`:"error"}`,e.fixCmd?(0,k.jsx)(r,{color:o.dim,children:` \xB7 ${e.fixCmd}`}):null]});let u=[Ge(e.durS),...e.results?[e.results]:[],...e.credits!==void 0?[`${e.credits.toFixed(1)} credits`]:[]].join(" \xB7 ");return(0,k.jsx)(r,{color:o.green,children:`\u25CF ${a} ${e.subject} \u2014 ${u}`})}case"childBack":return(0,k.jsx)(r,{color:o.dim,children:`back with ${e.parentVerb} \u2014 ${e.context}`});case"commit":if(c&&e.person&&!e.ok&&e.refused?.length){let a=S.approveRefused(e.refused);return(0,k.jsxs)(w,{flexDirection:"column",children:[_e(" \u2717 ",a.line,f??100).map((u,x)=>(0,k.jsx)(r,{color:o.red,children:u},`p-${x}`)),a.notes.flatMap((u,x)=>_e(" ",u,f??100).map((y,T)=>(0,k.jsx)(r,{color:o.dim,children:y},`n-${x}-${T}`)))]})}return(0,k.jsxs)(w,{flexDirection:"column",children:[c&&e.held?_e(" \u2016 ",e.line,f??100).map((a,u)=>(0,k.jsx)(r,{children:a},`h-${u}`)):f!==null?_e(` ${e.ok?"\u2714":"\u2717"} `,e.line,f).map((a,u)=>(0,k.jsx)(r,{color:e.ok?o.green:o.red,children:a},`c-${u}`)):(0,k.jsx)(r,{color:e.ok?o.green:o.red,children:` ${e.ok?"\u2714":"\u2717"} ${e.line}`}),c&&e.refused?.length?S.chatRefused(e.refused).flatMap((a,u)=>_e(" ",a,f??100).map((x,y)=>(0,k.jsx)(r,{color:o.dim,children:x},`r-${u}-${y}`))):(e.warnings??[]).flatMap((a,u)=>!c&&f!==null&&(e.era??0)>0?_e(" \u26A0 ",a,f).map((x,y)=>(0,k.jsx)(r,{color:o.dim,children:x},`w-${u}-${y}`)):[(0,k.jsx)(r,{color:o.dim,children:` \u26A0 ${a}`},`w-${u}`)])]});case"error":return(0,k.jsxs)(ur,{variant:"error",paddingX:1,children:[(0,k.jsx)(r,{color:o.red,children:e.title}),e.detail.map((a,u)=>(0,k.jsx)(r,{color:o.dim,children:a},`d-${u}`))]})}}var Oe=U(Y(),1);function Mr({item:e}){return(0,Oe.jsxs)(w,{flexDirection:"column",marginLeft:2,children:[(e.cite??[]).map((s,c)=>(0,Oe.jsx)(r,{dimColor:!0,children:`cite ${s.anchor??"conv"} \u2014 "${s.quote??""}"`},`cite-${c}`)),(e.depends_on_hint??[]).length>0&&(0,Oe.jsx)(r,{dimColor:!0,children:`depends on: ${(e.depends_on_hint??[]).join(", ")}`}),Object.entries(e.extra??{}).map(([s,c])=>(0,Oe.jsx)(r,{dimColor:!0,children:`${s}: ${c}`},`extra-${s}`))]})}var E=U(Y(),1),kn=(e,s)=>Math.max(0,Math.min(s,e));function Lt(e,s,c){switch(s.type){case"move":return e.level==="detail"?{...e,scroll:Math.max(0,(e.scroll??0)+s.delta)}:{...e,cursor:kn(e.cursor+s.delta,Math.max(0,c-1))};case"enter":return e.level==="list"?{...e,level:"detail",scroll:0}:e;case"back":return e.level==="detail"?{...e,level:"list",scroll:0}:null}}var Or={"use-case":"use-cases",ac:"acs",scenario:"scenarios",test:"tests",gap:"gaps"};function Pr(e,s){if(e.level==="detail")return{level:"detail",cursor:kn(e.num-1,Math.max(0,s.entries.length-1))};if(e.section){let c=s.entries.findIndex(f=>Or[f.kind]===e.section);if(c>=0)return{level:"list",cursor:c}}return{level:"list",cursor:0}}function rs(e){let s=[];for(let c of e.entries){let f=s.find(p=>p.kind===c.kind);f?f.entries.push(c):s.push({kind:c.kind,entries:[c]})}return s}var _r=3;function is({items:e,cursor:s,verb:c,more:f}){let p=`view \xB7 ${c} so far \xB7 ${e.counts.map(u=>`${u.count} ${u.count===1?u.label.replace(/s$/,""):u.label}`).join(" \xB7 ")}`,a=e.entries[s];return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{bold:!0,color:o.assuranceAccent,children:p}),rs(e).map(({kind:u,entries:x})=>{let y=a?.kind===u,T=y?x.findIndex(C=>C.num===a.num):-1,P=y?kn(T-1,Math.max(0,x.length-_r)):0,V=x.slice(P,P+(y?_r:1)),re=x.length-V.length;return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{color:o.dim,children:`${Or[u]??Ct(u)} \xB7 ${x.length}`}),V.map(C=>{let b=y&&C.num===a.num,I=C.item.badge;return(0,E.jsxs)(r,{children:[(0,E.jsx)(r,{color:o.assuranceAccent,children:b?"\u203A ":" "}),(0,E.jsx)(r,{children:`${C.num} \xB7 ${C.item.title}`}),I?(0,E.jsx)(r,{color:o.dim,children:` \xB7 ${I}`}):null]},`${C.kind}:${C.num}`)}),re>0&&(0,E.jsx)(r,{color:o.dim,children:` \u22EE ${re} more`})]},u)}),f?(0,E.jsxs)(r,{children:[(0,E.jsx)(r,{color:o.assuranceAccent,children:s===e.entries.length?"\u203A ":" "}),(0,E.jsx)(r,{color:o.dim,children:`\u22EF show all \u2014 ${f.hidden} more from earlier turns`})]}):null]})}var Bt=14;function ss({items:e,cursor:s,explain:c,grandTotal:f,dossier:p,scroll:a=0}){let u=e.entries[s];if(!u)return(0,E.jsx)(r,{color:o.dim,children:"nothing to show"});if(p){let y=Math.max(0,Math.min(a,Math.max(0,p.lines.length-Bt))),T=p.lines.slice(y,y+Bt);return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsxs)(r,{bold:!0,children:[`view \xB7 ${p.id}`,p.id.toLowerCase()!==p.rawId?(0,E.jsx)(r,{bold:!1,color:o.dim,children:` \xB7 ${p.rawId}`}):null]}),(0,E.jsx)(r,{bold:!0,children:p.title}),y>0?(0,E.jsx)(r,{color:o.muted,children:`\u22EE ${y} above`}):null,T.map((P,V)=>(0,E.jsx)(r,{color:P.dim?o.dim:void 0,children:P.text},`dl-${V}`)),p.lines.length>y+Bt?(0,E.jsx)(r,{color:o.muted,children:`\u22EE ${p.lines.length-y-Bt} more`}):null]})}let x=u.item;return(0,E.jsxs)(w,{flexDirection:"column",children:[(0,E.jsx)(r,{bold:!0,children:`view \xB7 ${u.kind} ${u.num} of ${f??e.entries.length}`}),(0,E.jsx)(r,{children:u.item.title}),x.badge?(0,E.jsx)(r,{color:o.dim,children:`kind: ${x.badge}`}):null,x.why?(0,E.jsx)(r,{color:o.dim,children:x.why}):null,(0,E.jsx)(Mr,{item:u.item}),c?.map((y,T)=>(0,E.jsx)(r,{color:o.dim,children:y},`ex-${T}`)),(0,E.jsx)(r,{color:o.dim,children:"view-only \u2014 approvals happen in chat"})]})}function jr({items:e,state:s,verb:c,more:f,explain:p,grandTotal:a,dossier:u=null}){return s.level==="list"?(0,E.jsx)(is,{items:e,cursor:s.cursor,verb:c,more:f}):(0,E.jsx)(ss,{items:e,cursor:s.cursor,explain:p,grandTotal:a,dossier:u,scroll:s.scroll??0})}var J=U(Y(),1),vn=14;function os(e){let s=[],c=null;for(let f of e)f.field!==c&&(c=f.field,s.push({kind:"field",field:c})),s.push({kind:"line",field:c,line:f});return s}function Fr({title:e,lines:s,offset:c=0,remote:f=!1}){let p=os(s),a=Math.max(0,Math.min(c,Math.max(0,p.length-vn))),u=p.slice(a,a+vn),x=a,y=Math.max(0,p.length-a-vn),T=f?`the change to ${e} \xB7 old \u2192 new`:`view \xB7 diff \xB7 ${e} \xB7 current \u2192 proposed`;return(0,J.jsxs)(w,{flexDirection:"column",children:[(0,J.jsx)(r,{bold:!0,color:o.assuranceAccent,children:T}),x>0?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:`\u22EE ${x} above`})}):null,u.map((P,V)=>P.kind==="field"?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:P.field==="criteria"?f?"acceptance criteria":"criteria":P.field})},`r-${a+V}`):(0,J.jsx)(w,{paddingLeft:4,children:(0,J.jsx)(r,{color:P.line.op==="-"?"red":"green",children:`${P.line.op==="-"?"\u2212":"+"} ${P.line.text}`})},`r-${a+V}`)),y>0?(0,J.jsx)(w,{paddingLeft:2,children:(0,J.jsx)(r,{color:o.dim,children:`\u22EE ${y} more`})}):null]})}var ls={"use-cases":"use-cases",usecases:"use-cases","use-case":"use-cases",acs:"acs",ac:"acs",scenarios:"scenarios",scenario:"scenarios",tests:"tests",test:"tests",gaps:"gaps",gap:"gaps"};function qr(e){let s=(e??"").trim().toLowerCase();if(!s)return{level:"list"};if(/^\d+$/.test(s)){let f=parseInt(s,10);return f>=1?{level:"detail",num:f}:{error:"items are numbered from 1 \u2014 /view 1"}}let c=ls[s];return c?{level:"list",section:c}:{error:"try /view, /view <number>, or /view acs|scenarios|tests"}}var D=U(Y(),1),as=6,Nr=12;function cs(e,s,c){let f=Math.max(20,s),p=[];for(let u of e.split(`
|
|
3
3
|
`)){if(u.length<=f){p.push(u);continue}let x="";for(let y of u.split(" "))x&&x.length+1+y.length>f?(p.push(x),x=y):x=x?`${x} ${y}`:y;p.push(x)}let a=Math.max(0,p.length-c);return{body:p.slice(-c).join(`
|
|
4
4
|
`),hidden:a}}function wn(e){return e.resumed?[{role:"agent",turnIndex:0,items:e.resumed.items},...e.turns]:e.turns}function Wr(e){let s={key:"redesign",label:"re-design from scratch",detail:"replaces the current design"},c={key:"keep",label:"keep the existing design",detail:"back to the list"};return e.designed==="stale"?[{...s,detail:"the use-case changed since it was designed"},c]:[c,s]}function Vr(e){return e.length===0?null:{approved:e.filter(s=>s.verdict==="approve").length,rejected:e.filter(s=>s.verdict==="reject").length,deferred:e.filter(s=>s.verdict==="defer").length}}function ds(e,s){return s?`the changes in ${e} could not be read: ${s.message}`:"no reviewable changes came back \u2014 the source may be unchanged"}function fo({controller:e,verb:s="extract",onCtrlC:c,chain:f=null,inspect:p=null,reconcile:a=null,autoReview:u=!1,onReviewExit:x,meta:y=null,remote:T=null}){let[,P]=(0,g.useState)(0),[V,re]=(0,g.useState)(!1),[C,b]=(0,g.useState)(null),[I,pe]=(0,g.useState)(null),q=(0,g.useRef)(null),[fe,we]=(0,g.useState)(null),W=(0,g.useRef)(null),xe=t=>{W.current=t,we(t)},ie=t=>{q.current=t,pe(t),t===null&&xe(null)},Z=(0,g.useRef)([]),[A,Pe]=(0,g.useState)(null),H=(0,g.useRef)(null),F=t=>{H.current=t,Pe(t)},[h,me]=(0,g.useState)(null),B=(0,g.useRef)(null),$=t=>{B.current=t,me(t)},[Q,et]=(0,g.useState)(null),yn=(0,g.useRef)(null),be=t=>{yn.current=t,et(t)},Mt=(0,g.useRef)({approved:0,rejected:0,deferred:0}),[Kr,Ur]=(0,g.useState)(null),je=(0,g.useRef)({added:0,updated:0}),Fe=(0,g.useRef)(!1),se=(0,g.useRef)(null),[ye,_t]=(0,g.useState)(null),Tn=(0,g.useRef)(new Set),$n=fr(),{stdout:Hr}=Me(),Qr=Hr?.columns??80,Rn=(0,g.useRef)(0),N=T!==null,R=T?.review??null,tt=N&&e.state.ledger.at(-1)?.kind==="agent",Ot=(0,g.useRef)(0);(0,g.useEffect)(()=>{let t=i=>R!==null&&i?.kind==="header"&&(i.era??0)>0,n=()=>{let i=e.state.ledger;for(let d=Rn.current;d<i.length;d++){let v=i[d];if(t(v))continue;let _=v.kind==="turn"?yr(e.state.turns,v.turnIndex,N?At:void 0):void 0;N&&_&&_.fresh.length===0&&_.unchanged.length===0||$n.append((0,D.jsx)(Lr,{block:v,annotations:_,remote:N,afterHeader:i[d-1]?.kind==="header"&&!t(i[d-1])||i[d-1]?.kind==="lines"},`lg-${d}`))}Rn.current=i.length};n();let l=e.subscribe(()=>{n();let i=e.state;q.current&&(i.pending||i.status==="pausing")&&(ie(null),i.pending&&b("questions arrived \u2014 back to chat")),P(d=>d+1)});return P(i=>i+1),l},[e,$n]);let{thinking:ge,status:ee,pending:M,confirm:qe,ledger:oe,activeTurn:Cn,stream:Xr,notice:nt}=e.state,Sn=(Xr?.text??"").trimEnd(),En=Sn.length>0,Gr=V&&(ge.liveThinking.length>0||ge.thinkingLog.length>0),zr=cs(ge.liveThinking||ge.thinkingLog.map(t=>t.text).join(`
|
|
5
5
|
`),Qr-6,Nr),An=En?Sn.split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{r as i,s as u}from"./chunk-
|
|
2
|
+
import{r as i,s as u}from"./chunk-UJLULWSR.js";async function d(e){if(!e.isInteractive)return{recovered:!1};if(f(e.creds,e.authOnly===!0))return{recovered:!1};let{SingleShotApp:a}=await import("./SingleShotApp-OMLRYOSI.js"),{ScrollbackProvider:t}=await import("./scrollback-GGNBDFQV.js"),{render:r}=await import("./build-5ZN47FAT.js"),o=await import("./react-QWOAB3TB.js"),n={current:null},l={current:!1},{waitUntilExit:c,unmount:s}=r(o.default.createElement(t,null,o.default.createElement(a,{resultRef:n,mode:"login",loginCompleteRef:l,...e.authOnly?{authOnly:!0}:{}})),{exitOnCtrlC:!1});u(()=>s()),await c();try{process.stdin.setRawMode?.(!1)}catch{}return process.stdout.write("\x1B[?25h"),l.current?{recovered:!0}:e.onCancel==="return"?{recovered:!1,cancelled:!0}:(i(0,"Startup gate cancelled"),{recovered:!1})}function f(e,a=!1){let t=e.getActiveProfile(),r=e.getDefaultEnv();if(!t||!!!(e.loadBasicAuth(t,r)||e.loadCredentials(t,r)))return!1;if(a)return!0;let n=e.loadProfileConfig(t,r)??{};return!!n.project_id&&!!n.folder_id}export{d as a,f as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-
|
|
2
|
+
import{a as P}from"./chunk-4HYPMGDF.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a as c,b as l,i as X}from"./chunk-33DWJV67.js";import{a as Z}from"./chunk-6YGTRKDT.js";import{z as i}from"./chunk-FAMQ4DHU.js";import{e as O}from"./chunk-UR6MHSHU.js";var u=O(Z(),1);var e=O(Y(),1),d=5;function _(t,I){if(!I)return t;let a=I.toLowerCase();return t.filter(L=>L.label.toLowerCase().includes(a))}function U(t){let{title:I,items:a,loading:L=!1,loadingText:$,error:A=null,itemNoun:B="items",onSelect:k,onCancel:R,defaultActiveId:D,onTab:T,extraHint:w}=t,[b,s]=(0,u.useState)(0),[v,g]=(0,u.useState)(0),[f,M]=(0,u.useState)(""),[y,x]=(0,u.useState)(null),H=(0,u.useRef)(!1),N=!t.onSearch&&f!=="";(0,u.useEffect)(()=>{if(a.length===0||N)return;let n=D?a.findIndex(o=>o.id===D):a.findIndex(o=>o.isActive);if(t.preserveSelectionById&&!H.current&&n>=0&&a[n].id!==y){g(Math.floor(n/d)),s(n%d),x(a[n].id);return}if(t.preserveSelectionById&&y!==null){let o=a.findIndex(r=>r.id===y);if(o>=0){g(Math.floor(o/d)),s(o%d);return}}n>=0?(g(Math.floor(n/d)),s(n%d),t.preserveSelectionById&&x(a[n].id)):t.preserveSelectionById&&(g(0),s(0),x(a[0]?.id??null))},[a,D,t.preserveSelectionById,y,N]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let n=setTimeout(()=>t.onSearch(f),t.searchDebounceMs??250);return()=>clearTimeout(n)},[f,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?a:_(a,f),C=v*d,F=Math.min(C+d,m.length),E=Math.ceil(m.length/d),G=F-C,h=m.slice(C,F);return X((n,o)=>{if(H.current=!0,A){o.escape?R():o.tab&&T&&t.tabOnError&&T();return}if(o.escape){f?(M(""),s(0),g(0)):R();return}if(o.tab&&T){T();return}if(o.upArrow){if(b>0){let r=b-1;s(r),t.preserveSelectionById&&x(h[r]?.id??null)}else if(v>0){let r=v-1,S=d-1;g(r),s(S),t.preserveSelectionById&&x(m[r*d+S]?.id??null)}return}if(o.downArrow){if(b<G-1){let r=b+1;s(r),t.preserveSelectionById&&x(h[r]?.id??null)}else if(v<E-1){let r=v+1,S=0;g(r),s(S),t.preserveSelectionById&&x(m[r*d+S]?.id??null)}return}if(o.return&&h[b]){if(h[b].disabled)return;k(h[b]);return}if(o.backspace||o.delete){M(r=>r.slice(0,-1)),s(0),g(0);return}n&&!o.ctrl&&!o.meta&&(M(r=>r+n),s(0),g(0))},{isActive:!L}),L?(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:i.orange,bold:!0,children:I}),(0,e.jsx)(c,{marginTop:1,children:(0,e.jsx)(l,{color:i.secondary,children:$??`Loading ${B}\u2026`})})]}):A?(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:i.red,bold:!0,children:I}),(0,e.jsx)(c,{marginTop:1,children:(0,e.jsx)(l,{color:i.red,children:A})}),(0,e.jsx)(P,{bindings:t.tabOnError&&T&&w?[{keys:"tab",label:w}]:[],escBackLabel:t.escLabel??"back to chat"})]}):(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(c,{children:[(0,e.jsx)(l,{color:i.orange,bold:!0,children:I}),(0,e.jsxs)(l,{color:i.dim,children:[" (",m.length,!t.onSearch&&f?`/${a.length}`:""," ",B,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(c,{marginTop:1,children:[(0,e.jsx)(l,{color:i.secondary,children:f?"filter: ":""}),f?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{children:f}),(0,e.jsx)(l,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(l,{color:i.dim,children:["Search ",B,"\u2026"]}),(0,e.jsx)(l,{inverse:!0,children:" "})]})]}),(0,e.jsx)(c,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(l,{color:i.secondary,children:["Searching ",B,"\u2026"]}):m.length===0?(0,e.jsxs)(l,{color:i.dim,children:["No ",B,' match "',f,'"']}):h.map((n,o)=>{let r=o===b,S=r?"\u276F ":" ",K=n.disabled?i.muted:n.isActive?i.green:r?i.orange:void 0;return(0,e.jsxs)(c,{flexDirection:"column",children:[(0,e.jsxs)(l,{color:K,children:[S,n.label,n.isActive&&!n.disabled?" \u25CF selected":""]}),r&&n.disabled&&n.disabledHint&&(0,e.jsxs)(l,{color:i.red,children:[" ",n.disabledHint]})]},n.id)})}),!t.searching&&E>1&&(0,e.jsx)(c,{marginTop:1,children:(0,e.jsxs)(l,{color:i.dim,children:["Page ",v+1,"/",E]})}),t.footer&&(0,e.jsx)(c,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(P,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},...t.hideSelectOnDisabled&&h[b]?.disabled?[]:[{keys:"\u21B5",label:"select"}],...T&&w?[{keys:"tab",label:w}]:[]],escBackLabel:f?"clear":t.escLabel??"back to chat"})]})}export{U as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{h as w}from"./chunk-SXRHKXSE.js";import{a as h}from"./chunk-RZ4F3BHX.js";import{b as f}from"./chunk-
|
|
2
|
+
import{h as w}from"./chunk-SXRHKXSE.js";import{a as h}from"./chunk-RZ4F3BHX.js";import{b as f}from"./chunk-FAMQ4DHU.js";import{mkdtemp as O,rm as $}from"fs/promises";import{createWriteStream as R}from"fs";import{Readable as U}from"stream";import{pipeline as F}from"stream/promises";import{tmpdir as T}from"os";import{basename as z,join as A}from"path";import{access as x,cp as P,mkdir as g,readdir as y,readFile as S,rename as I,rm as k,stat as b,writeFile as v}from"fs/promises";import{basename as D,join as d}from"path";function u(){return d(f,"mobile","apps")}function m(){return d(u(),"index.json")}function C(){return{readIndex:async()=>{try{let e=JSON.parse(await S(m(),"utf8"));return{apps:Array.isArray(e.apps)?e.apps:[]}}catch{return{apps:[]}}},writeIndex:async r=>{await g(u(),{recursive:!0});let e=`${m()}.tmp`;await v(e,JSON.stringify(r,null,2)),await I(e,m())},exists:async r=>{try{return await x(r),!0}catch{return!1}},copy:(r,e)=>P(r,e,{recursive:!0,force:!0}),remove:r=>k(r,{recursive:!0,force:!0}),sizeOf:async r=>{try{return(await b(r)).size}catch{return}},now:()=>new Date}}var c=class{deps;constructor(e={}){this.deps={...C(),...e}}async list(){let{apps:e}=await this.deps.readIndex();return[...e].sort((t,s)=>s.lastUsedAt.localeCompare(t.lastUsedAt))}async find(e){return(await this.deps.readIndex()).apps.find(t=>t.key===e)}async put(e){let t=await this.deps.readIndex(),s=t.apps.find(n=>n.key===e.key),a=this.deps.now().toISOString();if(s&&await this.deps.exists(s.path))return s.lastUsedAt=a,await this.deps.writeIndex(t),s;s&&(t.apps=t.apps.filter(n=>n.key!==e.key));let l=D(e.name??e.sourcePath),o=d(u(),e.key),p=d(o,l);await g(o,{recursive:!0}),await this.deps.copy(e.sourcePath,p);let i={key:e.key,path:p,name:l,source:e.source,...e.source==="local"?{originPath:e.sourcePath}:{},addedAt:a,lastUsedAt:a,...await this.deps.sizeOf(p).then(n=>n?{bytes:n}:{})};return t.apps=[...t.apps.filter(n=>n.key!==e.key),i],await this.deps.writeIndex(t),i}async exists(e){if(await this.deps.sizeOf(e.path)!==void 0)return!0;try{return await y(e.path),!0}catch{return!1}}async forget(e){let t=await this.deps.readIndex(),s=t.apps.find(a=>a.key===e);s&&(await this.deps.remove(s.path),t.apps=t.apps.filter(a=>a.key!==e),await this.deps.writeIndex(t))}async prune(){let e=await this.deps.readIndex(),t=[];for(let s of e.apps)if(await this.deps.sizeOf(s.path)!==void 0)t.push(s);else try{await y(s.path),t.push(s)}catch{}return t.length!==e.apps.length&&await this.deps.writeIndex({apps:t}),t}};var E=30*6e4,j=/^APP\d{6,}$/;function Y(r){return!!r&&j.test(r.trim())}function _(){return{store:new c,client:(r,e)=>new w(r,e),fetchToFile:async(r,e)=>{let t=await h(r,{method:"GET",signal:AbortSignal.timeout(E)});if(!t.ok)throw new Error(`Downloading the app failed: ${t.status} ${t.statusText}`);if(!t.body)throw new Error("Downloading the app failed: empty response body");await F(U.fromWeb(t.body),R(e))}}}async function Z(r,e={}){let t={..._(),...e},s=r.appId.trim(),a=await t.store.find(s);if(a&&await t.store.exists(a))return r.onProgress?.(`using the copy of ${a.name} already on this machine`),await t.store.put({key:s,sourcePath:a.path,source:"cloud",name:a.name}),{path:a.path,name:a.name,fromStore:!0};r.onProgress?.(`looking up ${s}\u2026`);let o=await t.client(r.baseUrl,r.auth).details(s);if(r.accepts&&!r.accepts.some(i=>o.name.toLowerCase().endsWith(i)))throw new Error(`${o.name} cannot run on this device \u2014 expected ${r.accepts.join(" or ")}.`);r.onProgress?.(`downloading ${o.name} \u2014 this can take a while, please wait\u2026`);let p=await O(A(T(),"kane-app-dl-"));try{let i=A(p,z(o.name));await t.fetchToFile(o.url,i);let n=await t.store.put({key:s,sourcePath:i,source:"cloud",name:o.name});return r.onProgress?.(`${o.name} is ready`),{path:n.path,name:n.name,fromStore:!1,details:o}}finally{await $(p,{recursive:!0,force:!0})}}export{c as a,Y as b,Z as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as l}from"./chunk-
|
|
2
|
+
import{b as l}from"./chunk-OKA6FPJM.js";import{a as m}from"./chunk-FI2DVNRT.js";import{a as p}from"./chunk-RZ4F3BHX.js";import{a as f}from"./chunk-K75WIRI5.js";import{a as c,b as s,h as a,y as u}from"./chunk-FAMQ4DHU.js";var v="/public/skills/kane-cli";function C(){try{let n=new f().getDefaultEnv();if(n in u)return n}catch{}return"prod"}function k(){return`${m(C()).controllerBaseUrl}${v}`}import{readFileSync as S,writeFileSync as E,mkdirSync as g}from"fs";import{join as d}from"path";var h=d(s,"skill-check.json"),y=3600*1e3;function V(){try{let n=JSON.parse(S(h,"utf-8"));if(Date.now()-n.checkedAt<y)return n}catch{}return null}function A(n){try{g(s,{recursive:!0}),E(h,JSON.stringify({map:n,checkedAt:Date.now()}))}catch{}}function I(){for(let{dir:n}of a)try{let t=S(d(n,"VERSION"),"utf-8").trim();if(t)return t}catch{}return null}function M(n,t){let i=Object.keys(n.versions??{});if(i.length===0)return null;let o=i.slice().sort((r,e)=>l(r,e));for(let r of o){let e=n.versions[r]?.kaneCliMinVersion;if(!e||l(t,e)<=0)return r}return null}async function U(){try{let n=V()?.map;if(!n){let o=new AbortController,r=setTimeout(()=>o.abort(),5e3),e=await p(k(),{headers:{Accept:"application/json"},signal:o.signal});if(clearTimeout(r),!e.ok)return null;n=await e.json(),A(n)}let t=M(n,c);if(!t)return null;let i=I();return i===null?{current:null,latestCompatible:t}:l(i,t)>0?{current:i,latestCompatible:t}:null}catch{return null}}export{k as a,M as b,U as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as i}from"./chunk-
|
|
2
|
+
import{b as i}from"./chunk-Z36KVIRR.js";function c(t){let o=[];t.executionId&&o.push({label:"execution",kind:"execution",packPath:i(t.executionId,t.cwd),status:t.executionStatus??"passed"});for(let e of t.authored)e.executionId&&o.push({label:e.relPath,kind:"authored",packPath:i(e.executionId,t.cwd),status:e.overallStatus,...e.testId?{testId:e.testId}:{},...e.commitId?{commitId:e.commitId}:{},...e.sourceExecutionId?{sourceExecutionId:e.sourceExecutionId}:{}});return o}function s(t){return t.map(o=>`kane-cli evidence serve ${o.packPath} # ${o.kind==="authored"?`${o.label} (authored)`:o.label}`)}export{c as a,s as b};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as Je}from"./chunk-DREQ3RAA.js";import{b as ne,c as $,d as ie,e as oe}from"./chunk-P4VFC6HO.js";import{h as jt,i as Ot}from"./chunk-YO6SNXBJ.js";import{b as mt,c as ft,d as gt,e as _t,f as vt,j as yt,l as ht,m as wt,n as x,o as bt,p as kt,r as xt}from"./chunk-MEMXFTLD.js";import{c as St,d as It}from"./chunk-SSOUYKVG.js";import{a as N}from"./chunk-HVOXMCKE.js";import{a as At,b as Ct}from"./chunk-TAY7J5VS.js";import{b as Dt}from"./chunk-NVD2MXHQ.js";import{a as X,c as qe,d as Ge,e as We,f as Z}from"./chunk-IINZZ4BZ.js";import{a as T}from"./chunk-73Y6T2UK.js";import{e as Pt}from"./chunk-VE4HLIGA.js";import{b as et,e as tt,g as rt,h as nt,i as it,j as ot}from"./chunk-GJ7MO2FW.js";import{b as h,c as ee,d as Qe,g as te}from"./chunk-Z36KVIRR.js";import{a as Q,b as C,d as Xe,e as Ze}from"./chunk-Q4JV4U65.js";import{a as Be,b as Ve}from"./chunk-44SIFDNY.js";import{c as ze,d as Ye,e as He}from"./chunk-5KJU4MG4.js";import{g as Ue}from"./chunk-Y6Y6RAY4.js";import{b as Ke,d as U,e as z}from"./chunk-226AGYHB.js";import{a as F}from"./chunk-FOLUB336.js";import{d as pt}from"./chunk-XB6BJPDL.js";import{h as Y,k as st,m as at,o as ct}from"./chunk-7V34ZMMS.js";import{f as Et}from"./chunk-H4TIVILC.js";import{a as Rt}from"./chunk-4C7WVQOD.js";import{M as dt,vb as lt}from"./chunk-PI7OXS62.js";import{f as re,g as ut}from"./chunk-KU3YHPWZ.js";import{b as A,c as b}from"./chunk-VZ7KXRXB.js";import{c as $e}from"./chunk-FI2DVNRT.js";import{f as Ne}from"./chunk-A7RJQJNT.js";import{a as Te}from"./chunk-FAMQ4DHU.js";function j(e){if(e===null)return"broken";let t=Math.floor(e/100);return t===1?"passed":t===7?"failed":t===2?"skipped":"broken"}var D={failed:3,broken:2,passed:1,skipped:0};function se(e){let t="skipped";for(let r of e)D[r]>D[t]&&(t=r);return t}import{createHash as ur}from"crypto";import{basename as dr}from"path";function ae(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return t.length>0?t:"session"}function ce(e){return ur("sha256").update(e).digest("hex").slice(0,8)}function ue(e){let t=dr(e).replace(/_test\.md$/i,"").replace(/\.md$/i,"");return`${ae(t)}-${ce(e)}`}function de(e,t){return`${ae(e)}-${ce(t)}`}function le(e,t=process.env){let r=Je(t),n={...r.testInstanceId?{hyper_test_instance_id:r.testInstanceId}:{},...r.jobId?{hyper_job_id:r.jobId}:{},...r.taskId?{hyper_task_id:r.taskId}:{},...e},o={};for(let[i,s]of Object.entries(n))typeof s=="string"&&s.length>0&&(o[i]=s);return o}function lr(e,t){return{pack_test_dir:e,ordinal_offset:t}}import{promises as S}from"fs";import{join as I}from"path";function pe(e){let t={evidence:"0.1",run_id:e.execution_id,status:"running",title:e.title,started:e.started,environment:{producer:{name:"kane-cli",version:e.producerVersion},...e.surfaces?{surfaces:e.surfaces}:{},run_kind:e.run_kind,origin:e.origin,pid:e.pid,...e.overrideStartUrl?{override_start_url:e.overrideStartUrl}:{}},...e.credits!==void 0?{metrics:{credits:{value:e.credits,type:"count"}}}:{}};return b(t,{lineWidth:-1})}async function me(e,t,r,n=process.cwd(),o){let i=o??h(e.execution_id,n),s=I(i,"tests",t);return await S.mkdir(I(i,"coverage"),{recursive:!0}),await S.writeFile(I(i,"coverage",".keep"),""),await S.mkdir(s,{recursive:!0}),await S.writeFile(I(i,"run.yaml"),pe(e)),r&&await S.writeFile(I(s,r.path),r.content),i}async function pr(e,t=process.cwd()){let r=h(e.execution_id,t);await S.mkdir(I(r,"coverage"),{recursive:!0}),await S.writeFile(I(r,"coverage",".keep"),"");let n=A(pe(e));return n.environment&&delete n.environment.run_kind,await S.writeFile(I(r,"run.yaml"),b(n,{lineWidth:-1})),r}async function mr(e,t=process.cwd()){return C(h(e,t),new Date().toISOString())}async function fe(e,t=process.cwd()){await S.rm(h(e,t),{recursive:!0,force:!0})}import{promises as ge}from"fs";import{join as _e}from"path";function H(e){let t={evidence:"0.1",test:e.testId,status:e.status,...e.durationMs!==void 0?{duration_ms:e.durationMs}:{},...e.attempts&&e.attempts.length?{attempts:e.attempts}:{},...e.flaky!==void 0?{flaky:e.flaky}:{},...e.adaptiveHeal?{adaptive_heal:e.adaptiveHeal}:{},...e.definitionPath?{definition:{path:e.definitionPath}}:{},...e.definitionId?{definition_id:e.definitionId}:{},...e.assuranceId?{assurance_id:e.assuranceId}:{},...e.assuranceBase?{assurance_base:e.assuranceBase}:{},...Object.keys(e.externalId).length?{external_id:e.externalId}:{},...e.tags&&e.tags.length?{tags:e.tags}:{},...Object.keys(e.environment).length?{environment:e.environment}:{},steps:e.steps};return b(t,{lineWidth:-1})}function ve(e){return b({logs:e},{lineWidth:-1})}async function ye(e,t,r){await ge.writeFile(_e(e,"tests",t,"result.yaml"),r)}async function he(e,t,r){let n=_e(e,"tests",t,"logs");await ge.mkdir(n,{recursive:!0}),await ge.writeFile(_e(n,"meta.yaml"),r)}import{promises as K}from"fs";import{join as Lt}from"path";function Mt(e){return Lt(e,".internal","meta.json")}async function Ft(e){let t;try{t=await K.readFile(Mt(e),"utf8")}catch(n){if(n?.code==="ENOENT")return null;throw n}let r=JSON.parse(t);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("meta.json is not a JSON object");return r}async function we(e,t){let r;try{r=await Ft(e)??{}}catch(s){console.warn(`evidence: meta.json at ${e} unreadable \u2014 skipping execution-pointer append to preserve identity`,s);return}let n=Array.isArray(r.executions)?r.executions:[];n.push(t),r.executions=n,await K.mkdir(Lt(e,".internal"),{recursive:!0});let o=Mt(e),i=`${o}.tmp-${process.pid}-${Date.now()}`;await K.writeFile(i,JSON.stringify(r,null,2)+`
|
|
3
|
+
`),await K.rename(i,o)}async function fr(e){try{let t=await Ft(e);return t&&Array.isArray(t.executions)?t.executions:[]}catch{return[]}}function be(e){let t=[];for(let r of e){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(o=>o.resultCode):[r.resultCode];for(let o of n)t.push(j(o))}return se(t)}function gr(e){let t=null;for(let r of e){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(o=>o.resultCode):[r.resultCode];for(let o of n)o!=null&&(t==null||D[j(o)]>D[j(t)]||D[j(o)]===D[j(t)]&&o>t)&&(t=o)}return t}import{promises as _r}from"fs";import{extname as Tt,basename as vr}from"path";var yr={".ndjson":"ndjson",".log":"log",".json":"json",".har":"har"};async function ke(e){let t;try{t=await _r.readdir(e)}catch{return[]}return t.filter(r=>r!=="meta.yaml"&&!r.startsWith(".")).sort().map(r=>({name:vr(r,Tt(r)),file:r,format:yr[Tt(r)]??"txt"}))}import{mkdirSync as hr,appendFileSync as wr}from"fs";import{join as Nt}from"path";function xe(e,t){return Nt(e,"tests",t,"logs")}function Se(e,t,r,n={},o){try{o?.(t,r,r,n)}catch{}if(e)try{hr(e,{recursive:!0});let i=JSON.stringify({ts:new Date().toISOString(),level:t,event:r,...n})+`
|
|
4
|
+
`;wr(Nt(e,"diagnostics.ndjson"),i)}catch{}}import{promises as R}from"fs";import{dirname as Ar,join as O}from"path";import{statSync as br}from"fs";import{promises as Ie}from"fs";import{basename as kr,join as xr}from"path";var Sr=1e6,Ir=2e6;function Rr(){return Be.map(e=>Ve(e))}function $t(e=Rr()){return e.map(t=>{let r=0;try{r=br(t).size}catch{}return{path:t,offset:r}})}var Er=/\x1b\[[0-9;]*[A-Za-z]/g;async function Pr(e,t,r){let n;try{n=await Ie.open(e,"r");let o=(await n.stat()).size,i=t<=o?t:0,s=o-i;if(s<=0)return null;let a=s>r?o-r:i,c=Buffer.alloc(Math.min(s,r));return await n.read(c,0,c.length,a),c.toString("utf8")}catch{return null}finally{await n?.close().catch(()=>{})}}async function Bt(e,t){let r=t.caps?.stderr??Sr,n=t.caps?.appium??Ir,o=[];t.runnerStderrPath&&o.push({src:t.runnerStderrPath,from:0,cap:r});for(let i of t.appiumMarks??[])o.push({src:i.path,from:i.offset,cap:n});for(let i of o){let s=await Pr(i.src,i.from,i.cap);if(s===null)continue;let a=s.replace(Er,"");if(a!=="")try{await Ie.mkdir(e,{recursive:!0}),await Ie.writeFile(xr(e,kr(i.src)),a)}catch{}}}async function Cr(e){try{let t=O(e,"tests"),r=await R.readdir(t).catch(()=>[]);for(let n of r){let o=O(t,n,"steps"),i=await R.readdir(o).catch(()=>[]);for(let s of i){let a=await R.readFile(O(o,s,"failure.yaml"),"utf8").catch(()=>null);if(a!=null)try{let c=A(a);if(c&&typeof c=="object"&&c.triage)return!0}catch{}}}}catch{}return!1}async function Vt(e,t,r,n={}){let o=O(e,"tests",t,"logs");if(r)try{await R.mkdir(o,{recursive:!0}),await R.copyFile(r,O(o,"tui.log"))}catch{}await Bt(o,{runnerStderrPath:r?O(Ar(r),"runner-stderr.log"):void 0,appiumMarks:n.appiumMarks});let i=await ke(o);if(!i.length&&n.requireRealLog)throw new Error(`evidence test ${t} has no real log to declare`);i.length&&await he(e,t,ve(i))}async function Re(e){let t=e.cwd??process.cwd(),r=e.packDir??h(e.executionId,t);if(!e.saved&&!e.packDir)return await fe(e.executionId,t),{sealed:!1};await Vt(r,e.testId,e.tuiLogPath,{requireRealLog:e.requireRealLog,appiumMarks:e.appiumMarks}),await z(r,await e.catalog??Ke());let n=O(r,"run.yaml"),o=A(await R.readFile(n,"utf8"));o.environment={...o.environment??{},saved:e.saved,run_kind:e.runKind},await R.writeFile(n,b(o,{lineWidth:-1}));let i=await R.open(n,"r+");try{await i.sync()}finally{await i.close()}let s=await Cr(r);await C(r,new Date().toISOString());let a;try{let u=await Q(r,"L1");a=u.valid;let p=(u.diagnostics??[]).filter(f=>String(f?.code??"").includes("failure.status_disagrees"));if(p.length>0)if(e.expectStatusDisagrees||s){let f=e.expectStatusDisagrees?"expected under --bug-detection continue":"self-explained by triaged failure record(s)";console.warn(`evidence: ${p.length} status_disagrees advisory(ies) \u2014 ${f}`)}else console.warn(`evidence: ${p.length} status_disagrees advisory(ies) \u2014 step verdicts disagree with their failure records`,p);if(!u.valid){console.warn(`evidence: sealed pack ${e.executionId} failed L1 validation`,u.diagnostics);let f=String(u.diagnostics?.[0]?.code??"");Se(xe(r,e.testId),"warn","EVIDENCE_INVALID",{execution_id:e.executionId,first_code:f,surface:e.surface??"testmd"},e.log)}}catch(u){console.warn(`evidence: validation error for ${e.executionId}`,u)}let c;if(e.saved&&e.packDir)try{c=await Qe(r,e.executionId,t)}catch(u){console.warn(`evidence: store install failed for ${e.executionId}`,u)}if(e.outputStemDir)try{await we(e.outputStemDir,{execution_id:e.executionId,run_kind:e.runKind,status:e.verdict,valid:a,at:new Date().toISOString()})}catch(u){console.warn(`evidence: execution-pointer append failed for ${e.executionId} (pack is sealed)`,u)}return{sealed:!0,valid:a,storePath:c}}import{release as Ut}from"os";import{execFileSync as Dr}from"child_process";var zt=!1,q;function jr(){if(!zt)if(zt=!0,process.platform==="darwin")try{q=Dr("sw_vers",["-productVersion"],{timeout:2e3}).toString().trim()||void 0}catch{q=Ut()||void 0}else q=Ut()||void 0;return q}function Ee(e){let t={os:X(process.platform)},r=jr();if(r&&(t.os_version=r),e.cdpBrowser){let i=/^([A-Za-z]+)\/(\d+)/.exec(e.cdpBrowser);i&&(t.browser=i[1].replace(/^Headless/,""),t.browser_version=i[2])}e.resolution&&(t.resolution=e.resolution);let n=Ge(t,e.runnerEnvironment);if(!n.native_platform)return n;e.deviceName&&(n.device=e.deviceName),!n.os_version&&e.deviceOsVersion&&(n.os_version=e.deviceOsVersion);let o=ze(e.deviceApp);if(o&&(n.app=o),Ne(n.target)){let i=Ue(e.runnerEnvironment?.device);i&&(n.device=i)}return e.pixelResolution&&(n.viewport=n.resolution??Or(e.pixelResolution,n.pixel_ratio)??e.pixelResolution,n.resolution=e.pixelResolution),n}function Or(e,t){if(!t||!Number.isFinite(t)||t<=0)return;let r=/^(\d+)x(\d+)$/.exec(e);if(r)return`${Math.round(Number(r[1])/t)}x${Math.round(Number(r[2])/t)}`}async function Yt(e){if(e)try{let t=await fetch(`${e}/json/version`,{signal:AbortSignal.timeout(2e3)});if(!t.ok)return;let r=await t.json();return typeof r.Browser=="string"?r.Browser:void 0}catch{return}}function Lr(e){let t;return()=>(t||(t=Yt(e)),t)}import{promises as w,existsSync as E,readFileSync as Nr}from"fs";import{basename as $r,join as v}from"path";import{readFileSync as Mr}from"fs";import{dirname as Fr,resolve as Tr}from"path";function Ht(e,t){let r=Tr(e),n=Mr(r,"utf8");return Y(t?st(n,at(Fr(r),t)):n)}async function Kt(e){for(let t of await w.readdir(e,{withFileTypes:!0})){let r=v(e,t.name);if(t.isDirectory()){await Kt(r);continue}try{await w.unlink(r)}catch{await w.truncate(r,0)}}await w.rmdir(e).catch(()=>{})}function Br(e){let t=e.authorBoundary<0||e.authorBoundary>e.totalSteps?e.totalSteps:e.authorBoundary;return{shrink_count:e.shrinkCount,complete_reauthor:t===0&&e.totalSteps>0,author_boundary:t,total_steps:e.totalSteps,reauthored_steps:e.totalSteps-t,credits_consumed:Math.round(e.creditsConsumed*100)/100}}var B=class e{constructor(t){this.opts=t}executionId;testId;definitionPath=null;definitionContent=null;accumulatedSteps=[];maxOrdinal=0;_attempts=[];_packDirOverride;_attached=!1;appiumMarks=$t();get attached(){return this._attached}static async attach(t){let r=$r(t.packDir).replace(/\.evidence$/,""),n=new e({origin:"testrun",runKind:"author",pid:process.pid,title:t.testId,started:new Date().toISOString(),producerVersion:Te,cwd:t.cwd});n.executionId=r,n.testId=t.testId,n._packDirOverride=t.packDir,n._attached=!0;let o=v(t.packDir,"tests",t.testId);return await w.mkdir(o,{recursive:!0}),t.definition&&(await w.writeFile(v(o,t.definition.path),t.definition.content),n.definitionPath=t.definition.path,n.definitionContent=t.definition.content),n}async start(){if(this._attached)throw new Error("attach-mode session is already started");this.executionId=ee(),this.testId=this.opts.testmdRelPath?ue(this.opts.testmdRelPath):de(this.opts.objectiveOrName??"session",this.opts.sessionId??this.executionId);let t=this.opts.definition??null;return await me({execution_id:this.executionId,title:this.opts.title,started:this.opts.started,producerVersion:this.opts.producerVersion,surfaces:this.opts.surfaces,run_kind:this.opts.runKind,origin:this.opts.origin,pid:this.opts.pid,...this.opts.credits!==void 0?{credits:this.opts.credits}:{},...this.opts.overrideStartUrl?{overrideStartUrl:this.opts.overrideStartUrl}:{}},this.testId,t,this.opts.cwd,this.opts.packRootDir?this.pack:void 0),t&&(this.definitionPath=t.path,this.definitionContent=t.content),{executionId:this.executionId,testId:this.testId,packTestDir:this.packTestDir}}get pack(){return this._packDirOverride?this._packDirOverride:this.opts.packRootDir?v(this.opts.packRootDir,`${this.executionId}.evidence`):h(this.executionId,this.opts.cwd)}get packTestDir(){return v(this.pack,"tests",this.testId)}async writeDefinition(t,r="test.md"){await w.writeFile(v(this.packTestDir,r),t),this.definitionPath=r,this.definitionContent=t}computeEngineBlock(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let t=v(this.opts.cwd,this.opts.testmdRelPath);if(E(t))return ct(Nr(t,"utf8"))??{}}}catch{}return{}}computeDefinitionId(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let t=v(this.opts.cwd,this.opts.testmdRelPath),r=v(this.opts.cwd,".context"),n=E(r)?lt(r):void 0;if(E(t))return Ht(t,n)}if(this.definitionContent!=null)return Y(this.definitionContent)}catch{}}noteSpawn(t){this.accumulatedSteps.push(...t.steps),this.maxOrdinal=Math.max(this.maxOrdinal,t.maxOrdinal)}nextOrdinalOffset(){return this.maxOrdinal}get steps(){return this.accumulatedSteps}get attempts(){return this._attempts}async archiveAttempt(t,r,n={}){let o=this._attempts.length+1,i=v(this.packTestDir,String(o)),s=n.log,a=(u,l)=>s?.("warn","ARCHIVE_ATTEMPT_FAILED",`Attempt ${o}: ${u} could not be archived into ${o}/; the next attempt will mingle with it`,{attempt:o,dir:u,error:String(l)}),c;try{await w.mkdir(i,{recursive:!0})}catch(u){a(`${o}/`,u)}for(let u of["steps","logs","v16-trajectory"]){let l=v(this.packTestDir,u);if(!E(l))continue;let p=v(i,u);try{await w.rename(l,p);continue}catch(f){s?.("warn","ARCHIVE_ATTEMPT_RENAME_FAILED",`Attempt ${o}: rename of ${u}/ refused; copying it into ${o}/ and emptying the originals in place`,{attempt:o,dir:u,error:String(f),fallback:"copy+truncate"})}try{await w.cp(l,p,{recursive:!0}),await Kt(l)}catch(f){a(u,f)}}try{this.definitionPath&&E(v(this.packTestDir,this.definitionPath))&&await w.copyFile(v(this.packTestDir,this.definitionPath),v(i,this.definitionPath));let u=v(i,"steps");if(E(u)){for(let l of await w.readdir(u))if(E(v(u,l,"failure.yaml"))){c=`${o}/steps/${l}/failure.yaml`;break}}}catch(u){a("definition + failure pointer",u)}return this._attempts.push({n:o,status:t,steps:this.accumulatedSteps,...r!==void 0?{failedAt:r}:{},...c?{failure:c}:{}}),this.accumulatedSteps=[],this.maxOrdinal=0,o}async writeResult(t){let r=be(t.spawns),n=this._attempts.length?[...this._attempts.map(m=>({status:m.status})),{status:r,...t.durationMs!==void 0?{duration_ms:t.durationMs}:{}}]:void 0,o=n?new Set(n.map(m=>m.status)).size>1:void 0,i=this._attempts.length>0,s=t.heal,a=i||s?.forced?{triggered:i,...i?{outcome:r==="passed"?"healed":"exhausted"}:{},...s?Br(s):{},...i?{attempts:this._attempts.map(m=>({n:m.n,status:m.status,failed_at:m.failedAt??-1,...m.failure?{failure:m.failure}:{}}))}:{}}:void 0,c=this.pack,u=le(t.externalIdInput),l=Z(t.runnerEnv,t.intentEnv),p=this.computeDefinitionId(),{id:f,base:y}=this.computeEngineBlock();await ye(c,this.testId,H({testId:this.testId,status:r,durationMs:t.durationMs,definitionPath:this.definitionPath,definitionId:p,assuranceId:f,assuranceBase:y,externalId:u,environment:l,steps:t.steps,tags:t.tags,attempts:n,flaky:o,adaptiveHeal:a}));for(let m of this._attempts){let _=v(this.packTestDir,String(m.n));E(_)&&await w.writeFile(v(_,"result.yaml"),H({testId:this.testId,status:m.status,definitionPath:this.definitionPath,definitionId:p,assuranceId:f,assuranceBase:y,externalId:u,environment:l,steps:m.steps,tags:t.tags}))}let d=t.externalIdInput;return t.log&&(d.commit_id||d.test_id||d.testcase_id)&&t.log("info","EVIDENCE_EXTERNAL_ID","Evidence external-id mapping",{execution_id:this.executionId,commit_id:d.commit_id??null,test_id:d.test_id??null,testcase_id:d.testcase_id??null,tc_id:u.tc_id??null,project_id:d.project_id??null,session_id:d.session_id??null,session_name:d.session_name??null,hyper_test_instance_id:u.hyper_test_instance_id??null,hyper_job_id:u.hyper_job_id??null,hyper_task_id:u.hyper_task_id??null,dataset_id:u.dataset_id??null,dataset_row_id:u.dataset_row_id??null,dataset_version_id:u.dataset_version_id??null}),r}get id(){return this.executionId}get test(){return this.testId}};async function Vr(e,t,r=te){try{let n=await r(e);if(n.aborted.length>0||n.removed.length>0)try{t?.("info","EVIDENCE_RECOVERY","Startup evidence recovery swept incomplete packs",{aborted:n.aborted,removed:n.removed,origin:"startup"})}catch{}return n}catch(n){return console.warn("evidence: startup recovery failed",n),{aborted:[],removed:[]}}}import{promises as dn}from"fs";import{existsSync as tn,mkdirSync as rn,rmSync as nn,writeFileSync as on}from"fs";import{join as Ce}from"path";import{mkdirSync as Ur,renameSync as zr,rmSync as Yr,writeFileSync as Hr}from"fs";import{join as qt}from"path";var Kr=5e6;function Gt(e,t,r){let n=qt(e,"coverage","sources"),o=new Map,i=!1;try{for(let s of r.usecases)for(let a of s.sources){if(o.has(a.id)){a.file=o.get(a.id);continue}if(!a.cid)continue;let c=t.getBlob(a.cid);if(c===null||c.byteLength>Kr)continue;i||(Ur(n,{recursive:!0}),i=!0);let u=qt(n,a.id),l=`${u}.tmp-${process.pid}`;Hr(l,c),zr(l,u);let p=`coverage/sources/${a.id}`;o.set(a.id,p),a.file=p}}catch{for(let s of r.usecases)for(let a of s.sources)delete a.file;if(i)try{Yr(n,{recursive:!0,force:!0})}catch{}}}function qr(e){return e.state==="proven"?"covered":e.proven>0?"partial":"uncovered"}function Gr(e,t,r){let n={};for(let s of e.perUc)n[s.id]={status:qr(s),state:s.state,pct:Math.round(s.pct)};let o={};for(let[s,a]of Object.entries(e.perAc)){let c=a.state==="proven";o[s]={score:c?1:0,verified:c,passes:t[s]?.passes??0,counted:t[s]?.counted??0}}let i=Object.values(n).map(s=>s.status);return{rollup_version:2,stale_sources:e.flags.stale_sources,high_risk_gaps:(r??[]).filter(s=>s.risk==="high").length,aspects:{coverage:{config:e.config,acs:o,usecases:n,summary:{coverage_pct:Math.round(e.pct),acs_verified:`${e.criteria.proven}/${e.criteria.total}`,usecases_covered:`${i.filter(s=>s==="covered").length}/${i.length}`,uncovered:i.filter(s=>s==="uncovered").length}}}}}var Wr={passed:"passed",failed:"failed",broken:"blocked"};function Jr(e,t,r){let n=e.edgesFrom(t).find(i=>i.type===ut.SCOPED_TO),o=n?e.tipOf(n.dst):r;return o===r?{type:"usecase",ref:x(e,r)}:{type:"scenario",ref:x(e,o)}}function Wt(e,t,r){let n=xt({graph:e,runs:t,thisRun:r}),{inScope:o}=ht(e),i=wt(e,new Set(o)),s=new Map(o.map(p=>[x(e,p),p])),a={},c=p=>F(e,p),u=n.perUc.map(p=>{let f=s.get(p.id),y=e.tipOf(f),d=mt(e,y,c).map(_=>gt(e,_,c,x)).sort((_,k)=>_.id<k.id?-1:1),m=(i.get(f)??[]).map(_=>{let k=x(e,_),L=e.getNode(_)?.content??{},V=bt(e,_).sort((g,P)=>x(e,g)<x(e,P)?-1:1),W=kt(e,t,_,V,r).sort((g,P)=>g.at<P.at?-1:g.at>P.at?1:0),M=n.perAc[k]?.this_run,J=V.length>0;a[k]={passes:W.filter(g=>g.verdict==="passed").length,counted:W.filter(g=>g.verdict==="passed"||g.verdict==="failed").length};let Fe=W.slice(-10).map(g=>({execution_id:g.executionId,ts:g.at,verdict:g.verdict,stale_at_run:!!g.fact.stale_at_run,oracle_mode:String(g.fact.oracle_mode),...g.fact.via_parent?{via_parent:String(g.fact.via_parent)}:{}}));return{id:k,text:String(L.text??""),risk:String(L.risk??""),scope:Jr(e,_,y),covered_by:V.map(g=>x(e,g)),...J?{link_type:"verifies"}:{},execution:M===void 0?"not-run":Wr[M]??"not-run",...M!==void 0?{this_run:M}:{},fresh:J&&M===void 0?"unknown":e.stale(_)==="fresh"?"fresh":"stale",derived:!!L.derived,..._t(L),...J?{satisfied_by:V.map(g=>{let P=e.getNode(g)?.content.check?.verified_against;return{test:x(e,g),...P?{step:P}:{}}})}:{},...Fe.length?{executions:Fe}:{}}}).sort((_,k)=>_.id<k.id?-1:1);return{...ft(e,f,x),scenarios:d,acceptance_criteria:m}}),l=vt(e);return{usecases:u,...l.length?{gaps:l}:{},rollup:Gr(n,a,l),coverage:n}}import{existsSync as Jt,readdirSync as Xr,readFileSync as Zr,statSync as Qr}from"fs";import{join as Pe}from"path";function Ae(e){let t=Pe(e,"tests");if(!Jt(t))return[];let r=[];for(let n of Xr(t).sort()){let o=Pe(t,n,"result.yaml");if(!Qr(Pe(t,n)).isDirectory()||!Jt(o))continue;let i=A(Zr(o,"utf8"));!i?.assurance_id&&!i?.definition_id||r.push({test:n,...i.assurance_id?{assuranceId:String(i.assurance_id)}:{},...i.definition_id?{definitionId:String(i.definition_id)}:{},...i.assurance_base?{base:String(i.assurance_base)}:{},verdict:String(i.status??""),acs:St(i.steps??[])})}return r}function en(e,t){if(t.assuranceId){let r=e.resolve(t.assuranceId),n=r?e.tipOf(r.cid):null;if(n!==null&&e.nodeLabel.get(n)===re.TEST&&F(e,n))return n}if(t.definitionId){for(let{cid:r,content:n}of e.byLabel(re.TEST))if(F(e,r)&&n.definitionId===t.definitionId)return r}return null}function Xt(e,t,r){let n=new Map,o=new Set;for(let i of t){let s=en(e,i);if(s===null||i.definitionId===void 0||r.definitionNow(e,s)!==i.definitionId)continue;let a=`${r.executionId}/${i.test}`;o.add(a);let c=n.get(s)??[];c.push({about:s,definition_id_at_run:i.definitionId,verdict:i.verdict,...i.acs.length?{per_ac:i.acs.map(u=>({ac_ref:u.ref,verdict:u.verdict}))}:{},drift_flag:!1,oracle_mode:"authored",stale_at_run:!1,execution_id:a,started_at:r.at,mode:"testmd",local:!0}),n.set(s,c)}return{runs:i=>n.get(e.tipOf(i))??[],thisRun:o}}var Zt=async(e,t,r)=>{if(t.kind==="grid")try{return Ae(e).some(i=>i.assuranceId)?{status:"pending",reason:"on_grid"}:{status:"skipped",reason:"not_assurance_project"}}catch{return{status:"pending",reason:"on_grid"}}if(t.kind==="none")return{status:"skipped",reason:t.reason};let n=Ce(e,"coverage"),o=tn(n);try{let i=Ae(e),s;if(t.kind==="lattice"){let a=await t.ask(i,r.executionId);if(a==="no_context")return{status:"skipped",reason:"no_use_cases_yet"};if(a==="no_answer")return{status:"pending",reason:"project_no_answer"};s=a}else{if(!t.store.exists())return{status:"skipped",reason:"not_assurance_project"};let a=dt(t.store);t.store.prefetch(pt(a),{token:null});let{runs:c,thisRun:u}=Xt(a,i,{executionId:r.executionId,at:new Date().toISOString(),definitionNow:yt});s=Wt(a,c,u);let l=new Set(s.coverage.this_run?.usecases??[]);Gt(e,t.store,{usecases:s.usecases.filter(p=>l.has(p.id))})}return rn(n,{recursive:!0}),on(Ce(n,"usecases.yaml"),b(s,{lineWidth:-1})),t.kind==="lattice"?{status:"written",computedBy:"project",project:t.project,doc:s.coverage}:{status:"written",computedBy:"local",doc:s.coverage}}catch(i){try{nn(o?Ce(n,"sources"):n,{recursive:!0,force:!0})}catch{}return{status:"failed",detail:i instanceof Error?i.message:String(i)}}};var sn=1e4,an=({url:e,basicAuth:t,projectId:r,body:n,budgetMs:o})=>Et({url:e,basicAuth:t,requestDeadlineMs:o}).coverageRun(r,n),cn=At("pack-coverage");function Qt(e,t={}){if((t.env??process.env).KANE_CLI_MODE==="hyperexecute")return{kind:"grid"};let r=Dt(e,t.address??$e());switch(r.kind){case"local":return{kind:"local",store:N(T(e))};case"refuse":return r.code==="BOTH_STORES"?{kind:"local",store:N(T(e))}:{kind:"none",reason:"project_file_unreadable"};case"remote":{let n=t.budgetMs??sn;return{kind:"lattice",project:r.projectName,ask:async(o,i)=>{try{let s=await(t.auth??Pt)(),a={execution_id:i,members:o.map(un)};return(await Ot((t.run??an)({url:r.latticeUrl,basicAuth:s,projectId:r.projectId,body:a,budgetMs:n}),n)).pack}catch(s){return s instanceof Rt&&s.code==="NO_CONTEXT"?"no_context":(cn(`the shared project's coverage wasn't read: ${s instanceof jt?s.message:Ct(s)}`),"no_answer")}}}}case"pick":return{kind:"none",reason:"not_assurance_project"}}}var un=e=>{let t=e.base??e.definitionId;return{...e.assuranceId?{assurance_id:e.assuranceId}:{},...t?{definition_id:t}:{},test:e.test,verdict:e.verdict,acs:e.acs}};async function ln(e){try{let t=new B({origin:"inline",runKind:"author",pid:e.pid,title:e.title,started:new Date().toISOString(),producerVersion:e.producerVersion,surfaces:e.surfaces,objectiveOrName:e.objectiveOrName,sessionId:e.sessionId,cwd:e.cwd,packRootDir:e.packRootDir}),r=await t.start();return{session:t,...r,packDir:t.pack,spawns:[],startedAtMs:Date.now(),cwd:e.cwd}}catch(t){return console.warn("evidence: inline pack creation failed",t),null}}function pn(e,t,r){if(!e)return;e.session.noteSpawn(t),t.resolution&&(e.resolution=t.resolution),e.runnerEnvironment=qe(e.runnerEnvironment,t.runnerEnvironment);let n=(r?.per_flow_metadata??[]).map(o=>({resultCode:o?.result_code!=null?Number(o.result_code):null}));e.spawns.push({resultCode:r?.result_code!=null?Number(r.result_code):null,...n.length?{perFlow:n}:{}})}function mn(e){if(e)return{packTestDir:e.packTestDir,ordinalOffset:e.session.nextOrdinalOffset()}}async function fn(e,t){if(!e)return null;if(e.finalized)return e.finalized;let r=(n,o,i)=>t.log?t.log("warn",n,o,i):console.warn(`evidence: ${o}`,i??"");try{if(t.recordedTestPath)try{await e.session.writeDefinition(await dn.readFile(t.recordedTestPath,"utf8"))}catch(c){r("EVIDENCE_DEFINITION_FAILED","could not attach synthesized test.md",{error:String(c)})}let n=t.cdpBrowserCapture?await t.cdpBrowserCapture():void 0,o=await e.session.writeResult({steps:e.session.steps,spawns:e.spawns.length?e.spawns:[{resultCode:null}],externalIdInput:{...t.externalIdInput,execution_id:e.executionId},runnerEnv:await He(Ee({cdpBrowser:n,resolution:e.resolution,runnerEnvironment:e.runnerEnvironment,deviceName:t.deviceName,deviceApp:t.deviceApp,pixelResolution:await Ye(e.packTestDir)}),{environment:t.environment,deviceModel:t.deviceModel,runnerEnvironment:e.runnerEnvironment}),intentEnv:We(t.model,e.runnerEnvironment),durationMs:t.durationMs??Date.now()-e.startedAtMs,log:t.log}),i=N(T(t.cwd??e.cwd??process.cwd()));try{if(t.recordedTestPath){let c=It({projectDir:t.cwd??e.cwd??process.cwd(),store:i,members:[{path:t.recordedTestPath,verdict:o,executionId:e.executionId,startedAt:new Date(e.startedAtMs).toISOString(),mode:"inline",local:t.local??!1}]});for(let u of c.warnings)r("EXEC_SYNC",u)}}catch(c){r("EXEC_SYNC","exec-sync failed",{error:String(c)})}let s;try{let c=t.cwd??e.cwd??process.cwd();s=await(t.coverageWriter??Zt)(e.packDir,(t.coverageSource??Qt)(c),{executionId:e.executionId}),(s.status==="skipped"||s.status==="failed")&&r("EVIDENCE_COVERAGE_SKIPPED",`coverage/usecases.yaml not written: ${s.status==="skipped"?s.reason:s.detail}`)}catch(c){s={status:"failed",detail:String(c)},r("EVIDENCE_COVERAGE_SKIPPED","coverage writer threw",{error:String(c)})}let a=await Re({executionId:e.executionId,testId:e.testId,saved:t.saved,runKind:"author",verdict:o,cwd:t.cwd??e.cwd,packDir:e.packDir,tuiLogPath:t.tuiLogPath,log:t.log,surface:"inline",requireRealLog:!!e.runnerEnvironment?.native_platform,appiumMarks:e.session.appiumMarks,catalog:t.environment?U(t.environment):void 0});return e.finalized={...a,coverage:s},t.log?.("info","EVIDENCE_SEALED","Inline pack sealed",{execution_id:e.executionId,verdict:o,valid:a.valid,pack:e.packDir,store_copy:a.storePath??null}),e.finalized}catch(n){return r("EVIDENCE_SEAL_FAILED","inline pack finalize failed",{error:String(n)}),null}}import{statSync as gn,openSync as _n,readSync as vn,closeSync as yn}from"fs";import{basename as hn,resolve as wn}from"path";async function bn(e,t,r={}){let n=r.out??(l=>process.stdout.write(l+`
|
|
5
|
+
`)),o=l=>(n(`error: ${l}`),2);if(t.env!=="prod"&&t.env!=="stage")return o(`invalid --env: ${String(t.env)}`);if(t.port!==void 0&&(!Number.isInteger(t.port)||t.port<1||t.port>65535))return o("invalid --port: expected an integer 1-65535");let i;try{i=$(t.env,t.viewerUrl),new URL(i)}catch{return o(`invalid --viewer-url: ${t.viewerUrl}`)}if(e.length===0)return o("no pack paths given");let s=new Map;for(let l of e){let p=wn(l),f;try{f=gn(p)}catch{return o(`${l}: not found`)}if(f.isDirectory())return o(`${l}: is a directory \u2014 packs must be sealed .evidence files (run the execution to completion, or seal it, first)`);if(!f.isFile())return o(`${l}: not a regular file`);let y=Buffer.alloc(2),d=_n(p,"r");try{vn(d,y,0,2,0)}finally{yn(d)}if(y.toString("latin1")!=="PK")return o(`${l}: not a sealed evidence pack (zip magic missing)`);let m=hn(p);if(s.has(m))return o(`duplicate pack basename: ${m} (URL names collide \u2014 rename one)`);s.set(m,p)}let a=r.log??((l,p,f)=>process.stderr.write(`warn: ${p} reason=${f.reason} path=${f.path}
|
|
6
|
+
`)),c;try{c=await ne({packs:s,allowedOrigins:[new URL(i).origin],port:t.port,log:a})}catch(l){return o(`could not bind 127.0.0.1${t.port?`:${t.port}`:""} \u2014 ${l.message}`)}n(`serving ${s.size} pack${s.size===1?"":"s"} on http://127.0.0.1:${c.port}`);for(let l of s.keys()){let p=c.urlFor(l);n(l),n(` pack ${p}`),n(` viewer ${ie(p,i)}`)}return n("press Ctrl-C to stop"),await(r.hold??kn)(),await c.close(),0}function kn(){return new Promise(e=>{let t=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.once("SIGINT",()=>{for(let r of t)process.on("SIGINT",r);e()})})}import{promises as G}from"fs";import{tmpdir as Rn}from"os";import{basename as En,join as rr,resolve as je}from"path";var xn=["error","prefer_first","prefer_latest","discard"],Sn=["external_id.commit_id","external_id.test_id","external_id.dataset_row_id","environment.os","environment.os_version","environment.browser","environment.browser_version","environment.device","environment.app"];function er(e){let t=e.replace(/-/g,"_");return xn.includes(t)?t:null}function tr(e){let t=e==="discard"?{on_collision:"discard"}:{on_collision:"error",identity:{keys:[...Sn],on_same:e??"nest",on_different:e?"error":"split"}};return b({packs:{require_status:"finalized",require_valid:"L1",on_ineligible:"abort"},tests:t,rules:[{file:"run.yaml",key:"run_id",must:"different",on_violation:"skip"},{file:"result.yaml",key:"external_id.project_id",must:"same",on_violation:"error"},{file:"result.yaml",key:"external_id.org_id",must:"same",on_violation:"error"}]},{lineWidth:-1})}async function De(e){try{if(!e.isTTY){e.log(oe(e.packPath));return}let t=$(e.env);await(e.renderPrompt??In)(e.packPath,t)}catch(t){try{e.log(`evidence view failed \u2014 ${t.message}`)}catch{}}}async function In(e,t){let r=await import("./react-QWOAB3TB.js"),{render:n}=await import("./build-5ZN47FAT.js"),{EvidenceViewOffer:o}=await import("./EvidenceViewOffer-LKPN5BHX.js");await new Promise(i=>{let s=n(r.default.createElement(o,{packPath:e,viewerBase:t,onDone:()=>{s.unmount(),i()}}),{stdout:process.stderr,exitOnCtrlC:!1})})}async function Pn(e,t,r=process.cwd(),n={}){let o=n.out??(d=>process.stdout.write(d+`
|
|
7
|
+
`)),i=n.err??(d=>process.stderr.write(d+`
|
|
8
|
+
`)),s=d=>(i(`evidence merge: ${d}`),2);if(!t.runId)return s("--run-id is required (merged identity is the caller's fact)");if(t.rules&&t.onCollision)return s("--rules and --on-collision are mutually exclusive");let a;if(t.onCollision!==void 0){let d=er(t.onCollision);if(!d)return s(`invalid --on-collision: ${t.onCollision} (expected error | prefer-first | prefer-latest | discard)`);a=d}let c=[];for(let d of e){let m=await Cn(d,r);if(!m)return s(`no pack found for "${d}"`);c.push(m)}let u=t.out?je(r,t.out):h(t.runId,r),l=[],p={files:t.policy??[],ids:t.policyId??[]};if(p.files.length+p.ids.length>0){if(!t.finalize)return s("--policy and --policy-id need a sealed merge (drop --no-finalize)");let d=await et(p,{cwd:r,fetchPolicy:n.fetchPolicy??tt({env:t.env})});if(!d.ok)return s(d.message);l=d.policies}let f=null,y;t.rules?y=je(r,t.rules):(f=await G.mkdtemp(rr(Rn(),"kane-merge-rules-")),y=rr(f,"merge-rules.yaml"),await G.writeFile(y,tr(a)));try{let d=await(n.mergeFn??Xe)(c,{runId:t.runId,out:u,rulesPath:y,title:t.title,finalize:!1});t.finalize&&(await(n.sealMergedFn??((k,L)=>An(k,L,U(t.env))))(u,Ze(d)),d={...d,output:{...d.output,finalized:!0}});let m=l.length?await nt(u,l,{judge:n.judge}):void 0;if(t.json)if(m){let{type:_,...k}=it(m,En(u,".evidence"));o(JSON.stringify({...d,verdict:{...k,verdicts:m.verdicts}}))}else o(JSON.stringify(d));else if(Dn(o,d),m){o(ot(m));for(let _ of m.files)o(` ${_}`)}return d.output.finalized&&!t.json&&await(n.offer??De)({packPath:u,env:t.env,isTTY:n.isTTY??(!!process.stdin.isTTY&&!!process.stderr.isTTY),log:i}),m?.filesError!==void 0?(i(`evidence merge: cannot write the verdict files: ${m.filesError}`),2):rt(0,m)}catch(d){let m=d instanceof Error?d.message:String(d);return d?.code==="ABORT"?(i(`evidence merge: aborted \u2014 ${m}`),1):s(m)}finally{f&&await G.rm(f,{recursive:!0,force:!0}).catch(()=>{})}}async function An(e,t,r){if(!t)throw new Error("cannot seal the merged pack: none of the merged packs records when it ended or started");await z(e,await r),await C(e,t)}async function Cn(e,t){let r=je(t,e);if(await nr(r))return r;let n=h(e,t);return await nr(n)?n:null}async function nr(e){try{return await G.stat(e),!0}catch{return!1}}function Dn(e,t){let{packs:r,tests:n,output:o}=t;e(`evidence: merged ${n.merged} tests from ${r.eligible.length} packs -> ${o.path} (${o.finalized?"sealed":"live"})`);for(let i of r.skipped)e(` skipped ${i.runId}: ${i.rule} \u2014 ${i.reason}`);for(let i of n.collisions){let s;i.action==="nest"?s=`nested into ${i.folder}, latest ${i.winner}`:i.action==="split"?s=`split into ${i.folder}`:s=`winner ${i.winner}`,e(` collision ${i.test}: ${s} (${i.rule})`)}for(let i of n.discarded)e(` discarded ${i}`)}import{copyFileSync as jn,existsSync as Oe,mkdirSync as On}from"fs";import{join as ir}from"path";function Ln(e,t,r){try{let n=ir(e,"auteur","execution.json");if(Oe(n))return!0;for(let o of t)if(!(!o||!Oe(o)))return On(ir(e,"auteur"),{recursive:!0}),jn(o,n),!0}catch(n){try{r?.("debug","EVIDENCE_BLOB_COPY_FAILED","auteur execution blob copy failed",{operation:"ensureAuteurExecution",source:t.find(o=>o&&Oe(o))??null,error:n instanceof Error?n.message:String(n)})}catch{}}return!1}import{mkdirSync as Mn,writeFileSync as Fn}from"fs";import{join as or}from"path";function Tn(e,t,r){try{return Mn(or(e,"auteur"),{recursive:!0}),Fn(or(e,"auteur","dataset.json"),JSON.stringify(t,null,2)+`
|
|
9
|
+
`,"utf8"),!0}catch(n){try{r?.("debug","EVIDENCE_DATASET_WRITE_FAILED","auteur dataset record write failed",{dataset_id:t.dataset_id,error:n instanceof Error?n.message:String(n)})}catch{}}return!1}import{readFileSync as Nn}from"fs";import{join as $n}from"path";var sr="module_block";var Bn=new Set(["generative_block",sr]);function Me(e){let t=[],r=!0,n=i=>{if(i===null||typeof i!="object")return;let s=i;if(Array.isArray(s.operations))for(let a of s.operations){let c=a?.operation_id;typeof c=="string"&&c&&t.push(c)}if(Array.isArray(s.children)){Bn.has(s.content_type)||(r=!1);for(let a of s.children)n(a)}if(Array.isArray(s.branches)){r=!1;for(let a of s.branches){let c=a?.children;if(Array.isArray(c))for(let u of c)n(u)}}},o=e?.instructions;if(Array.isArray(o))for(let i of o)n(i);return{ids:t,linear:r}}function Vn(e){return Me(e).ids}function Le(e,t){let r=new Set(t.map(a=>a.action_id).filter(Boolean)),n=-1;for(let a of r){let c=e.indexOf(a);c>n&&(n=c)}let o=t.reduce((a,c)=>Math.max(a,c.ordinal),0),i=new Set,s=[];for(let a of e.slice(n+1))r.has(a)||i.has(a)||(i.add(a),s.push({id:a,ordinal:++o,status:"skipped",action_id:a}));return s}function ar(e,t){let r=new Set(t),n=e.filter(i=>i.action_id);if(n.some(i=>r.has(i.action_id))||n.length>t.length)return null;let o=0;return e.map(i=>i.action_id?{...i,action_id:t[o++]}:i)}function Un(e,t){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r].action_id)return!1;return!0}function zn(e,t,r,n=!0){if(t.length===0)return{steps:e,tail:[]};let o=(r&&n?ar(e,t):null)??e,i=o.filter(a=>a.action_id),s=new Set(t);return i.length>0&&i.every(a=>s.has(a.action_id))?{steps:o,tail:Le(t,o)}:i.length>0&&!Un(i,t)?{steps:o,tail:[],unjoined:!0}:{steps:o,tail:Le(t,o)}}function cr(e){try{let t=Nn($n(e,"auteur","execution.json"),"utf8");return Me(JSON.parse(t))}catch{return{ids:[],linear:!0}}}function Yn(e){return cr(e).ids}export{j as a,se as b,ae as c,ce as d,ue as e,de as f,le as g,lr as h,pe as i,me as j,pr as k,mr as l,fe as m,H as n,ve as o,ye as p,he as q,we as r,fr as s,be as t,gr as u,ke as v,xe as w,Se as x,Vt as y,Re as z,Ee as A,Yt as B,Lr as C,B as D,Vr as E,Zt as F,Qt as G,ln as H,pn as I,mn as J,fn as K,bn as L,tr as M,De as N,Pn as O,Ln as P,Tn as Q,sr as R,Me as S,Vn as T,Le as U,ar as V,zn as W,cr as X,Yn as Y};
|