@testmuai/kane-cli 0.10.0 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatSurface-Z26BOE5U.js +2 -0
- package/dist/{ChromeProfilePicker-FWPUDKD6.js → ChromeProfilePicker-ODRIAXL3.js} +1 -1
- package/dist/{CliFeedbackPrompt-D5L2DO6A.js → CliFeedbackPrompt-JWCTMIGI.js} +1 -1
- package/dist/{CliUploadProgress-HQX57WE6.js → CliUploadProgress-XFRRFRL4.js} +1 -1
- package/dist/{ConfigView-DGQXKEON.js → ConfigView-6JF4DOJN.js} +1 -1
- package/dist/EvidenceViewOffer-6344EX74.js +2 -0
- package/dist/FolderPicker-4PCYHE75.js +2 -0
- package/dist/InfoBox-NJ2DL7YC.js +2 -0
- package/dist/{LinksBox-WZ4RAMSH.js → LinksBox-HNDNFVUT.js} +1 -1
- package/dist/{ProfilesView-AGRNPGSW.js → ProfilesView-DEJKJOHY.js} +1 -1
- package/dist/ProjectPicker-DTWMWOH7.js +2 -0
- package/dist/SaveSessionPrompt-3GCLB3ZT.js +2 -0
- package/dist/SingleShotApp-HMOXO5DW.js +2 -0
- package/dist/{SummaryBox-XQJUZBAN.js → SummaryBox-7PPDMSSM.js} +1 -1
- package/dist/TestMdRunView-QLKRUU4V.js +2 -0
- package/dist/TestrunEvidenceTable-T2JUB4TE.js +2 -0
- package/dist/{WhoamiView-JQCURK2M.js → WhoamiView-H7JNLLCY.js} +1 -1
- package/dist/{app-download-OU6AGH2X.js → app-download-GKRF2EIM.js} +1 -1
- package/dist/{assurance-job-ZI3L6I4F.js → assurance-job-F4L3T4VJ.js} +1 -1
- package/dist/{auth-7Z54TMQQ.js → auth-WBIEHHDS.js} +1 -1
- package/dist/{binary-S5YL5GJD.js → binary-K3XMILST.js} +1 -1
- package/dist/{bind-LIV72SEZ.js → bind-SSHAZAB3.js} +1 -1
- package/dist/{bootstrap-3V6TOO6I.js → bootstrap-XGKU4WXB.js} +1 -1
- package/dist/bridge-2UHJOVLX.js +2 -0
- package/dist/{catalog-I3PC6LT6.js → catalog-YCU6OHNV.js} +1 -1
- package/dist/{catalog-client-WKYG3JN6.js → catalog-client-MVEEHTG2.js} +1 -1
- package/dist/{changelog-IHNWFYWY.js → changelog-5UB3AQT6.js} +1 -1
- package/dist/chat-committer-ZKEKJA2R.js +2 -0
- package/dist/chat-controller-FXRJXUG3.js +2 -0
- package/dist/child-JHYENXE7.js +2 -0
- package/dist/{chunk-ZTAZ2R5Z.js → chunk-23DKB2MT.js} +1 -1
- package/dist/{chunk-UX2CDUPE.js → chunk-2JFRN62I.js} +2 -2
- package/dist/chunk-2RBMQTYS.js +26 -0
- package/dist/{chunk-VVCZRCRD.js → chunk-2TK4MDF2.js} +1 -1
- package/dist/{chunk-G3J4XY3Z.js → chunk-32HED7X2.js} +1 -1
- package/dist/{chunk-GRURFGBP.js → chunk-32MFECUA.js} +1 -1
- package/dist/{chunk-N3KTLWJL.js → chunk-35BG2EMW.js} +1 -1
- package/dist/{chunk-4523YDTG.js → chunk-35WUYKGO.js} +1 -1
- package/dist/{chunk-KDR662D2.js → chunk-3KY7HHQU.js} +1 -1
- package/dist/{chunk-UNWPBMVM.js → chunk-3MD2XLE7.js} +2 -2
- package/dist/{chunk-YKL5H4K6.js → chunk-3NWUXRSI.js} +1 -1
- package/dist/{chunk-QQI6N3FO.js → chunk-3RO2YGKH.js} +1 -1
- package/dist/{chunk-AGXAJ2II.js → chunk-3ZC7GSMM.js} +1 -1
- package/dist/{chunk-I2MC6VVX.js → chunk-4C7WVQOD.js} +1 -1
- package/dist/{chunk-VQZOKTJ2.js → chunk-4CJQ7XZP.js} +1 -1
- package/dist/{chunk-7KX2BHKG.js → chunk-4KCYNP2K.js} +1 -1
- package/dist/{chunk-AUBSLPJZ.js → chunk-4KL3TSTT.js} +5 -5
- package/dist/{chunk-AG5XJWEV.js → chunk-4UX5N7YI.js} +1 -1
- package/dist/{chunk-WERIGVOH.js → chunk-5F5IVART.js} +1 -1
- package/dist/{chunk-RFEON5GN.js → chunk-5XVWT6UK.js} +1 -1
- package/dist/{chunk-FBQ7PQJV.js → chunk-5YYCCM6K.js} +1 -1
- package/dist/{chunk-SBR6D6GS.js → chunk-6FFX4S7N.js} +1 -1
- package/dist/{chunk-DHYGCHKB.js → chunk-6HRNG4CK.js} +1 -1
- package/dist/{chunk-HBVHIEPB.js → chunk-6QCCTZO3.js} +1 -1
- package/dist/{chunk-GI2JPIX5.js → chunk-6QH75BPJ.js} +1 -1
- package/dist/{chunk-5R3ODQHH.js → chunk-6SD4XTYC.js} +1 -1
- package/dist/{chunk-J4LQAT5P.js → chunk-7LYLJ75Z.js} +1 -1
- package/dist/{chunk-Y3YULFCK.js → chunk-7RELCXRW.js} +1 -1
- package/dist/{chunk-GXMD23XB.js → chunk-7SU53QGU.js} +1 -1
- package/dist/{chunk-DTYT6KBO.js → chunk-7Y55CO42.js} +1 -1
- package/dist/{chunk-2L3A5NKZ.js → chunk-7YV2FCN4.js} +1 -1
- package/dist/{chunk-ULGBK4NS.js → chunk-A2DODRHG.js} +1 -1
- package/dist/{chunk-EVZLINBN.js → chunk-AHT2ORJT.js} +1 -1
- package/dist/{chunk-RDH3E25Q.js → chunk-AT7AT3AR.js} +2 -2
- package/dist/{chunk-ZI3X7DI2.js → chunk-AVLYSNEG.js} +1 -1
- package/dist/{chunk-GET4DINR.js → chunk-BBJAKSA7.js} +1 -1
- package/dist/{chunk-CBVHP7JB.js → chunk-BJO6J5X2.js} +1 -1
- package/dist/{chunk-G3CYFCSR.js → chunk-BLVDV3QQ.js} +1 -1
- package/dist/{chunk-2N75WO7Y.js → chunk-C4KAPGBS.js} +1 -1
- package/dist/{chunk-XLQ4F6BI.js → chunk-CB2BWDHG.js} +2 -2
- package/dist/chunk-CB344EDO.js +2 -0
- package/dist/chunk-CCOD4GQJ.js +2 -0
- package/dist/{chunk-JSLKCCD2.js → chunk-CNHKZE4F.js} +1 -1
- package/dist/{chunk-CJE7PKRV.js → chunk-CQDCNP7V.js} +1 -1
- package/dist/{chunk-3OVFKUXV.js → chunk-CTHUX7O4.js} +1 -1
- package/dist/{chunk-4JWJH6TB.js → chunk-DC5F2ADJ.js} +1 -1
- package/dist/chunk-DIOK3SER.js +34 -0
- package/dist/{chunk-EQWMOGLO.js → chunk-DQXQJJOP.js} +2 -2
- package/dist/{chunk-EH43VWVR.js → chunk-DXIQVBMI.js} +1 -1
- package/dist/{chunk-WZLDFEWR.js → chunk-E4GIGM5V.js} +1 -1
- package/dist/{chunk-K3OSK6PB.js → chunk-EBJW6POT.js} +1 -1
- package/dist/{chunk-MYZHOBS4.js → chunk-EHB55V23.js} +1 -1
- package/dist/{chunk-RARD6TC6.js → chunk-EJGCIGQY.js} +1 -1
- package/dist/{chunk-OR2B6T3B.js → chunk-ENRFXGID.js} +1 -1
- package/dist/{chunk-3ZPEQDXZ.js → chunk-ERRIDBE7.js} +1 -1
- package/dist/{chunk-HGVM2OZU.js → chunk-EZMRWXRT.js} +1 -1
- package/dist/chunk-F2F257PU.js +6 -0
- package/dist/{chunk-AUJSC7PU.js → chunk-FNUGDPTS.js} +1 -1
- package/dist/{chunk-MPEIMWQI.js → chunk-FOLUB336.js} +1 -1
- package/dist/{chunk-HHW6MRU3.js → chunk-G4K3TP2I.js} +1 -1
- package/dist/{chunk-P2ZQDQDB.js → chunk-GAKBHNC4.js} +1 -1
- package/dist/{chunk-DPGOAFKF.js → chunk-GBQ4K25P.js} +1 -1
- package/dist/{chunk-PCDIEYV6.js → chunk-GEZVC4S3.js} +1 -1
- package/dist/{chunk-PL3SG3M2.js → chunk-GJXO6FF7.js} +1 -1
- package/dist/{chunk-252GEI3H.js → chunk-GLM5UGTF.js} +1 -1
- package/dist/{chunk-JOCEZK2M.js → chunk-GQAWZEA4.js} +1 -1
- package/dist/{chunk-45URQUAK.js → chunk-GXQYFOBD.js} +1 -1
- package/dist/{chunk-PBWYQR5I.js → chunk-HBLHKQR7.js} +1 -1
- package/dist/chunk-HC6VLPUB.js +5 -0
- package/dist/{chunk-K2PLULJD.js → chunk-HRIDAK6Y.js} +1 -1
- package/dist/{chunk-D6CS62O7.js → chunk-HV2CDY4K.js} +1 -1
- package/dist/{chunk-P2LDAW3C.js → chunk-HVOXMCKE.js} +1 -1
- package/dist/{chunk-4I7YN6YY.js → chunk-HYJVYYAZ.js} +2 -2
- package/dist/{chunk-GYDJO32R.js → chunk-IEHJG6J4.js} +1 -1
- package/dist/{chunk-GGS3ATPB.js → chunk-IZ66FKPC.js} +1 -1
- package/dist/{chunk-QMOGBKJM.js → chunk-J4FIESTB.js} +1 -1
- package/dist/{chunk-436FZ4KG.js → chunk-JBKHX5ES.js} +1 -1
- package/dist/{chunk-EX6ORR7P.js → chunk-JNPFEBUR.js} +1 -1
- package/dist/{chunk-AU26ZZTX.js → chunk-JTNEF5ZP.js} +1 -1
- package/dist/{chunk-5IO5ZC4S.js → chunk-KBGMQYMD.js} +1 -1
- package/dist/{chunk-WX4VGH5Q.js → chunk-KCXLRR3Q.js} +1 -1
- package/dist/{chunk-4R4YUOVY.js → chunk-KKLCXRW6.js} +1 -1
- package/dist/{chunk-YGMQXS2J.js → chunk-KL7XFNSD.js} +1 -1
- package/dist/{chunk-MJKRJGER.js → chunk-KQ4XKTIZ.js} +1 -1
- package/dist/{chunk-I2VU2DTS.js → chunk-L3BUPFAQ.js} +4 -4
- package/dist/{chunk-ZZNQIFFI.js → chunk-LHJSIHLC.js} +1 -1
- package/dist/{chunk-2GE5X2A5.js → chunk-LLQWEGXD.js} +1 -1
- package/dist/{chunk-PQXYHI5W.js → chunk-LPJKNX6D.js} +1 -1
- package/dist/{chunk-ZGQM6KWN.js → chunk-LRNUGKYH.js} +1 -1
- package/dist/chunk-LTPOMMAB.js +2 -0
- package/dist/{chunk-MHB6DMKZ.js → chunk-LUA25RYS.js} +1 -1
- package/dist/{chunk-2PZKMT3I.js → chunk-LV7224DG.js} +1 -1
- package/dist/{chunk-X3J4CC27.js → chunk-LXK4B2FE.js} +1 -1
- package/dist/{chunk-YH4VZVHJ.js → chunk-LZGAFKYH.js} +1 -1
- package/dist/{chunk-3QICDXY5.js → chunk-LZPYIFHZ.js} +1 -1
- package/dist/{chunk-4BUEOKFV.js → chunk-M2E5CPPV.js} +1 -1
- package/dist/{chunk-65BG6GAE.js → chunk-M7A66MSK.js} +1 -1
- package/dist/{chunk-JX5NVKTV.js → chunk-MD3RABID.js} +1 -1
- package/dist/{chunk-QECTIQAC.js → chunk-MEBEVHGP.js} +1 -1
- package/dist/{chunk-52VCA4K2.js → chunk-MEMXFTLD.js} +1 -1
- package/dist/{chunk-U7NRZBB5.js → chunk-MINDIQET.js} +1 -1
- package/dist/{chunk-HJLMH7ZM.js → chunk-MUX2A37P.js} +1 -1
- package/dist/{chunk-YKOEABP2.js → chunk-N7IWR45S.js} +1 -1
- package/dist/{chunk-WQR2GYP7.js → chunk-ND6OP3O2.js} +1 -1
- package/dist/{chunk-URAYFJGM.js → chunk-NHGPMYM3.js} +1 -1
- package/dist/{chunk-ZKPY3AXW.js → chunk-NI3TIAD7.js} +1 -1
- package/dist/{chunk-JCSVBD4F.js → chunk-NPAUSUNM.js} +1 -1
- package/dist/{chunk-XMALVGH7.js → chunk-NRAPCFI2.js} +2 -2
- package/dist/{chunk-567D5ZTO.js → chunk-NZJSGINB.js} +16 -16
- package/dist/{chunk-A4BB6GLN.js → chunk-OBNVGD5H.js} +1 -1
- package/dist/{chunk-BRVIK3BU.js → chunk-OCMPWCKQ.js} +1 -1
- package/dist/{chunk-4SJAOAYY.js → chunk-OCVDMZWB.js} +1 -1
- package/dist/{chunk-JRSEAXFE.js → chunk-OHGL4GEJ.js} +1 -1
- package/dist/{chunk-YYVBE6W2.js → chunk-OOGKX4Y6.js} +1 -1
- package/dist/{chunk-QWZJ5QDO.js → chunk-OTMHCHH6.js} +2 -2
- package/dist/{chunk-Z5BFCTHI.js → chunk-OZNYQONA.js} +2 -2
- package/dist/{chunk-EPJ5SJL2.js → chunk-PB6RXDWQ.js} +2 -2
- package/dist/{chunk-TZVPDGJD.js → chunk-PCQK62MP.js} +1 -1
- package/dist/{chunk-Z777GGHB.js → chunk-PI7OXS62.js} +1 -1
- package/dist/{chunk-MW2WNYJO.js → chunk-PRBWZXFA.js} +2 -2
- package/dist/{chunk-2SY2NCOP.js → chunk-PTLOOVV4.js} +1 -1
- package/dist/{chunk-EC5IP5HZ.js → chunk-Q4ALB7SH.js} +1 -1
- package/dist/{chunk-FYCD765R.js → chunk-Q4JV4U65.js} +58 -58
- package/dist/{chunk-CJQUVHHS.js → chunk-Q4SMITTV.js} +1 -1
- package/dist/{chunk-NJCN6LP5.js → chunk-QE4AWNOV.js} +6 -6
- package/dist/{chunk-BY2B4YJN.js → chunk-QEM5ZRDN.js} +1 -1
- package/dist/{chunk-VA3BSIUQ.js → chunk-QHH42RH5.js} +1 -1
- package/dist/{chunk-FPPVNF53.js → chunk-R6TFRAMZ.js} +1 -1
- package/dist/{chunk-3T2TYDPT.js → chunk-RNHSULQM.js} +1 -1
- package/dist/{chunk-32Y6QVFG.js → chunk-SALZ6WSF.js} +1 -1
- package/dist/chunk-SB26HQO7.js +2 -0
- package/dist/{chunk-4NUSW4A2.js → chunk-SIHX5FW5.js} +1 -1
- package/dist/{chunk-LHQUCRCH.js → chunk-SJQTTEXQ.js} +1 -1
- package/dist/{chunk-W3NWHWK2.js → chunk-SMGRXKXX.js} +1 -1
- package/dist/{chunk-USJ3LUAL.js → chunk-SSOUYKVG.js} +1 -1
- package/dist/{chunk-2B75UL7Y.js → chunk-SVIIUKJ2.js} +1 -1
- package/dist/{chunk-7ZJWUWSN.js → chunk-SXBPUUQ5.js} +1 -1
- package/dist/{chunk-QVP4FSKT.js → chunk-T77LTLAD.js} +1 -1
- package/dist/{chunk-KRRZCY7U.js → chunk-TAY7J5VS.js} +1 -1
- package/dist/chunk-TD6GCEIK.js +2 -0
- package/dist/{chunk-VZA7BPCK.js → chunk-TM45NPWL.js} +1 -1
- package/dist/{chunk-ZY65IZJR.js → chunk-TM6VLC6V.js} +1 -1
- package/dist/{chunk-COJINPOK.js → chunk-TU2KPOW2.js} +2 -2
- package/dist/{chunk-JTJ7IPNI.js → chunk-TUSG7DIL.js} +1 -1
- package/dist/{chunk-3BSYOCSW.js → chunk-U2VYTVKV.js} +1 -1
- package/dist/{chunk-JQ7ZZQXC.js → chunk-UJ37XGSP.js} +3 -3
- package/dist/chunk-ULIIYKZB.js +7 -0
- package/dist/{chunk-LNHBZEDC.js → chunk-UWPG5MWM.js} +1 -1
- package/dist/{chunk-UUWSULIM.js → chunk-UXGMKRS4.js} +61 -60
- package/dist/{chunk-6DZ7LVOG.js → chunk-VCVEZEVS.js} +1 -1
- package/dist/{chunk-ZRDX2ARO.js → chunk-VKVYT6KZ.js} +2 -2
- package/dist/{chunk-B2WFW74J.js → chunk-VO2NNXKR.js} +1 -1
- package/dist/{chunk-B7JLM3IX.js → chunk-W54BX6HC.js} +1 -1
- package/dist/{chunk-IZ65ZPWY.js → chunk-W5HFUBXD.js} +1 -1
- package/dist/{chunk-TLOYTGVT.js → chunk-WE7HRAGO.js} +1 -1
- package/dist/{chunk-GRO6DLN3.js → chunk-WEJR2V7R.js} +1 -1
- package/dist/{chunk-YI4ESDAX.js → chunk-WIVKLNIO.js} +1 -1
- package/dist/chunk-WLEWXE6L.js +2 -0
- package/dist/{chunk-DBTMKBHU.js → chunk-X2MDL6S4.js} +1 -1
- package/dist/{chunk-MKPDF26Q.js → chunk-X45RZIAJ.js} +1 -1
- package/dist/{chunk-G2KTWFMU.js → chunk-X52YIWGG.js} +1 -1
- package/dist/{chunk-UEPJ26X2.js → chunk-X6FCXBXU.js} +1 -1
- package/dist/{chunk-LXM7VHYN.js → chunk-X7S7IGCV.js} +1 -1
- package/dist/{chunk-FVYIV36L.js → chunk-XKOVEMVZ.js} +1 -1
- package/dist/{chunk-3UHPVQLU.js → chunk-Y2HQMJGS.js} +1 -1
- package/dist/{chunk-4MNSP4EO.js → chunk-Y3RJHWNK.js} +1 -1
- package/dist/{chunk-A3TCFSCK.js → chunk-YCVEI7BT.js} +1 -1
- package/dist/{chunk-JGRXMTME.js → chunk-YDB72F4K.js} +1 -1
- package/dist/{chunk-7C4IEL5V.js → chunk-YILRYMMG.js} +1 -1
- package/dist/{chunk-7DFBOVUB.js → chunk-YJAQZMJT.js} +1 -1
- package/dist/{chunk-JGLADDRH.js → chunk-YNDELIXL.js} +1 -1
- package/dist/{chunk-WKZLK57W.js → chunk-YPGZ5E4I.js} +1 -1
- package/dist/{chunk-NTXFPNAP.js → chunk-YQZ736IQ.js} +1 -1
- package/dist/{chunk-FPVGA6XT.js → chunk-YVVFXBT5.js} +1 -1
- package/dist/{chunk-JT6WLJSV.js → chunk-YWWVF5OU.js} +1 -1
- package/dist/{chunk-RLOJH5O6.js → chunk-Z24SD2EJ.js} +1 -1
- package/dist/{chunk-ENG2UTMX.js → chunk-Z36KVIRR.js} +1 -1
- package/dist/{chunk-JFBEHCJN.js → chunk-Z47ZEFH7.js} +1 -1
- package/dist/{chunk-6NFOH4AC.js → chunk-ZAQGIC33.js} +1 -1
- package/dist/{chunk-GGV336P5.js → chunk-ZCBOHWN3.js} +1 -1
- package/dist/{chunk-AIGQCMGY.js → chunk-ZCL7XIVS.js} +1 -1
- package/dist/{chunk-ORNVIEUA.js → chunk-ZDCXWEQG.js} +1 -1
- package/dist/{chunk-6TNLITJO.js → chunk-ZHAMVLQZ.js} +1 -1
- package/dist/{chunk-FLOQ5NZL.js → chunk-ZIHQ5JGB.js} +4 -4
- package/dist/{chunk-PTISAIZW.js → chunk-ZMIKNNO6.js} +1 -1
- package/dist/{chunk-H4KPNGY4.js → chunk-ZMWTRXFH.js} +1 -1
- package/dist/{chunk-ONZ2CSTZ.js → chunk-ZPU3WAC4.js} +1 -1
- package/dist/commands-JBFLLT7A.js +2 -0
- package/dist/{committer-26UZDYSA.js → committer-UO3B3S5Y.js} +1 -1
- package/dist/{config-B472DZSR.js → config-7WTZPMAH.js} +1 -1
- package/dist/cover-cmd-DU6ZYJFL.js +2 -0
- package/dist/{credentials-TLT3RQOO.js → credentials-5WIFF5DG.js} +1 -1
- package/dist/{deps-bundle-CMTIWBS5.js → deps-bundle-BLLJ2BQ4.js} +1 -1
- package/dist/{deps-resolve-XLFZK74A.js → deps-resolve-WQ6J6RLI.js} +1 -1
- package/dist/{design-chat-I7X3QDDY.js → design-chat-ZICGVYIH.js} +1 -1
- package/dist/design-committer-7YIPFKMO.js +2 -0
- package/dist/design-headless-HYWZIIDS.js +2 -0
- package/dist/{design-remote-UDC5FP45.js → design-remote-HPX4VZ63.js} +2 -2
- package/dist/device-env-4P4GUVBW.js +2 -0
- package/dist/dispatch-BV6XMCN3.js +2 -0
- package/dist/{doctor-UHFCIM4B.js → doctor-Z2YQ2DBX.js} +1 -1
- package/dist/{docx-convert-N4KMLLKO.js → docx-convert-DO5AQYD3.js} +1 -1
- package/dist/{dossier-6KMKEIXV.js → dossier-5XKNAK6Q.js} +1 -1
- package/dist/evidence-BJIID6VT.js +2 -0
- package/dist/evidence-presentation-LSFOZGLH.js +2 -0
- package/dist/evolve-cmd-GZCUSCEK.js +2 -0
- package/dist/evolve-remote-LILOAHYH.js +2 -0
- package/dist/{explain-cmd-R67B4YR3.js → explain-cmd-KNDORU2D.js} +1 -1
- package/dist/{explain-cmd-235TY7QX.js → explain-cmd-LXIVHGN7.js} +1 -1
- package/dist/explore-SA2P3SGX.js +2 -0
- package/dist/{explore-context-tty-YXEFT32U.js → explore-context-tty-PERKIWXD.js} +1 -1
- package/dist/{explore-entry-V6L5FSP4.js → explore-entry-E6EY3VV3.js} +4 -4
- package/dist/{explore-live-N5VBLBUI.js → explore-live-XIWWUV52.js} +1 -1
- package/dist/{explore-run-tty-ZZQ33GNA.js → explore-run-tty-M56I23IF.js} +2 -2
- package/dist/{extract-bind-BTINHHE5.js → extract-bind-LZ22VFKB.js} +3 -3
- package/dist/extract-chat-Z64LEAJ5.js +2 -0
- package/dist/{extract-cmd-45OZETCM.js → extract-cmd-46E2XDWZ.js} +2 -2
- package/dist/extract-headless-XLS56LMN.js +2 -0
- package/dist/{feeder-L55TH2NC.js → feeder-NGWIPZ26.js} +1 -1
- package/dist/folder-flags-ZIDJVDKX.js +2 -0
- package/dist/gaps-cmd-XYOBJVTO.js +3 -0
- package/dist/gate-AK44VDHC.js +2 -0
- package/dist/gate-NB5CJMTN.js +2 -0
- package/dist/{generate-headless-DAH3HHRQ.js → generate-headless-HXAVEAEZ.js} +2 -2
- package/dist/hold-passthrough-JGHWMYDM.js +2 -0
- package/dist/{impact-cmd-3VFJAKYK.js → impact-cmd-TJTUFAFO.js} +2 -2
- package/dist/index.js +4159 -190
- package/dist/ingest-ZHHHBUXR.js +2 -0
- package/dist/{ingest-cmd-YSEH5EPU.js → ingest-cmd-OJSKTSQK.js} +3 -3
- package/dist/ingest-remote-2WM6PYUW.js +2 -0
- package/dist/install-JBWBF3WX.js +2 -0
- package/dist/{interactive-bind-P3GTFIZM.js → interactive-bind-SOD7VTAY.js} +4 -4
- package/dist/{interactive-remote-PBRQHTAF.js → interactive-remote-7ZSTI66T.js} +1 -1
- package/dist/lane-CNGO7LH5.js +2 -0
- package/dist/lattice-auth-UQPFQSG7.js +2 -0
- package/dist/{lifecycle-cmd-PUNFWKV5.js → lifecycle-cmd-DGIO3VAO.js} +1 -1
- package/dist/{list-cmd-RD7YBF4S.js → list-cmd-HQIN3HX4.js} +1 -1
- package/dist/{list-commands-UZELZAB3.js → list-commands-OFRRBU3D.js} +1 -1
- package/dist/{list-remote-KGKXPCQA.js → list-remote-EFCET42K.js} +1 -1
- package/dist/{locks-cmd-LXZ6I4QG.js → locks-cmd-AZKCSGHI.js} +1 -1
- package/dist/{logical-ids-D5PFYY4C.js → logical-ids-74PLU3VR.js} +1 -1
- package/dist/login-flow-SYKXXDLH.js +2 -0
- package/dist/{maintenance-cmd-WRWBCP3R.js → maintenance-cmd-X5247RSJ.js} +1 -1
- package/dist/{mobile-prompts-Z7NQHRGP.js → mobile-prompts-I66ENBDW.js} +1 -1
- package/dist/{objective-variable-gate-3Z7DNVVC.js → objective-variable-gate-V5HHFOUS.js} +1 -1
- package/dist/{onboarding-ZP4XDYEO.js → onboarding-6HIP3KW6.js} +1 -1
- package/dist/open-provider-XDJKT3W3.js +2 -0
- package/dist/pdf-convert-YB6PJFMI.js +2 -0
- package/dist/persist-recorded-session-RSSMTVF3.js +3 -0
- package/dist/phase-seed-ZZSJME7M.js +2 -0
- package/dist/pipeline-NTJDH5TC.js +2 -0
- package/dist/{policy-commands-TY6WOR73.js → policy-commands-4PUGESCW.js} +1 -1
- package/dist/{prepare-target-EVL2QSXA.js → prepare-target-AI3GGZF6.js} +1 -1
- package/dist/{pull-cmd-QJQANBAW.js → pull-cmd-NRVB5ZN7.js} +1 -1
- package/dist/{pull-route-AIOTLA3D.js → pull-route-FWCZW76M.js} +1 -1
- package/dist/readmodel-TRV4E3MW.js +2 -0
- package/dist/real-device-run-NQ7RNH7C.js +2 -0
- package/dist/{reconcile-cmd-IJTQAJZX.js → reconcile-cmd-7B7THAFJ.js} +4 -4
- package/dist/reconcile-deps-UDQBWSLE.js +2 -0
- package/dist/{reconcile-remote-23D6SXXT.js → reconcile-remote-3W6ZTO3G.js} +2 -2
- package/dist/{recording-banner-MNRMMEX4.js → recording-banner-WVDTWTSE.js} +1 -1
- package/dist/registry-PFOSXOIH.js +2 -0
- package/dist/remote-entry-BZU4NFNS.js +2 -0
- package/dist/{remote-mode-AFNCN6EE.js → remote-mode-NXUKDUXG.js} +1 -1
- package/dist/{remote-words-RCNFI2TQ.js → remote-words-JRDDNOZ6.js} +1 -1
- package/dist/{require-project-folder-7UH43GHI.js → require-project-folder-3DTI2CVB.js} +1 -1
- package/dist/{resolve-run-intent-XEWFYMGN.js → resolve-run-intent-QCL7QXIB.js} +1 -1
- package/dist/{resolver-QMPX6RBR.js → resolver-CDF7QKVD.js} +1 -1
- package/dist/revert-QKHPCRT6.js +2 -0
- package/dist/{review-cmd-2OECKNL5.js → review-cmd-XBK3TGRE.js} +1 -1
- package/dist/run-CSYGVV3D.js +2 -0
- package/dist/run-YUHHD54J.js +2 -0
- package/dist/{run-channel-63SVP5OI.js → run-channel-IIIYXOIW.js} +1 -1
- package/dist/run-remote-SFR3F2T5.js +2 -0
- package/dist/{run-startup-gate-USQFSW47.js → run-startup-gate-QSFJRYUY.js} +1 -1
- package/dist/run-test-md-ZSREINDQ.js +20 -0
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-CFV7FOIT.js → sessions-NH2EG7BP.js} +1 -1
- package/dist/{sessions-cmd-LQ2LZQOC.js → sessions-cmd-TLUITRG5.js} +2 -2
- package/dist/{sessions-remote-H7CQST42.js → sessions-remote-INO7AWKB.js} +1 -1
- package/dist/{skill-installer-LKYY6XFJ.js → skill-installer-7JH5QCJF.js} +1 -1
- package/dist/spawner-MQ4XEHIX.js +2 -0
- package/dist/{store-KM5MG3XB.js → store-X4UK4AP7.js} +1 -1
- package/dist/store-choice-27HDIFTU.js +2 -0
- package/dist/{store-guard-34GG2TW2.js → store-guard-ZXKB5DQH.js} +1 -1
- package/dist/{store-site-ZSFINU6C.js → store-site-K5NHLI7D.js} +1 -1
- package/dist/stream-warnings-GM7YEOVG.js +2 -0
- package/dist/sync-cmd-2PCO7LZA.js +2 -0
- package/dist/{sync-setup-QQXYO6R4.js → sync-setup-5WQO73Y5.js} +1 -1
- package/dist/tcg-generate-DGJD5KSM.js +2 -0
- package/dist/testmd-actions-XE2JPQHB.js +2 -0
- package/dist/{testmd-sync-PQ4GFKHB.js → testmd-sync-LYHEXWCT.js} +1 -1
- package/dist/{tms-client-XWCR7O7J.js → tms-client-J4OCD3EP.js} +1 -1
- package/dist/token-refresh-E4FTJVHY.js +2 -0
- package/dist/{trust-gate-AT2XBWN4.js → trust-gate-674C2NZS.js} +1 -1
- package/dist/{turn-preflight-LHYLRL7G.js → turn-preflight-R4PU6NYY.js} +1 -1
- package/dist/{use-case-ref-NA3IXGQW.js → use-case-ref-44BPIP4N.js} +1 -1
- package/dist/{validate-basic-3DX3MMC7.js → validate-basic-66XDPA3S.js} +1 -1
- package/dist/{variable-receipt-BXSZO36E.js → variable-receipt-7PRKDTRJ.js} +1 -1
- package/dist/verdicts-PVB7TV5S.js +2 -0
- package/dist/{version-check-OV6AOVED.js → version-check-SHNVYTMU.js} +1 -1
- package/dist/{view-cmd-QDKBBNIU.js → view-cmd-QOB3O6YW.js} +1 -1
- package/dist/{walk-session-BAYYPIKN.js → walk-session-WIEROYOT.js} +1 -1
- package/dist/with-telemetry-T2PWI5CY.js +2 -0
- package/package.json +16 -16
- package/dist/ChatSurface-XUV3EQPZ.js +0 -2
- package/dist/EvidenceViewOffer-EIANIYN7.js +0 -2
- package/dist/FolderPicker-XOA7FTHF.js +0 -2
- package/dist/InfoBox-OBH7SUGC.js +0 -2
- package/dist/ProjectPicker-6KRLKV4U.js +0 -2
- package/dist/SaveSessionPrompt-J2OPDEOO.js +0 -2
- package/dist/SingleShotApp-QI4B2TSL.js +0 -2
- package/dist/TestMdRunView-I4MV54FB.js +0 -2
- package/dist/TestrunEvidenceTable-WEIUSW3E.js +0 -2
- package/dist/bridge-SDEP7Y33.js +0 -2
- package/dist/chat-committer-FM5NG46O.js +0 -2
- package/dist/chat-controller-FWFQVZTB.js +0 -2
- package/dist/child-H2YSDFCG.js +0 -2
- package/dist/chunk-2EVP636F.js +0 -26
- package/dist/chunk-34R7BNZ2.js +0 -2
- package/dist/chunk-5T6II7VN.js +0 -7
- package/dist/chunk-6K5BEEAJ.js +0 -2
- package/dist/chunk-HMQ5M4JJ.js +0 -34
- package/dist/chunk-KF4DKXSS.js +0 -2
- package/dist/chunk-NOFJXCYP.js +0 -5
- package/dist/chunk-SB6P5EQH.js +0 -2
- package/dist/chunk-Y6Y6RAY4.js +0 -2
- package/dist/commands-QOORPTSI.js +0 -2
- package/dist/cover-cmd-3VO6QC5Y.js +0 -2
- package/dist/design-committer-Y7R56RFZ.js +0 -2
- package/dist/design-headless-HUQOXLZB.js +0 -2
- package/dist/device-env-MMGISNHN.js +0 -2
- package/dist/dispatch-P2445PUU.js +0 -2
- package/dist/evidence-M3JTOJNL.js +0 -2
- package/dist/evidence-presentation-DV3DRB4S.js +0 -2
- package/dist/evolve-cmd-K3JXACMN.js +0 -2
- package/dist/evolve-remote-CUDVV2O2.js +0 -2
- package/dist/explore-UDD5FHXW.js +0 -2
- package/dist/extract-chat-ABZ5S7UU.js +0 -2
- package/dist/extract-headless-ALEFAMVS.js +0 -2
- package/dist/folder-flags-HTKJCXKB.js +0 -2
- package/dist/gaps-cmd-ROGQWK5X.js +0 -3
- package/dist/gate-QA5J7UZA.js +0 -2
- package/dist/gate-XFFFX5ZF.js +0 -2
- package/dist/hold-passthrough-K5PP26CP.js +0 -2
- package/dist/ingest-S5R736ZV.js +0 -2
- package/dist/ingest-remote-C6AP2Q7E.js +0 -2
- package/dist/install-B26Y2NU4.js +0 -2
- package/dist/lane-7IEAE6AC.js +0 -2
- package/dist/lattice-auth-7EL4ET3P.js +0 -2
- package/dist/login-flow-CHLGQGHK.js +0 -2
- package/dist/open-provider-U26BBVUE.js +0 -2
- package/dist/pdf-convert-LMKOKLXT.js +0 -2
- package/dist/persist-recorded-session-4IRYG5CJ.js +0 -3
- package/dist/phase-seed-2H6OXZXT.js +0 -2
- package/dist/pipeline-U7D25NST.js +0 -2
- package/dist/readmodel-KXCFPL2M.js +0 -2
- package/dist/real-device-run-QODMDUXF.js +0 -2
- package/dist/reconcile-deps-2CTIFXDR.js +0 -2
- package/dist/registry-MZYBLEW2.js +0 -2
- package/dist/remote-entry-DW2J56N4.js +0 -2
- package/dist/revert-37346WLE.js +0 -2
- package/dist/run-JWOHNWA3.js +0 -2
- package/dist/run-QFJ6ZRVD.js +0 -2
- package/dist/run-remote-66QTUQ2M.js +0 -2
- package/dist/run-test-md-7DRWCSQE.js +0 -19
- package/dist/spawner-C7NLLM4F.js +0 -2
- package/dist/store-choice-4J2NN6OQ.js +0 -2
- package/dist/stream-warnings-N4KVVWXV.js +0 -2
- package/dist/sync-cmd-3CHSWWWW.js +0 -2
- package/dist/tcg-generate-IPD5FQUW.js +0 -2
- package/dist/testmd-actions-V7P7BMKE.js +0 -2
- package/dist/token-refresh-LR33BKAB.js +0 -2
- package/dist/verdicts-7GKZEDHV.js +0 -2
- package/dist/with-telemetry-62LW4VFI.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-LZPYIFHZ.js";import{a as p}from"./chunk-RQKMSNEU.js";import{f as e}from"./chunk-HYJVYYAZ.js";import{a as t,b as i,y as n}from"./chunk-J4FIESTB.js";import{dirname as d}from"path";import{fileURLToPath as l}from"url";import{existsSync as a}from"fs";import{join as c,resolve as f}from"path";function g(r){for(let o of[f(r,".."),f(r,"../..")])if(a(c(o,"package.json")))return o;return null}function u(r=m,o,s=p){e({version:t,baseDir:i,authEnvironments:n,packageRoot:g(d(l(import.meta.url))),wording:r,...o?{warn:o}:{},userSessionId:s})}u();export{g as a,u as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as c}from"./chunk-5D7ENQTQ.js";import{a as w}from"./chunk-2XW33VOK.js";import{d as h,h as g}from"./chunk-A7RJQJNT.js";import{c as b,j as v}from"./chunk-
|
|
2
|
+
import{b as c}from"./chunk-5D7ENQTQ.js";import{a as w}from"./chunk-2XW33VOK.js";import{d as h,h as g}from"./chunk-A7RJQJNT.js";import{c as b,j as v}from"./chunk-J4FIESTB.js";import{readFileSync as C,writeFileSync as k,mkdirSync as x,existsSync as T}from"fs";import{dirname as S}from"path";var f={window_size:{width:1920,height:1080},chrome_profile_path:"",default_url:v,model:"v16-alpha",project_id:null,project_name:null,folder_id:null,folder_name:null,mode:"testing",assertion_mode:"dom",network_ws:!1,network_sse:!1,bug_detection:"off",assertion_failure_mode:"stop",final_validation:!1,code_export:{enabled:!0,language:"python",skip_validation:!0},generate:{scenario_limit:2,per_scenario_limit:3,memory_enabled:!1},last_seen_version:"",hints_enabled:!0},I=f;function E(r){let{mobile:e,...o}=r,t={...o};delete t.target,delete t.device,delete t.device_name,delete t.os_version,delete t.app;let n=e??{};n.tui_target&&(t.target=n.tui_target);let s=n.default_target?.name?.trim(),l=n.default_target?.os_version?.trim();if(s||l)s&&(t.device_name=s),l&&(t.os_version=l);else{let i=n.default_target?.id?.trim();i&&(t.device=i)}n.default_app&&(t.app=n.default_app);let a={};n.no_reset!==void 0&&(a.no_reset=n.no_reset),n.appium_url!==void 0&&(a.appium_url=n.appium_url);for(let i of c)n[i]!==void 0&&(a[i]=n[i]);return Object.keys(a).length>0&&(t.mobile=a),t}function R(r){let e=r.mobile??{},o=typeof r.target=="string"?r.target:void 0,t=typeof r.device=="string"&&r.device.trim()!==""?r.device.trim():void 0,n=d=>typeof d=="string"&&d.trim()!==""?d.trim():void 0,s=n(r.device_name),l=n(r.os_version),a=typeof r.app=="string"&&r.app!==""?r.app:void 0,i={},_=o??e.tui_target;_&&(i.tui_target=_);let p=w(_,void 0).kind,u=h(p)?p:null;u&&(s||l)?i.default_target={platform:g(u),kind:u,...s?{name:s}:{},...l?{os_version:l}:{}}:u&&t?i.default_target={platform:g(u),kind:u,id:t}:(e.default_target?.id?.trim()||e.default_target?.name?.trim())&&(i.default_target=e.default_target);let m=a??e.default_app;m&&(i.default_app=m),e.no_reset!==void 0&&(i.no_reset=e.no_reset),e.appium_url!==void 0&&(i.appium_url=e.appium_url);for(let d of c)e[d]!==void 0&&(i[d]=e[d]);return Object.keys(i).length>0?i:void 0}var y=class{constructor(e=b){this.path=e}exists(){return T(this.path)}load(){try{let e=C(this.path,"utf-8"),o=JSON.parse(e),t=R(o),{target:n,device:s,app:l,...a}=o;return{...f,...a,...t?{mobile:t}:{},code_export:{...f.code_export,...o.code_export??{}},generate:{...f.generate,...o.generate??{}}}}catch{return{...f,code_export:{...f.code_export},generate:{...f.generate}}}}write(e){try{x(S(this.path),{recursive:!0}),k(this.path,JSON.stringify(E(e),null,2)+`
|
|
3
3
|
`)}catch(o){let t=o instanceof Error?o.message:String(o);process.stderr.write(`[config] Failed to save config: ${t}
|
|
4
4
|
`)}}set(e,o){let t=this.load();t[e]=o,this.write(t)}save(e){this.write({...this.load(),...e})}getMobile(){return this.load().mobile??{}}setMobile(e){let o={...this.getMobile()};for(let t of Object.keys(e)){let n=e[t];n===void 0?delete o[t]:o[t]=n}this.set("mobile",Object.keys(o).length>0?o:void 0)}writeRaw(e){this.write(e)}};export{I as a,y as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-
|
|
2
|
+
import{a as P}from"./chunk-YCVEI7BT.js";import{a as Y}from"./chunk-HCBYKLMW.js";import{a as c,b as l,i as X}from"./chunk-33DWJV67.js";import{a as Z}from"./chunk-6YGTRKDT.js";import{z as i}from"./chunk-J4FIESTB.js";import{e as O}from"./chunk-UR6MHSHU.js";var u=O(Z(),1);var e=O(Y(),1),d=5;function _(t,I){if(!I)return t;let a=I.toLowerCase();return t.filter(L=>L.label.toLowerCase().includes(a))}function U(t){let{title:I,items:a,loading:L=!1,loadingText:$,error:A=null,itemNoun:B="items",onSelect:k,onCancel:R,defaultActiveId:D,onTab:T,extraHint:w}=t,[b,s]=(0,u.useState)(0),[v,g]=(0,u.useState)(0),[f,M]=(0,u.useState)(""),[y,x]=(0,u.useState)(null),H=(0,u.useRef)(!1),N=!t.onSearch&&f!=="";(0,u.useEffect)(()=>{if(a.length===0||N)return;let n=D?a.findIndex(o=>o.id===D):a.findIndex(o=>o.isActive);if(t.preserveSelectionById&&!H.current&&n>=0&&a[n].id!==y){g(Math.floor(n/d)),s(n%d),x(a[n].id);return}if(t.preserveSelectionById&&y!==null){let o=a.findIndex(r=>r.id===y);if(o>=0){g(Math.floor(o/d)),s(o%d);return}}n>=0?(g(Math.floor(n/d)),s(n%d),t.preserveSelectionById&&x(a[n].id)):t.preserveSelectionById&&(g(0),s(0),x(a[0]?.id??null))},[a,D,t.preserveSelectionById,y,N]),(0,u.useEffect)(()=>{if(!t.onSearch)return;let n=setTimeout(()=>t.onSearch(f),t.searchDebounceMs??250);return()=>clearTimeout(n)},[f,t.onSearch,t.searchDebounceMs]);let m=t.onSearch?a:_(a,f),C=v*d,F=Math.min(C+d,m.length),E=Math.ceil(m.length/d),G=F-C,h=m.slice(C,F);return X((n,o)=>{if(H.current=!0,A){o.escape?R():o.tab&&T&&t.tabOnError&&T();return}if(o.escape){f?(M(""),s(0),g(0)):R();return}if(o.tab&&T){T();return}if(o.upArrow){if(b>0){let r=b-1;s(r),t.preserveSelectionById&&x(h[r]?.id??null)}else if(v>0){let r=v-1,S=d-1;g(r),s(S),t.preserveSelectionById&&x(m[r*d+S]?.id??null)}return}if(o.downArrow){if(b<G-1){let r=b+1;s(r),t.preserveSelectionById&&x(h[r]?.id??null)}else if(v<E-1){let r=v+1,S=0;g(r),s(S),t.preserveSelectionById&&x(m[r*d+S]?.id??null)}return}if(o.return&&h[b]){if(h[b].disabled)return;k(h[b]);return}if(o.backspace||o.delete){M(r=>r.slice(0,-1)),s(0),g(0);return}n&&!o.ctrl&&!o.meta&&(M(r=>r+n),s(0),g(0))},{isActive:!L}),L?(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:i.orange,bold:!0,children:I}),(0,e.jsx)(c,{marginTop:1,children:(0,e.jsx)(l,{color:i.secondary,children:$??`Loading ${B}\u2026`})})]}):A?(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.red,paddingX:2,paddingY:1,children:[(0,e.jsx)(l,{color:i.red,bold:!0,children:I}),(0,e.jsx)(c,{marginTop:1,children:(0,e.jsx)(l,{color:i.red,children:A})}),(0,e.jsx)(P,{bindings:t.tabOnError&&T&&w?[{keys:"tab",label:w}]:[],escBackLabel:t.escLabel??"back to chat"})]}):(0,e.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:i.orange,paddingX:2,paddingY:1,children:[(0,e.jsxs)(c,{children:[(0,e.jsx)(l,{color:i.orange,bold:!0,children:I}),(0,e.jsxs)(l,{color:i.dim,children:[" (",m.length,!t.onSearch&&f?`/${a.length}`:""," ",B,t.loadingMore?" \xB7 loading more":"",")"]})]}),(0,e.jsxs)(c,{marginTop:1,children:[(0,e.jsx)(l,{color:i.secondary,children:f?"filter: ":""}),f?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(l,{children:f}),(0,e.jsx)(l,{inverse:!0,children:" "})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(l,{color:i.dim,children:["Search ",B,"\u2026"]}),(0,e.jsx)(l,{inverse:!0,children:" "})]})]}),(0,e.jsx)(c,{flexDirection:"column",marginTop:1,children:t.searching?(0,e.jsxs)(l,{color:i.secondary,children:["Searching ",B,"\u2026"]}):m.length===0?(0,e.jsxs)(l,{color:i.dim,children:["No ",B,' match "',f,'"']}):h.map((n,o)=>{let r=o===b,S=r?"\u276F ":" ",K=n.disabled?i.muted:n.isActive?i.green:r?i.orange:void 0;return(0,e.jsxs)(c,{flexDirection:"column",children:[(0,e.jsxs)(l,{color:K,children:[S,n.label,n.isActive&&!n.disabled?" \u25CF selected":""]}),r&&n.disabled&&n.disabledHint&&(0,e.jsxs)(l,{color:i.red,children:[" ",n.disabledHint]})]},n.id)})}),!t.searching&&E>1&&(0,e.jsx)(c,{marginTop:1,children:(0,e.jsxs)(l,{color:i.dim,children:["Page ",v+1,"/",E]})}),t.footer&&(0,e.jsx)(c,{marginTop:1,flexDirection:"column",children:t.footer}),(0,e.jsx)(P,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"type",label:"to search"},...t.hideSelectOnDisabled&&h[b]?.disabled?[]:[{keys:"\u21B5",label:"select"}],...T&&w?[{keys:"tab",label:w}]:[]],escBackLabel:f?"clear":t.escLabel??"back to chat"})]})}export{U as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as h}from"./chunk-LX2I4JEH.js";import{c as u}from"./chunk-XB6BJPDL.js";import{oa as f}from"./chunk-
|
|
2
|
+
import{b as h}from"./chunk-LX2I4JEH.js";import{c as u}from"./chunk-XB6BJPDL.js";import{oa as f}from"./chunk-PI7OXS62.js";import{f as p}from"./chunk-KU3YHPWZ.js";function g(o,n){let t=o.recordsSince(null),i=new Set;for(let e of t)for(let r of e.review)r.resolution!=="pending"&&i.add(r.id);let s=[],c=new Set;for(let e=t.length-1;e>=0;e--)for(let r of t[e].dedup_hits??[]){if(r.new_cid===void 0)continue;let a=`${r.new_cid}|${r.candidate_cid}`;c.has(a)||(c.add(a),!i.has(r.new_cid)&&(n.superseded.has(r.new_cid)||n.superseded.has(r.candidate_cid)||n.trust.get(r.new_cid)==="derived"&&s.push({new_cid:r.new_cid,candidate_cid:r.candidate_cid,score:r.score,scorer:r.scorer})))}return s}var d=(o,n)=>o.displayNameOf(n)??n.slice(0,19);function w(o,n){return{design_children:o.edgesInto(n).filter(i=>(i.type==="belongs_to"||i.type==="scoped_to")&&!o.superseded.has(i.src)).length}}function v(o,n){let t=o.recordsSince(null),i=new Set,s=new Map;for(let e of t)for(let r of e.review)r.kind==="pending_archive"?s.set(r.id,r.reason):r.resolution!=="pending"&&i.add(r.id);let c=new Map;for(let[e,r]of s)n.superseded.has(e)||n.trust.get(e)!=="derived"||i.has(e)||c.set(e,r);return{all:s,live:c}}function R(o,n){o.store.prefetch(u(n),{token:null});let t=[],i=new Set;for(let e of g(o.store,n)){i.add(e.new_cid);let r=e.scorer==="lexical_fallback"?" (lexical fallback \u2014 the probe ran degraded)":"";t.push({kind:"PAIR",ref:d(n,e.new_cid),title:String(n.getNode(e.new_cid)?.content.title??e.new_cid.slice(0,12)),why:`possible duplicate of ${d(n,e.candidate_cid)} \u2014 score ${e.score}${r}`,pair:{candidate_cid:e.candidate_cid,candidate_ref:d(n,e.candidate_cid),score:e.score,scorer:e.scorer}})}let{all:s,live:c}=v(o.store,n);for(let[e,r]of c)t.push({kind:"REVIEW",ref:d(n,e),title:String(n.getNode(e)?.content.title??e.slice(0,12)),why:`archive held for interactive confirmation${r?` \u2014 ${r}`:""}`,held:!0,impact:w(n,e)});for(let e of y(o.store))t.push({kind:"MODIFY_HELD",ref:`${e.sid}:${e.tempRef}`,title:String(e.content.title??e.tempRef),why:`${e.rationale} \u2014 held by paused/dead session ${e.sid}`,heldPayload:e});for(let{cid:e,content:r}of n.byLabel(p.USECASE)){if(n.superseded.has(e)||n.trust.get(e)!=="derived"||i.has(e)||s.has(e))continue;let{sources:a,missing:l}=h(n,e),m=l.length===0?"":`; CITE_MISSING: ${l.map(_=>f(d(n,_))).join(", ")} cite nothing of ${a.join(", ")}`;t.push({kind:"REVIEW",ref:d(n,e),title:String(r.title??e.slice(0,12)),why:`unreviewed \u2014 approve, archive, or defer${m}`,impact:w(n,e)})}return t}function $(o,n){let t={REVIEW:0,PAIR:0,MODIFY_HELD:0};for(let i of R(o,n))t[i.kind]++;return t}function y(o){let n=[],t=o.sessions();for(let{sid:i}of t.list()){if(t.isLive(i))continue;let s=[],c=!1;try{let r=t.loadCheckpoint(i).kane;r?.pending?.proposals?.length&&(s=r.pending.proposals,c=!0)}catch{c=!1}if(!c)try{let e=t.peek(i);if(!e)continue;s=(e.pending?.proposals??[]).map(r=>({...r}))}catch{continue}for(let e of s)n.push({sid:i,tempRef:String(e.tempRef??e.temp_ref??"held"),...typeof e.event_id=="string"?{event_id:e.event_id}:{},label:String(e.label??"usecase"),content:e.content??{},rationale:String(e.rationale??"held payload")})}return n}export{w as a,v as b,R as c,$ as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as d,e as l}from"./chunk-
|
|
2
|
+
import{a as d,e as l}from"./chunk-HYJVYYAZ.js";var h=e=>`'${e.replace(/'/g,"'\\''")}'`,u=e=>e!==void 0?` --mode ${e}`:"",s=({verb:e,sid:t,mode:n})=>e==="design"?`kane-cli design tests --resume ${t}${u(n)}`:`kane-cli context extract --resume ${t}${u(n)}`,g=({ref:e,because:t,answers:n})=>`kane-cli maintain evolve ${e??"--from-stale"}${t?` --because ${h(t)}`:""} --mode agent`+n.map(i=>` --answer ${i.id}=${i.choice==="proceed"?1:2}`).join(""),r=e=>`kane-cli context extract --resume ${e}`,$=e=>/^[\w@%+=:,./-]+$/.test(e)?e:h(e),a=e=>e?`to review its source's change, run: ${e}`:"review its source's change with kane-cli maintain reconcile first",o="re-run kane-cli maintain reconcile to re-stage",c=e=>`retire it first (kane-cli context retire ${e}) or ingest under a different id with --as`,_=d({commands:{"next.resume_session":s,"next.resume_with_message":e=>`${s(e)} --message "<your words>"`,"next.resume_child":({sid:e})=>`kane-cli design tests --resume ${e}`,"next.design_use_case":({use_case:e,force:t})=>`kane-cli design tests --use-case ${e}${t?" --force":""}`,"next.review_use_case":({use_case:e})=>`kane-cli context review --approve ${e}`,"next.design_unreviewed":({use_case:e})=>`kane-cli design tests --use-case ${e} --mode agent --allow-unreviewed`,"next.view_design":({use_case:e})=>`kane-cli context view ${e}`,"next.evolve_design":({use_case:e})=>`kane-cli maintain evolve ${e}`,"next.redesign":({use_case:e})=>`kane-cli design tests --use-case ${e} --force --mode agent`,"next.design_phase":({use_case:e,phase:t,agent_mode:n})=>`kane-cli design tests --use-case ${e} --phase ${t}${n?" --mode agent":""}`,"next.answer_evolve":g,"next.abandon_session":({sid:e})=>`kane-cli context sessions clean ${e}`,"next.review_held_changeset":()=>"kane-cli maintain reconcile --apply","next.show_session":({sid:e})=>`kane-cli context sessions show ${e}`,"next.review_source":({source_id:e,from:t,agent_mode:n})=>t===null?null:`kane-cli maintain reconcile --from ${$(t)}${/^https?:\/\//.test(t)?"":` --source-id ${e}`}${n?" --mode agent":""}`},texts:{...l,"note.paused":e=>e.verb==="design"?`paused \u2014 resume with: ${s(e)}`:`paused: session ${e.sid} saved \u2014 resume with: ${s(e)}`,"note.crashed":e=>`agent crashed \u2014 session ${e.sid} is resumable at checkpoint seq ${e.seq} (at most the in-flight turn lost); resume with: ${s(e)}`,"note.model_unavailable_kept":e=>`the model service did not answer (${e.detail}) \u2014 session ${e.sid} is kept; resume with: ${s(e)}`,"note.model_retry":({seconds:e})=>`the model service is not answering; trying again in ${e}s`,"note.already_extracted":({source_id:e})=>`${e} already extracted \u2014 skipped (--force re-runs it)`,"note.conversation_source_skipped":({source_id:e})=>`skipped ${e} \u2014 conversation source; extract it explicitly with --source ${e}`,"note.reconcile_plan_pending":({source_id:e,pending:t,path:n})=>`note: a reconcile plan for ${e} is pending (${t} item(s)) \u2014 resume with \`kane-cli maintain reconcile --apply ${n}\``,"note.nothing_to_extract":({sources:e,count:t})=>`extract: nothing to do \u2014 ${e} ${t===1?"is":"are all"} already extracted at the current snapshot (--force to re-run)`,"note.only_conversation_sources":()=>"extract: nothing to do \u2014 only conversation sources here (extract one explicitly with --source <id>)","note.all_extracted":()=>"extract: nothing to do \u2014 every ingested source is already extracted","note.changeset_held_for_review":({held:e})=>`paused: ${e} held change(s) await your verdicts \u2014 review them in a terminal: kane-cli maintain reconcile --apply`,"note.held_for_review":({sid:e,mode:t,held:n})=>`paused: ${n} held item(s) await review \u2014 resume with: ${s({verb:"extract",sid:e,mode:t})}`,"note.session_kept":e=>`session ${e.sid} kept its last checkpoint (seq ${e.seq}, ${e.ts}) \u2014 resume with: ${s(e)}`,"note.assumed_defaults":({sid:e,count:t})=>`note: ${t} default(s) were assumed while you were away \u2014 kane-cli context sessions show ${e} lists them`,"note.landed_changed":({source_id:e})=>`note: ${e} changed after it was added \u2014 skipping its extraction this run; re-run kane-cli context extract to pick up the newer version`,"note.landed_older_queued":({source_id:e})=>`note: an older version of ${e} is already queued this run \u2014 the newly landed version is not extracted; re-run kane-cli context extract to pick it up`,"note.reingest_binary":({source_id:e,kind:t})=>`skipping ${e}: binary ${t} ingested before image support \u2014 re-ingest it (kane-cli context ingest) to extract from it`,"note.schedule_refused":()=>"this run holds items for review, so its extraction is not scheduled \u2014 kane-cli context extract runs it after the review","note.not_reached":()=>"run ended before its turn \u2014 kane-cli context extract runs it","note.nothing_committed":({source_id:e,remaining:t})=>`done \u2014 nothing committed for ${e} (no finalize before the session ended)`+(t>0?`; stopping here \u2014 ${t} remaining source(s) not extracted (re-run kane-cli context extract to continue)`:""),"note.landed_not_extracted":({count:e,sources:t})=>`note: ${e} source(s) landed this session (${t}) were not extracted \u2014 the session ended first; kane-cli context extract runs them`,"note.evidence_not_attached":({count:e})=>`note: ${e} unchanged match(es) target unreviewed (or no-longer-resolving) item(s) \u2014 evidence not attached (bless them with kane-cli context review; a later reconcile attaches)`,"note.sources_failed":({failed:e,total:t,sources:n})=>`${e} of ${t} source(s) failed \u2014 re-run kane-cli context extract to retry (${n})`,"note.already_designed":({use_case:e,version:t})=>`'${e}' is already designed @ v${t} \u2014 current; use --force to redesign`,"note.design_stale":({use_case:e,designed:t,current:n})=>`'${e}' was designed @ ${t} \u2014 the use-case is now @ v${n} (STALE); use --force to redesign`,"note.view_design":({use_case:e})=>`view the existing design: kane-cli context view ${e}`,"note.evolve_first":({use_case:e})=>`refresh it first: kane-cli maintain evolve ${e}`,"note.nothing_executed":()=>"nothing executed \u2014 list use-cases: kane-cli context list","note.tests_await_approval_command":({tests:e,criteria:t,criterion:n})=>{let i=e===1?"1 test checks":`${e} tests check`;return t===1&&n!==null?`note: ${i} a criterion not approved yet; to approve it, run:
|
|
3
3
|
kane-cli context review --approve ${n}`:`note: ${i} criteria not approved yet; to approve them, run:
|
|
4
4
|
kane-cli context review`},"note.links_await_approval":({count:e})=>`warning: ${e} test link(s) refer to items still awaiting approval \u2014 saved anyway; review and approve those items in chat or via kane-cli context review`,"note.no_design_skipped":({use_case:e})=>`note: ${e} has no design output \u2014 nothing to evolve; run kane-cli design tests --use-case ${e} first`,"note.no_design":({use_case:e})=>`nothing to evolve \u2014 run kane-cli design tests --use-case ${e} first (no design output)`,"note.design_paused":({use_case:e})=>`design session for ${e} paused \u2014 resume with \`kane-cli design tests --resume\`, then re-run evolve for the diff`,"note.nothing_changed":({ref:e})=>`nothing changed underneath ${e} \u2014 its sources and requirements are current; use --because "<reason>" to re-design anyway`,"note.source_changed_skipped":({use_case:e,review:t})=>`${e} is left out: it's out of date because its source changed \u2014 ${a(t)}`,"note.source_changed":({use_case:e,review:t})=>`${e} is out of date because its source changed, and an update can't change that \u2014 ${a(t)}`,"note.source_changed_after":({use_case:e,review:t})=>`${e} is still out of date because its source changed \u2014 ${a(t)}`,"note.checkpoint_not_saved":({error:e,chain_unverified:t})=>`warning: couldn't save the session checkpoint \u2014 ${e}; asking the agent to pause`+(t?". The store's record chain fails verification \u2014 run kane-cli context fsck to diagnose.":""),"note.held_no_event_id":({sid:e})=>`this held row has no durable event id \u2014 resume the owner to drop it: ${r(e)}`,"note.held_no_provenance":({sid:e})=>`this held row carries no committable provenance \u2014 resume the owner to apply it: ${r(e)}`,"note.held_no_citable_text":({sid:e,source_id:t,source_cid:n})=>`the pinned source ${t} (${n.slice(0,19)}) has no citable text to verify this held row against \u2014 resume the owner: ${r(e)}`,"note.held_unverified":({sid:e,errors:t})=>`held provenance does not verify against the pinned source (${t}) \u2014 resume the owner: ${r(e)}`,"note.controller_unreachable":({base:e,error:t})=>`error: cannot reach the controller at ${e} (${t})
|
|
5
5
|
hint: check your network connection and login (kane-cli whoami)`,"note.assurance_unsupported":()=>"error: this environment does not support assurance sessions yet (404) \u2014 update kane-cli, or contact support if the problem persists","note.credentials_rejected":({env:e})=>`error: your credentials were rejected (401) \u2014 run kane-cli login (active environment: ${e})`,"note.key_recycled":({source_id:e,what:t})=>`source '${e}' was ingested from a different ${t} that used this key \u2014 the key was recycled; ${c(e)}`,"note.kind_taken":({source_id:e,backing:t,kind:n})=>`source '${e}' is already backed by ${t}, not ${n} \u2014 ${c(e)}`,"note.site_moved":({source_id:e,previous:t,site:n})=>`source '${e}' was ingested from ${t}, but this read serves ${n} \u2014 ${c(e)}`,"note.web_url_changed":({source_id:e,previous:t})=>`source '${e}' was ingested from ${t} \u2014 re-run on a TTY to adopt the new URL as its next version, or ingest under a different id with --as`,"note.web_id_taken":({url:e})=>`skipped ${e} \u2014 ingest under a different id with --as to keep both pages`,"note.web_login":()=>"your credentials were rejected \u2014 run `kane-cli login` and retry","note.web_projection_unknown":({kind:e})=>`unknown web projection kind '${e}' \u2014 update kane-cli to read this source`,LIS_AUTH:()=>"credentials rejected \u2014 run `kane-cli login` and retry",MULTI_SOURCE_RESUME:({sid:e,sources:t})=>`error: session ${e} spans ${t} sources \u2014 multi-source resume isn't supported yet; committed work is preserved (re-run kane-cli context extract for anything remaining)`,CHANGE_BASIS_MOVED:({source_id:e,sid:t})=>`error: ${e} moved while this reconcile extraction was paused \u2014 its recorded change context no longer matches; re-run kane-cli maintain reconcile against the current file (session ${t} is defunct and can be ignored)`,PROPOSAL_UNREADABLE:({proposal:e})=>`proposal ${e} is unreadable \u2014 re-run maintain reconcile`,SOURCE_UNRESOLVED:({source_id:e})=>`the source ${e} no longer resolves \u2014 cannot verify this changeset is current; re-run maintain reconcile`,SOURCE_MOVED:({source_id:e})=>`the source ${e} moved again while this review was open \u2014 re-run maintain reconcile to refresh the changeset`,ARCHIVE_UNRESOLVED:({use_case:e})=>`its archive op no longer resolves to ${e} \u2014 re-run maintain reconcile`,POSTURE_IN_CHAT:({sid:e})=>`error: session ${e} is a held reconcile review \u2014 resumed in the chat its changes would commit without verdicts; review its cards with kane-cli maintain reconcile --apply`,SOURCE_MISSING:({sid:e,sources:t})=>`error: resumed session's paused source (${t}) is no longer in the corpus \u2014 restore/re-ingest it and re-run --resume ${e}, or discard with: kane-cli context sessions clean ${e}`,BLOB_MISSING:({source_id:e})=>`error: ${e}: its stored content is missing \u2014 re-ingest the file (kane-cli context ingest <file>) [BLOB_MISSING]`,"AGENT_FAILED.invalid_proposal":({source_id:e})=>`error: the agent could not produce a valid proposal for ${e} \u2014 re-run kane-cli context extract to retry`,UC_UNREVIEWED:({use_case:e})=>`${e} is unreviewed \u2014 approve it first, or pass --allow-unreviewed`,"UC_UNREVIEWED.merge_target":({temp_ref:e,target:t})=>`${e}: merge target ${t} is unreviewed (derived) \u2014 bless it first (kane-cli context review) and re-propose the merge`,UC_HELD:({use_case:e,owner_sid:t,stopped:n})=>`design: ${e} is being designed by another session`+(n?` \u2014 that session looks stopped; resume it with kane-cli design tests --resume ${t??"<session>"}`:"")+" \u2014 pick another use-case (kane-cli design tests) or wait for it to finish",GENERATION_LIVE:({use_case:e,gen:t})=>`${e} already has a live design generation (gen ${t}) \u2014 pass --force with --because to supersede it`,MESSAGE_TOO_LARGE:({bytes:e,max:t})=>`error: the opening statement is ${e} bytes and the agent takes at most ${t} per message (it would drop it silently) \u2014 pass a shorter --because (it replaces the generated stale reason)`,REASON_TOO_LARGE:()=>"nothing was started: that reason is too long; run it again with a sentence or two",SESSION_V1:({sid:e})=>`session ${e} predates durable checkpoints \u2014 this build cannot resume it; abandon it with kane-cli context sessions clean ${e} and start a fresh run (committed work is untouched)`,WRONG_VERB:({sid:e,verb:t})=>`error: session ${e} is a ${t} session \u2014 resume it with ${s({verb:t,sid:e})}`,"HELD_CITES_STALE.moved":()=>`the source moved after this plan staged \u2014 its quotes no longer verify against the current head; ${o}`,"HELD_CITES_STALE.predates_images":({where:e,anchor:t})=>`${e}: this plan predates image-part staging \u2014 ${t} cannot be verified against the version it staged under; ${o}`,"HELD_CITES_STALE.no_image":({where:e,anchor:t})=>`${e}: ${t} names no decodable image of the staged version \u2014 ${o}`,"HELD_CITES_STALE.image_moved":({where:e,anchor:t,gone:n})=>`${e}: the image behind ${t} is ${n?"no longer in":"ambiguous in"} the current head \u2014 ${o}`}});export{_ as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-YCVEI7BT.js";import{a as p}from"./chunk-HCBYKLMW.js";import{a,b as r,i as u}from"./chunk-33DWJV67.js";import{a as b}from"./chunk-6YGTRKDT.js";import{z as t}from"./chunk-J4FIESTB.js";import{e as n}from"./chunk-UR6MHSHU.js";var c=n(b(),1);var e=n(p(),1);function R({onSubmit:l}){let[o,f]=(0,c.useState)(0),s=(0,c.useRef)(!1);return u((x,i)=>{s.current||(i.leftArrow||i.rightArrow?f(d=>d===0?1:0):i.return?(s.current=!0,l(o===0?"positive":"negative")):i.escape&&(s.current=!0,l(null)))}),(0,e.jsxs)(a,{flexDirection:"column",marginTop:1,children:[(0,e.jsxs)(a,{children:[(0,e.jsx)(r,{color:t.secondary,children:"Rate this session: "}),(0,e.jsx)(r,{color:o===0?t.orange:t.dim,children:o===0?"[ \u{1F44D} ]":" \u{1F44D} "}),(0,e.jsx)(r,{children:" "}),(0,e.jsx)(r,{color:o===1?t.orange:t.dim,children:o===1?"[ \u{1F44E} ]":" \u{1F44E} "})]}),(0,e.jsx)(m,{bindings:[{keys:"\u2190/\u2192",label:"select"},{keys:"\u21B5",label:"submit"}],escBackLabel:"skip"})]})}export{R as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as B}from"./chunk-S3DAAAE5.js";import{a as g}from"./chunk-
|
|
2
|
+
import{b as B}from"./chunk-S3DAAAE5.js";import{a as g}from"./chunk-YVVFXBT5.js";import{a as w}from"./chunk-HCBYKLMW.js";import{a as x,b as t,c as h,i as P,j as S}from"./chunk-33DWJV67.js";import{a as C}from"./chunk-6YGTRKDT.js";import{z as s}from"./chunk-J4FIESTB.js";import{e as T}from"./chunk-UR6MHSHU.js";var o=T(C(),1);var e=T(w(),1);function D({defaultName:i,onSubmit:c}){let[d,p]=(0,o.useState)("confirm"),[f,a]=(0,o.useState)(""),[m,u]=(0,o.useState)(null),l=(0,o.useMemo)(()=>f.trim()||i,[f,i]);return P((n,r)=>{if(d==="confirm"){if(n==="y"||n==="Y"){a(i),p("name");return}if(n==="n"||n==="N"||r.escape||r.ctrl&&n==="c"){c(null);return}if(r.return){c(i);return}return}if(r.return){if(!B(l)){u(`name "${l}" is invalid; allowed: letters, digits, underscore, hyphen`);return}c(l);return}if(r.escape||r.ctrl&&n==="c"){c(null);return}if(r.backspace||r.delete){a(v=>v.slice(0,-1)),u(null);return}n&&!r.ctrl&&!r.meta&&(a(v=>v+n),u(null))}),d==="confirm"?(0,e.jsx)(g,{title:"Save session?",titleColor:"#ff9500",rows:[{label:"name",value:(0,e.jsx)(t,{color:s.orange,children:i})}],footer:(0,e.jsxs)(x,{flexDirection:"column",children:[(0,e.jsx)(t,{color:s.dim,children:"enter \u2014 save with this name"}),(0,e.jsx)(t,{color:s.dim,children:"Y \u2014 edit name"}),(0,e.jsx)(t,{color:s.dim,children:"N/esc \u2014 discard session"})]})}):(0,e.jsx)(g,{title:"Save session?",titleColor:"#ff9500",rows:[{label:"name",value:(0,e.jsxs)(x,{children:[(0,e.jsx)(t,{color:s.orange,children:f}),(0,e.jsx)(t,{inverse:!0,children:" "})]})}],footer:(0,e.jsxs)(x,{flexDirection:"column",children:[m&&(0,e.jsx)(t,{color:s.red,children:m}),(0,e.jsx)(t,{color:s.dim,children:"enter \u2014 save \xB7 esc \u2014 discard"})]})})}function V(){return new Date().toISOString().slice(0,19).replace(/:/g,"-")}async function Y(i){return new Promise(c=>{function d(){let{exit:a}=S(),[m,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(m){let l=setTimeout(()=>a(),50);return()=>clearTimeout(l)}},[m,a]),(0,e.jsx)(D,{defaultName:i,onSubmit:l=>{c(l),u(!0)}})}let{waitUntilExit:p,unmount:f}=h((0,e.jsx)(d,{}),{stdout:process.stderr,exitOnCtrlC:!1});p().then(()=>{try{f()}catch{}})})}export{D as a,V as b,Y as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as g}from"./chunk-TZXXJWHA.js";import{a as C}from"./chunk-
|
|
2
|
+
import{b as g}from"./chunk-TZXXJWHA.js";import{a as C}from"./chunk-YCVEI7BT.js";import{d as b,j as x,k as T,n as S}from"./chunk-A7RJQJNT.js";import{a as v}from"./chunk-HCBYKLMW.js";import{a,b as l,i as f}from"./chunk-33DWJV67.js";import{a as B}from"./chunk-6YGTRKDT.js";import{z as s}from"./chunk-J4FIESTB.js";import{e as h}from"./chunk-UR6MHSHU.js";var y=h(B(),1);var o=h(v(),1);function k(i,d=g()){let n=S(d);return(i==="all"?n:i==="devices"?n.filter(e=>b(e)):["emulator","simulator"].filter(e=>n.includes(e))).map(e=>({value:e,label:x(e),hint:T(e)}))}function H({mode:i="all",hostSupportsMobile:d=g(),onSelect:n,onCancel:c}){let e=k(i,d),[m,u]=(0,y.useState)(0);return f((p,t)=>{if(t.escape&&c){c();return}t.upArrow&&u(r=>Math.max(0,r-1)),t.downArrow&&u(r=>Math.min(e.length-1,r+1)),t.return&&n(e[m].value)}),(0,o.jsxs)(a,{flexDirection:"column",borderStyle:"round",borderColor:s.orange,paddingX:2,paddingY:1,children:[(0,o.jsx)(l,{color:s.orange,bold:!0,children:i==="all"?"Where should tests run?":"Which kind of device?"}),(0,o.jsx)(a,{marginTop:1,flexDirection:"column",children:e.map((p,t)=>{let r=t===m;return(0,o.jsxs)(a,{children:[(0,o.jsxs)(l,{color:r?s.orange:void 0,children:[r?"\u276F ":" ",p.label]}),(0,o.jsxs)(l,{color:s.dim,children:[" ",p.hint]})]},p.value)})}),(0,o.jsx)(a,{marginTop:1,children:(0,o.jsx)(l,{color:s.dim,children:"You can change this any time with /desktop or /mobile."})}),(0,o.jsx)(C,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"select"}],suppressEscBack:!c,escBackLabel:"skip"})]})}export{H as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as L}from"./chunk-
|
|
2
|
+
import{e as L}from"./chunk-X2MDL6S4.js";async function T(n,i,c){let[h,d,l,m,a]=await Promise.all([c.includes("source")?n.sources(i):Promise.resolve([]),c.includes("usecase")?n.nodes(i,"usecase"):Promise.resolve([]),c.includes("usecase")?n.stale(i):Promise.resolve([]),c.includes("scenario")?n.nodes(i,"scenario"):Promise.resolve([]),c.includes("test")?n.nodes(i,"test"):Promise.resolve([])]),o=new Set;for(let e of l.filter(s=>s.label==="scenario"&&(s.freshness==="stale"||s.freshness==="orphaned"))){let s=await n.mainNode(i,e.cid);for(let t of s.edgesOut)t.type==="belongs_to"&&t.other?.name&&(t.other.freshness==="superseded"||t.other.supersededBy)&&o.add(t.other.name)}let r=h.filter(e=>e.head!==null).map(e=>{let s=L(e.origin);return{id:e.sourceId,label:"source",title:e.sourceId,trust:"-",fresh:"fresh",upToDate:"yes",...s?{shown:s}:{}}}),R=d.map(e=>{let s=e.name??"-";if(e.trust==="archived")return{id:s,label:"usecase",title:e.title??"",trust:e.trust,fresh:"-",upToDate:"archived"};let t=e.name!==null&&o.has(e.name),u=e.freshness??"fresh",f=u==="stale"?"source_changed":u==="orphaned"?"source_removed":t?"tests_out_of_date":"yes";return{id:s,label:"usecase",title:e.title??"",trust:e.trust,fresh:u,...t?{testsFresh:"stale"}:{},upToDate:f}}),g=(e,s)=>e.map(t=>{let u=t.name??"-",f=t.title??"";if(t.trust==="archived")return{id:u,label:s,title:f,trust:t.trust,fresh:"-",upToDate:"archived"};let w=t.freshness??"fresh",b=w==="stale"?"designed_from_changed":w==="orphaned"?"source_removed":"yes";return{id:u,label:s,title:f,trust:t.trust,fresh:w,upToDate:b}}),y=g(m,"scenario"),_=g(a,"test"),v=e=>Number(/^[a-z]+-(\d+)$/i.exec(e.id)?.[1]??Number.MAX_SAFE_INTEGER),p=(e,s)=>v(e)-v(s)||e.title.localeCompare(s.title);return r.sort((e,s)=>e.id.localeCompare(s.id)),R.sort(p),y.sort(p),_.sort(p),[...r,...R,...y,..._]}async function P(n,i){let c=(await n.nodes(i,"test")).filter(a=>a.trust!=="archived"),h=new Set((await n.nodes(i,"scenario")).filter(a=>a.trust==="archived").map(a=>a.cid)),d=new Set;for(let a of c){let o=await n.mainNode(i,a.cid);for(let r of o.edgesOut)r.type==="automates"&&r.other!==null&&d.add(r.other.cid)}let l=new Set,m=new Set;for(let a of d){let o=await n.mainNode(i,a);for(let r=0;o.supersededBy!==null&&o.supersededBy!==""&&r<64;r++)o=await n.mainNode(i,o.supersededBy);if(!(o.supersededBy===""||m.has(o.cid))&&(m.add(o.cid),!h.has(o.cid)))for(let r of o.edgesOut)r.type==="belongs_to"&&r.other?.name&&l.add(r.other.name)}return l}export{T as a,P as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h,c as j}from"./chunk-
|
|
2
|
+
import{a as h,c as j}from"./chunk-FOLUB336.js";import{q as H}from"./chunk-7V34ZMMS.js";import{f as m,g as y}from"./chunk-KU3YHPWZ.js";function E(e,t){let n=/^(.*?)(\d+)$/.exec(e),r=/^(.*?)(\d+)$/.exec(t);return n&&r&&n[1]===r[1]?Number(n[2])-Number(r[2]):e<t?-1:e>t?1:0}var R=(e,t)=>e.nameOf.get(t)??t,k=(e,t)=>!e.superseded.has(t);function de(e,t,n=r=>k(e,r)){return e.byLabel(m.SCENARIO).filter(({cid:r})=>n(r)).filter(({cid:r})=>e.edgesFrom(r).some(i=>i.type===y.BELONGS_TO&&e.tipOf(i.dst)===t)).map(({cid:r})=>r)}function ue(e,t,n=R){let r=e.tipOf(t),i=e.getNode(t)?.content??{},d=e.derivesInto(r).filter(o=>!e.superseded.has(o.ecid)),a=[...new Set(d.map(o=>String(o.props?.source_id??"")).filter(Boolean))].sort(),f=a.map(o=>{let p=e.heads.get(o);if(typeof p!="string")return{id:o};let l=e.getNode(p)?.content.blob;return{id:o,media_type:e.mediaOf(p).media_type,...typeof l=="string"?{cid:l}:{}}}),c=d[0],x=new Map;for(let o of d)o.props?.source_id&&o.props?.source_cid&&x.set(String(o.props.source_id),String(o.props.source_cid));let S=a.filter(o=>{let p=e.heads.get(o),l=x.get(o);return p!=null&&l!==void 0&&p!==l}).sort(),b=e.edgesFrom(t).filter(o=>o.type===y.DEPENDS_ON&&!e.superseded.has(o.ecid)).map(o=>q(e,o.dst,n)).filter(o=>o!==null).sort();return{id:n(e,t),title:String(i.title??""),...i.description||i.summary?{description:String(i.description??i.summary)}:{},...Array.isArray(i.actors)&&i.actors.length?{actors:i.actors.map(String)}:{},...i.value?{value:String(i.value)}:{},risk:String(i.risk??""),status:e.trust.get(t)==="trusted"?"approved":"draft",sources:f,...S.length?{stale_sources:S}:{},...b.length?{depends_on:b}:{},...c?{provenance:{derived_from:`${String(c.props?.source_id??"")}#${String(c.props?.anchor??"")}`}}:{}}}function fe(e,t,n=i=>k(e,i),r=R){let i=e.getNode(t)?.content??{},d=e.edgesFrom(t).filter(a=>a.type===y.EXERCISES&&!e.superseded.has(a.ecid)&&n(e.tipOf(a.dst))).map(a=>r(e,e.tipOf(a.dst))).sort();return{id:r(e,t),case_type:String(i.case_type??""),intent:String(i.intent??""),exercises:d}}function pe(e){if(!e.kind&&!e.expected_answer)return{};let t=e.expected_answer??{};return{expected_answer:{...e.kind?{kind:String(e.kind)}:{},statement:String(e.text??""),...t.operator!==void 0?{operator:t.operator}:{},...t.operand!==void 0?{operand:t.operand}:{}}}}function L(e,t,n,r){return t?.find(i=>i.ac_cid&&n?e.tipOf(i.ac_cid)===e.tipOf(n):i.ac_ref===r)?.verdict}function le(e){return e.byLabel(m.GAP).filter(({cid:t})=>k(e,t)&&e.trust.get(t)!=="archived").map(({cid:t,content:n})=>({ref:R(e,t),kind:String(n.kind??""),...n.risk?{risk:String(n.risk)}:{},...n.question?{question:B(n.question)}:{}})).sort((t,n)=>t.ref<n.ref?-1:1)}function B(e){if(typeof e=="string")return e;let t=e?.header;return typeof t=="string"?t:""}function q(e,t,n=R){let r=e.tipOf(t);return e.nodeLabel.get(r)!==m.USECASE||!k(e,r)?null:n(e,r)}var A=Object.freeze({high:1.25,med:1,low:.75,unknown:1}),be=Object.freeze({proven:"proven",partial:"partial",failing:"failing",not_run:"not run",not_designed:"not designed",no_criteria:"no criteria"});function ve(e){return e.usecases.total-e.usecases.not_designed-e.usecases.no_criteria}var we=(e,t)=>{let n=e.getNode(t)?.content;return typeof n?.test_md_blob=="string"&&n.test_md_blob!==""?H(e,n.test_md_blob):typeof n?.definitionId=="string"?n.definitionId:null};function he(e){return t=>e.execHistory(t).filter(n=>!n.drift_flag&&e.tipOf(n.about)===n.about)}function z(e){let t=[],n=0;for(let{cid:r}of e.byLabel(m.USECASE))h(e,r)&&(e.stale(r)==="orphaned"?n++:t.push(r));return{inScope:t,orphaned:n}}function K(e,t){let n=new Map([...t].map(r=>[r,[]]));for(let{cid:r}of e.byLabel(m.AC)){if(!h(e,r))continue;let i=j(e,r);i!==null&&n.get(i)?.push(r)}return n}function J(e){return e==="high"||e==="med"||e==="low"?A[e]:A.unknown}var I=(e,t)=>e.displayNameOf(t)??t;function X(e,t){let n=new Set;for(let r of e.edgesInto(t)){if(r.type!==y.VERIFIES||e.superseded.has(r.ecid))continue;let i=e.tipOf(r.src);h(e,i)&&n.add(i)}return[...n]}function Y(e,t,n,r,i){let d=I(e,n),a=[];for(let f of r)for(let c of t(f))i!==void 0&&!i.has(c.execution_id)||a.push({verdict:String(L(e,c.per_ac,n,d)??c.verdict),at:String(c.started_at),executionId:String(c.execution_id),manual:c.manual===!0,fact:c});return a}var P={failed:3,broken:2,skipped:1,passed:0};function Q(e,t){if(e.at!==t.at)return e.at>t.at;let n=P[e.verdict]??0,r=P[t.verdict]??0;return n!==r?n>r:e.executionId>t.executionId}function $(e){let t;for(let n of e)(t===void 0||Q(n,t))&&(t=n);return t}function Z(e,t){let n=new Map;for(let i of e.derivesInto(t)){if(e.superseded.has(i.ecid))continue;let d=i.props?.source_id,a=i.props?.source_cid;typeof d=="string"&&typeof a=="string"&&n.set(d,a)}let r=[];for(let[i,d]of n){let a=e.heads.get(i);a==null||a===d||e.convChains.get(i)?.chain.includes(d)||r.push(i)}return r}function ee(e){let t=[];for(let[n,r]of e.heads){if(r===null||e.convChains.has(n))continue;let i=e.extractionCompleteness.get(n);(!i||i.completeness!=="complete"||i.source_cid!==r)&&t.push(n)}return t.sort()}function te(e){return e.length===0?"no_criteria":e.some(t=>t!=="not_designed")?e.every(t=>t==="proven")?"proven":e.includes("failing")?"failing":e.includes("proven")?"partial":"not_run":"not_designed"}function Re(e){let{graph:t,runs:n,thisRun:r}=e,{inScope:i,orphaned:d}=z(t),a=K(t,new Set(i)),f={},c=[],x=new Set,S=!1;for(let s of i){let u=I(t,s),N=t.getNode(s)?.content??{},G=String(N.risk??""),_=[],D=new Set,F=!1;for(let g of a.get(s)??[]){let W=I(t,g),T=X(t,g),C=Y(t,n,g,T,r),v=$(C.filter(w=>w.verdict==="passed"||w.verdict==="failed")),V=T.length===0?"not_designed":v===void 0?"not_run":v.verdict==="passed"?"proven":"failing",O=r===void 0?void 0:$(C);v&&(S=!0),O&&(F=!0);for(let w of C)w.manual&&D.add(w.executionId);_.push(V),f[W]={state:V,uc:u,...v?{deciding_run:v.executionId}:{},...O?{this_run:O.verdict}:{}}}let U=Z(t,s);for(let g of U)x.add(g);let M=_.filter(g=>g==="proven").length;c.push({id:u,title:String(N.title??""),risk:G,weight:J(G),state:te(_),pct:_.length===0?0:M/_.length*100,criteria:_.length,proven:M,manual_runs:D.size,stale:U.length>0,...F?{this_run:!0}:{}})}c.sort((s,u)=>E(s.id,u.id));let b=c.reduce((s,u)=>s+u.weight,0),o={total:c.length,proven:0,partial:0,failing:0,not_run:0,not_designed:0,no_criteria:0};for(let s of c)o[s.state]++;let p=Object.keys(f).sort(E),l=s=>f[s].this_run==="passed"||f[s].this_run==="failed"?f[s].this_run:void 0;return{coverage_version:2,scope:r===void 0?"project":"run",config:{rule:"newest_counted_verdict",weighting:e.weighting??"risk",weights:A},pct:b===0?0:c.reduce((s,u)=>s+u.weight*u.pct,0)/b,...r===void 0&&!S?{note:"nothing_run_yet"}:{},usecases:o,criteria:{total:c.reduce((s,u)=>s+u.criteria,0),proven:c.reduce((s,u)=>s+u.proven,0)},perUc:c,perAc:f,flags:{stale_sources:x.size,sources_not_fully_extracted:ee(t),orphaned_usecases:d},...r===void 0?{}:{this_run:{usecases:c.filter(s=>s.this_run).map(s=>s.id),criteria_passed:p.filter(s=>l(s)==="passed"),criteria_failed:p.filter(s=>l(s)==="failed")}}}}export{E as a,de as b,ue as c,fe as d,pe as e,le as f,A as g,be as h,ve as i,we as j,he as k,z as l,K as m,I as n,X as o,Y as p,$ as q,Re as r};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as bt}from"./chunk-LX2I4JEH.js";import{a as St}from"./chunk-PCDIEYV6.js";import{a as gt,b as mt,d as ht,e as _t}from"./chunk-KDR662D2.js";import{F as ct,H as dt,L as at,M as ft,P as le,W as ut,a as st,b as Ie,ba as pt,f as nt,g as it,oa as X,pa as lt,r as ot,v as rt}from"./chunk-Z777GGHB.js";import{d as pe,e as W,f as _,g,h as Ze,i as et,j as tt}from"./chunk-KU3YHPWZ.js";var Pt=/\s@verifies\s+(ac-[\w.:\/-]+(?:\s*,\s*ac-[\w.:\/-]+)*)\s*$/,Lt=new Set([g.EXERCISES,g.VERIFIES,g.SCOPED_TO]),Y=n=>({record:null,errors:n,minted:{},logicalIds:{},superseded:[],warnings:[],finalizedTests:{}});function J(n){return n.toLowerCase().trim().replace(/\s+/g," ")}function yt(n,E,t,l,f){return y=>{if(!f||!W.has(String(y.kind))||!(y.kind==="unmeasurable"||l==="tests")||y.ref&&(t.scenarios??[]).some(T=>T.temp_ref===y.ref))return!0;let O=y.ref?n.resolve(y.ref):null;return!!(O&&n.nodeLabel.get(O.cid)===_.SCENARIO&&!n.superseded.has(n.tipOf(O.cid))&&n.edgesFrom(n.tipOf(O.cid)).some(T=>T.type===g.BELONGS_TO&&n.tipOf(T.dst)===E))}}function Ot(n){let E=new Set;return n.sections.scenarios?.length&&E.add(_.SCENARIO),n.sections.tests?.length&&E.add(_.TEST),n.gen8&&(n.sections.tests?.length||n.phase==="tests"&&n.gapsToMint.some(t=>W.has(String(t.kind))))&&(E.add(_.TEST),E.add(_.GAP)),E}function Et(n,E,t){let l=new Set,f=[];for(let y of E)n.superseded.has(y)||(t.has(n.nodeLabel.get(y)??"")?l.add(y):f.push(y));return{retired:l,remaining:f}}function ss(n,E){let t=n.tokenAt(E.seq),l=t===null?null:n.intentOf(t);if(l===null)return null;let f=l.args,y=l.pins.forceScope;if(l.verb!=="design"||f.forceScope==null||!Array.isArray(y)||!f.sections||!f.ucRef)return;let O=E.seq>1?n.tokenAt(E.seq-1):null;if(O===null)return null;let T=ft(n,{token:O}),F=le(T,f.ucRef);if(!F.ok)return null;let R=pe(f.templateVersion)>=8,C=(f.sections.gaps??[]).filter(yt(T,F.cid,f.sections,f.phase,R));return Et(T,y,Ot({sections:f.sections,phase:f.phase,gen8:R,gapsToMint:C})).remaining}function Ft(n,E,t={}){let l=le(n,E);if(!l.ok)return[];let f=new Set,y=new Set;for(let{cid:O}of n.byLabel(_.SCENARIO))if(!n.superseded.has(O)&&n.edgesFrom(O).some(T=>T.type===g.BELONGS_TO&&n.tipOf(T.dst)===l.cid)){f.add(O),y.add(O),y.add(n.tipOf(O));for(let T of n.edgesInto(O))T.type!==g.AUTOMATES||n.superseded.has(T.src)||f.add(T.src)}if(t.blockerGaps){let O=new Set([l.cid,n.tipOf(l.cid)]);for(let{cid:T,content:F}of n.byLabel(_.GAP)){if(n.superseded.has(T)||n.trust.get(T)==="archived"||!W.has(String(F.kind??"")))continue;let R=typeof F.uc=="string"?F.uc:"";if(!O.has(R)&&!O.has(n.tipOf(R)))continue;let C=F.ref,k=typeof C=="string"&&C?n.resolve(C):null;k&&(y.has(k.cid)||y.has(n.tipOf(k.cid)))&&f.add(T)}}return[...f]}function ns(n){let{store:E,graph:t,sections:l,by:f}=n,y=n.engine??"design@1",O=E.head(),T=E.serialize(O);if(!E.sameToken(E.parse(t.latestHash),O))return Y([{code:"STALE_BASIS",detail:`graph opened at ${String(t.latestHash)} but chain head is ${String(T)} \u2014 re-open and retry`}]);let F=le(t,n.ucRef);if(!F.ok)return Y([{code:"UNKNOWN_UC",detail:`${n.ucRef} is not a live use-case`}]);let R=F.cid,C={ucRef:R,automates:{},verifies:{},reuses:{},scope:{},depends_on:{},exercises:[],scoped_to_repoints:[],judgements:[],body_tags:{},forceScope:[]},k=[],Ae=/^design@(\d+)$/.exec(n.templateVersion??""),Q=pe(n.templateVersion)>=8,Ne=yt(t,R,l,n.phase,Q),te=(l.gaps??[]).filter(Ne),Tt=Ae!==null&&Number.parseInt(Ae[1],10)>=3,De=new Map,$t=(e,i)=>{let s=De.get(e.source_cid);if(s===void 0){let p=rt(E,t,e.source_cid);s=p?St(p.toString("utf8")):null,De.set(e.source_cid,s)}if(s===null)return k.push({code:"CITE_UNVERIFIED",detail:`${i}: source ${e.source_id} (${e.source_cid.slice(0,19)}) has no citable text to verify against`}),!1;let u=ct(t.mediaOf(e.source_cid),e,s);if(u.length>0){for(let p of u)k.push({code:"CITE_UNVERIFIED",detail:`${i}: ${p.code}: ${p.detail}`});return!1}return!0},xe=pe(n.templateVersion)>=9,kt=(e,i)=>{let s=e.source_cid?t.mediaOf(e.source_cid):void 0;if(!e.source_cid||!t.hasNode(e.source_cid)&&s==null)return{code:"CITE_SOURCE_UNKNOWN",detail:`${i}: there is no source ${e.source_id} in this store to cite \u2014 cite a source the use case reads, by its id`};if(s?.plugin?.cites_deep===!0)return null;let u=s?.format==="plugin"?`version ${e.source_cid.slice(0,19)} of ${e.source_id} was stored before its plugin allowed citations below the use case (or by a plugin that does not allow them) \u2014 re-ingest it, or cite it at the use case`:`${e.source_id} is not a source-plugin source that allows citations below the use case \u2014 cite it at the use case instead, or leave this item's cites out`;return{code:"CITE_DEPTH_UNSUPPORTED",detail:`${i}: ${u}`}},ge=(e,i,s,u,p)=>{for(let m of i??[]){if(u){let a=kt(m,`${s}.cite`);if(a){k.push(a);continue}}if(Tt&&!$t(m,`${s}.cite`))continue;let x={source_id:m.source_id,source_cid:m.source_cid,anchor:m.anchor,...m.quote?{quote:m.quote}:{}},G=Ct.one(e,x,p);if("fault"in G){k.push(G.fault);continue}B(g.DERIVES,m.source_cid,e,G.props,`${s}.cite`)}},vt=()=>xe?bt(t,R):[],P=[],M=[],N=[],me=[],re=[],w={},q={},he={},L=[],Z=[],H=[],Pe=new Set,_e=[],ce=new Set,Le=n.forceScope??(n.force?Ft(t,n.ucRef,{blockerGaps:Q}):[]);C.forceScope=[...Le];let{retired:U,remaining:Fe}=Et(t,Le,Ot({sections:l,phase:n.phase,gen8:Q,gapsToMint:te})),V=new Set,be=e=>!t.superseded.has(e)&&(!U.has(e)||V.has(e)),j=(e,i,s)=>{if(w[e])return w[e];let u=t.resolve(e),p=u?be(u.cid)?u.cid:t.tipOf(u.cid):null;return!u||!p||!be(p)?(k.push({code:"UNKNOWN_REF",detail:`${i}: '${e}' is neither in this payload nor a live committed node`}),null):s&&t.nodeLabel.get(p)!==s?(k.push({code:"ILLEGAL_EDGE",detail:`${i}: '${e}' is a ${t.nodeLabel.get(p)}, expected ${s}`}),null):p},Rt=(e,i,s,u)=>{if(t.nameOf.has(i)){q[u]=t.nameOf.get(i);return}let p=lt(e,m=>Pe.has(m),t.names.keys());p!==null&&(Pe.add(p),me.push({cid:i,slug:p,by:f}),q[u]=p)},de=(e,i,s,u)=>{for(let m of Ze(e,s))k.push({code:m.code,detail:`${i}: ${m.detail}`});let p=st(e,s);if(t.hasNode(p)&&!t.superseded.has(p))return U.has(p)&&V.add(p),w[i]=p,p;if(t.hasNode(p)&&t.superseded.has(p)){let m=X(t.nameOf.get(p)??p),x=t.tipOf(p),G=x!==p&&!t.superseded.has(x);return k.push(G?{code:"NODE_SUPERSEDED",detail:`${i}: '${u}' is ${m} as it was before it was replaced by ${X(t.nameOf.get(x)??x)} \u2014 refer to ${X(t.nameOf.get(x)??x)} to keep it, or send it changed`}:{code:"NODE_TOMBSTONED",detail:`${i}: '${u}' is ${m}, which was retired \u2014 a retired item can't come back as it was; send it changed (it is then a new item), or leave it out`}),null}return P.push({cid:p,label:e,content:s}),w[i]=p,Rt(e,p,u,i),p},Ct=it(nt(E,t)),B=(e,i,s,u,p)=>{let m=Ie(e,i,s,u);if(t.edgesFrom(i).some(d=>d.ecid===m&&!t.superseded.has(d.ecid))){e===g.AUTOMATES&&ce.add(s);return}if(t.superseded.has(m)){k.push({code:"EDGE_RETRACTED",detail:`${p}: this ${e} edge was retracted (${m}) \u2014 retraction is terminal for commits. Add a NEW relationship (different endpoint or props), redesign, or revert the retracting record`});return}if(Lt.has(e)&&t.hasNode(i)&&!t.superseded.has(i)&&t.hasNode(s)&&!t.superseded.has(s)){let d=t.displayNameOf(s);for(let c of t.edgesFrom(i))c.type!==e||c.dst===s||t.superseded.has(c.ecid)||!t.superseded.has(c.dst)||t.tipOf(c.dst)!==s||d===null||t.displayNameOf(c.dst)!==d||N.some(v=>v.kind==="edge"&&v.ecid===c.ecid)||N.push({kind:"edge",ecid:c.ecid,reason:`re-pinned onto ${s} (the same link to its live version) by ${f.id}`,by:f})}let x=t.nodeLabel.get(i)??P.find(d=>d.cid===i)?.label??"(unknown)",G=t.nodeLabel.get(s)??P.find(d=>d.cid===s)?.label??"(unknown)";for(let d of tt(e,x,G,u))k.push({code:d.code,detail:`${p}: ${d.detail}`});let a=ut(t,e,i,s,_e);if(a){k.push({code:a.code,detail:`${p}: ${a.detail}`});return}if(e===g.BELONGS_TO||e===g.SCOPED_TO){let d=dt(t,{type:e,src:i,dst:s},{pending:_e,retracted:new Set(N.flatMap(c=>c.kind==="edge"?[c.ecid]:[])),freed:new Set([...U].filter(c=>!V.has(c)))},p);if(d){k.push(d);return}}if(e===g.AUTOMATES){if(ce.has(s)){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: two automates onto ${s} in one record (strict 1:1)`});return}if(ce.add(s),!U.has(s)||V.has(s)){let d=h=>U.has(h)&&!V.has(h);if(t.edgesFrom(i).some(h=>h.type===g.AUTOMATES&&h.dst!==s&&!t.superseded.has(h.dst)&&!d(h.dst))&&t.hasNode(i)){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: automates from ${i} already has a live edge \u2014 supersede it first`});return}if(t.edgesInto(s).some(h=>h.type===g.AUTOMATES&&h.src!==i&&!t.superseded.has(h.src)&&!d(h.src))){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: automates onto ${s} already has a live edge \u2014 strict 1:1, supersede it first`});return}}}M.push({ecid:Ie(e,i,s,u),type:e,src:i,dst:s,props:u}),_e.push({src:i,dst:s,type:e})},Se=new Set;for(let e of te)e.kind==="budget-evicted"&&e.ref&&Se.add(e.ref);let K=[];for(let[e,i]of(l.gaps??[]).entries()){if(Ne(i))continue;let s=i.temp_ref??i.ref??"gap";K.push(e),L.push(`${s} not committed: a ${i.kind} gap stands in for a scenario's test \u2014 ref must be that scenario's committed id (sc-N) or its temp_ref in this payload; got ${i.ref?`'${i.ref}'`:"no ref"}`)}let Me=()=>{for(let e of te){let i=e.temp_ref??e.ref??"gap",s=e.question;if(!s||typeof s!="object"||!s.header||!Array.isArray(s.options)||s.options.length===0||!Number.isInteger(s.recommended_index)){k.push({code:"GAP_QUESTION_INCOMPLETE",detail:`${i}: design gaps carry a full ranked question object (header/options/recommended_index)`});continue}let u=e.ref?Q?w[e.ref]??e.ref:e.ref:void 0,p={kind:e.kind,question:s,derived:!0,uc:R,...e.risk?{risk:e.risk}:{},...e.risk_rationale?{risk_rationale:e.risk_rationale}:{},...e.text?{text:e.text}:{},...u?{ref:u}:{}};de(_.GAP,i,p,String(s.header))}};Q||Me();let ae=n.lineage===2,D={reuseOf:{seen:0,honored:0,linked:0,unresolved:0},byPair:0,byCriteria:0,byTitle:0},fe=[],ye={},Oe=new Map;if(ae)for(let e of l.scenarios??[]){if(typeof e.reuse_of!="string"||!e.reuse_of)continue;D.reuseOf.seen+=1;let i=t.resolve(e.reuse_of),s=i?t.superseded.has(i.cid)?t.tipOf(i.cid):i.cid:null;if(!(s!==null&&!t.superseded.has(s)&&t.nodeLabel.get(s)===_.SCENARIO&&t.edgesFrom(s).some(p=>p.type===g.BELONGS_TO&&t.tipOf(p.dst)===R))){D.reuseOf.unresolved+=1,fe.push(`${e.temp_ref}: reuse_of '${e.reuse_of}' names no scenario of this use case \u2014 saved as a new scenario`);continue}Oe.set(e.temp_ref,s),ye[e.temp_ref]=s}let Ge=new Map;for(let{cid:e,content:i}of t.byLabel(_.SCENARIO))be(e)&&t.edgesFrom(e).some(s=>s.type===g.BELONGS_TO&&t.tipOf(s.dst)===R)&&Ge.set(J(String(i.title??"")),e);for(let e of l.scenarios??[]){let i=Oe.get(e.temp_ref);if(i!==void 0&&!U.has(i))if(t.edgesInto(i).some(m=>m.type===g.AUTOMATES&&!t.superseded.has(m.ecid)&&!t.superseded.has(m.src))&&(l.tests??[]).some(m=>m.automates===e.temp_ref))fe.push(`${e.temp_ref}: reuse_of '${e.reuse_of}' names a scenario that already has its test \u2014 saved as a new scenario`);else{w[e.temp_ref]=i;let m=t.displayNameOf(i);m&&(q[e.temp_ref]=m),D.reuseOf.linked+=1;continue}let s=Ge.get(J(e.title));if(s){k.push({code:"DUPLICATE_SCENARIO",detail:`${e.temp_ref}: '${e.title}' duplicates live scenario ${t.nameOf.get(s)??s} \u2014 exercise/link it instead (reuse before minting)`});continue}let u={title:e.title,intent:e.intent,case_type:e.case_type,derived:!0,...e.technique_notes?{technique_notes:e.technique_notes}:{},...e.description?{description:e.description}:{},...e.parameters?{parameters:e.parameters}:{},...e.tags?{tags:e.tags}:{}};de(_.SCENARIO,e.temp_ref,u,e.title)}for(let e of l.scenarios??[]){let i=w[e.temp_ref];if(i){B(g.BELONGS_TO,i,R,{},e.temp_ref);for(let s of e.depends_on??[]){let u=j(s,`${e.temp_ref}.depends_on`,_.SCENARIO);u&&((C.depends_on[e.temp_ref]??=[]).push(u),B(g.DEPENDS_ON,i,u,{},`${e.temp_ref}.depends_on`))}ge(i,e.cites,e.temp_ref,!0,M)}}for(let e of l.acs??[]){let i={text:e.text,kind:e.kind,risk:e.risk,derived:!0,...e.expected_answer?{expected_answer:e.expected_answer}:{},...e.measurable!==void 0?{measurable:e.measurable}:{}},s=de(_.AC,e.temp_ref,i,e.text);if(!s)continue;let u=e.scope?.type==="scenario"&&e.scope.ref?j(e.scope.ref,`${e.temp_ref}.scope`,_.SCENARIO):R;u&&u!==R&&(C.scope[e.temp_ref]=u),u&&!t.edgesFrom(s).some(p=>p.type===g.SCOPED_TO&&!t.superseded.has(p.ecid))&&B(g.SCOPED_TO,s,u,{},`${e.temp_ref}.scope`),ge(s,e.cites,e.temp_ref,xe,M)}for(let e of l.exercises??[]){let i=j(e.scenario,"exercises.scenario",_.SCENARIO),s=j(e.ac,"exercises.ac",_.AC);!i||!s||(C.exercises.push({scenario:i,ac:s}),B(g.EXERCISES,i,s,{},`exercises ${e.scenario}\u2192${e.ac}`))}let Be=0;for(let e of l.scoped_to_repoints??[]){let i=j(e.ac,"scoped_to_repoints.ac",_.AC),s=j(e.to,"scoped_to_repoints.to");if(!i||!s)continue;C.scoped_to_repoints.push({ac:i,to:s});let u=t.edgesFrom(i).find(p=>p.type===g.SCOPED_TO&&!t.superseded.has(p.ecid));if(u&&u.dst===s){Be+=1,L.push(`scoped_to_repoints ${e.ac}: already scoped to ${e.to} \u2014 no-op`);continue}u&&N.push({kind:"edge",ecid:u.ecid,reason:`re-scoped to ${e.to} by ${f.id}`,by:f}),B(g.SCOPED_TO,i,s,{},`scoped_to_repoints ${e.ac}`)}let Ue=new Map;if(n.finalizeTestBody)for(let[e,i]of t.nameOf)Ue.set(t.tipOf(e),i);let je=e=>t.nameOf.get(e)??Ue.get(t.tipOf(e))??null,Ee=e=>{if(w[e])return w[e];let i=t.resolve(e);return i?t.names.has(e)&&!t.superseded.has(i.cid)?i.cid:t.tipOf(i.cid):null},wt=e=>{let i=Ee(e);if(!i&&n.strict)throw new Error(`UNMAPPED_REF: '${e}' resolves to nothing on this graph`);return i?w[e]?q[e]??je(i):t.names.has(e)?e:je(i):null};Q&&Me();for(let e of l.tests??[]){for(let a of e.reuses??[])Se.has(a)&&k.push({code:"REUSES_EVICTED",detail:`${e.temp_ref}: reuses '${a}' which was budget-evicted \u2014 drop the edge; the dependent gap names the missing @import`});{let a=c=>c==="emulator"||c==="simulator"?c:"web",d=c=>{let v=(l.tests??[]).find(z=>z.temp_ref===c);if(v)return a(v.target);let h=t.resolve(c),b=h?t.getNode(t.tipOf(h.cid)??h.cid)?.content:void 0;if(typeof b?.target=="string")return a(String(b.target));let I=/^\s*\[mobile:\s*(emulator|simulator)\]/m.exec(String(b?.test_md_blob??""));return I?I[1]:"web"};for(let c of e.reuses??[]){let v=a(e.target),h=d(c);v!==h&&k.push({code:"REUSES_CROSS_SURFACE",detail:`${e.temp_ref}: reuses '${c}' which runs on ${h} while this test runs on ${v} \u2014 a test imports only same-surface units`})}}let i=e.test_md_blob,s=e.definitionId,u=e.objectives_blob;if(n.finalizeTestBody){let a;try{a=n.finalizeTestBody({temp_ref:e.temp_ref,test_md_blob:e.test_md_blob,verifies:e.verifies,reuses:e.reuses??[]},wt)}catch(d){return Y([{code:"FINALIZE_BODY",detail:`${e.temp_ref}: ${d instanceof Error?d.message:String(d)}`}])}a&&(i=a.test_md_blob,s=a.definitionId,u=a.objectives_blob??u,he[e.temp_ref]=s)}let p={title:e.title,check:e.check,definitionId:s,derived:!0,...e.config?{config:e.config}:{},...i?{test_md_blob:i}:{},...u?{objectives_blob:u}:{},...e.surface_required!==void 0?{surface_required:e.surface_required}:{},...e.target?{target:e.target}:{},...e.app&&e.target?{app:e.app}:{}},m=de(_.TEST,e.temp_ref,p,e.title);if(!m)continue;ge(m,e.cites,e.temp_ref,!0,M);let x=j(e.automates,`${e.temp_ref}.automates`,_.SCENARIO);x&&(C.automates[e.temp_ref]=x,B(g.AUTOMATES,m,x,{},`${e.temp_ref}.automates`)),C.verifies[e.temp_ref]=[];for(let a of e.verifies){let d=j(a,`${e.temp_ref}.verifies`,_.AC);d&&(C.verifies[e.temp_ref].push(d),B(g.VERIFIES,m,d,{},`${e.temp_ref}.verifies`))}C.reuses[e.temp_ref]=[];for(let a of e.reuses??[]){if(Se.has(a))continue;let d=j(a,`${e.temp_ref}.reuses`,_.TEST);d&&(C.reuses[e.temp_ref].push(d),B(g.REUSES,m,d,{},`${e.temp_ref}.reuses`))}for(let a of e.verifies){let d=Ee(a)??void 0;d&&(t.trust.get(d)??"derived")==="derived"&&!P.some(c=>c.cid===d)?(L.push(`${e.temp_ref}: verifies ${a} which is still DERIVED (unapproved) \u2014 committed anyway; approve it in chat or via review`),Z.push({test:e.temp_ref,criterion:d})):d&&w[a]===d&&(l.acs??[]).some(c=>c.temp_ref===a)&&(L.push(`${e.temp_ref}: verifies ${a} minted in this same record (unapproved) \u2014 committed anyway; approve it in chat`),Z.push({test:e.temp_ref,criterion:d}))}if(!String(e.test_md_blob??"").split(`
|
|
2
|
+
import{a as bt}from"./chunk-LX2I4JEH.js";import{a as St}from"./chunk-GEZVC4S3.js";import{a as gt,b as mt,d as ht,e as _t}from"./chunk-3KY7HHQU.js";import{F as ct,H as dt,L as at,M as ft,P as le,W as ut,a as st,b as Ie,ba as pt,f as nt,g as it,oa as X,pa as lt,r as ot,v as rt}from"./chunk-PI7OXS62.js";import{d as pe,e as W,f as _,g,h as Ze,i as et,j as tt}from"./chunk-KU3YHPWZ.js";var Pt=/\s@verifies\s+(ac-[\w.:\/-]+(?:\s*,\s*ac-[\w.:\/-]+)*)\s*$/,Lt=new Set([g.EXERCISES,g.VERIFIES,g.SCOPED_TO]),Y=n=>({record:null,errors:n,minted:{},logicalIds:{},superseded:[],warnings:[],finalizedTests:{}});function J(n){return n.toLowerCase().trim().replace(/\s+/g," ")}function yt(n,E,t,l,f){return y=>{if(!f||!W.has(String(y.kind))||!(y.kind==="unmeasurable"||l==="tests")||y.ref&&(t.scenarios??[]).some(T=>T.temp_ref===y.ref))return!0;let O=y.ref?n.resolve(y.ref):null;return!!(O&&n.nodeLabel.get(O.cid)===_.SCENARIO&&!n.superseded.has(n.tipOf(O.cid))&&n.edgesFrom(n.tipOf(O.cid)).some(T=>T.type===g.BELONGS_TO&&n.tipOf(T.dst)===E))}}function Ot(n){let E=new Set;return n.sections.scenarios?.length&&E.add(_.SCENARIO),n.sections.tests?.length&&E.add(_.TEST),n.gen8&&(n.sections.tests?.length||n.phase==="tests"&&n.gapsToMint.some(t=>W.has(String(t.kind))))&&(E.add(_.TEST),E.add(_.GAP)),E}function Et(n,E,t){let l=new Set,f=[];for(let y of E)n.superseded.has(y)||(t.has(n.nodeLabel.get(y)??"")?l.add(y):f.push(y));return{retired:l,remaining:f}}function ss(n,E){let t=n.tokenAt(E.seq),l=t===null?null:n.intentOf(t);if(l===null)return null;let f=l.args,y=l.pins.forceScope;if(l.verb!=="design"||f.forceScope==null||!Array.isArray(y)||!f.sections||!f.ucRef)return;let O=E.seq>1?n.tokenAt(E.seq-1):null;if(O===null)return null;let T=ft(n,{token:O}),F=le(T,f.ucRef);if(!F.ok)return null;let R=pe(f.templateVersion)>=8,C=(f.sections.gaps??[]).filter(yt(T,F.cid,f.sections,f.phase,R));return Et(T,y,Ot({sections:f.sections,phase:f.phase,gen8:R,gapsToMint:C})).remaining}function Ft(n,E,t={}){let l=le(n,E);if(!l.ok)return[];let f=new Set,y=new Set;for(let{cid:O}of n.byLabel(_.SCENARIO))if(!n.superseded.has(O)&&n.edgesFrom(O).some(T=>T.type===g.BELONGS_TO&&n.tipOf(T.dst)===l.cid)){f.add(O),y.add(O),y.add(n.tipOf(O));for(let T of n.edgesInto(O))T.type!==g.AUTOMATES||n.superseded.has(T.src)||f.add(T.src)}if(t.blockerGaps){let O=new Set([l.cid,n.tipOf(l.cid)]);for(let{cid:T,content:F}of n.byLabel(_.GAP)){if(n.superseded.has(T)||n.trust.get(T)==="archived"||!W.has(String(F.kind??"")))continue;let R=typeof F.uc=="string"?F.uc:"";if(!O.has(R)&&!O.has(n.tipOf(R)))continue;let C=F.ref,k=typeof C=="string"&&C?n.resolve(C):null;k&&(y.has(k.cid)||y.has(n.tipOf(k.cid)))&&f.add(T)}}return[...f]}function ns(n){let{store:E,graph:t,sections:l,by:f}=n,y=n.engine??"design@1",O=E.head(),T=E.serialize(O);if(!E.sameToken(E.parse(t.latestHash),O))return Y([{code:"STALE_BASIS",detail:`graph opened at ${String(t.latestHash)} but chain head is ${String(T)} \u2014 re-open and retry`}]);let F=le(t,n.ucRef);if(!F.ok)return Y([{code:"UNKNOWN_UC",detail:`${n.ucRef} is not a live use-case`}]);let R=F.cid,C={ucRef:R,automates:{},verifies:{},reuses:{},scope:{},depends_on:{},exercises:[],scoped_to_repoints:[],judgements:[],body_tags:{},forceScope:[]},k=[],Ae=/^design@(\d+)$/.exec(n.templateVersion??""),Q=pe(n.templateVersion)>=8,Ne=yt(t,R,l,n.phase,Q),te=(l.gaps??[]).filter(Ne),Tt=Ae!==null&&Number.parseInt(Ae[1],10)>=3,De=new Map,$t=(e,i)=>{let s=De.get(e.source_cid);if(s===void 0){let p=rt(E,t,e.source_cid);s=p?St(p.toString("utf8")):null,De.set(e.source_cid,s)}if(s===null)return k.push({code:"CITE_UNVERIFIED",detail:`${i}: source ${e.source_id} (${e.source_cid.slice(0,19)}) has no citable text to verify against`}),!1;let u=ct(t.mediaOf(e.source_cid),e,s);if(u.length>0){for(let p of u)k.push({code:"CITE_UNVERIFIED",detail:`${i}: ${p.code}: ${p.detail}`});return!1}return!0},xe=pe(n.templateVersion)>=9,kt=(e,i)=>{let s=e.source_cid?t.mediaOf(e.source_cid):void 0;if(!e.source_cid||!t.hasNode(e.source_cid)&&s==null)return{code:"CITE_SOURCE_UNKNOWN",detail:`${i}: there is no source ${e.source_id} in this store to cite \u2014 cite a source the use case reads, by its id`};if(s?.plugin?.cites_deep===!0)return null;let u=s?.format==="plugin"?`version ${e.source_cid.slice(0,19)} of ${e.source_id} was stored before its plugin allowed citations below the use case (or by a plugin that does not allow them) \u2014 re-ingest it, or cite it at the use case`:`${e.source_id} is not a source-plugin source that allows citations below the use case \u2014 cite it at the use case instead, or leave this item's cites out`;return{code:"CITE_DEPTH_UNSUPPORTED",detail:`${i}: ${u}`}},ge=(e,i,s,u,p)=>{for(let m of i??[]){if(u){let a=kt(m,`${s}.cite`);if(a){k.push(a);continue}}if(Tt&&!$t(m,`${s}.cite`))continue;let x={source_id:m.source_id,source_cid:m.source_cid,anchor:m.anchor,...m.quote?{quote:m.quote}:{}},G=Ct.one(e,x,p);if("fault"in G){k.push(G.fault);continue}B(g.DERIVES,m.source_cid,e,G.props,`${s}.cite`)}},vt=()=>xe?bt(t,R):[],P=[],M=[],N=[],me=[],re=[],w={},q={},he={},L=[],Z=[],H=[],Pe=new Set,_e=[],ce=new Set,Le=n.forceScope??(n.force?Ft(t,n.ucRef,{blockerGaps:Q}):[]);C.forceScope=[...Le];let{retired:U,remaining:Fe}=Et(t,Le,Ot({sections:l,phase:n.phase,gen8:Q,gapsToMint:te})),V=new Set,be=e=>!t.superseded.has(e)&&(!U.has(e)||V.has(e)),j=(e,i,s)=>{if(w[e])return w[e];let u=t.resolve(e),p=u?be(u.cid)?u.cid:t.tipOf(u.cid):null;return!u||!p||!be(p)?(k.push({code:"UNKNOWN_REF",detail:`${i}: '${e}' is neither in this payload nor a live committed node`}),null):s&&t.nodeLabel.get(p)!==s?(k.push({code:"ILLEGAL_EDGE",detail:`${i}: '${e}' is a ${t.nodeLabel.get(p)}, expected ${s}`}),null):p},Rt=(e,i,s,u)=>{if(t.nameOf.has(i)){q[u]=t.nameOf.get(i);return}let p=lt(e,m=>Pe.has(m),t.names.keys());p!==null&&(Pe.add(p),me.push({cid:i,slug:p,by:f}),q[u]=p)},de=(e,i,s,u)=>{for(let m of Ze(e,s))k.push({code:m.code,detail:`${i}: ${m.detail}`});let p=st(e,s);if(t.hasNode(p)&&!t.superseded.has(p))return U.has(p)&&V.add(p),w[i]=p,p;if(t.hasNode(p)&&t.superseded.has(p)){let m=X(t.nameOf.get(p)??p),x=t.tipOf(p),G=x!==p&&!t.superseded.has(x);return k.push(G?{code:"NODE_SUPERSEDED",detail:`${i}: '${u}' is ${m} as it was before it was replaced by ${X(t.nameOf.get(x)??x)} \u2014 refer to ${X(t.nameOf.get(x)??x)} to keep it, or send it changed`}:{code:"NODE_TOMBSTONED",detail:`${i}: '${u}' is ${m}, which was retired \u2014 a retired item can't come back as it was; send it changed (it is then a new item), or leave it out`}),null}return P.push({cid:p,label:e,content:s}),w[i]=p,Rt(e,p,u,i),p},Ct=it(nt(E,t)),B=(e,i,s,u,p)=>{let m=Ie(e,i,s,u);if(t.edgesFrom(i).some(d=>d.ecid===m&&!t.superseded.has(d.ecid))){e===g.AUTOMATES&&ce.add(s);return}if(t.superseded.has(m)){k.push({code:"EDGE_RETRACTED",detail:`${p}: this ${e} edge was retracted (${m}) \u2014 retraction is terminal for commits. Add a NEW relationship (different endpoint or props), redesign, or revert the retracting record`});return}if(Lt.has(e)&&t.hasNode(i)&&!t.superseded.has(i)&&t.hasNode(s)&&!t.superseded.has(s)){let d=t.displayNameOf(s);for(let c of t.edgesFrom(i))c.type!==e||c.dst===s||t.superseded.has(c.ecid)||!t.superseded.has(c.dst)||t.tipOf(c.dst)!==s||d===null||t.displayNameOf(c.dst)!==d||N.some(v=>v.kind==="edge"&&v.ecid===c.ecid)||N.push({kind:"edge",ecid:c.ecid,reason:`re-pinned onto ${s} (the same link to its live version) by ${f.id}`,by:f})}let x=t.nodeLabel.get(i)??P.find(d=>d.cid===i)?.label??"(unknown)",G=t.nodeLabel.get(s)??P.find(d=>d.cid===s)?.label??"(unknown)";for(let d of tt(e,x,G,u))k.push({code:d.code,detail:`${p}: ${d.detail}`});let a=ut(t,e,i,s,_e);if(a){k.push({code:a.code,detail:`${p}: ${a.detail}`});return}if(e===g.BELONGS_TO||e===g.SCOPED_TO){let d=dt(t,{type:e,src:i,dst:s},{pending:_e,retracted:new Set(N.flatMap(c=>c.kind==="edge"?[c.ecid]:[])),freed:new Set([...U].filter(c=>!V.has(c)))},p);if(d){k.push(d);return}}if(e===g.AUTOMATES){if(ce.has(s)){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: two automates onto ${s} in one record (strict 1:1)`});return}if(ce.add(s),!U.has(s)||V.has(s)){let d=h=>U.has(h)&&!V.has(h);if(t.edgesFrom(i).some(h=>h.type===g.AUTOMATES&&h.dst!==s&&!t.superseded.has(h.dst)&&!d(h.dst))&&t.hasNode(i)){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: automates from ${i} already has a live edge \u2014 supersede it first`});return}if(t.edgesInto(s).some(h=>h.type===g.AUTOMATES&&h.src!==i&&!t.superseded.has(h.src)&&!d(h.src))){k.push({code:"CARDINALITY_VIOLATION",detail:`${p}: automates onto ${s} already has a live edge \u2014 strict 1:1, supersede it first`});return}}}M.push({ecid:Ie(e,i,s,u),type:e,src:i,dst:s,props:u}),_e.push({src:i,dst:s,type:e})},Se=new Set;for(let e of te)e.kind==="budget-evicted"&&e.ref&&Se.add(e.ref);let K=[];for(let[e,i]of(l.gaps??[]).entries()){if(Ne(i))continue;let s=i.temp_ref??i.ref??"gap";K.push(e),L.push(`${s} not committed: a ${i.kind} gap stands in for a scenario's test \u2014 ref must be that scenario's committed id (sc-N) or its temp_ref in this payload; got ${i.ref?`'${i.ref}'`:"no ref"}`)}let Me=()=>{for(let e of te){let i=e.temp_ref??e.ref??"gap",s=e.question;if(!s||typeof s!="object"||!s.header||!Array.isArray(s.options)||s.options.length===0||!Number.isInteger(s.recommended_index)){k.push({code:"GAP_QUESTION_INCOMPLETE",detail:`${i}: design gaps carry a full ranked question object (header/options/recommended_index)`});continue}let u=e.ref?Q?w[e.ref]??e.ref:e.ref:void 0,p={kind:e.kind,question:s,derived:!0,uc:R,...e.risk?{risk:e.risk}:{},...e.risk_rationale?{risk_rationale:e.risk_rationale}:{},...e.text?{text:e.text}:{},...u?{ref:u}:{}};de(_.GAP,i,p,String(s.header))}};Q||Me();let ae=n.lineage===2,D={reuseOf:{seen:0,honored:0,linked:0,unresolved:0},byPair:0,byCriteria:0,byTitle:0},fe=[],ye={},Oe=new Map;if(ae)for(let e of l.scenarios??[]){if(typeof e.reuse_of!="string"||!e.reuse_of)continue;D.reuseOf.seen+=1;let i=t.resolve(e.reuse_of),s=i?t.superseded.has(i.cid)?t.tipOf(i.cid):i.cid:null;if(!(s!==null&&!t.superseded.has(s)&&t.nodeLabel.get(s)===_.SCENARIO&&t.edgesFrom(s).some(p=>p.type===g.BELONGS_TO&&t.tipOf(p.dst)===R))){D.reuseOf.unresolved+=1,fe.push(`${e.temp_ref}: reuse_of '${e.reuse_of}' names no scenario of this use case \u2014 saved as a new scenario`);continue}Oe.set(e.temp_ref,s),ye[e.temp_ref]=s}let Ge=new Map;for(let{cid:e,content:i}of t.byLabel(_.SCENARIO))be(e)&&t.edgesFrom(e).some(s=>s.type===g.BELONGS_TO&&t.tipOf(s.dst)===R)&&Ge.set(J(String(i.title??"")),e);for(let e of l.scenarios??[]){let i=Oe.get(e.temp_ref);if(i!==void 0&&!U.has(i))if(t.edgesInto(i).some(m=>m.type===g.AUTOMATES&&!t.superseded.has(m.ecid)&&!t.superseded.has(m.src))&&(l.tests??[]).some(m=>m.automates===e.temp_ref))fe.push(`${e.temp_ref}: reuse_of '${e.reuse_of}' names a scenario that already has its test \u2014 saved as a new scenario`);else{w[e.temp_ref]=i;let m=t.displayNameOf(i);m&&(q[e.temp_ref]=m),D.reuseOf.linked+=1;continue}let s=Ge.get(J(e.title));if(s){k.push({code:"DUPLICATE_SCENARIO",detail:`${e.temp_ref}: '${e.title}' duplicates live scenario ${t.nameOf.get(s)??s} \u2014 exercise/link it instead (reuse before minting)`});continue}let u={title:e.title,intent:e.intent,case_type:e.case_type,derived:!0,...e.technique_notes?{technique_notes:e.technique_notes}:{},...e.description?{description:e.description}:{},...e.parameters?{parameters:e.parameters}:{},...e.tags?{tags:e.tags}:{}};de(_.SCENARIO,e.temp_ref,u,e.title)}for(let e of l.scenarios??[]){let i=w[e.temp_ref];if(i){B(g.BELONGS_TO,i,R,{},e.temp_ref);for(let s of e.depends_on??[]){let u=j(s,`${e.temp_ref}.depends_on`,_.SCENARIO);u&&((C.depends_on[e.temp_ref]??=[]).push(u),B(g.DEPENDS_ON,i,u,{},`${e.temp_ref}.depends_on`))}ge(i,e.cites,e.temp_ref,!0,M)}}for(let e of l.acs??[]){let i={text:e.text,kind:e.kind,risk:e.risk,derived:!0,...e.expected_answer?{expected_answer:e.expected_answer}:{},...e.measurable!==void 0?{measurable:e.measurable}:{}},s=de(_.AC,e.temp_ref,i,e.text);if(!s)continue;let u=e.scope?.type==="scenario"&&e.scope.ref?j(e.scope.ref,`${e.temp_ref}.scope`,_.SCENARIO):R;u&&u!==R&&(C.scope[e.temp_ref]=u),u&&!t.edgesFrom(s).some(p=>p.type===g.SCOPED_TO&&!t.superseded.has(p.ecid))&&B(g.SCOPED_TO,s,u,{},`${e.temp_ref}.scope`),ge(s,e.cites,e.temp_ref,xe,M)}for(let e of l.exercises??[]){let i=j(e.scenario,"exercises.scenario",_.SCENARIO),s=j(e.ac,"exercises.ac",_.AC);!i||!s||(C.exercises.push({scenario:i,ac:s}),B(g.EXERCISES,i,s,{},`exercises ${e.scenario}\u2192${e.ac}`))}let Be=0;for(let e of l.scoped_to_repoints??[]){let i=j(e.ac,"scoped_to_repoints.ac",_.AC),s=j(e.to,"scoped_to_repoints.to");if(!i||!s)continue;C.scoped_to_repoints.push({ac:i,to:s});let u=t.edgesFrom(i).find(p=>p.type===g.SCOPED_TO&&!t.superseded.has(p.ecid));if(u&&u.dst===s){Be+=1,L.push(`scoped_to_repoints ${e.ac}: already scoped to ${e.to} \u2014 no-op`);continue}u&&N.push({kind:"edge",ecid:u.ecid,reason:`re-scoped to ${e.to} by ${f.id}`,by:f}),B(g.SCOPED_TO,i,s,{},`scoped_to_repoints ${e.ac}`)}let Ue=new Map;if(n.finalizeTestBody)for(let[e,i]of t.nameOf)Ue.set(t.tipOf(e),i);let je=e=>t.nameOf.get(e)??Ue.get(t.tipOf(e))??null,Ee=e=>{if(w[e])return w[e];let i=t.resolve(e);return i?t.names.has(e)&&!t.superseded.has(i.cid)?i.cid:t.tipOf(i.cid):null},wt=e=>{let i=Ee(e);if(!i&&n.strict)throw new Error(`UNMAPPED_REF: '${e}' resolves to nothing on this graph`);return i?w[e]?q[e]??je(i):t.names.has(e)?e:je(i):null};Q&&Me();for(let e of l.tests??[]){for(let a of e.reuses??[])Se.has(a)&&k.push({code:"REUSES_EVICTED",detail:`${e.temp_ref}: reuses '${a}' which was budget-evicted \u2014 drop the edge; the dependent gap names the missing @import`});{let a=c=>c==="emulator"||c==="simulator"?c:"web",d=c=>{let v=(l.tests??[]).find(z=>z.temp_ref===c);if(v)return a(v.target);let h=t.resolve(c),b=h?t.getNode(t.tipOf(h.cid)??h.cid)?.content:void 0;if(typeof b?.target=="string")return a(String(b.target));let I=/^\s*\[mobile:\s*(emulator|simulator)\]/m.exec(String(b?.test_md_blob??""));return I?I[1]:"web"};for(let c of e.reuses??[]){let v=a(e.target),h=d(c);v!==h&&k.push({code:"REUSES_CROSS_SURFACE",detail:`${e.temp_ref}: reuses '${c}' which runs on ${h} while this test runs on ${v} \u2014 a test imports only same-surface units`})}}let i=e.test_md_blob,s=e.definitionId,u=e.objectives_blob;if(n.finalizeTestBody){let a;try{a=n.finalizeTestBody({temp_ref:e.temp_ref,test_md_blob:e.test_md_blob,verifies:e.verifies,reuses:e.reuses??[]},wt)}catch(d){return Y([{code:"FINALIZE_BODY",detail:`${e.temp_ref}: ${d instanceof Error?d.message:String(d)}`}])}a&&(i=a.test_md_blob,s=a.definitionId,u=a.objectives_blob??u,he[e.temp_ref]=s)}let p={title:e.title,check:e.check,definitionId:s,derived:!0,...e.config?{config:e.config}:{},...i?{test_md_blob:i}:{},...u?{objectives_blob:u}:{},...e.surface_required!==void 0?{surface_required:e.surface_required}:{},...e.target?{target:e.target}:{},...e.app&&e.target?{app:e.app}:{}},m=de(_.TEST,e.temp_ref,p,e.title);if(!m)continue;ge(m,e.cites,e.temp_ref,!0,M);let x=j(e.automates,`${e.temp_ref}.automates`,_.SCENARIO);x&&(C.automates[e.temp_ref]=x,B(g.AUTOMATES,m,x,{},`${e.temp_ref}.automates`)),C.verifies[e.temp_ref]=[];for(let a of e.verifies){let d=j(a,`${e.temp_ref}.verifies`,_.AC);d&&(C.verifies[e.temp_ref].push(d),B(g.VERIFIES,m,d,{},`${e.temp_ref}.verifies`))}C.reuses[e.temp_ref]=[];for(let a of e.reuses??[]){if(Se.has(a))continue;let d=j(a,`${e.temp_ref}.reuses`,_.TEST);d&&(C.reuses[e.temp_ref].push(d),B(g.REUSES,m,d,{},`${e.temp_ref}.reuses`))}for(let a of e.verifies){let d=Ee(a)??void 0;d&&(t.trust.get(d)??"derived")==="derived"&&!P.some(c=>c.cid===d)?(L.push(`${e.temp_ref}: verifies ${a} which is still DERIVED (unapproved) \u2014 committed anyway; approve it in chat or via review`),Z.push({test:e.temp_ref,criterion:d})):d&&w[a]===d&&(l.acs??[]).some(c=>c.temp_ref===a)&&(L.push(`${e.temp_ref}: verifies ${a} minted in this same record (unapproved) \u2014 committed anyway; approve it in chat`),Z.push({test:e.temp_ref,criterion:d}))}if(!String(e.test_md_blob??"").split(`
|
|
3
3
|
`).some(a=>/^##\s/.test(a)&&!/—\s?assert/.test(a)&&Pt.test(a))&&e.verifies.length>1){let a=e.check?.verified_against;L.push(`${e.temp_ref}: verifies ${e.verifies.length} ACs but machine-asserts only 1 (check.verified_against=${a!=null?String(a):"?"}) \u2014 the rest ride prose only`)}}let se=[];for(let e of l.tests??[]){let i={};for(let s of Gt(e.test_md_blob,e.objectives_blob)){let u=Ee(s);u?i[s]=u:se.push(`${e.temp_ref}: body tag '${s}' resolves to nothing`)}C.body_tags[e.temp_ref]=i,se.push(...Mt(e.temp_ref,i,[...C.verifies[e.temp_ref]??[],...C.reuses[e.temp_ref]??[]]))}if(se.length>0){if(n.strict)return Y(se.map(e=>({code:"BODY_EDGE_MISMATCH",detail:e})));L.push(...se.map(e=>`integrity: ${e}`))}let ee=[];{let e=(a,d)=>`${a??""}\0${J(String(d??""))}`,i=(a,d)=>n.reason?`${n.reason} \u2014 evolve by ${f.id}${d?` (${d})`:""}`:a,s=a=>t.edgesFrom(a).some(d=>d.type!==g.SCOPED_TO?!1:d.dst===R||t.tipOf(d.dst)===R?!0:t.nodeLabel.get(d.dst)===_.SCENARIO&&t.edgesFrom(d.dst).some(c=>c.type===g.BELONGS_TO&&t.tipOf(c.dst)===R)),u=new Map;for(let{cid:a,content:d}of t.byLabel(_.AC)){if(t.superseded.has(a)||!s(a))continue;let c=J(String(d.text??""));u.set(c,[...u.get(c)??[],a])}let p=new Map;for(let a of P){if(a.label!==_.AC)continue;let d=J(String(a.content.text??""));p.set(d,[...p.get(d)??[],a.cid])}let m=[];for(let[a,d]of u){let c=p.get(a)??[];d.length!==1||c.length!==1||m.push([d[0],c[0]])}if(ae){let a=new Map(m),d=[...U].filter(o=>!V.has(o)),c=new Map,v=new Set,h=(o,r,S)=>{c.set(o,{cid:r,tag:S}),v.add(r)},b=(o,r)=>{let S=new Map;for(let A of o){let oe=r(A);oe&&S.set(oe,[...S.get(oe)??[],A])}return S},I=(o,r,S)=>{let A=0;for(let[oe,Je]of o){let Qe=r.get(oe)??[];Je.length===1&&Qe.length===1&&(h(Je[0],Qe[0],S),A+=1)}return A},z=new Map,$e=new Set;for(let[o,r]of Oe){let S=w[o];!U.has(r)||V.has(r)||!S||!P.some(A=>A.cid===S)||($e.add(S),z.set(r,[...z.get(r)??[],S]))}let $=new Set,It=o=>J(String(P.find(r=>r.cid===o)?.content.title??""));for(let[o,r]of z){if(r.length===1){h(o,r[0],"reuse_of successor"),D.reuseOf.honored+=1;continue}$.add(o);let S=r.filter(A=>It(A)===J(String(t.getNode(o)?.content.title??"")));S.length===1&&(h(o,S[0],"title-matched successor"),D.byTitle+=1)}let ke=o=>d.filter(r=>t.nodeLabel.get(r)===o&&!c.has(r)&&!$.has(r)),ve=o=>P.filter(r=>r.label===o&&!v.has(r.cid)&&!$e.has(r.cid)).map(r=>r.cid),ze=o=>[...new Set(o.map(r=>a.get(t.tipOf(r))??t.tipOf(r)))].sort().join(`
|
|
4
4
|
`),At=o=>t.edgesFrom(o).filter(r=>r.type===g.EXERCISES&&!t.superseded.has(r.ecid)).map(r=>r.dst),Nt=o=>M.filter(r=>r.type===g.EXERCISES&&r.src===o).map(r=>r.dst);D.byCriteria+=I(b(ke(_.SCENARIO),o=>ze(At(o))),b(ve(_.SCENARIO),o=>ze(Nt(o))),"same-criteria successor");let He=(o,r)=>e(t.nodeLabel.get(o)??P.find(S=>S.cid===o)?.label,(r??t.getNode(o)?.content)?.title),Re=new Map(P.map(o=>[o.cid,o.content])),Ke=o=>I(b(ke(o),r=>He(r)),b(ve(o),r=>He(r,Re.get(r))),"title-matched successor");D.byTitle+=Ke(_.SCENARIO);let Dt=o=>{let r=t.edgesFrom(o).find(A=>A.type===g.AUTOMATES&&!t.superseded.has(A.ecid));if(!r)return"";let S=t.tipOf(r.dst);return c.get(r.dst)?.cid??c.get(S)?.cid??S};D.byPair+=I(b(ke(_.TEST),Dt),b(ve(_.TEST),o=>M.find(r=>r.type===g.AUTOMATES&&r.src===o)?.dst??""),"paired test successor"),D.byTitle+=Ke(_.TEST);let Ce=new Set(d),ue=o=>{let r=c.get(o)?.cid??c.get(t.tipOf(o))?.cid??t.tipOf(o);return t.superseded.has(r)&&!Re.has(r)||Ce.has(r)&&!c.has(r)?null:r},we=new Set;for(let o of M)o.type===g.AUTOMATES&&Re.has(o.src)&&we.add(ue(o.dst)??o.dst);for(let{cid:o}of t.byLabel(_.TEST))if(!(t.superseded.has(o)||Ce.has(o)))for(let r of t.edgesFrom(o))r.type===g.AUTOMATES&&!t.superseded.has(r.ecid)&&we.add(ue(r.dst)??r.dst);let xt=!l.tests?.length&&te.some(o=>W.has(String(o.kind))),We=new Set,Xe=o=>{if(typeof o!="string"||!o)return;let r=w[o]??t.resolve(o)?.cid,S=r?ue(r):null;S!==null&&We.add(S)};for(let o of te)W.has(String(o.kind))&&Xe(o.ref);for(let{cid:o,content:r}of t.byLabel(_.GAP))t.superseded.has(o)||Ce.has(o)||t.trust.get(o)==="archived"||W.has(String(r.kind??""))&&Xe(r.ref);let ie=new Map,Ye=new Set;for(let o of xt?[]:d){if(t.nodeLabel.get(o)!==_.TEST||c.has(o))continue;let r=t.edgesFrom(o).find(A=>A.type===g.AUTOMATES&&!t.superseded.has(A.ecid)),S=r?ue(r.dst):null;!r||S===null||we.has(S)||Ye.has(S)||We.has(S)||(ie.set(o,{edge:r,scenario:S}),Ye.add(S))}for(let o of d){if(ie.has(o))continue;let r=c.get(o);r?(N.push({kind:"node",old:o,new:r.cid,reason:i(`--force redesign of ${n.ucRef} by ${f.id} (${r.tag})`,r.tag),by:f}),ee.push({old:o,next:r.cid})):N.push({kind:"node",old:o,new:null,reason:i(`--force redesign of ${n.ucRef} by ${f.id}`),by:f}),H.push(o)}for(let[o,{edge:r,scenario:S}]of ie)r.dst===S||ee.some(A=>A.old===r.dst)||(N.push({kind:"edge",ecid:r.ecid,reason:`re-blessed onto ${S} (its test kept by the redesign of ${n.ucRef}) by ${f.id}`,by:f}),B(g.AUTOMATES,o,S,r.props,`keep ${t.nameOf.get(o)??o}`));ie.size>0&&(D.keptTests=ie.size)}else{let a=new Map;for(let c of P){if(c.label!==_.SCENARIO&&c.label!==_.TEST)continue;let v=e(c.label,c.content.title);a.set(v,[...a.get(v)??[],c.cid])}let d=new Map;for(let c of U){if(V.has(c))continue;let v=e(t.nodeLabel.get(c),t.getNode(c)?.content.title);d.set(v,[...d.get(v)??[],c])}for(let[c,v]of d){let h=a.get(c)??[],b=v.length===1&&h.length===1;for(let I of v)b?(N.push({kind:"node",old:I,new:h[0],reason:i(`--force redesign of ${n.ucRef} by ${f.id} (title-matched successor)`,"title-matched successor"),by:f}),ee.push({old:I,next:h[0]})):N.push({kind:"node",old:I,new:null,reason:i(`--force redesign of ${n.ucRef} by ${f.id}`),by:f}),H.push(I)}}for(let[a,d]of m)N.push({kind:"node",old:a,new:d,reason:i(`AC re-emitted with changed content by ${f.id} (text-matched successor)`,"AC text-matched successor"),by:f}),ee.push({old:a,next:d}),H.push(a);if(n.force||n.forceScope){let a=new Set(H),d=new Map(ee.map(b=>[b.old,b.next])),c=new Set(P.map(b=>b.cid)),v=b=>{if(c.has(b))return!0;let I=d.get(b)??t.tipOf(b);return c.has(I)||!t.superseded.has(I)&&!a.has(I)},h=new Set(N.flatMap(b=>b.kind==="edge"?[b.ecid]:[]));for(let{cid:b}of t.byLabel(_.AC)){if(t.superseded.has(b)||a.has(b)||!s(b))continue;let I=t.edgesFrom(b).filter($=>$.type===g.SCOPED_TO&&!t.superseded.has($.ecid)&&!h.has($.ecid)).map($=>$.dst);if(I.length===0||I.some(v))continue;let z=I.map($=>t.nameOf.get($)??t.nameOf.get(t.tipOf($))??$).join(", ");if([...t.edgesInto(b).filter($=>($.type===g.EXERCISES||$.type===g.VERIFIES)&&!t.superseded.has($.ecid)&&!h.has($.ecid)).map($=>$.src),...M.filter($=>($.type===g.EXERCISES||$.type===g.VERIFIES)&&$.dst===b).map($=>$.src)].some($=>v($))){L.push(`ORPHANED_CRITERION: ${X(t.nameOf.get(b)??b)} is scoped to ${z}, which is retired, and a live scenario or test still rests on it \u2014 kept; re-scope it (scoped_to_repoints) to the scenario or use case it belongs to`);continue}N.push({kind:"node",old:b,new:null,reason:i(`orphaned: its scenario ${z} was retired; retired with it by the redesign of ${n.ucRef} (${f.id})`,"orphaned criterion"),by:f}),H.push(b)}}let x=new Set(H),G=new Set;for(let a of N)a.kind==="edge"&&G.add(a.ecid);for(let{old:a,next:d}of ee)for(let c of t.edgesInto(a))et(c.type)?.pin?.comparesTo!=="dst_tip"||t.superseded.has(c.src)||x.has(c.src)||G.has(c.ecid)||(N.push({kind:"edge",ecid:c.ecid,reason:`re-blessed onto ${d} (redirect successor of ${a}) by ${f.id}`,by:f}),G.add(c.ecid),M.some(h=>h.type===c.type&&h.src===c.src&&h.dst===d)||t.edgesFrom(c.src).some(h=>h.type===c.type&&h.dst===d))||c.type===g.AUTOMATES&&ce.has(d)||B(c.type,c.src,d,c.props,`rebless ${c.type} from ${t.nameOf.get(c.src)??c.src}`)}let ne=vt();if(ne.length>0){let e=s=>[...M.filter(u=>u.dst===s),...t.edgesInto(s).filter(u=>!t.superseded.has(u.ecid))].some(u=>u.type===g.DERIVES&&ne.includes(String(u.props.source_id))),i=[...(l.scenarios??[]).map(s=>({label:"scenario",temp_ref:s.temp_ref,title:s.title})),...(l.tests??[]).map(s=>({label:"test",temp_ref:s.temp_ref,title:s.title}))];for(let s of i){let u=w[s.temp_ref];!u||e(u)||L.push(`CITE_MISSING: ${s.label} ${X(q[s.temp_ref]??t.nameOf.get(u)??s.temp_ref)} "${s.title}" cites nothing of ${ne.join(", ")}, whose plugin asks each scenario and test to cite what it rests on \u2014 committed anyway; cite its screens and flows so a change to them marks exactly this ${s.label} stale`)}}if(ne.length>0)for(let e of n.droppedCriterionCites??[]){let i=w[e.temp_ref],s=X(q[e.temp_ref]??(i?t.nameOf.get(i):void 0)??e.temp_ref);L.push(`CITE_DROPPED: criterion ${s} \u2014 a cite was dropped: ${e.why}; the criterion is committed without it. A criterion cites only into ${ne.join(", ")}, whose plugin asks each item to cite what it rests on`)}if(k.length>0)return Y(k);let qe=ae&&(D.reuseOf.seen>0||D.byPair+D.byCriteria+D.byTitle+(D.keptTests??0)>0)?{lineage:D}:{},Ve=fe.length?{modelWarnings:fe}:{};if(P.length===0&&M.length===0&&N.length===0&&re.length===0)return Object.keys(w).length>0||Be>0?(L.push("everything in this phase is already current \u2014 nothing re-committed"),{record:null,errors:null,minted:w,logicalIds:q,superseded:[],warnings:L,finalizedTests:he,unchanged:!0,...K.length?{droppedBlockers:K}:{},...Z.length?{awaitingApproval:Z}:{},...qe,...Ve,...n.force||n.forceScope?{forceScopeRemaining:Fe}:{}}):{...Y([{code:"EMPTY_DESIGN",detail:"finalize_design produced nothing to commit"}]),warnings:L,...K.length?{droppedBlockers:K}:{}};if(n.generationTicket){let e=ht(t,n.generationTicket);if(e!==null)return Y([e])}let Te=n.eventIds&&n.eventIds.length>0?n.eventIds:n.sid?pt(t,n.sid,"design",1):null;return{record:at(E,{ts:new Date().toISOString(),proposal_id:null,nodes:P,edges:M,review:[],supersessions:N,source_head_moves:{},...me.length>0?{names:me}:{},...(()=>{for(let e of l.judgements??[]){let i=e.target?w[e.target]??t.resolve(e.target)?.tip??R:R;C.judgements.push(i),re.push({about:i,rationale:`[${e.kind}] ${e.rationale}`,by:f})}return re.length>0?{judgements:re}:{}})(),design_of:{uc_cid:R,engine:y},...n.generationTicket?{design_generation:_t(n.generationTicket,R,f)}:{},...Te?{event_ids:Te}:{},...n.sid?{sid:n.sid}:{},...n.phase?{design_phase:{uc_root:gt(t,t.resolve(n.ucRef)?.cid??R),generation:n.generationTicket?.next_gen??mt(t,n.ucRef)?.gen??1,phase:n.phase,completeness:n.phaseCompleteness??"complete",...n.payloadDigest?{payload_digest:n.payloadDigest}:{}}}:{}},{graph:t,scope:{ucTargets:[{ref:R}],...n.generationTicket?{generationTicket:{uc_root:n.generationTicket.uc_root,next_gen:n.generationTicket.next_gen}}:{}},expectPrev:t.latestHash,intent:{v:1,verb:"design",args:ot({ucRef:n.ucRef,sections:l,by:f,engine:y,force:n.force??!1,forceScope:n.forceScope??null,reason:n.reason??null,generationTicket:n.generationTicket??null,templateVersion:n.templateVersion??null,phase:n.phase??null,phaseCompleteness:n.phaseCompleteness??null,eventIds:Te,sid:n.sid??null,...ae?{lineage:2}:{}}),pins:Object.keys(ye).length?{...C,reuse_of:ye}:C},provenance:n.provenance}).record,errors:null,minted:w,logicalIds:q,superseded:H,warnings:L,finalizedTests:he,...K.length?{droppedBlockers:K}:{},...Z.length?{awaitingApproval:Z}:{},...n.force||n.forceScope?{forceScopeRemaining:Fe}:{},...qe,...Ve}}function Mt(n,E,t){let l=new Set(Object.values(E));if(l.size===0)return[];let f=new Set(t),y=[];for(let[O,T]of Object.entries(E))f.has(T)||y.push(`${n}: body tag '${O}' has no verifies or reuses edge`);for(let O of f)l.has(O)||y.push(`${n}: edge to ${O} has no body tag`);return y}function Gt(n,E){let t=[];for(let f of(n??"").split(`
|
|
5
5
|
`)){let y=/^##\s.*?\s@verifies\s+(.+?)\s*$/.exec(f);y&&t.push(...y[1].split(",").map(T=>T.trim()).filter(Boolean));let O=/^@import\s+(\S+)\s*$/.exec(f.trim())??/^## Import: (\S+)\s*$/.exec(f);O&&t.push(O[1])}let l=null;for(let f of(E??"").split(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as C}from"./chunk-
|
|
2
|
+
import{a as C}from"./chunk-W5HFUBXD.js";import{e as w}from"./chunk-ZAQGIC33.js";var E=.8,P="usecase-dedup";function S(n,e){let c=Math.min(n.length,e.length),u=0,o=0,a=0;for(let t=0;t<c;t++)u+=n[t]*e[t],o+=n[t]*n[t],a+=e[t]*e[t];return o===0||a===0?0:u/(Math.sqrt(o)*Math.sqrt(a))}function D(n,e,c){return c*n+(1-c)*e}var v=.7;function _(n){return new Set(n.toLowerCase().replace(/[^\p{L}\p{N}]+/gu," ").split(" ").filter(Boolean))}function y(n,...e){let c=_(n);if(c.size===0)return 0;let u=n.trim().toLowerCase(),o=0;for(let a of e){let t=_(a);if(t.size===0)continue;let p=0;for(let l of c)t.has(l)&&p++;let m=c.size+t.size-p,d=m===0?0:p/m;u&&a.toLowerCase().includes(u)&&(d=Math.max(d,.9)),o=Math.max(o,d)}return o}var A=n=>String(n.title??"");function H(n){return n.byLabel("usecase").filter(e=>!n.superseded.has(e.cid)).map(e=>({cid:e.cid,text:A(e.content)}))}function B(n,e){let c=e.threshold??E,u=new Map,o=null;return{async batchSimilar(a,t){let p=a.latestHash;if(t.length===0)return{hits:[],degraded:!1,probeBasis:p};let m=H(a),d=[];try{let l=await e.resolveAlias(P);o=l.alias,e.prefetchVectors?.(o,P,l.dims);let f=new Map,b=[];for(let r of m){let i=e.readVector?.(o,P,r.cid)??null;i!==null?f.set(r.cid,i):b.push(r)}let s=await C(r=>e.embed(P,r),t.map(r=>r.probeText),b,(r,i)=>{f.set(r,i),e.writeVector?.(o,P,r,i)});t.forEach((r,i)=>u.set(r.tempRef,s[i]));for(let r of t){let i=u.get(r.tempRef);for(let g of m){let h=f.get(g.cid);if(h===void 0)continue;let x=D(S(i,h),y(r.probeText,g.text),v);x>=c&&d.push({tempRef:r.tempRef,candidateCid:g.cid,score:x,scorer:"embedding"})}}return{hits:d,degraded:!1,probeBasis:p}}catch(l){w(JSON.stringify({event:"dedup_probe_degraded",candidates:t.length,reason:String(l?.message??l).slice(0,160),ts:new Date().toISOString()}),"DEDUP_PROBE_DEGRADED");for(let f of t)for(let b of m){let s=y(f.probeText,b.text);s>=c&&d.push({tempRef:f.tempRef,candidateCid:b.cid,score:s,scorer:"lexical_fallback"})}return{hits:d,degraded:!0,probeBasis:p}}},recheckLocal(a,t,p,m){let d=[],l=[],f=new Set;for(let b of m)for(let s of b.nodes){if(s.label!=="usecase"||f.has(s.cid)||(f.add(s.cid),a.superseded.has(s.cid)||!a.hasNode(s.cid)))continue;let r=A(s.content),i=o!==null?e.readVector?.(o,P,s.cid)??null:null,g=i!==null;for(let h of t){let x=u.get(h.tempRef),R;i!==null&&x!==void 0?R=D(S(x,i),y(h.probeText,r),v):(R=y(h.probeText,r),g=g&&!1),R>=c&&d.push({tempRef:h.tempRef,candidateCid:s.cid,score:R,scorer:i!==null&&x!==void 0?"embedding":"lexical_fallback"})}g||l.push(s.cid)}return{hits:d,uncachedNewNodes:l}}}}export{B as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{h as m,i as h,j as _,o as w,p as E,q as l,r as f,s as u,t as d,u as x}from"./chunk-
|
|
2
|
+
import{h as m,i as h,j as _,o as w,p as E,q as l,r as f,s as u,t as d,u as x}from"./chunk-OTMHCHH6.js";import{a as g,b as y}from"./chunk-KGNE5CIM.js";function C(t,e){let r=typeof t.body?.retry_after_s=="number"?t.body.retry_after_s:null;if(t.code==="TOO_SOON")return`${r!==null?`in ${Math.max(1,Math.ceil(r/60))} min, `:"later, "}kane-cli explore context sync ${e}`;if(t.code==="CONTEXT_OFF")return`kane-cli explore context on ${e}`}async function b(t,e,r){if(r.out&&!r.projectNames)return;let s=await new y({baseUrl:t.controllerBaseUrl,auth:t.basic,timeoutMs:w}).viewSummary(e),n=typeof s?.project_id=="string"?s.project_id:"";if(n)return(await E(r,t)([n]))[n]??n.slice(0,8)}function k(t){let e=typeof t.body?.retry_after_s=="number"?t.body.retry_after_s:null;return t.code==="TOO_SOON"&&e!==null?`TOO_SOON: the last cut was taken too recently (a run's end takes one too); the next can start in ${Math.max(1,Math.ceil(e/60))} min`:t.code==="CONTEXT_OFF"?`CONTEXT_OFF: assurance context is off for this exploration${typeof t.body?.off_reason=="string"?` (${t.body.off_reason})`:""}; turn it on with explore context on`:u(t)}async function N(t,e,r,s={}){let n=f(s,e,r),i=await l(r,`explore context ${t}`);if(!i.ok)return n.fail(i.error);let a=d(i);try{if(t==="sync"){let o=await a.syncContext(e);if(!n.tty)n.event({type:"explore_context_sync",exploration_id:e,state:o.state,job_id:o.job_id??null,cut:o.cut??null,trigger:o.trigger??null,running_job_id:o.running_job_id??null,hx_job_link:o.hx_job_link??null,...o.state==="failed"?{error:o.error??null}:{}});else if(o.state!=="failed")for(let O of h(e,o))n.out(O);return o.state==="failed"?n.fail(T(e,o),1,j(e,o)):n.ok()}let c=t==="status"?await a.getContext(e):await a.setContext(e,t==="on");if(!n.tty)n.event({type:"explore_context",exploration_id:e,action:t,context:c});else if(t==="status")for(let o of m(c,{project:await b(i,e,s)}))n.out(o);else for(let o of _(e,c,t,await b(i,e,s)))n.out(o);return n.ok()}catch(c){let o=A(c,t,e);return n.fail(o.message,o.code,o.next)}}function A(t,e,r){if(t instanceof g){if(t.code==="NO_ENDED_RUN")return{message:"NO_ENDED_RUN: no run of this exploration has ended yet; the first assurance job runs when one ends",code:1,next:"run it first: kane-cli explore run \u2026, then sync"};if(t.status===404)return{message:`exploration ${r} not found, or this service has no assurance context yet`,code:2};if(t.status===501)return{message:`this service has no assurance context yet (exploration ${r})`,code:2};if(t.code==="NOT_CONFIGURED")return{message:"NOT_CONFIGURED: assurance jobs are not set up on this service (no HyperExecute or report URL); context stays on and runs once they are",code:1};if(t.status===401||t.status===403)return{message:u(t),code:2};if(t.status<500){let s=C(t,r);return{message:k(t),code:1,...s?{next:s}:{}}}}return{message:`could not ${e==="status"?"read":e==="sync"?"sync":"change"} the assurance context: ${u(t)}`,code:1}}function T(t,e){return`${e.error?.code??"LAUNCH_FAILED"}: the assurance job could not launch${e.error?.message?` (${e.error.message})`:""}; explore context status ${t} shows it`}function j(t,e){let r=e.error?.code??"LAUNCH_FAILED";return`try again: kane-cli explore context sync ${t}${r==="HX_TRIGGER_FAILED"?"; or run with --local-orchestration":""}`}var $="usage: kane-cli explore context <status|on|off|sync> <exploration-id> (or explore context <exploration-id> on a terminal for the panel)";async function F(t,e,r={}){let s=f(r,t??null,e);if(!s.tty||!t)return s.fail($);let n=await l(e,"explore context");if(!n.ok)return s.fail(n.error);let{runContextPanel:i}=await import("./explore-context-tty-PERKIWXD.js"),a=typeof e.env=="string"?e.env:"prod";return await i({client:d(n),explorationId:t,env:a})==="exit"?130:0}function p(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function U(t){let e=x(t.command("context").description("An exploration's assurance context (on by default): on, off, status, sync; with only the id, the panel on a terminal").argument("[exploration-id]","The exploration (no action: the context panel on a terminal)")).action(async(s,n)=>{process.exitCode=await F(s,p(n))}),r=[["status","Whether context is on, what is pending or running, and what the last assurance job did"],["on","Turn assurance context on (catches up from the newest ended run)"],["off","Turn assurance context off: the next cut is skipped; nothing already saved is deleted"],["sync","Ask for an assurance job now: launched, pending behind a running job, or up to date"]];for(let[s,n]of r)x(e.command(s).description(n).argument("<exploration-id>","The exploration")).action(async(i,a)=>{process.exitCode=await N(s,i,{...p(e.opts()),...p(a)})})}export{A as a,T as b,U as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-HCBYKLMW.js";import{a as o,b as i}from"./chunk-33DWJV67.js";import{z as e}from"./chunk-
|
|
2
|
+
import{a as m}from"./chunk-HCBYKLMW.js";import{a as o,b as i}from"./chunk-33DWJV67.js";import{z as e}from"./chunk-J4FIESTB.js";import{e as d}from"./chunk-UR6MHSHU.js";var r=d(m(),1),s={default:e.muted,error:e.red,success:e.green,info:e.orange,warning:e.orange};function h({title:t,titleColor:a,borderColor:l,variant:n="default",children:c,width:u,paddingX:x=2,paddingY:g=0,marginBottom:f=0}){let p=l??s[n],B=a??(n==="default"?e.orange:s[n]);return(0,r.jsxs)(o,{flexDirection:"column",marginBottom:f,children:[t&&(0,r.jsx)(o,{marginBottom:0,children:(0,r.jsxs)(i,{color:B,bold:!0,children:[" ",t]})}),(0,r.jsx)(o,{borderStyle:"round",borderColor:p,flexDirection:"column",paddingX:x,paddingY:g,width:u,children:c})]})}function k({label:t,value:a,labelColor:l=e.dim,valueColor:n,labelWidth:c=14}){return(0,r.jsxs)(o,{children:[(0,r.jsx)(o,{width:c,flexShrink:0,children:(0,r.jsx)(i,{color:l,children:t})}),(0,r.jsx)(o,{flexShrink:1,children:(0,r.jsx)(i,{color:n,wrap:"wrap",children:a})})]})}function I({label:t}){return(0,r.jsx)(o,{marginTop:1,marginBottom:0,children:(0,r.jsx)(i,{bold:!0,children:t})})}export{h as a,k as b,I as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as c,b as l,c as _}from"./chunk-VZ7KXRXB.js";import{a as y}from"./chunk-
|
|
2
|
+
import{a as c,b as l,c as _}from"./chunk-VZ7KXRXB.js";import{a as y}from"./chunk-ZCBOHWN3.js";import{a as v}from"./chunk-RZ4F3BHX.js";import{a as i,p as f}from"./chunk-J4FIESTB.js";import{createHash as x}from"crypto";import{promises as o,readFileSync as A,writeFileSync as S,renameSync as N,mkdirSync as F}from"fs";import{dirname as T,join as u}from"path";var w=`# kane-cli metric catalog, version 1.
|
|
3
3
|
#
|
|
4
4
|
# Policies reference these as metrics.<name>. \`where\` and \`value\` expressions
|
|
5
5
|
# are CEL over \`test\` (one tests/*/result.yaml, parsed), \`file\` and \`run\`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{i as n}from"./chunk-XMPTFXPW.js";import{a,b as l}from"./chunk-
|
|
2
|
+
import{i as n}from"./chunk-XMPTFXPW.js";import{a,b as l}from"./chunk-EBJW6POT.js";import{a as s}from"./chunk-PVN64537.js";import{Ha as t,f as o}from"./chunk-WE7HRAGO.js";import{a as i}from"./chunk-4QTH7VYE.js";var d=null;function m(){return d??=a()}function w(){d=null}var x={...l,controller:m},c=e=>new n("CREDENTIALS_MISSING",e.message,e.remedy);async function u(){let e;try{e=await m()}catch(r){throw r instanceof s?c(t.credentialsMissing()):r}if(!e.basic)throw c(e.token?t.loginUnconfirmed():t.credentialsMissing());return e.basic}async function f(){let e=await u();return i(e.username,e.accessKey)}function R(e){return{project:async r=>o({url:e,basicAuth:await f()}).project(r)}}export{m as a,w as b,x as c,u as d,f as e,R as f};
|
|
@@ -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-LV7224DG.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,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as U,e as F}from"./chunk-4JOD47QI.js";import{d as W}from"./chunk-GMTHZUZ3.js";import{a as H}from"./chunk-
|
|
3
|
-
`));this.deviceClass=s;this.name="DepsInstallRequiredError"}};function _(i){return i>=1024*1024?`${Math.ceil(i/(1024*1024))} MB`:`${i} bytes`}function at(i){let t=i/1048576;return t>=10?`${Math.round(t)} MB/s`:t>=1?`${t.toFixed(1)} MB/s`:`${Math.max(1,Math.round(i/1024))} KB/s`}function lt(i){let t=Math.max(1,Math.round(i));return t<60?`~${t}s left`:`~${Math.floor(t/60)}m ${t%60}s left`}var K=8*1024*1024,ct=8;function ut(i){if(!Number.isFinite(i)||i<2*K)return null;let t=Math.min(ct,Math.floor(i/K)),s=Math.ceil(i/t),e=[];for(let n=0;n<i;n+=s)e.push({start:n,end:Math.min(n+s,i)-1});return e}async function L(i,t){let s=i.body;if(!s||typeof s.getReader!="function"){let c=new Uint8Array(await i.arrayBuffer());return t?.(c.length),c}let e=s.getReader(),n=[],r=0;for(;;){let{done:c,value:h}=await e.read();if(c)break;h&&(n.push(h),r+=h.length,t?.(h.length))}let o=new Uint8Array(r),a=0;for(let c of n)o.set(c,a),a+=c.length;return o}var z=3,dt=3e4,k=class extends Error{};async function pt(i,t,s,e,n,r=dt){let o=new Uint8Array(s),a=0,c=new AbortController,h=null,b=!1;try{await Promise.all(e.map(async(f,M)=>{let P=0,V=d=>{P+=d,a+=d,n?.(a)},T=()=>{a=Math.max(0,a-P),P=0},R=null;for(let d=0;d<z;d+=1){if(c.signal.aborted)return;let u=new AbortController,m=()=>u.abort();c.signal.addEventListener("abort",m,{once:!0});let w=!1,g=null,$=()=>{g&&clearTimeout(g),g=setTimeout(()=>{w=!0,u.abort()},r)};try{$();let p=await i(t,{headers:{Range:`bytes=${f.start}-${f.end}`},signal:u.signal});if(typeof p.body?.getReader!="function"&&g&&(clearTimeout(g),g=null),!p.ok)throw new k(`Could not download ${t}: HTTP ${p.status}`);if(p.status!==206){b=!0,M===0?h=await L(p,I=>{$(),V(I)}):await(p.body?.cancel().catch(()=>{})??Promise.resolve());return}let D=f.end-f.start+1,E=await L(p,I=>{$(),V(I)});if(E.length!==D)throw new Error(`range ${f.start}-${f.end} returned ${E.length} bytes (expected ${D})`);o.set(E,f.start);return}catch(p){if(p instanceof k)throw p;if(c.signal.aborted)return;T(),R=w?new Error(`no data for ${Math.round(r/1e3)}s`):p instanceof Error?p:new Error(String(p))}finally{g&&clearTimeout(g),c.signal.removeEventListener("abort",m)}}throw new Error(`Could not download ${t}: range ${f.start}-${f.end} failed after ${z} attempts (${R?.message??"unknown error"}) \u2014 check your network and rerun \`kane-cli doctor --target <emulator|simulator> --install\`.`)}))}catch(f){throw c.abort(),f}return h||(b?null:o)}async function ht(i,t,s,e,n){let r=ut(s);if(r){let c=await pt(i,t,s,r,e,n?.stallMs);if(c)return c}let o=await i(t);if(!o.ok)throw new Error(`Could not download ${t}: HTTP ${o.status}`);let a=0;return L(o,e&&(c=>{a+=c,e(a)}))}function ft(i){return Y("sha256").update(i).digest("hex")}function mt(i,t){let s=X(i,t);return s!==""&&!s.startsWith(`..${it}`)&&s!==".."&&!nt(s)}async function A(i){try{return await Q(i),!0}catch{return!1}}function wt(){return{home:tt(),os:st,arch:et,cliVersion:H,nodeModuleVersion:process.versions.modules,fetch,resolveBundle:async i=>(await import("./deps-resolve-
|
|
2
|
+
import{d as U,e as F}from"./chunk-4JOD47QI.js";import{d as W}from"./chunk-GMTHZUZ3.js";import{a as H}from"./chunk-J4FIESTB.js";import{createHash as Y}from"crypto";import{access as Q,mkdir as S,mkdtemp as Z,readdir as O,readFile as y,rename as N,rm as v,writeFile as x}from"fs/promises";import{homedir as tt}from"os";import{arch as et,platform as st}from"process";import{dirname as C,isAbsolute as nt,join as l,relative as X,resolve as rt,sep as it}from"path";var q=1,ot={emulator:"emulator",simulator:"simulator"};function Pt(i){return ot[i.kind]??null}var j=class extends Error{constructor(s,e,n){super([`Managed mobile dependencies for ${s} are not installed.`,`- kaneai-mobile-deps ${s} ${e.bundleVersion}: ${e.url} (${_(e.bytes)})`,`Destination: ${n}`,`Run \`kane-cli doctor --target ${s} --install\` to download it.`].join(`
|
|
3
|
+
`));this.deviceClass=s;this.name="DepsInstallRequiredError"}};function _(i){return i>=1024*1024?`${Math.ceil(i/(1024*1024))} MB`:`${i} bytes`}function at(i){let t=i/1048576;return t>=10?`${Math.round(t)} MB/s`:t>=1?`${t.toFixed(1)} MB/s`:`${Math.max(1,Math.round(i/1024))} KB/s`}function lt(i){let t=Math.max(1,Math.round(i));return t<60?`~${t}s left`:`~${Math.floor(t/60)}m ${t%60}s left`}var K=8*1024*1024,ct=8;function ut(i){if(!Number.isFinite(i)||i<2*K)return null;let t=Math.min(ct,Math.floor(i/K)),s=Math.ceil(i/t),e=[];for(let n=0;n<i;n+=s)e.push({start:n,end:Math.min(n+s,i)-1});return e}async function L(i,t){let s=i.body;if(!s||typeof s.getReader!="function"){let c=new Uint8Array(await i.arrayBuffer());return t?.(c.length),c}let e=s.getReader(),n=[],r=0;for(;;){let{done:c,value:h}=await e.read();if(c)break;h&&(n.push(h),r+=h.length,t?.(h.length))}let o=new Uint8Array(r),a=0;for(let c of n)o.set(c,a),a+=c.length;return o}var z=3,dt=3e4,k=class extends Error{};async function pt(i,t,s,e,n,r=dt){let o=new Uint8Array(s),a=0,c=new AbortController,h=null,b=!1;try{await Promise.all(e.map(async(f,M)=>{let P=0,V=d=>{P+=d,a+=d,n?.(a)},T=()=>{a=Math.max(0,a-P),P=0},R=null;for(let d=0;d<z;d+=1){if(c.signal.aborted)return;let u=new AbortController,m=()=>u.abort();c.signal.addEventListener("abort",m,{once:!0});let w=!1,g=null,$=()=>{g&&clearTimeout(g),g=setTimeout(()=>{w=!0,u.abort()},r)};try{$();let p=await i(t,{headers:{Range:`bytes=${f.start}-${f.end}`},signal:u.signal});if(typeof p.body?.getReader!="function"&&g&&(clearTimeout(g),g=null),!p.ok)throw new k(`Could not download ${t}: HTTP ${p.status}`);if(p.status!==206){b=!0,M===0?h=await L(p,I=>{$(),V(I)}):await(p.body?.cancel().catch(()=>{})??Promise.resolve());return}let D=f.end-f.start+1,E=await L(p,I=>{$(),V(I)});if(E.length!==D)throw new Error(`range ${f.start}-${f.end} returned ${E.length} bytes (expected ${D})`);o.set(E,f.start);return}catch(p){if(p instanceof k)throw p;if(c.signal.aborted)return;T(),R=w?new Error(`no data for ${Math.round(r/1e3)}s`):p instanceof Error?p:new Error(String(p))}finally{g&&clearTimeout(g),c.signal.removeEventListener("abort",m)}}throw new Error(`Could not download ${t}: range ${f.start}-${f.end} failed after ${z} attempts (${R?.message??"unknown error"}) \u2014 check your network and rerun \`kane-cli doctor --target <emulator|simulator> --install\`.`)}))}catch(f){throw c.abort(),f}return h||(b?null:o)}async function ht(i,t,s,e,n){let r=ut(s);if(r){let c=await pt(i,t,s,r,e,n?.stallMs);if(c)return c}let o=await i(t);if(!o.ok)throw new Error(`Could not download ${t}: HTTP ${o.status}`);let a=0;return L(o,e&&(c=>{a+=c,e(a)}))}function ft(i){return Y("sha256").update(i).digest("hex")}function mt(i,t){let s=X(i,t);return s!==""&&!s.startsWith(`..${it}`)&&s!==".."&&!nt(s)}async function A(i){try{return await Q(i),!0}catch{return!1}}function wt(){return{home:tt(),os:st,arch:et,cliVersion:H,nodeModuleVersion:process.versions.modules,fetch,resolveBundle:async i=>(await import("./deps-resolve-WQ6J6RLI.js")).controllerResolveBundle()(i),exec:U,now:()=>new Date,wait:F,processAlive:i=>{try{return process.kill(i,0),!0}catch{return!1}}}}var B=class extends Error{constructor(s,e,n){super(`No managed mobile dependencies are published for ${s} (kane-cli ${e}).
|
|
4
4
|
This is a packaging gap, not something to install locally \u2014 report it, or pass --appium-url to use an Appium server you manage yourself.`);this.coordinate=s;this.cause=n;this.name="NoPublishedBundleError"}},J=class i{deps;constructor(t={}){this.deps={...wt(),...t}}mobileRoot(){return l(this.deps.home,".testmuai","kaneai","mobile")}depsRoot(){return l(this.mobileRoot(),"deps")}classRoot(t,s){return l(this.depsRoot(),s,t)}resolveCacheFile(){return l(this.depsRoot(),"resolve-cache.json")}resolveCacheKey(t){return`${this.deps.cliVersion}|${this.deps.os}-${this.deps.arch}-${t}`}static RESOLVE_CACHE_TTL_MS=1440*60*1e3;async readCachedWantedVersion(t){try{let e=JSON.parse(await y(this.resolveCacheFile(),"utf8"))[this.resolveCacheKey(t)];if(!e?.bundleVersion||!e.fetchedAt)return null;let n=this.deps.now().getTime()-new Date(e.fetchedAt).getTime();return n>=0&&n<i.RESOLVE_CACHE_TTL_MS?e.bundleVersion:null}catch{return null}}async writeResolveCache(t,s){try{let e={};try{e=JSON.parse(await y(this.resolveCacheFile(),"utf8"))}catch{}e[this.resolveCacheKey(t)]={bundleVersion:s,fetchedAt:this.deps.now().toISOString()},await S(this.depsRoot(),{recursive:!0}),await x(this.resolveCacheFile(),`${JSON.stringify(e,null,2)}
|
|
5
5
|
`)}catch{}}async warmResolveCache(t){if(await this.readCachedWantedVersion(t)===null)try{await this.resolveOrExplain(t)}catch{}}paths(t,s){let e=this.classRoot(t,s);return{root:e,appium:l(e,"appium"),appiumHome:l(e,"appium-home"),platformTools:l(e,"platform-tools"),wdaDir:l(e,"wda","Build","Products","Debug-iphonesimulator"),iwdpBinDir:l(e,"bin"),installManifest:l(e,"install-manifest.json")}}async status(t,s){s||(s=await this.readCachedWantedVersion(t)??void 0);let e=[];try{e=await O(this.depsRoot())}catch{}s&&(e=e.filter(c=>c===s));let n=null;for(let c of e){let h=this.classRoot(t,c),b=null;try{b=JSON.parse(await y(l(h,"install-manifest.json"),"utf8"))}catch{continue}b.schemaVersion===q&&(!s&&b.cliVersion!==this.deps.cliVersion||(!n||b.installedAt>n.manifest.installedAt)&&(n={manifest:b,root:h}))}if(!n)return{class:t,installed:!1};let r=this.paths(t,n.manifest.bundleVersion),o=[l(r.appium,"node_modules","appium","index.js")];t==="emulator"&&o.push(l(r.platformTools,this.deps.os==="win32"?"adb.exe":"adb")),t==="simulator"&&o.push(l(r.wdaDir,"WebDriverAgentRunner-Runner.app"));for(let c of o)if(!await A(c))return{class:t,installed:!1,version:n.manifest.bundleVersion,root:n.root,corrupt:`a bundle component is missing from disk (${X(n.root,c)})`};let a=await this.postInstallDrifted(r);return{class:t,installed:!0,version:n.manifest.bundleVersion,root:n.root,...a?{needsRepair:a}:{}}}async postInstallDrifted(t){let s=l(t.appiumHome,"node_modules",".cache","appium","extensions.yaml");if(!await A(s))return!1;let e=await y(s,"utf8");for(let n of e.split(`
|
|
6
6
|
`)){let r=/^\s*installPath:\s*(.+?)\s*$/.exec(n);if(r&&!r[1].startsWith(t.appiumHome))return!0}return!1}async environment(t){let s=await this.status(t);if(!s.installed||!s.version)return{dirs:[]};let e=this.paths(t,s.version),n=[],r={dirs:n,appiumHome:e.appiumHome};return t!=="simulator"&&(n.push(e.platformTools),r.platformToolsDir=e.platformTools),n.push(l(e.appium,"node_modules",".bin")),t==="simulator"&&(n.push(e.iwdpBinDir),r.wdaDir=e.wdaDir,r.wdaRoot=l(e.root,"wda"),r.iwdpBinDir=e.iwdpBinDir),r}async ensure(t,s){let e,n;try{e=await this.resolveOrExplain(t)}catch(a){n=a}let r=await this.status(t,e?.bundleVersion);if(r.installed&&!r.needsRepair)return e&&r.version&&await this.adoptInstall(t,r.version),r;if(!e)throw n;if(r.installed&&r.needsRepair&&r.version){let a=this.paths(t,r.version);return await this.withInstallLock(async()=>{await this.postInstall(a.root,a,s.onProgress)}),await this.adoptInstall(t,r.version),this.status(t,e.bundleVersion)}let o=e;if(!s.automatic&&!s.approved)throw new j(t,o,this.classRoot(t,o.bundleVersion));return await this.withInstallLock(async()=>{(await this.status(t,o.bundleVersion)).installed||await this.install(t,o,s.onProgress)}),this.status(t,o.bundleVersion)}async adoptInstall(t,s){try{let e=this.paths(t,s).installManifest,n=JSON.parse(await y(e,"utf8"));if(n.cliVersion===this.deps.cliVersion)return;n.cliVersion=this.deps.cliVersion;let r=l(C(e),`install-manifest-${process.pid}.json`);await x(r,`${JSON.stringify(n,null,2)}
|