@testmuai/kane-cli 0.10.0-rc.3 → 0.10.0
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-XUV3EQPZ.js +2 -0
- package/dist/{ChromeProfilePicker-M4WXOB5O.js → ChromeProfilePicker-FWPUDKD6.js} +1 -1
- package/dist/{CliFeedbackPrompt-6MJA7DF6.js → CliFeedbackPrompt-D5L2DO6A.js} +1 -1
- package/dist/{CliUploadProgress-6NLS7XHH.js → CliUploadProgress-HQX57WE6.js} +1 -1
- package/dist/{ConfigView-O4WKZ5PU.js → ConfigView-DGQXKEON.js} +1 -1
- package/dist/EvidenceViewOffer-EIANIYN7.js +2 -0
- package/dist/FolderPicker-XOA7FTHF.js +2 -0
- package/dist/InfoBox-OBH7SUGC.js +2 -0
- package/dist/{LinksBox-DXP66H3H.js → LinksBox-WZ4RAMSH.js} +1 -1
- package/dist/{ProfilesView-TWOY5PVC.js → ProfilesView-AGRNPGSW.js} +1 -1
- package/dist/ProjectPicker-6KRLKV4U.js +2 -0
- package/dist/SaveSessionPrompt-J2OPDEOO.js +2 -0
- package/dist/SingleShotApp-QI4B2TSL.js +2 -0
- package/dist/{SummaryBox-IA2KS6GT.js → SummaryBox-XQJUZBAN.js} +1 -1
- package/dist/TestMdRunView-I4MV54FB.js +2 -0
- package/dist/TestrunEvidenceTable-WEIUSW3E.js +2 -0
- package/dist/{WhoamiView-SNL75TEF.js → WhoamiView-JQCURK2M.js} +1 -1
- package/dist/{app-download-UI4ABEIX.js → app-download-OU6AGH2X.js} +1 -1
- package/dist/{assurance-job-FFSSS4XV.js → assurance-job-ZI3L6I4F.js} +1 -1
- package/dist/{binary-THPLXCOD.js → binary-S5YL5GJD.js} +1 -1
- package/dist/bind-LIV72SEZ.js +2 -0
- package/dist/bootstrap-3V6TOO6I.js +2 -0
- package/dist/{bridge-T6QMYKED.js → bridge-SDEP7Y33.js} +1 -1
- package/dist/{catalog-MYPS2BXY.js → catalog-I3PC6LT6.js} +1 -1
- package/dist/catalog-client-WKYG3JN6.js +2 -0
- package/dist/{changelog-SU674BVE.js → changelog-IHNWFYWY.js} +1 -1
- package/dist/chat-committer-FM5NG46O.js +2 -0
- package/dist/{chat-controller-XINCDH6Z.js → chat-controller-FWFQVZTB.js} +1 -1
- package/dist/child-H2YSDFCG.js +2 -0
- package/dist/{chunk-QDFY5GGO.js → chunk-252GEI3H.js} +1 -1
- package/dist/{chunk-TNORODUF.js → chunk-2B75UL7Y.js} +1 -1
- package/dist/{chunk-FWDUVFS6.js → chunk-2EVP636F.js} +17 -17
- package/dist/{chunk-7XBNMOH4.js → chunk-2GE5X2A5.js} +1 -1
- package/dist/{chunk-DJC7NTLA.js → chunk-2L3A5NKZ.js} +1 -1
- package/dist/{chunk-CUXY6KQ2.js → chunk-2N75WO7Y.js} +1 -1
- package/dist/{chunk-CGITGJ3I.js → chunk-2PZKMT3I.js} +1 -1
- package/dist/{chunk-M43WH5DQ.js → chunk-2SY2NCOP.js} +1 -1
- package/dist/{chunk-Q3C6NDGI.js → chunk-32Y6QVFG.js} +1 -1
- package/dist/{chunk-734ORT6O.js → chunk-3OVFKUXV.js} +1 -1
- package/dist/{chunk-IGEAET7M.js → chunk-3T2TYDPT.js} +1 -1
- package/dist/{chunk-TU42YZOJ.js → chunk-3UHPVQLU.js} +1 -1
- package/dist/{chunk-WEIPY3CI.js → chunk-3ZPEQDXZ.js} +1 -1
- package/dist/{chunk-RHGW7B5Q.js → chunk-436FZ4KG.js} +1 -1
- package/dist/{chunk-YQ5C6UDG.js → chunk-4523YDTG.js} +1 -1
- package/dist/{chunk-7SY34IIL.js → chunk-45URQUAK.js} +1 -1
- package/dist/{chunk-VSVWNRI2.js → chunk-4BUEOKFV.js} +1 -1
- package/dist/{chunk-NZ6AV2TA.js → chunk-4JWJH6TB.js} +1 -1
- package/dist/{chunk-YPFQ4UGF.js → chunk-4MNSP4EO.js} +1 -1
- package/dist/{chunk-ZFMRQ57Y.js → chunk-4NUSW4A2.js} +1 -1
- package/dist/{chunk-FSYOTRMC.js → chunk-4R4YUOVY.js} +1 -1
- package/dist/{chunk-FWUPJORV.js → chunk-4SJAOAYY.js} +1 -1
- package/dist/{chunk-SMTBOSEJ.js → chunk-52VCA4K2.js} +1 -1
- package/dist/{chunk-4YW767UV.js → chunk-567D5ZTO.js} +7 -7
- package/dist/{chunk-W4QSZNMB.js → chunk-5IO5ZC4S.js} +1 -1
- package/dist/{chunk-LSDJOVWW.js → chunk-5R3ODQHH.js} +1 -1
- package/dist/{chunk-WXJCJL5L.js → chunk-5T6II7VN.js} +1 -1
- package/dist/{chunk-3YTCKCBG.js → chunk-65BG6GAE.js} +1 -1
- package/dist/{chunk-LAOTVZHV.js → chunk-6DZ7LVOG.js} +1 -1
- package/dist/chunk-6K5BEEAJ.js +2 -0
- package/dist/{chunk-42PALMW2.js → chunk-6TNLITJO.js} +1 -1
- package/dist/{chunk-VXGN3IV7.js → chunk-7C4IEL5V.js} +1 -1
- package/dist/{chunk-PUVMC4PX.js → chunk-7V34ZMMS.js} +1 -1
- package/dist/{chunk-DDZLCAEO.js → chunk-7ZJWUWSN.js} +1 -1
- package/dist/{chunk-ICLUC44J.js → chunk-A3TCFSCK.js} +1 -1
- package/dist/{chunk-F5NHG7VB.js → chunk-A4BB6GLN.js} +1 -1
- package/dist/{chunk-AVSMXDTX.js → chunk-AG5XJWEV.js} +1 -1
- package/dist/{chunk-GQRU3B54.js → chunk-AGXAJ2II.js} +1 -1
- package/dist/{chunk-6UVIY56J.js → chunk-AIGQCMGY.js} +1 -1
- package/dist/{chunk-RX6776AI.js → chunk-AU26ZZTX.js} +1 -1
- package/dist/{chunk-CCP4X75B.js → chunk-AUBSLPJZ.js} +1 -1
- package/dist/{chunk-XQMWHPZI.js → chunk-B2WFW74J.js} +1 -1
- package/dist/{chunk-NXRF7FFS.js → chunk-B7JLM3IX.js} +1 -1
- package/dist/{chunk-LUZBGTYB.js → chunk-BRVIK3BU.js} +1 -1
- package/dist/{chunk-URH4FX3H.js → chunk-BY2B4YJN.js} +1 -1
- package/dist/{chunk-Y7E5L42F.js → chunk-CBVHP7JB.js} +1 -1
- package/dist/{chunk-ZFM77AQU.js → chunk-CJE7PKRV.js} +1 -1
- package/dist/{chunk-2DYHAP4E.js → chunk-CJQUVHHS.js} +1 -1
- package/dist/{chunk-OFSDB7B4.js → chunk-COJINPOK.js} +2 -2
- package/dist/{chunk-JZP3Y4ZM.js → chunk-D6CS62O7.js} +1 -1
- package/dist/{chunk-457Y5TEC.js → chunk-DBTMKBHU.js} +1 -1
- package/dist/{chunk-CM4CHYSN.js → chunk-DHYGCHKB.js} +1 -1
- package/dist/{chunk-DZOYYWOW.js → chunk-DTYT6KBO.js} +1 -1
- package/dist/{chunk-6EB5VRAN.js → chunk-EC5IP5HZ.js} +1 -1
- package/dist/{chunk-35ECWCCK.js → chunk-EH43VWVR.js} +1 -1
- package/dist/{chunk-HQ2E2XCU.js → chunk-ENG2UTMX.js} +1 -1
- package/dist/{chunk-VUFIL5VR.js → chunk-EPJ5SJL2.js} +2 -2
- package/dist/{chunk-YHFZFV3A.js → chunk-EQWMOGLO.js} +9 -9
- package/dist/{chunk-XLEGGC4Y.js → chunk-EVZLINBN.js} +1 -1
- package/dist/{chunk-44B6THYK.js → chunk-EX6ORR7P.js} +1 -1
- package/dist/{chunk-EBPRPNSA.js → chunk-FBQ7PQJV.js} +1 -1
- package/dist/{chunk-AEWNWAXW.js → chunk-FLOQ5NZL.js} +2 -2
- package/dist/{chunk-LCSJ7GOG.js → chunk-FPPVNF53.js} +1 -1
- package/dist/{chunk-F22K3RRX.js → chunk-FPVGA6XT.js} +1 -1
- package/dist/{chunk-IJ2AHSWW.js → chunk-FVYIV36L.js} +1 -1
- package/dist/chunk-FYCD765R.js +161 -0
- package/dist/{chunk-AVI5H4UM.js → chunk-G2KTWFMU.js} +1 -1
- package/dist/{chunk-ACMBMZDQ.js → chunk-G3CYFCSR.js} +1 -1
- package/dist/{chunk-JNSWKGTB.js → chunk-G3J4XY3Z.js} +1 -1
- package/dist/{chunk-KXHJMAZU.js → chunk-GET4DINR.js} +2 -2
- package/dist/{chunk-54XA5MZH.js → chunk-GGS3ATPB.js} +1 -1
- package/dist/{chunk-C2RUDJ46.js → chunk-GGV336P5.js} +1 -1
- package/dist/{chunk-L5DALV5N.js → chunk-GI2JPIX5.js} +1 -1
- package/dist/{chunk-HAW5WEKT.js → chunk-GRO6DLN3.js} +1 -1
- package/dist/{chunk-3RJHXOZH.js → chunk-GXMD23XB.js} +1 -1
- package/dist/chunk-GYDJO32R.js +2 -0
- package/dist/{chunk-W7FLXW6Q.js → chunk-H4KPNGY4.js} +1 -1
- package/dist/{chunk-PAWQ4AKN.js → chunk-HBVHIEPB.js} +1 -1
- package/dist/{chunk-EF47KRUK.js → chunk-HGVM2OZU.js} +1 -1
- package/dist/{chunk-4QFTHUJA.js → chunk-HMQ5M4JJ.js} +1 -1
- package/dist/{chunk-ZTHYAHDN.js → chunk-I2VU2DTS.js} +1 -1
- package/dist/{chunk-7NCJMWFX.js → chunk-J4LQAT5P.js} +1 -1
- package/dist/{chunk-HK62JVQM.js → chunk-JCSVBD4F.js} +1 -1
- package/dist/{chunk-7AET4JKQ.js → chunk-JFBEHCJN.js} +1 -1
- package/dist/{chunk-EECDDDSB.js → chunk-JGLADDRH.js} +1 -1
- package/dist/{chunk-I4WXALQR.js → chunk-JOCEZK2M.js} +1 -1
- package/dist/{chunk-5AKJPYUW.js → chunk-JQ7ZZQXC.js} +3 -3
- package/dist/{chunk-C62QWG4B.js → chunk-JRSEAXFE.js} +1 -1
- package/dist/{chunk-D7U2M26S.js → chunk-JSLKCCD2.js} +1 -1
- package/dist/{chunk-RTVHJ23A.js → chunk-JT6WLJSV.js} +1 -1
- package/dist/{chunk-P3JXJ4BW.js → chunk-JTJ7IPNI.js} +1 -1
- package/dist/{chunk-ZTRRFG52.js → chunk-JX5NVKTV.js} +1 -1
- package/dist/{chunk-QBYENBMB.js → chunk-K2PLULJD.js} +1 -1
- package/dist/{chunk-RF37IJNN.js → chunk-K3OSK6PB.js} +1 -1
- package/dist/{chunk-3GXN6VF6.js → chunk-KDR662D2.js} +1 -1
- package/dist/{chunk-NLZZLANH.js → chunk-KRRZCY7U.js} +1 -1
- package/dist/{chunk-KODJVOCN.js → chunk-LHQUCRCH.js} +1 -1
- package/dist/{chunk-WOSANGV6.js → chunk-LNHBZEDC.js} +1 -1
- package/dist/{chunk-PZA3BSOE.js → chunk-LXM7VHYN.js} +1 -1
- package/dist/{chunk-D7TKE7LK.js → chunk-MHB6DMKZ.js} +1 -1
- package/dist/{chunk-W6HZF56M.js → chunk-MJKRJGER.js} +1 -1
- package/dist/{chunk-V7USCQWO.js → chunk-MKPDF26Q.js} +1 -1
- package/dist/{chunk-VLDCHFXF.js → chunk-MPEIMWQI.js} +1 -1
- package/dist/{chunk-YIKF4ERQ.js → chunk-MW2WNYJO.js} +2 -2
- package/dist/{chunk-MYVKUJGS.js → chunk-N3KTLWJL.js} +1 -1
- package/dist/{chunk-QDXKEOKI.js → chunk-NJCN6LP5.js} +6 -6
- package/dist/{chunk-IUQOG7Z5.js → chunk-NOFJXCYP.js} +1 -1
- package/dist/{chunk-I4RVVBG3.js → chunk-NTXFPNAP.js} +1 -1
- package/dist/{chunk-XZGEN4NU.js → chunk-ONZ2CSTZ.js} +1 -1
- package/dist/{chunk-UYDHOHSZ.js → chunk-OR2B6T3B.js} +1 -1
- package/dist/{chunk-UUJIGOEO.js → chunk-ORNVIEUA.js} +1 -1
- package/dist/{chunk-R7KXAISS.js → chunk-P2LDAW3C.js} +1 -1
- package/dist/{chunk-ECPFI75W.js → chunk-PBWYQR5I.js} +1 -1
- package/dist/{chunk-O3HHTKZ5.js → chunk-PCDIEYV6.js} +1 -1
- package/dist/{chunk-EZN7CF45.js → chunk-PL3SG3M2.js} +1 -1
- package/dist/{chunk-NXAJBSIF.js → chunk-PQXYHI5W.js} +1 -1
- package/dist/{chunk-WAOUE7MP.js → chunk-PTISAIZW.js} +1 -1
- package/dist/{chunk-XZYA7DNH.js → chunk-PVN64537.js} +1 -1
- package/dist/{chunk-NIVFEACM.js → chunk-QECTIQAC.js} +1 -1
- package/dist/chunk-QMOGBKJM.js +2 -0
- package/dist/{chunk-ZU4W2QGM.js → chunk-QQI6N3FO.js} +1 -1
- package/dist/{chunk-7RWP4Y3H.js → chunk-QVP4FSKT.js} +1 -1
- package/dist/{chunk-OCDBTAYS.js → chunk-QWZJ5QDO.js} +2 -2
- package/dist/{chunk-YLXWAY7D.js → chunk-RARD6TC6.js} +1 -1
- package/dist/chunk-RDH3E25Q.js +27 -0
- package/dist/{chunk-AZLNLHUA.js → chunk-RLOJH5O6.js} +1 -1
- package/dist/{chunk-RPRXRKKR.js → chunk-RQKMSNEU.js} +1 -1
- package/dist/{chunk-R4JUKTDO.js → chunk-SB6P5EQH.js} +1 -1
- package/dist/{chunk-TU7TVFBK.js → chunk-SBR6D6GS.js} +1 -1
- package/dist/{chunk-7HMSMAUG.js → chunk-TLOYTGVT.js} +5 -5
- package/dist/{chunk-LUR7JFPP.js → chunk-TZVPDGJD.js} +1 -1
- package/dist/{chunk-D756UWY2.js → chunk-U7NRZBB5.js} +1 -1
- package/dist/{chunk-72RC7JSA.js → chunk-UEPJ26X2.js} +1 -1
- package/dist/chunk-UJLULWSR.js +21 -0
- package/dist/{chunk-LQQNPMOD.js → chunk-ULGBK4NS.js} +1 -1
- package/dist/{chunk-6DZX5HLZ.js → chunk-UNWPBMVM.js} +1 -1
- package/dist/chunk-URAYFJGM.js +87 -0
- package/dist/{chunk-FIP5L6LV.js → chunk-USJ3LUAL.js} +1 -1
- package/dist/chunk-UUWSULIM.js +101 -0
- package/dist/chunk-UX2CDUPE.js +9 -0
- package/dist/{chunk-GXKY5A46.js → chunk-VA3BSIUQ.js} +1 -1
- package/dist/chunk-VQZOKTJ2.js +12 -0
- package/dist/{chunk-36N3EHW5.js → chunk-VVCZRCRD.js} +1 -1
- package/dist/{chunk-HJMCXSUJ.js → chunk-VZA7BPCK.js} +1 -1
- package/dist/{chunk-LIGTP3A3.js → chunk-W3NWHWK2.js} +1 -1
- package/dist/{chunk-E6KSRQXL.js → chunk-WERIGVOH.js} +1 -1
- package/dist/{chunk-ETZMFRD6.js → chunk-WKZLK57W.js} +1 -1
- package/dist/{chunk-3OQW2GTA.js → chunk-WQR2GYP7.js} +1 -1
- package/dist/{chunk-SGPAM5DZ.js → chunk-WX4VGH5Q.js} +1 -1
- package/dist/{chunk-OJ33Q6DU.js → chunk-WZLDFEWR.js} +1 -1
- package/dist/{chunk-ZAFJQ3SM.js → chunk-X3J4CC27.js} +1 -1
- package/dist/chunk-XLQ4F6BI.js +9 -0
- package/dist/{chunk-XRNQSXOM.js → chunk-XMALVGH7.js} +2 -2
- package/dist/{chunk-TW5AA5A7.js → chunk-Y3YULFCK.js} +1 -1
- package/dist/{chunk-7YT4TTKL.js → chunk-YGMQXS2J.js} +1 -1
- package/dist/{chunk-RDP7GWSY.js → chunk-YH4VZVHJ.js} +1 -1
- package/dist/{chunk-YGRULEZY.js → chunk-YI4ESDAX.js} +1 -1
- package/dist/{chunk-YAW6JW6D.js → chunk-YKL5H4K6.js} +1 -1
- package/dist/{chunk-VX657KIK.js → chunk-YKOEABP2.js} +1 -1
- package/dist/{chunk-3E4ZO73O.js → chunk-YYVBE6W2.js} +1 -1
- package/dist/{chunk-MEKPGQAM.js → chunk-Z5BFCTHI.js} +2 -2
- package/dist/{chunk-UEE3RZN4.js → chunk-Z777GGHB.js} +1 -1
- package/dist/{chunk-7NPTL66J.js → chunk-ZGQM6KWN.js} +1 -1
- package/dist/{chunk-QENCC2ZS.js → chunk-ZI3X7DI2.js} +1 -1
- package/dist/{chunk-3F5FMH76.js → chunk-ZKPY3AXW.js} +1 -1
- package/dist/chunk-ZRDX2ARO.js +4 -0
- package/dist/{chunk-MNBGG4H3.js → chunk-ZTAZ2R5Z.js} +1 -1
- package/dist/{chunk-LKQFG4RW.js → chunk-ZY65IZJR.js} +1 -1
- package/dist/{chunk-WZXPF3BI.js → chunk-ZZNQIFFI.js} +1 -1
- package/dist/commands-QOORPTSI.js +2 -0
- package/dist/{committer-JGY66PFM.js → committer-26UZDYSA.js} +1 -1
- package/dist/{config-754B73XK.js → config-B472DZSR.js} +1 -1
- package/dist/{cover-cmd-NBNZCR6C.js → cover-cmd-3VO6QC5Y.js} +1 -1
- package/dist/{credentials-F7DYLVWY.js → credentials-TLT3RQOO.js} +1 -1
- package/dist/{deps-bundle-PW3WEQJ7.js → deps-bundle-CMTIWBS5.js} +1 -1
- package/dist/{deps-resolve-SQYVN76L.js → deps-resolve-XLFZK74A.js} +1 -1
- package/dist/{design-chat-F3OEZPNJ.js → design-chat-I7X3QDDY.js} +1 -1
- package/dist/design-committer-Y7R56RFZ.js +2 -0
- package/dist/design-headless-HUQOXLZB.js +2 -0
- package/dist/{design-remote-2BEGCVCX.js → design-remote-UDC5FP45.js} +2 -2
- package/dist/device-env-MMGISNHN.js +2 -0
- package/dist/dispatch-P2445PUU.js +2 -0
- package/dist/{doctor-XY26Z35T.js → doctor-UHFCIM4B.js} +1 -1
- package/dist/{docx-convert-6IZO5P5K.js → docx-convert-N4KMLLKO.js} +1 -1
- package/dist/{dossier-NROC2MCY.js → dossier-6KMKEIXV.js} +1 -1
- package/dist/evidence-M3JTOJNL.js +2 -0
- package/dist/{evidence-presentation-YYTIDCBS.js → evidence-presentation-DV3DRB4S.js} +1 -1
- package/dist/evolve-cmd-K3JXACMN.js +2 -0
- package/dist/{evolve-remote-WLVY3QID.js → evolve-remote-CUDVV2O2.js} +1 -1
- package/dist/{exit-manager-EDHCETUN.js → exit-manager-EGWAZHCR.js} +1 -1
- package/dist/{explain-cmd-OP5I5W3O.js → explain-cmd-235TY7QX.js} +1 -1
- package/dist/{explain-cmd-VYAANFFZ.js → explain-cmd-R67B4YR3.js} +1 -1
- package/dist/explore-UDD5FHXW.js +2 -0
- package/dist/{explore-context-tty-RZ7D2TBV.js → explore-context-tty-YXEFT32U.js} +1 -1
- package/dist/{explore-entry-EKXJ67BD.js → explore-entry-V6L5FSP4.js} +4 -4
- package/dist/{explore-live-2YVRAQZO.js → explore-live-N5VBLBUI.js} +1 -1
- package/dist/{explore-run-tty-D47FGPX7.js → explore-run-tty-ZZQ33GNA.js} +2 -2
- package/dist/{extract-bind-W2NET364.js → extract-bind-BTINHHE5.js} +3 -3
- package/dist/{extract-chat-M65NWGUK.js → extract-chat-ABZ5S7UU.js} +1 -1
- package/dist/{extract-cmd-FTFLETOP.js → extract-cmd-45OZETCM.js} +2 -2
- package/dist/extract-headless-ALEFAMVS.js +2 -0
- package/dist/{feeder-NY45UFJK.js → feeder-L55TH2NC.js} +1 -1
- package/dist/folder-flags-HTKJCXKB.js +2 -0
- package/dist/{gaps-cmd-OIDDLRYL.js → gaps-cmd-ROGQWK5X.js} +1 -1
- package/dist/{gate-WISOUTHQ.js → gate-QA5J7UZA.js} +1 -1
- package/dist/gate-XFFFX5ZF.js +2 -0
- package/dist/{generate-headless-RURIEKVS.js → generate-headless-DAH3HHRQ.js} +2 -2
- package/dist/hold-passthrough-K5PP26CP.js +2 -0
- package/dist/impact-cmd-3VFJAKYK.js +11 -0
- package/dist/index.js +171 -165
- package/dist/ingest-S5R736ZV.js +2 -0
- package/dist/{ingest-cmd-4G2AK4Y2.js → ingest-cmd-YSEH5EPU.js} +3 -3
- package/dist/ingest-remote-C6AP2Q7E.js +2 -0
- package/dist/install-B26Y2NU4.js +2 -0
- package/dist/{interactive-bind-SI2ZS55Q.js → interactive-bind-P3GTFIZM.js} +4 -4
- package/dist/{interactive-remote-J56EWJGA.js → interactive-remote-PBRQHTAF.js} +2 -2
- package/dist/lane-7IEAE6AC.js +2 -0
- package/dist/lattice-auth-7EL4ET3P.js +2 -0
- package/dist/{lifecycle-cmd-HJ37LTXE.js → lifecycle-cmd-PUNFWKV5.js} +1 -1
- package/dist/{list-cmd-6XL2FYLQ.js → list-cmd-RD7YBF4S.js} +1 -1
- package/dist/list-commands-UZELZAB3.js +2 -0
- package/dist/{list-remote-LXPQNXYN.js → list-remote-KGKXPCQA.js} +1 -1
- package/dist/{locks-cmd-JJ2QNTNY.js → locks-cmd-LXZ6I4QG.js} +1 -1
- package/dist/{logical-ids-RXAQJZ3T.js → logical-ids-D5PFYY4C.js} +1 -1
- package/dist/login-flow-CHLGQGHK.js +2 -0
- package/dist/{maintenance-cmd-BXXHP36K.js → maintenance-cmd-WRWBCP3R.js} +1 -1
- package/dist/{mobile-prompts-CECJ5UY2.js → mobile-prompts-Z7NQHRGP.js} +1 -1
- package/dist/{onboarding-PDVYMTY5.js → onboarding-ZP4XDYEO.js} +1 -1
- package/dist/{open-provider-OZAG6WZS.js → open-provider-U26BBVUE.js} +1 -1
- package/dist/pdf-convert-LMKOKLXT.js +2 -0
- package/dist/{persist-recorded-session-A3ID7JFA.js → persist-recorded-session-4IRYG5CJ.js} +1 -1
- package/dist/phase-seed-2H6OXZXT.js +2 -0
- package/dist/pipeline-U7D25NST.js +2 -0
- package/dist/policy-commands-TY6WOR73.js +8 -0
- package/dist/prepare-target-EVL2QSXA.js +2 -0
- package/dist/{pull-cmd-UPFQYUND.js → pull-cmd-QJQANBAW.js} +1 -1
- package/dist/pull-route-AIOTLA3D.js +2 -0
- package/dist/{readmodel-INMP6MNW.js → readmodel-KXCFPL2M.js} +1 -1
- package/dist/real-device-run-QODMDUXF.js +2 -0
- package/dist/{reconcile-cmd-JBH365JL.js → reconcile-cmd-IJTQAJZX.js} +4 -4
- package/dist/reconcile-deps-2CTIFXDR.js +2 -0
- package/dist/{reconcile-remote-BCX6SWFC.js → reconcile-remote-23D6SXXT.js} +2 -2
- package/dist/{recording-banner-YKBAL6UB.js → recording-banner-MNRMMEX4.js} +1 -1
- package/dist/registry-MZYBLEW2.js +2 -0
- package/dist/remote-entry-DW2J56N4.js +2 -0
- package/dist/remote-mode-AFNCN6EE.js +4 -0
- package/dist/{remote-words-YVB66R3F.js → remote-words-RCNFI2TQ.js} +1 -1
- package/dist/{require-project-folder-MLMEQJYP.js → require-project-folder-7UH43GHI.js} +1 -1
- package/dist/{resolve-run-intent-PC7TQZUL.js → resolve-run-intent-XEWFYMGN.js} +1 -1
- package/dist/{resolver-EID34LQE.js → resolver-QMPX6RBR.js} +1 -1
- package/dist/{revert-FHOBLZWF.js → revert-37346WLE.js} +1 -1
- package/dist/{review-cmd-EUHFLFMY.js → review-cmd-2OECKNL5.js} +1 -1
- package/dist/run-JWOHNWA3.js +2 -0
- package/dist/run-QFJ6ZRVD.js +2 -0
- package/dist/run-remote-66QTUQ2M.js +2 -0
- package/dist/{run-startup-gate-YO66G6LS.js → run-startup-gate-USQFSW47.js} +1 -1
- package/dist/run-test-md-7DRWCSQE.js +19 -0
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-cmd-S7WZBUCN.js → sessions-cmd-LQ2LZQOC.js} +2 -2
- package/dist/{sessions-remote-IWHWIQ2T.js → sessions-remote-H7CQST42.js} +1 -1
- package/dist/{skill-installer-MAVQY6GW.js → skill-installer-LKYY6XFJ.js} +1 -1
- package/dist/{store-MSA7KASS.js → store-KM5MG3XB.js} +1 -1
- package/dist/store-choice-4J2NN6OQ.js +2 -0
- package/dist/store-guard-34GG2TW2.js +2 -0
- package/dist/{store-site-KA2DNBGY.js → store-site-ZSFINU6C.js} +1 -1
- package/dist/stream-warnings-N4KVVWXV.js +2 -0
- package/dist/sync-cmd-3CHSWWWW.js +2 -0
- package/dist/{sync-setup-RBRDUV7Q.js → sync-setup-QQXYO6R4.js} +1 -1
- package/dist/tcg-generate-IPD5FQUW.js +2 -0
- package/dist/{test-definition-VRI4YIYL.js → test-definition-53XNBEDE.js} +1 -1
- package/dist/testmd-actions-V7P7BMKE.js +2 -0
- package/dist/{testmd-sync-UPAA5UMD.js → testmd-sync-PQ4GFKHB.js} +1 -1
- package/dist/tms-client-XWCR7O7J.js +2 -0
- package/dist/token-refresh-LR33BKAB.js +2 -0
- package/dist/{use-case-ref-NE4X4MZN.js → use-case-ref-NA3IXGQW.js} +1 -1
- package/dist/{validate-basic-M5JHHNZA.js → validate-basic-3DX3MMC7.js} +1 -1
- package/dist/verdicts-7GKZEDHV.js +2 -0
- package/dist/{version-check-Q737BE65.js → version-check-OV6AOVED.js} +1 -1
- package/dist/{view-cmd-XSNL5DGI.js → view-cmd-QDKBBNIU.js} +1 -1
- package/dist/{walk-session-SHGYLFRB.js → walk-session-BAYYPIKN.js} +1 -1
- package/dist/with-telemetry-62LW4VFI.js +2 -0
- package/package.json +12 -12
- 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/chat-committer-ZCSRJEUB.js +0 -2
- package/dist/child-G2GCW73X.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-NC7D7GOM.js +0 -21
- package/dist/chunk-OGFU4YY4.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/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/evolve-cmd-WWOB3QJR.js +0 -2
- package/dist/explore-K5YBGHK6.js +0 -2
- package/dist/extract-headless-G6W6JQ27.js +0 -2
- package/dist/folder-flags-KKIH654K.js +0 -2
- package/dist/gate-7AKRPRMK.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/pdf-convert-447ACUB3.js +0 -2
- 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/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/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/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,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as rs,b as ss}from"./chunk-
|
|
2
|
+
import{a as rs,b as ss}from"./chunk-FPPVNF53.js";import{b as Vr}from"./chunk-GRO6DLN3.js";import{a as jr,b as Gr,c as Yr,f as Zr,h as es,i as ts,j as rt,k as ns,l as is,m as os,n as us,o as bs,p as xs,q as Ss,r as ks,s as $s}from"./chunk-WERIGVOH.js";import{b as Ut,c as ds}from"./chunk-VZJ6LUXX.js";import{a as Qr,b as Nt,c as as,d as cs,e as ms,f as hs,g as fs,h as gs,i as _s,j as ps,m as vs,o as Lt,p as ws,q as ys}from"./chunk-EH43VWVR.js";import{a as Wr}from"./chunk-HJLMH7ZM.js";import{b as Ot,c as tt,d as Xr,e as zr,f as Kr}from"./chunk-IZ65ZPWY.js";import{a as Br,d as Hr,e as Tt,f as Pt,g as Fr}from"./chunk-3JLEDSG5.js";import{b as Dt,c as Jr}from"./chunk-QVP4FSKT.js";import{b as qr}from"./chunk-73ZFOJOK.js";import{a as et}from"./chunk-HGVM2OZU.js";import{b as ls}from"./chunk-Z55KBMYV.js";import{e as Lr,h as Mr}from"./chunk-6TNLITJO.js";import{f as Nr}from"./chunk-KF4DKXSS.js";import{a as Ze}from"./chunk-AUJSC7PU.js";import{b as Ur}from"./chunk-DPGOAFKF.js";import{i as Or,m as Dr}from"./chunk-RLOJH5O6.js";import{a as Ir,e as Tr,f as Pr}from"./chunk-ZHWU6L2G.js";import{a as Cr}from"./chunk-2GE5X2A5.js";import{b as Ar}from"./chunk-ZCIWQHCO.js";import{a as Rr}from"./chunk-XB6BJPDL.js";import{$ as De,B as At,M as J,da as It,v as Oe,w as Er}from"./chunk-Z777GGHB.js";import{c as Qe,n as $r}from"./chunk-DBMW3VUN.js";import{f as be}from"./chunk-KU3YHPWZ.js";import{b as kr}from"./chunk-7V4BQSSV.js";import{b as xr,d as Ye,f as Ct,h as Sr}from"./chunk-HHW6MRU3.js";import{c as Rt,m as br}from"./chunk-4I7YN6YY.js";import{randomBytes as nn}from"crypto";import{appendFileSync as on,mkdirSync as an}from"fs";import{dirname as cn,extname as dn}from"path";var st="toc",Zs=256*1024,Es=200,Ne={read:"source_read",edges:"graph_get_edges"},Ht=40;function Cs(t,e,m){if(t===void 0)return{code:"TABLE_INDEX_MISSING",detail:"its unit index is not in the blob store"};if(t===null)return{code:"TABLE_INDEX_INVALID",detail:"the blob its fact names as its unit index is not a unit index"};if(t.plugin!==e.id||t.rules!==e.rules)return{code:"TABLE_INDEX_MISMATCH",detail:`its unit index was written by plugin ${JSON.stringify(t.plugin)} under rules ${JSON.stringify(t.rules)}, not by ${JSON.stringify(e.id)} under rules ${JSON.stringify(e.rules)} as its fact says`};let d=a=>Array.isArray(a)&&a.length===2&&Number.isInteger(a[0])&&Number.isInteger(a[1])&&a[0]>=1&&a[0]<=a[1]&&a[1]<=m;for(let a of t.units)if(!(a.lines!==void 0?[a.lines]:Array.isArray(a.segments)?a.segments:[null]).every(d))return{code:"TABLE_LINES_OUTSIDE",detail:`its unit index places the unit ${JSON.stringify(a.id)} at lines the text of ${m} lines does not have`};return t.units.some(a=>a.id!==Qe&&a.lines!==void 0)?null:{code:"TABLE_NO_UNITS",detail:"its unit index lists no unit, so there is nothing to make a table of"}}var Ft=([t,e])=>`L${t}-L${e}`,Mt=t=>Buffer.byteLength(t,"utf8"),Bt=t=>Ir(t)?.replace(/\|/g,"/")??null;function Rs(t,e){let m=Bt(t.ref??t.id)??Bt(t.id)??"?",d=e==="none"?null:Bt(t.label),a=d===null?null:e==="cut"&&d.length>Ht?`${d.slice(0,Ht)}\u2026`:d;return`${Ft(t.lines)} | ${m}${a===null?"":` | ${a}`}`}function en(t,e){for(let a of["whole","cut","none"]){let l=t.map(y=>Rs(y,a));if(Mt(l.join(`
|
|
3
3
|
`))<=e)return{lines:l,labels:a,listed:t.length}}let m=[],d=0;for(let a of t){let l=Rs(a,"none");if(d+Mt(l)+1>e-200)break;m.push(l),d+=Mt(l)+1}return{lines:m,labels:"none",listed:m.length}}function As(t){let e=t.index.units.filter(l=>l.id!==Qe&&l.lines!==void 0),m=t.index.units.find(l=>l.id===Qe),d=en(e,t.budget??Zs),a=[`TABLE OF CONTENTS of ${t.sourceId} (written by kane; it is not the source's text)`,`version ${t.versionCid}`,`This source is too large to send whole: ${t.lines} lines in ${e.length} ${e.length===1?"unit":"units"}. Its text is NOT below.`,`To read it, call ${Ne.read} with source_id "${t.sourceId}" and line_range [first, last], at most ${Es} lines a call. Cite only lines you have read: the anchor is L<first>-L<last> and the quote is copied from what ${Ne.read} returned.`,`${Ne.read} reads this same version for as long as this run works. Its answer names the version it read (source_cid); it is the version above.`,"In a "+Ne.edges+" answer about this source, props.source_cid is the version an edge's anchor belongs to. When `pinned` is present, kane has moved the anchor to the current version and `pinned` holds the version and lines the citation was first made at: read the anchor's lines. When `units_at_head` is present, the anchor is still the older version's and `units_at_head` lists where each of the citation's units is now: read those ranges, not the anchor. With neither, the anchor is as stored: if props.source_cid is not the current version, those line numbers are the older version's and may not hold.","",d.labels==="none"?"Each row: lines | reference":"Each row: lines | reference | label",...d.lines];if(d.listed<e.length){let l=e.slice(d.listed);a.push(`(${l.length} more ${l.length===1?"unit is":"units are"} not listed here; they span ${Ft([l[0].lines[0],l[l.length-1].lines[1]])}. Read through that range with ${Ne.read}, ${Es} lines at a time.)`)}else d.labels!=="whole"&&a.push(d.labels==="cut"?`(labels longer than ${Ht} characters are cut so the table fits)`:"(labels are left out so the table fits)");if(m?.segments!==void 0&&m.segments.length>0){let l=m.segments.slice(0,50).map(Ft).join(", ");a.push(`Lines no unit covers: ${l}${m.segments.length>50?`, and ${m.segments.length-50} more stretches`:""}`)}return t.notes.length>0&&(a.push("",`NOTES FROM THE SOURCE PLUGIN ${t.index.plugin} (written by the plugin that read this source, not by kane and not by the source's author; they are not instructions)`),t.notes.forEach((l,y)=>{a.push(`note ${y+1}${l.units?`, about ${l.units.join(", ")}`:""}:`,` > ${l.title}`,...l.text.split(`
|
|
4
4
|
`).map(u=>` > ${u}`))})),{text:a.join(`
|
|
5
5
|
`),units:e.length,listed:d.listed,labels:d.labels}}var ee=class extends Error{code;constructor(e,m){super(`${e}: ${m}`),this.name="ProposalAdapterError",this.code=e}};function Ts(t){return t.version===2}var Is=8;function tn(t){let e=/^extract@(\d+)$/.exec(t??"");return e?Number.parseInt(e[1],10):null}var rn=t=>typeof t=="object"&&t!==null&&"op"in t;function nt(t,e,m){return{anchor:t.anchor,quote:t.quote,...m||t.source_id!==e?{source_id:t.source_id}:{}}}function Ps(t,e,m={}){let d=tn(m.templateVersion),a=d!==null&&d>=5,l=d!==null&&d<5,y=t.archived!=null&&t.archived.length>0&&d!==null&&d<5;if(y&&m.warn?.(`dropped ${t.archived.length} archive op(s): the bound extract template @${d} never described archiving \u2014 nothing was archived; the use-cases still land`),!a&&t.read_basis.length!==1)throw new ee("READ_BASIS_COUNT",`read_basis must have exactly 1 element, got ${t.read_basis.length}`);if(t.read_basis.length===0)throw new ee("READ_BASIS_COUNT","read_basis must not be empty");let u=t.read_basis[0],_=t.read_basis.length>1,v=t.use_cases.map(o=>{if(l&&o.cite.length!==1)throw new ee("CITE_COUNT",`${o.temp_ref}: cite must have exactly 1 element, got ${o.cite.length}`);if(o.cite.length<1||o.cite.length>Is)throw new ee("CITE_COUNT",`${o.temp_ref}: 1..${Is} cites allowed, got ${o.cite.length}`);let P=(D,I)=>{if(!a&&D!==u.source_id)throw new ee("SOURCE_MISMATCH",`${I}: cite source ${D} != read_basis source ${u.source_id} (single-source)`)};P(o.cite[0].source_id,o.temp_ref);let L=o.cite.map(D=>(P(D.source_id,o.temp_ref),nt(D,u.source_id,a&&(_||D.source_id!==u.source_id)))),j=(o.updated?.criteria??[]).some(rn);if(!a&&j)throw new ee("CRITERIA_OPS_UNSUPPORTED",`${o.temp_ref}: op-union updated.criteria (keep/set/remove) needs an extract@5+ binding \u2014 this session is bound to ${m.templateVersion??"an unversioned template"}`);return{temp_ref:o.temp_ref,title:o.title,...o.description!==void 0?{description:o.description}:{},...o.summary!==void 0?{summary:o.summary}:{},...o.actors!==void 0?{actors:o.actors}:{},...o.value!==void 0?{value:o.value}:{},risk:o.risk,cite:L[0],...L.length>1?{cites:L}:{},...o.criteria!=null&&o.criteria.length>0?{criteria:o.criteria.map((D,I)=>(P(D.cite.source_id,`${o.temp_ref}.criteria[${I}]`),{text:D.text,cite:nt(D.cite,u.source_id,a&&D.cite.source_id!==u.source_id)}))}:{},depends_on_hint:o.depends_on_hint,matches_existing:o.matches_existing,...o.conflicts_with!=null?{conflicts_with:o.conflicts_with}:{},...o.changed?{changed:!0}:{},...o.updated!=null?{updated:{...o.updated.title!=null?{title:o.updated.title}:{},...o.updated.description!=null?{description:o.updated.description}:{},...o.updated.summary!=null?{summary:o.updated.summary}:{},...o.updated.actors!=null?{actors:o.updated.actors}:{},...o.updated.value!=null?{value:o.updated.value}:{},...o.updated.risk!=null?{risk:o.updated.risk}:{},...o.updated.criteria!=null?{criteria:j?o.updated.criteria.map(D=>D.op==="set"?{op:"set",text:D.text,cite:nt(D.cite,u.source_id,a&&D.cite.source_id!==u.source_id)}:D.op==="keep"?{op:"keep",ref:D.ref,text:D.text}:{op:"remove",ref:D.ref,text:D.text,reason:D.reason}):o.updated.criteria.map((D,I)=>(P(D.cite.source_id,`${o.temp_ref}.updated.criteria[${I}]`),{text:D.text,cite:nt(D.cite,u.source_id,a&&D.cite.source_id!==u.source_id)}))}:{}}}:{},...o.change_note!=null?{change_note:o.change_note}:{}}});return{version:1,read_basis:e,source:{source_id:u.source_id,source_cid:u.source_cid},use_cases:v,..._?{sources:t.read_basis.map(o=>({source_id:o.source_id,source_cid:o.source_cid}))}:{},...t.extraction_of!=null&&t.extraction_of.length>0?{extraction_claims:t.extraction_of.map(o=>({source_id:o.source_id,completeness:o.completeness}))}:{},...t.archived!=null&&t.archived.length>0&&!y?{archived:t.archived.map(o=>({target:o.target,reason:o.reason,basis:o.basis}))}:{}}}var jt=new Map;function Os(t,e){return jt.set(t,{parked:e}),()=>{jt.delete(t)}}function Ds(t,e){if(!(!t||!e||e.owner_sid!==t.sid||e.pid!==process.pid||!e.alive))return jt.get(t.sid)}function Ns(t){let{store:e,graph:m}=t,d=t.maxDigestBytes??4096,a={},l=[];for(let[_,v]of m.heads){if(a[_]=v,typeof v!="string")continue;let o=m.mediaOf(v),P=m.getNode(v)?.content?.blob;if(typeof P=="string")if(o.format==="image")l.push({source_id:_,cid:v,format:"image",blobRef:{path:e.blobPath(P),cid:P}});else{let L=Oe(e,m,v)?.toString("utf8")??"";l.push({source_id:_,cid:v,format:o.format,text:L})}}l.sort((_,v)=>_.source_id<v.source_id?-1:1);let y=[];for(let _ of m.byLabel(be.STYLENOTE).sort((v,o)=>v.cid<o.cid?-1:1))m.superseded.has(_.cid)||y.push(`\u2022 ${String(_.content.statement)} [${String(_.content.learned_from_kind)}]`);let u="";for(let _ of y){if(Buffer.byteLength(u+_+`
|
|
@@ -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-AUBSLPJZ.js";import{a as te}from"./chunk-W3NWHWK2.js";import{a as G}from"./chunk-5Y2G4NC7.js";import{b as ye}from"./chunk-WN5VKKJ3.js";import{a as Be}from"./chunk-FPVGA6XT.js";import{a as Te}from"./chunk-WQR2GYP7.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-QMOGBKJM.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{a as A,b as T,c as $,d as x,e as c,h as F}from"./chunk-
|
|
2
|
+
import{a as A,b as T,c as $,d as x,e as c,h as F}from"./chunk-ORNVIEUA.js";import{f as k,l as v,q as E}from"./chunk-RLOJH5O6.js";import{M as S,j as N,m as U,n as O}from"./chunk-Z777GGHB.js";import{d as m}from"./chunk-DBMW3VUN.js";import{existsSync as R,readFileSync as H,statSync as M}from"fs";var B=t=>{try{return R(t)&&M(t).isFile()}catch{return!1}},C=t=>N(t)&&A.test(t);async function y(t,n,o,l){let e=t.manifest.id,s,a=new Promise((r,d)=>{s=setTimeout(()=>d(new $({code:"PLUGIN_HOOK_TIMEOUT",message:`plugin ${e} did not answer ${n} within ${Math.round(o/1e3)} seconds`,plugin:e,hook:n})),o)});try{return await Promise.race([Promise.resolve().then(l),a])}catch(r){throw r instanceof $?r:r instanceof T?new $({code:"PLUGIN_REFUSED",message:r.message,plugin:e,hook:n,...r.remedy?{remedy:r.remedy}:{}}):new $({code:"PLUGIN_HOOK_FAILED",message:`plugin ${e} failed in ${n}: ${r instanceof Error?r.message:String(r)}`,plugin:e,hook:n})}finally{clearTimeout(s)}}async function ee(t){let{plugin:n,ref:o,named:l}=t,e=n.manifest.id,s=t.hookMs??m.hookMs,a=t.isFile??B(o),r=!a&&x(n).includes("remote")&&typeof n.fetch=="function",d=l?`${e}:${o}`:o,I=r?O(d):null;I!==null&&c("PLUGIN_REF_INVALID",`${d.length>80?`${d.slice(0,80)}\u2026`:d} cannot be recorded as a reference: ${I}`,{plugin:e,remedy:`give the source as <scheme>:<rest>, one word of at most ${U} characters`});let h=await y(n,"claim",s,()=>n.claim({ref:o,named:l,isFile:a}));h==null&&c("PLUGIN_NOT_CLAIMED",`plugin ${e} does not read ${o}`,{plugin:e,hook:"claim",remedy:l?`drop the ${e}: prefix, or name the plugin that reads it`:"ingest it as a file of a built-in kind"}),(typeof h!="object"||typeof h.sourceId!="string")&&c("PLUGIN_HOOK_FAILED",`plugin ${e} answered claim with something that is not a claim`,{plugin:e,hook:"claim"});let p=t.asId??h.sourceId,b=h.recorded;if(r&&b!==void 0){(typeof b!="string"||b==="")&&c("PLUGIN_HOOK_FAILED",`plugin ${e} answered claim with a recorded reference that is not one`,{plugin:e,hook:"claim"});let i=l?`${e}:${b}`:b,u=O(i);u!==null&&c("PLUGIN_HOOK_FAILED",`plugin ${e} would record ${i.length>80?`${i.slice(0,80)}\u2026`:i}, which cannot be recorded as a reference: ${u}`,{plugin:e,hook:"claim"});let f=(t.registry??F()).route(i,()=>!1);(f===null||f.plugin.manifest.id!==e)&&c("PLUGIN_HOOK_FAILED",`plugin ${e} would record ${i.length>80?`${i.slice(0,80)}\u2026`:i}, which ${f===null?"no plugin reads":`plugin ${f.plugin.manifest.id} reads`}: a recorded reference must route back to the plugin that read it`,{plugin:e,hook:"claim"});let w=await y(n,"claim",s,()=>n.claim({ref:f.ref,named:f.named,isFile:!1}));(w==null||typeof w!="object"||w.sourceId!==h.sourceId)&&c("PLUGIN_HOOK_FAILED",`plugin ${e} would record ${b} for ${h.sourceId}, but claiming it again ${w?`gives ${String(w.sourceId)}`:"is refused"}: a recorded reference must name the same source`,{plugin:e,hook:"claim"}),d=i}C(p)||c("PLUGIN_SOURCE_ID_INVALID",`${JSON.stringify(p)} is not an id a source may have: it starts with a letter or digit and holds letters, digits and . _ -, at most 128 characters`,{plugin:e,hook:"claim",remedy:t.asId===void 0?"give the source an id with --as <id>":"give another id with --as <id>"});let g,L;if(!a&&t.supplied!==void 0){r||c("PLUGIN_REMOTE_UNAVAILABLE",`${o} is not a file on this machine, and plugin ${e} has no connection to fetch it through`,{plugin:e,remedy:"save the source to a file and ingest the file"}),g=Buffer.from(t.supplied.bytes),g.byteLength>m.contentBytes&&c("PLUGIN_CONTENT_TOO_LARGE",`${o} is ${g.byteLength} bytes; a plugin's source may be at most ${m.contentBytes}`,{plugin:e,hook:"fetch"});let i=t.supplied.cursor??null;L={ref:d,...i!==null?{cursor:i}:{}}}else if(a)g=t.supplied!==void 0?Buffer.from(t.supplied.bytes):H(o),g.byteLength>m.contentBytes&&c("PLUGIN_CONTENT_TOO_LARGE",`${o} is ${g.byteLength} bytes; a plugin's source may be at most ${m.contentBytes}`,{plugin:e});else{let i=r?t.connect?.(e):void 0;i===void 0&&c("PLUGIN_REMOTE_UNAVAILABLE",`${o} is not a file on this machine, and plugin ${e} has no connection to fetch it through`,{plugin:e,remedy:"save the source to a file and ingest the file"});let u=t.cursor!==void 0?t.cursor:j(t.store,p,e,d),f=await D(n,i,{ref:o,sourceId:p,cursor:u},s);if(f.kind==="unchanged")return K(t.store,p,e);g=f.bytes,L={ref:d,...f.cursor!==null?{cursor:f.cursor}:{}},t.onFetched?.({bytes:new Uint8Array(g),cursor:f.cursor})}let _={sourceId:p,bytes:new Uint8Array(g)},G=async()=>{let u=(await y(n,"render",s,()=>n.render(_)))?.text;(typeof u!="string"||u===""||u.includes("\0"))&&c("PLUGIN_TEXT_INVALID",`plugin ${e} rendered ${p} to something that is not text: ${typeof u!="string"?"no text":u===""?"empty text":"text holding a NUL"}`,{plugin:e,hook:"render"});let f=await y(n,"index",s,()=>n.index(_,{text:u}));return{projection:u,inventory:[],blobs:new Map,delivered:[],converter:{name:e,version:n.manifest.version,policy:`rules-${n.manifest.rules}`},units:f}},P=x(n);return E({store:t.store,bytes:g,media:k,sourceId:p,label:o,plugin:{id:e,rules:n.manifest.rules,...L!==void 0?{fetch:L}:{},...P.includes("cites-deep")?{citesDeep:!0}:{}},converters:{plugin:G},...P.includes("explain")&&typeof n.explain=="function"?{explain:(i,u)=>y(n,"explain",Math.min(u,s),()=>n.explain(i))}:{},...t.explainMs!==void 0?{explainMs:t.explainMs}:{},...P.includes("context")&&typeof n.context=="function"?{context:(i,u)=>y(n,"context",Math.min(u,s),()=>n.context({..._,text:i.text,units:i.units}))}:{},...P.includes("coverage")&&typeof n.coverage=="function"?{coverage:(i,u)=>y(n,"coverage",Math.min(u,s),()=>n.coverage({sourceId:_.sourceId,units:i.units}))}:{},...t.confirmSameSource?{confirmSameSource:t.confirmSameSource}:{},...t.eventIds?{eventIds:t.eventIds}:{},...t.provenance?{provenance:t.provenance}:{}})}async function D(t,n,o,l){let e=t.manifest.id,s;try{s=await y(t,"fetch",l,()=>t.fetch({...o,connection:n}))}catch(h){throw n.breach?n.breach:h}finally{n.close()}if(n.breach)throw n.breach;let a=s?.kind;if(a==="unchanged")return{kind:"unchanged"};let r=s;(a!=="content"||!(r.bytes instanceof Uint8Array))&&c("PLUGIN_HOOK_FAILED",`plugin ${e} answered fetch with something that is not an answer: neither the content, with its bytes, nor "unchanged"`,{plugin:e,hook:"fetch"});let d=Buffer.from(r.bytes);d.byteLength>m.contentBytes&&c("PLUGIN_CONTENT_TOO_LARGE",`plugin ${e} fetched ${d.byteLength} bytes for ${o.ref}; a plugin's source may be at most ${m.contentBytes}`,{plugin:e,hook:"fetch"}),r.cursor!==void 0&&typeof r.cursor!="string"&&c("PLUGIN_HOOK_FAILED",`plugin ${e} answered fetch with a cursor that is not a string`,{plugin:e,hook:"fetch"});let I=r.cursor===void 0?null:r.cursor;return I!==null&&Buffer.byteLength(I,"utf8")>m.cursorBytes&&c("PLUGIN_CURSOR_TOO_LARGE",`plugin ${e} answered fetch with a cursor of ${Buffer.byteLength(I,"utf8")} bytes; a cursor may be at most ${m.cursorBytes}`,{plugin:e,hook:"fetch",remedy:"the plugin must be fixed: every later fetch of this source starts from the same cursor and is refused the same way"}),{kind:"content",bytes:d,cursor:I}}function K(t,n,o){let l=S(t),e=l.heads.get(n);typeof e!="string"&&c("PLUGIN_HOOK_FAILED",`plugin ${o} answered fetch with "unchanged" for ${n}, which this store holds no current version of`,{plugin:o,hook:"fetch"});let s=l.mediaOf(e),a=v(n,s.format==="plugin"?s.plugin?.id??"":null,o,!1);if(a!==void 0)throw new Error(a);let r=l.getNode(e)?.content.blob;return{status:"unchanged",source_id:n,cid:e,blob:typeof r=="string"?r:""}}function j(t,n,o,l){let e=S(t),s=e.heads.get(n);if(typeof s!="string")return null;let a=e.mediaOf(s).plugin;return a?.id!==o||a.fetch?.ref!==l?null:a.fetch.cursor??null}export{B as a,C as b,y as c,ee as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as f,c as j}from"./chunk-VE3SUJMA.js";import{
|
|
2
|
+
import{b as f,c as j}from"./chunk-VE3SUJMA.js";import{e as g}from"./chunk-6K5BEEAJ.js";import{a as m}from"./chunk-GGV336P5.js";var _="KaneAI Generated",E="Untitled";async function p(e){let r=e.config.load(),d=new g(m(e.env).tmsBaseUrl,e.tmsCreds.username,e.tmsCreds.access_key),n=e.projectName??_,o=e.folderName??E,t=r.project_id??null,s=r.project_name??null;if(!t){let a=(await d.listProjects()).find(l=>l.name===n);if(a)t=a.project_id,s=a.name,e.log("info","ENSURE_PROJECT_FOUND","Found default project",{project_id:t,name:s});else{let l=await d.createProject(n);t=l.id,s=l.name,e.log("info","ENSURE_PROJECT_CREATED","Created default project",{project_id:t,name:s})}f(e.creds,e.config,e.profile,e.env,{projectId:t,projectName:s})}let c=r.folder_id??null,i=r.folder_name??null,u=!r.project_id;if(!c||u){let a=(await d.listFolders(t)).find(l=>l.name===o);if(a)c=a.id,i=a.name,e.log("info","ENSURE_FOLDER_FOUND","Found default folder",{folder_id:c,name:i});else{let l=await d.createFolder(t,o);c=l.id,i=l.name,e.log("info","ENSURE_FOLDER_CREATED","Created default folder",{folder_id:c,name:i})}f(e.creds,e.config,e.profile,e.env,{folderId:c,folderName:i})}return{projectId:t,projectName:s??n,folderId:c,folderName:i??o}}function A(e,r,d){let n=e.loadProfileConfig(r,d)??{};return{projectId:n.project_id??null,folderId:n.folder_id??null}}function N(e,r){return e.projectId===null||e.folderId===null||r===null?"needs-picker":r.project==="ok"&&r.folder==="ok"?"ok":r.project==="error"&&r.folder==="error"?"ok-tms-degraded":"needs-picker"}var k=(e,r)=>`error: profile "${e}" (${r}) has no project/folder configured AND no TMS credentials were available to auto-configure one.
|
|
3
3
|
|
|
4
4
|
discover IDs:
|
|
5
5
|
kane-cli projects list --search "<keyword>" --limit 10
|
|
@@ -14,4 +14,4 @@ set them:
|
|
|
14
14
|
kane-cli config folder <folder-id>
|
|
15
15
|
`;function C(e,r){return k(e,r)}function D(e){return`info: auto-configured project "${e.projectName}" (${e.projectId}) and folder "${e.folderName}" (${e.folderId}). Change with: kane-cli config project <id> / kane-cli config folder <id>.`}function S(e){return`${JSON.stringify(T(e))}
|
|
16
16
|
`}function T(e){return{type:"project_folder_auto_defaulted",project_id:e.projectId,project_name:e.projectName,folder_id:e.folderId,folder_name:e.folderName}}async function x(e){if(e.isLocal)return e.log("info","GATE_SKIP_LOCAL","Gate skipped (--local)",{}),{status:"skip",reason:"local"};j(e.creds,e.config,e.profile,e.env,e.log);let r=A(e.creds,e.profile,e.env),d=null;if(r.projectId!==null){let o=m(e.env);d=await new g(o.tmsBaseUrl,e.tmsCreds.username,e.tmsCreds.access_key).validateProjectFolder(r.projectId,r.folderId??""),e.log("info","GATE_VALIDATE","TMS project/folder validation",{project:d.project,folder:d.folder,folder_was_cached:r.folderId!==null})}else r.folderId!==null&&(f(e.creds,e.config,e.profile,e.env,{folderId:null,folderName:null}),e.log("warn","GATE_CLEARED_ORPHAN_FOLDER","Cleared orphan folder (no project cached)",{folder_id:r.folderId}),r.folderId=null);let n=N(r,d);if(n==="ok")return{status:"ok",projectId:r.projectId,folderId:r.folderId};if(n==="ok-tms-degraded")return e.log("warn","GATE_TMS_DEGRADED","TMS validation failed; using cached IDs",{project_id:r.projectId,folder_id:r.folderId}),{status:"ok",projectId:r.projectId,folderId:r.folderId};if(d){let o={};d.project==="missing"?(o.projectId=null,o.projectName=null,o.folderId=null,o.folderName=null):d.folder==="missing"&&(o.folderId=null,o.folderName=null),Object.keys(o).length>0&&(f(e.creds,e.config,e.profile,e.env,o),e.log("info","GATE_CLEARED_STALE","Cleared stale cached IDs before re-resolve",{project_cleared:d.project==="missing",folder_cleared:d.folder==="missing"||d.project==="missing"}))}try{let o=await p({creds:e.creds,config:e.config,profile:e.profile,env:e.env,tmsCreds:e.tmsCreds,log:e.log}),t={projectId:o.projectId,projectName:o.projectName,folderId:o.folderId,folderName:o.folderName};return e.log("info","GATE_AUTO_DEFAULTED","Auto-configured project/folder",{project_id:t.projectId,project_name:t.projectName,folder_id:t.folderId,folder_name:t.folderName}),e.onAnnounce?e.onAnnounce(t):process.stderr.write(`${D(t)}
|
|
17
|
-
`),{status:"ok",projectId:t.projectId,folderId:t.folderId,autoDefaulted:t}}catch(o){let t=C(e.profile,e.env);if(e.log("error","GATE_FATAL","Auto-default failed",{profile:e.profile,env:e.env,cached_project_id:r.projectId,cached_folder_id:r.folderId,validation:d,error:o instanceof Error?o.message:String(o)}),e.onFatalExit)e.onFatalExit(t);else{process.stderr.write(t);let{shutdown:s}=await import("./exit-manager-
|
|
17
|
+
`),{status:"ok",projectId:t.projectId,folderId:t.folderId,autoDefaulted:t}}catch(o){let t=C(e.profile,e.env);if(e.log("error","GATE_FATAL","Auto-default failed",{profile:e.profile,env:e.env,cached_project_id:r.projectId,cached_folder_id:r.folderId,validation:d,error:o instanceof Error?o.message:String(o)}),e.onFatalExit)e.onFatalExit(t);else{process.stderr.write(t);let{shutdown:s}=await import("./exit-manager-EGWAZHCR.js");s(2,"Project/folder gate failed")}return{status:"cancelled"}}}export{p as a,A as b,N as c,C as d,D as e,S as f,T as g,x as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{L as N,a as k,pa as S,r as w}from"./chunk-
|
|
2
|
+
import{L as N,a as k,pa as S,r as w}from"./chunk-Z777GGHB.js";import{f as _,h as $}from"./chunk-KU3YHPWZ.js";var T=3,F={edit:"edit",reject:"mistake",dedup_dropped:"mistake",approve:"usage",enhance:"directed-edit",add:"directed-edit",default_accepted:"usage",default_overridden:"edit",gap_resolution:"usage",dedup_kept:"usage"};function P(m){let{store:u,graph:s,watermark:v,by:f}=m,{signals:b}=u.signals().snapshot(v),E=b.filter(e=>e.event_id===void 0||s.appliedEvents.has(e.event_id)),n=new Map;for(let e of E){let t=e.event_id??`${e.ts}|${e.id}|${e.verdict}|${e.polarity}`;n.has(`${t}|${e.polarity}|${e.verdict}`)||n.set(`${t}|${e.polarity}|${e.verdict}`,e)}let j=[...n.values()].sort((e,t)=>(e.event_id??e.ts)<(t.event_id??t.ts)?-1:1),i=new Map;for(let e of j){let t=`${e.verdict}|${e.tag??""}`,r=i.get(t)??{verdict:e.verdict,tag:e.tag,events:new Set};r.events.add(e.event_id??e.ts),i.set(t,r)}let d=[],a=[],g=new Set,c=[],y=0;for(let[,e]of[...i.entries()].sort(([t],[r])=>t<r?-1:1)){if(e.events.size<T)continue;let r={derived:!0,statement:`${e.verdict}${e.tag?`/${e.tag}`:""} recurs (${e.events.size} distinct events) \u2014 bias future proposals ${e.verdict==="approve"?"toward":"away from"} this pattern`,learned_from_kind:F[e.verdict]??"usage",learned_from:[...e.events].sort()},h=$("stylenote",r);if(h.length>0)return{record:null,errors:h.map(o=>({code:o.code,detail:o.detail})),minted:0};let p=k("stylenote",r);if(s.hasNode(p))continue;d.push({cid:p,label:_.STYLENOTE,content:r});for(let o of r.learned_from)c.includes(o)||c.push(o);let l=S("stylenote",o=>g.has(o),s.names.keys());l!==null&&(g.add(l),a.push({cid:p,slug:l,by:f})),y+=1}return d.length===0?{record:null,errors:null,minted:0}:{record:N(u,{ts:new Date().toISOString(),proposal_id:null,nodes:d,edges:[],review:[],supersessions:[],source_head_moves:{},...a.length>0?{names:a}:{}},{graph:s,expectPrev:s.latestHash,intent:{v:1,verb:"distill",args:w({watermark:v,by:f}),pins:{events:c}},provenance:m.provenance}).record,errors:null,minted:y}}export{P as a};
|
|
@@ -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-VZA7BPCK.js";import{y as s}from"./chunk-QMOGBKJM.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,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as x,c as O}from"./chunk-3AGP2BVN.js";import{oa as B}from"./chunk-
|
|
2
|
+
import{a as h,b as x,c as O}from"./chunk-3AGP2BVN.js";import{oa as B}from"./chunk-Z777GGHB.js";import{a as S}from"./chunk-HCBYKLMW.js";import{b as i}from"./chunk-33DWJV67.js";import{a as w}from"./chunk-FOJHSG5M.js";import{z as s}from"./chunk-QMOGBKJM.js";import{e as L}from"./chunk-UR6MHSHU.js";var e=L(S(),1),W={high:0,med:1,low:2},E={high:s.red,med:"yellow",low:s.dim};function j(d){return d.map((n,o)=>({r:n,i:o})).sort((n,o)=>(W[n.r.risk??"zz"]??3)-(W[o.r.risk??"zz"]??3)||n.i-o.i).map(({r:n})=>n)}function z(d,n=120,o="risk"){if(d.length===0)return null;let a=j(d),l=t=>t.held?"(held)":t.staged||!t.id?"(staged)":B(t.id),p=Math.max(2,...a.map(t=>l(t).length)),g=o!==null,r=o!==null?Math.max(o.length,...a.map(t=>(t.badge??"").length)):0,m=n>=84&&a.some(t=>t.summary),c=2+(g?1:0)+(m?1:0),u=c+1+c*2,b=n-u-p-r,k=Math.max(...a.map(t=>Math.max(t.title.length,(t.marker??"").length)),5),f=Math.max(5,m?Math.min(k,Math.max(16,Math.floor(b*.5))):Math.min(k,b)),T=m?Math.max(7,b-f):0,R=(t,$,M,I)=>O(t,$,M,I.map(A=>A.length)),C=(t,$,M,I)=>[x(h(t,p),p),x(h($,f),f),...g?[x(h(M,r),r)]:[],...m?[x(h(I,T),T)]:[]],y=C("id","title",o??"","summary");return{showBadge:g,showSummary:m,headerCells:y,top:R("\u250C","\u252C","\u2510",y),middle:R("\u251C","\u253C","\u2524",y),bottom:R("\u2514","\u2534","\u2518",y),rows:a.map(t=>({cells:C(l(t),h(t.title,f),h(t.badge??"",r),h(t.summary??"",T)),badgeColor:t.badgeColor??E[t.badge??""]??s.dim,...t.marker?{markerCells:C("",h(t.marker,f),"","")}:{}}))}}function K(d,n){let o=z(d,n.width,n.badgeHeader===void 0?"risk":n.badgeHeader);if(o===null)return[];let a=(r,m)=>n.color?D(r,m):m,l=r=>a(s.dim,r),p=r=>n.color?w.bold(r):r,g=[l(o.top),`${l("\u2502 ")}${o.headerCells.map(p).join(l(" \u2502 "))}${l(" \u2502")}`,l(o.middle)];for(let r of o.rows){let[m,c,...u]=r.cells,b=o.showBadge?[a(r.badgeColor,u[0])]:[],k=o.showSummary?[u[o.showBadge?1:0]]:[];g.push(`${l("\u2502 ")}${a(s.assuranceAccent,m)}${l(" \u2502 ")}${[c,...b,...k].join(l(" \u2502 "))}${l(" \u2502")}`),r.markerCells&&g.push(l(`\u2502 ${r.markerCells.join(" \u2502 ")} \u2502`))}return g.push(l(o.bottom)),g}function D(d,n){if(d.startsWith("#"))return w.hex(d)(n);let o=w[d];return typeof o=="function"?o(n):n}function v({rows:d,width:n=120,badgeHeader:o="risk"}){let a=z(d,n,o);if(a===null)return null;let{showBadge:l,showSummary:p,headerCells:g}=a,r=[];r.push((0,e.jsx)(i,{color:s.dim,children:a.top},"t")),r.push((0,e.jsxs)(i,{children:[g.map((m,c)=>(0,e.jsxs)(i,{children:[(0,e.jsx)(i,{color:s.dim,children:c===0?"\u2502 ":" \u2502 "}),(0,e.jsx)(i,{bold:!0,children:m})]},c)),(0,e.jsx)(i,{color:s.dim,children:" \u2502"})]},"h")),r.push((0,e.jsx)(i,{color:s.dim,children:a.middle},"m"));for(let[m,c]of a.rows.entries()){let u=c.cells;r.push((0,e.jsxs)(i,{children:[(0,e.jsx)(i,{color:s.dim,children:"\u2502 "}),(0,e.jsx)(i,{color:s.assuranceAccent,children:u[0]}),(0,e.jsx)(i,{color:s.dim,children:" \u2502 "}),u[1],l?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{color:s.dim,children:" \u2502 "}),(0,e.jsx)(i,{color:c.badgeColor,children:u[2]})]}):null,p?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{color:s.dim,children:" \u2502 "}),u[l?3:2]]}):null,(0,e.jsx)(i,{color:s.dim,children:" \u2502"})]},`r-${m}`)),c.markerCells&&r.push((0,e.jsx)(i,{color:s.dim,children:`\u2502 ${c.markerCells.join(" \u2502 ")} \u2502`},`mk-${m}`))}return r.push((0,e.jsx)(i,{color:s.dim,children:a.bottom},"b")),(0,e.jsx)(e.Fragment,{children:r})}export{K as a,v as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as D,f as B}from"./chunk-ZHWU6L2G.js";import{M as S,sb as M,v as L}from"./chunk-
|
|
2
|
+
import{e as D,f as B}from"./chunk-ZHWU6L2G.js";import{M as S,sb as M,v as L}from"./chunk-Z777GGHB.js";import{c as E,n as O}from"./chunk-DBMW3VUN.js";import{f as y,g as _}from"./chunk-KU3YHPWZ.js";function $(i,r,e){let t=L(i,r,e);return t===null?null:t.toString("utf8")}var T=128*1024,A=64*1024;function j(i,r){let e=i.split(`
|
|
3
3
|
`),t=r.split(`
|
|
4
4
|
`),n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;let o=e.length,c=t.length;for(;o>n&&c>n&&e[o-1]===t[c-1];)o--,c--;if(o===n&&c===n)return"";let h=e.slice(n,o),g=t.slice(n,c),a=R(h,g,2e3),p=[];if(a===null)p.push(`@@ old L${n+1}-L${o} \u2192 new L${n+1}-L${c} @@`,...h.map(u=>`- ${u}`),...g.map(u=>`+ ${u}`));else{let u=a.map((s,b)=>s.op==="="?-1:b).filter(s=>s>=0),d=0;for(;d<u.length;){let s=d;for(;s+1<u.length&&u[s+1]-u[s]<=3;)s++;let b=Math.max(u[d]-1,0),m=Math.min(u[s]+1,a.length-1),f=a.slice(b,m+1),x=n+(f[0].ai??0)+1,w=n+(f[0].bi??0)+1,U=f.filter(v=>v.op!=="+").length,H=f.filter(v=>v.op!=="-").length;p.push(`@@ old L${x}-L${x+Math.max(U-1,0)} \u2192 new L${w}-L${w+Math.max(H-1,0)} @@`);for(let v of f)p.push(v.op==="="?` ${v.line}`:`${v.op} ${v.line}`);d=s+1}}return p.join(`
|
|
5
5
|
`)}function R(i,r,e){let t=i.length,n=r.length,o=Math.min(t+n,e),c=new Map([[1,0]]),h=[],g=!1;for(let u=0;u<=o&&!g;u++){h.push(new Map(c));for(let d=-u;d<=u;d+=2){let s=d===-u||d!==u&&(c.get(d-1)??0)<(c.get(d+1)??0)?c.get(d+1)??0:(c.get(d-1)??0)+1,b=s-d;for(;s<t&&b<n&&i[s]===r[b];)s++,b++;if(c.set(d,s),s>=t&&b>=n){g=!0;break}}}if(!g)return null;let l=t,a=n,p=[];for(let u=h.length-1;u>0;u--){let d=h[u],s=l-a,b=s===-u||s!==u&&(d.get(s-1)??0)<(d.get(s+1)??0)?s+1:s-1,m=d.get(b)??0,f=m-b;for(;l>m&&a>f;)p.push({op:"=",line:i[l-1],ai:l-1,bi:a-1}),l--,a--;u>0&&(l===m?(p.push({op:"+",line:r[a-1],ai:l,bi:a-1}),a--):(p.push({op:"-",line:i[l-1],ai:l-1,bi:a}),l--))}for(;l>0&&a>0;)p.push({op:"=",line:i[l-1],ai:l-1,bi:a-1}),l--,a--;for(;l>0;)p.push({op:"-",line:i[l-1],ai:l-1,bi:0}),l--;for(;a>0;)p.push({op:"+",line:r[a-1],ai:0,bi:a-1}),a--;return p.reverse()}function F(i){let r=Buffer.byteLength(i,"utf8");if(r<=T+A)return{diff:i,truncated:!1};let e=Buffer.from(i,"utf8"),t=T;for(;t>0&&(e[t]&192)===128;)t--;let n=r-A;for(;n<r&&(e[n]&192)===128;)n++;let o=e.subarray(0,t).toString("utf8"),c=e.subarray(n).toString("utf8");return{diff:`${o}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as At,b as Ct,d as Ot,f as Tt,t as Mt,u as jt}from"./chunk-
|
|
2
|
+
import{a as At,b as Ct,d as Ot,f as Tt,t as Mt,u as jt}from"./chunk-7ZJWUWSN.js";import{b as It}from"./chunk-DHYGCHKB.js";import{b as _t,d as Rt}from"./chunk-436FZ4KG.js";import{k as yt}from"./chunk-VQZOKTJ2.js";import{a as ht,b as U}from"./chunk-KRRZCY7U.js";import{c as vt,h as wt}from"./chunk-QQI6N3FO.js";import{c as gt}from"./chunk-ZKPY3AXW.js";import{a as Wt}from"./chunk-HIUAUZNL.js";import{g as Pt,h as Re,j as Et}from"./chunk-DBTMKBHU.js";import{c as Dt,d as $t,e as Ut}from"./chunk-JGLADDRH.js";import{d as xt}from"./chunk-ZGQM6KWN.js";import{g as Nt}from"./chunk-6TNLITJO.js";import{f as bt}from"./chunk-KF4DKXSS.js";import{k as St}from"./chunk-I2VU2DTS.js";import{c as kt}from"./chunk-DPGOAFKF.js";import{B as ct,D as ut,Da as mt,Ha as P,W as _e,ba as pt,f as re,fa as ft,h as rt,i as st,n as k,o as dt,pa as ie,r as Se,t as z,u as se,v as oe,w as lt}from"./chunk-TLOYTGVT.js";import{a as ot,b as it,d as at}from"./chunk-GFLB2SHW.js";import{a as ke}from"./chunk-RQKMSNEU.js";import{a as ne}from"./chunk-I2MC6VVX.js";import{d as et}from"./chunk-2L3A5NKZ.js";import{oa as nt}from"./chunk-Z777GGHB.js";import{b as tt}from"./chunk-6NFOH4AC.js";import{c as Ze}from"./chunk-ZCRZFAOT.js";import{a as Ye}from"./chunk-QMOGBKJM.js";import{appendFileSync as tn,mkdirSync as nn,mkdtempSync as rn,rmSync as sn}from"fs";import{tmpdir as on}from"os";import{dirname as an,join as dn}from"path";import{MessageChannel as ln,Worker as cn}from"worker_threads";var Ft=["submit","submitAnswer","submitFreeText","submitAnswerWithText","toggleOption","confirmMulti","goWithRecommendations","ingestAttach","continueParked","completeSession","requestPause","finalizeForExit","note","ledger"],xn=[...Ft,"state","subscribe","multiSelection","canIngest","senderAlive","aliasOf","explainLines","ask","approveAdded"];function Lt(e,s){let n=s.state,o=s.view,i=new Set,l=[];e.on("message",m=>{if(m.type==="approved")return void l.shift()?.(m.go);if(m.type==="mirror"){n=m.state,o=m.view;for(let g of[...i])g()}});let f=(m,g)=>e.postMessage({type:"controller",member:m,args:g});return{...Object.fromEntries(Ft.map(m=>[m,(...g)=>{f(m,g)}])),get state(){return n},subscribe(m){return i.add(m),()=>i.delete(m)},goWithRecommendations(){return f("goWithRecommendations",[]),{picks:""}},async ingestAttach(m){f("ingestAttach",[m])},approveAdded(){return new Promise(m=>{l.push(m),f("approveAdded",[])})},multiSelection:m=>o.multi[m]??[],canIngest:()=>o.canIngest,senderAlive:()=>o.senderAlive,aliasOf:m=>o.aliases[m],explainLines:()=>null,ask:async()=>{throw new Error("a remote session's questions are asked on its session thread")}}}var Xt=e=>e.added===0?"":e.verb==="design"?`${e.added} added`:`${e.added} ${e.added===1?"use-case":"use-cases"} added`;function On(e,s,n){let o=e.length,i=s.title?`"${s.title}"`:nt(s.id);return[{text:` ${o} other ${o===1?"session is":"sessions are"} open on ${i} \u2014 you can still go ahead`},...Ie(e,n,4)]}function Ie(e,s,n){let o=" ".repeat(n),i=[];for(let l of e){let f=l.owner===null?"":(l.owner==="you"?"yours":"someone else").padEnd(15),j=[Mt[l.state]??l.state,jt(l.lastActivityAt,s),Xt(l)].filter(Boolean);i.push({text:`${o}${f}${j.join(" \xB7 ")}`,dim:!0}),l.owner!=="someone_else"&&(l.state==="ready_to_save"?i.push({text:`${o} save: kane-cli context sessions save ${l.sid}`,dim:!0}):l.state==="paused"&&i.push({text:`${o} resume: ${ie(l.verb==="design"||l.verb==="evolve"?"design":"extract",l.sid,!1)}`,dim:!0}))}return i}var ae=2e3,qt=2*ae,Yt=16;async function $n(e){let s=await xe(e);return s===null?null:s.length===0?P.nothingNewRead.map(n=>({text:n})):[{text:P.nothingNewInSession},...Ie(s,e.now,2)]}function Bt(e){if(e.length===0)return{type:"nothing_new",reason:"every_source_read",next:[{cmd:"kane-cli context ingest <files> --mode agent",why:"add more sources"}]};let s=e.filter(n=>n.owner!=="someone_else").flatMap(n=>n.state==="paused"?[{cmd:`kane-cli context extract --resume ${n.sid} --mode agent`,why:"resume your session"}]:n.state==="ready_to_save"?[{cmd:`kane-cli context sessions save ${n.sid} --yes --mode agent`,why:"save your session"}]:[]);return{type:"nothing_new",reason:"sources_in_a_session",open_sessions:e.map(({sid:n,owner:o,state:i,added:l})=>({sid:n,owner:o,state:i,added:l})),...s.length>0?{next:s}:{}}}async function xe(e){let s,n=new Promise(o=>{s=setTimeout(()=>{e.log?.(`the sources weren't read within ${e.budgetMs??qt} ms; the extract goes on`),o(null)},e.budgetMs??qt)});try{return await Promise.race([Zt(e),n])}catch(o){return e.log?.(`the sources weren't read: ${U(o)}; the extract goes on`),null}finally{clearTimeout(s)}}async function Zt(e){let[s,n]=await Promise.all([e.person.sources(e.projectId),e.person.listSessions(e.projectId)]),o=s.filter(l=>l.head!==null&&!l.sourceId.startsWith(Nt));if(o.length===0||o.some(l=>l.completeness?.sourceCid!==l.head))return null;let i=n.filter(l=>l.verb==="extract");return Rt(e.person,e.projectId,i,e.me,Math.min(Yt,Math.max(1,i.length)))}var Pe=class extends Error{constructor(){super("stopped while the file went up")}},de=class extends Error{constructor(n,o,i){super(n.message);this.refusal=n;this.exit=o;this.detail=i}};async function Sr(){let e=await bt(gt);return{auth:e,preflight:await kt(e)}}var un=500,le=5e3,Ht=6e4,pn=250;function fn(e){let s=e.now-e.pressedAt;if(s>=Ht)return"force";let n=e.saving>0?0:e.now-Math.max(e.quietSince,e.pressedAt);return n>=le?"force":{wait:Math.min(le-n,Ht-s)}}var mn=new Set([k.appendDraft,k.vectorsWrite,k.putBlob,k.chainWrite,k.chainWriteIfAbsent,k.chainRemove,k.filesWrite,k.statePut,k.acknowledge,k.registerChild,k.sideSave]);function gn(){return import.meta.url.endsWith(".ts")?new URL("./session-worker.boot.mjs",import.meta.url):new URL("./session-worker.js",import.meta.url)}function hn(e,s){if(e!=="ingested"||s===null||typeof s!="object")return{kind:e};let n=s,o={kind:e};for(let i of["source_id","status","behind","unread","cursor"])n[i]!==void 0&&(o[i]=n[i]);return o}function vn(e,s){let n=Ze(`remote-${e}`,s);return o=>{try{nn(an(n),{recursive:!0}),tn(n,`${new Date().toISOString()} ${o}
|
|
3
3
|
`)}catch{}}}var w=U;async function wn(e,s,n,o){let i,l;try{[i,l]=await Promise.all([pt(e.person,s,n),e.person.getSession(n)])}catch(f){return o(`the session that added nothing was not discarded: ${w(f)}`),!0}if(ft(i,(l.scope?.position??l.basePosition)>l.basePosition))return!0;try{await e.person.discard(n,e.claim.generation)}catch(f){o(`the session that added nothing was not discarded: ${w(f)}`)}return!1}function yn(e,s){return e===0&&s>0?1:e}async function _r(e){let s={trace:Dt(null,"")},n=1;Se({projectId:e.choice.projectId});try{return n=await bn(e,s),n}finally{s.trace.line("run_end",{code:n}),await lt()}}async function bn(e,s){let n=e.testing??{},o=null,i=new Set,l=r=>{if(r.type!=="session_paused"||e.verb!=="extract"||i.size<2)return r;let{resume:a,held_review:y,next:Y,...$}=r,Z=Ot(e.ingest?.map(ee=>ee.path??ee.file),A?.record??null),G=A?.record.sessionId??String(r.sid);return{...$,sid:G,...Tt(G,Z)}},f=r=>{let a=e.io?At(r,Date.now(),{sourceId:A?.record.sourceId??null,mode:e.mode}):null;a&&e.io.event(l(a)),e.onProgress(o!==null&&r.kind==="load"?{kind:"reading",file:o}:r)},j=e.start.kind==="resume"?e.start.sessionId:null,N=null,m=null,g=null,Ee=!1,ce=null,Ae=[],W=!1,ue=!1,pe=null,fe=!1,A=null,u=n.diagnostics??(()=>{}),C=(r,a={})=>{e.io?e.io.event({type:"error",code:r.code,message:r.message,...ct(r),...r.heldBy?{held_by:ut(r.heldBy)}:{},...r.notAdded?{not_added:r.notAdded}:{},...a}):e.onRefusal?e.onRefusal(r):yt(r)},Gt=r=>{if(!g){if(g=r,e.onEnding?.(),u(`the session's writer was stopped: ${U(r)}`),z(se(r),oe(r)),m?.close(P.stepRefused),r.code==="PROJECT_NOT_MARKED")Ee=!0;else if(r.code==="SESSION_ENDED"||r.code==="SCOPE_NOT_OPEN")pe=r;else{let a=r.code===rt?"resumed_elsewhere":r.code===st?"computer_slept":"connection_lost";W&&a==="connection_lost"?ue=!0:f({kind:"paused",reason:a,sid:A?.record.sessionId??j??""})}setTimeout(()=>{N?.terminate()},le).unref()}},E=!1,S=!1,me=0,ge=new Set,D=0,Ce=!1,J=!1,Oe=()=>{},Kt=new Promise(r=>Oe=r),Te=()=>{E=!0,N?.postMessage({type:"stop"})},Me=()=>{},je=new Promise(r=>Me=r),he=()=>{s.trace.line("run_forced",{}),S=!0,Me(),J&&Oe();let r=N;r?.postMessage({type:"kill"}),setTimeout(()=>{r?.terminate()},pn).unref()},ve=0,Ne=r=>{let a=()=>{if(S||Ce)return;let y=fn({now:Date.now(),pressedAt:r,saving:me+ge.size,quietSince:D});if(y==="force")return he();setTimeout(a,Math.max(50,y.wait)).unref()};setTimeout(a,le).unref()},We=()=>{if(ve+=1,s.trace.line("stop_asked",{by:"ctrl_c",press:ve}),J||ve>1)return he();Te(),Ne(Date.now())};e.onControls?.({pause:()=>{s.trace.line("stop_asked",{by:"pause"}),E=!0,Ne(Date.now())},force:he});let _=!1,De=null,$e=0;if(e.mode==="agent"&&e.io&&e.verb==="extract"&&e.start.kind==="new"&&!e.start.body.sourceId&&!e.run.force&&!e.ingest){let r=await xe({person:re({url:e.choice.latticeUrl,basicAuth:e.basicAuth,requestDeadlineMs:ae,...n.fetch?{fetch:n.fetch}:{}}),projectId:e.choice.projectId,me:vt(process.cwd()),now:Date.now(),log:n.diagnostics??ht("nothing-new")});if(r!==null)return e.io.event(Bt(r)),0}let F=e.io?await tt({event:r=>e.io.event(r)},e.check):await e.check();if(!F.preflight.ok){let{cause:r,final:a}=F.preflight;return u(`the controller's check refused the run: ${F.preflight.message}`),C(P.preflight(r??(a?"rejected":"unreachable")),{final:a}),2}if(S)return 130;let Vt=e.signals?process.listeners("SIGINT"):[],Q=!1,Ue=()=>{!e.signals||Q||(Q=!0,process.removeAllListeners("SIGINT"),process.on("SIGINT",We))},L=()=>{if(Q){Q=!1,process.removeListener("SIGINT",We);for(let r of Vt)process.on("SIGINT",r)}},q=null,X=[];if(e.ingest){Ue();try{for(let a of e.ingest){if(!a.fetch)continue;if(await Promise.race([a.fetch(f).then(()=>!0),je.then(()=>null)])===null||S||E)return L(),130}let r=[];for(let a of e.ingest){if(a.deferred){r.push(null);continue}let y=await Promise.race([a.upload(f,()=>E||S),je.then(()=>null)]);if(y===null||S)return L(),130;r.push(y)}q=r}catch(r){if(L(),r instanceof Pe)return 130;if(!(r instanceof de))throw r;return u(`the upload was refused: ${r.detail??r.message}`),C(r.refusal),r.exit}}try{A=await _t({url:e.choice.latticeUrl,basicAuth:e.basicAuth,start:e.start,...e.choice.projectName?{projectName:e.choice.projectName}:{},onProgress:f,onStopped:Gt,log:r=>u(r),testing:{...n.fetch?{fetch:n.fetch}:{},...n.leaseRenewMs!==void 0?{leaseRenewMs:n.leaseRenewMs}:{},...n.retryDeadlineMs!==void 0?{retryDeadlineMs:n.retryDeadlineMs}:{}}})}catch(r){L(),e.choice.onboarded&&r instanceof ne&&(r.code==="MARK_REFUSED"||r.code==="PROJECT_NOT_MARKED")&&wt(process.cwd());let a=await Rn(r,{latticeUrl:e.choice.latticeUrl,projectId:e.choice.projectId,basicAuth:e.basicAuth,sessionId:j,useCase:e.run.useCase,log:$=>u($),...n.fetch?{fetch:n.fetch}:{}}),{exit:y,...Y}=It(r,e.choice,j,e.verb==="reconcile"?void 0:{verb:e.verb,...(e.verb==="design"||e.verb==="evolve")&&e.run.useCase?{useCase:e.run.useCase}:{},...a!==void 0?{title:a}:{},...e.mode==="agent"?{agent:!0}:{}});return u(`the session could not be opened: ${w(r)}`),r instanceof ne&&z(se(r),oe(r)),C(Y),y}let c=A,p=c.record.sessionId;Se({latticeSessionId:p,projectId:e.choice.projectId});let Fe=e.start.kind==="resume"&&c.record.verb==="reconcile"&&c.record.sourceId!==null,B=Fe?_n({...c.record,sourceId:c.record.sourceId}):null;Fe&&e.io?.retag?.("reconcile");let H=e.start.kind==="resume"&&c.record.verb==="evolve";H&&e.io?.retag?.("evolve");let Le=H?Sn(c.log.since(0)):void 0;if(H)for(let[r,a]of _e(c.log.since(0)))e.onRepinned?.(r,a);n.diagnostics||(u=vn(e.verb,p)),s.trace=$t(e.traceVerb??e.verb,ke()),s.trace.path&&Ut(p,s.trace.path),s.trace.line("run_open",{sid:p,verb:e.verb,start:e.start.kind,mode:e.mode??"interactive",cli_version:Ye,env:et(),project_id:e.choice.projectId});{let r=u;u=a=>{r(a),s.trace.line("diag",{line:a})}}let qe=rn(dn(on(),"kane-remote-session-")),we=[],Be=!1;Ue();let He=async()=>{if(!(!e.ingest||q===null))for(let[r,a]of e.ingest.entries())X[r]||(X[r]=!0,await a.cancel(p).catch(y=>u(`the upload's cancel was not posted: ${w(y)}`)))},ye=()=>(e.start.kind==="new"?c.person.discard(p,c.claim.generation):c.person.setStatus(p,"paused")).then(()=>{},r=>u(`the unstarted session was not put away: ${w(r)}`)),Ge=async()=>(await c.person.setStatus(p,"paused").catch(r=>u(`the pause was not recorded: ${w(r)}`)),f({kind:"not_ended",sid:p,project:e.choice.projectName}),1),Ke=async()=>{let r=await c.person.getSession(p).then(y=>y.scope?.state,()=>null);return f({kind:"ended",reason:r==="finalized"?"saved_elsewhere":r==="discarded"?"discarded_elsewhere":"ended_elsewhere",sid:p}),0},zt=async()=>{let r=await c.client.sessionState().catch(a=>(u(`the session's state couldn't be read: ${w(a)}`),null));return r===null||typeof r.completed_at!="string"?null:r.ended?.ended==="failed"?"failed":"complete"};try{if(S)return await He(),await ye(),130;try{e.onOpened?.(c.record,d=>u(d))}catch(d){u(`the folder's project link could not be updated: ${w(d)}`)}let r=e.start.kind==="resume"?await zt():null;if(r!==null){J=!0,W=!0;try{await c.state.end(p,{state:r,panel:null,error:null,checkIn:!1,phase:null,child:null,pausing:!1})}catch(d){return u(`the ending was not recorded: ${w(d)}`),pe?await Ke():g&&!ue?3:await Ge()}return r==="failed"?(C(P.sessionFailed(p)),2):(f({kind:"finished_before",sid:p}),0)}let a=0,y=async(d,b)=>{let T=mn.has(d),v=String(b?.childId??"");d===k.chainWrite&&/^(delta|full)-\d+\.json$/.test(String(b?.name))&&ge.add(v),T&&(me+=1,D=Date.now());let R=d===k.appendDraft,K;R&&(a+=1,e.onWrites?.(a),K=setTimeout(()=>f({kind:"write",pending:a}),300));try{return await c.storeCalls(d,b)}catch(I){throw u(`${d} was refused: ${w(I)}`),I instanceof ot?I:(z(se(I),oe(I)),I instanceof dt&&!g&&(fe=!0,e.onEnding?.()),it(new Error(P.stepRefused),I))}finally{d===k.acknowledge&&ge.delete(v),T&&(me-=1,D=Date.now()),R&&(clearTimeout(K),a-=1,e.onWrites?.(a),a===0&&f({kind:"write",pending:0}))}},{port1:Y,port2:$}=new ln,Z=new SharedArrayBuffer(4);m=at({port:Y,signal:Z},y);let G=H||e.verb==="evolve"?await kn(re({url:e.choice.latticeUrl,basicAuth:e.basicAuth,requestDeadlineMs:ae,...n.fetch?{fetch:n.fetch}:{}}),e.choice.projectId,u):void 0,ee={verb:B?"reconcile":H?"evolve":e.verb,traceVerb:e.traceVerb??e.verb,mode:e.mode,sessionId:p,fresh:e.start.kind==="new",generation:c.claim.generation,projectDir:process.cwd(),projectName:e.choice.projectName,projectId:e.choice.projectId,sideDir:qe,bridge:{port:$,signal:Z},lastEventSeq:c.log.lastSeq(),run:e.start.kind==="resume"?{...e.run,resume:p,...Le!==void 0?{kept:Le,...c.record.useCase?{useCase:c.record.useCase}:{}}:{}}:e.run,...e.start.kind==="resume"&&e.verb==="extract"?{landed:[...new Set((c.record.uploads??[]).filter(d=>d.outcome!=="refused").map(d=>d.sourceId))]}:{},auth:F.auth,preflight:F.preflight,supportId:ke(),...n.agent||n.remoteDeps||n.sourcePlugins||n.refuseCard?{testing:{...n.agent?{agent:n.agent}:{},...n.remoteDeps?{remoteDeps:n.remoteDeps}:{},...n.sourcePlugins?{sourcePlugins:n.sourcePlugins}:{},...n.refuseCard?{refuseCard:n.refuseCard}:{}}}:{},...e.ingest&&q?{ingest:e.ingest.map((d,b)=>({bytes:new Uint8Array(d.bytes),file:d.file,sourceId:d.sourceId,fingerprint:q[b]?.fingerprint??"",then:d.then,...d.remote?{remote:d.remote}:{},...d.plugin?{plugin:d.plugin}:{}}))}:{},...B?{review:B}:{},...G?{origins:G}:{}},Ve=()=>e.io?.event({type:"error",message:P.runStopped(e.verb)}),O=await new Promise(d=>{let b=!1,T=t=>{b||(b=!0,d(t))},v;try{v=new cn(n.workerUrl??gn(),{workerData:ee,transferList:[$]})}catch(t){return u(`the session thread could not start: ${w(t)}`),Ve(),T(1)}N=v,E&&v.postMessage({type:"stop"});let R=e.ingest?.[0],K=R?.remote?Pt({...R.remote,address:R.remote.origin.url},Re(R.remote.provider,R.remote.origin.url,R.sourceId)):void 0,I=B??(e.verb==="reconcile"&&R?{sourceId:R.sourceId,file:R.path??R.file,...K?{page:K}:{}}:null);if(e.onReview&&I){let t=Wt(v),x={source:I.sourceId,file:I.file,...I.page?{page:I.page}:{}};e.onReview(t,x);let h=!1;v.on("message",V=>{if(h||V.type!=="reviewMirror"||!V.review.named)return;h=!0;let M=xt(x,V.review.named);M&&e.onReview(t,M)})}e.ingest&&(o=e.ingest[0].file,f({kind:"reading",file:o})),n.terminateOnHold?.then(()=>v.terminate());let Qe=!0,Xe=!1;v.on("message",t=>{if(t.type==="mirror"&&E&&t.state.nestedAgent===!0&&(D=Date.now()),t.type==="mirror"&&!Xe)Xe=!0,e.onController?.(Lt(v,{state:t.state,view:t.view}));else if(t.type==="event"){if(E&&t.event.child_id!==void 0&&(D=Date.now()),(fe||g)&&t.event.type==="error")return u(`after the run paused: ${String(t.event.message??"")}`);if(e.start.kind==="resume"&&t.event.type==="error"&&mt.has(String(t.event.code??"")))return ce=String(t.event.code),u(`the resume was refused: ${String(t.event.message??"")}`);if(t.event.type==="held"&&e.onHeld?.(Number(t.event.count)||0),t.event.type==="session_complete"&&e.mode==="agent"||(t.event.type==="source_start"&&i.add(String(t.event.source_id)),t.event.type==="child_start"?we.push({child:t.event.child,at:Date.now()}):t.event.type==="child_end"?we.pop():t.event.type==="session_paused"&&t.event.child_id===void 0&&(Be=!0),t.event.type==="run_start"&&t.event.child_id!==void 0))return;e.io?.event(l(t.event.type==="run_start"?{type:"run_start",session:p}:t.event.type==="session_paused"&&t.event.held!==void 0?{...t.event,reason:"held_back"}:t.event.type==="held"&&t.event.reason==="embed_degraded"?{...t.event,reason:"duplicate_check_reduced"}:t.event.type==="held"&&t.event.reason==="reconcile"?{...t.event,reason:"review"}:t.event)),(Qe&&n.stopAfterFirstEvent||!E&&t.event.type===n.stopAtEvent)&&Te(),Qe=!1}else if(t.type==="summary")e.onSummary?.(t.facts);else if(t.type==="notUpdated")e.onNotUpdated?.(t.useCases,t.titles,t.stillStale);else if(t.type==="unstarted")_=!0;else if(t.type==="needed")Ae=t.needed.noStartPage.map(({test:x})=>({test:x})),e.onNeeded?.({needed:t.needed,tests:t.tests});else if(t.type==="preMount")(e.onPreMount?e.onPreMount(t.question):Promise.resolve({go:!1,code:2})).then(x=>{!x.go&&t.question.kind!=="evolve-entry"&&t.question.kind!=="lines"&&(_=!0),v.postMessage({type:"preMountAnswer",answer:x})});else if(t.type==="ingestFetched"){let x=e.ingest[t.index];x.bytes=Buffer.from(t.bytes),x.upload(f,()=>E||S).then(h=>{q[t.index]=h,v.postMessage({type:"ingestUploaded",index:t.index,ok:!0,fingerprint:h.fingerprint})},h=>{h instanceof de?(u(`the upload was refused: ${h.detail??h.message}`),C(h.refusal),De=h.exit):u(`the fetched item's upload failed: ${w(h)}`),X[t.index]=!0,_=!0,v.postMessage({type:"ingestUploaded",index:t.index,ok:!1})})}else if(t.type==="ingestOutcome"){let{type:x,index:h,...V}=t;X[h]=!0,e.ingest[h].result(V,p,u).then(M=>{M?e.ingest[h+1]&&(o=e.ingest[h+1].file,f({kind:"reading",file:o})):(_=!0,o=null),v.postMessage({type:"ingestGo",index:h,go:M})},M=>{u(`the upload's result was not posted: ${w(M)}`),_=!0,v.postMessage({type:"ingestGo",index:h,go:!1})})}else if(t.type==="ingested")o=null,e.verb==="reconcile"&&t.status==="unchanged"&&!t.behind&&!t.unread&&(_=!0),e.ingest?.[t.index]?.onAdded?.(t.status,p,{...t.duplicateOf?{duplicateOf:t.duplicateOf}:{},...t.attachments?{attachments:t.attachments}:{},...t.behind?{behind:t.behind}:{},...t.unread?{unread:!0}:{}});else if(t.type==="ingestUnwritten")o=null,_=!0,e.ingest?.[t.index]?.onUnwritten?.(p);else if(t.type==="sessionEvent"){E&&t.payload.child_id!==void 0&&(D=Date.now()),c.log.append(t.kind,t.payload),s.trace.line("session_event",hn(t.kind,t.payload));for(let[x,h]of _e([t]))e.onRepinned?.(x,h)}else t.type==="itemsFailed"?$e+=t.count:t.type==="out"?e.io?.out(t.line):t.type==="log"?u(t.line):t.type==="done"&&T(De??t.code)}),v.on("error",t=>{u(`the session thread failed: ${t instanceof Error&&t.stack?t.stack:w(t)}`),z("thread_crash"),Ve(),T(1)}),v.on("exit",()=>{s.trace.line("thread_exit",{stopped:g!==null,forced:S}),T(g?3:S?130:1)})});J=!0;let ze=e.ingest?.[0]?.then==="pause";W=O===0&&!_&&!ze;let te=O!==0||_,Jt=fe&&!g&&!S&&O!==0&&!_,be=!1,Qt=async()=>{await He(),_?(await c.log.flush().catch(()=>{}),await ye()):O!==0&&!g&&await c.person.setStatus(p,"paused").catch(d=>u(`the pause was not recorded: ${w(d)}`)),await c.log.flush(),!g&&O===0&&!_&&(ze?await c.person.setStatus(p,"paused"):await c.state.end(p,{state:"complete",panel:null,error:null,checkIn:!1,phase:null,child:null,pausing:!1}),te=!0),be=!0};await Promise.race([Qt().catch(d=>u(`the run's ending was not recorded: ${w(d)}`)),Kt]);let Je=!0;if(e.mode==="agent"&&be&&W&&te&&!g&&!S&&(Je=await wn(c,e.choice.projectId,p,u)),S&&!be&&!g){let d=_?ye():c.person.setStatus(p,"paused").catch(b=>u(`the pause was not recorded: ${w(b)}`));await Promise.race([d,new Promise(b=>setTimeout(b,un).unref())])}if(Ee)return C(P.assuranceOff(e.choice.projectName)),2;if(ce!==null)return C(P.resumeUnreadable(ce,p,e.verb==="design"?"design":"extract",c.record.useCase)),2;if(pe)return await Ke();if(S){if(e.mode!=="agent"||g||_)return 130;if(Be)return 3;for(let b of we.splice(0).reverse())e.io?.event({type:"child_end",child:b.child,ok:!1,dur_s:Math.max(1,Math.round((Date.now()-b.at)/1e3)),exit_code:3});let d=ie(e.verb==="design"&&!B?"design":"extract",p,!0);return e.io?.event(l({type:"session_paused",sid:p,...c.record.sourceId?{source_id:c.record.sourceId}:{},mode:"agent",resume:d,expires_at:null,pending_questions:[],next:[{cmd:d,why:"resume"}]})),3}return ue||W&&!te&&!g?await Ge():g?3:Jt?(f({kind:"paused",reason:"not_accepted",sid:p}),3):te?(e.mode==="agent"&&W&&O===0&&e.io?.event(Ct(p,Je,{sourceId:A?.record.sourceId??null,noStartPage:Ae})),yn(O,$e)):(f({kind:"paused",reason:"connection_lost",sid:p}),3)}finally{Ce=!0,L(),c.release(),m?.close("the session ended"),await N?.terminate(),sn(qe,{recursive:!0,force:!0})}}async function kn(e,s,n){try{return Object.fromEntries((await e.sources(s)).map(o=>[o.sourceId,o.origin?.url??null]))}catch(o){return n(`the project's sources were not read: ${w(o)}`),{}}}function Sn(e){let s=e.filter(i=>i.kind==="evolve_answers").at(-1)?.payload,n=s?.request;if(!n||!Array.isArray(s?.answers))return"unread";let o=s.answers.flatMap(i=>typeof i.id=="string"&&(i.choice==="proceed"||i.choice==="decline")?[{id:i.id,choice:i.choice}]:[]);return{request:{...typeof n.ref=="string"?{ref:n.ref}:{},fromStale:n.fromStale===!0,...typeof n.because=="string"?{because:n.because}:{}},answers:o}}function _n(e){let s=[...e.uploads??[]].reverse().find(n=>n.sourceId===e.sourceId&&n.outcome!=="refused"&&(n.filename||n.originUrl));if(s&&!s.filename&&s.originUrl){let n=s.originUrl,o=St(n)?.name??"web";return{sourceId:e.sourceId,file:n,page:Et(o,n,void 0,Re(o,n,e.sourceId))}}return{sourceId:e.sourceId,file:s?.filename??"<file>"}}async function Rn(e,s){if(!(e instanceof ne)||e.code!=="SESSION_CLASH")return;let n=e.extra.heldBy;if(n?.verb!=="design"&&n?.verb!=="evolve")return;let o=re({url:s.latticeUrl,basicAuth:s.basicAuth,...s.fetch?{fetch:s.fetch}:{}});try{if(s.sessionId!==null)return(await o.getSession(s.sessionId)).useCaseTitle??null;if(!s.useCase)return null;let i=(await o.mainNode(s.projectId,s.useCase)).content.title;return typeof i=="string"&&i!==""?i:null}catch(i){return s.log(`the use case's title couldn't be read for the lock's words, so they name its id: ${U(i)}`),null}}export{On as a,ae as b,$n as c,Pe as d,de as e,Sr as f,fn as g,mn as h,hn as i,yn as j,_r as k};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as w,b as C}from"./chunk-KRRZCY7U.js";import{a as j,b as I,e as x}from"./chunk-QQI6N3FO.js";import{e as y}from"./chunk-ZKPY3AXW.js";import{i as k}from"./chunk-XMPTFXPW.js";import{o as g}from"./chunk-7V34ZMMS.js";import{Ha as i,f as h}from"./chunk-TLOYTGVT.js";import{a as l}from"./chunk-I2MC6VVX.js";import{c as m}from"./chunk-GGV336P5.js";import{readFileSync as A}from"fs";import{basename as T,dirname as p,join as N}from"path";var S=5e3,O=w("assurance-case");function _(e,t={}){let s=p(e);if(T(s)!=="tests"||T(p(s))!==".testmuai")return null;let n=p(p(s)),a;try{a=g(A(e,"utf8"))}catch{return null}if(!a?.id)return null;let r=(c,u,d)=>({root:n,latticeUrl:c,projectId:u,projectName:d,test:a.id,base:a.base??null});if(t.grid){let c=x(N(n,j));return c===null?null:r("",c.projectId,c.projectName)}let o=I(n,t.address??m());return o.kind==="remote"?r(o.latticeUrl,o.projectId,o.projectName):null}function K(e,t={}){let s={};for(let n of e){let a=_(n,t);a?.base&&(s[n]={test:a.test,definitionId:a.base})}return s}async function V(e){let t=_(e.testFile,{address:e.address,grid:e.gridCase!==void 0});if(t===null)return{kind:"unlinked"};let s=t.base===null?null:{test:t.test,definitionId:t.base},n=e.metaCaseId===null;if(e.gridCase)return R(t,s,e.metaCaseId,{caseId:e.gridCase.caseId,internalId:e.gridCase.tc,canAttach:!0});if(s===null)return{kind:"stop",stop:{why:"not_in_project",useCase:null},projectName:t.projectName};let a;try{let r=e.auth??await y(),o=e.lookup??((c,u,d)=>h({url:t.latticeUrl,basicAuth:r}).testCase(c,u,d));a=await L(o(t.projectId,t.test,s.definitionId),e.budgetMs??S)}catch(r){return r instanceof l&&r.code==="NO_CONTEXT"?{kind:"stop",stop:{why:"no_work"},projectName:t.projectName}:(O(`the test case of ${t.test} wasn't checked: ${r instanceof f?r.message:C(r)}`),n?{kind:"stop",stop:{why:"lookup",refusal:v(r,t.projectName)},projectName:t.projectName}:{kind:"run",projectId:t.projectId,tc:null,stamp:s})}return"refused"in a?{kind:"stop",stop:E(a.refused),projectName:t.projectName}:R(t,s,e.metaCaseId,a.linked)}function R(e,t,s,n){return s===n.caseId?{kind:"run",projectId:e.projectId,tc:n.internalId,stamp:t}:n.canAttach?{kind:"attach",projectId:e.projectId,caseId:n.caseId,tc:n.internalId,stamp:t,rehome:s!==null}:{kind:"stop",stop:{why:"outdated"},projectName:e.projectName}}function X(e,t){switch(e.why){case"missing":return{refusal:i.testCaseMissing(e.session),exit:2};case"gone":return{refusal:i.testCaseGone(e.session),exit:2};case"archived":return{refusal:i.testCaseArchived(),exit:2};case"not_in_project":return{refusal:i.testNotInProject(t,e.useCase),exit:2};case"no_work":return{refusal:i.testProjectHasNoWork(t),exit:2};case"outdated":return{refusal:i.testManagerOutdated(),exit:1};case"lookup":return{refusal:e.refusal,exit:2}}}function b(e){switch(e.why){case"missing":return e.session?{reason:"it isn't in Test Manager yet; save the session that designed it:",cmd:`kane-cli context sessions save ${e.session}`}:{reason:"it isn't in Test Manager yet; find its session, then save it:",cmd:"kane-cli context sessions"};case"gone":return e.session?{reason:"its test case was deleted or moved; saving its session makes a new one:",cmd:`kane-cli context sessions save ${e.session}`}:{reason:"its test case was deleted or moved; find its session, then save it:",cmd:"kane-cli context sessions"};case"archived":return{reason:"its test case is archived in Test Manager; restore it there"};case"not_in_project":return{reason:"the session that designed it can't be saved anymore; design it again:",cmd:`kane-cli design tests --use-case ${e.useCase??"<use-case>"}`}}}function q(e){if(e.some(r=>r.stop.why==="outdated"))return{pair:i.dispatchTestManagerOutdated()};let t=e.find(r=>r.stop.why==="lookup")?.stop;if(t?.why==="lookup")return{pair:t.refusal};let s=e.find(r=>r.stop.why==="no_work");if(s)return{pair:i.dispatchProjectHasNoWork(s.projectName)};let n=[{text:i.dispatchStopped(e.length)}],a=new Set;for(let{relPath:r,stop:o}of e){if(o.why==="outdated"||o.why==="lookup"||o.why==="no_work")continue;let{reason:c,cmd:u}=b(o),d=u!==void 0&&a.has(u);n.push({text:` ${r}`,dim:!0},{text:` ${d?`${c.replace(/:$/,"")}, as above`:c}`,dim:!0}),u&&!d&&(a.add(u),n.push({text:` ${u}`}))}return n.push({text:i.dispatchNext(e.length)}),{lines:n}}function z(e){return{refusal:e.reason==="outdated"?i.testManagerMadeItsOwn():i.testCaseAttachFailed(),exit:1}}function E(e){switch(e.code){case"NO_CASE":return{why:"missing",session:e.session};case"CASE_BROKEN":return{why:"gone",session:e.session};case"CASE_ARCHIVED":return{why:"archived",internalId:e.internalId};case"TEST_FILE_STALE":return{why:"not_in_project",useCase:e.useCase}}}function v(e,t){return e instanceof k?{code:e.code,message:e.message,...e.remedy?{remedy:e.remedy}:{}}:e instanceof l&&e.status===401?i.credentialsRejected():e instanceof l&&e.code==="NOT_FOUND"?i.noAccess(t):e instanceof l&&e.code==="PROJECT_NOT_MARKED"?i.assuranceOff(t):i.noConnection()}var f=class extends Error{};async function L(e,t){let s,n=new Promise((a,r)=>{s=setTimeout(()=>r(new f(`Lattice took over ${t} ms`)),t)});try{return await Promise.race([e,n])}finally{clearTimeout(s)}}export{S as a,_ as b,K as c,V as d,X as e,q as f,z as g,f as h,L as i};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{h as N}from"./chunk-
|
|
2
|
+
import{h as N}from"./chunk-SB6P5EQH.js";import{C as k,M as C,O as R,R as v,sa as G,sb as D,ub as I,v as b}from"./chunk-Z777GGHB.js";import{f as w,g as _}from"./chunk-KU3YHPWZ.js";var l=(e,t,i=new Set)=>{let n=e.nameOf.get(t);if(n!==void 0)return n;if(i.has(t))return t;i.add(t);for(let[o,s]of e.superseded){if(s!==t||G(o,t,c=>e.nodeLabel.get(c)))continue;let u=l(e,o,i);if(u!==o)return u}return t};function F(e,t){let i=e.stale(t);if(i==="fresh")return;if(i==="orphaned")return"orphaned \u2014 no live source evidences this item";let n=[],o=new Map;for(let s of e.derivesInto(t))o.set(String(s.props.source_id),s);for(let[s,u]of o){let c=e.heads.get(s);if(c==null)continue;let g=D(e,t,s);if(g!==null){g.stale&&n.push(`DERIVES pin ${s} broke \u2014 ${I(s,g)}`);continue}if(c===u.props.source_cid)continue;let S=e.convChains.get(s)?.chain;S&&S.includes(String(u.props.source_cid))||n.push(`DERIVES pin ${s}@${String(u.props.source_cid).slice(0,19)} broke \u2014 the source head moved`)}for(let s of e.edgesFrom(t)){if(s.type===_.DERIVES||!e.superseded.has(s.dst))continue;let u=e.tipOf(s.dst);if(e.superseded.has(u)){n.push(`${s.type} pin \u2192 ${l(e,s.dst)} \u2014 target retired`);continue}let c=P(e,s.dst,u);n.push(c.length>0?`${l(e,s.dst)} updated: ${c.map(g=>g.field).join(", ")}`:`${s.type} pin \u2192 ${l(e,s.dst)} \u2014 target superseded`)}return n.length>0?n.join("; "):"stale \u2014 a pinned dependency moved"}function P(e,t,i){let n=e.getNode(t)?.content??{},o=e.getNode(i)?.content??{},s=c=>c===void 0?"":Array.isArray(c)?c.map(String).join(" \xB7 "):typeof c=="object"?JSON.stringify(c):String(c),u=[];for(let c of[...new Set([...Object.keys(n),...Object.keys(o)])].sort())JSON.stringify(n[c])!==JSON.stringify(o[c])&&u.push({field:c,old:s(n[c]),new:s(o[c])});return u}function L(e,t){let i=[];for(let{cid:n}of e.byLabel(w.SCENARIO))e.superseded.has(n)||e.edgesFrom(n).some(o=>o.type===_.BELONGS_TO&&e.tipOf(o.dst)===t)&&i.push(n);return i}function j(e,t){let i=[],n=[],o=[],s=[],u=[],c=[],g=L(e,t),S=new Set(g),p=(d,f)=>{let r=F(e,f);return r===void 0?d:{...d,stale:!0,stale_reason:r}};for(let d of g){let f=e.getNode(d)?.content??{};i.push(p({ref:l(e,d),title:String(f.title??""),case_type:String(f.case_type??""),intent:String(f.intent??"")},d));for(let r of e.edgesInto(d)){if(r.type!==_.AUTOMATES||e.superseded.has(r.src))continue;let a=e.getNode(r.src)?.content??{},y=e.edgesFrom(r.src).filter(m=>m.type===_.VERIFIES&&!e.superseded.has(m.dst)).map(m=>l(e,m.dst));n.push(p({ref:l(e,r.src),title:String(a.title??""),automates:l(e,d),check:a.check,verifies:y,...typeof a.target=="string"?{target:a.target}:{},...typeof a.app=="string"?{app:a.app}:{}},r.src)),u.push(r.src)}for(let r of e.edgesFrom(d))r.type!==_.EXERCISES||e.superseded.has(r.dst)||s.push({scenario:l(e,d),ac:l(e,r.dst)})}for(let{cid:d}of e.byLabel(w.AC)){if(e.superseded.has(d))continue;let f=e.edgesFrom(d).find(x=>x.type===_.SCOPED_TO);if(!f)continue;let r=e.tipOf(f.dst),a=e.superseded.has(r)&&e.nodeLabel.get(r)===w.SCENARIO&&e.edgesFrom(r).some(x=>x.type===_.BELONGS_TO&&e.tipOf(x.dst)===t);if(!(r===t||S.has(r)||a))continue;let m=e.getNode(d)?.content??{},O={ref:l(e,d),text:String(m.text??""),kind:String(m.kind??""),scope:r===t?"use-case":l(e,r)};o.push(a?{...O,stale:!0,stale_reason:`orphaned: its scenario ${l(e,r)} was retired \u2014 re-scope it (scoped_to_repoints) to a live scenario or the use case if it still holds; a redesign retires it with its scenario otherwise`}:p(O,d)),c.push(d)}let E=[],h=new Set;for(let d of[t,...g,...u,...c])for(let f of e.retractedEdgesTouching(d))h.has(f.ecid)||(h.add(f.ecid),E.push({type:f.type,src:l(e,f.src),dst:l(e,f.dst),at:f.retraction.at,...f.retraction.reason?{reason:f.retraction.reason}:{}}));return{scenarios:i,tests:n,acs:o,exercises:s,retracted_edges:E}}function $(e,t,i){let n=b(e,t,i);return n===null?null:n.toString("utf8")}function A(e,t){let i=t.split(`
|
|
3
3
|
`).map(o=>o.replace(/^\d+\| /,"")),n=[];for(let o of e.split(`
|
|
4
4
|
`)){let s=o.trim();if(s.length===0)continue;let u=i.find(c=>c.includes(s));u!==void 0&&!n.includes(u.trim())&&n.push(u.trim())}return n.length>0?n.join(`
|
|
5
5
|
`):{removed:!0}}function T(e,t,i,n,o){let s=o?{requested:o}:{};if(n!==void 0&&n.trim().length>0)return{kind:"user-directive",text:n.trim(),...s};let u=[i,...j(t,i).acs.map(p=>t.resolve(p.ref)?.tip??"")].filter(Boolean),c=[],g=new Set;for(let p of u){let E=new Map;for(let d of R(t,p))for(let f of t.derivesInto(d))E.set(String(f.props.source_id),f);let h=(d,f,r)=>{let a=String(f.props.anchor),y=`${d}\0${a}`;if(g.has(y)||a==="img#whole")return;g.add(y);let m=$(e,t,String(f.props.source_cid)),O=m===null?null:k(m,a);if(O===null)return;let x=$(e,t,r);c.push({source_id:d,anchor:a,old_anchor_text:O,new_anchor_text:x===null?{removed:!0}:A(O,x)})};for(let[d,f]of E){let r=t.heads.get(d);if(r==null)continue;let a=D(t,p,d);if(a!==null){for(let y of a.failed)y.props.source_cid!==r&&h(d,y,r);continue}r!==f.props.source_cid&&h(d,f,r)}}let S;for(let[p,E]of t.superseded){if(E!==i||t.nodeLabel.get(p)!==w.USECASE)continue;let h=P(t,p,i);h.length>0&&(S=h);break}return{kind:"source-change",changes:c,...S?{uc_updated:S}:{},...s}}function U(e,t,i,n,o){let s=j(t,i);if(s.scenarios.length===0&&s.tests.length===0&&s.acs.length===0)return;let u=T(e,t,i,n,o);if(!(!o&&u.kind==="source-change"&&u.changes.length===0&&!u.uc_updated))return{prior_design:s,change_delta:u}}function K(e,t){if(!t.force||t.resume||!t.useCase||t.priorDesign!==void 0||t.changeDelta!==void 0)return t;let i=C(e),n=i.resolve(v(i,t.useCase));if(!n||i.nodeLabel.get(n.tip)!==w.USECASE||N(i,n.tip)===null)return t;let o=U(e,i,n.tip);return o?{...t,priorDesign:o.prior_design,changeDelta:o.change_delta}:t}export{F as a,j as b,U as c,K as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{g as f}from"./chunk-47WQBG5I.js";import{a as l}from"./chunk-KM3YCIDV.js";import{i as u}from"./chunk-
|
|
2
|
+
import{g as f}from"./chunk-47WQBG5I.js";import{a as l}from"./chunk-KM3YCIDV.js";import{i as u}from"./chunk-G2KTWFMU.js";import{a as c}from"./chunk-JGLADDRH.js";import{f as s}from"./chunk-KF4DKXSS.js";import{c as p}from"./chunk-DPGOAFKF.js";import{b as i}from"./chunk-K3OSK6PB.js";async function E(n,o,e,t){let m=async()=>{let r=t.auth??{...await s(i),...t.telemetry?.spawnEnv()??{}};return u(e.sid!==void 0&&n.resume===void 0?{...n,sessionId:e.sid}:n,{store:o.store,pendingReconcilePlan:a=>o.dir===null?null:f(o.dir,a),agent:t.agent,tracePath:c,credentials:i,onIngestRefusal:l,preflightTurn:t.preflightTurn??(()=>p(r)),ask:async()=>[],review:async a=>new Map(a.map(d=>[d.temp_ref,{resolution:"skipped"}])),confirmStale:async()=>!1,out:e.out,...e.note?{note:e.note}:{},emit:e.emit,progress:e.progress,isTTY:!1,auth:r,...t.telemetry?{telemetry:t.telemetry}:{},...t.probe?{probe:t.probe}:{},...t.matchUnreviewed?{matchUnreviewed:!0}:{},...e.onSummary?{onSummary:e.onSummary}:{}})};if(!e.channel)return m();let{runWithChannel:g}=await import("./run-channel-63SVP5OI.js");return g({event:r=>e.emit(r)},m)}export{E as a};
|
|
@@ -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-KDR662D2.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-Z777GGHB.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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as A,d as C}from"./chunk-
|
|
2
|
+
import{c as A,d as C}from"./chunk-4SJAOAYY.js";import{e as x}from"./chunk-5D7ENQTQ.js";import{b,e as R}from"./chunk-YGMQXS2J.js";import{f as D,h as S,l as E}from"./chunk-MJKRJGER.js";import{b as I,c as _,g as N,h as k}from"./chunk-Y6Y6RAY4.js";import{b as h}from"./chunk-PQXYHI5W.js";import{a as v}from"./chunk-GGV336P5.js";import{h as y}from"./chunk-A7RJQJNT.js";import{mkdirSync as H,writeFileSync as q}from"fs";import{join as z}from"path";function P(e,t=process.env){return t.KANE_MOBILE_APP_BASE_URL||v(e).mobileAppBaseUrl}var J="device-config.json",$=new WeakMap;function G(e,t){let r=$.get(e)??new Map;$.set(e,r);let o=JSON.stringify([t.path,t.type,t.env,t.orgId]),i=r.get(o);if(i)return i;let n=e(t).finally(()=>r.delete(o));return r.set(o,n),n}function T(e){return e.startsWith("lt://")?e:`lt://${e}`}async function X(e,t){let r=await E(e.env,e.platform,{...e.selection.deviceName?{deviceName:e.selection.deviceName.value}:{},...e.selection.osVersion?{osVersion:e.selection.osVersion.value}:{}},t);if(r.kind==="unchecked"&&e.onWarning?.(`${r.reason} \u2014 the run continues, but the device and OS version are not checked before the session is requested.`),r.kind==="refused")throw new Error(r.detail)}async function Y(e,t){let r=e.selection.app.value.trim();if(h(r))return T(r);let o=e.credentials;if(!o?.orgId)throw new Error(`${r} has to be uploaded before it can run on a real device, but your account's org id was not found. Run kane-cli login, or set app: to an app ID from \`kane-cli apps list --target ${e.platform}\`.`);let i=await G(t,{path:r,type:e.platform,env:e.env,orgId:o.orgId,userId:o.userId??"",auth:{username:o.username,accessKey:o.accessKey,orgId:o.orgId},baseUrl:P(e.env),...e.onProgress?{onProgress:e.onProgress}:{}});if(b(i))throw new Error(`could not upload ${r} for this real-device run: ${i.reason}`);return T(i.appUrl??i.appId)}async function U(e,t={}){if(!e.credentials)throw new Error("a real-device run needs your TestMu AI username and access key, and none were found. Run kane-cli login, or pass --username and --access-key.");await X(e,t.fetchCatalog??S);let r=await Y(e,t.upload??R),{deviceName:o,osVersion:i}=e.selection,n={platform_name:e.platform,device_name:o?.value??D,...i?{platform_version:i.value}:{},app:r,...e.testName?{test_name:e.testName}:{},...e.tcId?{"tms.tc_id":e.tcId}:{},...e.capabilities},s=z(e.outDir,J);return H(e.outDir,{recursive:!0}),q(s,`${JSON.stringify(n,null,2)}
|
|
3
3
|
`),{device:{platform:e.platform,target:e.platform,device_config_path:s},...o?{deviceName:o.value}:{},...i?{osVersion:i.value}:{},app:r}}import{createServer as Q}from"http";import{randomBytes as Z}from"crypto";import{spawn as ee}from"child_process";import{mkdtempSync as re,readdirSync as te,readFileSync as oe,rmSync as ie,writeFileSync as ne}from"fs";import{tmpdir as W}from"os";import{join as w}from"path";function M(e,t,r,o){let i=Buffer.from(`${o.username}:${o.accessKey}`).toString("base64"),n=new URLSearchParams({session:r,auth:i});return t==="ios"&&n.set("mode","webrtc"),`${e.replace(/\/+$/,"")}/?${n.toString()}`}function V(e){return e.replace(/[&<>"']/g,t=>`&#${t.charCodeAt(0)};`)}function ae(e){return`<!doctype html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as W,b as H}from"./chunk-PGESS7BW.js";import{a as G}from"./chunk-FWGUISUG.js";import{a as se,b as ae,c as ce,d as ue,e as le,q as U}from"./chunk-
|
|
2
|
+
import{a as xe}from"./chunk-DPGOAFKF.js";import{a as W,b as H}from"./chunk-PGESS7BW.js";import{a as G}from"./chunk-FWGUISUG.js";import{a as se,b as ae,c as ce,d as ue,e as le,q as U}from"./chunk-RLOJH5O6.js";import{b as V}from"./chunk-CJE7PKRV.js";import{M as F,j as D,k as N}from"./chunk-Z777GGHB.js";import{g as Ue,m as v}from"./chunk-4I7YN6YY.js";var A="https://integrations.lambdatest.com",y=class extends Error{constructor(t,r){super(r);this.code=t;this.name="LisError"}};function Nt(e){let n=e.TESTMUAI_ENV==="stage"?"stage":"prod";return`${Ue().authEnvironments[n].shareApiBaseUrl}/lis/api/v1`}function Pt(e){let n=e.env??process.env,t=e.auth?.TESTMUAI_BASIC_AUTH||n.TESTMUAI_BASIC_AUTH;if(t)return{authorization:`Basic ${t}`};let r=e.auth?.TESTMUAI_API_KEY||n.TESTMUAI_API_KEY;return r?{authorization:`Bearer ${r}`}:{}}function C(e){let n=e.split(`
|
|
3
3
|
`,1)[0].replace(/[\u0000-\u001f\u007f-\u009f]/g,"");return n.length>200?`${n.slice(0,200)}\u2026`:n}function Tt(e,n,t="the issue"){return e===401||e===403?new y("LIS_AUTH",v().text("LIS_AUTH",{})):e>=500?new y("LIS_UNAVAILABLE",`the integrations service returned an error (HTTP ${e}) \u2014 retry later`):new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch ${t}: ${C(n)||`HTTP ${e}`}`)}function P(e){try{return JSON.parse(e.bytes.toString("utf8"))}catch{throw new y("LIS_UNAVAILABLE","the integrations service returned a malformed response \u2014 retry later")}}function be(e){try{return JSON.parse(e.bytes.toString("utf8"))}catch{return{}}}function Be(e){return be(e).code}function R(e,n="the issue",t="Atlassian"){let r=be(e),i=t==="Atlassian"?"Confluence":t;switch(r.code){case"TOKEN_EXPIRED":return new y("LIS_SETUP",`your ${t} connection needs a resync \u2014 reconnect at ${A} and retry`);case"NOT_INSTALLED":return new y("LIS_SETUP",`no ${t} connection for this account \u2014 create one at ${A} and retry`);case"SCOPE_MISSING":return new y("LIS_SETUP",`the connection has no ${i} access \u2014 reconnect with ${i} at ${A} and retry`);case"FORBIDDEN":return new y("LIS_FORBIDDEN",`you don't have access to ${n}`);case"NOT_FOUND":return new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch ${n}: ${C(r.message??"")||"not found"}`);case"PAYLOAD_TOO_LARGE":return new y("ATTACHMENT_TOO_LARGE","the attachment exceeds the integrations service's size cap");case"INVALID_PAYLOAD":return new y("LIS_UNAVAILABLE",`the integrations service rejected the request (${C(r.message??"")||"invalid payload"}) \u2014 retry later`);case"NOT_SUPPORTED":return new y("LIS_UNAVAILABLE","the integrations service does not support this operation yet");case"UPSTREAM_ERROR":case"UPSTREAM_TIMEOUT":return new y("LIS_UNAVAILABLE",`${t} is not responding through the integrations service \u2014 retry later`);default:return Tt(e.status,r.message??"",n)}}var Dt=3e4,Ut=5;async function k(e,n,t){let r=t.env??process.env,i=t.fetchImpl??fetch;for(let o=0;;o++){let u=new AbortController,l=setTimeout(()=>u.abort(),Dt);try{let s=await i(`${Nt(r)}${e}`,{...n,headers:{"content-type":"application/json",...Pt(t),...n.headers??{}},signal:u.signal}),c=await Promise.race([s.arrayBuffer(),new Promise((f,p)=>{u.signal.addEventListener("abort",()=>p(new DOMException("aborted","AbortError")),{once:!0})})]),a={status:s.status,ok:s.ok,headers:s.headers,bytes:Buffer.from(c)};if(a.status===429){if(o>0)throw new y("LIS_RATE_LIMITED","the integrations service is busy \u2014 try again in a moment");let f=be(a).data?.retry_after_sec,p=Math.min(Math.max(typeof f=="number"&&Number.isFinite(f)?f:1,0),Ut);clearTimeout(l),await new Promise(h=>setTimeout(h,p*1e3));continue}return a}catch(s){throw s instanceof y?s:u.signal.aborted?new y("LIS_UNAVAILABLE","the integrations service did not respond within 30 seconds \u2014 retry later"):new y("LIS_UNAVAILABLE",`could not reach the integrations service (${C(s instanceof Error?s.message:String(s))}) \u2014 check your connection and retry`)}finally{clearTimeout(l)}}}function Y(e){let n=e.headers.get("content-type")??"application/octet-stream";if(n.includes("json"))try{let t=JSON.parse(e.bytes.toString("utf8")),r=t.content??t.data?.content;if(typeof r=="string")return{bytes:Buffer.from(r,"base64"),mediaType:t.mime_type??t.data?.mime_type??"application/octet-stream"}}catch{}return{bytes:e.bytes,mediaType:n}}async function q(e={}){let n=await k("/jira/info",{method:"GET"},e);if(!n.ok)throw R(n);let t=P(n),r=(t.data?.SELECTED_PROJECTS??[]).map(i=>i?.key).filter(i=>typeof i=="string"&&i.length>0);return{installed:t.data?.INSTALLED==="YES",selectAll:t.data?.SELECT_ALL===!0,selectedProjects:r,capabilities:{document:t.data?.capabilities?.document===!0,comments:t.data?.capabilities?.comments===!0}}}async function Q(e,n={}){let t=await k("/jira/issue?details=true",{method:"POST",body:JSON.stringify({plugin_code:"jira",issueKey:e})},n);if(!t.ok)throw R(t);let r=P(t);if(r.type==="error"||!r.data)throw new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch the issue: ${C(r.message??"")||"issue not found or not accessible"}`);return r.data}var je=100,xt=5e3,Bt=60;async function ee(e,n={}){let t=[],r=new Set,i=null,o=0;for(let u=0;;u++){if(u>=Bt)throw new y("LIS_UNAVAILABLE","the integrations service kept returning comment pages without finishing \u2014 retry later");let l=await k("/jira/issue/comments",{method:"POST",body:JSON.stringify({resource_id:e,max_results:je,cursor:i,start_at:o,order_by:"created",fetch_all:!1})},n);if(!l.ok)throw R(l,"the issue's comments");let s=P(l);if(s.type==="error"||!s.data)throw new y("JIRA_ISSUE_UNAVAILABLE",`could not fetch the issue's comments: ${C(s.message??"")||"unavailable"}`);for(let g of s.data.comments??[]){let d=String(g.id);r.has(d)||(r.add(d),t.push(g))}let c=s.data.pagination;if(!c?.has_more)return t;if(t.length>=xt)throw new y("JIRA_ISSUE_UNAVAILABLE","the issue has more comments than can be ingested \u2014 cannot build a complete identity");let a=c.next_cursor??null,f=c.next_start_at!=null,p=f?c.next_start_at:o+je;if(!(a!=null&&a!==i||a==null&&f&&p!==o))throw new y("LIS_UNAVAILABLE","the integrations service returned a non-advancing comments page \u2014 retry later");i=a,o=p}}async function te(e,n={}){let t=await k("/jira/attachment",{method:"POST",body:JSON.stringify({attachment_id:e})},n);if(!t.ok){if(Be(t)===void 0){if(t.status===413)throw new y("ATTACHMENT_TOO_LARGE","the attachment exceeds the integrations service's size cap");if(t.status===404)throw new y("JIRA_NOT_CONNECTED",`Jira is not connected for this account \u2014 connect it at ${A} and retry`)}throw R(t,`attachment ${e}`)}return Y(t)}var de="kane.source.jira/2";function Me(e){if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){let n=e.map(Me).filter(t=>t!==null);return n.length===0?null:n.join(", ")}if(e!==null&&typeof e=="object"){let n=e;for(let t of["name","value","displayName"])if(typeof n[t]=="string")return n[t];return null}return null}function Fe(e,n,t){let r=[],i={},o=e.additional_fields??{};for(let a of Object.keys(o).sort()){let f=Me(o[a]);if(f===null){r.push(`field "${a}" has no stable text form \u2014 dropped from the envelope`);continue}i[a]=f}let u=[...e.attachments??[]].map(a=>({id:String(a.id),filename:a.filename??"",media_type:a.mime_type??"application/octet-stream",size:a.size??0})).sort((a,f)=>{let p=Number(a.id),h=Number(f.id);return Number.isFinite(p)&&Number.isFinite(h)?p-h:a.id<f.id?-1:a.id>f.id?1:0}),l=t.map(a=>({id:String(a.id),author:a.author?.display_name??"",body:a.body??"",created:a.created??""})).sort((a,f)=>{if(a.created!==f.created)return a.created<f.created?-1:1;let p=Number(a.id),h=Number(f.id);return Number.isFinite(p)&&Number.isFinite(h)&&p!==h?p-h:a.id<f.id?-1:a.id>f.id?1:0}),s=e.key;if(!/^[A-Za-z][A-Za-z0-9_]*-\d+$/.test(s))throw new Error(`cannot build a stable identity for issue key "${s}" \u2014 expected a PROJECT-NUMBER key`);let c={schema:de,site:n,project:s.slice(0,s.lastIndexOf("-")),issue:{id:e.id,key:s},content:{summary:e.summary??"",description:e.description??"",fields:i},attachments:u,comments:l};return{bytes:Buffer.from(JSON.stringify(c),"utf8"),envelope:c,warnings:r}}var Je=64,jt=16,Mt=6e6,Ft=5e7,Jt=12e6,Kt={png:"image/png",jpeg:"image/jpeg",webp:"image/webp",gif:"image/gif",bmp:"image/bmp",tiff:"image/tiff",emf:"image/emf",wmf:"image/wmf",unknown:"application/octet-stream"},Vt=new Set(["png","jpeg","webp"]);function _e(e){return async n=>{let t;try{t=JSON.parse(n.toString("utf8"))}catch{throw new Error("JIRA_ENVELOPE_SCHEMA: source bytes are not a kane jira envelope")}if(t.schema!==de)throw new Error(`JIRA_ENVELOPE_SCHEMA: unknown envelope schema "${t.schema}" \u2014 this CLI understands ${de}`);let r=[],i=new Map,o=[],u=0,l=new Map,s=[];for(let f=0;f<t.attachments.length;f++){let p=t.attachments[f],h=`i${f+1}`,g=`attachment:${p.filename}`,d=S=>`[img#${h}] ${p.filename} (${p.media_type}, ${p.size} bytes${S?"":" \u2014 not delivered"})`,m=(S,O,M)=>{r.push({ref:h,loc:g,media_type:S,...M?.blob?{blob:M.blob}:{},...M?.appearance?{appearance:M.appearance}:{},delivery:O,...M?.duplicate_of?{duplicate_of:M.duplicate_of}:{}})};if(!p.media_type.startsWith("image/")){m(p.media_type,"unsupported-vision-media-type"),s.push(d(!1));continue}let E;try{E=await e.fetchAttachment(p.id)}catch{m(p.media_type,"external-image-not-fetched"),s.push(d(!1));continue}let I=E.bytes,w=W(I),b=Kt[w.format],L=V(I);if(i.set(L,I),!Vt.has(w.format)){let S=w.format==="gif"||w.format==="bmp"||w.format==="tiff"?"unsupported-vision-media-type":"unsupported-image-kind";m(b,S,{blob:L}),s.push(d(!1));continue}if(w.width===void 0||w.height===void 0||w.width*w.height>Ft){m(b,"undecodable",{blob:L}),s.push(d(!1));continue}let _;if(w.format==="png"||w.format==="jpeg"){let S=H(I,w.format);if(S===null){m(b,"undecodable",{blob:L}),s.push(d(!1));continue}_=G(S.data,{width:S.width,height:S.height,channels:S.channels})}if(w.width<Je||w.height<Je){m(b,"below-dimension-floor",{blob:L,appearance:_}),s.push(d(!1));continue}let T=l.get(L);if(T!==void 0){m(b,"duplicate",{blob:L,appearance:_,duplicate_of:T}),s.push(d(!1));continue}if(I.byteLength>Mt){m(b,"image-too-large",{blob:L,appearance:_}),s.push(d(!1));continue}if(u+I.byteLength>Jt){m(b,"vision-byte-budget-reached",{blob:L,appearance:_}),s.push(d(!1));continue}if(o.length>=jt){m(b,"image-cap-reached",{blob:L,appearance:_}),s.push(d(!1));continue}l.set(L,h),u+=I.byteLength,o.push(h),m(b,"selected",{blob:L,appearance:_}),s.push(d(!0))}let c=[];c.push(`${t.issue.key} \xB7 ${t.site}/${t.project}`,`Summary: ${t.content.summary}`),t.content.description!==""&&c.push("",...t.content.description.split(`
|
|
4
4
|
`));let a=Object.keys(t.content.fields);return a.length>0&&c.push("","--- fields ---",...a.map(f=>`${f}: ${t.content.fields[f]}`)),s.length>0&&c.push("","--- attachments ---",...s),t.comments.length>0&&(c.push("","--- comments ---"),t.comments.forEach((f,p)=>{p>0&&c.push(""),c.push(`[${p+1}] ${f.author} \xB7 ${f.created}`,...f.body.split(`
|
|
5
5
|
`))})),{projection:c.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as i}from"./chunk-
|
|
2
|
+
import{b as i}from"./chunk-ENG2UTMX.js";function c(t){let o=[];t.executionId&&o.push({label:"execution",kind:"execution",packPath:i(t.executionId,t.cwd),status:t.executionStatus??"passed"});for(let e of t.authored)e.executionId&&o.push({label:e.relPath,kind:"authored",packPath:i(e.executionId,t.cwd),status:e.overallStatus,...e.testId?{testId:e.testId}:{},...e.commitId?{commitId:e.commitId}:{},...e.sourceExecutionId?{sourceExecutionId:e.sourceExecutionId}:{}});return o}function s(t){return t.map(o=>`kane-cli evidence serve ${o.packPath} # ${o.kind==="authored"?`${o.label} (authored)`:o.label}`)}export{c as a,s as b};
|
|
@@ -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-2PZKMT3I.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as l}from"./chunk-RZ4F3BHX.js";import{a as s,b as o,e as c}from"./chunk-
|
|
2
|
+
import{a as l}from"./chunk-RZ4F3BHX.js";import{a as s,b as o,e as c}from"./chunk-QMOGBKJM.js";import{readFileSync as f,writeFileSync as d,mkdirSync as g,realpathSync as h}from"fs";import{join as y}from"path";var C="npm install -g @testmuai/kane-cli@latest",b="brew upgrade lambdatest/kane/kane-cli";function N(){try{let t=process.argv[1];if(t&&h(t).includes("/Cellar/"))return b}catch{}return C}var m=y(o,"version-check.json"),w=1440*60*1e3;function A(){try{let t=JSON.parse(f(m,"utf-8"));if(Date.now()-t.checkedAt<w)return t}catch{}return null}function k(t){try{g(o,{recursive:!0}),d(m,JSON.stringify({latest:t,checkedAt:Date.now()}))}catch{}}function u(t,e){let n=t.split(".").map(Number),r=e.split(".").map(Number);for(let i=0;i<3;i++){let a=(r[i]??0)-(n[i]??0);if(a!==0)return a}return 0}function p(t,e){let n=t.split(".").map(Number),r=e.split(".").map(Number);return(r[0]??0)!==(n[0]??0)?"major":(r[1]??0)!==(n[1]??0)?"minor":"patch"}async function T(){try{let t=A();if(t)return u(s,t.latest)>0?{current:s,latest:t.latest,severity:p(s,t.latest)}:null;let e=new AbortController,n=setTimeout(()=>e.abort(),5e3),r=await l(c,{headers:{Accept:"application/json"},signal:e.signal});if(clearTimeout(n),!r.ok)return null;let a=(await r.json())["dist-tags"]?.latest;return a?(k(a),u(s,a)>0?{current:s,latest:a,severity:p(s,a)}:null):null}catch{return null}}async function v(t=5e3){let e=new AbortController,n=setTimeout(()=>e.abort(),t);try{let r=await l(c,{headers:{Accept:"application/json"},signal:e.signal});return r.ok?(await r.json())["dist-tags"]?.latest??null:null}catch{return null}finally{clearTimeout(n)}}export{N as a,u as b,p as c,T as d,v as e};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as i}from"./chunk-
|
|
2
|
+
import{e as i}from"./chunk-2L3A5NKZ.js";import{a as s,b as c,c as n}from"./chunk-ZCRZFAOT.js";import{appendFileSync as m,mkdirSync as u,readFileSync as g,writeFileSync as f}from"fs";import o from"path";var l=!1,p,x=({verb:r,contextInstanceId:e,sessionId:t})=>l&&e===null?n(p??r,t):c(e,r,t);function P(r){l=!0,p=r}function h(r,e){return{path:r,line:(t,d={})=>{if(r!==null)try{u(o.dirname(r),{recursive:!0}),m(r,JSON.stringify({ts:new Date().toISOString(),level:"info",user_session_id:e,source:"kane-cli",kind:t,data:d})+`
|
|
3
3
|
`)}catch{}}}}function k(r,e){return h(i()?n(r,e):null,e)}var a=r=>o.join(s(),"shared","logs","sessions",`${r}.trace`);function R(r,e){try{u(o.dirname(a(r)),{recursive:!0}),f(a(r),e)}catch{}}function O(r){if(!i())return null;try{return g(a(r),"utf8").trim()||null}catch{return null}}export{x as a,P as b,h as c,k as d,R as e,O as f};
|