@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 Re}from"./chunk-LD5B3QFW.js";import{a as K,f as Se}from"./chunk-42PALMW2.js";import{c as Ie}from"./chunk-ZCIWQHCO.js";import{D as ue,H as ge,I as fe,J as he,L as me,M as ve,N as Ee,W as ye,a as M,b as T,ca as U,f as ae,g as pe,pa as $e,r as le,zb as te}from"./chunk-UEE3RZN4.js";import{g as y,h as G,i as Z,j as ee}from"./chunk-KU3YHPWZ.js";var be=["definitionId"],B=g=>be.find(m=>g[m]!==void 0)??null;function P(g,m,n,R,f){let $={...n};for(let[w,C]of Object.entries(R))C!==void 0&&!be.includes(w)&&($[w]=C);if(m==="test"&&typeof R.test_md_blob=="string"){if(f===void 0)throw new Error("a test's steps were edited without the rule for its definition id: pass definitionOf (design/test-definition.ts)");$.definitionId=f(g,R.test_md_blob)}return $}var Ne=new Set([y.EXERCISES,y.VERIFIES,y.SCOPED_TO]),ke=new Set(["approve","edit","reject"]);function ze(g){let{store:m,graph:n,ops:R,by:f}=g,$=g.mintable??Re(),w=m.head(),C=m.serialize(w);if(!m.sameToken(m.parse(n.latestHash),w))return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(n.latestHash)} but chain head is ${String(C)} \u2014 re-open and retry`}]};let W=[],D=[],ne=new Set;for(let e of R){if(n.appliedEvents.has(e.eventId)||ne.has(e.eventId)){W.push(e.eventId);continue}ne.add(e.eventId),D.push(e)}if(D.length===0)return{record:null,errors:null,applied:[],skipped:W,minted:[],staleDelta:[]};let d=[],q=[],I=[],Oe=pe(ae(m,n)),N=[],S=[],H=[],F=[...g.judgements??[]],Y=[],J=new Map,ie=new Set,se=[],j=new Set,Te=new Set($),de=new Set;for(let e of D){if(!ke.has(e.kind))continue;let i=e.target,o=n.resolve(i),t=o?n.tipOf(o.cid):i;de.has(t)&&d.push({code:"MULTIPLE_TERMINAL_OPS",detail:`${i} has more than one terminal op in this turn \u2014 normalize latest-wins first`}),de.add(t)}let b={targets:{},enhance:{},redirectTo:{},retract:{},conv:{}},k=(e,i)=>{let{target:o,expectedCid:t}=i,r=n.resolve(o);if(!r)return d.push({code:"UNKNOWN_NODE",detail:`${e}: ${o} names nothing in the graph`}),null;let s=n.tipOf(r.cid);if(s!==t||n.superseded.has(t)){let c=te(n,s).includes(t);return d.push({code:"EXPECTED_CID_MOVED",detail:c?`${e}: ${o} moved or was archived since it was displayed`:`${e}: ${o}: the cid given names no version of it, so the edit didn't match it as it is now`,data:{tip:s,target:o,moved:c}}),null}return b.targets[i.eventId]=t,t},z=e=>new Set(te(n,n.tipOf(e))),_=[],O=new Set,oe=e=>({code:"RETRACT_FORBIDDEN",detail:`retract ${e}: provenance edges cannot be retracted \u2014 DERIVES is historical evidence; reject or edit the node instead`});for(let e of D){if(e.kind!=="retract"){_.push(e);continue}let i=k("retract",e);if(!i)continue;let o=new Map;for(let s of z(i))for(let c of[...n.edgesFrom(s),...n.edgesInto(s)])o.set(c.ecid,c);let t,r={};if(e.edgeEcid!==void 0){if(n.superseded.has(e.edgeEcid)){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is already retracted`});continue}if(t=o.get(e.edgeEcid),!t){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is not a live edge touching ${e.target} (checked the full version chain)`});continue}}else if(e.edgeRef!==void 0){let s=e.edgeRef;if(s.type===y.DERIVES){d.push(oe(e.target));continue}let c=(a,u)=>{let x=U(n,u);if(x)return x;let A=n.resolve(u)!==null;return d.push(A?{code:"TOMBSTONED_REF",detail:`retract ${e.target}: ${s.type} ${a} '${u}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`retract ${e.target}: ${s.type} ${a} got (unknown) for '${u}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`}),null},v=c("dst",s.dst);if(!v)continue;r.dst=v.cid;let h=z(v.cid),l=null;if(s.src!==void 0){let a=c("src",s.src);if(!a)continue;r.src=a.cid,l=z(a.cid)}let E=[...o.values()].filter(a=>a.type===s.type&&h.has(a.dst)&&(l===null||l.has(a.src)));if(E.length===0){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: no live ${s.type} edge onto ${s.dst}${s.src!==void 0?` from ${s.src}`:""} touches ${e.target} (checked the full version chain)`});continue}if(E.length>1){let a=E.map(u=>`${u.type} ${n.displayNameOf(u.src)??u.src} \u2192 ${n.displayNameOf(u.dst)??u.dst} (${u.ecid})`).join("; ");d.push({code:"AMBIGUOUS_RETRACT",detail:`retract ${e.target}: ${E.length} live ${s.type} edges match \u2014 ${a} \u2014 add src to disambiguate`});continue}t=E[0]}else{d.push({code:"INVALID_RETRACT",detail:`retract ${e.target}: neither edge_ecid nor edge {type, dst, src?} was given`});continue}if(t.type===y.DERIVES){d.push(oe(e.target));continue}if(O.has(t.ecid)){d.push({code:"EDGE_RETRACTED",detail:`retract ${e.target}: ${t.ecid} was retracted earlier in this turn`});continue}O.add(t.ecid),b.retract[e.eventId]={ecid:t.ecid,...r},_.push({kind:"retract",target:e.target,expectedCid:e.expectedCid,edgeEcid:t.ecid,reason:e.reason,eventId:e.eventId})}let L=new Map;for(let e of _){if(e.kind!=="edit")continue;let i=n.resolve(e.target);if(!i||n.tipOf(i.cid)!==e.expectedCid||n.superseded.has(e.expectedCid))continue;let o=n.getNode(e.expectedCid);if(!o||B(e.edit)!==null)continue;let t=P(n,o.label,o.content,e.edit,g.definitionOf);if(typeof t.title=="string"&&!t.title.trim()||G(o.label,t).length>0)continue;let r=M(o.label,t);r!==e.expectedCid&&L.set(e.expectedCid,r)}for(let e of _)if(e.kind==="approve"){let i=k("approve",e);i&&N.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f})}else if(e.kind==="reject"){let i=k("reject",e);if(!i)continue;if(N.push({id:i,kind:"review-item",resolution:"rejected",edit:null,reason:e.reason,by:f}),e.redirectTo!==void 0){let o=Ee(n,e.redirectTo);if(!o){d.push({code:"UNKNOWN_NODE",detail:`reject.redirectTo: ${e.redirectTo} is not a live node`});continue}if(o===i){d.push({code:"SELF_SUPERSEDE",detail:`reject.redirectTo: the live version of ${e.redirectTo} is the node being rejected`});continue}b.redirectTo[e.eventId]=o,S.push({kind:"node",old:i,new:o,reason:e.reason,by:f});for(let t of n.edgesInto(i)){if(Z(t.type)?.pin?.comparesTo!=="dst_tip"||n.superseded.has(t.ecid)||n.superseded.has(t.src))continue;let r=`${e.reason} \u2014 ${e.target} merged into ${e.redirectTo}`,s=n.edgesFrom(t.src).some(c=>c.type===t.type&&c.dst===o&&!n.superseded.has(c.ecid));!s&&!Ne.has(t.type)||(S.push({kind:"edge",ecid:t.ecid,reason:r,by:f}),s||I.push({ecid:T(t.type,t.src,o,t.props),type:t.type,src:t.src,dst:o,props:t.props}))}}}else if(e.kind==="edit"){let i=k("edit",e);if(!i)continue;let o=n.getNode(i);if(!o){d.push({code:"UNKNOWN_NODE",detail:`edit: ${e.target} node file unreadable`});continue}let t=B(e.edit);if(t!==null){d.push({code:"DERIVED_FIELD",detail:`edit ${e.target}: ${t} is derived from the test's steps, never set by an edit; edit test_md_blob instead`});continue}let r=P(n,o.label,o.content,e.edit,g.definitionOf);if(typeof r.title=="string"&&!r.title.trim()){d.push({code:"EMPTY_TITLE",detail:`edit: ${e.target} edited title is empty`});continue}let s=G(o.label,r);if(s.length>0){for(let h of s)d.push({code:h.code,detail:`edit ${e.target}: ${h.detail}`});continue}let c=M(o.label,r);if(c===i){N.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f});continue}if(fe(n,i,c)){d.push({code:"SUPERSEDE_CYCLE",detail:`edit ${e.target}: edit reproduces an already-superseded version (supersession cycle guard) \u2014 re-edit forward or redesign`});continue}let v=he({graph:n,oldTip:i,newCid:c,newLabel:o.label,by:f,reason:`re-blessed onto ${c} (edited in chat)`,skipEcids:O,dstRedirect:L});if(v.errors.length>0){for(let h of v.errors)d.push({code:"REBLESS_REFUSED",detail:`edit ${e.target}: ${h}`});continue}q.push({cid:c,label:o.label,content:r}),I.push(...v.edges),S.push({kind:"node",old:i,new:c,reason:e.reason??"edited in chat",by:f}),S.push(...v.supersessions),N.push({id:c,kind:"review-item",resolution:"edited",edit:{...e.edit},reason:null,by:f})}else if(e.kind==="enhance"){if(!k("enhance",e))continue;for(let o of e.edges){let t=o,r=U(n,t.src),s=U(n,t.dst);if(!r||!s){let[p,Q]=r?["dst",t.dst]:["src",t.src],De=n.resolve(Q)!==null;d.push(De?{code:"TOMBSTONED_REF",detail:`enhance ${e.target}: ${t.type} ${p} '${Q}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`enhance ${e.target}: ${t.type} ${p} got (unknown) for '${Q}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`});continue}if((b.enhance[e.eventId]??=[]).push({src:r.cid,dst:s.cid}),t.type===y.DERIVES){let p=Oe.one(L.get(s.cid)??s.cid,t.props,I);if("fault"in p){d.push({code:p.fault.code,detail:`enhance ${e.target}: ${p.fault.detail}`});continue}p.props!==t.props&&(t={...t,props:p.props})}let c=n.nodeLabel.get(r.cid)??"(unknown)",v=n.nodeLabel.get(s.cid)??"(unknown)";for(let p of ee(t.type,c,v,t.props))d.push({code:p.code,detail:`enhance ${e.target}: ${p.detail}`});let h=T(t.type,r.cid,s.cid,t.props),l=L.get(r.cid)??r.cid,E=L.get(s.cid)??s.cid,a=T(t.type,l,E,t.props);if(n.superseded.has(h)||O.has(h)||n.superseded.has(a)){let p=n.superseded.has(h)||O.has(h)?h:a;d.push({code:"EDGE_RETRACTED",detail:`enhance ${e.target}: this ${t.type} edge was retracted (${p}) \u2014 re-adding a retracted edge is refused (revival unsupported)`});continue}if(n.edgesFrom(r.cid).some(p=>p.ecid===h)||I.some(p=>p.ecid===a))continue;let u=ye(n,t.type,r.cid,s.cid,se);u&&d.push(u);let x=ge(n,{type:t.type,src:r.cid,dst:s.cid},{pending:[],retracted:O},`enhance ${e.target}`);x&&d.push(x);let A=Z(t.type)?.cardinality;if(A==="one-live-per-src"||A==="one-live-per-src-and-dst"){let p=`${t.type}|${r.cid}`;j.has(p)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} from ${r.cid}: two one-live edges in one turn`}),j.add(p)}if(A==="one-live-per-src-and-dst"){let p=`${t.type}|dst|${s.cid}`;j.has(p)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} onto ${s.cid}: two one-live edges in one turn (strict 1:1)`}),j.add(p)}I.push({ecid:a,type:t.type,src:l,dst:E,props:t.props}),se.push({src:r.cid,dst:s.cid,type:t.type})}}else if(e.kind==="retract")S.push({kind:"edge",ecid:e.edgeEcid,reason:e.reason,by:f});else if(e.kind==="add"){if(!Te.has(e.label)){d.push({code:"GATED_LABEL",detail:`add: ${e.label} is not mintable in v1 (gate: ${$.join("|")})`,data:{gate:[...$]}});continue}let i=n.heads.get(e.convSourceId),o=n.convChains.get(e.convSourceId);if(typeof i!="string"||!o){d.push({code:"CONV_SOURCE_MISSING",detail:`add: ${e.convSourceId} is not a live conversation source`});continue}b.conv[e.eventId]=i;let t=n.getNode(i)?.content?.blob,r=typeof t=="string"?m.getBlob(t)?.toString("utf8")??"":"",s=Se(r,e.cite.turn);if(s===null){d.push({code:"BAD_ANCHOR",detail:`add: ${K(e.cite.turn)} does not resolve in ${e.convSourceId}`});continue}if(!ue(e.cite.quote,s)){d.push({code:"QUOTE_MISMATCH",detail:`add: quote is not verbatim within ${K(e.cite.turn)}`});continue}let c=B(e.content);if(c!==null){d.push({code:"DERIVED_FIELD",detail:`add: ${c} is derived from the test's steps, never set by an add; send test_md_blob only`});continue}let v={...P(n,e.label,{},e.content,g.definitionOf),derived:!0},h=G(e.label,v);if(h.length>0){for(let u of h)d.push({code:u.code,detail:`add: ${u.detail}`});continue}let l=M(e.label,v),E={source_id:e.convSourceId,source_cid:i,anchor:K(e.cite.turn),quote:e.cite.quote};for(let u of ee(y.DERIVES,"source",e.label,E))d.push({code:u.code,detail:`add: ${u.detail}`});if(n.hasNode(l)){if(n.superseded.has(l)){d.push({code:"NODE_TOMBSTONED",detail:`add: ${n.nameOf.get(l)??l} already exists and was retired \u2014 restore it deliberately or add it under new content`});continue}I.push({ecid:T("DERIVES",i,l,E),type:y.DERIVES,src:i,dst:l,props:E}),e.rationale&&F.push({about:l,rationale:e.rationale,by:f}),J.set(e.eventId,l);continue}q.push({cid:l,label:e.label,content:v}),I.push({ecid:T("DERIVES",i,l,E),type:y.DERIVES,src:i,dst:l,props:E}),e.rationale&&F.push({about:l,rationale:e.rationale,by:f});let a=$e(e.label,u=>ie.has(u),n.names.keys());a!==null&&(ie.add(a),H.push({cid:l,slug:a,by:f})),Y.push({cid:l,...a!==null?{slug:a}:{}}),J.set(e.eventId,l)}if(d.length)return{record:null,errors:d};let re=new Date().toISOString();for(let e of g.learn===!1?[]:_){if(e.kind==="add"){let i=J.get(e.eventId);i&&m.signals().append({ts:re,command:"extract-chat",id:i,verdict:"add",polarity:"preference",tag:e.label,by:f,event_id:e.eventId,target:i});continue}for(let i of Ie(e,{ts:re,command:"extract-chat",by:f}))m.signals().append(i)}let ce=D.map(e=>e.eventId).sort(),we=me(m,{ts:new Date().toISOString(),proposal_id:null,nodes:q,edges:I,review:N,supersessions:S,...H.length>0?{names:H}:{},...F.length>0?{judgements:F}:{},event_ids:ce,...g.sid?{sid:g.sid}:{},source_head_moves:{}},{graph:n,scope:g.scope,expectPrev:C,intent:{v:1,verb:"chat",args:le({ops:R,judgements:g.judgements??null,by:f,mintable:[...$],sid:g.sid??null,...g.learn===!1?{learn:!1}:{}}),pins:b},provenance:g.provenance}),X=ve(m),V=new Set;for(let e of S)if(e.kind==="node"){V.add(e.old);for(let i of X.edgesInto(e.old))V.add(i.src)}for(let e of Y)V.add(e.cid);let Ce=[...V].map(e=>({cid:e,state:X.stale(X.tipOf(e))})).filter(e=>e.state!=="fresh");return{record:we.record,errors:null,applied:ce,skipped:W,minted:Y,staleDelta:Ce}}export{be as a,P as b,ze as c};
|
|
2
|
+
import{a as Re}from"./chunk-LD5B3QFW.js";import{a as K,f as Se}from"./chunk-ZHAMVLQZ.js";import{c as Ie}from"./chunk-ZCIWQHCO.js";import{D as ue,H as ge,I as fe,J as he,L as me,M as ve,N as Ee,W as ye,a as M,b as T,ca as U,f as ae,g as pe,pa as $e,r as le,zb as te}from"./chunk-PI7OXS62.js";import{g as y,h as G,i as Z,j as ee}from"./chunk-KU3YHPWZ.js";var be=["definitionId"],B=g=>be.find(m=>g[m]!==void 0)??null;function P(g,m,n,R,f){let $={...n};for(let[w,C]of Object.entries(R))C!==void 0&&!be.includes(w)&&($[w]=C);if(m==="test"&&typeof R.test_md_blob=="string"){if(f===void 0)throw new Error("a test's steps were edited without the rule for its definition id: pass definitionOf (design/test-definition.ts)");$.definitionId=f(g,R.test_md_blob)}return $}var Ne=new Set([y.EXERCISES,y.VERIFIES,y.SCOPED_TO]),ke=new Set(["approve","edit","reject"]);function ze(g){let{store:m,graph:n,ops:R,by:f}=g,$=g.mintable??Re(),w=m.head(),C=m.serialize(w);if(!m.sameToken(m.parse(n.latestHash),w))return{record:null,errors:[{code:"STALE_BASIS",detail:`graph opened at ${String(n.latestHash)} but chain head is ${String(C)} \u2014 re-open and retry`}]};let W=[],D=[],ne=new Set;for(let e of R){if(n.appliedEvents.has(e.eventId)||ne.has(e.eventId)){W.push(e.eventId);continue}ne.add(e.eventId),D.push(e)}if(D.length===0)return{record:null,errors:null,applied:[],skipped:W,minted:[],staleDelta:[]};let d=[],q=[],I=[],Oe=pe(ae(m,n)),N=[],S=[],H=[],F=[...g.judgements??[]],Y=[],J=new Map,ie=new Set,se=[],j=new Set,Te=new Set($),de=new Set;for(let e of D){if(!ke.has(e.kind))continue;let i=e.target,o=n.resolve(i),t=o?n.tipOf(o.cid):i;de.has(t)&&d.push({code:"MULTIPLE_TERMINAL_OPS",detail:`${i} has more than one terminal op in this turn \u2014 normalize latest-wins first`}),de.add(t)}let b={targets:{},enhance:{},redirectTo:{},retract:{},conv:{}},k=(e,i)=>{let{target:o,expectedCid:t}=i,r=n.resolve(o);if(!r)return d.push({code:"UNKNOWN_NODE",detail:`${e}: ${o} names nothing in the graph`}),null;let s=n.tipOf(r.cid);if(s!==t||n.superseded.has(t)){let c=te(n,s).includes(t);return d.push({code:"EXPECTED_CID_MOVED",detail:c?`${e}: ${o} moved or was archived since it was displayed`:`${e}: ${o}: the cid given names no version of it, so the edit didn't match it as it is now`,data:{tip:s,target:o,moved:c}}),null}return b.targets[i.eventId]=t,t},z=e=>new Set(te(n,n.tipOf(e))),_=[],O=new Set,oe=e=>({code:"RETRACT_FORBIDDEN",detail:`retract ${e}: provenance edges cannot be retracted \u2014 DERIVES is historical evidence; reject or edit the node instead`});for(let e of D){if(e.kind!=="retract"){_.push(e);continue}let i=k("retract",e);if(!i)continue;let o=new Map;for(let s of z(i))for(let c of[...n.edgesFrom(s),...n.edgesInto(s)])o.set(c.ecid,c);let t,r={};if(e.edgeEcid!==void 0){if(n.superseded.has(e.edgeEcid)){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is already retracted`});continue}if(t=o.get(e.edgeEcid),!t){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: ${e.edgeEcid} is not a live edge touching ${e.target} (checked the full version chain)`});continue}}else if(e.edgeRef!==void 0){let s=e.edgeRef;if(s.type===y.DERIVES){d.push(oe(e.target));continue}let c=(a,u)=>{let x=U(n,u);if(x)return x;let A=n.resolve(u)!==null;return d.push(A?{code:"TOMBSTONED_REF",detail:`retract ${e.target}: ${s.type} ${a} '${u}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`retract ${e.target}: ${s.type} ${a} got (unknown) for '${u}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`}),null},v=c("dst",s.dst);if(!v)continue;r.dst=v.cid;let h=z(v.cid),l=null;if(s.src!==void 0){let a=c("src",s.src);if(!a)continue;r.src=a.cid,l=z(a.cid)}let E=[...o.values()].filter(a=>a.type===s.type&&h.has(a.dst)&&(l===null||l.has(a.src)));if(E.length===0){d.push({code:"UNKNOWN_EDGE",detail:`retract ${e.target}: no live ${s.type} edge onto ${s.dst}${s.src!==void 0?` from ${s.src}`:""} touches ${e.target} (checked the full version chain)`});continue}if(E.length>1){let a=E.map(u=>`${u.type} ${n.displayNameOf(u.src)??u.src} \u2192 ${n.displayNameOf(u.dst)??u.dst} (${u.ecid})`).join("; ");d.push({code:"AMBIGUOUS_RETRACT",detail:`retract ${e.target}: ${E.length} live ${s.type} edges match \u2014 ${a} \u2014 add src to disambiguate`});continue}t=E[0]}else{d.push({code:"INVALID_RETRACT",detail:`retract ${e.target}: neither edge_ecid nor edge {type, dst, src?} was given`});continue}if(t.type===y.DERIVES){d.push(oe(e.target));continue}if(O.has(t.ecid)){d.push({code:"EDGE_RETRACTED",detail:`retract ${e.target}: ${t.ecid} was retracted earlier in this turn`});continue}O.add(t.ecid),b.retract[e.eventId]={ecid:t.ecid,...r},_.push({kind:"retract",target:e.target,expectedCid:e.expectedCid,edgeEcid:t.ecid,reason:e.reason,eventId:e.eventId})}let L=new Map;for(let e of _){if(e.kind!=="edit")continue;let i=n.resolve(e.target);if(!i||n.tipOf(i.cid)!==e.expectedCid||n.superseded.has(e.expectedCid))continue;let o=n.getNode(e.expectedCid);if(!o||B(e.edit)!==null)continue;let t=P(n,o.label,o.content,e.edit,g.definitionOf);if(typeof t.title=="string"&&!t.title.trim()||G(o.label,t).length>0)continue;let r=M(o.label,t);r!==e.expectedCid&&L.set(e.expectedCid,r)}for(let e of _)if(e.kind==="approve"){let i=k("approve",e);i&&N.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f})}else if(e.kind==="reject"){let i=k("reject",e);if(!i)continue;if(N.push({id:i,kind:"review-item",resolution:"rejected",edit:null,reason:e.reason,by:f}),e.redirectTo!==void 0){let o=Ee(n,e.redirectTo);if(!o){d.push({code:"UNKNOWN_NODE",detail:`reject.redirectTo: ${e.redirectTo} is not a live node`});continue}if(o===i){d.push({code:"SELF_SUPERSEDE",detail:`reject.redirectTo: the live version of ${e.redirectTo} is the node being rejected`});continue}b.redirectTo[e.eventId]=o,S.push({kind:"node",old:i,new:o,reason:e.reason,by:f});for(let t of n.edgesInto(i)){if(Z(t.type)?.pin?.comparesTo!=="dst_tip"||n.superseded.has(t.ecid)||n.superseded.has(t.src))continue;let r=`${e.reason} \u2014 ${e.target} merged into ${e.redirectTo}`,s=n.edgesFrom(t.src).some(c=>c.type===t.type&&c.dst===o&&!n.superseded.has(c.ecid));!s&&!Ne.has(t.type)||(S.push({kind:"edge",ecid:t.ecid,reason:r,by:f}),s||I.push({ecid:T(t.type,t.src,o,t.props),type:t.type,src:t.src,dst:o,props:t.props}))}}}else if(e.kind==="edit"){let i=k("edit",e);if(!i)continue;let o=n.getNode(i);if(!o){d.push({code:"UNKNOWN_NODE",detail:`edit: ${e.target} node file unreadable`});continue}let t=B(e.edit);if(t!==null){d.push({code:"DERIVED_FIELD",detail:`edit ${e.target}: ${t} is derived from the test's steps, never set by an edit; edit test_md_blob instead`});continue}let r=P(n,o.label,o.content,e.edit,g.definitionOf);if(typeof r.title=="string"&&!r.title.trim()){d.push({code:"EMPTY_TITLE",detail:`edit: ${e.target} edited title is empty`});continue}let s=G(o.label,r);if(s.length>0){for(let h of s)d.push({code:h.code,detail:`edit ${e.target}: ${h.detail}`});continue}let c=M(o.label,r);if(c===i){N.push({id:i,kind:"review-item",resolution:"approved",edit:null,reason:null,by:f});continue}if(fe(n,i,c)){d.push({code:"SUPERSEDE_CYCLE",detail:`edit ${e.target}: edit reproduces an already-superseded version (supersession cycle guard) \u2014 re-edit forward or redesign`});continue}let v=he({graph:n,oldTip:i,newCid:c,newLabel:o.label,by:f,reason:`re-blessed onto ${c} (edited in chat)`,skipEcids:O,dstRedirect:L});if(v.errors.length>0){for(let h of v.errors)d.push({code:"REBLESS_REFUSED",detail:`edit ${e.target}: ${h}`});continue}q.push({cid:c,label:o.label,content:r}),I.push(...v.edges),S.push({kind:"node",old:i,new:c,reason:e.reason??"edited in chat",by:f}),S.push(...v.supersessions),N.push({id:c,kind:"review-item",resolution:"edited",edit:{...e.edit},reason:null,by:f})}else if(e.kind==="enhance"){if(!k("enhance",e))continue;for(let o of e.edges){let t=o,r=U(n,t.src),s=U(n,t.dst);if(!r||!s){let[p,Q]=r?["dst",t.dst]:["src",t.src],De=n.resolve(Q)!==null;d.push(De?{code:"TOMBSTONED_REF",detail:`enhance ${e.target}: ${t.type} ${p} '${Q}' is tombstoned (retired with no live successor) \u2014 pick a live node`}:{code:"UNKNOWN_REF",detail:`enhance ${e.target}: ${t.type} ${p} got (unknown) for '${Q}' \u2014 not a committed node (a node added in this same turn has no id yet: commit the add first)`});continue}if((b.enhance[e.eventId]??=[]).push({src:r.cid,dst:s.cid}),t.type===y.DERIVES){let p=Oe.one(L.get(s.cid)??s.cid,t.props,I);if("fault"in p){d.push({code:p.fault.code,detail:`enhance ${e.target}: ${p.fault.detail}`});continue}p.props!==t.props&&(t={...t,props:p.props})}let c=n.nodeLabel.get(r.cid)??"(unknown)",v=n.nodeLabel.get(s.cid)??"(unknown)";for(let p of ee(t.type,c,v,t.props))d.push({code:p.code,detail:`enhance ${e.target}: ${p.detail}`});let h=T(t.type,r.cid,s.cid,t.props),l=L.get(r.cid)??r.cid,E=L.get(s.cid)??s.cid,a=T(t.type,l,E,t.props);if(n.superseded.has(h)||O.has(h)||n.superseded.has(a)){let p=n.superseded.has(h)||O.has(h)?h:a;d.push({code:"EDGE_RETRACTED",detail:`enhance ${e.target}: this ${t.type} edge was retracted (${p}) \u2014 re-adding a retracted edge is refused (revival unsupported)`});continue}if(n.edgesFrom(r.cid).some(p=>p.ecid===h)||I.some(p=>p.ecid===a))continue;let u=ye(n,t.type,r.cid,s.cid,se);u&&d.push(u);let x=ge(n,{type:t.type,src:r.cid,dst:s.cid},{pending:[],retracted:O},`enhance ${e.target}`);x&&d.push(x);let A=Z(t.type)?.cardinality;if(A==="one-live-per-src"||A==="one-live-per-src-and-dst"){let p=`${t.type}|${r.cid}`;j.has(p)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} from ${r.cid}: two one-live edges in one turn`}),j.add(p)}if(A==="one-live-per-src-and-dst"){let p=`${t.type}|dst|${s.cid}`;j.has(p)&&d.push({code:"CARDINALITY_VIOLATION",detail:`${t.type} onto ${s.cid}: two one-live edges in one turn (strict 1:1)`}),j.add(p)}I.push({ecid:a,type:t.type,src:l,dst:E,props:t.props}),se.push({src:r.cid,dst:s.cid,type:t.type})}}else if(e.kind==="retract")S.push({kind:"edge",ecid:e.edgeEcid,reason:e.reason,by:f});else if(e.kind==="add"){if(!Te.has(e.label)){d.push({code:"GATED_LABEL",detail:`add: ${e.label} is not mintable in v1 (gate: ${$.join("|")})`,data:{gate:[...$]}});continue}let i=n.heads.get(e.convSourceId),o=n.convChains.get(e.convSourceId);if(typeof i!="string"||!o){d.push({code:"CONV_SOURCE_MISSING",detail:`add: ${e.convSourceId} is not a live conversation source`});continue}b.conv[e.eventId]=i;let t=n.getNode(i)?.content?.blob,r=typeof t=="string"?m.getBlob(t)?.toString("utf8")??"":"",s=Se(r,e.cite.turn);if(s===null){d.push({code:"BAD_ANCHOR",detail:`add: ${K(e.cite.turn)} does not resolve in ${e.convSourceId}`});continue}if(!ue(e.cite.quote,s)){d.push({code:"QUOTE_MISMATCH",detail:`add: quote is not verbatim within ${K(e.cite.turn)}`});continue}let c=B(e.content);if(c!==null){d.push({code:"DERIVED_FIELD",detail:`add: ${c} is derived from the test's steps, never set by an add; send test_md_blob only`});continue}let v={...P(n,e.label,{},e.content,g.definitionOf),derived:!0},h=G(e.label,v);if(h.length>0){for(let u of h)d.push({code:u.code,detail:`add: ${u.detail}`});continue}let l=M(e.label,v),E={source_id:e.convSourceId,source_cid:i,anchor:K(e.cite.turn),quote:e.cite.quote};for(let u of ee(y.DERIVES,"source",e.label,E))d.push({code:u.code,detail:`add: ${u.detail}`});if(n.hasNode(l)){if(n.superseded.has(l)){d.push({code:"NODE_TOMBSTONED",detail:`add: ${n.nameOf.get(l)??l} already exists and was retired \u2014 restore it deliberately or add it under new content`});continue}I.push({ecid:T("DERIVES",i,l,E),type:y.DERIVES,src:i,dst:l,props:E}),e.rationale&&F.push({about:l,rationale:e.rationale,by:f}),J.set(e.eventId,l);continue}q.push({cid:l,label:e.label,content:v}),I.push({ecid:T("DERIVES",i,l,E),type:y.DERIVES,src:i,dst:l,props:E}),e.rationale&&F.push({about:l,rationale:e.rationale,by:f});let a=$e(e.label,u=>ie.has(u),n.names.keys());a!==null&&(ie.add(a),H.push({cid:l,slug:a,by:f})),Y.push({cid:l,...a!==null?{slug:a}:{}}),J.set(e.eventId,l)}if(d.length)return{record:null,errors:d};let re=new Date().toISOString();for(let e of g.learn===!1?[]:_){if(e.kind==="add"){let i=J.get(e.eventId);i&&m.signals().append({ts:re,command:"extract-chat",id:i,verdict:"add",polarity:"preference",tag:e.label,by:f,event_id:e.eventId,target:i});continue}for(let i of Ie(e,{ts:re,command:"extract-chat",by:f}))m.signals().append(i)}let ce=D.map(e=>e.eventId).sort(),we=me(m,{ts:new Date().toISOString(),proposal_id:null,nodes:q,edges:I,review:N,supersessions:S,...H.length>0?{names:H}:{},...F.length>0?{judgements:F}:{},event_ids:ce,...g.sid?{sid:g.sid}:{},source_head_moves:{}},{graph:n,scope:g.scope,expectPrev:C,intent:{v:1,verb:"chat",args:le({ops:R,judgements:g.judgements??null,by:f,mintable:[...$],sid:g.sid??null,...g.learn===!1?{learn:!1}:{}}),pins:b},provenance:g.provenance}),X=ve(m),V=new Set;for(let e of S)if(e.kind==="node"){V.add(e.old);for(let i of X.edgesInto(e.old))V.add(i.src)}for(let e of Y)V.add(e.cid);let Ce=[...V].map(e=>({cid:e,state:X.stale(X.tipOf(e))})).filter(e=>e.state!=="fresh");return{record:we.record,errors:null,applied:ce,skipped:W,minted:Y,staleDelta:Ce}}export{be as a,P as b,ze as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as d}from"./chunk-XMPTFXPW.js";import{
|
|
2
|
+
import{i as d}from"./chunk-XMPTFXPW.js";import{c as a}from"./chunk-6K5BEEAJ.js";import{Ha as o}from"./chunk-H4TIVILC.js";async function p(e,l,s){let n=l.project,i=l.local===!0;if(n===void 0&&!i)return{kind:"none"};if(n!==void 0&&i)return r(o.folderFlagsBoth());if(l.resume!==void 0)return r(o.folderFlagWithResume(n!==void 0?"--project":"--local"));if(e.kind==="refuse")return r(e.refusal);if(e.kind==="local")return i?{kind:"none"}:r(o.folderWorksLocally());if(e.kind==="remote")return i?r(o.folderLinkedNotLocal(e.projectName)):n===e.projectId?{kind:"none"}:r(o.folderLinkedElsewhere(e.projectName));if(i)return{kind:"local"};let c;try{c=await s.getProject(n)}catch(t){if(t instanceof d)return r({code:t.code,message:t.message,...t.remedy?{remedy:t.remedy}:{}});if(t instanceof a)return r(o.noConnection());throw t}return c===null?r(o.projectIdUnknown(n,l.agent===!0)):{kind:"link",projectId:c.id,projectName:c.name}}var r=e=>({kind:"refuse",refusal:e}),g=e=>({...e.project!==void 0?{project:e.project}:{},...e.local===!0?{local:!0}:{}});export{p as a,g as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as $e,b as we,g as Ee}from"./chunk-
|
|
2
|
+
import{a as $e,b as we,g as Ee}from"./chunk-LWCP4GLY.js";import{a as te}from"./chunk-UCVP7ZY4.js";import{a as G}from"./chunk-5Y2G4NC7.js";import{b as ye}from"./chunk-WN5VKKJ3.js";import{a as Be}from"./chunk-XHFU5TGS.js";import{a as Te}from"./chunk-M3TFOFUQ.js";import{a as E}from"./chunk-HCBYKLMW.js";import{a as s,b as o,i as Se,j as ve,k as ee}from"./chunk-33DWJV67.js";import{a as z}from"./chunk-6YGTRKDT.js";import{z as i}from"./chunk-FAMQ4DHU.js";import{e as R}from"./chunk-UR6MHSHU.js";var M=R(z(),1);var I=R(z(),1);function de(e){let t=e.flatMap(u=>[u,...u.children??[]]),n=t.filter(u=>u.status==="passed").length,l=t.filter(u=>u.status==="failed").length,a=t.filter(u=>u.status==="passed"||u.status==="failed").length;return{passed:n,failed:l,total:a}}function ke(e){let t=Ee(e.screenshotDispatcher,e.stepLogger,e.onReasoning,e.onStepComplete),[n,l]=(0,I.useState)(0),[a,u]=(0,I.useState)("idle"),c=(0,I.useRef)("idle"),B=(0,I.useRef)(0),S=(0,I.useRef)(!1),v=(0,I.useRef)(null),d=(0,I.useRef)(null),O=(0,I.useCallback)(m=>{c.current=m,u(m)},[]),P=(0,I.useCallback)(async m=>{e.reportVerdictOnComplete&&await t.shutdownRunner($e(e.runVerdict?.()??(m?"failed":"passed"))),e.onAllComplete?.()},[t,e]),T=(0,I.useCallback)(async m=>{let b=await e.getNextConfig(m);if(!b){O("done"),await P(!1);return}let C=m?B.current+1:0;B.current=C,l(C),e.onStepStart?.(b,C),v.current=null,d.current=null,O("running"),await t.startRun(b,e.spawnOpts)},[t,e,O]);(0,I.useEffect)(()=>{S.current||(S.current=!0,T(null))},[]),(0,I.useEffect)(()=>{if(!t.lastRunEnd||t.lastRunEnd===v.current||c.current!=="running")return;v.current=t.lastRunEnd,c.current="transitioning",u("transitioning");let m=t.lastRunEnd,b=de(t.steps),C=t.bifurcationInfo,A={status:m.status==="passed"?"passed":"failed",duration_s:m.duration??0,reason:m.reason,runEnd:m,hadError:!1,stepsPassed:b.passed,stepsFailed:b.failed,stepsTotal:b.total,bifurcationFlows:C&&!C.isSingleFlow?C.flows:null,evidence:t.getEvidenceState()};if(!(e.onStepEnd?.(A,B.current)??!0)){O("done"),P(A.status==="failed");return}T(A)},[t.lastRunEnd]),(0,I.useEffect)(()=>{if(!t.runError||t.runError===d.current||t.lastRunEnd||c.current!=="running")return;d.current=t.runError,c.current="transitioning",u("transitioning");let m=de(t.steps),b={status:"failed",duration_s:0,reason:t.runError,runEnd:null,hadError:!0,stepsPassed:m.passed,stepsFailed:m.failed,stepsTotal:m.total,bifurcationFlows:null,evidence:t.getEvidenceState()};if(!(e.onStepEnd?.(b,B.current)??!0)){O("done"),P(!0);return}T(b)},[t.runError,t.lastRunEnd]);let k=(0,I.useCallback)(()=>{t.cancelRun()},[t]);return{runner:t,currentStepIndex:n,phase:a,cancel:k}}var pe=R(z(),1);var ne=R(E(),1),Ce=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];function Le({label:e,hasBifurcation:t=!1}){let[n,l]=(0,pe.useState)(0),[a,u]=(0,pe.useState)(0);G(()=>{l(B=>(B+1)%Ce.length)},80),G(()=>{u(B=>(B+1)%4)},400);let c=e??(t?"Planning approach":"Analyzing objective");return(0,ne.jsxs)(s,{marginLeft:1,children:[(0,ne.jsxs)(o,{color:i.orange,children:[Ce[n]," "]}),(0,ne.jsxs)(o,{color:i.dim,children:[c,".".repeat(a+1)]})]})}function Oe(e){if(!e.isRunning||e.replayInfo)return null;let t=e.bifurcationInfo;if(t&&!t.isSingleFlow){let n=e.steps.findIndex(a=>a.status==="running");return(n===-1?e.cmInitCounts.length===0:n>=e.cmInitCounts.length)?{label:n>0?`Planning flow ${n+1}`:void 0,hasBifurcation:!0}:null}return e.cmInitCounts.length>0||e.steps.some(n=>n.children?.length)?null:{hasBifurcation:!!t}}var L=R(z(),1);var Pe=R(z(),1);var re=R(E(),1),Ue="#ffc580",We="#ffd9a8",Ie="#ffffff";function oe({text:e,active:t=!0}){let[n,l]=(0,Pe.useState)(0),a=4;if(G(()=>{l(c=>(c+1)%(e.length+a*2))},t?80:null),!t)return(0,re.jsx)(o,{color:Ie,children:e});let u=e.split("").map((c,B)=>{let S=n-a,v=Math.abs(B-S-a/2),d;return v<=a/2?d=Ue:v<=a?d=We:d=Ie,(0,re.jsx)(o,{color:d,children:c},B)});return(0,re.jsx)(o,{children:u})}var _=R(E(),1),ze={starting:i.orange,running:i.orange,passed:i.green,failed:i.red,cancelled:i.dim,timed_out:i.orange};function ie({currentStep:e,maxSteps:t,elapsed:n,status:l}){let a=ze[l]??i.orange,u=n<60?`${n.toFixed(1)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`;return(0,_.jsxs)(s,{marginLeft:3,children:[(0,_.jsx)(o,{color:i.dim,children:"Steps "}),(0,_.jsx)(o,{bold:!0,children:e}),(0,_.jsxs)(o,{color:i.dim,children:["/",t]}),(0,_.jsx)(o,{children:" "}),(0,_.jsx)(o,{color:i.dim,children:"Elapsed "}),(0,_.jsx)(o,{bold:!0,children:u}),(0,_.jsx)(o,{children:" "}),(0,_.jsx)(o,{color:i.dim,children:"Status "}),(0,_.jsx)(o,{bold:!0,color:a,children:l})]})}var Xe={click:"\u25CF",type:"\u229E",scroll:"\u2195",navigate:"\u2192",analyze:"\u25CE",assert:"\u25C8","if-else":"\u2442",select:"\u25BC",press_key:"\u21B5",wait:"\u2026",tool_call:"\u2299"};function De(e){return Xe[e]??"\u25CF"}var q=R(E(),1);function fe({steps:e,flows:t,cmInitCounts:n,renderStep:l}){return(0,q.jsxs)(s,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:[(0,q.jsxs)(o,{color:i.dim,children:["\u2501\u2501 Bifurcated into ",t?.length??e.length," flows \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"]}),e.map((a,u)=>(0,q.jsxs)(s,{flexDirection:"column",marginTop:u>0?1:0,children:[(0,q.jsxs)(o,{color:i.orange,children:["Flow ",u+1,": ",t?.[u]??a.objective]}),n&&n[u]!=null&&(0,q.jsxs)(o,{color:i.dim,children:[" \u25AA Generated task with ",n[u]," checkpoints"]}),a.children&&a.children.length>0?a.children.map(c=>{let B=!!c.branchObjective,S=`f${u}-${c.childId??"p"}-${c.index}`;return B?(0,q.jsxs)(s,{flexDirection:"column",children:[l({...c,children:void 0},S),(c.children??[]).map(v=>(0,q.jsx)(s,{marginLeft:2,children:l(v,`${S}-${v.childId??"p"}-${v.index}`)},`${S}-${v.childId??"p"}-${v.index}`))]},`${S}-host`):l(c,S)}):a.status==="pending"&&(0,q.jsx)(o,{color:i.dim,children:" \u25CB Waiting..."})]},u))]})}var K=R(E(),1);function je({label:e,shimmer:t=!1}){return(0,K.jsxs)(s,{marginLeft:6,children:[(0,K.jsx)(te,{}),(0,K.jsx)(o,{children:" "}),t?(0,K.jsx)(oe,{text:e,active:!0}):(0,K.jsx)(o,{color:i.dim,children:e})]})}var Fe=R(z(),1);var me=R(E(),1);function Ye(e,t){let n=[];for(let l of e.split(`
|
|
3
3
|
`)){if(l===""){n.push("");continue}let a="";for(let u of l.split(" ")){let c=u;for(;c.length>t;)a&&(n.push(a),a=""),n.push(c.slice(0,t)),c=c.slice(t);a===""?a=c:a.length+1+c.length<=t?a+=" "+c:(n.push(a),a=c)}n.push(a)}return n}function _e({text:e,maxLines:t=3}){let{stdout:n}=ee(),l=Math.max(20,(n?.columns??80)-7),a=!e.trim(),[u,c]=(0,Fe.useState)(!0);G(()=>c(v=>!v),500);let B=(a?"Thinking\u2026":e)+(u?"\u258C":" "),S=Ye(B,l).slice(-t);for(;S.length<t;)S.push("");return(0,me.jsx)(s,{borderStyle:"round",borderColor:i.muted,paddingX:1,marginLeft:3,flexDirection:"column",children:S.map((v,d)=>(0,me.jsx)(o,{color:a?i.dim:i.secondary,wrap:"truncate-end",children:v.length?v:" "},d))})}var H=R(E(),1);function se({activity:e,describe:t,describeVisible:n}){return(0,H.jsxs)(H.Fragment,{children:[e?(0,H.jsx)(je,{label:e.label,shimmer:e.shimmer}):null,n?(0,H.jsx)(_e,{text:t??""}):null]})}var r=R(E(),1);function le(e){for(let t of e){if(t.children&&t.children.length>0){let n=le(t.children);if(n)return n}if(t.status==="running")return t}}function X(e){return e.status==="running"&&!e.branchObjective&&(!e.children||e.children.length===0)}function Ae(e){let t=[];for(let n of e)X(n)||(n.children&&n.children.length>0?t.push({...n,children:Ae(n.children)}):t.push(n));return t}function ge(e,t){if(!e)return null;let n=e.objective??"";return n.length>0&&!/^Step \d+$/.test(n)?{label:n+"\u2026",shimmer:!1}:{label:t?"Looking at the screen\u2026":"Deciding next action\u2026",shimmer:!0}}function D({step:e,indent:t=2}){let n=e.actionType?De(e.actionType):null,l=e.status==="running",a=e.status==="passed",u=e.status==="failed",c=e.status==="pending"||e.status==="stopped",{stdout:B}=ee(),S=B?.columns??80,v=Math.max(20,S-t-21),d=e.objective??"",O=d.length>v?d.slice(0,v-1)+"\u2026":d,P=(e.duration??0)*1e3,T=e.duration!=null?P<1e3?`${Math.round(P)}ms`:`${(P/1e3).toFixed(1)}s`:"";return(0,r.jsxs)(s,{flexDirection:"column",children:[(0,r.jsxs)(s,{marginLeft:t,children:[(0,r.jsx)(s,{width:4,children:(0,r.jsxs)(o,{color:i.muted,children:[String(e.index).padStart(2," ")," "]})}),(0,r.jsx)(s,{width:3,children:l?(0,r.jsx)(te,{}):a?(0,r.jsx)(o,{color:i.green,bold:!0,children:"\u2713"}):u?(0,r.jsx)(o,{color:i.red,bold:!0,children:"\u2717"}):(0,r.jsx)(o,{color:i.muted,children:"\u25CB"})}),(0,r.jsx)(s,{flexGrow:1,children:l?(0,r.jsx)(oe,{text:O,active:!0}):u?(0,r.jsx)(o,{color:i.red,children:O}):c?(0,r.jsx)(o,{color:i.dim,children:O}):(0,r.jsx)(o,{color:i.dim,children:O})}),(a||u)&&n?(0,r.jsx)(s,{width:3,marginLeft:1,children:(0,r.jsx)(o,{color:i.muted,children:n})}):(0,r.jsx)(s,{width:3,marginLeft:1}),(0,r.jsx)(s,{width:7,justifyContent:"flex-end",children:(0,r.jsx)(o,{color:i.dim,children:T})})]}),e.children&&e.children.length>0&&(0,r.jsx)(s,{flexDirection:"column",children:e.children.map((k,m)=>(0,r.jsx)(D,{step:k,indent:t+2},`child-${m}`))})]})}function Je(e){return e.type==="cm_init"?(0,r.jsx)(s,{marginLeft:2,paddingLeft:1,children:(0,r.jsxs)(o,{color:i.dim,children:["\u25AA Generated task with ",e.count," checkpoints"]})}):(0,r.jsx)(s,{marginLeft:2,paddingLeft:1,children:(0,r.jsx)(D,{step:e.step})})}function Me({steps:e,bifurcated:t,flows:n,cmInitCounts:l,maxSteps:a=50,staticSteps:u=!1,onStepCommit:c,describe:B,describeVisible:S,describeRevealing:v}){let d=(0,L.useRef)(new Set),O=(0,L.useRef)(!1),P=(0,L.useRef)(new Set),T=(0,L.useRef)(!1),k=(0,L.useRef)(new Set),m=(0,L.useRef)(0);(0,L.useEffect)(()=>{e.length===0&&m.current>0&&(d.current.clear(),O.current=!1,P.current.clear(),T.current=!1,k.current.clear()),m.current=e.length},[e.length]);let b=e.flatMap(p=>[p,...p.children??[]]),C=b.some(p=>p.status==="running"),A=b.some(p=>p.status==="failed"),W=b.length===0||b.every(p=>p.status==="pending"),Y=b.filter(p=>p.status==="passed"||p.status==="failed").length,N;W?N="starting":C?N="running":A?N="failed":N="passed";let J=(0,L.useRef)(null),[ce,he]=(0,L.useState)(0);(0,L.useEffect)(()=>{b.length===0||W?(J.current=null,he(0)):C&&J.current==null&&(J.current=Date.now())},[C,W,b.length]),(0,L.useEffect)(()=>{if(!C)return;let p=setInterval(()=>{J.current!=null&&he((Date.now()-J.current)/1e3)},500);return()=>clearInterval(p)},[C]);let ae=(0,L.useRef)(new Set),[,xe]=(0,L.useState)(0),be=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!c||!u||t)return;let p=[];!be.current&&l&&l[0]!=null&&(be.current=!0,l[0]>0&&p.push({key:"cm_init_0",type:"cm_init",count:l[0]}));for(let h of e)(h.status==="passed"||h.status==="failed")&&!ae.current.has(h.index)&&(ae.current.add(h.index),p.push({key:`step_${h.index}`,type:"step",step:{...h,children:h.children?[...h.children]:void 0}}));if(p.length>0){for(let h of p)c(Je(h));xe(h=>h+1)}},[e,t,l,u,c]),(0,L.useEffect)(()=>{if(!c||u)return;let p=d.current.size;if(!t&&!T.current&&l&&l[0]!=null&&(T.current=!0,l[0]>0&&c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsxs)(o,{color:i.dim,children:["\u25A0 Generated task with ",l[0]," checkpoints"]})}))),t&&n&&!O.current&&(O.current=!0,c((0,r.jsx)(o,{color:i.purple,children:"\u2501\u2501 Bifurcated into "+n.length+" flows \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"}))),t){let h=e.flatMap((x,f)=>{let g=x.children??[];return!P.current.has(f)&&g.length>0&&(P.current.add(f),c((0,r.jsx)(o,{color:i.purple,children:" Flow "+(f+1)+": "+(n?.[f]??"")})),l?.[f]!=null&&l[f]>0&&!k.current.has(f)&&(k.current.add(f),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsxs)(o,{color:i.dim,children:[" \u25AA Generated task with ",l[f]," checkpoints"]})})))),l?.[f]!=null&&l[f]>0&&P.current.has(f)&&!k.current.has(f)&&(k.current.add(f),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsxs)(o,{color:i.dim,children:[" \u25AA Generated task with ",l[f]," checkpoints"]})}))),g});for(let x of h){let f=`${x.childId??"p"}-${x.index}-${x.objective}`;if(!!x.branchObjective){d.current.has(f)||(d.current.add(f),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:{...x,children:void 0}})})));for(let y of x.children??[]){let $=`child-${x.childId??"p"}-${x.index}-${y.childId??"p"}-${y.index}-${y.objective}`;d.current.has($)||(y.status==="passed"||y.status==="failed"||y.status==="stopped")&&(d.current.add($),c((0,r.jsx)(s,{marginLeft:4,children:(0,r.jsx)(D,{step:y})})))}continue}d.current.has(f)||(x.status==="passed"||x.status==="failed"||x.status==="stopped")&&(d.current.add(f),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:x})})))}}else for(let h of e){let x=`${h.index}-${h.objective}`,f=!!h.branchObjective;f&&!d.current.has(x)&&(d.current.add(x),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:{...h,children:void 0}})})));for(let g of h.children??[]){let y=`child-${h.index}-${g.childId??"p"}-${g.index}-${g.objective}`;d.current.has(y)||(g.status==="passed"||g.status==="failed"||g.status==="stopped")&&(d.current.add(y),c((0,r.jsx)(s,{marginLeft:4,children:(0,r.jsx)(D,{step:g})})))}!f&&!d.current.has(x)&&(h.status==="passed"||h.status==="failed"||h.status==="stopped")&&(d.current.add(x),c((0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:{...h,children:void 0}})})))}d.current.size>p&&xe(h=>h+1)},[e,c,t,n,l]);let V=[];if(u&&!t)for(let p of e)ae.current.has(p.index)||V.push(p);else if(c&&!u)if(t)for(let p of e){let h=p.children??[],x=[];for(let f of h){let g=`${f.childId??"p"}-${f.index}-${f.objective}`,y=d.current.has(g);if(f.branchObjective){let $=(f.children??[]).filter(Q=>{let ue=`child-${f.childId??"p"}-${f.index}-${Q.childId??"p"}-${Q.index}-${Q.objective}`;return!d.current.has(ue)});(!y||$.length>0)&&x.push({...f,children:$})}else y||x.push(f)}x.length>0&&V.push({...p,children:x})}else for(let p of e){let h=`${p.index}-${p.objective}`,x=d.current.has(h),f=(p.children??[]).filter(g=>{let y=`child-${p.index}-${g.childId??"p"}-${g.index}-${g.objective}`;return!d.current.has(y)});x?f.length>0&&V.push({...p,children:f}):V.push({...p,children:f})}if(!u){let p=c?V:e,h=le(p),x=ge(h,v);return(0,r.jsxs)(s,{flexDirection:"column",children:[t?c?p.length>0?(0,r.jsx)(s,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:p.map((g,y)=>(0,r.jsx)(s,{flexDirection:"column",marginTop:y>0?1:0,children:g.children&&g.children.length>0?g.children.map($=>{if(X($))return null;let Q=!!$.branchObjective,ue=`${$.childId??"p"}-${$.index}-${$.objective}`,He=d.current.has(ue);return Q?(0,r.jsxs)(s,{flexDirection:"column",children:[!He&&(0,r.jsx)(D,{step:{...$,children:void 0}}),($.children??[]).filter(Z=>!X(Z)).map(Z=>(0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:Z})},`f${y}-${$.index}-${Z.childId??"p"}-${Z.index}`))]},`f${y}-host-${$.childId??"p"}-${$.index}`):(0,r.jsx)(D,{step:$},`f${y}-${$.childId??"p"}-${$.index}`)}):g.status==="pending"&&(0,r.jsx)(o,{color:i.dim,children:" \u25CB Waiting..."})},y))}):null:(0,r.jsx)(fe,{steps:e,flows:n,cmInitCounts:l,renderStep:(g,y)=>X(g)?null:(0,r.jsx)(D,{step:g},y)}):(0,r.jsxs)(s,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:[!c&&l&&l[0]!=null&&(0,r.jsxs)(o,{color:i.dim,children:["\u25AA Generated task with ",l[0]," checkpoints"]}),p.filter(g=>!(g.status==="running"&&(!g.children||g.children.length===0))).map(g=>{let y=`${g.index}-${g.objective}`;return c&&d.current.has(y)?(0,r.jsx)(s,{flexDirection:"column",children:(g.children??[]).filter($=>!X($)).map($=>(0,r.jsx)(s,{marginLeft:2,children:(0,r.jsx)(D,{step:$})},`${$.childId??"p"}-${$.index}`))},`branch-children-${g.index}`):(0,r.jsx)(D,{step:g},g.index)})]}),(0,r.jsx)(se,{activity:x,describe:B,describeVisible:S}),b.length>0&&(0,r.jsx)(ie,{currentStep:Y,maxSteps:a,elapsed:ce,status:N})]})}if(t){let p=le(e),h=ge(p,v);return(0,r.jsxs)(s,{flexDirection:"column",children:[(0,r.jsx)(fe,{steps:e,flows:n,cmInitCounts:l,renderStep:(x,f)=>X(x)?null:(0,r.jsx)(D,{step:x},f)}),(0,r.jsx)(se,{activity:h,describe:B,describeVisible:S}),b.length>0&&(0,r.jsx)(ie,{currentStep:Y,maxSteps:a,elapsed:ce,status:N})]})}let Ge=le(V),Ke=ge(Ge,v),Re=Ae(V);return(0,r.jsxs)(s,{flexDirection:"column",children:[Re.length>0&&(0,r.jsx)(s,{flexDirection:"column",marginLeft:2,paddingLeft:1,children:Re.map(p=>(0,r.jsx)(D,{step:p},p.index))}),(0,r.jsx)(se,{activity:Ke,describe:B,describeVisible:S}),b.length>0&&(0,r.jsx)(ie,{currentStep:Y,maxSteps:a,elapsed:ce,status:N})]})}var U=R(E(),1);function qe({runner:e,runKey:t,onStepCommit:n}){let l=Oe({isRunning:e.isRunning,bifurcationInfo:e.bifurcationInfo,steps:e.steps,cmInitCounts:e.cmInitCounts,replayInfo:e.replayInfo});return(0,U.jsxs)(U.Fragment,{children:[l&&(0,U.jsx)(Le,{label:l.label,hasBifurcation:l.hasBifurcation}),e.isRunning&&e.steps.length>0&&(0,U.jsx)(Me,{steps:e.steps,bifurcated:!!e.bifurcationInfo&&!e.bifurcationInfo.isSingleFlow,flows:e.bifurcationInfo?.flows,cmInitCounts:e.cmInitCounts,maxSteps:e.maxSteps,onStepCommit:n},`run-${t}`)]})}var j=R(E(),1),Qe=64;function Ze(e){return e.split(`
|
|
4
4
|
`).map(t=>t.replace(/^[-–•]\s*/,"").trim()).filter(t=>t.length>0)}function Ne({status:e,summary:t,duration:n,steps:l,stepsPassed:a,stepsFailed:u,reason:c,creditsConsumed:B}){let S=e==="passed",v=S?i.green:i.red,d=S?"\u2713":"\u2717",O=e.toUpperCase(),P=a??(S?l:Math.max(0,l-1)),T=u??(S?0:1),k=T>0?`${l} steps (${P} passed, ${T} failed)`:`${l} steps`,m=n<60?`${n.toFixed(1)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`,b=Ze(t);return(0,j.jsx)(s,{flexDirection:"column",marginTop:1,children:(0,j.jsxs)(s,{borderStyle:"round",borderColor:v,flexDirection:"column",paddingX:2,paddingY:1,width:Qe+6,children:[(0,j.jsxs)(s,{flexDirection:"column",children:[(0,j.jsxs)(o,{bold:!0,color:v,children:[d," ",O]}),(0,j.jsxs)(o,{color:i.dim,wrap:"wrap",children:[k," \xB7 ",m,typeof B=="number"&&B>0?` \xB7 ${parseFloat(B.toFixed(4))} credits`:""]})]}),b.length>0&&(0,j.jsx)(s,{flexDirection:"column",marginTop:1,marginLeft:1,children:b.map((C,A)=>(0,j.jsxs)(s,{marginBottom:A<b.length-1?1:0,children:[(0,j.jsx)(o,{color:i.orange,children:"\u25CF "}),(0,j.jsx)(s,{flexShrink:1,children:(0,j.jsx)(o,{wrap:"wrap",children:C})})]},A))}),c&&!S&&(0,j.jsx)(s,{marginTop:1,children:(0,j.jsxs)(o,{color:i.red,wrap:"wrap",children:["Reason: ",c]})})]})})}var F=R(E(),1);function Ve({message:e,code:t,remediation:n,docsUrl:l}){return(0,F.jsx)(Te,{title:"Error",variant:"error",children:(0,F.jsxs)(s,{flexDirection:"column",paddingY:1,children:[(0,F.jsxs)(o,{color:i.red,bold:!0,children:[" \u2717 ",e]}),t&&(0,F.jsxs)(s,{marginTop:0,marginLeft:5,children:[(0,F.jsx)(o,{color:i.muted,children:"Code: "}),(0,F.jsx)(o,{color:i.dim,children:t})]}),n&&(0,F.jsxs)(s,{flexDirection:"column",marginTop:1,marginLeft:5,children:[(0,F.jsx)(o,{color:i.green,bold:!0,children:"Fix:"}),(0,F.jsxs)(o,{color:i.orange,children:["$ ",n]})]}),l&&(0,F.jsxs)(s,{marginTop:1,marginLeft:5,children:[(0,F.jsx)(o,{color:i.muted,children:"Docs: "}),(0,F.jsx)(o,{color:i.orange,underline:!0,children:l})]})]})})}var w=R(E(),1),et=1e4;function gn(e){let{exit:t}=ve(),{append:n}=ye(),l=(0,M.useRef)(!1);(0,M.useEffect)(()=>{l.current||(l.current=!0,n((0,w.jsx)(s,{flexDirection:"column",marginBottom:1,children:(0,w.jsxs)(s,{borderStyle:"round",borderColor:"#dc4e08",paddingX:2,children:[(0,w.jsx)(o,{color:"#ff9500",bold:!0,children:"KaneAI CLI"}),(0,w.jsx)(o,{color:i.dim,children:" \u2502 "}),(0,w.jsx)(o,{color:i.orange,children:e.topBanner.model}),(0,w.jsx)(o,{color:i.dim,children:" \u2502 "}),(0,w.jsx)(o,{color:i.dim,children:e.topBanner.auth})]})})),n((0,w.jsx)(tt,{data:e.globalConfig})),e.priorAttemptRollup&&n((0,w.jsx)(o,{color:i.dim,children:` \u21B3 replayed ${e.priorAttemptRollup.startIdx}..${e.priorAttemptRollup.endIdx-1} (${e.priorAttemptRollup.count} steps, from prior attempt)`})))},[]);let a=(0,M.useRef)(null),u=(0,M.useCallback)(async T=>{let k=await e.getNextStep(T);return k?(a.current=k,k.config):(a.current=null,null)},[e]),c=(0,M.useCallback)((T,k)=>{let m=a.current;if(!m)return;let b=m.mode==="replay"?"cyan":"#dc4e08",C=m.modeReason?` (${m.modeReason})`:"",A=m.perStepOverrides?Object.entries(m.perStepOverrides):[];n((0,w.jsxs)(s,{flexDirection:"column",marginBottom:0,children:[(0,w.jsxs)(o,{children:[(0,w.jsxs)(o,{color:i.dim,children:[m.banner.stepLabel," "]}),(0,w.jsxs)(o,{color:b,children:["[",m.mode,"]"]}),(0,w.jsx)(o,{color:i.dim,children:C})]}),(0,w.jsx)(o,{color:i.dim,children:m.banner.objective}),A.length>0&&(0,w.jsxs)(o,{color:i.dim,children:["overrides: ",A.map(([W,Y])=>`${W}=${Y}`).join(", ")]})]}))},[n]),B=(0,M.useRef)(0),S=(0,M.useRef)(!1),v=(0,M.useCallback)((T,k)=>(T.hadError?n((0,w.jsx)(Ve,{message:T.reason??"Runner error",code:"RUNNER_ERROR"})):n((0,w.jsx)(s,{flexDirection:"column",marginBottom:1,children:(0,w.jsx)(Ne,{status:T.status,summary:T.runEnd?.summary??"",duration:T.runEnd?.duration??0,steps:T.stepsTotal,stepsPassed:T.stepsPassed,stepsFailed:T.stepsFailed,reason:T.runEnd?.reason,creditsConsumed:T.runEnd?.credits_consumed})})),e.onStepEnd?.(T,k)??!0),[n,e]),d=ke({getNextConfig:u,onStepStart:c,onStepEnd:v,onAllComplete:()=>{e.onAllComplete(),e.exitOnComplete!==!1&&setImmediate(()=>t())},screenshotDispatcher:e.screenshotDispatcher,stepLogger:e.stepLogger,onReasoning:e.onReasoning,onStepComplete:e.onStepComplete,spawnOpts:e.spawnOpts,...e.reportVerdictOnComplete?{reportVerdictOnComplete:!0}:{},...e.runVerdict?{runVerdict:e.runVerdict}:{}}),O=250,P=5e3;return Se((T,k)=>{if(k.ctrl&&T==="c"){let m=Date.now(),b=m-B.current;if(b<O)return;if(S.current&&b<P){d.cancel(),e.onCancel?.();let C=e.reportVerdictOnComplete?d.runner.shutdownRunner(we,{timeoutMs:et}):Promise.resolve();e.exitOnComplete!==!1&&C.then(()=>setImmediate(()=>t()))}else S.current=!0,n((0,w.jsx)(o,{color:"yellow",children:"press Ctrl+C again to cancel run"}));B.current=m}}),(0,w.jsx)(s,{flexDirection:"column",children:d.phase!=="done"&&(0,w.jsx)(qe,{runner:d.runner,runKey:d.currentStepIndex,onStepCommit:n})})}function tt({data:e}){return(0,w.jsx)(Be,{title:"test.md run",titleColor:"#ff9500",borderColor:i.dim,rows:[{label:"source",value:e.source},{label:"steps",value:`${e.steps.total} (${e.steps.replay} replay, ${e.steps.author} author per walker)`},{label:"model",value:e.model},{label:"viewport",value:`${e.viewport.width} x ${e.viewport.height}`},{label:"chrome",value:e.chrome},{label:"session",value:e.session},{label:"variables",value:`${e.variables.count} (${e.variables.secrets} secret)`},{label:"flags",value:e.flags.length>0?e.flags.join(" "):"(none)"}]})}export{Me as a,Le as b,Oe as c,de as d,Ne as e,Ve as f,gn as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{g as l}from"./chunk-
|
|
2
|
+
import{g as l}from"./chunk-HYJVYYAZ.js";import{existsSync as u,readdirSync as d,readFileSync as f}from"fs";import{join as o}from"path";var m="--variables",g=["global","smart","environment","secrets","totp"],p=/^[a-z][a-z0-9_]*$/;function x(r){return typeof r=="string"?r.trim().length>0:typeof r=="number"&&Number.isFinite(r)}function a(r,e,n){let t=JSON.parse(r);if(!(!t||typeof t!="object")){for(let[i,s]of Object.entries(t))if(s&&typeof s=="object"&&"value"in s){let b={has_value:x(s.value),source:e};n.set(y(i),b)}}}function c(r,e){if(!u(r))return;let n;try{n=d(r).filter(t=>t.endsWith(".json")).sort()}catch{return}for(let t of n){let i=o(r,t);try{a(f(i,"utf-8"),i,e)}catch{}}}function w(r){return{globalDir:o(l().baseDir,"variables"),localDir:o(r,".testmuai","variables")}}function I(r){let e=new Map;if(c(r.globalDir,e),c(r.localDir,e),r.file&&u(r.file))try{a(f(r.file,"utf-8"),r.file,e)}catch{}if(r.inline)try{a(r.inline,m,e)}catch{}return e}function N(r){let e=r.trim();if(!e)return null;let n=e.split(/[.[]/).map(t=>t.trim()).filter(Boolean);return n.length===0||g.includes(n[0])?null:n[0]}function y(r){let e=/^(?:global|secrets\.user|environment)\.(.+)$/.exec(r);return e?e[1]:r}function V(r){if(!r||!r.trim())return"variable name is empty";let e=r.split(".")[0];return g.includes(e)?`'${r}' starts with a runtime namespace (global/secrets/smart/environment/totp) \u2014 declare the bare name`:p.test(r)?null:`'${r}' is not lower_snake_case (letters, digits, underscores; starts with a letter)`}export{m as a,w as b,I as c,N as d,y as e,V as f};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{L as c,r as d}from"./chunk-
|
|
2
|
+
import{L as c,r as d}from"./chunk-PI7OXS62.js";function u(a,e,t){let{ref:r,reason:o,by:s}=t;if(!o||o.trim().length===0)return{record:null,errors:[{code:"REASON_REQUIRED",detail:"archiving a node needs a reason \u2014 it becomes the tombstone's provenance"}]};let i=e.resolve(r);if(!i)return{record:null,errors:[{code:"UNKNOWN_REF",detail:`no node '${r}' in the graph`}]};let n=e.tipOf(i.cid);return e.superseded.has(n)?{record:null,errors:[{code:"ALREADY_ARCHIVED",detail:`${r} is already superseded at its tip (${n.slice(0,19)}\u2026)`}]}:{record:c(a,{ts:new Date().toISOString(),proposal_id:null,nodes:[],edges:[],review:[],supersessions:[{kind:"node",old:n,new:null,reason:o,by:s}],source_head_moves:{}},{graph:e,expectPrev:e.latestHash,intent:{v:1,verb:"archive",args:d({ref:r,reason:o,by:s}),pins:{ref:n}},provenance:t.provenance}).record,errors:null}}export{u as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as k}from"./chunk-
|
|
2
|
+
import{a as k}from"./chunk-M3TFOFUQ.js";import{a as f}from"./chunk-HCBYKLMW.js";import{a as m,b as s,k as b}from"./chunk-33DWJV67.js";import{z as u}from"./chunk-FAMQ4DHU.js";import{e as p}from"./chunk-UR6MHSHU.js";function B(t){let e=t;return e=e.replace(/@TS\{([^}]+)\}/g,"@S{$1}"),e=e.replace(/@TS-(\d+)/g,(o,i)=>`@S${parseInt(i,10)}.C1`),e=e.replace(/@TS(\d+)/g,(o,i)=>`@S${parseInt(i,10)}`),e=e.replace(/\\n/g,`
|
|
3
3
|
`),e}var c=p(f(),1),S=t=>t!==void 0&&/[A-Za-z0-9]/.test(t);function x(t){let e=[],o="",i=()=>{o&&(e.push({text:o}),o="")},l=(a,d,r)=>(a===0||!S(t[a-1]))&&(d+r>=t.length||!S(t[d+r])),n=0;for(;n<t.length;){let a=t.slice(n,n+2),d=t[n];if(a==="**"||a==="__"){let r=t.indexOf(a,n+2);if(r!==-1&&r>n+2&&(a==="**"||l(n,r,2))){i(),e.push({text:t.slice(n+2,r),bold:!0}),n=r+2;continue}}if(d==="`"){let r=t.indexOf("`",n+1);if(r!==-1&&r>n+1){i(),e.push({text:t.slice(n+1,r),code:!0}),n=r+1;continue}}if(d==="*"||d==="_"){let r=t.indexOf(d,n+1);if(r!==-1&&r>n+1&&(d==="*"||l(n,r,1))){i(),e.push({text:t.slice(n+1,r),italic:!0}),n=r+1;continue}}o+=d,n+=1}return i(),e.length===0&&e.push({text:""}),e}function h(t){return t.map((e,o)=>(0,c.jsx)(s,{bold:e.bold,italic:e.italic,color:e.code?u.dim:void 0,children:e.text},o))}function T(t){return t.split(`
|
|
4
4
|
`).map(e=>{if(e.trim()==="")return{kind:"blank"};let o=e.match(/^\s*[-*+]\s+(.*)$/);if(o)return{kind:"bullet",segs:x(o[1])};let i=e.match(/^\s*(\d+)\.\s+(.*)$/);if(i)return{kind:"numbered",n:i[1],segs:x(i[2])};let l=e.match(/^#{1,6}\s+(.*)$/);return l?{kind:"heading",segs:x(l[1])}:{kind:"para",segs:x(e)}})}function R(t,e,o=""){switch(t.kind){case"blank":return(0,c.jsx)(s,{children:o||" "},e);case"heading":return(0,c.jsxs)(s,{bold:!0,children:[o,h(t.segs)]},e);case"bullet":return(0,c.jsx)(m,{marginLeft:1,children:(0,c.jsxs)(s,{children:[o,"\u2022 ",h(t.segs)]})},e);case"numbered":return(0,c.jsx)(m,{marginLeft:1,children:(0,c.jsxs)(s,{children:[o,`${t.n}. `,h(t.segs)]})},e);default:return(0,c.jsxs)(s,{children:[o,h(t.segs)]},e)}}function $({text:t,accent:e=u.generateAccent,indent:o=0}){let i=T(B(t)),{stdout:l}=b(),n=(l?.columns??80)-o;return(0,c.jsxs)(m,{marginBottom:1,children:[(0,c.jsx)(m,{width:2,flexShrink:0,children:(0,c.jsx)(s,{color:e,children:"\u2503"})}),(0,c.jsx)(m,{flexDirection:"column",width:n-2,children:i.map((a,d)=>R(a,d))})]})}var g=p(f(),1),I=5;function C({thinking:t,expanded:e,thinkingDone:o,maxLines:i=I}){if(!e)return(0,g.jsxs)(m,{paddingX:1,children:[(0,g.jsx)(s,{color:u.dim,children:o?"\u2237 thinking complete ":"\u2237 thinking\u2026 "}),(0,g.jsx)(s,{color:u.muted,children:o?"(ctrl+t to view)":"(ctrl+t to show)"})]});let l=t.split(`
|
|
5
5
|
`),n=Math.max(0,l.length-i),a=n>0?l.slice(-i).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as F}from"./chunk-
|
|
2
|
+
import{d as F}from"./chunk-3KY7HHQU.js";import{Aa as P,Ca as L,K as $,M as k,Na as V,aa as B,ba as G,ca as I,wa as K}from"./chunk-PI7OXS62.js";var z=3,X=1e4,q=()=>new Promise(o=>setTimeout(o,25+Math.floor(Math.random()*50))),U=o=>o==="design"||o==="maintain"?"session":o==="revert"||o==="shape-op"?"exclusive":"commit";function Q(o,e,p){for(let i of o){for(let c of i.supersessions)if(c.kind==="node"&&(p.has(c.old)||c.new!==null&&p.has(c.new)))return!0;for(let c of i.nodes)if(c.label==="usecase"&&e.newBuCandidates.length>0||p.has(c.cid))return!0;if(i.design_generation&&e.generationTicket&&i.design_generation.uc_root===e.generationTicket.uc_root)return!0;for(let c of e.sourcePins)if(Object.prototype.hasOwnProperty.call(i.source_head_moves,c.source_id))return!0}return!1}async function se(o,e,p){let{store:i,locks:c,probe:H}=o,J=o.sid??o.rootSid,v=e.newBuCandidates.map(l=>({tempRef:l.tempRef,probeText:l.probeText})),x=0,w=!0,m={hits:[],degraded:!1,probeBasis:null};for(;;){w&&(v.length>0&&(m=await H.batchSimilar(k(i),v)),w=!1);let l=k(i);i.prefetch($(e,null,l),{token:null});let D={seq:l.lastSeq,hash:l.latestHash},S=new Map,b=[],u=[],C=new Set;for(let n of e.ucTargets){let s=I(l,n.ref);if(s===null)return{ok:!1,kind:"validation",errors:[{code:"UNKNOWN_REF",detail:`${n.ref}: names no living node (unknown or tombstoned chain)`}]};n.expectedTip!==void 0&&n.expectedTip!==s.cid&&S.set(n.expectedTip,s.cid),C.add(s.cid),u.push(L(l,n.ref).key)}(e.verb==="revert"||e.verb==="shape-op")&&(u.length=0,u.push({kind:"context",mode:"exclusive"}));let g;try{g=c.acquire(P(u),{hold:U(e.verb),verb:e.verb})}catch(n){if(n instanceof K&&(n.code==="UC_HELD"||n.code==="CONTEXT_HELD"))return{ok:!1,kind:"contended",err:n};throw n}let R=!1,N=!1;try{let n=await c.withKeySerialized(u,async()=>{let s=k(i),O=D.hash===s.latestHash?[]:i.recordsSince(i.parse(D.hash));for(let r of e.ucTargets){let t=I(s,r.ref);if(t===null){b.push({kind:"supersession",ref:r.ref,detail:`${r.ref} was retired while this commit staged \u2014 re-ground or abandon`});continue}for(let a of C)s.superseded.has(a)&&s.tipOf(a)===t.cid&&S.set(a,t.cid)}for(let r of e.sourcePins){let t=s.heads.get(r.source_id);t!=null&&t!==r.source_cid&&b.push({kind:"pin",ref:r.source_id,detail:`source '${r.source_id}' moved (pinned ${r.source_cid.slice(0,19)}, head ${t.slice(0,19)}) \u2014 re-ground or abandon`})}if(b.length>0)return{ok:!1,kind:"drifted",asks:b};if(e.generationTicket){let r=F(s,e.generationTicket);if(r!==null)return{ok:!1,kind:"validation",errors:[r]}}if(v.length>0&&O.length>0){let r=new Set(m.hits.map(d=>d.candidateCid)),t=H.recheckLocal(s,v,m.probeBasis,O);if(t.hits.some(d=>!r.has(d.candidateCid))||t.uncachedNewNodes.length>0)return N=!0,"restart"}if(e.verb!=="revert"&&e.verb!=="shape-op"){let r=P(e.ucTargets.map(d=>L(s,d.ref).key)),t=P(u);if(!(r.length===t.length&&r.every((d,f)=>JSON.stringify(d)===JSON.stringify(t[f]))))return"restart"}if(e.eventIds&&e.eventIds.length>0&&e.eventIds.every(r=>s.appliedEvents.has(r)))return{ok:!0,skipped:"already-applied"};let W=Date.now()+X,A=s.latestHash,T=s;for(;;){let r={graph:T,scope:{ucTargets:e.ucTargets,sourcePins:e.sourcePins,...e.generationTicket?{generationTicket:e.generationTicket}:{}},expectPrev:A,redirects:S,probeHits:m.hits,degradedProbe:m.degraded,sid:J,eventIds:(a,d)=>{if(e.eventIds&&e.eventIds.length>0)return e.eventIds.slice(0,d);let f=G(T,o.rootSid,a,d),j=o.reservedEventIds??[];if(j.length===0)return f;let E=`${o.rootSid}:${a}:`,h=0;for(let _ of j){if(!_.startsWith(E))continue;let y=_.slice(E.length);/^\d+$/.test(y)&&(h=Math.max(h,Number.parseInt(y,10)))}if(h===0)return f;let M=Number.parseInt(f[0].slice(E.length),10);return!Number.isInteger(M)||M>h?f:Array.from({length:d},(_,y)=>B(o.rootSid,a,h+1+y))},assertLocks:()=>g.assertHeld()};if(o.revalidate){let a=o.revalidate(r);if(a.length>0)return{ok:!1,kind:"validation",errors:a}}g.assertHeld();let t;try{t=p(r)}catch(a){if(a instanceof V){let d=k(i),f=i.recordsSince(i.parse(T.latestHash));if(!Q(f,e,C)&&Date.now()<W){await q(),T=d,A=d.latestHash;continue}return"restart"}throw a}return"errors"in t?{ok:!1,kind:"validation",errors:t.errors}:(U(e.verb)==="session"&&g.touch(),{ok:!0,result:t.result,record:t.record})}});if(n==="restart")R=!0;else return n}finally{g.release()}if(R){if(x+=1,x>=z)return{ok:!1,kind:"unsettled",attempts:x};N&&(w=!0),await q();continue}}}export{se as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{homedir as s}from"os";import{join as t}from"path";var g="0.10.2";var a=t(s(),".testmuai","kaneai"),h=t(a,"profiles"),u=t(a,"tui-config.json"),U=t(a,"media"),_="https://registry.npmjs.org/@testmuai/kane-cli",x="https://api.github.com/repos/LambdaTest/kane-cli/releases",i="@testmuai/kane-cli-skill",A=`https://registry.npmjs.org/${i}`,r="kane-cli",L=[{dir:t(s(),".claude","skills",r),agent:"Claude Code"},{dir:t(s(),".agents","skills",r),agent:"Codex CLI"},{dir:t(s(),".gemini","skills",r),agent:"Gemini CLI"}],I="https://dd-proxy.lambdatest.com/intake/kane-cli",R="https://kaneai-playground.lambdatest.io",E=9222,C=9230,v=t(a,"chrome-profiles"),o=t(a,"hints"),f=t(o,"state.json");function B(e){return t(o,`catalog-${e}.json`)}var l=t(a,"evidence");function S(e){return t(l,`catalog-kane-cli-${e}.json`)}var c=t(a,"mobile");function T(e,n="android"){return t(c,n==="ios"?`device-catalog-ios-${e}.json`:`device-catalog-${e}.json`)}var m="127.0.0.1",N=18392,k=18400,p="/callback";function O(e){return`http://${m}:${e}${p}`}var P="KANE CLI",D="*",H={prod:{authBaseUrl:"https://auth.lambdatest.com",consentUrl:"https://accounts.lambdatest.com",controllerBaseUrl:"https://kaneai-api.lambdatest.com/v16-controller/v1",tmsBaseUrl:"https://test-manager-api.lambdatest.com/api",testGeneratorBaseUrl:"https://test-manager-api.lambdatest.com",secretsBaseUrl:"https://api-hyperexecute.lambdatest.com",testManagerUiUrl:"https://test-manager.lambdatest.com",shareApiBaseUrl:"https://api.lambdatest.com",v16ServerHost:"https://kaneai-api.lambdatest.com/v16-server",evidenceViewerUrl:"https://evidence.lambdatest.com",mediaArtefactsHost:"prod-mobile-artefacts.lambdatest.com",mobileAppBaseUrl:"https://api.lambdatest.com",mobileHubUrl:"https://mobile-hub.lambdatest.com/wd/hub",lrmaaBaseUrl:"https://mobile-api.lambdatest.com/mobile-automation/api/v1",latticeBaseUrl:"https://kaneai-api.lambdatest.com/v16-lattice",deviceStreamUrl:"https://stream-microfrontend.lambdatest.com"},stage:{authBaseUrl:"https://stage-auth.lambdatestinternal.com",consentUrl:"https://stage-accounts.lambdatestinternal.com",controllerBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1",tmsBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com/api",testGeneratorBaseUrl:"https://stage-test-manager-api.lambdatestinternal.com",secretsBaseUrl:"https://api-stage-hyperexecute.lambdatestinternal.com",testManagerUiUrl:"https://stage-test-manager.lambdatestinternal.com",shareApiBaseUrl:"https://stage-api.lambdatestinternal.com",v16ServerHost:"https://auteur-stage-automind.lambdatestinternal.com/v16-server",evidenceViewerUrl:"https://stage-evidence.lambdatestinternal.com",mediaArtefactsHost:"stage-mobile-artefacts.lambdatestinternal.com",mobileAppBaseUrl:"https://stage-api.lambdatestinternal.com",mobileHubUrl:"https://stage-mobile-hub.lambdatestinternal.com/wd/hub",lrmaaBaseUrl:"https://stage-mobile-api.lambdatestinternal.com/mobile-automation/api/v1",latticeBaseUrl:"https://auteur-stage-automind.lambdatestinternal.com/v16-lattice",deviceStreamUrl:"https://stage-stream-microfrontend.lambdatestinternal.com"}},M={orange:"#ff9500",generateAccent:"#0d9488",assuranceAccent:"#b388ff",purple:"#b388ff",secondary:"#888888",dim:"#666666",muted:"#444444",green:"#4ade80",red:"#ef4444",amber:"#fbbf24"};export{g as a,a as b,u as c,U as d,_ as e,x as f,i as g,L as h,I as i,R as j,E as k,C as l,v as m,f as n,B as o,S as p,T as q,m as r,N as s,k as t,p as u,O as v,P as w,D as x,H as y,M as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as n}from"./chunk-
|
|
2
|
+
import{a as n}from"./chunk-K75WIRI5.js";import{y as s}from"./chunk-FAMQ4DHU.js";function E(t="prod",r=process.env){let e=s[t];return t!=="stage"?e:{authBaseUrl:r.KANE_STAGE_AUTH_URL??e.authBaseUrl,consentUrl:r.KANE_STAGE_CONSENT_URL??e.consentUrl,controllerBaseUrl:r.TESTMUAI_BASE_URL??e.controllerBaseUrl,tmsBaseUrl:r.KANE_STAGE_TMS_URL??e.tmsBaseUrl,testGeneratorBaseUrl:r.KANE_STAGE_TCG_URL??e.testGeneratorBaseUrl,secretsBaseUrl:r.KANE_STAGE_SECRETS_URL??e.secretsBaseUrl,testManagerUiUrl:r.KANE_STAGE_TEST_MANAGER_UI_URL??e.testManagerUiUrl,shareApiBaseUrl:r.KANE_STAGE_SHARE_API_URL??e.shareApiBaseUrl,v16ServerHost:r.KANE_STAGE_V16_SERVER_HOST??e.v16ServerHost,evidenceViewerUrl:r.KANE_STAGE_EVIDENCE_VIEWER_URL??e.evidenceViewerUrl,mediaArtefactsHost:r.KANE_STAGE_MEDIA_ARTEFACTS_HOST??e.mediaArtefactsHost,mobileAppBaseUrl:r.KANE_STAGE_MOBILE_APP_URL??e.mobileAppBaseUrl,mobileHubUrl:r.KANE_STAGE_MOBILE_HUB_URL??e.mobileHubUrl,lrmaaBaseUrl:r.KANE_STAGE_LRMAA_URL??e.lrmaaBaseUrl,latticeBaseUrl:r.KANE_LATTICE_URL??e.latticeBaseUrl,deviceStreamUrl:r.KANE_STAGE_DEVICE_STREAM_URL??e.deviceStreamUrl}}function U(){let t=process.env.TESTMUAI_ENV;return t!==void 0&&t!==""?t==="stage"?"stage":"prod":new n().getDefaultEnv()==="stage"?"stage":"prod"}function a(){let t=process.env.KANE_LATTICE_URL;return t!==void 0&&t.trim()===""?"":E(U()).latticeBaseUrl.trim()}export{E as a,U as b,a as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{g as r}from"./chunk-
|
|
2
|
+
import{g as r}from"./chunk-HYJVYYAZ.js";import{createHash as a}from"crypto";import{existsSync as c,readFileSync as _}from"fs";import{join as u}from"path";var f=2;function g(t,e){let n=a("sha256");return n.update(`kane-assurance-contract
|
|
3
3
|
`),n.update(t),n.update(`
|
|
4
4
|
agent_state_schema=${e}`),"sha256:"+n.digest("hex")}function T(){let t=r().packageRoot;return t===null?[]:[t]}function o(){return"sha256:cab026e32fe3172059e3abaf947cb161a4d0a36a82a084f017fa34ba8d562d8e"}var s=class extends Error{constructor(n,i){super(`agent/cli contract mismatch (cli ${n||"<unset>"}, agent ${i||"<unset>"}) \u2014 rebuild or reinstall the stale half`);this.expected=n;this.actual=i;this.name="PairMismatchError"}};function S(){return{TESTMUAI_CONTRACT_DIGEST:o(),TESTMUAI_CLIENT_VERSION:process.env.KANE_DEV_FORCE_CLIENT_RELEASE??`kane-cli/${r().version}`}}export{s as a,S as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{N as y}from"./chunk-
|
|
2
|
+
import{N as y}from"./chunk-PI7OXS62.js";import{f as d,g as m}from"./chunk-KU3YHPWZ.js";var b={high:3,med:2,low:1},R={create:0,evolve:1,"reuse-candidate":2},E=.75;function u(e,s){return!e.superseded.has(s)&&e.trust.get(s)!=="archived"}function S(e,s){return e.edgesInto(s).some(n=>n.type===m.VERIFIES&&u(e,n.src))}function p(e,s="med"){let n=e.risk;return n==="high"||n==="med"||n==="low"?n:s}function l(e,s){return e.displayNameOf(s)??s}function g(e,s){return`kane-cli design tests --use-case ${l(e,s)}`}function _(e,s){let n=(r,o)=>{for(let c of e.edgesFrom(o)){let f=c.type===r?y(e,c.dst):null;if(f!==null&&u(e,f))return f}return null},t=n(m.SCOPED_TO,s);if(!t)return null;let i=e.nodeLabel.get(t);return i===d.USECASE?t:i===d.SCENARIO?n(m.BELONGS_TO,t):null}function w(e,s){let n=_(e,s);return n?g(e,n):G(e,s)}function G(e,s){return`kane-cli design explain ${l(e,s)}`}function h(e,s){let n=e.edgesFrom(s).find(i=>i.type===m.AUTOMATES&&u(e,i.dst));if(!n)return null;let t=e.edgesFrom(n.dst).find(i=>i.type===m.BELONGS_TO&&u(e,i.dst));return t?t.dst:null}function x(e){let s=[];for(let{cid:n,content:t}of e.byLabel(d.AC))u(e,n)&&(S(e,n)||s.push({ref:l(e,n),kind:"no-verifies",why:"no live test verifies this acceptance criterion",risk:p(t),stage:"design",tag:"create",ready_command:w(e,n)}));return s}function L(e){let s=[],n=new Map;for(let{cid:t}of e.byLabel(d.SCENARIO))if(u(e,t))for(let i of e.edgesFrom(t)){if(i.type!==m.BELONGS_TO)continue;let r=e.tipOf(i.dst);(n.get(r)??n.set(r,new Set).get(r)).add(t)}for(let{cid:t,content:i}of e.byLabel(d.USECASE)){if(!u(e,t))continue;let r=[...n.get(t)??[]];if(r.length===0){s.push({ref:l(e,t),kind:"zero-scenario",why:"use-case has no scenarios",risk:p(i),stage:"design",tag:"create",ready_command:g(e,t)});continue}r.every(c=>e.getNode(c)?.content.case_type==="happy")&&s.push({ref:l(e,t),kind:"happy-only",why:"use-case is exercised by happy-path scenarios only",risk:p(i),stage:"design",tag:"create",ready_command:g(e,t)})}return s}function C(e){let s=[];for(let{cid:n,content:t}of e.byLabel(d.GAP)){if(!u(e,n))continue;let i=t.ref,r=typeof i=="string"?e.resolve(i):null,o=r&&u(e,r.tip)?r.tip:null,c=o?e.nodeLabel.get(o):null,f=t.kind==="reconcile_deferred"?"kane-cli maintain reconcile":c===d.USECASE?g(e,o):c===d.AC?w(e,o):G(e,n),a=t.question&&typeof t.question=="object"?t.question:void 0,v=typeof t.text=="string"&&t.text||(a&&typeof a.header=="string"?a.header:"")||"design gap";s.push({ref:l(e,n),kind:String(t.kind),why:v,risk:p(t),stage:"design",tag:"create",ready_command:f,...typeof t.risk_rationale=="string"?{risk_rationale:t.risk_rationale}:{},...a?{question:a}:{}})}return s}function O(e){let s=[];for(let{cid:n,content:t}of e.byLabel(d.AC)){if(!u(e,n))continue;let i=e.stale(n);i==="fresh"||i==="superseded"||s.push({ref:l(e,n),kind:"stale-ac",why:`acceptance criterion is ${i} \u2014 its source moved since this was authored \xB7 why: kane-cli design explain ${l(e,n)}`,risk:p(t),stage:"design",tag:"evolve",ready_command:"kane-cli maintain reconcile"})}for(let{cid:n,content:t}of e.byLabel(d.TEST)){if(!u(e,n))continue;let i=e.stale(n);if(i==="fresh"||i==="superseded")continue;let r=e.edgesFrom(n).filter(k=>k.type===m.VERIFIES&&u(e,k.dst)),o=r.map(k=>p(e.getNode(k.dst)?.content??{})),c=o.includes("high")?"high":o.includes("med")?"med":o.includes("low")?"low":"med",f=r[0]?.dst??null,a=f?null:h(e,n),v=f?w(e,f):a?g(e,a):G(e,n);s.push({ref:l(e,n),kind:"stale-test",why:`test is ${i} \u2014 its source moved since this was authored`,risk:c,stage:"design",tag:"evolve",ready_command:v})}return s}async function A(e,s,n){for(let t of e)if(t.tag==="create"){if(!n){t.meta={embed_arm:"skipped"};continue}try{let i=s.resolve(t.ref),r=i?s.getNode(i.tip):null,o=r&&(String(r.content.title??"")||String(r.content.text??""))||t.why,c=r?.label===d.USECASE?"scenario":"test",a=(await n.searchSimilar(o,{label:c,k:1}))[0];a&&a.score>=E?(t.tag="reuse-candidate",t.meta={embed_arm:"used",near_hit:{ref:l(s,a.cid),score:a.score}}):t.meta={embed_arm:"used",near_hit:null}}catch{t.meta={embed_arm:"skipped"}}}}function T(e,s){let n=b[s.risk]-b[e.risk];if(n!==0)return n;let t=R[e.tag]-R[s.tag];return t!==0?t:e.ref<s.ref?-1:e.ref>s.ref?1:0}function N(e,s){let n=[],t=r=>{let o=y(e,r);return o?p(e.getNode(o)?.content??{}):"med"},i=r=>{let o=y(e,r),c=o?_(e,o):null;return c?l(e,c):r};for(let r of s.usecases??[])for(let o of r.acceptance_criteria??[])(o.covered_by??[]).length>0&&(o.execution==="failed"?n.push({ref:o.id,kind:"execution-failed",stage:"cover",tag:"evolve",risk:t(o.id),why:`covering test failed against this AC (tests: ${(o.covered_by??[]).join(", ")})`,ready_command:`kane-cli maintain evolve ${i(o.id)}`}):o.execution==="blocked"?n.push({ref:o.id,kind:"execution-blocked",stage:"cover",tag:"reuse-candidate",risk:t(o.id),why:"the oracle could not run (infrastructure) \u2014 the covering test exists and is reusable",ready_command:"kane-cli testrun run"}):o.execution==="not-run"&&n.push({ref:o.id,kind:"covered-not-run",stage:"cover",tag:"reuse-candidate",risk:t(o.id),why:"a covering test exists but never joined this pack \u2014 run it",ready_command:"kane-cli testrun run"}));return n}async function U(e,s,n,t){if(s!=="design"&&!t)throw new Error(`gaps-engine: stage "${s}" requires a pack's usecases doc`);let i=[];return(s==="design"||s==="all")&&i.push(...x(e),...L(e),...C(e),...O(e)),(s==="cover"||s==="all")&&i.push(...N(e,t)),await A(i,e,n),i.sort(T),i}export{u as a,S as b,_ as c,U as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as y,h as z,j as U}from"./chunk-
|
|
2
|
+
import{f as y,h as z,j as U}from"./chunk-YDB72F4K.js";import{b as N,c as O,e as S,f as D,j as T}from"./chunk-77ZZQJLX.js";import{a as Y}from"./chunk-JIRNI5TB.js";import{a as M}from"./chunk-UTM7D4PI.js";import{a as R}from"./chunk-FCD3NYOM.js";import{a as F}from"./chunk-B7ZX5HEN.js";import{a as A}from"./chunk-FAMQ4DHU.js";import{e as $}from"./chunk-UR6MHSHU.js";var C=$(Y(),1);import{existsSync as k,readFileSync as I,readdirSync as J,statSync as K}from"fs";import{dirname as H,isAbsolute as V,join as h,relative as P,resolve as Z,sep as _}from"path";import{createHash as q}from"crypto";var b="testmd-bundle.json",u=class extends Error{constructor(t){super(t),this.name="BundleUsageError"}},B=e=>e.split(_).join("/");function v(e){if(!k(e))return[];let t=[];for(let s of J(e).sort()){let r=h(e,s);K(r).isDirectory()?t.push(...v(r)):t.push(r)}return t}function G(e){let t=e.map(r=>H(r).split(_)),s=t[0];for(let r of t.slice(1)){let i=0;for(;i<s.length&&i<r.length&&s[i]===r[i];)i++;s=s.slice(0,i)}return s.join(_)||_}function Q(e){for(let t of e){let s=F(t,I(t,"utf8"));for(let r of s.steps)if(r.body.kind==="import_ref"&&V(r.body.path))throw new u(`bundle sync: absolute @import is not portable after unzip: ${t} step ${r.index} (@import ${r.body.path})`)}}function j(e,t={}){let s=Z(e),r=S(s),i=y(s);if(!i?.commit_id||!i?.test_id)throw new u(`bundle sync: ${s} is not authored \u2014 run \`kane-cli testmd run\` first (output-<stem>/.internal/meta.json needs commit_id + test_id)`);let l;try{l=U(s)}catch(n){throw n instanceof z?new u(`bundle sync: ${n.message}`):n}let a=[s];for(let n of l.steps)for(let c of n.trace.slice(1))a.includes(c.file)||a.push(c.file);Q(a);let o=[],d=[];for(let n of l.unitFiles){if(n.file===s)continue;let c=N(n.file);o.includes(c)||o.push(c),n.kind==="module"&&d.push(S(n.file))}let m=[...a],p=n=>{k(n)&&m.push(n)};p(O(s)),m.push(r),p(D(s)),m.push(...v(T(s)));for(let n of o)p(h(n,"Result.md")),m.push(...v(h(n,".internal","steps")));for(let n of d)p(n);let f=G(m);if(k(h(f,b)))throw new u(`bundle sync: a real file named ${b} exists at the zip root (${f}) \u2014 it would collide with the generated manifest`);let x=m.map(n=>{let c=n===r&&t.identityOverride?Buffer.from(JSON.stringify({...JSON.parse(I(n,"utf8")),commit_id:t.identityOverride.commit_id},null,2)+`
|
|
3
3
|
`):void 0,E=c??I(n);return{abs:n,rel:B(P(f,n)),sha256:q("sha256").update(E).digest("hex"),bytes:E.length,...c?{contents:c}:{}}}).sort((n,c)=>n.rel<c.rel?-1:1),w=B(P(f,s)),L={schema_version:2,entry:w,commit_id:t.identityOverride?.commit_id??i.commit_id,test_id:i.test_id,testcase_id:i.testcase_id??null,project_id:i.project_id??null,folder_id:i.folder_id??null,org_id:i.org_id??null,created_at:new Date().toISOString(),producer:{name:"kane-cli",version:A},files:x.map(n=>({path:n.rel,sha256:n.sha256,bytes:n.bytes})),units:l.unitFiles.filter(n=>n.file!==s).map(n=>({path:B(P(f,n.file)),kind:n.kind}))};return{zipRoot:f,entry:w,files:x,manifest:L}}var g=e=>e instanceof Error?e.message:String(e);function W(e){return new Promise((t,s)=>{let r=(0,C.default)("zip",{zlib:{level:6}}),i=[];r.on("data",l=>i.push(l)),r.on("error",s),r.on("end",()=>t(Buffer.concat(i))),r.append(JSON.stringify(e.manifest,null,2)+`
|
|
4
4
|
`,{name:b});for(let l of e.files)l.contents?r.append(l.contents,{name:l.rel}):r.file(l.abs,{name:l.rel});r.finalize()})}async function X(e){let{plan:t,controller:s,testId:r,sessionId:i,commitId:l}=e,a;try{a=await W(t)}catch(d){return{ok:!1,stage:"zip",error:g(d)}}let o;try{let d={key:"testmd",content_type:"application/zip",filename:`${l}-testmd.zip`},p=(await s.getPresignedUrls(r,i,[d])).urls?.testmd?.upload_url;if(!p)return{ok:!1,stage:"presign",error:"presign response missing testmd upload_url"};o=p}catch(d){return{ok:!1,stage:"presign",error:g(d)}}try{await M(o,a,"application/zip")}catch(d){return{ok:!1,stage:"upload",error:g(d)}}return{ok:!0,bytes:a.length}}async function ee(e){let t;try{t=j(e.sourcePath,{identityOverride:e.identityOverride})}catch(s){return s instanceof u?{ok:!1,stage:"collect",error:s.message}:{ok:!1,stage:"collect",error:g(s)}}return X({...e,plan:t})}function ge(e){return e.shouldUploadPipeline&&e.uploadSucceeded&&!!e.metaCommitId&&!!e.metaTestId}function te(e){return e.persisted?e.uploadSucceeded?e.local?"local":e.hasBasicAuth?!e.metaCommitId||!e.metaTestId?"not_authored":null:"no_auth":"upload_failed":"not_persisted"}async function ye(e){let t=e.recordedTestPath??null,s=t?y(t):null,r=te({persisted:!!t,uploadSucceeded:e.uploadSucceeded,local:e.local,hasBasicAuth:!!e.basicAuth,metaCommitId:s?.commit_id,metaTestId:s?.test_id});if(r)return e.log("info","BUNDLE_SYNC_SKIPPED","testmd bundle sync skipped",{reason:r,...t?{path:t}:{}}),{skipped:r};let i=s.commit_id,l=s.test_id,a=o=>{try{e.onAgentEvent?.(o)}catch{}};try{let o=await(e.syncFn??ee)({sourcePath:t,testId:l,sessionId:e.sessionId,commitId:i,controller:new R(e.controllerBaseUrl,{username:e.basicAuth.username,accessKey:e.basicAuth.access_key})});return o.ok?(e.log("info","BUNDLE_SYNC_OK","testmd bundle pushed",{commit_id:i,path:t,bytes:o.bytes}),a({type:"test_md_bundle_sync",status:"ok",commit_id:i,path:t,bytes:o.bytes})):(e.log("warn","BUNDLE_SYNC_FAILED","testmd bundle sync failed",{commit_id:i,path:t,stage:o.stage,error:o.error}),a({type:"test_md_bundle_sync",status:"failed",commit_id:i,path:t,stage:o.stage})),o}catch(o){let d=g(o);return e.log("warn","BUNDLE_SYNC_FAILED","testmd bundle sync threw",{commit_id:i,path:t,error:d}),a({type:"test_md_bundle_sync",status:"failed",commit_id:i,path:t,stage:"upload"}),{ok:!1,stage:"upload",error:d}}}export{j as a,W as b,X as c,ee as d,ge as e,te as f,ye as g};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as k}from"./chunk-
|
|
2
|
+
import{a as k}from"./chunk-YJAQZMJT.js";import{existsSync as l,mkdirSync as H,readFileSync as S,readdirSync as I,renameSync as E,rmSync as f,writeFileSync as R,openSync as $,closeSync as D}from"fs";import{randomBytes as F}from"crypto";import{join as y}from"path";var M=["agent_state","pending","assumed","read_basis","corpus_cursor","expires_at","force","conv_source","held_receipts","force_scope","user_session_id","checkpoint","target_pins","ingest_registry","ingest_schedule","reconcile"],c=class extends Error{constructor(t,r){super(`${t}: ${r}`);this.code=t}},A=1440*60*1e3;function B(n,e){return n.expires===!1?null:e.expires_at}function T(n,e){return new Date(n.expires_at).getTime()<=e.getTime()}function K(n){return new Date(n.getTime()+A).toISOString()}var O=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function U(n,e,t){if(t!==void 0)return"a resumed run keeps the session it resumes";if(!O.test(e))return`${JSON.stringify(e)} is not a session id`;let r;try{r=n.peek(e)!==null}catch{r=!0}return r?`a session named ${e} exists already; resume it, or name a new session`:null}var v=n=>y(n,"sessions"),h=(n,e)=>y(v(n),e),p=(n,e)=>y(h(n,e),"state.json"),w=(n,e)=>y(h(n,e),".lock"),N=n=>(n?.now??(()=>new Date))();function L(n){if(!Number.isInteger(n)||n<=0)return!1;try{return process.kill(n,0),!0}catch(e){return e.code==="EPERM"}}function x(n,e){let t=`${n}.tmp-${process.pid}`,r=$(t,"w");try{R(r,e,{mode:384}),k(r)}finally{D(r)}E(t,n)}function b(n,e,t,r=0){if(r>20)throw new c("SESSION_LOCKED",`${e}: lock contention did not settle`);let s=w(n,e),i=F(8).toString("hex"),o=JSON.stringify({pid:process.pid,ts:t.toISOString(),nonce:i})+`
|
|
3
3
|
`;try{let a=$(s,"wx",384);return R(a,o),D(a),i}catch(a){if(a.code!=="EEXIST")throw a;let g=!1,u;try{let d=JSON.parse(S(s,"utf8")),C=t.getTime()-new Date(d.ts).getTime();g=!L(d.pid)||C>=A,u=d.nonce}catch{g=!0}if(!g)throw new c("SESSION_LOCKED",`${e} is held by another live process`);let _=`${s}.break-${i}`;try{E(s,_);let d;try{d=JSON.parse(S(_,"utf8"))}catch{d=null}if(d===null||d.nonce===u)f(_,{force:!0});else try{E(_,s)}catch{f(_,{force:!0})}}catch(d){if(d.code!=="ENOENT")throw d}return b(n,e,t,r+1)}}function J(n,e){let t=n,r=()=>e.owned?.(),s=(i,o)=>{let a={...i,engine_forms:1};e.write(a,o),t=a};return{get state(){return t},isApplied:i=>t.applied_events.includes(i),markApplied(i){r(),s({...t,applied_events:[...new Set([...t.applied_events,...i])].sort()},"state")},reconcileSave(i){r(),s({...t,applied_events:[...new Set([...t.applied_events,...i.appliedEvents])].sort(),held_receipts:i.heldReceipts,pending:i.pending},"state")},save(i){r();let o={...t};for(let a of M)i[a]!==void 0&&(o[a]=i[a]);s(o,i.checkpoint!==void 0?"pointer":"state")},complete(i){r(),e.complete(i)},release(){e.release()}}}function G(n){return{...{schema:1,applied_events:[],...n},schema:1,applied_events:[],engine_forms:1}}function j(n,e,t={}){if(t.expires!==!1&&T(n,e))throw new c("SESSION_EXPIRED",`${n.sid} expired at ${n.expires_at}`);if((n.engine_forms??0)>1)throw new c("SESSION_FORMS_NEWER",`${n.sid} was saved by an engine whose forms are version ${n.engine_forms}; this one reads version ${1} \u2014 resume it with a newer one`);return{...n,expires_at:K(e),engine_forms:1}}function P(n,e,t){let r=()=>{try{if(JSON.parse(S(w(n,e),"utf8")).nonce!==t)throw new c("SESSION_LOCK_LOST",`${e} lock was taken over`)}catch(s){throw s instanceof c?s:new c("SESSION_LOCK_LOST",`${e} lock file unreadable/gone`)}};return{write:s=>x(p(n,e),JSON.stringify(s)+`
|
|
4
4
|
`),owned:r,complete:()=>f(h(n,e),{recursive:!0,force:!0}),release:()=>{try{r(),f(w(n,e),{force:!0})}catch(s){if(s instanceof c||s.code==="ENOENT")return;throw s}}}}function V(n,e,t){if(!O.test(e.sid))throw new c("SESSION_MISSING",`bad sid ${JSON.stringify(e.sid)}`);let r=N(t);if(l(p(n,e.sid)))throw new c("SESSION_LOCKED",`${e.sid} already exists \u2014 resume it`);H(h(n,e.sid),{recursive:!0,mode:448});let s=b(n,e.sid,r),i=G(e);return x(p(n,e.sid),JSON.stringify(i)+`
|
|
5
5
|
`),J(i,P(n,e.sid,s))}function ee(n,e,t){if(!O.test(e)||!l(p(n,e)))throw new c("SESSION_MISSING",`no session ${e}`);let r=N(t),s=b(n,e,r),i=JSON.parse(S(p(n,e),"utf8")),o;try{o=j(i,r)}catch(a){throw f(w(n,e),{force:!0}),a}return x(p(n,e),JSON.stringify(o)+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as k,b as y}from"./chunk-
|
|
2
|
+
import{a as k,b as y}from"./chunk-U2VYTVKV.js";import{b as N,d as h,e as S,f as w}from"./chunk-32MFECUA.js";import{b as f,c as p,f as m}from"./chunk-EHB55V23.js";import{a as b}from"./chunk-B7ZX5HEN.js";import{existsSync as R,readFileSync as T}from"fs";var x=`kane-cli couldn't tell if this is a secret, so it's marked as one; set "secret": false if it isn't`;function O(e){let t=k(e.cwd),i=p(f(e.cwd)),n=j(t),o=[],c=new Set,u=[];for(let r of e.tests){let s=q(r);if(s===null)continue;let l=new Set;s.forEach((d,v)=>{let P=d===null?[]:N(d).filter(a=>!l.has(a));if(v===0&&d!==null)for(let a of h(d))c.add(a);for(let a of P)o.includes(a)||o.push(a);if(d!==null)for(let a of w(d))l.add(a)}),S({surfaceRequired:r.surfaceRequired===!0,firstStep:s[0],...r.target!==void 0?{target:r.target}:{}})&&u.push({test:r.test,title:r.title,...r.file?{file:r.file}:{}})}let g=o.filter(r=>i.get(r)?.has_value!==!0),_=[...g.filter(r=>c.has(r)),...g.filter(r=>!c.has(r))];return{file:t,variables:_.map(r=>{let s=E(n[r]),l=s!==void 0&&typeof s.secret=="boolean";return{name:r,...l?{secret:s.secret}:{secret:!0},...l?s.description!==void 0?{description:s.description}:{}:{description:s?.description?`${s.description}; ${x}`:x},...c.has(r)?{start_page:!0}:{}}}),noStartPage:u}}function J(e){let t=[];for(let i of e.ids){let n=e.graph.resolve(i),o=n?e.graph.getNode(n.tip):null;o?.label==="test"&&t.push(V(i,o.content))}return O({tests:t,cwd:e.cwd})}function V(e,t,i){let{title:n,test_md_blob:o,target:c}=t,u=t.check;return{test:e,title:typeof n=="string"?n:e,blob:typeof o=="string"?o:"",...i?{file:i}:{},...t.surface_required===!0||u?.surface_required===!0?{surfaceRequired:!0}:{},...typeof c=="string"?{target:c}:{}}}function D(e,t){let i=e.variables.filter(n=>m(n.name)===null);i.length!==0&&y({file:e.file,declarations:i.map(n=>({name:n.name,description:n.description??"",secret:n.secret===!0})),known:p(f(t))})}function q(e){try{return b(`${e.test}_test.md`,e.blob).steps.map(t=>t.body.kind==="objective"?t.body.text:null)}catch{return null}}function I(e){return e instanceof SyntaxError?"a variables file here isn't valid JSON":e instanceof Error?e.message:String(e)}function E(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function j(e){if(!R(e))return{};try{let t=JSON.parse(T(e,"utf8"));return t&&typeof t=="object"&&!Array.isArray(t)?t:{}}catch{return{}}}export{O as a,J as b,V as c,D as d,I as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{o as n}from"./chunk-HYJVYYAZ.js";var g={prod:"https://kaneai-api.lambdatest.com/v16-controller/v1",stage:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1"};function d(e=process.env){return e.TESTMUAI_BASE_URL||g[e.TESTMUAI_ENV==="stage"?"stage":"prod"]}function h(e=process.env){return e.TESTMUAI_BASE_URL&&e.TESTMUAI_ENV!=="stage"?"note: TESTMUAI_BASE_URL applies to context/design commands only \u2014 run/testmd use your configured environment":null}async function _(e,s=process.env,l=fetch){let o=d(s),f=`${o}/assurance/turn`,a={"Content-Type":"application/json"},c=e.TESTMUAI_BASIC_AUTH??s.TESTMUAI_BASIC_AUTH,i=e.TESTMUAI_API_KEY??s.TESTMUAI_API_KEY;c?a.Authorization=`Basic ${c}`:i&&(a.Authorization=`Bearer ${i}`);let t,u="";try{let r=await l(f,{method:"POST",headers:a,body:"{}",signal:AbortSignal.timeout(8e3)});t=r.status,t===401&&(u=await r.text().catch(()=>""))}catch(r){return{ok:!1,final:!1,cause:"unreachable",message:n().text("note.controller_unreachable",{base:o,error:r instanceof Error?r.message:String(r)})}}return t===404?{ok:!1,final:!0,cause:"unsupported",message:n().text("note.assurance_unsupported",{})}:t>=500?{ok:!1,final:!1,cause:"unreachable",message:n().text("note.controller_unreachable",{base:o,error:`HTTP ${t}`})}:t===401&&p(u)?{ok:!1,final:!1,cause:"login_unchecked",message:n().text("note.controller_unreachable",{base:o,error:"HTTP 401: it could not check the credentials"})}:t===401?{ok:!1,final:!0,cause:"rejected",message:n().text("note.credentials_rejected",{env:s.TESTMUAI_ENV??"prod"})}:{ok:!0}}function p(e){try{return JSON.parse(e).error==="authentication failed"}catch{return!1}}export{d as a,h as b,_ as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{C,D as L,E as b,e as S}from"./chunk-
|
|
2
|
+
import{C,D as L,E as b,e as S}from"./chunk-PI7OXS62.js";import{o as c}from"./chunk-HYJVYYAZ.js";function x(o){return o.replace(/\n$/,"").split(`
|
|
3
3
|
`).map((l,i)=>`${String(i+1).padStart(4,"0")}| ${l}`).join(`
|
|
4
4
|
`)}function T(o,d,l){if(!o.quote)return o;let i=C(l,o.anchor);if(i!==null&&L(o.quote,i))return o;let s=b(d,o.quote);if(s.length!==1)return"gone-or-ambiguous";let[{index:t,length:r}]=s,h=d.slice(0,t).split(`
|
|
5
5
|
`).length,e=d.slice(0,t+r).replace(/\n$/,"").split(`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{e as C,f as y}from"./chunk-Z36KVIRR.js";import{a as $,g as x,h as g,k as E}from"./chunk-Q4JV4U65.js";import{d as k}from"./chunk-226AGYHB.js";import{e as w}from"./chunk-6K5BEEAJ.js";import{b as h}from"./chunk-VZ7KXRXB.js";import{a as P}from"./chunk-FI2DVNRT.js";import{a as v}from"./chunk-K75WIRI5.js";import{promises as j}from"fs";import{basename as H,resolve as Z}from"path";import{createHash as J}from"crypto";import{promises as R}from"fs";import{basename as N,extname as O,resolve as B}from"path";var M=64*1024,A=100,Y=/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;function K(t){try{let i=h(t);return!i||typeof i!="object"?{gateCount:0}:{id:i.policy,gateCount:Array.isArray(i.gates)?i.gates.length:0}}catch{return{gateCount:0}}}function _(t,i,r){if(t.length>M)return{ok:!1,kind:"invalid",message:`policy ${i} is ${t.length} bytes, over the 64 KB limit`};let o=t.toString("utf8"),e=K(o);if(e.gateCount>A)return{ok:!1,kind:"invalid",message:`policy ${i} has ${e.gateCount} gates, over the ${A} limit`};let n=r;if(typeof e.id=="string"&&e.id.length>0){if(!Y.test(e.id))return{ok:!1,kind:"invalid",message:`policy id "${e.id}" in ${i} must start with a letter or digit and use only letters, digits, '.', '_' and '-' (at most 128)`};n=e.id}return{ok:!0,policy:{source:i,name:n,content:o,sha256:J("sha256").update(t).digest("hex"),gateCount:e.gateCount}}}function U(t){let i=new Set;for(let r of t){if(i.has(r.name))return{ok:!1,kind:"invalid",message:`two policies are named "${r.name}" \u2014 each --policy and --policy-id needs its own policy id`};i.add(r.name)}return null}async function b(t,i){return m({files:t,ids:[]},{cwd:i})}async function m(t,i){let r=[];for(let o of t.files){let e=B(i.cwd,o),n;try{n=await R.readFile(e)}catch(u){return{ok:!1,kind:"io",message:`cannot read policy ${o}: ${u.message}`}}let s=_(n,o,N(e,O(e)));if(!s.ok)return s;r.push({path:e,...s.policy})}for(let o of t.ids){let e=`policy-id ${o}`;if(!i.fetchPolicy)return{ok:!1,kind:"io",message:`cannot fetch ${e}: not signed in to Test Manager`};let n;try{n=await i.fetchPolicy(o)}catch(u){return{ok:!1,kind:"io",message:`cannot fetch ${e}: ${u.message}`}}let s=_(Buffer.from(n.content,"utf8"),e,o);if(!s.ok)return s;if(s.policy.sha256!==n.sha256.toLowerCase())return{ok:!1,kind:"invalid",message:`${e}: Test Manager's content does not match its sha256`};r.push({...s.policy,uid:n.uid,version:n.version})}return U(r)??{ok:!0,policies:r}}var p=(t,i)=>`${i.location||t}: ${i.message} (${i.code})${i.hint?` \u2014 ${i.hint}`:""}`;async function re(t,i){let r=await m(t,{cwd:i.cwd,fetchPolicy:i.fetchPolicy});if(!r.ok)return{ok:!1,message:r.message};let o=i.lint??g,e=[],n=[];for(let s of r.policies){let u;try{u=await o(s.content,{source:s.source,catalogYaml:i.catalogYaml})}catch(c){return{ok:!1,message:`cannot lint policy ${s.source}: ${c.message}`}}for(let c of u)(c.severity==="error"?e:n).push(p(s.source,c))}return e.length?{ok:!1,message:`invalid policy:
|
|
3
|
+
${e.join(`
|
|
4
|
+
`)}`}:{ok:!0,policies:r.policies,warnings:n}}function L(t,i={}){let r=null;return async o=>{r??=X(t,i);let e=await(await r).getPolicy(o);return{uid:e.uid,version:e.version,content:e.content,sha256:e.sha256}}}async function X(t,i){let{resolveTmsBasicAuth:r,formatAuthResolutionError:o}=await import("./list-commands-3QGZWJ5P.js"),e=t.profile??new v().getActiveProfile()??"default",n=await(i.resolveAuth??r)(e,t.env,{username:t.username,accessKey:t.accessKey});if(!n.ok)throw new Error(o(e,t.env,n).message.replace(/^error: /,"").trim());let s=P(t.env).tmsBaseUrl;return(i.makeClient??((u,c,a)=>new w(u,c,a)))(s,n.creds.username,n.creds.access_key)}var D={pass:0,fail:1,errored:3};function F(t){let i=t.some(r=>r.result==="errored")?"errored":t.some(r=>r.result==="fail")?"fail":"pass";return{result:i,exit_code:D[i]}}function z(t){return{result:"errored",exit_code:D.errored,verdicts:[],files:[],error:t}}function G(t){return`${t}.verdicts`}function de(t,i){return t!==0||!i?t:i.exit_code}async function T(t,i,r={}){let o;try{o=await(r.judge??x)(t,i.map(e=>({content:e.content,path:e.path})))}catch(e){let n=e,s=(n.problems??[]).flatMap(c=>c.diagnostics.map(a=>`${c.source} ${a.location}: ${a.message} (${a.code})`)),u=s.length?`${n.message}: ${s.join("; ")}`:n.message;return{...z(u),...n.code==="USAGE"?{usage:!0}:{}}}try{let e=await(r.write??E)(o,G(t));return{...F(o),verdicts:o,files:e}}catch(e){return{...F(o),verdicts:o,files:[],filesError:e.message}}}function I(t,i){return{type:"verdict",evidence_id:i,result:t.result,exit_code:t.exit_code,policies:t.verdicts.map((r,o)=>({id:r.policy.id,sha256:r.policy.sha256,result:r.result,exit_code:r.exit_code,counts:{total:r.gates.length,failed:r.gates.filter(e=>e.status==="fail").length,warned:r.gates.filter(e=>e.status==="warn").length,errored:r.gates.filter(e=>e.status==="errored").length},failed_gate_ids:r.gates.filter(e=>e.status==="fail").map(e=>e.id),errored_gate_ids:r.gates.filter(e=>e.status==="errored").map(e=>e.id),...r.error?{error:r.error}:{},...t.files[o]!==void 0?{file:t.files[o]}:{}})),...t.error!==void 0?{error:t.error}:{},...t.filesError!==void 0?{files_error:t.filesError}:{}}}function S(t){if(t.error!==void 0)return`verdict: errored \u2014 ${t.error}`;let i=t.verdicts.map(o=>{let e=o.gates.filter(s=>s.status==="fail"||s.status==="errored").map(s=>s.id),n=o.error?o.error.message:e.join(", ");return`${o.policy.id} ${o.result}${n?` (${n})`:""}`}),r=`verdict: ${t.result} \u2014 ${i.join(", ")}`;return t.filesError===void 0?r:`${r}
|
|
5
|
+
\u26A0 verdict files not written: ${t.filesError}`}function ue(t,i){return i.verdicts.length===0?{}:{policies:t.map(r=>({name:r.name,content:r.content,sha256:r.sha256})),verdicts:i.verdicts}}async function $e(t,i,r=process.cwd()){let o=await y(t,r);if(!o){let n=`evidence: no pack found for "${t}"`;return i.json?console.log(JSON.stringify({valid:!1,error:"not_found",target:t})):console.error(n),2}let e=await $(o,i.profile??"L1");return i.json?console.log(JSON.stringify({valid:e.valid,status:e.status,diagnostics:e.diagnostics})):console.log(`evidence: ${e.valid?"valid":"INVALID"} (${i.profile??"L1"}, status ${e.status})`),e.valid?0:1}async function xe(t,i,r=process.cwd(),o={}){let e=o.out??(d=>process.stdout.write(d+`
|
|
6
|
+
`)),n=o.err??(d=>process.stderr.write(d+`
|
|
7
|
+
`)),s=await(o.catalog??k(i.env??"prod")),u=o.lint??g,c=[];for(let d of t){let l=await b([d],r);if(!l.ok&&l.kind==="io")return n(`evidence lint-policy: ${l.message}`),2;let f;if(l.ok)try{f=await u(l.policies[0].content,{source:d,catalogYaml:s.yaml})}catch(V){return n(`evidence lint-policy: cannot lint ${d}: ${V.message}`),2}else f=[{code:"policy.limits",severity:"error",location:"",message:l.message}];c.push({path:d,diagnostics:f})}let a=c.every(d=>d.diagnostics.every(l=>l.severity!=="error"));if(i.json)e(JSON.stringify({valid:a,files:c}));else for(let d of c){d.diagnostics.length===0&&e(`${d.path}: ok`);for(let l of d.diagnostics)e(`${l.severity}: ${p(d.path,l)}`)}return a?0:1}async function q(t,i=process.cwd()){if(t!=="latest"){let o=Z(i,t);return await j.stat(o).then(()=>!0,()=>!1)?o:y(t,i)}let r=null;for(let o of await C(i)){let e=await j.stat(o).catch(()=>null);e?.isFile()&&(!r||e.mtimeMs>r.mtime)&&(r={path:o,mtime:e.mtimeMs})}return r?.path??null}async function Ee(t,i,r=process.cwd(),o={}){let e=o.out??(l=>process.stdout.write(l+`
|
|
8
|
+
`)),n=o.err??(l=>process.stderr.write(l+`
|
|
9
|
+
`)),s=i.policyId??[];if(i.policy.length+s.length===0)return n("evidence verdict: at least one --policy <file> or --policy-id <id> is required"),2;let u=await q(t,r);if(!u)return n(t==="latest"?"evidence verdict: no sealed pack in .testmuai/evidence/":`evidence verdict: no pack found for "${t}"`),2;let c=await m({files:i.policy,ids:s},{cwd:r,fetchPolicy:o.fetchPolicy??L({env:i.env??"prod"})});if(!c.ok)return n(`evidence verdict: ${c.message}`),2;let a=await T(u,c.policies,{judge:o.judge});if(a.usage)return n(`evidence verdict: ${a.error}`),2;let d=H(u,".evidence");if(i.json){let{type:l,...f}=I(a,d);e(JSON.stringify({...f,verdicts:a.verdicts}))}else{e(S(a));for(let l of a.files)e(` ${l}`)}return a.filesError!==void 0?(n(`evidence verdict: cannot write the verdict files: ${a.filesError}`),2):a.exit_code}export{b as a,m as b,p as c,re as d,L as e,z as f,de as g,T as h,I as i,S as j,ue as k,$e as l,xe as m,q as n,Ee as o};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as I,c as L,e as _,f as B,g as V,h as P,i as $,k as H}from"./chunk-
|
|
2
|
+
import{b as I,c as L,e as _,f as B,g as V,h as P,i as $,k as H}from"./chunk-LLQWEGXD.js";import{Ua as M,qa as R,ra as k,ta as E,ua as F,va as N,xa as j}from"./chunk-PI7OXS62.js";import{i as w}from"./chunk-DBMW3VUN.js";import{l as y,m as v,n as C,o as b}from"./chunk-G4K3TP2I.js";function me(e){return{index:e,reverse:null,memo:new Map,nameOfMap:null,predecessors:null,fresh:null}}function he(e){e.reverse=null,e.nameOfMap=null,e.predecessors=null,e.fresh=null,e.memo.clear()}function Se(e,s){(s.edges??[]).length>0&&(e.reverse=null),e.nameOfMap=null,e.predecessors=null,e.fresh=null;for(let t of s.nodes??[])e.memo.delete(t.cid)}var Z=(e,s)=>{for(let t of s){let o=e.get(t.dst);o?o.push(t):e.set(t.dst,[t])}},Q=e=>{if(e.reverse===null){let s=new Map;for(let t of Object.values(e.index.forward))Z(s,t);e.reverse=s}return e.reverse},q=e=>{if(e.nameOfMap===null){e.nameOfMap=new Map;for(let[s,t]of Object.entries(e.index.names))e.nameOfMap.set(t,s)}return e.nameOfMap},m=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),a=(e,s)=>e!==void 0&&m(e,s)?e[s]:void 0;function Oe(e,s){let t=(n,r)=>{if(n.memo.has(r))return n.memo.get(r);let i=m(n.index.nodeLabel,r)?s(r):null;return n.memo.set(r,i),i},o=n=>r=>m(n.index.superseded,r)?n.index.superseded[r]:void 0,d=(n,r)=>R(r,o(n)),p=(n,r)=>F(r,i=>q(n).get(i),i=>(n.predecessors??=E(Object.entries(n.index.superseded),l=>m(n.index.nodeLabel,l)?n.index.nodeLabel[l]:void 0)).get(i)),g=(n,r)=>{let i=k(r,{hasNode:l=>m(n.index.nodeLabel,l),cidOfName:l=>a(n.index.names,l),headOf:l=>a(n.index.heads,l)});return i===null?null:{cid:i,tip:d(n,i)}},c=(n,r)=>(r??[]).filter(i=>!m(n.index.superseded,i.ecid)),u=(n,r)=>c(n,a(n.index.forward,r)),x=(n,r)=>c(n,Q(n).get(r)),J=(n,r)=>(n.fresh??=w({supersededBy:o(n),edgesInto:i=>x(n,i),edgesFrom:i=>u(n,i),headOf:i=>a(n.index.heads,i),convChain:i=>a(n.index.conv,i)?.chain,pluginOf:i=>a(n.index.media,i)?.plugin}))(r),T=(n,r)=>N(r,o(n),()=>Object.entries(n.index.superseded),i=>a(n.index.nodeLabel,i));return{getNode:(n,r)=>t(e(r),n),labelOf:(n,r)=>a(e(r).index.nodeLabel,n)??null,trustOf:(n,r)=>a(e(r).index.trust,n)??null,supersededBy:(n,r)=>o(e(r))(n),tipOf:(n,r)=>d(e(r),n),headOf:(n,r)=>a(e(r).index.heads,n),mediaOf:(n,r)=>a(e(r).index.media,n)??null,nameOf:(n,r)=>p(e(r),n),assignedName:(n,r)=>q(e(r)).get(n)??null,cidOfName:(n,r)=>a(e(r).index.names,n)??null,edgesFrom:(n,r)=>u(e(r),n),edgesInto:(n,r)=>x(e(r),n),execHistory:(n,r)=>{let i=e(r),l=g(i,n);if(!l)return[];let h=T(i,l.cid),S=[];for(let[f,O]of Object.entries(i.index.exec??{}))h.has(f)&&S.push(...O);return S.sort((f,O)=>f.started_at<O.started_at?-1:f.started_at>O.started_at?1:0)},archivedReason:(n,r)=>a(e(r).index.archivedReason,n)??null,designFacts:(n,r)=>({generation:a(e(r).index.design_generation,n)??null}),completenessOf:(n,r)=>{let i=a(e(r).index.completeness,n);if(!i)return null;let{seq:l,...h}=i;return h},convChain:(n,r)=>a(e(r).index.conv,n)??null,byLabel:(n,r)=>Object.entries(e(r).index.nodeLabel).filter(([,i])=>i===n).map(([i])=>i),staleList:n=>{let r=e(n);return Object.keys(r.index.nodeLabel).map(i=>({cid:i,state:J(r,i)})).filter(i=>i.state!=="fresh")},allNames:n=>Object.entries(e(n).index.names).map(([r,i])=>({slug:r,cid:i})),extractedSources:n=>[...e(n).index.extracted],designOf:(n,r)=>a(e(r).index.design_of,n)??null,appliedEvent:(n,r)=>{let i=a(e(r).index.eventDigests,n);return i===void 0?null:{digest:i}},nodeIds:n=>Object.entries(e(n).index.nodeLabel).map(([r,i])=>({cid:r,label:i})),sourceIds:n=>Object.entries(e(n).index.heads).map(([r,i])=>({sourceId:r,head:i})),supersessions:n=>Object.entries(e(n).index.superseded).map(([r,i])=>({id:r,next:i})),retractedEdges:n=>{let r=e(n),i=r.index.edgeRetractions??{},l=[];for(let h of Object.values(r.index.forward))for(let S of h){let f=i[S.ecid];f&&l.push({edge:S,retraction:f})}return l},appliedEventsAt:n=>[...e(n).index.appliedEvents],factIds:(n,r)=>{let i=e(n).index,l=r==="trust"?i.trust:r==="archivedReason"?i.archivedReason:r==="designOf"?i.design_of??{}:r==="designGeneration"?i.design_generation??{}:r==="completeness"?i.completeness??{}:i.conv;return Object.keys(l)}}}import{readFileSync as U,rmdirSync as X}from"fs";import{join as D}from"path";function Y(e,s){return{persistCheckpoint:(t,o,d,p)=>V(e(t.state.sid),t,o,d,p),loadCheckpoint:t=>P(e(t),t,()=>s(t)),initCheckpoints:(t,o)=>_(e(t),o),hasBase:t=>e(t).read(I)!==null,gcOrphans:(t,o)=>H(e(t),o)}}function Fe(e){return{create:(s,t)=>y(e,s,t),resume:(s,t)=>v(e,s,t),peek:s=>C(e,s),list:()=>b(e),...Y(s=>L(e,s),s=>B(e,s)),appliedEvents:s=>$(e,s),recordCount:(s,t)=>M(e).records.filter(o=>o.sid===s&&o.seq<=t).length,isLive:s=>{try{let t=JSON.parse(U(D(e,"sessions",s,".lock"),"utf8"));return typeof t.pid=="number"&&j(t.pid)}catch{return!1}},tidy:()=>{try{X(D(e,"sessions"))}catch{}}}}import{existsSync as G,mkdirSync as A,readdirSync as ee,readFileSync as ne,writeFileSync as re}from"fs";import{dirname as te,join as K}from"path";var W=e=>`rationale/${e.startsWith("sha256:")?e.slice(7):e}.yaml`;function ie(e){let s=t=>{let o=e.read(t);return o===null?null:{text:o,where:e.where(t)}};return{override:t=>s(t),profiles:()=>e.list("profiles").filter(t=>t.endsWith(".yaml")||t.endsWith(".yml")).sort().map(t=>{let o=s(`profiles/${t}`);if(o===null)throw new Error(`the design profile ${e.where(`profiles/${t}`)} is listed but cannot be read`);return o}),writeRationale:(t,o)=>{let d=W(t);return e.write(d,o),e.where(d)},readRationale:t=>e.read(W(t))}}function se(e){let s=K(e,"design"),t=o=>K(s,...o.split("/"));return{read:o=>G(t(o))?ne(t(o),"utf8"):null,list:o=>G(t(o))?ee(t(o)):[],write:(o,d)=>{A(te(t(o)),{recursive:!0}),re(t(o),d)},where:t}}function Ie(e){return ie(se(e))}import{mkdirSync as oe,readFileSync as de,renameSync as ae,writeFileSync as le}from"fs";import{dirname as pe,join as ce}from"path";var ge=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function z(e,s,t,o){if(!ge.test(t))throw new Error(`the purpose ${JSON.stringify(t)} is not a plain name`);let d=o.slice(o.indexOf(":")+1);return ce(e,"embeddings",s,t,d.slice(0,2),`${d.slice(2)}.f32`)}function Ve(e){return{read(s,t,o){let d=z(e,s,t,o),p;try{p=de(d)}catch{return null}let g=new Float32Array(Math.floor(p.length/4));for(let c=0;c<g.length;c++)g[c]=p.readFloatLE(c*4);return g},write(s,t,o,d){let p=z(e,s,t,o);oe(pe(p),{recursive:!0});let g=Buffer.alloc(d.length*4);for(let u=0;u<d.length;u++)g.writeFloatLE(d[u],u*4);let c=`${p}.tmp`;le(c,g),ae(c,p)},prefetch:()=>{}}}function Pe(){let e=new Map,s=(t,o,d)=>`${t}
|
|
3
3
|
${o}
|
|
4
4
|
${d}`;return{read:(t,o,d)=>e.get(s(t,o,d))??null,write:(t,o,d,p)=>{e.set(s(t,o,d),p)},prefetch:()=>{}}}export{me as a,he as b,Se as c,Oe as d,Y as e,Fe as f,ie as g,Ie as h,Ve as i,Pe as j};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as y,d as C}from"./chunk-
|
|
2
|
+
import{a as y,d as C}from"./chunk-32HED7X2.js";import{h as P,i as k}from"./chunk-ZDCXWEQG.js";import{h as R,i as b,j as h,k as S}from"./chunk-L3BUPFAQ.js";import{n as w,o as I,p as x}from"./chunk-Z24SD2EJ.js";import{Ia as _,M as f}from"./chunk-PI7OXS62.js";import{basename as U}from"path";function E(n){return n?.outcome==="added"?"added .context/ to .gitignore":n?.outcome==="failed"?`warning: could not add .context/ to .gitignore: ${n.reason}`:null}var L=/^[a-z][a-z0-9+.-]*:\/\//i;function j(n){let c=`${n} isn't a file or a web address, so nothing was added`,e=n.slice(n.indexOf(":")+1),g=n.slice(0,n.indexOf(":")).toLowerCase();return g==="jira"?{message:c,remedy:`for a Jira issue, add its address, for example:
|
|
3
3
|
kane-cli context ingest https://<your site>/browse/${e}`}:g==="confluence"?{message:c,remedy:`for a Confluence page, add its address, for example:
|
|
4
4
|
kane-cli context ingest https://<your site>/wiki/spaces/<space>/pages/${e}`}:g==="linear"?{message:c,remedy:`for a Linear issue, add its address, for example:
|
|
5
5
|
kane-cli context ingest https://linear.app/<workspace>/issue/${e}`}:{message:c,remedy:"add a file, or the item's full web address, then run the command again"}}async function z(n){let{refs:c,io:e,converters:g}=n,l=n.opts??{},d=[];if(l.as!==void 0&&c.length>1)return(e.err??e.out)(`error: --as names ONE source identity \u2014 pass a single file (got ${c.length})`,"AS_SINGLE_SOURCE"),{code:2,results:d};let $=n.plugins??P(),v=n.connections??k();for(let r of c){let a=$.route(r,y);if(a===null&&!h(r)&&L.test(r)&&!y(r)){let o=j(r);return(e.err??e.out)(`error: ${o.message} \u2014 ${o.remedy}`,"UNSUPPORTED_URL"),{code:2,results:d}}if(a===null&&h(r)){let o=S(r);if(o===null)return(e.err??e.out)(`error: ${r}: unsupported remote URL \u2014 supported: ${b.map(s=>s.hint).join("; ")}`,"UNSUPPORTED_URL"),{code:1,results:d};let i=await o.ingest(r,l.as,e,n.store,{credentials:n.credentials,...n.remoteDeps});if(i.code!==0)return{code:i.code,results:d};if(i.result){let s=E(i.result.gitignore);s&&e.out(s),d.push({status:i.result.status==="versioned"?"versioned":i.result.status==="unchanged"?"unchanged":"created",source_id:i.result.source_id,source_cid:i.result.source_cid,...i.result.gitignore?{gitignore:i.result.gitignore}:{}})}continue}let u=l.as,m;if(a===null&&u===void 0&&n.store.exists()){let o=w(r),i=I(o);if(i){let s=f(n.store);if(s.heads.get(i)!=null&&s.heads.get(o)==null){m=i;let T=`${o} looks like a new version of existing source '${i}' \u2014 ingest as '${i}' (replaces the current version; items built on it go stale)?`;e.isTTY&&await e.confirm(T)&&(u=i)}}}let t;try{let o=e.isTTY?i=>e.confirm(`identical bytes already ingested as ${i} \u2014 treat as the same source?`):void 0;t=a!==null?await C({store:n.store,plugin:a.plugin,ref:a.ref,named:a.named,registry:$,...u!==void 0?{asId:u}:{},...o?{confirmSameSource:o}:{},...v?{connect:v}:{}}):await x({store:n.store,filePath:r,asId:u,confirmSameSource:o,converters:g})}catch(o){let i=o instanceof Error?o.message:String(o);return o instanceof _?((e.err??e.out)(`error: ${i}`,o.code),(e.err??e.out)(`next: ${o.remedy}`,o.code),{code:2,results:d}):(n.onRefusal?.(r,i),(e.err??e.out)(`error: ${r}: ${i}`,"INGEST_FAILED"),{code:1,results:d})}e.out(R(e.isTTY,t,U(r)));for(let o of t.warnings??[])e.out(`warning: ${o}`);let O=E(t.gitignore);if(O&&e.out(O),t.composite&&(t.composite.delivered>0||t.composite.omitted>0)){let o=t.composite.pages!==void 0?` ${t.composite.pages} pages,`:"";e.out(`${t.source_id}: ${t.composite.kind},${o} ${t.composite.delivered} images delivered (${t.composite.omitted} omitted)`)}let p;if(!e.isTTY&&t.status==="created"){let o=f(n.store);for(let[i,s]of o.heads.entries())if(!(i===t.source_id||s==null)&&o.getNode(s)?.content.blob===t.blob){p=i,e.out(`hint: identical bytes already ingested as ${i} \u2014 merged later via review`);break}}d.push({status:t.status,source_id:t.source_id,source_cid:t.cid,...t.warnings?.length?{warnings:t.warnings}:{},...t.composite?{media:{kind:t.composite.kind,...t.composite.pages!==void 0?{pages:t.composite.pages}:{},delivered:t.composite.delivered,omitted:t.composite.omitted}}:{},...p?{duplicate_of:p}:{},...m&&u===void 0?{lineage_candidate:m}:{},...t.gitignore?{gitignore:t.gitignore}:{}})}return{code:0,results:d}}export{z as a};
|
|
@@ -1,3 +1,3 @@
|
|
|
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-BHQIH2FE.js";var m="12.0";function Z(t,r=m){let n=u=>{let[g,_]=u.split(".");return[Number(g)||0,Number(_)||0]},s=`; this kane-cli needs >= ${r}. Upgrade the controller first`;if(!t)return`the controller speaks a wire older than ${r} (it reports none)${s}`;let[i,p]=n(t),[a,c]=n(r);return i>a||i===a&&p>=c?null:`the controller speaks wire ${t}${s}`}var f=["explore_start","lease_start","lease_end","map_delta","progress","skill_updated","browser_request","browser_release","explore_end","lease_step","session_held","session_released","explore_frame"],b=["browser_ready","browser_failed","delta_ack","commit_refused","targets_added","stop","frames_start","frames_stop","frames_ack"],S=["recon","verify","explore","target","land","session","end","recheck"],x=["completed","unreachable","blocked","unsettled","budget","aborted","cancelled"],o=["read_only","mutating"],y=["queued","running","stopped"],E=["completed","budget","user_stop","stopped_before_start","timeout","heartbeat_lost"],k=["secrets_missing","no_browsers","commit_refused","commit_failed","runner_error","recon_failed","setup_failed","unexpected_event","focus_unknown","focus_unreachable","controller_outdated","vm_never_started"];function ee(t,r){return{code:`failed:${t}`,...r?{message:r}:{}}}var R=["unverified","verified","stale","changed","broken","gone","superseded","verified_to_edge"],w=["direct","flow","instance","held"],F=["toggle","revert","could_not_revert","storage_restored","gating","pagination","chrome","confirm","slow","how_it_works"],A=["console","network","flow_break","ux","policy","screen_changed","session","coverage","app_error","broken_link","slow","accessibility"],T=["reproduced","not_reproduced","inconclusive"],L=["subject","screen"],N=["broken","ux","coverage","changed","safety","performance","accessibility"];var h=["needs_sign_in","needs_value","read_only","state","off_site","path_broken","budget"],I=["telemetry_blocked","post_allowed"],q=["target","blocker","field","write"],v=["seeding","replay","walking","settling","verifying"],D=["open","bug","discarded","resolving","resolved"],K=["opened","promoted","discarded","marked_resolving","resolved_verified","recheck_inconclusive","resolved_by_person","reopened_seen","resolved_reached","restored"],C=["info","low","medium","high"],O=["verified","verified_healed","assert_failed","diverged","blocked","unsettled","partial","unreachable","verified_to_edge","start_failed","end_failed","verified_adapted","adapted"],P=["adapted","exit_moved"],B=["jump","replay","continued"],V=["session","one_shot","pending"],U=["start","end"],M=["session","one_shot","read","pending"],j=["judge","deps"],H=["version","state","different"],W=["navigate","replay"],G=["finding","flow","junction","candidate","junction_note","skill_area","skill_journey"],Y=["label","note","verdict","do_not_touch","resolve"],$=["correct","incorrect"],J=["user","agent"],X=["finding","flow","junction"],te={ExploreEventName:f,ControlMessageName:b,LeaseKind:S,LeaseResult:x,LeasePolicy:o,RunState:y,RemarkCode:E,FailedReason:k,FlowStatus:R,ReachKind:w,JunctionNoteKind:F,FindingKind:A,FindingStatus:D,StatusTransition:K,FindingCategory:N,RecheckResult:T,SimilarBy:L,BlockedBy:h,AuditKind:I,AnnotationKind:q,LeaseStepPhase:v,StatefulVerdictKind:M,StatefulVerdictSource:j,PathSegmentKind:W,FeedbackTargetKind:G,FeedbackType:Y,FeedbackVerdict:$,FeedbackAuthorKind:J,LabelAppliesTo:X,Severity:C,ObservationOutcome:O,FlowChangeKind:P,ReachedVia:B,StatefulType:V,StatefulRole:U,VerdictRelation:H};function re(t,r){return JSON.stringify({command:t,...r})+`
|
|
3
3
|
`}var e=t=>t,ne={FlowStateful:e({type:"req StatefulType",role:"opt StatefulRole",kind:"opt string",pairs_with:"opt string|null",end_control:"opt string|null"}),StatefulVerdict:e({key:"req string",verdict:"req StatefulVerdictKind",confidence:"opt number",reason:"opt string",end_control:"opt string|null",source:"opt StatefulVerdictSource",run_id:"opt string"}),Budget:e({actions:"opt integer",wall_clock_s:"opt integer",model_calls:"opt integer",max_leases:"opt integer|null"}),FlowDef:e({id:"req string",name:"req string",entry:"req string",description:"opt string",parent_id:"opt string|null",exit:"opt string|null",origin:"opt FlowOrigin",priority:"opt integer",assertions:"opt Assertion[]",annotations:"opt map<string>",owners:"opt map<Ownership>",current_observation:"opt string|null",status:"opt FlowStatus",steps_key:"opt string|null",supersedes:"opt string|null",superseded_by:"opt string|null",after_flow:"opt string|null",state:"opt boolean",in_state:"opt string|null",pending_landing:"opt PendingLanding|null",stateful:"opt FlowStateful|null",plan:"opt FlowPlanRevision|null",finding_ids:"opt string[]",feedback:"opt FeedbackRecord[]",changes:"opt FlowChange[]"}),FlowChange:e({run_id:"req string",observation_id:"req string",kind:"req FlowChangeKind",adapted_at:"req integer",from_exit:"opt string|null",to_exit:"opt string|null"}),Delta:e({seq:"req integer",attempt:"req integer",run_id:"req string",lease_id:"req string",junctions:"opt Junction[]",flows:"opt FlowDef[]",candidates:"opt Candidate[]",observations:"opt Observation[]",findings:"opt Finding[]",suggestions:"opt Suggestion[]",lease:"opt Lease|null",evidence:"opt EvidenceRef[]",aliases:"opt map<string>",entry:"opt string|null",verdicts:"opt MatchVerdict[]",stateful_verdicts:"opt StatefulVerdict[]",feedback:"opt FeedbackRecord[]",feedback_applied:"opt FeedbackApplied[]"}),Parallelism:e({max_parallel:"opt integer",peak:"opt integer",average:"opt number",opened:"opt integer"}),Focus:e({junction_id:"req string",name:"opt string",path_len:"opt integer|null"}),Remark:e({code:"req string",message:"opt string"}),CreditReport:e({total:"opt number",calls:"opt integer",by_node:"opt map<number>",by_phase:"opt map<number>",request_ids:"opt string[]"}),AuditNote:e({kind:"req AuditKind",text:"req string",count:"opt integer",first_lease:"opt string"}),RunRecord:e({run_id:"req string",locale:"opt string",complete:"opt boolean",started_at:"opt string",credits:"opt CreditReport|null",focus:"opt string|null",audit_notes:"opt AuditNote[]"}),Projection:e({exploration_id:"req string",project_id:"opt string|null",entry:"opt string|null",junctions:"opt Junction[]",flows:"opt FlowDef[]",candidates:"opt Candidate[]",observations:"opt Observation[]",findings:"opt Finding[]",aliases:"opt map<string>",rejected_pairs:"opt string[][]",runs:"opt RunRecord[]",last_seq:"opt integer",verdicts:"opt MatchVerdict[]",stateful_verdicts:"opt StatefulVerdict[]",labels:"opt ExplorationLabel[]",skill:"opt string|null",skill_run_id:"opt string|null"}),ExploreStart:e({run_id:"req string",exploration_id:"req string",attempt:"req integer",sessions:"req integer",policy:"req LeasePolicy",locale:"opt string",timezone:"opt string",accept_language:"opt string",focus:"opt Focus|null"}),LeaseStart:e({lease_id:"req string",kind:"req LeaseKind",worker_index:"req integer",target:"opt string|null",budget:"opt Budget",reach:"opt LeaseReach|null"}),ReachHop:e({kind:"req PathSegmentKind",flow_id:"opt string|null",to:"opt string|null",url_pattern:"opt string|null"}),LeaseReach:e({target:"opt string|null",path:"opt ReachHop[]"}),LeaseStep:e({lease_id:"req string",worker_index:"req integer",ordinal:"req integer",phase:"req LeaseStepPhase",junction_id:"opt string|null",known:"opt boolean",url_pattern:"opt string|null",flow_id:"opt string|null",intent:"opt string|null",navigated:"opt boolean",step_ordinal:"opt integer|null"}),SessionHeld:e({worker_index:"req integer",kind:"req string",start_flow:"opt string|null",junction_id:"opt string|null",url_pattern:"opt string|null"}),SessionReleased:e({worker_index:"req integer",reason:"opt string|null"}),LeaseEnd:e({lease_id:"req string",result:"req LeaseResult",reason:"opt string|null"}),MapDelta:e({delta:"req Delta"}),Progress:e({frontier:"req integer",visited:"req integer",active_workers:"req integer",elapsed_s:"req number",unacked:"req integer"}),SkillUpdated:e({version:"req integer",run_id:"req string",summary:"opt string",received:"opt string",dropped:"opt string[]"}),BrowserRequest:e({worker_index:"req integer"}),BrowserRelease:e({worker_index:"req integer"}),ExploreEnd:e({totals:"req map<integer>",stop_reason:"req string",unacked:"req integer",complete:"req boolean",remark:"req Remark",credits:"opt CreditReport",focus:"opt Focus|null",refused:"opt string|null",parallelism:"opt Parallelism|null",audit_notes:"opt AuditNote[]"}),BrowserReady:e({worker_index:"req integer",cdp_endpoint:"opt string|null",ws_endpoint:"opt string|null"}),BrowserFailed:e({worker_index:"req integer",reason:"req string"}),DeltaAck:e({seq:"req integer",committed:"req boolean"}),CommitRefused:e({seq:"req integer",reason:"req string"}),TargetsAdded:e({flows:"opt FlowDef[]"}),Stop:e({browsers_released:"opt boolean"}),FramesStart:e({worker_index:"req integer"}),FramesStop:e({worker_index:"req integer"}),FramesAck:e({worker_index:"req integer"}),ExploreFrame:e({worker_index:"req integer",data:"req string",at_ms:"req integer"})};var d="mutating";function z(t){return typeof t=="string"&&o.includes(t)}function ae(t){let r=t.policy;if(r==null||r==="")return{policy:d};let n=String(r).trim();return z(n)?{policy:n}:{error:`--policy ${JSON.stringify(n)}: one of ${o.join(", ")}`,next:`pass --policy read_only (only reads) or --policy mutating (may change data); the default is ${d}`}}function le(t){return t==="mutating"?"mutating":"read-only"}function de(t){return t==="mutating"?"mutating":"read_only"}var pe="--allow-post has no effect under --policy mutating";function Q(t){try{return new URL(t).host||t}catch{return t}}function ce(t){return`This run may change data on ${Q(t)} and any site it reaches (policy mutating). Nothing is blocked except controls named in --deny. Use --policy read_only to only read.`}function ue(t=new l){return{confirmed:r=>(t.load().explore_mutating_confirmed??[]).includes(r),remember:r=>{let n=t.load().explore_mutating_confirmed??[];n.includes(r)||t.set("explore_mutating_confirmed",[...n,r])}}}export{m as a,Z as b,o as c,k as d,ee as e,G as f,Y as g,$ as h,X as i,te as j,re as k,d as l,z as m,ae as n,le as o,de as p,pe as q,Q as r,ce as s,ue as t};
|