@testmuai/kane-cli 0.10.0-rc.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatSurface-XUV3EQPZ.js +2 -0
- package/dist/{ChromeProfilePicker-CRKQEFYD.js → ChromeProfilePicker-FWPUDKD6.js} +1 -1
- package/dist/{CliFeedbackPrompt-M7BMWLKK.js → CliFeedbackPrompt-D5L2DO6A.js} +1 -1
- package/dist/{CliUploadProgress-OP7DXMC2.js → CliUploadProgress-HQX57WE6.js} +1 -1
- package/dist/{ConfigView-XI74BCCH.js → ConfigView-DGQXKEON.js} +1 -1
- package/dist/EvidenceViewOffer-EIANIYN7.js +2 -0
- package/dist/FolderPicker-XOA7FTHF.js +2 -0
- package/dist/InfoBox-OBH7SUGC.js +2 -0
- package/dist/{LinksBox-PNSESNCU.js → LinksBox-WZ4RAMSH.js} +1 -1
- package/dist/{ProfilesView-PYDZZHKO.js → ProfilesView-AGRNPGSW.js} +1 -1
- package/dist/ProjectPicker-6KRLKV4U.js +2 -0
- package/dist/SaveSessionPrompt-J2OPDEOO.js +2 -0
- package/dist/SingleShotApp-QI4B2TSL.js +2 -0
- package/dist/{SummaryBox-FALOODAQ.js → SummaryBox-XQJUZBAN.js} +1 -1
- package/dist/TestMdRunView-I4MV54FB.js +2 -0
- package/dist/TestrunEvidenceTable-WEIUSW3E.js +2 -0
- package/dist/{WhoamiView-6WXGRANY.js → WhoamiView-JQCURK2M.js} +1 -1
- package/dist/{app-download-RXVZB6MM.js → app-download-OU6AGH2X.js} +1 -1
- package/dist/{assurance-job-C3TXZGLL.js → assurance-job-ZI3L6I4F.js} +1 -1
- package/dist/{binary-DJCDMGPX.js → binary-S5YL5GJD.js} +1 -1
- package/dist/bind-LIV72SEZ.js +2 -0
- package/dist/bootstrap-3V6TOO6I.js +2 -0
- package/dist/{bridge-T6QMYKED.js → bridge-SDEP7Y33.js} +1 -1
- package/dist/{catalog-RRQF4TCA.js → catalog-I3PC6LT6.js} +1 -1
- package/dist/catalog-client-WKYG3JN6.js +2 -0
- package/dist/{changelog-GBEVIUFJ.js → changelog-IHNWFYWY.js} +1 -1
- package/dist/chat-committer-FM5NG46O.js +2 -0
- package/dist/{chat-controller-XINCDH6Z.js → chat-controller-FWFQVZTB.js} +1 -1
- package/dist/child-H2YSDFCG.js +2 -0
- package/dist/{chunk-QDFY5GGO.js → chunk-252GEI3H.js} +1 -1
- package/dist/{chunk-TNORODUF.js → chunk-2B75UL7Y.js} +1 -1
- package/dist/{chunk-B2HXPGIZ.js → chunk-2EVP636F.js} +17 -17
- package/dist/{chunk-7XBNMOH4.js → chunk-2GE5X2A5.js} +1 -1
- package/dist/{chunk-NWBLYMH7.js → chunk-2L3A5NKZ.js} +1 -1
- package/dist/{chunk-2OOFURWD.js → chunk-2N75WO7Y.js} +1 -1
- package/dist/{chunk-LRXBJTD4.js → chunk-2PZKMT3I.js} +1 -1
- package/dist/{chunk-N3TCNZSX.js → chunk-2SY2NCOP.js} +1 -1
- package/dist/{chunk-Q3C6NDGI.js → chunk-32Y6QVFG.js} +1 -1
- package/dist/{chunk-QS5ZJFGF.js → chunk-3OVFKUXV.js} +1 -1
- package/dist/{chunk-DHQ4SQWA.js → chunk-3T2TYDPT.js} +1 -1
- package/dist/{chunk-RG372DON.js → chunk-3UHPVQLU.js} +1 -1
- package/dist/{chunk-WYSZ6TPW.js → chunk-3ZPEQDXZ.js} +10 -9
- package/dist/{chunk-XJ7HCXKW.js → chunk-436FZ4KG.js} +1 -1
- package/dist/{chunk-6U7ID777.js → chunk-4523YDTG.js} +1 -1
- package/dist/{chunk-T7H4LBFK.js → chunk-45URQUAK.js} +1 -1
- package/dist/{chunk-4D5PC6QE.js → chunk-4BUEOKFV.js} +1 -1
- package/dist/{chunk-MII3JOO3.js → chunk-4JWJH6TB.js} +1 -1
- package/dist/{chunk-WEM3MOAL.js → chunk-4MNSP4EO.js} +1 -1
- package/dist/{chunk-ZFMRQ57Y.js → chunk-4NUSW4A2.js} +1 -1
- package/dist/{chunk-FSYOTRMC.js → chunk-4R4YUOVY.js} +1 -1
- package/dist/{chunk-T4AVLJCW.js → chunk-4SJAOAYY.js} +1 -1
- package/dist/{chunk-SMTBOSEJ.js → chunk-52VCA4K2.js} +1 -1
- package/dist/{chunk-672CQECV.js → chunk-567D5ZTO.js} +7 -7
- package/dist/{chunk-M6MBMRFR.js → chunk-5IO5ZC4S.js} +1 -1
- package/dist/{chunk-LSDJOVWW.js → chunk-5R3ODQHH.js} +1 -1
- package/dist/{chunk-I2KOGINW.js → chunk-5T6II7VN.js} +1 -1
- package/dist/{chunk-DDJNYQBH.js → chunk-65BG6GAE.js} +1 -1
- package/dist/{chunk-S53AQU7R.js → chunk-6DZ7LVOG.js} +1 -1
- package/dist/chunk-6K5BEEAJ.js +2 -0
- package/dist/{chunk-42PALMW2.js → chunk-6TNLITJO.js} +1 -1
- package/dist/{chunk-A6TJOZ24.js → chunk-7C4IEL5V.js} +1 -1
- package/dist/{chunk-PUVMC4PX.js → chunk-7V34ZMMS.js} +1 -1
- package/dist/{chunk-SONMD3W5.js → chunk-7ZJWUWSN.js} +1 -1
- package/dist/{chunk-OVNRRI4E.js → chunk-A3TCFSCK.js} +1 -1
- package/dist/{chunk-BJJUKB5K.js → chunk-A4BB6GLN.js} +1 -1
- package/dist/{chunk-V7S6S5W3.js → chunk-AG5XJWEV.js} +1 -1
- package/dist/{chunk-VYHT2IET.js → chunk-AGXAJ2II.js} +1 -1
- package/dist/{chunk-6UVIY56J.js → chunk-AIGQCMGY.js} +1 -1
- package/dist/{chunk-RX6776AI.js → chunk-AU26ZZTX.js} +1 -1
- package/dist/{chunk-OEWYXCTA.js → chunk-AUBSLPJZ.js} +1 -1
- package/dist/{chunk-6LIC2R22.js → chunk-B2WFW74J.js} +1 -1
- package/dist/{chunk-NXRF7FFS.js → chunk-B7JLM3IX.js} +1 -1
- package/dist/{chunk-QNLVC5ZB.js → chunk-BRVIK3BU.js} +1 -1
- package/dist/{chunk-WI7K6VKQ.js → chunk-BY2B4YJN.js} +1 -1
- package/dist/{chunk-DNGOT65K.js → chunk-CBVHP7JB.js} +1 -1
- package/dist/{chunk-ZFM77AQU.js → chunk-CJE7PKRV.js} +1 -1
- package/dist/{chunk-AA674WLL.js → chunk-CJQUVHHS.js} +1 -1
- package/dist/{chunk-OFSDB7B4.js → chunk-COJINPOK.js} +2 -2
- package/dist/{chunk-IBBD36FQ.js → chunk-D6CS62O7.js} +1 -1
- package/dist/{chunk-252FWF2G.js → chunk-DBTMKBHU.js} +1 -1
- package/dist/{chunk-QCKA665H.js → chunk-DHYGCHKB.js} +1 -1
- package/dist/{chunk-TW63WWEN.js → chunk-DTYT6KBO.js} +1 -1
- package/dist/{chunk-QHRUBG7J.js → chunk-EC5IP5HZ.js} +1 -1
- package/dist/{chunk-35ECWCCK.js → chunk-EH43VWVR.js} +1 -1
- package/dist/{chunk-HQ2E2XCU.js → chunk-ENG2UTMX.js} +1 -1
- package/dist/{chunk-BZVNI44O.js → chunk-EPJ5SJL2.js} +2 -2
- package/dist/{chunk-F3U6T4YD.js → chunk-EQWMOGLO.js} +9 -9
- package/dist/{chunk-OF7WPCTQ.js → chunk-EVZLINBN.js} +1 -1
- package/dist/{chunk-44B6THYK.js → chunk-EX6ORR7P.js} +1 -1
- package/dist/{chunk-UAWWLLTI.js → chunk-FBQ7PQJV.js} +1 -1
- package/dist/{chunk-UALJTPSA.js → chunk-FLOQ5NZL.js} +2 -2
- package/dist/{chunk-LCSJ7GOG.js → chunk-FPPVNF53.js} +1 -1
- package/dist/{chunk-5BUIIFLC.js → chunk-FPVGA6XT.js} +1 -1
- package/dist/{chunk-IXW7FOGX.js → chunk-FVYIV36L.js} +1 -1
- package/dist/chunk-FYCD765R.js +161 -0
- package/dist/{chunk-AVI5H4UM.js → chunk-G2KTWFMU.js} +1 -1
- package/dist/{chunk-CPBBYNL7.js → chunk-G3CYFCSR.js} +1 -1
- package/dist/{chunk-JNSWKGTB.js → chunk-G3J4XY3Z.js} +1 -1
- package/dist/{chunk-IMDMRJQ6.js → chunk-GET4DINR.js} +2 -2
- package/dist/{chunk-54XA5MZH.js → chunk-GGS3ATPB.js} +1 -1
- package/dist/{chunk-MGNRNLBE.js → chunk-GGV336P5.js} +1 -1
- package/dist/{chunk-OQ5G773E.js → chunk-GI2JPIX5.js} +1 -1
- package/dist/{chunk-HAW5WEKT.js → chunk-GRO6DLN3.js} +1 -1
- package/dist/{chunk-LRS5MGBY.js → chunk-GXMD23XB.js} +1 -1
- package/dist/chunk-GYDJO32R.js +2 -0
- package/dist/{chunk-W7FLXW6Q.js → chunk-H4KPNGY4.js} +1 -1
- package/dist/{chunk-Y4T4SLDO.js → chunk-HBVHIEPB.js} +1 -1
- package/dist/{chunk-EF47KRUK.js → chunk-HGVM2OZU.js} +1 -1
- package/dist/{chunk-DD5TULWQ.js → chunk-HMQ5M4JJ.js} +1 -1
- package/dist/{chunk-ZTHYAHDN.js → chunk-I2VU2DTS.js} +1 -1
- package/dist/{chunk-7NCJMWFX.js → chunk-J4LQAT5P.js} +1 -1
- package/dist/{chunk-ZZP5SHUV.js → chunk-JCSVBD4F.js} +1 -1
- package/dist/{chunk-57MDWTON.js → chunk-JFBEHCJN.js} +1 -1
- package/dist/{chunk-JQSLUGD4.js → chunk-JGLADDRH.js} +1 -1
- package/dist/{chunk-JPYW6U4D.js → chunk-JOCEZK2M.js} +1 -1
- package/dist/{chunk-7LKCWO2R.js → chunk-JQ7ZZQXC.js} +3 -3
- package/dist/{chunk-QQ4TKLWP.js → chunk-JRSEAXFE.js} +1 -1
- package/dist/{chunk-2IZRPMZN.js → chunk-JSLKCCD2.js} +1 -1
- package/dist/{chunk-H3HHSTEK.js → chunk-JT6WLJSV.js} +1 -1
- package/dist/{chunk-4LPX2OLV.js → chunk-JTJ7IPNI.js} +1 -1
- package/dist/{chunk-2NFS4KE4.js → chunk-JX5NVKTV.js} +1 -1
- package/dist/{chunk-6NWT2TEJ.js → chunk-K2PLULJD.js} +1 -1
- package/dist/{chunk-SWMTXMKB.js → chunk-K3OSK6PB.js} +1 -1
- package/dist/{chunk-3GXN6VF6.js → chunk-KDR662D2.js} +1 -1
- package/dist/{chunk-NLZZLANH.js → chunk-KRRZCY7U.js} +1 -1
- package/dist/{chunk-NDEI7R4K.js → chunk-LHQUCRCH.js} +1 -1
- package/dist/{chunk-WOSANGV6.js → chunk-LNHBZEDC.js} +1 -1
- package/dist/{chunk-PZA3BSOE.js → chunk-LXM7VHYN.js} +1 -1
- package/dist/{chunk-LNNWCBPQ.js → chunk-MHB6DMKZ.js} +1 -1
- package/dist/{chunk-NFRA64NU.js → chunk-MJKRJGER.js} +1 -1
- package/dist/{chunk-BVO4C5F2.js → chunk-MKPDF26Q.js} +1 -1
- package/dist/{chunk-VLDCHFXF.js → chunk-MPEIMWQI.js} +1 -1
- package/dist/{chunk-YIKF4ERQ.js → chunk-MW2WNYJO.js} +2 -2
- package/dist/{chunk-MYVKUJGS.js → chunk-N3KTLWJL.js} +1 -1
- package/dist/{chunk-XIPKSXRQ.js → chunk-NJCN6LP5.js} +6 -6
- package/dist/{chunk-2S3W2JT3.js → chunk-NOFJXCYP.js} +1 -1
- package/dist/{chunk-3UVSAAES.js → chunk-NTXFPNAP.js} +1 -1
- package/dist/{chunk-RW3Z2HMB.js → chunk-ONZ2CSTZ.js} +1 -1
- package/dist/{chunk-UYDHOHSZ.js → chunk-OR2B6T3B.js} +1 -1
- package/dist/{chunk-UUJIGOEO.js → chunk-ORNVIEUA.js} +1 -1
- package/dist/{chunk-R7KXAISS.js → chunk-P2LDAW3C.js} +1 -1
- package/dist/{chunk-T3HEJASG.js → chunk-PBWYQR5I.js} +1 -1
- package/dist/{chunk-O3HHTKZ5.js → chunk-PCDIEYV6.js} +1 -1
- package/dist/{chunk-EZN7CF45.js → chunk-PL3SG3M2.js} +1 -1
- package/dist/{chunk-SA6IKFFD.js → chunk-PQXYHI5W.js} +1 -1
- package/dist/{chunk-JD52IXON.js → chunk-PTISAIZW.js} +1 -1
- package/dist/{chunk-XZYA7DNH.js → chunk-PVN64537.js} +1 -1
- package/dist/{chunk-GZFLJORM.js → chunk-QECTIQAC.js} +1 -1
- package/dist/chunk-QMOGBKJM.js +2 -0
- package/dist/{chunk-L4UVUFL6.js → chunk-QQI6N3FO.js} +1 -1
- package/dist/{chunk-7RWP4Y3H.js → chunk-QVP4FSKT.js} +1 -1
- package/dist/{chunk-2SWSVJUP.js → chunk-QWZJ5QDO.js} +2 -2
- package/dist/{chunk-RX47NRSM.js → chunk-RARD6TC6.js} +1 -1
- package/dist/chunk-RDH3E25Q.js +27 -0
- package/dist/{chunk-AZLNLHUA.js → chunk-RLOJH5O6.js} +1 -1
- package/dist/{chunk-RPRXRKKR.js → chunk-RQKMSNEU.js} +1 -1
- package/dist/{chunk-R4JUKTDO.js → chunk-SB6P5EQH.js} +1 -1
- package/dist/{chunk-V5JGXOV7.js → chunk-SBR6D6GS.js} +1 -1
- package/dist/{chunk-W3OVSDBN.js → chunk-TLOYTGVT.js} +5 -5
- package/dist/{chunk-OZNBTSW5.js → chunk-TZVPDGJD.js} +1 -1
- package/dist/{chunk-D756UWY2.js → chunk-U7NRZBB5.js} +1 -1
- package/dist/{chunk-72RC7JSA.js → chunk-UEPJ26X2.js} +1 -1
- package/dist/chunk-UJLULWSR.js +21 -0
- package/dist/{chunk-7RPKHKA3.js → chunk-ULGBK4NS.js} +1 -1
- package/dist/{chunk-VQLH63X7.js → chunk-UNWPBMVM.js} +1 -1
- package/dist/chunk-URAYFJGM.js +87 -0
- package/dist/{chunk-FIP5L6LV.js → chunk-USJ3LUAL.js} +1 -1
- package/dist/chunk-UUWSULIM.js +101 -0
- package/dist/chunk-UX2CDUPE.js +9 -0
- package/dist/{chunk-AIXJYMSP.js → chunk-VA3BSIUQ.js} +1 -1
- package/dist/chunk-VQZOKTJ2.js +12 -0
- package/dist/{chunk-VG44B5JD.js → chunk-VVCZRCRD.js} +1 -1
- package/dist/{chunk-XBEYWXPV.js → chunk-VZA7BPCK.js} +1 -1
- package/dist/{chunk-NQTYWHPB.js → chunk-W3NWHWK2.js} +1 -1
- package/dist/{chunk-E6KSRQXL.js → chunk-WERIGVOH.js} +1 -1
- package/dist/{chunk-7EXDYXXD.js → chunk-WKZLK57W.js} +1 -1
- package/dist/{chunk-I5NSJBOZ.js → chunk-WQR2GYP7.js} +1 -1
- package/dist/{chunk-OAKYUBD3.js → chunk-WX4VGH5Q.js} +1 -1
- package/dist/{chunk-OJ33Q6DU.js → chunk-WZLDFEWR.js} +1 -1
- package/dist/{chunk-HFJSP4KD.js → chunk-X3J4CC27.js} +1 -1
- package/dist/chunk-XLQ4F6BI.js +9 -0
- package/dist/{chunk-D4FFXCX6.js → chunk-XMALVGH7.js} +2 -2
- package/dist/{chunk-AJQZ3ST5.js → chunk-Y3YULFCK.js} +1 -1
- package/dist/{chunk-RFIIM33J.js → chunk-YGMQXS2J.js} +1 -1
- package/dist/{chunk-RDP7GWSY.js → chunk-YH4VZVHJ.js} +1 -1
- package/dist/{chunk-ENL4XTQ2.js → chunk-YI4ESDAX.js} +1 -1
- package/dist/{chunk-K45BKGB5.js → chunk-YKL5H4K6.js} +1 -1
- package/dist/{chunk-74W4AOT2.js → chunk-YKOEABP2.js} +1 -1
- package/dist/{chunk-P7MSVLAH.js → chunk-YYVBE6W2.js} +1 -1
- package/dist/{chunk-432ZOE42.js → chunk-Z5BFCTHI.js} +2 -2
- package/dist/{chunk-UEE3RZN4.js → chunk-Z777GGHB.js} +1 -1
- package/dist/{chunk-FFL55I2M.js → chunk-ZGQM6KWN.js} +1 -1
- package/dist/{chunk-T6K2MEWP.js → chunk-ZI3X7DI2.js} +1 -1
- package/dist/{chunk-NWD54VV5.js → chunk-ZKPY3AXW.js} +1 -1
- package/dist/chunk-ZRDX2ARO.js +4 -0
- package/dist/{chunk-MNBGG4H3.js → chunk-ZTAZ2R5Z.js} +1 -1
- package/dist/{chunk-LKQFG4RW.js → chunk-ZY65IZJR.js} +1 -1
- package/dist/{chunk-LWJRSUE2.js → chunk-ZZNQIFFI.js} +1 -1
- package/dist/commands-QOORPTSI.js +2 -0
- package/dist/{committer-JGY66PFM.js → committer-26UZDYSA.js} +1 -1
- package/dist/{config-5ZOALGKE.js → config-B472DZSR.js} +1 -1
- package/dist/{cover-cmd-UA2SVIZZ.js → cover-cmd-3VO6QC5Y.js} +1 -1
- package/dist/{credentials-MRG452Y6.js → credentials-TLT3RQOO.js} +1 -1
- package/dist/{deps-bundle-FWINW4XM.js → deps-bundle-CMTIWBS5.js} +1 -1
- package/dist/{deps-resolve-IET4KIBO.js → deps-resolve-XLFZK74A.js} +1 -1
- package/dist/{design-chat-MM5PJD2N.js → design-chat-I7X3QDDY.js} +1 -1
- package/dist/design-committer-Y7R56RFZ.js +2 -0
- package/dist/design-headless-HUQOXLZB.js +2 -0
- package/dist/{design-remote-SPVRIY2H.js → design-remote-UDC5FP45.js} +2 -2
- package/dist/device-env-MMGISNHN.js +2 -0
- package/dist/dispatch-P2445PUU.js +2 -0
- package/dist/{doctor-VAX2BWQF.js → doctor-UHFCIM4B.js} +1 -1
- package/dist/{docx-convert-6IZO5P5K.js → docx-convert-N4KMLLKO.js} +1 -1
- package/dist/{dossier-NROC2MCY.js → dossier-6KMKEIXV.js} +1 -1
- package/dist/evidence-M3JTOJNL.js +2 -0
- package/dist/{evidence-presentation-YYTIDCBS.js → evidence-presentation-DV3DRB4S.js} +1 -1
- package/dist/evolve-cmd-K3JXACMN.js +2 -0
- package/dist/{evolve-remote-BGHULJTL.js → evolve-remote-CUDVV2O2.js} +1 -1
- package/dist/{exit-manager-EDHCETUN.js → exit-manager-EGWAZHCR.js} +1 -1
- package/dist/{explain-cmd-WOBGS6KX.js → explain-cmd-235TY7QX.js} +1 -1
- package/dist/{explain-cmd-VYAANFFZ.js → explain-cmd-R67B4YR3.js} +1 -1
- package/dist/explore-UDD5FHXW.js +2 -0
- package/dist/{explore-context-tty-JTZVZFOE.js → explore-context-tty-YXEFT32U.js} +1 -1
- package/dist/{explore-entry-5OGNLFAU.js → explore-entry-V6L5FSP4.js} +4 -4
- package/dist/{explore-live-2XZHUYFS.js → explore-live-N5VBLBUI.js} +1 -1
- package/dist/{explore-run-tty-LGTIK2NA.js → explore-run-tty-ZZQ33GNA.js} +2 -2
- package/dist/{extract-bind-NM2BBK4I.js → extract-bind-BTINHHE5.js} +3 -3
- package/dist/{extract-chat-HLQMJJIC.js → extract-chat-ABZ5S7UU.js} +1 -1
- package/dist/{extract-cmd-T2TSAC3N.js → extract-cmd-45OZETCM.js} +2 -2
- package/dist/extract-headless-ALEFAMVS.js +2 -0
- package/dist/{feeder-NY45UFJK.js → feeder-L55TH2NC.js} +1 -1
- package/dist/folder-flags-HTKJCXKB.js +2 -0
- package/dist/{gaps-cmd-PTSKPTF7.js → gaps-cmd-ROGQWK5X.js} +1 -1
- package/dist/{gate-WISOUTHQ.js → gate-QA5J7UZA.js} +1 -1
- package/dist/gate-XFFFX5ZF.js +2 -0
- package/dist/{generate-headless-JYZP6VXZ.js → generate-headless-DAH3HHRQ.js} +2 -2
- package/dist/hold-passthrough-K5PP26CP.js +2 -0
- package/dist/impact-cmd-3VFJAKYK.js +11 -0
- package/dist/index.js +171 -165
- package/dist/ingest-S5R736ZV.js +2 -0
- package/dist/{ingest-cmd-LHCBMO4Z.js → ingest-cmd-YSEH5EPU.js} +3 -3
- package/dist/ingest-remote-C6AP2Q7E.js +2 -0
- package/dist/install-B26Y2NU4.js +2 -0
- package/dist/{interactive-bind-5EJQUGKI.js → interactive-bind-P3GTFIZM.js} +4 -4
- package/dist/{interactive-remote-D77ULJGL.js → interactive-remote-PBRQHTAF.js} +2 -2
- package/dist/lane-7IEAE6AC.js +2 -0
- package/dist/lattice-auth-7EL4ET3P.js +2 -0
- package/dist/{lifecycle-cmd-7SM6UCMH.js → lifecycle-cmd-PUNFWKV5.js} +1 -1
- package/dist/{list-cmd-Z6FZXMFU.js → list-cmd-RD7YBF4S.js} +1 -1
- package/dist/list-commands-UZELZAB3.js +2 -0
- package/dist/{list-remote-WOPOC6KK.js → list-remote-KGKXPCQA.js} +1 -1
- package/dist/{locks-cmd-JJ2QNTNY.js → locks-cmd-LXZ6I4QG.js} +1 -1
- package/dist/{logical-ids-RXAQJZ3T.js → logical-ids-D5PFYY4C.js} +1 -1
- package/dist/login-flow-CHLGQGHK.js +2 -0
- package/dist/{maintenance-cmd-VRTGZVRE.js → maintenance-cmd-WRWBCP3R.js} +1 -1
- package/dist/{mobile-prompts-KNAHU64X.js → mobile-prompts-Z7NQHRGP.js} +1 -1
- package/dist/{onboarding-LGT6PMDZ.js → onboarding-ZP4XDYEO.js} +1 -1
- package/dist/{open-provider-OZAG6WZS.js → open-provider-U26BBVUE.js} +1 -1
- package/dist/pdf-convert-LMKOKLXT.js +2 -0
- package/dist/{persist-recorded-session-BX7II5P7.js → persist-recorded-session-4IRYG5CJ.js} +1 -1
- package/dist/phase-seed-2H6OXZXT.js +2 -0
- package/dist/pipeline-U7D25NST.js +2 -0
- package/dist/policy-commands-TY6WOR73.js +8 -0
- package/dist/prepare-target-EVL2QSXA.js +2 -0
- package/dist/{pull-cmd-6AL2WYHB.js → pull-cmd-QJQANBAW.js} +1 -1
- package/dist/pull-route-AIOTLA3D.js +2 -0
- package/dist/{readmodel-INMP6MNW.js → readmodel-KXCFPL2M.js} +1 -1
- package/dist/real-device-run-QODMDUXF.js +2 -0
- package/dist/{reconcile-cmd-R6H37SQR.js → reconcile-cmd-IJTQAJZX.js} +4 -4
- package/dist/reconcile-deps-2CTIFXDR.js +2 -0
- package/dist/{reconcile-remote-GWDV5CUT.js → reconcile-remote-23D6SXXT.js} +2 -2
- package/dist/{recording-banner-ACC67Q2U.js → recording-banner-MNRMMEX4.js} +1 -1
- package/dist/registry-MZYBLEW2.js +2 -0
- package/dist/remote-entry-DW2J56N4.js +2 -0
- package/dist/remote-mode-AFNCN6EE.js +4 -0
- package/dist/{remote-words-45USLRVN.js → remote-words-RCNFI2TQ.js} +1 -1
- package/dist/{require-project-folder-A3UDRELU.js → require-project-folder-7UH43GHI.js} +1 -1
- package/dist/{resolve-run-intent-ZGPSUBXV.js → resolve-run-intent-XEWFYMGN.js} +1 -1
- package/dist/{resolver-IPM6R7U4.js → resolver-QMPX6RBR.js} +1 -1
- package/dist/{revert-FHOBLZWF.js → revert-37346WLE.js} +1 -1
- package/dist/{review-cmd-NNT5C5RZ.js → review-cmd-2OECKNL5.js} +1 -1
- package/dist/run-JWOHNWA3.js +2 -0
- package/dist/run-QFJ6ZRVD.js +2 -0
- package/dist/run-remote-66QTUQ2M.js +2 -0
- package/dist/{run-startup-gate-NKRMKYBB.js → run-startup-gate-USQFSW47.js} +1 -1
- package/dist/run-test-md-7DRWCSQE.js +19 -0
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-cmd-GYMETJHG.js → sessions-cmd-LQ2LZQOC.js} +2 -2
- package/dist/{sessions-remote-GI7GOBMH.js → sessions-remote-H7CQST42.js} +1 -1
- package/dist/{skill-installer-3QAVQGDH.js → skill-installer-LKYY6XFJ.js} +1 -1
- package/dist/{store-X6XPFSKF.js → store-KM5MG3XB.js} +1 -1
- package/dist/store-choice-4J2NN6OQ.js +2 -0
- package/dist/store-guard-34GG2TW2.js +2 -0
- package/dist/{store-site-KA2DNBGY.js → store-site-ZSFINU6C.js} +1 -1
- package/dist/stream-warnings-N4KVVWXV.js +2 -0
- package/dist/sync-cmd-3CHSWWWW.js +2 -0
- package/dist/{sync-setup-5NUCH6N3.js → sync-setup-QQXYO6R4.js} +1 -1
- package/dist/tcg-generate-IPD5FQUW.js +2 -0
- package/dist/{test-definition-VRI4YIYL.js → test-definition-53XNBEDE.js} +1 -1
- package/dist/testmd-actions-V7P7BMKE.js +2 -0
- package/dist/{testmd-sync-ACKCIOL3.js → testmd-sync-PQ4GFKHB.js} +1 -1
- package/dist/tms-client-XWCR7O7J.js +2 -0
- package/dist/token-refresh-LR33BKAB.js +2 -0
- package/dist/{use-case-ref-NE4X4MZN.js → use-case-ref-NA3IXGQW.js} +1 -1
- package/dist/{validate-basic-RE2WLIGQ.js → validate-basic-3DX3MMC7.js} +1 -1
- package/dist/verdicts-7GKZEDHV.js +2 -0
- package/dist/{version-check-4FJVZP3K.js → version-check-OV6AOVED.js} +1 -1
- package/dist/{view-cmd-N47BQZPD.js → view-cmd-QDKBBNIU.js} +1 -1
- package/dist/{walk-session-DA7QWXSW.js → walk-session-BAYYPIKN.js} +1 -1
- package/dist/with-telemetry-62LW4VFI.js +2 -0
- package/package.json +12 -12
- package/dist/ChatSurface-VPD5G67Q.js +0 -2
- package/dist/EvidenceViewOffer-HAAK6DS5.js +0 -2
- package/dist/FolderPicker-W5S6RFCP.js +0 -2
- package/dist/InfoBox-OWUEHV2D.js +0 -2
- package/dist/ProjectPicker-BGFCUGT5.js +0 -2
- package/dist/SaveSessionPrompt-SUJE54GS.js +0 -2
- package/dist/SingleShotApp-4TDXZEUA.js +0 -2
- package/dist/TestMdRunView-4GPRWHEU.js +0 -2
- package/dist/TestrunEvidenceTable-OBVQJ6IO.js +0 -2
- package/dist/bind-XVO4CQYV.js +0 -2
- package/dist/bootstrap-TY5RANJ7.js +0 -2
- package/dist/chat-committer-ZCSRJEUB.js +0 -2
- package/dist/child-G2GCW73X.js +0 -2
- package/dist/chunk-2OSFI33O.js +0 -97
- package/dist/chunk-65VANXOF.js +0 -147
- package/dist/chunk-C6HI6Y3S.js +0 -2
- package/dist/chunk-EXFDIVNI.js +0 -9
- package/dist/chunk-I6OQISK4.js +0 -2
- package/dist/chunk-MZOIHUVX.js +0 -27
- package/dist/chunk-NC7D7GOM.js +0 -21
- package/dist/chunk-QTZBVDPR.js +0 -12
- package/dist/chunk-SLKYD44Y.js +0 -2
- package/dist/design-committer-TRYP3LOZ.js +0 -2
- package/dist/design-headless-FZONCKHW.js +0 -2
- package/dist/device-env-LXJ65AVF.js +0 -2
- package/dist/dispatch-DVQ3H7EJ.js +0 -2
- package/dist/evidence-LVVK7ROT.js +0 -2
- package/dist/evolve-cmd-AGRKG7T3.js +0 -2
- package/dist/explore-LOKNOVNP.js +0 -2
- package/dist/extract-headless-OQTQ3FJK.js +0 -2
- package/dist/folder-flags-WXUR6OPJ.js +0 -2
- package/dist/gate-P57VP4E5.js +0 -2
- package/dist/hold-passthrough-IOWPVB4W.js +0 -2
- package/dist/ingest-PDGS5ZTL.js +0 -2
- package/dist/ingest-remote-D5TO5JQP.js +0 -2
- package/dist/install-Z6K2D2VY.js +0 -2
- package/dist/lane-AQYRIW24.js +0 -2
- package/dist/lattice-auth-74XGF77Y.js +0 -2
- package/dist/list-commands-CZYZ7GIG.js +0 -2
- package/dist/login-flow-2FZEOVHM.js +0 -2
- package/dist/pdf-convert-447ACUB3.js +0 -2
- package/dist/phase-seed-LCJ4WSYV.js +0 -2
- package/dist/pipeline-IXVTVRS5.js +0 -2
- package/dist/prepare-target-ULMKVKMC.js +0 -2
- package/dist/pull-route-TTVARJMV.js +0 -2
- package/dist/real-device-run-2LFS5WE2.js +0 -2
- package/dist/reconcile-deps-TWJ3FTSU.js +0 -2
- package/dist/registry-6IJYQXQC.js +0 -2
- package/dist/remote-entry-YL7O2NJQ.js +0 -2
- package/dist/remote-mode-7G6PLJCW.js +0 -4
- package/dist/run-5RQUCNYP.js +0 -2
- package/dist/run-PC5YO4AS.js +0 -2
- package/dist/run-remote-3AYYVPKX.js +0 -2
- package/dist/run-test-md-HE6DUWQR.js +0 -17
- package/dist/store-choice-RT73HAI7.js +0 -2
- package/dist/store-guard-SNWKLHQV.js +0 -2
- package/dist/stream-warnings-GEQKKJU7.js +0 -2
- package/dist/sync-cmd-NBPPDG3B.js +0 -2
- package/dist/tcg-generate-Z23CUISY.js +0 -2
- package/dist/testmd-actions-GH5BW5V5.js +0 -2
- package/dist/tms-client-NXAB6VJD.js +0 -2
- package/dist/token-refresh-4UCYAG6A.js +0 -2
- package/dist/verdicts-XK3GAUX3.js +0 -2
- package/dist/with-telemetry-7V4LY2BG.js +0 -2
|
@@ -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-QWZJ5QDO.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-YXEFT32U.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,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as v}from"./chunk-34R7BNZ2.js";import{a as S}from"./chunk-QSCXXNC2.js";import{n as g}from"./chunk-
|
|
2
|
+
import{b as v}from"./chunk-34R7BNZ2.js";import{a as S}from"./chunk-QSCXXNC2.js";import{n as g}from"./chunk-UJLULWSR.js";import{a as u,b as d}from"./chunk-QMOGBKJM.js";import{existsSync as P}from"fs";import{join as T}from"path";import{mkdirSync as b,rmSync as h,writeFileSync as k}from"fs";import{join as E,resolve as A}from"path";import{join as w}from"path";function m(){return process.env.KANE_CLI_WIRE_BASE_DIR||d}function J(e){return w(m(),"sessions",`testrun-${e}`)}function y(e=m()){return E(e,"sessions","active")}function _(e,r){return E(y(r),`${e}.json`)}function x(e){let r=e.pid??process.pid,n=_(r,e.baseDir);try{b(y(e.baseDir),{recursive:!0}),k(n,JSON.stringify({pid:r,cwd:process.cwd(),surface:e.surface,session_dir:A(e.sessionDir),started:new Date().toISOString(),cli_version:u,host_agent:S()},null,2)+`
|
|
3
3
|
`)}catch{}return n}function f(e=process.pid,r){try{h(_(e,r),{force:!0})}catch{}}var R={run:"run_end",testmd:"test_md_done",testrun:"testrun_done",explore:"done"};import{appendFileSync as I,mkdirSync as N}from"fs";import{dirname as O}from"path";function D(e){let r=!1;return{path:e,append(n){try{r||(N(O(e),{recursive:!0}),r=!0),I(e,n+`
|
|
4
4
|
`)}catch{}}}}function W(e,r=()=>new Date){let{v:n,ts:c,...i}=e;return{...i,v:1,ts:typeof c=="string"?c:r().toISOString()}}function V(e){let r=e.stdout??(t=>{process.stdout.write(t)}),n=R[e.surface],c=!1,i=null,o=null,p=[],l=()=>{if(!(o||!i||!P(i))){o=D(T(i,"events.ndjson"));for(let t of p)o.append(t);p=[];try{e.onAttach?.(i)}catch{}}};return{emit(t){if(c)return;let a=v(JSON.stringify(W(t,e.now)));r(a+`
|
|
5
5
|
`),l(),o?o.append(a):p.push(a),t.type===n&&(c=!0,p=[])},attachSessionDir(t){i=t,l()},setTerminal(t){n=t},get logPath(){return o?o.path:null}}}var s=null;function j(e){return r=>{x({surface:e,sessionDir:r}),g("wire-active-run",()=>f()),process.once("exit",()=>f())}}function se(e,r){return s=V({surface:e,cliVersion:u,onAttach:r??j(e)}),s.emit({type:"stream_start",cli_version:u,surface:e,pid:process.pid}),s}function ce(){return s}function ue(e){if(s){s.emit(e);return}process.stdout.write(JSON.stringify(W(e))+`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P}from"./chunk-
|
|
2
|
+
import{a as P}from"./chunk-DTYT6KBO.js";import{b as Le}from"./chunk-7C4IEL5V.js";import{a as _t}from"./chunk-BSRSXYDZ.js";import{a as m,c as Nt,d as At,e as I,f as Ae,g as Ce,h as Ct,i as Te,j as Tt}from"./chunk-CB4ARIHR.js";import{a as Z,c as xt,e as It}from"./chunk-LNHBZEDC.js";import{a as Rt}from"./chunk-73Y6T2UK.js";import{d as Ot}from"./chunk-XMPTFXPW.js";import{a as et}from"./chunk-WN5VKKJ3.js";import{b as Pt,c as Ft}from"./chunk-ZTAZ2R5Z.js";import{a as Lt}from"./chunk-VRIZDOO5.js";import{b as qe,d as qt}from"./chunk-ZHWU6L2G.js";import{a as vt,b as Ne,c as Et,d as de}from"./chunk-CJE7PKRV.js";import{a as ot}from"./chunk-6PIIUAZF.js";import{Da as pt,Ea as S,Ga as ft,Ha as ht,Ia as mt,Ka as gt,Na as bt,Pa as W,Qa as L,Sa as ke,Ta as wt,Ua as yt,Va as C,Xa as Re,Ya as St,bb as ve,cb as Ee,eb as $,fb as w,gb as xe,h as at,hb as $t,ib as Ie,kb as Oe,l as ct,lb as kt,mb as _e,o as lt,ob as X,s as dt,xa as K,ya as ut}from"./chunk-Z777GGHB.js";import{c as st,n as it}from"./chunk-DBMW3VUN.js";import{a as q}from"./chunk-KU3YHPWZ.js";import{a as ce,b as le}from"./chunk-7V4BQSSV.js";import{c as rt}from"./chunk-HHW6MRU3.js";import{a as ae}from"./chunk-7DFBOVUB.js";import{s as tt,t as nt}from"./chunk-UJLULWSR.js";import{a as ie}from"./chunk-HCBYKLMW.js";import{a as M,b as k,i as se}from"./chunk-33DWJV67.js";import{a as Nn}from"./chunk-6YGTRKDT.js";import{z as A}from"./chunk-QMOGBKJM.js";import{e as z}from"./chunk-UR6MHSHU.js";import{existsSync as co}from"fs";var D=z(Nn(),1);import{existsSync as re,mkdirSync as Sn,readdirSync as Lr,readFileSync as we,rmSync as yn,writeFileSync as Pr,renameSync as Fr}from"fs";import{randomBytes as Jr}from"crypto";import{basename as Br,join as ze}from"path";import{appendFileSync as he,closeSync as cr,existsSync as b,mkdirSync as T,openSync as lr,readdirSync as j,readFileSync as y,renameSync as ge,rmdirSync as dr,rmSync as _,realpathSync as ur,statfsSync as pr,statSync as on,writeFileSync as fr}from"fs";import{randomBytes as sn}from"crypto";import{basename as an,dirname as R,join as f,relative as Me}from"path";var An=/^sha256:[0-9a-f]{64}$/;function Q(t){let e=new Set,n=r=>{typeof r=="string"&&An.test(r)&&e.add(r)};for(let r of t.nodes??[])n(r.content?.blob);for(let r of Object.values(t.media??{})){n(r.text_blob);for(let o of r.images??[])n(o.blob);n(r.plugin?.index),n(r.plugin?.notes),n(r.plugin?.coverage)}return{blobs:[...e].sort(),proposalId:t.proposal_id??null}}function Pe(t){return"sha256:"+le(Buffer.from("assurance.proposal\0"+ce(JSON.parse(t)),"utf8"))}import{mkdirSync as Cn,readFileSync as Tn}from"fs";import{dirname as qn,join as Ln}from"path";var Jt="locations.json",Bt="state.json";function ue(t,e){return Ln(t,"sync",e)}function Ut(t){return Yt(ue(t,Jt),{version:1,locations:[]})}function $o(t,e){jt(ue(t,Jt),e)}function F(t){return Yt(ue(t,Bt),{version:1,entries:{}})}function Mt(t,e){jt(ue(t,Bt),e)}function Wt(t,e){let n=t.locations;if(n.length===0)throw new Error("no locations yet \u2014 add one with kane-cli context sync add <name> <descriptor>");if(e!==void 0){let o=n.find(i=>i.name===e);if(o)return o;throw new Error(`no location named ${e} \u2014 known locations: ${n.map(i=>i.name).join(", ")}`)}if(n.length===1)return n[0];let r=n.find(o=>o.name==="origin");if(r)return r;throw new Error(`name a location: ${n.map(o=>o.name).join(", ")}`)}var H=class extends Error{code="WITNESS_LOWERED"};function Ht(t,e,n){let r=t.entries[e];if(!r)throw new Error(`no sync state for ${e} \u2014 run kane-cli context sync add ${e} <descriptor> first`);let o=r.witness;if(o){if(n.seq<o.seq)throw new H(`${e} is behind what it already served: position ${o.seq} was seen there, now ${n.seq}`);if(n.seq===o.seq&&n.hash!==o.hash)throw new H(`${e} changed the record at position ${o.seq}: ${o.hash} was seen there, now ${n.hash}`)}r.witness=n}function ko(t,e,n){let r=t.locations.length,o=t.locations.filter(i=>i.name!==n);if(o.length===r){let i=r===0?"none":t.locations.map(s=>s.name).join(", ");throw new Error(`no location named ${n} \u2014 known locations: ${i}`)}return t.locations=o,e.entries[n]?.witness??null}function Yt(t,e){let n;try{n=Tn(t,"utf-8")}catch(o){if(o.code==="ENOENT")return e;throw new Error(`${t} could not be read: ${o instanceof Error?o.message:String(o)}`)}let r;try{r=JSON.parse(n)}catch(o){throw new Error(`${t} is not readable JSON: ${o instanceof Error?o.message:String(o)}`)}if(typeof r!="object"||r===null||!("version"in r)||r.version!==1)throw new Error(`${t} is not a version 1 sync file \u2014 this store was written by a newer kane-cli`);return r}function jt(t,e){Cn(qn(t),{recursive:!0}),$(t,JSON.stringify(e,null,2)+`
|
|
3
3
|
`)}import{closeSync as Yn,existsSync as Zt,linkSync as jn,mkdirSync as Vn,openSync as Gn,readFileSync as Dn,rmSync as Qt,writeFileSync as zn}from"fs";import{dirname as pe,join as en}from"path";import{existsSync as Un}from"fs";import{join as Mn}from"path";var Vt=1e3,Pn=999999999,Gt=/^assurance\/context@(\d+)$/,Fn=Number(Gt.exec(q)[1]);async function te(t,e){let n=await t.get(I(e));if(n===null)throw ee(`position ${e} is absent`);return{hash:Fe(e,n).hash,raw:n}}function Fe(t,e){let n=i=>new m("SYNC_OBJECT_CORRUPT",`the record at position ${t} on the storage is not usable: ${i}`,"the storage object needs a human look; nothing was changed"),r;try{r=JSON.parse(Buffer.from(e).toString("utf8"))}catch(i){throw n(`not JSON (${i instanceof Error?i.message:String(i)})`)}if(typeof r!="object"||r===null||Array.isArray(r)||r.seq!==t)throw n(`it says it is position ${String(r?.seq)}`);let o=r.schema_version===ve&&Ee(r);if(r.schema_version!==void 0&&r.schema_version!==q&&!o){let i=Gt.exec(r.schema_version);throw i&&Number(i[1])>Fn?new m("SYNC_CLIENT_TOO_OLD",`position ${t} is stamped ${r.schema_version}; this kane-cli reads ${q}`,`upgrade kane-cli to a release that reads ${r.schema_version}, then run the command again`):n(`it is stamped ${r.schema_version}, this build reads ${q}`)}if(r.schema_version===q&&Ee(r))throw n(`it carries a source-plugin fact and is stamped ${q}; such a record is stamped ${ve}`);if(r.parents!==void 0&&!(r.prev_hash===null?r.parents.length===0:r.parents.length===1&&r.parents[0]===r.prev_hash))throw n("parents does not mirror prev_hash");return{record:r,hash:L(r)}}async function J(t,e,n=0){let r=e,o=1,i;for(;;){let p=e+o;if(!await t.head(I(p))){i=p;break}r=p,o*=2}if(r===e&&e>0&&!await t.head(I(e)))return J(t,0);for(;i-r>1;){let p=r+Math.floor((i-r)/2);await t.head(I(p))?r=p:i=p}let s=r;if(s===0){if(await t.head(At))throw ee("meta.json exists but position 1 is gone");let p=(await t.list(Nt)).map(Ce).find(h=>h!==null);if(p!==void 0)throw ee(`position ${p} exists but position 1 is gone`);return{seq:0,hash:null,raw:null}}let a=[Ae(s),Ae(Math.min(s+Vt,Pn))];a[1]===a[0]&&a.pop();let c=new Set;for(let p of a)for(let h of await t.list(p)){let x=Ce(h);if(x!==null){if(x>s){if(await t.head(I(s+1))){if(n>=Jn)throw Bn(s);return J(t,s,n+1)}throw ee(`position ${x} exists above the tail at ${s}`)}c.add(x)}}let d=s-(s-1)%Vt;for(let p=d;p<=s;p++)if(!c.has(p))throw ee(`position ${p} is missing below the tail at ${s}`);let{hash:l,raw:u}=await te(t,s);return{seq:s,hash:l,raw:u}}var Jn=3;function Bn(t){return new m("SYNC_REMOTE_HOLE",`the storage kept growing while its tail was being found (last seen at ${t}); nothing was changed`,"run the command again in a moment")}function ee(t){return new m("SYNC_REMOTE_HOLE",`the storage has a hole: ${t} \u2014 a position was deleted below evidence of a later one`,"restore the missing position from a copy that holds it; nothing was changed")}function Dt(t,e){let n=St(t,e);if(n===null)throw new S(`no local record at position ${e} \u2014 run kane-cli context fsck`);if(!(n!==Re&&Un(Mn(t,"commits",`${String(e).padStart(6,"0")}-${n.slice(7,19)}.json`))))throw new m("SYNC_LOCAL_RECORD_CORRUPT",`the local record at position ${e} ${n===Re?"is unreadable":"does not hash to its file name"}`,"run kane-cli context fsck, then restore the record from a backup or a clone; nothing was changed");return n}async function zt(t,e,n){let r=C(t),o=await J(e,n?.seq??0),i=async u=>u===o.seq?o.hash:(await te(e,u)).hash;if(n&&(o.seq<n.seq||await i(n.seq)!==n.hash))throw new m("SYNC_REMOTE_ROLLED_BACK",`the storage was rolled back: position ${n.seq} was seen there with ${n.hash}, `+(o.seq<n.seq?`now its tail is ${o.seq}`:"now a different record sits there"),"restore the storage from a copy that holds the witnessed records, or remove and re-add the location after a human has decided it was rebuilt on purpose");let s=o.seq===0?null:{seq:o.seq,hash:o.hash};if(s===null)return{kind:"empty-storage",local:r,storage:s};if(r===null)return{kind:"empty-local",local:r,storage:s};if(Dt(t,1)!==await i(1))return{kind:"foreign-lineage",local:r,storage:s};let a=Math.min(r.seq,s.seq),c=async u=>(u===r.seq?r.hash:Dt(t,u))===await i(u);if(await c(a))return{kind:r.seq===s.seq?"up-to-date":r.seq<s.seq?"behind":"ahead",local:r,storage:s};let d=1,l=a;for(;l-d>1;){let u=d+Math.floor((l-d)/2);await c(u)?d=u:l=u}return{kind:"diverged",local:r,storage:s,at:l}}function Kt(t){let e=new Map;return{indexOf(n){if(!e.has(n)){let r=t(n);e.set(n,r===null?void 0:it(r))}return e.get(n)},notesBlob:n=>t(n),coverageBlob:n=>t(n)}}function Xt(t,e){for(let[n,r]of Object.entries(t??{})){let o=r?.plugin;if(o==null||typeof o!="object")continue;let i;if(typeof o.index=="string"){if(i=e.indexOf(o.index),i===null)return{code:"UNIT_INDEX_INVALID",sourceId:n,blob:o.index,detail:"that blob is not a unit index"};if(i!==void 0&&(i.plugin!==o.id||i.rules!==o.rules))return{code:"UNIT_INDEX_INVALID",sourceId:n,blob:o.index,detail:`that index was written by plugin ${JSON.stringify(i.plugin)} under rules ${JSON.stringify(i.rules)}, not by ${JSON.stringify(o.id)} under rules ${JSON.stringify(o.rules)} as the record says`}}if(typeof o.notes=="string"){let s=e.notesBlob(o.notes);if(s===null)continue;let a=qt(s);if(a===null)return{code:"NOTES_INVALID",sourceId:n,blob:o.notes,detail:`that blob is not the stored form of a version's notes${Hn(s)}`};if(a.plugin!==o.id)return{code:"NOTES_INVALID",sourceId:n,blob:o.notes,detail:`those notes were written by plugin ${JSON.stringify(a.plugin)}, not by ${JSON.stringify(o.id)} as the record says`};let c=new Set((i?.units??[]).map(l=>l.id).filter(l=>l!==st)),d=qe(a,c);if(d!==null)return{code:"NOTES_INVALID",sourceId:n,blob:o.notes,detail:d}}if(typeof o.coverage=="string"){let s=e.coverageBlob(o.coverage);if(s===null)continue;let a=Wn(s);if(a===void 0)return{code:"COVERAGE_INVALID",sourceId:n,blob:o.coverage,detail:"that blob is not the stored form of a coverage plan (it is not JSON)"};let c=(i?.units??[]).map(l=>l.id),d=Lt(a,c);if(d!==null)return{code:"COVERAGE_INVALID",sourceId:n,blob:o.coverage,detail:`that blob is not the stored form of a coverage plan of this version (${/^(expected|group \d|the unit|two groups)/.test(d)?d:`it ${d}`})`};if(ce(a)!==Buffer.from(s).toString("utf8"))return{code:"COVERAGE_INVALID",sourceId:n,blob:o.coverage,detail:"that blob is not the stored form of a coverage plan (its bytes are not the canonical form of what it holds)"};if(a.plugin!==o.id)return{code:"COVERAGE_INVALID",sourceId:n,blob:o.coverage,detail:`that coverage plan was written by plugin ${JSON.stringify(a.plugin)}, not by ${JSON.stringify(o.id)} as the record says`}}}return null}function Wn(t){try{return JSON.parse(Buffer.from(t).toString("utf8"))}catch{return}}function Hn(t){try{let e=qe(JSON.parse(Buffer.from(t).toString("utf8")));return e===null?" (its bytes are not the canonical form of what it holds)":e.startsWith("note ")?` (${e})`:` (it ${e})`}catch{return" (it is not JSON)"}}var Kn=2e3;async function rs(t,e,n,r,o){let i=F(t).entries[n]?.witness??null,s=await zt(t,e,i),a=s.local?.seq??0,c={imported:0,from:a,to:a,blobs:0,proposals:0};switch(s.kind){case"empty-storage":return r(`nothing to pull: ${n} is empty`),c;case"up-to-date":return r("up to date"),c;case"ahead":return o?.quietAhead||r(`nothing to pull; you are ahead of ${n} \u2014 run kane-cli context push ${n}`),c;case"diverged":throw new m("SYNC_DIVERGED",`you and ${n} both added work after position ${s.at-1}; nothing was pulled`,`run kane-cli context pull ${n} --rebase to save your local work, take the team version from ${n}, and then reapply yours`);case"foreign-lineage":throw new m("SYNC_FOREIGN_LINEAGE",`${n} holds a different history (its first record is not this store's)`,`to work on it, clone it: kane-cli context clone <descriptor of ${n}> <dir>; to share this store, add an empty location`);case"behind":case"empty-local":break}let d=s.storage.seq,l=await Be(t,e,s.local,s.storage,Xn(t,s.local),r);return Ue(t,l,s.local?.hash??null,n),X(t),Je(t,n,{seq:d,hash:l.records[l.records.length-1].hash}),{imported:l.records.length,from:a,to:d,blobs:l.blobs.size,proposals:l.proposals.size}}function Je(t,e,n,r){let o=r?.lockHeld?()=>{}:W(t,{deadlineMs:Kn});try{let i=F(t),s=i.entries[e]?.witness??null;if(r?.forwardOnly&&s&&s.seq>n.seq)return;try{Ht(i,e,n)}catch(a){throw a instanceof H?new m("SYNC_REMOTE_ROLLED_BACK",a.message,"restore the storage from a copy that holds the witnessed records, or remove and re-add the location after a human has decided it was rebuilt on purpose"):a}Mt(t,i)}finally{o()}}function Xn(t,e){let n=kt(t);return n&&n.applied.seq===(e?.seq??0)&&n.applied.hash===(e?.hash??null)?n:X(t)}async function Be(t,e,n,r,o,i=()=>{}){let s=await Qn(e,n?.seq??0,n?.hash??null,r.seq,r.hash),a=nr(s,o),c=await er(t,e,s);ir(t,s),ar(t,s,a);let d=await tr(t,e,s,i);return{records:s,blobs:c,proposals:d}}function Ue(t,e,n,r,o){for(let[a,c]of e.proposals){let[d,l]=a.split("/");Zn(en(pe(Z(t,d)),l),c)}let i=n,s=null;for(let a=0;a<e.records.length;a+=xe){let c=e.records.slice(a,a+xe),d=o?.lockHeld?()=>{}:W(t);try{$t(t,c.map(({seq:l,raw:u})=>({seq:l,raw:u})),i,{...o,lockHeld:!0})}catch(l){if(!(l instanceof bt))throw l;let u=`this store appended position ${C(t)?.seq??0} while the pull was`;throw new m("SYNC_LOCAL_MOVED",s===null?`${u} being prepared; nothing was imported`:`${u} landing; positions ${e.records[0].seq}..${s} were imported, a valid prefix, and nothing more`,`kane-cli context pull ${r}`)}finally{d()}i=c[c.length-1].hash,s=c[c.length-1].seq,o?.afterChunk?.(s)}}function Zn(t,e){Vn(pe(t),{recursive:!0});let n=`${t}.tmp-${process.pid}`,r=Gn(n,"w");try{zn(r,e),ae(r)}finally{Yn(r)}try{jn(n,t)}catch(o){if(o.code!=="EEXIST")throw Qt(n,{force:!0}),o}Qt(n,{force:!0}),w(pe(t))}async function Qn(t,e,n,r,o){let i=[],s=n;for(let a=e+1;a<=r;a++){let c=await t.get(I(a));if(c===null)throw new m("SYNC_REMOTE_HOLE",`the storage has a hole: position ${a} is missing below its tail at ${r}`,"restore the missing position from a copy that holds it; nothing was changed");let{record:d,hash:l}=Fe(a,c);if(d.prev_hash!==s)throw new m("SYNC_REMOTE_CHAIN_BROKEN",`position ${a} on the storage is sealed onto ${String(d.prev_hash)}, but position ${a-1} hashes ${String(s)}`,"the storage chain needs a human look; nothing was changed");if(a===r&&l!==o)throw new m("SYNC_REMOTE_CHAIN_BROKEN",`the tail at position ${r} changed while this pull ran: it hashed ${o}, now ${l}`,"run kane-cli context pull again");i.push({seq:a,hash:l,raw:Buffer.from(c).toString("utf8"),record:d}),s=l}return i}async function er(t,e,n){let r=new Set;for(let{seq:o,record:i}of n)for(let s of Q(i).blobs){if(r.has(s))continue;let a=de(t,s);if(a!==null&&Ne(a)===s)continue;let c=await e.get(Ct(s));if(c===null)throw new m("SYNC_REMOTE_HOLE",`the storage has a hole: position ${o} names blob ${s}, which the storage does not hold`,"restore the blob from a copy that holds it; nothing was changed");let d=Buffer.from(c);if(Ne(d)!==s)throw new m("SYNC_OBJECT_CORRUPT",`the blob ${s} on the storage does not hash to its name (named by position ${o})`,"the storage object needs a human look; nothing was changed");a===null?Et(t,d):$(vt(t,s),d),r.add(s)}return r}async function tr(t,e,n,r){let o=new Map,i=new Set;for(let{seq:s,record:a}of n){let c=Q(a).proposalId;if(c===null||i.has(c))continue;i.add(c);let d=Z(t,c),l=null;if(Zt(d))try{l=Pe(Dn(d,"utf8"))}catch{l=""}let u=await e.list(Tt(c));if(u.length===0)continue;if(u.length>1){r(`proposal ${c} (position ${s}) has ${u.length} payloads on the storage and the record names none of them; skipped`);continue}if(l!==null&&Te(c,l)===u[0])continue;let p=await e.get(u[0]);if(p===null)continue;let h=null;try{h=Pe(Buffer.from(p).toString("utf8"))}catch{h=null}if(h===null||Te(c,h)!==u[0]){r(`proposal ${c} (position ${s}) on the storage does not digest to its key ${u[0]}; skipped`);continue}if(l===null){o.set(`${c}/proposal.json`,Buffer.from(p));continue}let x=`${c}/proposal.${h.slice(7,19)}.json`;Zt(en(pe(d),x.slice(c.length+1)))||(r(`proposal ${c} (position ${s}) differs from the one here; the storage's payload is installed beside it as ${x}`),o.set(x,Buffer.from(p)))}return o}function nr(t,e){let n=structuredClone(e);for(let{seq:r,hash:o,record:i}of t)try{lt(n,i,o)}catch(s){throw s instanceof ct?new m("SYNC_REMOTE_ADMISSION_RED",`position ${r} would not pass this store's checks: ${s.message}`,`nothing was imported; ask whoever pushed position ${r} to run kane-cli context fsck on their store, or upgrade kane-cli if theirs is newer`):s}return n}var fe=t=>t.slice(0,19),rr=t=>t===null?"no units":`units [${t.join(", ")}]`,or=t=>t===null?"no units":`[${t.join(", ")}]`,sr=(t,e)=>`the record at position ${t} says citation ${fe(e.ecid)} is in ${rr(e.said)}; its lines ${e.anchor} of ${e.sourceId} fall in ${or(e.found)} \u2014 nothing was applied`;function ir(t,e){let n=Kt(r=>de(t,r));for(let{seq:r,record:o}of e){let i=Xt(o.media,n);if(i===null)continue;let s=i.code==="UNIT_INDEX_INVALID"?"unit index":i.code==="NOTES_INVALID"?"notes":"coverage plan";throw new m(i.code==="UNIT_INDEX_INVALID"?"SYNC_UNIT_INDEX_INVALID":i.code==="NOTES_INVALID"?"SYNC_NOTES_INVALID":"SYNC_COVERAGE_INVALID",`the record at position ${r} names blob ${fe(i.blob)} as the ${s} of ${i.sourceId}, and ${i.detail} \u2014 nothing was applied`,`this build cannot take that record. It was written by a kane-cli with a fault or was altered; tell whoever pushed position ${r}, and keep working from your own store`)}}function ar(t,e,n){let r={mediaOf:o=>Object.hasOwn(n.media,o)?n.media[o]:void 0,getBlob:o=>de(t,o)};for(let{seq:o,record:i}of e){let s=at(i.edges,r);if(s!==null)throw s.code==="UNIT_INDEX_MISSING"?new m("SYNC_UNIT_INDEX_MISSING",`the record at position ${o} cites ${s.anchor} of ${s.sourceId} at version ${fe(s.versionCid)}, and that version's unit index (blob ${fe(s.index??"")}) is not in this store's blob store, so the citation's units cannot be checked \u2014 nothing was applied`,"restore this store's blobs from a copy, or clone the location into a new folder (a clone fetches every blob); kane-cli context fsck names what is missing"):new m("SYNC_UNITS_MISMATCH",sr(o,s),`this build cannot take that record. It was written by a kane-cli with a fault or was altered; tell whoever pushed position ${o}, and keep working from your own store`)}}var hr=["pending-facts.ndjson","signals.ndjson","store.json"],mr=/^\d{6}-[0-9a-f]{12}\.json$/,tn=["staged","fenced","backed-up","trimmed","importing","imported","unfenced"],cn=2e3,gr=1440*60*1e3,br=(t,e)=>f(t,"sync","backups",`${e}-reset`),wr=()=>new Date().toISOString().replace(/[:.]/g,"-"),yr=t=>f(t,"sync","incoming"),v=t=>f(t,"sync","replay"),We=t=>an(t),ln=(t,e)=>f(v(t),`${We(e)}.receipt.json`),N=t=>f(t,"sync","journal.json"),O=t=>f(t,"commits"),ne=t=>f(O(t),ke),V=(t,e)=>f(yr(t),e),He=(t,e)=>`${String(t).padStart(6,"0")}-${e.slice(7,19)}.json`,Y=t=>"sha256:"+le(t),dn=()=>({pid:process.pid,nonce:sn(4).toString("hex")});async function vs(t,e,n,r,o,i={}){if(r.kind!=="diverged"||r.at===void 0)throw new Error(`reset needs a diverged relation, got ${r.kind}`);let s=r.at;if(b(N(t)))throw new m("SYNC_STORE_BUSY","a reset is already in progress","run kane-cli context sync doctor");rn(t),$r(t,n),Sr(t);let{records:a,hashes:c}=yt(t),d={seq:s-1,hash:c[s-2]},l=Oe();_e(t,l,a.slice(0,s-1),c.slice(0,s-1),{writeNodeFiles:!1});let u=await Be(t,e,d,r.storage,l),p=a.slice(s-1).map(U=>He(U.seq,c[U.seq-1])),h=Ar(t,a,c,s),x=fn(t,p,h);kr(t,Rr(u)+x.reduce((U,_n)=>U+on(_n.src).size,0));let Qe=i.ts??wr(),oe={nonce:sn(8).toString("hex"),state:"staged",name:n,holder:dn(),base:d,at:s,storage:r.storage,backup:br(t,Qe),ts:Qe,moved:p,testIds:h,counts:{records:u.records.length,blobs:u.blobs.size,proposals:u.proposals.size},manifest:[]};Er(t,oe.nonce,u);let On=W(t,{deadlineMs:cn});try{if(C(t)?.hash!==r.local?.hash)throw new m("SYNC_STORE_BUSY","the chain moved while the reset was being prepared",`run kane-cli context pull ${n} --rebase again`);return rn(t),Ye(t,oe,i.afterTransition),un(t,oe,o,i)}catch(U){throw b(N(t))||me(V(t,oe.nonce)),U}finally{On()}}async function Es(t,e,n=()=>{}){let r={state:"none",detail:"no reset in progress"},o=nn(t);if(o===null)return r;let i=W(t,{deadlineMs:cn});try{let s=nn(t);if(s===null||s.nonce!==o.nonce)return r;if(s.holder.pid!==process.pid&&K(s.holder.pid))throw new m("SYNC_STORE_BUSY",`a reset is running as pid ${s.holder.pid} \u2014 wait`,"wait for it to finish, then run the command again");if(s.holder=dn(),Ye(t,s),e==="resume"){let l=un(t,s,n,{});return{state:"resumed",detail:`finished the reset interrupted at '${s.state}': ${l.moved.length} records moved to ${l.backup}`,result:l}}if(B(s,"imported"))return{state:"refused",detail:`the shared records are already imported, so the reset can only finish (kane-cli context sync or kane-cli context pull finishes it); its receipt will be ${ln(t,s.backup)}`};let a=Nr(t,s),c=0;for(let{name:l,hash:u}of s.manifest){if(!l.startsWith("commits/")&&!l.startsWith("intents/"))continue;let p=f(t,l);try{if(b(p)){if(Y(y(p))!==u)throw new Error("the live file does not match the backup manifest");continue}let h=y(f(s.backup,l));if(Y(h)!==u)throw new Error("the backup copy does not match the manifest");T(R(p),{recursive:!0}),$(p,h),l.startsWith("commits/")&&c++}catch(h){throw new Error(`restore stopped at ${l}: ${h instanceof Error?h.message:String(h)}; re-run abort`)}}pn(t,s.nonce),_(Ie(t),{recursive:!0,force:!0});let d=`${s.backup}.aborted`;return b(s.backup)&&ge(s.backup,d),w(R(s.backup)),_(N(t),{force:!0}),w(R(N(t))),me(d),me(V(t,s.nonce)),{state:"aborted",detail:`aborted the reset at '${s.state}': ${a} imported records removed, ${c} records put back, the chain is as it was`}}finally{i()}}function nn(t){return b(N(t))?JSON.parse(y(N(t),"utf8")):null}var B=(t,e)=>tn.indexOf(t.state)>=tn.indexOf(e);function un(t,e,n,r){let o=l=>{e.state=l,Ye(t,e,r.afterTransition)},i=()=>{if(!je(t,e.nonce))throw new Error("sentinel missing \u2014 run kane-cli context sync doctor")};B(e,"fenced")||(vr(t,e.nonce),o("fenced")),B(e,"backed-up")||(i(),e.manifest=Ir(t,e),o("backed-up")),B(e,"trimmed")||(i(),Or(t,e),o("trimmed")),B(e,"importing")||(i(),o("importing")),B(e,"imported")||(i(),_(Ie(t),{recursive:!0,force:!0}),_r(t,e,xr(t,e.nonce),r.afterChunk),o("imported")),B(e,"unfenced")||(pn(t,e.nonce),o("unfenced"));let s=X(t),a=Cr(t,e),c=It(t,gr),d=Tr(t,f(v(t),We(e.backup)),new Set(Object.keys(s.nodeLabel)));T(v(t),{recursive:!0}),$(ln(t,e.backup),JSON.stringify({from:e.at,moved:e.moved,storageTail:e.storage,quarantinedTests:a,droppedPendingFacts:d,liveSideQueues:c},null,2)+`
|
|
4
4
|
`),w(v(t)),_(N(t),{force:!0}),w(R(N(t))),me(V(t,e.nonce)),Je(t,e.name,e.storage,{lockHeld:!0}),n(`saved ${e.moved.length} local record${e.moved.length===1?"":"s"} from position ${e.at} in ${e.backup}; ${e.name}'s records took their place`);for(let l of a)n(`quarantined test file ${l}: its test was minted by a moved record`);return{name:e.name,backup:e.backup,moved:e.moved,quarantinedTests:a,pulled:{imported:e.counts.records,from:e.base.seq,to:e.storage.seq,blobs:e.counts.blobs,proposals:e.counts.proposals}}}function rn(t){let e=new Date,n=f(t,"sessions");if(b(n))for(let r of j(n)){let o=f(n,r,".lock");if(!b(o))continue;let i;try{i=JSON.parse(y(o,"utf8"))}catch{continue}let s=e.getTime()-new Date(i.ts??0).getTime();if(typeof i.pid=="number"&&K(i.pid)&&s<rt)throw new m("SYNC_STORE_BUSY",`session ${r} is live (pid ${i.pid})`,"finish or pause that session, then run the reset again")}for(let{key:r,grant:o}of pt(t))if(!ut(o,e))throw new m("SYNC_STORE_BUSY",`lock ${r} is held by ${o.verb} (pid ${o.pid})`,"wait for that command to finish, then run the reset again")}function Sr(t){let e=gn(t);if(!e)return;let n=e.listHolds().length;throw new m("SYNC_REBASE_PENDING",`your last rebase still has ${n} unresolved decision${n===1?"":"s"}; no new rebase was started`,"run kane-cli context sync or kane-cli context pull again to continue. To discard the unresolved local changes instead, run kane-cli context sync doctor --abort")}function $r(t,e){let n=F(t).entries[e]?.binding,r=ot(t),o=ur(t),i=on(t),s=r!==null&&n?.instance_id===r.context_instance_id&&n.realpath===o;if(!(s&&n.dev===i.dev&&n.ino===i.ino))throw new m("SYNC_COPIED_STORE_UNRESOLVED",r===null?"this store has no store.json ids, so it cannot prove it is the one the location was added from":s?`this store's directory is not the one ${e} was bound from: same ids and path, but the .context inode changed \u2014 it was replaced in place by a copy`:`this store is not the one ${e} was added from (${n?`bound to ${n.realpath}`:"no binding"}; this is ${o})`,`re-run kane-cli context sync add ${e} <descriptor> from this directory to bind it`)}function kr(t,e){let n=pr(t),r=n.bavail*n.bsize;if(!(r>=2*e))throw new m("SYNC_DISK_LOW",`${r} bytes free, the reset needs ${2*e} (twice the staged suffix plus the backup)`,"free some disk space, then run the reset again")}function Rr(t){let e=0;for(let n of t.records)e+=Buffer.byteLength(n.raw);for(let n of t.proposals.values())e+=n.length;return e}function Ye(t,e,n){T(R(N(t)),{recursive:!0}),$(N(t),JSON.stringify(e,null,2)+`
|
|
5
5
|
`),n?.(e.state)}function vr(t,e){let n=ne(t);try{let r=lr(n,"wx");try{fr(r,wt(e)),ae(r)}finally{cr(r)}w(O(t))}catch(r){if(r.code!=="EEXIST")throw r;if(!je(t,e))throw new Error(`${n} belongs to another reset \u2014 run kane-cli context sync doctor`)}}function pn(t,e){if(b(ne(t))){if(!je(t,e))throw new Error(`${ne(t)} belongs to another reset \u2014 left in place`);_(ne(t)),w(O(t))}}function je(t,e){try{return JSON.parse(y(ne(t),"utf8")).kane?.nonce===e}catch{return!1}}function Er(t,e,n){let r=V(t,e);for(let o of["records","proposals"])T(f(r,o),{recursive:!0});for(let o of n.records)$(f(r,"records",`${o.seq}.json`),o.raw);for(let[o,i]of n.proposals)T(R(f(r,"proposals",o)),{recursive:!0}),$(f(r,"proposals",o),i)}function xr(t,e){let n=V(t,e),r=j(f(n,"records")).map(i=>Number(i.slice(0,-5))).sort((i,s)=>i-s).map(i=>{let s=y(f(n,"records",`${i}.json`),"utf8"),a=JSON.parse(s);return{seq:i,raw:s,record:a,hash:L(a)}}),o=new Map;for(let i of Ve(f(n,"proposals")))o.set(Me(f(n,"proposals"),i),y(i));return{records:r,blobs:new Set,proposals:o}}function me(t){_(t,{recursive:!0,force:!0});try{dr(R(t))}catch{}}function fn(t,e,n){let r=[],o=a=>{r.push({name:a,src:f(t,a)})},i=[];for(let a of e){o(`commits/${a}`);let c=JSON.parse(y(f(O(t),a),"utf8"));i.push(c);let d=dt(t,L(c));b(d)&&o(Me(t,d))}let s=f(t,"sessions");if(b(s))for(let a of Ve(s))o(Me(t,a));for(let a of hr)b(f(t,a))&&o(a);for(let a of j(t))xt.test(a)&&o(a);for(let a of i){let c=Q(a).proposalId;c!==null&&b(Z(t,c))&&o(`proposals/${c}/proposal.json`)}for(let a of mn(t,n))r.push({name:`tests/${an(a)}`,src:a});return r}function Ve(t){let e=[];for(let n of j(t,{withFileTypes:!0})){let r=f(t,n.name);n.isDirectory()?e.push(...Ve(r)):n.isFile()&&e.push(r)}return e}function Ir(t,e){let n=f(e.backup,"manifest.json");if(b(n))return JSON.parse(y(n,"utf8"));let r=[];T(e.backup,{recursive:!0}),w(R(e.backup)),w(R(R(e.backup)));let o=(i,s)=>{let a=f(e.backup,i);T(R(a),{recursive:!0}),$(a,s),r.push({name:i,hash:Y(s)})};for(let{name:i,src:s}of fn(t,e.moved,e.testIds??[]))o(i,y(s));return o("base-witness.json",Buffer.from(JSON.stringify({name:e.name,base:e.base,storage:e.storage,from:e.at},null,2)+`
|
|
@@ -18,4 +18,4 @@ import{a as P}from"./chunk-TW63WWEN.js";import{b as Le}from"./chunk-A6TJOZ24.js"
|
|
|
18
18
|
`),_(o),i.length}var qr=/^sha256:[0-9a-f]{64}$/,Ge=class t{m=new Map;get size(){return this.m.size}set(e,n){this.m.set(e,n)}get(e){return this.m.get(e)}rewrite(e){if(typeof e=="string")return qr.test(e)?this.m.get(e)??e:e;if(Array.isArray(e))return e.map(n=>this.rewrite(n));if(e!==null&&typeof e=="object"){let n={};for(let[r,o]of Object.entries(e))n[r]=this.rewrite(o);return n}return e}toJSON(){return Object.fromEntries(this.m)}static fromJSON(e){let n=new t;for(let[r,o]of Object.entries(e??{}))n.set(r,o);return n}},De=class t{m=new Map;set(e,n){this.m.set(e.hash,{orig:e,fate:n})}get(e){let n=this.m.get(e.hash);return n&&n.orig.seq===e.seq?n.fate:void 0}byHash(e){return this.m.get(e)?.fate}toJSON(){return[...this.m.values()]}static fromJSON(e){let n=new t;for(let r of e??[])n.set(r.orig,r.fate);return n}},bn=t=>({cid:t.cid.toJSON(),record:t.record.toJSON()}),wn=t=>({cid:Ge.fromJSON(t?.cid),record:De.fromJSON(t?.record)});var Ps=["keep-theirs","apply-mine","apply-mine-as-new"];function Ke(t,e,n){switch(e){case"keep-theirs":return t==="generation"?"the local design stays in the backup; after this rebase, run design again if you want both":"the local change stays in the backup";case"apply-mine":return t==="slug"?`the name moves to the local node; the node that holds it on ${n} is reached by its id again`:t==="head"?`retire the source as it is now, ${n}'s version included`:`the local version lands on top of ${n}'s`;case"apply-mine-as-new":return`a new node beside ${n}'s (duplicate check first)`;case"later":return"leaves the rebase open; kane-cli context sync or kane-cli context pull asks again"}}function Fs(t,e,n){return{rebase_id:t,decision_id:e.holdId,kind:e.kind,intent:e.verb,seq:e.orig.seq,label:e.label,location:n,mine:e.mine,theirs:e.theirs,answers:e.answers.map(r=>({answer:r,consequence:Ke(e.kind,r,n)}))}}function Js(t){return{from:(n,r)=>{let o=n===0?null:t.tokenAt(n);if(n>0&&o===null)throw new S(`the record log holds no record at position ${n} \u2014 run kane-cli context rebuild`);let i=t.recordsSince(o);if(i.length>0&&o!==null&&t.resolveToken(o)?.hash!==r)throw new S(`broken chain after position ${n}: it no longer continues ${String(r)}`);return{records:i,hashes:i.map(L)}},hashAt:n=>{let r=t.tokenAt(n);return r===null?null:t.resolveToken(r)?.hash??null}}}var Bs=t=>t.dirOrThrow(),be=(t,e)=>ze(v(t),`${e}.json`),Ur=(t,e)=>ze(v(t),`${e}.lock`),G=class t{constructor(e,n){this.contextDir=e;this.data=n;this.maps=wn(n.maps)}maps;static create(e,n,r,o,i){let s=Br(n);if(re(be(e,s)))throw new S(`rebase ${s} already has a ledger \u2014 run kane-cli context sync or kane-cli context pull to continue it, or kane-cli context sync doctor --abort to close it`);let a=new t(e,{version:1,backup:n,backupId:s,from:o,state:"open",...i?{location:i}:{},items:r.map(d=>({...d})),maps:{cid:{},record:[]},aliases:[]}),c=!re(v(e));return Sn(v(e),{recursive:!0}),c&&w(ze(e,"sync")),a.save(),a}static open(e,n){let r=be(e,n);if(!re(r))throw new S(`no rebase ${n} here \u2014 kane-cli context sync doctor lists the rebases this store has`);let o;try{o=JSON.parse(we(r,"utf8"))}catch{o=null}if(!ht(o)||typeof o.backup!="string")throw new S(Hr(n));return new t(e,o)}get backupId(){return this.data.backupId}get location(){return this.data.location??"the location"}get rev(){return this.data.rev??0}get backup(){return this.data.backup}get from(){return this.data.from}get state(){return this.data.state}get closedBy(){return this.data.closedBy}get items(){return this.data.items}get aliases(){return this.data.aliases}item(e){let n=this.data.items.find(r=>r.k===e);if(!n)throw new Error(`no replay item ${e}`);return n}itemAt(e){return this.data.items.find(n=>n.orig.seq===e||n.group?.some(r=>r.seq===e))}beginItem(e,n){this.assertOpen();let r=this.item(e);r.begin={expectPrev:n},delete r.outcome,this.save()}endItem(e,n){this.assertOpen(),this.item(e).outcome=n,this.save()}pendingItem(){return this.data.items.find(e=>e.begin!==void 0&&e.outcome===void 0)}reconcileAll(e,n){let r=this.item(e);if(!r.begin)return[];let o=r.origins??Object.fromEntries((r.group??[r.orig]).map(c=>[c.hash,c.seq])),{records:i,hashes:s}=n.from(r.begin.expectPrev.seq,r.begin.expectPrev.hash),a=[];return i.forEach((c,d)=>{let l=c.replayed_from===void 0?void 0:o[c.replayed_from.orig.hash];l!==void 0&&a.push({seq:c.seq,hash:s[d],member:l})}),a}reconcileFrom(e,n,r){let o=this.item(e),i=o.origins??Object.fromEntries((o.group??[o.orig]).map(d=>[d.hash,d.seq])),{records:s,hashes:a}=n.from(r.seq,r.hash),c=[];return s.forEach((d,l)=>{let u=d.replayed_from===void 0?void 0:i[d.replayed_from.orig.hash];u!==void 0&&c.push({seq:d.seq,hash:a[l],member:u})}),c}reconcile(e,n){let r=this.reconcileAll(e,n).at(-1);return r?{seq:r.seq,hash:r.hash}:void 0}lastAppliedInChain(e){for(let n of[...this.data.items].reverse()){let r=n.outcome;if(r&&"applied"in r)return e.hashAt(r.applied.newSeq)===r.applied.newHash;if(r&&"deduped"in r&&r.deduped.newSeq!==void 0)return e.hashAt(r.deduped.newSeq)===r.deduped.newHash}return!0}setMaps(e){this.maps=e,this.data.maps=bn(e),this.save()}addAlias(e){this.data.aliases.push(e),this.save()}listHolds(){return this.data.items.flatMap(e=>e.outcome&&"held"in e.outcome?[e.outcome.held]:[])}resolveHold(e,n){let r=this.heldItem(e);if(!r.outcome.held.answers.includes(n))throw new S(`${n} is not an answer ${e} accepts`);return r.answer=n,this.reopen(r)}reopenHold(e){let n=this.heldItem(e);return delete n.answer,this.reopen(n)}heldItem(e){this.assertOpen();let n=this.data.items.find(r=>r.outcome&&"held"in r.outcome&&r.outcome.held.holdId===e);if(!n)throw new S(`${e} is not an open decision \u2014 kane-cli context sync status lists them`);return n}reopen(e){return delete e.outcome,delete e.begin,this.save(),e}close(e){this.data.state="closed",this.data.closedBy=e,this.save()}toJSON(){return structuredClone(this.data)}assertOpen(){if(this.data.state!=="open")throw new S(`rebase ${this.data.backupId} is closed \u2014 kane-cli context sync doctor lists every rebase and what it reapplied`)}save(){let e=be(this.contextDir,this.data.backupId);if(re(e)){let n=0;try{n=JSON.parse(we(e,"utf8")).rev??0}catch{n=0}if(n>(this.data.rev??0))throw new S(`the replay ledger for ${this.data.backupId} changed on disk (rev ${n}, this process holds rev ${this.data.rev??0}) \u2014 another process is working on it; run the command again`)}this.data.rev=(this.data.rev??0)+1,$(e,JSON.stringify(this.data,null,2)+`
|
|
19
19
|
`)}};function Mr(t,e){let n=Ur(t,e);Sn(v(t),{recursive:!0});let r=Jr(6).toString("hex");for(;;)try{return Pr(n,JSON.stringify({pid:process.pid,nonce:r}),{flag:"wx"}),()=>{try{JSON.parse(we(n,"utf8")).nonce===r&&yn(n)}catch{}}}catch(o){if(o.code!=="EEXIST")throw o;let i={};try{i=JSON.parse(we(n,"utf8"))}catch{i={}}if(typeof i.pid=="number"&&K(i.pid))throw new S(`rebase ${e} is being worked on by pid ${i.pid} \u2014 wait for it to finish`);yn(n,{force:!0})}}var Us=(t,e,n,r,o)=>G.create(t,e,n,r,o),Wr=(t,e)=>G.open(t,e),Hr=t=>`rebase ${t} has a ledger this store cannot read (sync/replay/${t}.json) \u2014 ${ft}`,$n=t=>{let e=v(t);return re(e)?Lr(e).filter(n=>n.endsWith(".json")&&!n.endsWith(".receipt.json")).sort().reverse().map(n=>n.slice(0,-5)):[]};function Yr(t,e={}){let n=[];for(let r of $n(t))try{n.push(G.open(t,r))}catch(o){if(!e.tolerant)throw o}return n}function Ms(t){return $n(t).filter(e=>{try{return G.open(t,e),!1}catch{return!0}})}function Ws(t,e){let n=be(t,e),r=`${n}.unreadable`;return Fr(n,r),w(v(t)),r}function gn(t){return Yr(t).find(e=>e.state==="open")}function jr(t){let e=t.outcome;return e?"applied"in e?`reapplied \u2192 record ${e.applied.newSeq}`:"held"in e?`decision ${e.held.holdId} (${e.held.kind})`:"deduped"in e?`already present: ${e.deduped.as.slice(0,19)}`:`not reapplied: ${e.skipped.reason}`:t.begin?"pending":"waiting"}function Hs(t,e,n={}){let r=t.itemAt(e);if(!r)throw new S(`no moved record at position ${e} in rebase ${t.backupId}`);let o=r.label.startsWith(`${r.verb} `)||r.label===r.verb?r.label:`${r.verb} ${r.label}`,i=[`record ${r.orig.seq}: ${o}`,`origin ${r.orig.hash}`,`outcome: ${jr(r)}`];if(r.group&&i.push(`group: records ${r.group.map(s=>s.seq).join(", ")}`),r.outcome&&"held"in r.outcome){let s=r.outcome.held,a=Math.max(5,t.location.length)+1;i.push(`${"local:".padEnd(a+1)}${s.mine}`,`${`${t.location}:`.padEnd(a+1)}${s.theirs}`,`choose: ${s.answers.join(", ")}`),n.detail!==!1&&i.push(JSON.stringify(s.detail,null,2))}return i}function Ys(t,e){let n=Mr(t,e);try{let r=Wr(t,e);return r.state==="open"&&r.close("abort"),r}finally{n()}}var g=z(ie(),1);function kn(t,e,n){let r={"keep-theirs":`keep ${n}'s version`,"apply-mine":"apply the local version","apply-mine-as-new":"add the local version as new",later:"decide later"},o=t.answers.map(i=>({key:i,answer:i,label:r[i],detail:e(i)}));return o.push({key:"later",answer:"later",label:r.later,detail:e("later")}),o}function Rn({card:t,index:e,total:n,rebaseId:r,location:o,diff:i,rows:s,sel:a,focused:c,expanded:d}){let l=Math.max(...(i??[]).map(u=>Math.max(u.was.length,u.local.length,u.origin.length)),8);return(0,g.jsxs)(M,{flexDirection:"column",children:[(0,g.jsxs)(k,{bold:!0,children:[`decision ${e} of ${n}`,(0,g.jsx)(k,{color:A.dim,children:` \xB7 ${t.kind} on your ${t.verb} from record ${t.orig.seq}`})]}),i&&i.length>0?(0,g.jsxs)(M,{flexDirection:"column",children:[(0,g.jsx)(k,{color:A.dim,children:` ${"".padEnd(12)}${"was".padEnd(l+2)}${"local".padEnd(l+2)}${o}`}),i.map(u=>(0,g.jsxs)(k,{children:[(0,g.jsx)(k,{color:A.dim,children:` ${u.field.padEnd(12)}`}),u.was.padEnd(l+2),(0,g.jsx)(k,{color:A.assuranceAccent,children:u.local.padEnd(l+2)}),u.origin]},u.field))]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(P,{label:"local",text:t.mine,accent:!0}),(0,g.jsx)(P,{label:o,text:t.theirs})]}),d?d.map((u,p)=>(0,g.jsx)(k,{color:A.dim,children:` ${u}`},`x-${p}`)):null,(0,g.jsx)(Le,{headline:`what should happen to the local ${t.verb} from record ${t.orig.seq}`,ask:!0,rows:s,sel:a,focused:c}),(0,g.jsx)(k,{color:A.dim,children:" \u2191\u2193 select \xB7 \u23CE confirm \xB7 1\u20139 jump \xB7 v full record \xB7 a decide everything later \xB7 ctrl+c pause"})]})}function vn({name:t,count:e,from:n,backupPath:r,taking:o,sel:i,focused:s}){let a=[{key:"continue",label:"continue",detail:"save, take, reapply"},{key:"not-now",label:"not now",detail:"nothing changes"}];return(0,g.jsxs)(M,{flexDirection:"column",children:[(0,g.jsx)(k,{bold:!0,children:`rebase from ${t}`}),(0,g.jsx)(P,{label:"local",text:`${e} record${e===1?"":"s"} from position ${n} saved to ${r}`}),(0,g.jsx)(P,{label:t,text:`records ${o.from}..${o.to} taken into this store`}),(0,g.jsx)(P,{label:"then",text:"the local records reapplied on top; a disagreement becomes a decision you answer"}),(0,g.jsx)(P,{label:"never",text:`history on ${t} rewritten`}),(0,g.jsx)(Le,{headline:"continue",ask:!0,rows:a,sel:i,focused:s}),(0,g.jsx)(k,{color:A.dim,children:" \u2191\u2193 select \xB7 \u23CE confirm \xB7 esc not now"})]})}var E=z(ie(),1);function Vr(t){let e=t.detail,n=c=>c&&typeof c=="object"&&!Array.isArray(c)?c:null,r=n(e.was),o=n(e.mine),i=n(e.theirs);if(!r||!o||!i)return[];let s=c=>c==null?"":typeof c=="string"?c:JSON.stringify(c);return[...new Set([...Object.keys(r),...Object.keys(o),...Object.keys(i)])].filter(c=>s(o[c])!==s(r[c])||s(i[c])!==s(r[c])).map(c=>({field:c,was:s(r[c]),local:s(o[c]),origin:s(i[c])}))}function oi(t,e,n,r){let o={"keep-theirs":`kept ${n}'s version`,"apply-mine":"applied the local version","apply-mine-as-new":"added the local version as new",later:"decided later","later-all":"decided later"},i=r&&"deduped"in r?`already present on ${n}`:r&&"skipped"in r&&e!=="keep-theirs"?`not reapplied (${r.skipped.reason})`:o[e];return`decision ${t.holdId}: ${i}`}var Xe=class{screen={kind:"idle"};version=0;interrupted=!1;scrollback={current:null};listeners=new Set;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));set(e){this.screen=e,this.emit()}note(e){this.scrollback.current?.append((0,E.jsx)(k,{children:e}))}flush(){return this.scrollback.current?.flush()??Promise.resolve()}emit(){this.version+=1;for(let e of this.listeners)e()}};function Gr(t){return(0,D.useSyncExternalStore)(t.subscribe,()=>t.version),t.screen}function Dr({ask:t,rows:e,done:n}){let[r,o]=(0,D.useState)(0),[i,s]=(0,D.useState)(!1);se((c,d)=>{if(d.ctrl&&c==="c")return n("later-all");if(d.escape)return n("later");if(c==="a")return n("later-all");if(c==="v")return s(u=>!u);if(d.upArrow)return o(u=>Math.max(0,u-1));if(d.downArrow)return o(u=>Math.min(e.length-1,u+1));if(d.return)return n(e[r].answer);let l=Number(c);Number.isInteger(l)&&l>=1&&l<=e.length&&o(l-1)});let a=Vr(t.card);return(0,E.jsx)(Rn,{card:t.card,index:t.index,total:t.total,rebaseId:t.rebaseId,location:t.location,diff:a,rows:e,sel:r,focused:!0,expanded:i?t.record:void 0})}function zr({ask:t,done:e}){let[n,r]=(0,D.useState)(0);return se((o,i)=>{if(i.ctrl&&o==="c"||i.escape)return e(!1);if(i.upArrow)return r(0);if(i.downArrow)return r(1);if(o==="1")return r(0);if(o==="2")return r(1);if(i.return)return e(n===0)}),(0,E.jsx)(vn,{...t,sel:n,focused:!0})}function Kr({store:t}){return se((e,n)=>{n.ctrl&&e==="c"&&(t.interrupted=!0)}),null}function Xr({store:t}){let e=Gr(t);return e.kind==="decide"?(0,E.jsx)(Dr,{ask:e.ask,rows:e.rows,done:e.done},e.ask.card.holdId):e.kind==="confirm"?(0,E.jsx)(zr,{ask:e.ask,done:e.done}):(0,E.jsx)(Kr,{store:t})}function Zr({store:t}){return(0,E.jsxs)(et,{children:[(0,E.jsx)(_t,{into:t.scrollback}),(0,E.jsx)(M,{flexDirection:"column",children:(0,E.jsx)(Xr,{store:t})})]})}function Qr(t,e){return kn(t,n=>Ke(t.kind,n,e),e)}function En(){let t=new Xe,e=null,n=async()=>{if(e)return;let{render:o}=await import("./build-5ZN47FAT.js");e=o((0,E.jsx)(Zr,{store:t}),{exitOnCtrlC:!1}),tt(()=>e?.unmount())},r=async()=>{if(!e)return;let o=e;e=null,await t.flush();let i=o.waitUntilExit().catch(()=>{});o.unmount(),await i,nt()};return{async confirm(o){await n();let i=await new Promise(s=>t.set({kind:"confirm",ask:o,done:s}));return t.set({kind:"idle"}),await r(),i},async decide(o){await n();let i=await new Promise(s=>t.set({kind:"decide",ask:o,rows:Qr(o.card,o.location),done:s}));return t.set({kind:"idle"}),i},note(o){t.note(o)},close:r,interrupted:()=>t.interrupted}}import{resolve as eo}from"path";import{fileURLToPath as to,pathToFileURL as no}from"url";var ro="us-east-1",oo=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,$e="use file:///abs/path, an absolute or relative directory path, s3://<bucket>/<prefix>?endpoint=<url>®ion=<region>, or a GitHub HTTPS/SSH repository URL";function In(t,e){let n=t.trim();if(n==="")throw new Error(`a location is required \u2014 ${$e}`);if(/^(?:git\+)?https:\/\//i.test(n)||/^(?:git\+)?ssh:\/\//i.test(n)||/^[^/\s@:]+@[^/\s:]+:/.test(n)||n.startsWith("git+scp://"))return ao(n);if(!oo.test(n))return xn(eo(e,n));let r=new URL(n);switch(r.protocol){case"fake:":if(r.hostname==="")throw new Error(`fake:// needs a name \u2014 ${$e}`);return{kind:"fake",location:`fake://${r.hostname}`};case"file:":return xn(to(r));case"s3:":return so(r);default:throw new Error(`this release does not speak "${r.protocol}" \u2014 ${$e}`)}}function xn(t){return{kind:"dir",location:no(t).href,path:t}}function so(t){let e=t.hostname;if(e==="")throw new Error(`an s3 location needs a bucket \u2014 ${$e}`);let n=t.pathname.replace(/^\/+/,"").replace(/\/+$/,""),r=n===""?"":`${n}/`,o=t.searchParams.get("region")||ro;if(!/^[A-Za-z0-9-]{1,64}$/.test(o))throw new Error("the region must be letters, digits and dashes only, like us-east-1");let i=t.searchParams.get("endpoint"),s=i===null||i===""?null:io(i),a=s===null?`?region=${o}`:`?endpoint=${s}®ion=${o}`,c={kind:"s3",location:`s3://${e}/${r}${a}`,bucket:e,prefix:r,region:o};return s!==null&&(c.endpoint=s),c}function io(t){let e="the endpoint must be an http URL like http://127.0.0.1:9000",n;try{n=new URL(t)}catch{throw new Error(e)}if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Error(e);if(n.username||n.password)throw new Error("an endpoint never carries a user name or password; pass credentials with --credential-env or --credential-file");if(n.search!==""||n.hash!==""||n.pathname!=="/")throw new Error(`the endpoint must be a host and port only, with no path or query \u2014 got ${n.origin}`);return`${n.protocol}//${n.host}`}var ye="Use a Git repository address with no dot or parent segments";function Se(t){return t.split("/").some(e=>e==="."||e==="..")}function ao(t){if(/[\x00-\x20\x7f]/.test(t))throw new Error("A Git location cannot contain whitespace or control characters");let e=t;if(e.startsWith("git+scp://")){let p=e.slice(10).replace(/[?#].*$/,"").replace(/^[^/]*/,"");if(Se(p.slice(1)))throw new Error(ye);let h=new URL(e);e=`${decodeURIComponent(h.username)}@${h.hostname}:${h.pathname.slice(1)}${h.search}${h.hash}`}else e=e.replace(/^git\+/,"");let n=e.indexOf("#"),r=n<0?"main":decodeURIComponent(e.slice(n+1)),o=n<0?e:e.slice(0,n),i=o.indexOf("?"),s=i<0?o:o.slice(0,i),a=new URLSearchParams(i<0?"":o.slice(i+1));for(let p of a.keys())if(p!=="prefix")throw new Error("https: and ssh: Git locations accept only the prefix query option; never put credentials in a location");if(a.getAll("prefix").length>1)throw new Error("Only one Git prefix may be supplied");let c=a.get("prefix")??"";if(c&&(!/^[a-zA-Z0-9_~./-]+$/.test(c)||c.split("/").some(p=>!p||p==="."||p===".."||p.toLowerCase()===".git")))throw new Error("Use a relative Git prefix with no empty, dot or parent segments");if(!/^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(r)||r.includes("..")||r.includes("//")||r.endsWith(".")||r.split("/").some(p=>!p||p.startsWith(".")||p.endsWith(".lock")))throw new Error("Use a valid Git branch name");let d=/^([^/@:]+)@([^/:]+):(.+)$/.exec(s),l;if(d){if(!/^[A-Za-z0-9._-]+$/.test(d[1])||!/^[A-Za-z0-9.-]+$/.test(d[2])||!/^[A-Za-z0-9_~./-]+$/.test(d[3]))throw new Error("Use a valid SSH repository address");if(Se(d[3]))throw new Error(ye);l=`git+scp://${d[1]}@${d[2]}/${d[3]}`}else{if(Se(s.replace(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^/]*/,"")))throw new Error(ye);let p=new URL(s);if(!["https:","ssh:"].includes(p.protocol)||!p.hostname||!p.pathname||p.pathname==="/"||p.password||p.protocol==="https:"&&p.username)throw new Error("Use a secret-free HTTPS or SSH repository URL; sign in through Git instead");if(/%(?:00|0a|0d)/i.test(p.pathname))throw new Error("Invalid repository path");if(Se(p.pathname))throw new Error(ye);s=p.href,l=`git+${p.href}`}let u=c?`?${new URLSearchParams({prefix:c})}`:"";return{kind:"git",gitUrl:s,branch:r,prefix:c,location:`${l}${u}#${encodeURIComponent(r)}`}}function ci(t){if(t.kind==="dir")return t.path;if(t.kind!=="git")return t.location;let e=t.prefix?`?${new URLSearchParams({prefix:t.prefix})}`:"",n=t.branch&&t.branch!=="main"?`#${encodeURIComponent(t.branch)}`:"";return`${t.gitUrl}${e}${n}`}function Ze(t,e){(t.err??t.out)(`error: ${e}`)}function Si(t,e){let n=Rt(t);return co(n)?n:(Ze(e,"no context store here (run `kane-cli context ingest <files>` first)"),null)}async function $i(t,e,n){return n?!0:t.isTTY?t.confirm(`${e}?`):(Ze(t,`refusing to ${e} without --yes (no TTY to confirm)`),!1)}function ki(){return{out:t=>process.stdout.write(t+`
|
|
20
20
|
`),err:t=>process.stderr.write(t+`
|
|
21
|
-
`),isTTY:Ot(),walkUI:En,confirm:async t=>{let{createInterface:e}=await import("readline/promises"),n=e({input:process.stdin,output:process.stdout});try{let r=await n.question(`${t} [y/N] `);return/^y(es)?$/i.test(r.trim())}catch(r){if(r.name==="AbortError")return!1;throw r}finally{n.close()}},ask:async t=>{let{createInterface:e}=await import("readline/promises"),n=e({input:process.stdin,output:process.stdout});try{return await n.question(t)}finally{n.close()}}}}var lo=1500;function uo(t,e){return t==="behind"?`${e} has moved past this machine \u2014 run kane-cli context pull ${e}`:`this store and ${e} have diverged \u2014 run kane-cli context pull ${e} --rebase`}async function Ri(t,e,n){let r=await po(t,n);r&&e(r.text)}async function po(t,e){if(process.env.KANE_SYNC_GUARD==="0")return null;try{let n=Ut(t);if(n.locations.length===0)return null;let r=Wt(n),o=F(t).entries[r.name]?.witness;if(!o)return null;let{openProvider:i}=await import("./open-provider-
|
|
21
|
+
`),isTTY:Ot(),walkUI:En,confirm:async t=>{let{createInterface:e}=await import("readline/promises"),n=e({input:process.stdin,output:process.stdout});try{let r=await n.question(`${t} [y/N] `);return/^y(es)?$/i.test(r.trim())}catch(r){if(r.name==="AbortError")return!1;throw r}finally{n.close()}},ask:async t=>{let{createInterface:e}=await import("readline/promises"),n=e({input:process.stdin,output:process.stdout});try{return await n.question(t)}finally{n.close()}}}}var lo=1500;function uo(t,e){return t==="behind"?`${e} has moved past this machine \u2014 run kane-cli context pull ${e}`:`this store and ${e} have diverged \u2014 run kane-cli context pull ${e} --rebase`}async function Ri(t,e,n){let r=await po(t,n);r&&e(r.text)}async function po(t,e){if(process.env.KANE_SYNC_GUARD==="0")return null;try{let n=Ut(t);if(n.locations.length===0)return null;let r=Wt(n),o=F(t).entries[r.name]?.witness;if(!o)return null;let{openProvider:i}=await import("./open-provider-U26BBVUE.js"),s=i(In(r.location,t),r.name,e),a=await Promise.race([fo(t,s,o),ho()]);return a?{text:uo(a.kind,r.name),name:r.name,localSeq:a.localSeq,storageSeq:a.storageSeq}:null}catch{return null}}function vi(t){return{type:"sync_behind",name:t.name,local_seq:t.localSeq,storage_seq:t.storageSeq,text:t.text}}async function fo(t,e,n){try{let r=C(t),o=r?.seq??0;return await e.head(I(n.seq+1))?{kind:"behind",localSeq:o,storageSeq:(await J(e,n.seq+1)).seq}:r===null||(await te(e,r.seq)).hash===r.hash?null:{kind:"diverged",localSeq:o,storageSeq:(await J(e,r.seq)).seq}}catch{return null}}function ho(){return new Promise(t=>{setTimeout(()=>t(null),lo).unref()})}function mo(t){try{return gt(t),null}catch(e){if(e instanceof mt)return{code:e.code,text:e.message,remedy:e.remedy};throw e}}function Ei(t){return{type:"sync_error",code:t.code,detail:t.text,remedy:t.remedy}}function xi(t,e){let n=mo(t);return n?(Ze(e,n.text),(e.err??e.out)(`next: ${n.remedy}`),!0):!1}export{Q as a,Pe as b,Ut as c,$o as d,F as e,Mt as f,Wt as g,ko as h,te as i,J as j,zt as k,rs as l,Je as m,br as n,wr as o,yr as p,v as q,We as r,ln as s,vs as t,Es as u,nn as v,xs as w,Ps as x,Fs as y,Js as z,Bs as A,Mr as B,Us as C,Wr as D,Yr as E,Ms as F,Ws as G,gn as H,Hs as I,Ys as J,oi as K,In as L,ci as M,Ze as N,Si as O,$i as P,ki as Q,Ri as R,po as S,vi as T,mo as U,Ei as V,xi as W};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as on,b as cn,c as an,d as he,f as dn,g as un,h as We,i as Ye,n as ln,o as pn,q as fn,r as Xe,s as gn}from"./chunk-DBMW3VUN.js";import{a as ce,f as se,g as R,h as Z,i as ae,j as de,k as rn,l as sn}from"./chunk-KU3YHPWZ.js";import{
|
|
2
|
+
import{a as on,b as cn,c as an,d as he,f as dn,g as un,h as We,i as Ye,n as ln,o as pn,q as fn,r as Xe,s as gn}from"./chunk-DBMW3VUN.js";import{a as ce,f as se,g as R,h as Z,i as ae,j as de,k as rn,l as sn}from"./chunk-KU3YHPWZ.js";import{a as Ce,b as Te}from"./chunk-7V4BQSSV.js";import{c as hn,d as mn,e as _n}from"./chunk-6NFOH4AC.js";import{a as It}from"./chunk-7DFBOVUB.js";import{m as nn}from"./chunk-4I7YN6YY.js";import{closeSync as Jn,existsSync as Wn,mkdirSync as Yn,openSync as Xn,readFileSync as le,readdirSync as zn,renameSync as Pt,rmSync as Ut,writeFileSync as Qn}from"fs";import{dirname as cs,join as te}from"path";var $r=/^L([1-9]\d*)-L([1-9]\d*)$/,Rr=/^img#(p[1-9]\d*-[1-9]\d*|i[1-9]\d*)$/;function Ae(e){if(e==="img#whole")return{kind:"img-whole"};let t=Rr.exec(e);if(t)return{kind:"img-part",ref:t[1]};let n=$r.exec(e);return n?{kind:"lines",a:parseInt(n[1],10),b:parseInt(n[2],10)}:null}function ee(e,t){return"sha256:"+Te(Buffer.from("assurance."+e+"\0"+Ce(rn(e,t)),"utf8"))}function B(e,t,n,r){return"sha256:"+Te(Buffer.from("assurance.edge\0"+Ce({type:e,src:t,dst:n,props:sn(e,r)}),"utf8"))}function Qs(e,t){return{source_id:e,blob:t}}function ze(e){return{...e,derived:!0}}var Ue=e=>e.slice(0,19),Or=(e,t,n)=>`the unit index of ${e} at version ${Ue(t)} (blob ${Ue(n)}) is not in this store's blob store, so the units of a citation into it cannot be worked out \u2014 nothing was written. Restore the store's blobs from a copy, or clone the shared location into a new folder (a clone fetches every blob; a pull does not fetch a blob of a record this store already holds). kane-cli context fsck names what is missing.`,kr=(e,t)=>`no unit was found for the citation ${t} of ${e} \u2014 this is a fault in kane, not in what you sent; nothing was written. Report it with this message.`,Nr=(e,t,n)=>`keeping ${e} would take over ${t} units of ${n}, the limit is ${he.reconfirms} \u2014 extract the item again from the current version instead of keeping it; nothing was written.`;function vn(e){let t=new Map;return n=>{let r=String(n.source_id),s=String(n.source_cid),a=e.mediaOf(s)?.plugin?.index;if(a===void 0)return{units:null};let u=t.get(a);if(u===void 0&&t.set(a,u=ln(e.getBlob(a))),u===null)return{fault:{code:"UNIT_INDEX_MISSING",detail:Or(r,s,a)}};let c=Ae(String(n.anchor)),o=c?.kind==="lines"?pn(u,Math.min(c.a,c.b),Math.max(c.a,c.b)):[];return o.length===0?{fault:{code:"UNIT_LIST_EMPTY",detail:kr(r,String(n.anchor))}}:{units:o}}}var yn=(e,t)=>Array.isArray(e)&&e.length===t.length&&e.every((n,r)=>n===t[r]),En=(e,t)=>({mediaOf:n=>t.mediaOf(n),getBlob:n=>e.getBlob(n),headOf:n=>t.heads.get(n),edgesInto:n=>t.edgesInto(n),refOf:n=>t.nameOf.get(n)??Ue(n)});function wn(e){let t=vn(e),n=We({pluginOf:s=>e.mediaOf(s)?.plugin}),r=(s,a,u)=>{let c=a.source_id,o=e.headOf(c);if(o==null||o!==a.source_cid)return{reconfirms:null};let h=n(c,o);if(h===null)return{reconfirms:null};let i=new Set,d=[...e.edgesInto(s),...u].filter(l=>l.type!==R.DERIVES||l.dst!==s||l.props.source_id!==c||i.has(l.ecid)?!1:(i.add(l.ecid),!0)),{failing:g}=dn([...d,{ecid:"",type:R.DERIVES,src:o,dst:s,props:a}],h);return g.length===0?{reconfirms:null}:g.length>he.reconfirms?{fault:{code:"RECONFIRMS_OVER_LIMIT",detail:Nr(e.refOf(s),g.length,c)}}:{reconfirms:g}};return{all(s){let a=[],u=s.map(c=>{if(c.type!==R.DERIVES)return c;let o=t(c.props);if("fault"in o)return a.push(o.fault),c;if(o.units===null){if(c.props.units===void 0)return c;let{units:h,...i}=c.props;return{...c,props:i}}return yn(c.props.units,o.units)?c:{...c,props:{...c.props,units:o.units}}});if(a.length>0)return{edges:u,faults:a};for(let c=0;c<u.length;c++){let o=u[c];if(o.type!==R.DERIVES||o.props.units===void 0||o.props.reconfirms!==void 0)continue;let h=r(o.dst,o.props,u.filter((i,d)=>d!==c));if("fault"in h)a.push(h.fault);else if(h.reconfirms!==null){let i={...o.props,reconfirms:h.reconfirms};u[c]={...o,ecid:B(o.type,o.src,o.dst,i),props:i}}}return{edges:u,faults:a}},one(s,a,u){let{units:c,reconfirms:o,...h}=a,i=a.units===void 0&&a.reconfirms===void 0,d=t(h);if("fault"in d)return d;if(d.units===null)return{props:i?a:h};let g={...h,units:d.units},l=r(s,g,u);return"fault"in l?l:{props:l.reconfirms===null?g:{...g,reconfirms:l.reconfirms}}}}}function oi(e,t){let n=vn(t);for(let r of e){if(r?.type!==R.DERIVES)continue;let s=Array.isArray(r.props.units)?r.props.units:null,a={ecid:r.ecid,sourceId:String(r.props.source_id),versionCid:String(r.props.source_cid),anchor:String(r.props.anchor),said:s},u=n(r.props);if("fault"in u)return u.fault.code==="UNIT_INDEX_MISSING"?{code:"UNIT_INDEX_MISSING",...a,found:null,index:t.mediaOf(a.versionCid)?.plugin?.index}:{code:"UNITS_MISMATCH",...a,found:[]};if(u.units===null?s!==null:!yn(s,u.units))return{code:"UNITS_MISMATCH",...a,found:u.units}}return null}var xr=new Set(["scenario","test"]);function Rt(e,t){let n=new Map(t.nodes.map(s=>[s.cid,s.label])),r=new Map;for(let[s,a]of Object.entries(t.media??{})){let u=t.source_head_moves?.[s];typeof u=="string"&&a&&r.set(u,a)}return{mediaOf:s=>r.get(s)??(Object.hasOwn(e.media,s)?e.media[s]:void 0),labelOf:s=>n.get(s)??(Object.hasOwn(e.nodeLabel,s)?e.nodeLabel[s]:void 0)}}var Ot=e=>`CITE_DEPTH_UNSUPPORTED: citation ${Ue(e.ecid)} lays ${e.sourceId} at version ${Ue(e.versionCid)} onto a ${e.label}, and the plugin that read that version does not allow citations below the use case (it was stored before its plugin declared cites-deep, or by a plugin that does not) \u2014 re-ingest the source, or cite it at the use case`;function kt(e,t){for(let n of e){if(n?.type!==R.DERIVES)continue;let r=t.labelOf(n.dst);if(r===void 0||!xr.has(r))continue;let s=t.mediaOf(n.src);if(!(s?.format!=="plugin"||s.plugin?.cites_deep===!0))return{ecid:n.ecid,sourceId:String(n.props.source_id),versionCid:n.src,label:r}}return null}var $t=class extends Error{code="CITE_DEPTH_UNSUPPORTED";constructor(t){super(t),this.name="CiteDepthRefused"}};function ci(e,t){let n=kt(t.edges,Rt(e,t));if(n!==null)throw new $t(`${Ot(n)}; nothing was written`)}import{existsSync as et,mkdirSync as Cr,readFileSync as xt,renameSync as Tr,rmSync as In,writeFileSync as Ar}from"fs";import{dirname as Lr,join as tt}from"path";var nt=e=>tt(e,"derived"),$n=e=>tt(nt(e),"index.json");function rt(e,t){let n=t.startsWith("sha256:")?t.slice(7):t;if(!/^[A-Za-z0-9_-]{2,}$/.test(n))throw new Error(`${t} is not a fingerprint: it cannot name a node file`);return tt(nt(e),"nodes",n.slice(0,2),n.slice(2)+".json")}function Pe(){return{applied:{seq:0,hash:null},heads:{},trust:{},nodeLabel:{},forward:{},extracted:[],design_of:{},design_generation:{},exec:{},superseded:{},names:{},archivedReason:{},appliedEvents:[],eventDigests:{},completeness:{},srcOwner:{},conv:{},media:{},design_phases:{},edgeRetractions:{}}}function st(e){let t=$n(e);if(!et(t))return null;try{let n=JSON.parse(xt(t,"utf8"));if(n.superseded===void 0||n.names===void 0||n.archivedReason===void 0||n.appliedEvents===void 0||n.conv===void 0||n.media===void 0||n.exec===void 0||n.completeness===void 0||n.srcOwner===void 0||n.design_phases===void 0||n.edgeRetractions===void 0||n.eventDigests===void 0)return null;let r=n.reverse;return r!==void 0&&r!==On?null:(delete n.reverse,n)}catch{return null}}function Rn(e,t){Cr(Lr(e),{recursive:!0});let n=`${e}.tmp-${process.pid}`;Ar(n,t),Tr(n,e)}function Ee(e,t,n,r,s={}){let a=s.writeNodeFiles!==!1,u=new Set(t.extracted),c=new Set(t.appliedEvents);n.forEach((o,h)=>{for(let i of o.nodes){if(a){if(e===null)throw new Error("node files need the store's directory");let d=rt(e,i.cid);et(d)||Rn(d,JSON.stringify({label:i.label,content:i.content})+`
|
|
3
3
|
`)}!(i.cid in t.trust)&&i.content.derived===!0&&(t.trust[i.cid]="derived"),t.nodeLabel[i.cid]=i.label}for(let[i,d]of Object.entries(o.source_head_moves))typeof d=="string"&&(t.srcOwner[d]=i);if(o.proposal_id!=null&&typeof o.extraction_of=="string"){u.add(o.extraction_of);let i=null;for(let d of o.edges)if(d.type===R.DERIVES&&d.props.source_cid===o.extraction_of&&typeof d.props.source_id=="string"){i=d.props.source_id;break}if(i??=t.srcOwner[o.extraction_of]??null,i!==null){let d=t.completeness[i];(!d||o.seq>=d.seq)&&(t.completeness[i]={source_cid:o.extraction_of,completeness:"complete",...o.extractor_version?{extractor_version:o.extractor_version}:{},at:o.ts,seq:o.seq})}else t.completenessSkipped=(t.completenessSkipped??0)+1}else if(o.proposal_id!=null&&Array.isArray(o.extraction_of))for(let i of o.extraction_of){u.add(i.source_cid);let d=t.completeness[i.source_id];(!d||o.seq>=d.seq)&&(t.completeness[i.source_id]={source_cid:i.source_cid,completeness:i.completeness,...i.extractor_version?{extractor_version:i.extractor_version}:{},at:i.at,seq:o.seq})}o.design_of&&((t.design_of??={})[o.design_of.uc_cid]={engine:o.design_of.engine,seq:o.seq}),o.design_generation&&((t.design_generation??={})[o.design_generation.uc_root]={gen:o.design_generation.generation,seq:o.seq});{let i=o.design_phase;i&&typeof i.uc_root=="string"&&typeof i.phase=="string"&&typeof i.generation=="number"&&((t.design_phases??={})[i.uc_root]??=[]).push({phase:i.phase,generation:i.generation,seq:o.seq,completeness:i.completeness==="partial"?"partial":"complete"})}for(let i of o.executions??[])((t.exec??={})[i.about]??=[]).push(i);for(let i of o.edges){let{quote:d,...g}=i.props,l=t.forward[i.src]??=[];l.some(p=>p.ecid===i.ecid)||l.push({...i,props:g}),o.proposal_id!=null&&i.type===R.DERIVES&&typeof i.props.source_cid=="string"&&u.add(i.props.source_cid)}for(let i of o.review)i.resolution==="approved"||i.resolution==="edited"?(t.trust[i.id]="trusted",delete t.archivedReason[i.id]):i.resolution==="rejected"?(t.trust[i.id]="archived",i.reason?t.archivedReason[i.id]=i.reason:delete t.archivedReason[i.id]):i.resolution==="reset"&&(t.trust[i.id]="derived",delete t.archivedReason[i.id]);for(let i of o.supersessions)i.kind==="node"?i.new===i.old?delete t.superseded[i.old]:t.superseded[i.old]=i.new:i.revoke?(delete t.superseded[i.ecid],delete t.edgeRetractions[i.ecid]):(t.superseded[i.ecid]=null,t.edgeRetractions[i.ecid]={at:o.ts,...i.by?{by:i.by}:{},...i.reason?{reason:i.reason}:{}});for(let i of o.names??[])t.names[i.slug]=i.cid;for(let[i,d]of Object.entries(o.source_head_moves))t.heads[i]=d;if((o.event_ids??[]).forEach((i,d)=>{c.add(i),t.eventDigests[i]=o.event_digests?.[d]??""}),o.media)for(let[i,d]of Object.entries(o.media)){let g=o.source_head_moves[i];typeof g=="string"&&(t.media[g]=d)}if(o.conv){let i=o.source_head_moves[o.conv.source_id];if(typeof i=="string"){let d=t.conv[o.conv.source_id],g=d&&d.chain.length>0?d.chain[d.chain.length-1]:null;o.conv.append_of===g?t.conv[o.conv.source_id]={turns:o.conv.turn,chain:[...d?.chain??[],i]}:t.conv[o.conv.source_id]={turns:o.conv.turn,chain:[i]}}}for(let[i,d]of Object.entries(o.source_head_moves))o.conv?.source_id!==i&&t.conv[i]!==void 0&&(t.conv[i]=typeof d=="string"?{turns:t.conv[i].turns,chain:[d]}:{turns:t.conv[i].turns,chain:[]});t.applied={seq:o.seq,hash:r[h]}}),t.extracted=[...u].sort(),t.appliedEvents=[...c].sort()}var On="source-plugin@2";function bn(e,t){let n=Object.values(t.media).some(r=>r.plugin!==void 0);Rn($n(e),JSON.stringify(n?{...t,reverse:On}:t)+`
|
|
4
4
|
`)}function Dr(e){let t=tt(e,"meta.json");if(et(t))try{let n=JSON.parse(xt(t,"utf8"));if(n.schema!==ce||n.canonicalizer!=="v1")throw new b(`schema fence: store is ${n.schema}/${n.canonicalizer}, this build is ${ce}/${"v1"} \u2014 migrate explicitly (kane-cli context rebuild after upgrading)`)}catch(n){throw n instanceof b?n:new b(`corrupt meta.json in ${e} \u2014 fix or remove it`)}}function Ct(e){Dr(e);let t=st(e),n=t!==null&&t.applied.seq>0?Ze(e,t.applied.seq):null;if(t!==null&&n!==null&&n!==t.applied.hash&&(In(nt(e),{recursive:!0,force:!0}),t=null),t===null){t=Pe();let{records:a,hashes:u}=Qe(e);return Ee(e,t,a,u),bn(e,t),t}let{records:r,hashes:s}=je(e,t.applied.seq,t.applied.hash);return r.length>0&&(Ee(e,t,r,s),bn(e,t)),t}function gi(e){return In(nt(e),{recursive:!0,force:!0}),Ct(e)}var Fr=new Set(["CHAIN_ERROR","DERIVED_MISSING","DERIVED_DRIFT","NODE_FILE_MISSING","NODE_FILE_MISMATCH","NODE_FILE_CORRUPT"]);function hi(e){return Fr.has(e.code)?e.detail:`${e.code}: ${e.detail}`}function mi(e){let t=[],n=(l,p)=>{t.push({code:l,detail:p})},r=[],s=[];try{({records:r,hashes:s}=Qe(e))}catch(l){return{ok:!1,issues:[{code:"CHAIN_ERROR",detail:l instanceof b?l.message:String(l)}],records:0}}let a=Pe();Ee(e,a,r,s,{writeNodeFiles:!1});let u=st(e),c=0,o=a;if(u!==null&&u.applied.seq<r.length){let l=u.applied.seq;u.applied.hash===(l===0?null:s[l-1])&&(c=r.length-l,o=Pe(),Ee(e,o,r.slice(0,l),s.slice(0,l),{writeNodeFiles:!1}))}if(u===null)n("DERIVED_MISSING","derived/index.json missing or corrupt (run kane-cli context rebuild)");else{let l=p=>JSON.stringify(Nt(p));for(let p of["applied","heads","trust","nodeLabel","forward","extracted","superseded","names","archivedReason","appliedEvents","eventDigests","conv","media","design_of","design_generation","design_phases","exec","completeness","srcOwner","edgeRetractions"])l(o[p])!==l(u[p])&&n("DERIVED_DRIFT",`derived drift in index.${p} (run kane-cli context rebuild)`)}let h=new Set;for(let l of Object.values(a.forward))for(let p of l)h.add(p.ecid);let i=new Set,d=new Set;for(let l of r)for(let p of l.supersessions)p.kind==="node"?(p.old in a.nodeLabel||n("SUPERSEDE_UNKNOWN_OLD",`${p.old} (record ${l.seq})`),p.new!==null&&p.new!==p.old&&!(p.new in a.nodeLabel)&&n("SUPERSEDE_UNKNOWN_NEW",`${String(p.new)} (record ${l.seq})`),p.new===p.old?i.delete(p.old):(i.has(p.old)&&n("DOUBLE_SUPERSEDE",`${p.old} re-superseded while live (record ${l.seq})`),i.add(p.old))):(h.has(p.ecid)||n("SUPERSEDE_UNKNOWN_ECID",`${p.ecid} (record ${l.seq})`),p.revoke?(d.has(p.ecid)||n("EDGE_ORPHAN_REVOKE",`${p.ecid} revoked without a standing retraction (record ${l.seq})`),d.delete(p.ecid)):(d.has(p.ecid)&&n("EDGE_DOUBLE_RETRACT",`${p.ecid} re-retracted while already retracted (record ${l.seq})`),d.add(p.ecid)));for(let l of Object.keys(a.superseded)){let p=new Set,_=l;for(;_!==null&&_ in a.superseded;){if(p.has(_)){n("SUPERSEDE_CYCLE",`chain from ${l} revisits ${_}`);break}p.add(_),_=a.superseded[_]}}for(let[l,p]of Object.entries(a.names))p in a.nodeLabel||n("NAME_UNKNOWN_TARGET",`slug ${l} \u2192 ${p} not in the graph`);for(let l of r)for(let p of l.edges){let _=a.nodeLabel[p.src]??"(unknown)",S=a.nodeLabel[p.dst]??"(unknown)";for(let E of de(p.type,_,S,p.props))n(E.code,`${p.ecid} ${E.detail}`)}let g=new Map;for(let l of Object.values(a.forward))for(let p of l){if(p.ecid in a.superseded)continue;let _=g.get(p.type)??[];_.push(p),g.set(p.type,_)}for(let[l,p]of g){let _=ae(l);if(_?.acyclic){let S=new Map;for(let N of p)S.set(N.src,[...S.get(N.src)??[],N.dst]);let E=new Map,O=N=>{E.set(N,1);for(let U of S.get(N)??[])if(E.get(U)===1||E.get(U)===void 0&&O(U))return!0;return E.set(N,2),!1};for(let N of S.keys())if(E.get(N)===void 0&&O(N)){n("EDGE_CYCLE",`live ${l} edges form a cycle reachable from ${N}`);break}}if(_?.cardinality==="one-live-per-src"||_?.cardinality==="one-live-per-src-and-dst"){let S=new Map;for(let E of p)E.dst in a.superseded||S.set(E.src,[...S.get(E.src)??[],E]);for(let[E,O]of S)O.length>1&&n("CARDINALITY_VIOLATION",`${O.length} live ${l} edges from ${E} (one-live-per-src): ecids ${O.map(N=>N.ecid).join(",")}`)}if(_?.cardinality==="one-live-per-src-and-dst"){let S=new Map;for(let E of p)E.src in a.superseded||E.dst in a.superseded||S.set(E.dst,[...S.get(E.dst)??[],E]);for(let[E,O]of S)O.length>1&&n("CARDINALITY_VIOLATION",`${O.length} live ${l} edges onto ${E} (one-live-per-dst): ecids ${O.map(N=>N.ecid).join(",")}`)}}for(let[l,p]of Object.entries(o.nodeLabel)){let _=rt(e,l);if(!et(_)){n("NODE_FILE_MISSING",`missing node file for ${l} (run kane-cli context rebuild)`);continue}try{let S=JSON.parse(xt(_,"utf8"));(S.label!==p||ee(S.label,S.content)!==l)&&n("NODE_FILE_MISMATCH",`node file content mismatch for ${l} (run kane-cli context rebuild)`);for(let E of Z(S.label,S.content))n(E.code,`${l} ${E.detail}`)}catch{n("NODE_FILE_CORRUPT",`corrupt node file for ${l} (run kane-cli context rebuild)`)}}return{ok:t.length===0,issues:t,records:r.length,...c>0?{pending:c}:{}}}function Nt(e){return Array.isArray(e)?e.map(Nt):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).sort(([t],[n])=>t<n?-1:1).map(([t,n])=>[t,Nt(n)])):e}var kn=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function Tt(e){return typeof e=="string"&&e!=="."&&e!==".."&&kn.test(e)}function vi(e){if(!Tt(e))throw new Error(`unsafe logical_id: ${JSON.stringify(e)} \u2014 must match ${String(kn)} (no path separators)`)}var Ge=class extends Error{},Mr=new Set(["UNKNOWN_LABEL","MISSING_FIELD","BAD_ENUM"]),Ur=new Set(["UNKNOWN_EDGE_TYPE","ILLEGAL_EDGE","MISSING_SALIENT"]),Pr=["nodes","edges","review","supersessions"],Ve=/^sha256:[0-9a-f]{64}$/,xn=e=>typeof e=="string"&&(e===an||cn.test(e));function jr(e,t){if(!Array.isArray(e))return"is not a list";if(e.length===0)return"is empty";let n=e.find(r=>!xn(r));return n!==void 0?`holds ${JSON.stringify(n)}, which is not a unit id`:new Set(e).size!==e.length?"names a unit twice":t&&e.some((r,s)=>s>0&&e[s-1]>=r)?"is not sorted":t&&e.length>he.reconfirms?`names ${e.length} units, the limit is ${he.reconfirms}`:null}var Nn=2048,Vr=/^[a-z][a-z0-9-]{1,31}:[^\s\0]+$/;function Gr(e){return e.length>Nn?`it is ${e.length} characters, and a reference is at most ${Nn}`:/[\s\0]/.test(e)?"it holds a space, a line break or a NUL, and a reference is one word":Vr.test(e)?null:"it is not in a scheme (<scheme>:<rest>)"}function qr(e){if(typeof e!="object"||e===null||Array.isArray(e))return"has a fetch that is not an object";let t=e,n=Object.keys(t).find(r=>r!=="ref"&&r!=="cursor");return n!==void 0?`has a fetch with ${JSON.stringify(n)}, which a fetch does not hold`:typeof t.ref!="string"||Gr(t.ref)!==null?"has a fetch whose reference is not a reference in a scheme":t.cursor!==void 0&&(typeof t.cursor!="string"||Buffer.byteLength(t.cursor,"utf8")>he.cursorBytes)?`has a fetch whose cursor is not a string of at most ${he.cursorBytes} bytes`:null}function Hr(e){if(typeof e!="object"||e===null||Array.isArray(e))return"is not an object";let t=e;if(typeof t.id!="string"||t.id==="")return"names no plugin";if(!on.test(t.id))return`names ${JSON.stringify(t.id)}, which is not a plugin id`;if(typeof t.rules!="string"||t.rules==="")return"names no fingerprint rules";if(t.index!==void 0&&(typeof t.index!="string"||!Ve.test(t.index)))return"has an index that is not a sha256 fingerprint";if(t.notes!==void 0&&(typeof t.notes!="string"||!Ve.test(t.notes)))return"has notes that are not a sha256 fingerprint";if(t.coverage!==void 0&&(typeof t.coverage!="string"||!Ve.test(t.coverage)))return"has a coverage plan that is not a sha256 fingerprint";if(t.reasons!==void 0)return"has reasons outside its changes";if(t.cites_deep!==void 0&&t.cites_deep!==!0)return"has a cites_deep that is not true";if(t.fetch!==void 0){let n=qr(t.fetch);if(n!==null)return n}if(t.changes!==void 0){let n=t.changes;if(typeof n!="object"||n===null||Array.isArray(n))return"has changes that are not an object";if(t.index===void 0)return"has changes and no index";if(typeof n.from!="string"||!Ve.test(n.from))return"has changes from something that is not a sha256 fingerprint";let r=new Map;for(let s of["changed","removed","added"]){let a=n[s];if(!Array.isArray(a))return`has changes whose ${s} is not a list`;let u=a.find(c=>!xn(c));if(u!==void 0)return`has changes whose ${s} holds ${JSON.stringify(u)}, which is not a unit id`;if(new Set(a).size!==a.length)return`has changes whose ${s} names a unit twice`;if(a.some((c,o)=>o>0&&a[o-1]>=c))return`has changes whose ${s} is not sorted`;for(let c of a){let o=r.get(c);if(o!==void 0)return`has changes that name ${JSON.stringify(c)} in both ${o} and ${s}`;r.set(c,s)}}if(n.reasons!==void 0){let s=gn(n.reasons,n.changed);if(s!==null)return s}}return null}function Br(e){let t=[];for(let n of e.nodes)t.push(["node cid",n?.cid]);for(let n of e.edges)t.push(["edge ecid",n?.ecid],["edge src",n?.src],["edge dst",n?.dst]);for(let n of e.supersessions)n?.kind==="node"?(t.push(["superseded cid",n.old]),n.new!==null&&t.push(["superseding cid",n.new])):t.push(["retracted ecid",n?.ecid]);for(let n of e.names??[])t.push(["named cid",n?.cid]);return t}function Kr(e){let t=e.media;if(typeof t=="object"&&t!==null&&!Array.isArray(t))for(let[n,r]of Object.entries(t)){let s=r?.plugin;if(s===void 0)continue;if(r.format!=="plugin")return`the fact of ${n} has a plugin fact and is not a source-plugin version (its kind is ${JSON.stringify(r.format)})`;let a=Hr(s);if(a)return`the plugin fact of ${n} ${a}`}for(let n of Array.isArray(e.edges)?e.edges:[])if(n?.type==="DERIVES")for(let r of["units","reconfirms"]){let s=n?.props?.[r];if(s===void 0)continue;let a=jr(s,r==="reconfirms");if(a)return`${String(n.ecid)} ${r} ${a}`}return null}function Cn(e){let t=st(e),r=t!==null&&(t.applied.seq===0||Ze(e,t.applied.seq)===t.applied.hash)?t:Pe(),{records:s,hashes:a}=je(e,r.applied.seq,r.applied.hash);return s.length>0&&Ee(e,r,s,a,{writeNodeFiles:!1}),r}function Tn(e,t,n){let r=d=>new Ge(d);for(let d of Pr)if(!Array.isArray(t[d]))throw r(`${d} is not a list`);if(typeof t.source_head_moves!="object"||t.source_head_moves===null||Array.isArray(t.source_head_moves))throw r("source_head_moves is not an object");if(t.media!==void 0&&(typeof t.media!="object"||t.media===null||Array.isArray(t.media)))throw r("media is not an object");if(t.names!==void 0&&!Array.isArray(t.names))throw r("names is not a list");let s=Kr(t);if(s!==null)throw r(s);for(let[d,g]of Br(t))if(typeof g!="string"||!Ve.test(g))throw r(`${d} ${String(g)} is not a sha256 fingerprint`);if(t.proposal_id!=null&&!Tt(t.proposal_id))throw r(`proposal id ${JSON.stringify(t.proposal_id)} is not a plain name (letters, digits, . _ - after a letter or digit)`);let a=new Map;for(let d of t.nodes){let g=Z(d.label,d.content);for(let l of g)if(Mr.has(l.code))throw r(`${d.cid} ${l.detail}`);if(!g.some(l=>l.code==="UNKNOWN_FIELD")&&ee(d.label,d.content)!==d.cid)throw r(`${d.cid} is not the hash of its content`);a.set(d.cid,d.label)}let u=d=>e.nodeLabel[d]??a.get(d)??"(unknown)",c=d=>d in e.nodeLabel||a.has(d),o=new Set(t.edges.map(d=>d.ecid)),h=d=>o.has(d)||Object.values(e.forward).some(g=>g.some(l=>l.ecid===d));for(let d of t.edges)for(let g of de(d.type,u(d.src),u(d.dst),d.props))if(Ur.has(g.code))throw r(`${d.ecid} ${g.detail}`);let i=kt(t.edges,Rt(e,t));if(i!==null)throw r(Ot(i));for(let d of t.supersessions)if(d.kind==="node"){if(!c(d.old))throw r(`supersedes ${d.old}, which the graph does not hold`);if(d.new!==null&&!c(d.new))throw r(`supersedes with ${d.new}, which the graph does not hold`);if(d.new!==d.old&&d.old in e.superseded)throw r(`${d.old} is re-superseded while already superseded`)}else{if(!h(d.ecid))throw r(`retracts edge ${d.ecid}, which the graph does not hold`);if(d.revoke&&!(d.ecid in e.superseded))throw r(`${d.ecid} is revoked without a standing retraction`);if(!d.revoke&&d.ecid in e.superseded)throw r(`${d.ecid} is re-retracted while already retracted`)}for(let d of t.names??[])if(!c(d.cid))throw r(`names ${d.slug} \u2192 ${d.cid}, which the graph does not hold`);Ee(null,e,[t],[n],{writeNodeFiles:!1});for(let d of t.supersessions){if(d.kind!=="node"||d.new===d.old)continue;let g=new Set,l=d.old;for(;l!==null&&l in e.superseded;){if(g.has(l))throw r(`supersession chain from ${d.old} revisits ${l}`);g.add(l),l=e.superseded[l]}}}import{existsSync as At,mkdirSync as Jr,readFileSync as Wr}from"fs";import{dirname as An,join as Yr}from"path";var Lt="unknown",Dn=()=>Lt;function Ti(e){Lt=e}var Xr=["extract","review","pair-merge","names","retire","gap","gap-close","chat","design","execution","parked","exec-supersede","ingest","distill","conv-mint","conv-turn","archive","revert"],Ln={extract:{v:1,args:["proposal","proposalId","verdicts","by","flags","judgements","probeHits","eventIds"],pins:["supersedeTarget","matches_existing","conflicts_with","depends_on_hint","read_basis_heads"]},review:{v:1,args:["verdicts","by","holdArchives"],pins:["verdicts","supersedeTarget"]},"pair-merge":{v:1,args:["survivor","merged","reason","by"],pins:["survivor","merged"]},names:{v:1,args:["assignments","by"],pins:["refs"]},retire:{v:1,args:["sourceId","reason","by"],pins:["head"]},gap:{v:1,args:["content","annotates"],pins:["annotates"]},"gap-close":{v:1,args:["targetTip","resolvedBy","sourceId","by"],pins:["gaps"]},chat:{v:1,args:["ops","judgements","by","mintable","sid"],pins:["targets","enhance","redirectTo","retract","conv"]},design:{v:1,args:["ucRef","sections","by","engine","force","forceScope","reason","generationTicket","templateVersion","phase","phaseCompleteness","eventIds","sid"],pins:["ucRef","automates","verifies","reuses","scope","depends_on","exercises","scoped_to_repoints","judgements","body_tags","forceScope"]},execution:{v:1,args:["facts","by","eventIds"],pins:["facts"]},parked:{v:1,args:["line"],pins:["facts"]},"exec-supersede":{v:1,args:["tip","raw","fileId","by"],pins:["tip","imports"]},ingest:{v:1,args:["source_id","blob","label","media","derived_blobs","eventIds"],pins:["prior_head"]},distill:{v:1,args:["watermark","by"],pins:["events"]},"conv-mint":{v:1,args:["sessionStamp","by"],pins:[]},"conv-turn":{v:1,args:["sourceId","text","force","by"],pins:["append_of"]},archive:{v:1,args:["ref","reason","by"],pins:["ref"]},revert:{v:1,args:["seq","reason","by"],pins:["target"]}};function it(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ot(e){return e===null||typeof e=="string"||typeof e=="boolean"?!0:typeof e=="number"?Number.isFinite(e):Array.isArray(e)?e.every(ot):it(e)&&Object.values(e).every(ot)}var zr=e=>typeof e=="string"&&Xr.includes(e);function Fn(e){if(!it(e))return"intent is missing: every append names the intent it fulfils";if(!zr(e.verb))return`intent verb ${String(e.verb)} is not a writer this build knows`;let t=Ln[e.verb].v;if(e.v!==t)return`intent ${e.verb} v ${String(e.v)} is not the version this build writes (v ${t})`;if(!it(e.pins)||!ot(e.pins))return"intent pins is not a plain JSON object";if(!ot(e.args))return"intent args is not JSON";let n=Ln[e.verb];for(let r of n.args??[])if(!it(e.args)||!(r in e.args))return`intent ${e.verb} arg ${r} is missing`;for(let r of n.pins??[])if(!(r in e.pins))return`intent ${e.verb} pin ${r} is missing`;return null}function me(e){return JSON.parse(JSON.stringify(e))}function Mn(e,t){let n=t.slice(7);return Yr(e,"intents",n.slice(0,2),`${n}.json`)}function Ai(e,t){let n=Mn(e,t);return At(n)?JSON.parse(Wr(n,"utf8")):null}function Qr(e,t){return{v:e.v,verb:e.verb,args:e.args,pins:e.pins,born:{...t,build:Lt}}}function Un(e,t,n){let r=Mn(e,n.hash),s=An(r),a=An(s),u=!At(a),c=u||!At(s);return Jr(s,{recursive:!0}),Dt(r,JSON.stringify(Qr(t,n))+`
|
|
5
5
|
`),c&&ct(a),u&&ct(e),r}import{closeSync as Zr,existsSync as es,mkdirSync as Pn,openSync as ts,readFileSync as Hn,readdirSync as ns,renameSync as jn,rmSync as Le,watch as rs,writeFileSync as Ft}from"fs";import{join as we}from"path";import{randomBytes as ss}from"crypto";var is=1440*60*1e3,De=class extends Error{constructor(n,r,s,a){super(`${n}: ${s}`);this.code=n;this.key=r;this.holder=a}},qe=e=>(e?.now??(()=>new Date))();function pt(e){if(!Number.isInteger(e)||e<=0)return!1;try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}function Vn(e,t){let n=t.getTime()-new Date(e.ts).getTime();return!pt(e.pid)||n>=is||Number.isNaN(n)}var Se=e=>we(e,"locks"),Gn=e=>we(Se(e),"waiters");function at(e,t){return t.kind==="context"?we(Se(e),"context.lock"):t.kind==="extract"?we(Se(e),"extract.lock"):we(Se(e),`uc-${t.id}.lock`)}var Mt=e=>e.kind==="uc"?e.id:e.kind,dt=e=>e.kind==="uc"?`uc:${e.id}`:e.kind,ut=e=>e.kind==="uc"?e.id:`~${e.kind}`;function qn(e){return[...e].sort((t,n)=>ut(t)<ut(n)?-1:ut(t)>ut(n)?1:0)}function ue(e){try{return JSON.parse(Hn(e,"utf8"))}catch{return null}}function os(e,t,n){let r=`${e}.break-${n}`;try{jn(e,r)}catch(a){if(a.code==="ENOENT")return!1;throw a}let s;try{s=JSON.parse(Hn(r,"utf8"))}catch{s=null}if(s===null||s.nonce===t)return Le(r,{force:!0}),!0;try{jn(r,e)}catch{Le(r,{force:!0})}return!1}var ie=new Map,lt=new Map;function ji(e,t,n){let r=c=>`${e}|${t}|${Mt(c)}`;function s(c,o,h=0){if(h>20)throw new De("LOCK_CONTENTION_UNSETTLED",c,`${dt(c)}: lock contention did not settle`);let i=at(e,c);Pn(Se(e),{recursive:!0});let d=ss(8).toString("hex");try{let g=ts(i,"wx",384);return Ft(g,JSON.stringify({...o,nonce:d})+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{K as $,s as p}from"./chunk-
|
|
2
|
+
import{K as $,s as p}from"./chunk-TLOYTGVT.js";import{a as f}from"./chunk-QXQ7KVEN.js";import{oa as u}from"./chunk-Z777GGHB.js";var w=e=>e===1?"1 change":`${e} changes`,v=e=>e===1?"waits":"wait";function c(e){let t=/^(\S+-\d+) · (.+)$/.exec(e.title);return t?`${u(t[1])} "${t[2]}"`:`"${e.title}"`}var y=e=>typeof e=="string"?`"${e}"`:e.bare,d=y,j=e=>typeof e=="string"?e:e.bare;function D(e,t){return t.page?{...e,page:t.page}:null}var m=e=>e.page?.bare?{bare:e.page.shown}:e.page?.shown??e.source,O={header:e=>`reviewing what changed in ${d(e)}`,held:(e,t)=>{let n=t.filter(s=>s==="ADD").length,i=t.filter(s=>s==="ARCHIVE").length,r=t.length-n-i,o=[n>0?`${n} new ${n===1?"use-case":"use-cases"}`:null,r>0?`${r} changed`:null,i>0?`${i} no longer in it`:null].filter(s=>s!==null);return`${w(t.length)} from ${d(e)} ${v(t.length)} for your review: ${o.join(", ")}`},waiting:(e,t)=>`${w(t)} from ${d(e)} ${v(t)} for your review`,reviewRow:(e,t)=>`review ${w(t)} from ${d(e)}`,finishForNow:{label:"finish for now",detail:"the review waits in this session"},adjust:"adjust \u2014 tell me what to change",reviewed:(e,t)=>{let n=t.approved+t.rejected+t.deferred,i=[t.approved>0?`${t.approved} approved`:null,t.rejected>0?t.rejected===1?"1 kept as it was":`${t.rejected} kept as they were`:null,t.deferred>0?`${t.deferred} left for later`:null].filter(r=>r!==null);return`reviewed ${n===1?"the change":`the ${n} changes`} from ${d(e)}: ${i.join(" \xB7 ")}`},finishSession:"finish the session",diffTitle:e=>c(e),receipt:(e,t)=>{let n=c(e),i=e.kind==="ADD",r="nothing is saved for this change, and it may be suggested again";return t==="approve"?{line:i?`added ${n} to this session`:e.kind==="ARCHIVE"?`archived ${n} in this session`:`approved the change to ${n} in this session`}:t==="reject"?{line:i?`left ${n} out of this session`:`kept ${n} as it is`,note:r}:{line:i?`left ${n} out for now, as an open question`:`left ${n} as it is for now, as an open question`}},refused:(e,t,n)=>t==="TARGET_RETIRED"?{line:`${c(e)} was archived while you were reviewing, so nothing changed`}:t==="SOURCE_MOVED"?{line:`${d(m(n))} changed again while you were reviewing, so this change wasn't taken`,next:["next: to review the latest version, run:",n.page?` kane-cli context ingest ${f(n.page.address)}${n.page.as?` --as ${f(n.page.as)}`:""}`:` kane-cli maintain reconcile --from ${n.file} --source-id ${n.source}`]}:t==="SOURCE_UNRESOLVED"?{line:`${d(m(n))} was removed while you were reviewing, so this change can't be taken`}:t==="ARCHIVE_UNRESOLVED"?{line:`${c(e)} changed while you were reviewing, so it can't be archived`,moveOn:!0}:t==="CONCURRENT_APPEND"?{line:"that didn't go through: the project was busy; try the card again"}:t==="ALREADY_VERDICTED"||t==="CARD_GONE"||t==="HOLD_GONE"?{line:"that change isn't in this review anymore, so nothing was done"}:{line:"that change can't be taken, so nothing was done",next:[`if this keeps failing, share this id with support: ${p(`refused_${t}`)}`]},chatRefused:e=>{let t=[];for(let n of e){let i=n.ref?`${u(n.ref)}${n.title?` "${n.title}"`:""}`:null;n.code==="EXPECTED_CID_MOVED"&&i?n.moved?t.push(`${i} changed after the agent read it, so this edit wasn't made`,"continue, and the agent works from its latest version"):t.push(`the agent's edit to ${i} didn't match it as it is now, so it wasn't made`,"continue, and the agent reads it again"):t.push("continue, and the agent tries again",`if this keeps failing, share this id with support: ${p(`refused_${n.code}`)}`)}return[...new Set(t)]},approveRefused:e=>{let t=e.find(n=>n.code==="EXPECTED_CID_MOVED"&&n.ref);return t?{line:`${`${u(t.ref)}${t.title?` "${t.title}"`:""}`} changed after it was shown to you, so nothing was approved`,notes:['view what was added to see it as it is now, then pick "looks good" again']}:{line:"that didn't go through, so nothing was approved",notes:['pick "looks good" again',`if this keeps failing, share this id with support: ${p(`refused_${e[0]?.code??"APPROVE"}`)}`]}},diffSummary:e=>{let t=e.filter(s=>s.field==="criteria"),n=Math.max(t.filter(s=>s.op==="+").length,t.filter(s=>s.op==="-").length),i=[...new Set(e.filter(s=>s.field!=="criteria").map(s=>s.field))],r=i.length>0?`its ${i.join(" and ")}`:null,o=n>0?`${n} acceptance ${n===1?"criterion":"criteria"} changed`:null;return o&&r?`${o}, and ${r}`:o??`${r} changed`},steering:"reading the change again, with your words",steerNothing:"your words left nothing to review",steerFailed:"that didn't go through; the changes wait as they were",offerAsks:e=>e>0?"design its tests again?":"design its tests?",notLanded:"that didn't go through; try the card again",offer:(e,t)=>t>0?{headline:t===1?`the test of "${e}" was designed for its old version`:`the ${t} tests of "${e}" were designed for its old version`,rows:[{key:"run",label:t===1?"design it again now":"design them again now",detail:t===1?"replaces it if it no longer fits":"replaces any that no longer fit"},{key:"later",label:"later",detail:`kane-cli context list --stale lists ${t===1?"it":"them"}`}]}:{headline:`"${e}" has no tests yet`,rows:[{key:"run",label:"design its tests now"},{key:"later",label:"later",detail:"design them after you save"}]},childOpen:(e,t)=>`designing the tests of "${t}"${e==="evolve"?" again":""}`,childClosed:(e,t,n)=>[`designed the tests of "${t}"${e==="evolve"?" again":""}`,n.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),childTests:(e,t)=>`${l(t)}${e==="evolve"?"":" added"}`,back:e=>`back to the review \u2014 ${l(e)} added in this session`,againBack:e=>{let t=(a,h)=>a===1?`its test ${h}`:`its ${a} tests ${h}`,i=[e.replaced.scenarios+e.replaced.tests>0&&"replaced",e.updated>0&&"updated",e.kept>0&&"kept"].filter(a=>a!==!1);if(i.length===0)return null;let r=`${[...e.replaced.scenarios>0?[k(e.replaced.scenarios)]:[],...e.replaced.tests>0?[l(e.replaced.tests)]:[]].join(" and ")} replaced`;if(i.length===1)return`back to the review \u2014 ${i[0]==="replaced"?e.replaced.scenarios===0?t(e.replaced.tests,"replaced"):r:i[0]==="updated"?t(e.updated,"updated"):e.kept===1?"its test kept as it was":`its ${e.kept} tests kept as they were`}`;let o=[],s=0;return i.forEach((a,h)=>{let b=h===i.length-1;if(a==="replaced"){o.push(r),s+=e.replaced.tests;return}let g=a==="updated"?e.updated:e.kept;b?o.push(s>0?`the other ${g===1?"test":`${g} tests`} ${a}`:t(g,a)):(o.push(`${l(g)} ${a}`),s+=g)}),`back to the review \u2014 ${o.join(", ")}`},childUnfinished:e=>e==="evolve"?"designing its tests again didn't finish":"designing its tests didn't finish",childFailed:(e,t)=>`couldn't design the tests of "${t}"${e==="evolve"?" again":""}`,childFailedNext:(e,t)=>t==="evolve"?["next: to update them later, run:",` kane-cli maintain evolve ${e}`]:["next: to design its tests later, run:",` kane-cli design tests --use-case ${e}`],childFailedNew:"its tests can be designed after you save this session",updateOpen:(e,t)=>`updating the tests of "${e}"${t?" \u2014 its use-case changed":""}`,updateClosed:(e,t)=>[`updated the tests of "${e}"`,t.join(" \xB7 ")].filter(Boolean).join(" \u2014 "),updateTests:e=>[...e.added>0?[`${l(e.added)} added`]:[],...$({changes:{tests:e.updated}})].join(", ")||null,updateUnfinished:e=>`updating the tests of "${e}" didn't finish`,updateFinishing:"finishing the update\u2026",updateFailed:e=>`couldn't update the tests of "${e}"`,updateUntouched:e=>`finished here: the tests of "${e}" weren't changed`,childHeld:(e,t)=>[{text:` \u2717 its tests can't be designed again now: ${e?"you're designing them in another session":"someone else is designing them"}`},{text:" the change stays approved in this session; to update its tests later, run:",dim:!0},{text:` kane-cli maintain evolve ${t}`,dim:!0}]},l=e=>e===1?"1 test":`${e} tests`,k=e=>e===1?"1 scenario":`${e} scenarios`;function S(e){return/^\S+-\d+ · (.+)$/.exec(e.title)?.[1]??e.title}export{c as a,y as b,j as c,D as d,m as e,O as f,S as g};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h}from"./chunk-
|
|
2
|
+
import{a as h}from"./chunk-A3TCFSCK.js";import{a as A}from"./chunk-HCBYKLMW.js";import{a as c,b as f,i as P}from"./chunk-33DWJV67.js";import{a as B}from"./chunk-6YGTRKDT.js";import{z as l}from"./chunk-QMOGBKJM.js";import{e as x}from"./chunk-UR6MHSHU.js";var L=x(B(),1);var n=x(A(),1);function S(r,d,s,u,m){let p=s==="basic"&&u?`basic (${u})`:s,i=20,a=`${r} [${d}]`,g="\xB7".repeat(Math.max(2,i-a.length+3));return{label:`${a} ${g} ${p}`,profile:r,env:d,isActive:m}}function M({creds:r,onSwitch:d,onCancel:s}){let u=r.listProfiles(),m=r.getActiveProfile(),p=r.getDefaultEnv(),i=u.map(e=>{let o=r.loadBasicAuth(e.profile,e.env),t=r.loadCredentials(e.profile,e.env)!==null,v=o?"basic":t?"oauth":"none",b=o?o.username:null,w=e.profile===m&&e.env===p;return S(e.profile,e.env,v,b,w)}),[a,g]=(0,L.useState)(()=>{let e=i.findIndex(o=>o.isActive);return e>=0?e:0});return P((e,o)=>{if(o.escape){s();return}if(o.upArrow){g(t=>Math.max(0,t-1));return}if(o.downArrow){g(t=>Math.min(i.length-1,t+1));return}if(o.return&&i[a]){let t=i[a];t.isActive||d(t.profile,t.env),s();return}}),i.length===0?(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{marginTop:1,children:(0,n.jsx)(f,{color:l.dim,children:"No profiles \u2014 use Login to create one"})}),(0,n.jsx)(h,{bindings:[],escBackLabel:"back"})]}):(0,n.jsxs)(c,{flexDirection:"column",borderStyle:"round",borderColor:l.orange,paddingX:2,paddingY:1,children:[(0,n.jsx)(f,{color:l.orange,bold:!0,children:"Profiles"}),(0,n.jsx)(c,{flexDirection:"column",marginTop:1,children:i.map((e,o)=>{let t=o===a,v=t?"\u276F ":" ",b=e.isActive?l.green:t?l.orange:void 0;return(0,n.jsxs)(f,{color:b,children:[v,e.label,e.isActive?" \u25CF active":""]},`${e.profile}-${e.env}`)})}),(0,n.jsx)(h,{bindings:[{keys:"\u2191\u2193",label:"navigate"},{keys:"\u21B5",label:"switch"}],escBackLabel:"back"})]})}export{S as a,M as b};
|
|
@@ -1,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-K3OSK6PB.js";import{a as s}from"./chunk-PVN64537.js";import{Ha as t,f as o}from"./chunk-TLOYTGVT.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};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as c}from"./chunk-YYVBE6W2.js";function m(o){if(o==null)return{ok:!0,url:void 0};if(typeof o!="string")return{ok:!1,message:`error: --override-start-url needs a URL (http:// or https://)
|
|
3
|
+
`};let t=o.trim(),i=a=>({ok:!1,message:`error: --override-start-url ${a}: ${JSON.stringify(o)} (expected an http:// or https:// URL, e.g. http://localhost:3000)
|
|
4
|
+
`});if(!t)return i("is empty");let n;try{n=new URL(t)}catch{return i("is not a URL")}return n.protocol!=="http:"&&n.protocol!=="https:"?i("must be http or https"):n.hostname?{ok:!0,url:t}:i("has no host")}function f(o){let t;try{t=new URL(o).hostname.toLowerCase()}catch{return!1}return t=t.replace(/^\[|\]$/g,""),t==="localhost"||t.endsWith(".localhost")||t==="::1"||/^127\./.test(t)||t==="0.0.0.0"||t.endsWith(".local")}function y(o){let{isAgent:t,log:i}=o,n=o.stdout??process.stderr,a=o.stdin??process.stdin,d=e=>{t&&c(e)};return{async runSteps(e){let{default:r}=await import("./react-QWOAB3TB.js"),{render:s}=await import("./build-5ZN47FAT.js"),{TestMdRunView:l}=await import("./TestMdRunView-I4MV54FB.js"),{ScrollbackProvider:p}=await import("./scrollback-GGNBDFQV.js"),{waitUntilExit:u}=s(r.createElement(p,null,r.createElement(l,e)),{stdout:n,stdin:a,exitOnCtrlC:!1});await u()},async runUpload(e,r){let{renderUploadProgress:s}=await import("./CliUploadProgress-HQX57WE6.js");return await s(e,r)},async onSummary(e){try{let{default:r}=await import("./react-QWOAB3TB.js"),{render:s}=await import("./build-5ZN47FAT.js"),{AutoExitSummaryBox:l}=await import("./SummaryBox-XQJUZBAN.js"),{waitUntilExit:p}=s(r.createElement(l,{data:e}),{stdout:n,stdin:a});await p()}catch(r){i("warn","TEST_MD_SUMMARY_RENDER_FAILED","Summary box render failed",{error:String(r)})}},async onLinks(e){try{let{default:r}=await import("./react-QWOAB3TB.js"),{render:s}=await import("./build-5ZN47FAT.js"),{LinksBox:l}=await import("./LinksBox-WZ4RAMSH.js"),{waitUntilExit:p}=s(r.createElement(l,e),{stdout:n,stdin:a});await p()}catch(r){i("warn","TEST_MD_LINKS_RENDER_FAILED","LinksBox render failed",{error:String(r)})}},onLockState(e){d({type:"test_md_lock_state",...e})},onAdaptiveHeal(e){d({type:"test_md_adaptive_heal",...e})},onAgentEvent(e){d(e)}}}export{m as a,f as b,y as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{h as B,k as j,m as L,o as E,q as P}from"./chunk-7V34ZMMS.js";import{O as W,ka as D}from"./chunk-Z777GGHB.js";import{existsSync as I,mkdirSync as H,readdirSync as J,readFileSync as A,renameSync as Q,writeFileSync as X}from"fs";import{join as _}from"path";var Y=new Set(["duplicate","unwritable"]),Z=/^sha256:[0-9a-f]{64}$/,tt=/^@import\s+(\S+)\s*$/;function et(e,n,o,u){if(u===null||!("superseded"in e)||!("nodeLabel"in e))return!1;let r=e.resolve(n)?.tip;if(!r)return!1;for(let R of W(e,r)){let d=e.getNode(R)?.content;if(d?.definitionId===o&&typeof d.test_md_blob=="string")return P(e,d.test_md_blob)===u}return!1}function T(e,n){let o=e.resolve(n),u=o?String(e.getNode(o.tip)?.content.title??""):"";return u&&D(u,()=>!1)||n}function nt(e){return _(e,".testmuai","tests")}function rt(e){let n=new Map;if(!I(e))return n;for(let o of J(e)){if(!o.endsWith("_test.md"))continue;let u=_(e,o);try{let r=E(A(u,"utf8"))?.id;r&&n.set(r,[...n.get(r)??[],u])}catch{}}return n}function it(e,n,o){let u=`assurance:
|
|
3
3
|
id: ${n}
|
|
4
4
|
base: ${o}
|
|
5
5
|
`,r=e.endsWith(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{a as X,c as oe}from"./chunk-H4KPNGY4.js";import{b as ae}from"./chunk-I6S6DZ2E.js";import{a as ie,b as W,c as B,d as F,e as V,f as M,g as J,h as S}from"./chunk-SB6P5EQH.js";import{a as re}from"./chunk-HD6NR44L.js";import{M as L,R as ne,S as se,xb as P}from"./chunk-Z777GGHB.js";import{f as k,g as q}from"./chunk-KU3YHPWZ.js";import{d as Q,m as $}from"./chunk-4I7YN6YY.js";function I(e,t){(e.err??e.out)(`error: ${t}`)}function Y(e,t){let n=e.nameOf.get(t);if(n)return n;for(let[i,r]of e.names)if(e.tipOf(r)===t)return i;return t}function fe(e,t){return{ucTip:t,display:Y(e,t),seamRef:e.nameOf.get(t)??t}}function ye(e,t){let n=e.resolve(t);if(!n)return{ok:!1,message:`unknown ref '${t}' \u2014 no test/scenario/ac/use-case by that id or cid`};let i=n.tip,r=e.nodeLabel.get(i);if(!r||!W.has(r))return{ok:!1,message:`'${t}' is a ${r??"missing node"} \u2014 evolve takes a test, scenario, acceptance criterion, or use-case`};let o=F(e,i,r);return!o||e.nodeLabel.get(o)!==k.USECASE?{ok:!1,message:`cannot resolve '${t}' to a parent use-case \u2014 its ${r} chain is broken`}:e.superseded.has(o)?{ok:!1,message:`use-case ${Y(e,o)} was removed \u2014 nothing to evolve`}:e.trust.get(o)==="archived"?{ok:!1,message:`use-case ${Y(e,o)} was archived \u2014 nothing to evolve`}:{ok:!0,target:fe(e,o)}}function We(e,t){return j(e,t)}function j(e,t){let n=[];for(let{cid:r}of e.byLabel(k.SCENARIO)){if(!B(e,r)||!e.edgesFrom(r).some(s=>s.type===q.BELONGS_TO&&e.tipOf(s.dst)===t))continue;let o=e.edgesInto(r).filter(s=>s.type===q.AUTOMATES&&B(e,s.src));if(o.length===0)n.push({scenario:r,test:null});else for(let s of o)n.push({scenario:r,test:s.src})}let i=new Map;for(let{cid:r}of e.byLabel(k.AC)){if(!B(e,r)||F(e,r,k.AC)!==t)continue;let o=e.edgesInto(r).filter(s=>s.type===q.VERIFIES&&B(e,s.src)).map(s=>s.src).sort();i.set(r,o)}return{pairs:n,verifies:i}}function be(e,t){let n=s=>`${s.scenario}\0${s.test??""}`,i=new Set(e.pairs.map(n)),r=new Set(t.pairs.map(n)),o=[];for(let[s,a]of e.verifies){let l=t.verifies.get(s);l&&(a.length===l.length&&a.every((d,_)=>d===l[_])||o.push({ac:s,before:a,after:l}))}return{superseded:e.pairs.filter(s=>!r.has(n(s))),minted:t.pairs.filter(s=>!i.has(n(s))),retained:t.pairs.filter(s=>i.has(n(s))),moves:o}}function we(e,t,n,i,r){let o=a=>t.nameOf.get(a)??a,s=a=>` - ${o(a.scenario)} \xB7 ${a.test?o(a.test):"(no test)"}`;e.out(`evolved: use-case ${n} \u2014 design record ${i.before} \u2192 ${i.after}`),e.out(` superseded ${r.superseded.length} pair(s)`);for(let a of r.superseded)e.out(s(a));e.out(` minted ${r.minted.length} pair(s)`);for(let a of r.minted)e.out(s(a));e.out(` retained ${r.retained.length} pair(s)`);for(let a of r.retained)e.out(s(a));if(r.moves.length===0)e.out(" verifies none moved");else{e.out(" verifies moved:");for(let a of r.moves){let l=d=>d.length>0?d.map(o).join(" + "):"(none)";e.out(` - ${o(a.ac)}: ${l(a.before)} \u2192 ${l(a.after)}`)}}}async function ge(e,t,n,i,r,o,s,a){let l=L(e),d=S(l,t.ucTip);if(!d)return o==="batch"?(i.out($().text("note.no_design_skipped",{use_case:t.display})),a?.({type:"evolve_skipped",use_case:t.display,reason:"no-design"}),{code:0,outcome:"no-design"}):(I(i,$().text("note.no_design",{use_case:t.display})),{code:2,outcome:"no-design"});let _=j(l,t.ucTip),v=[`evolve ${t.display}`,` re-designs use-case ${t.display}`,` affects ${_.pairs.length} pair(s)`,...n.because?[` because ${n.because}`]:[]];if(n.yes)for(let p of v)i.out(p);else{for(let c of v)i.out(c);let p=n.confirm?await n.confirm():await i.confirm(`proceed with the re-design of ${t.display}?`)?"proceed":"decline";if(p==="defer")return i.out(`deferred: the re-design of ${t.display} waits for an answer \u2014 nothing evolved`),{code:3,outcome:"deferred"};if(p==="decline")return i.out(o==="batch"?`skipped ${t.display}`:"declined \u2014 nothing evolved"),{code:0,outcome:"declined"}}let E=t.named?Ce(t.named):void 0,x=oe(e,l,t.ucTip,n.because,E),R=t.named?Re(l,t.named,t.display,n.because,t.ucTip):void 0,D=!1,O,h=p=>{p.type==="nothing_to_change"&&(D=!0,typeof p.note=="string"&&(O=p.note)),a?.(p)},y=await re(s,{verb:"evolve",subject:t.display},()=>r(t.seamRef,{yes:!!n.yes,...n.mode?{mode:n.mode}:{},...n.because?{because:n.because}:{},...x!==void 0?{changeDelta:x.change_delta,priorDesign:x.prior_design}:{},onChildEvent:h,...R?{statement:R}:{},...n.repin?{repinsKept:!0}:{}}),p=>({ok:p===0,exitCode:p}));if(y===3)return i.out($().text("note.design_paused",{use_case:t.display})),{code:y,outcome:"paused"};if(y!==0)return I(i,`design run for ${t.display} ended with exit code ${y} \u2014 no diff to report`),{code:y,outcome:"failed"};let u=L(e),b=u.tipOf(t.ucTip),w=S(u,b)?.seq,T={before:d.seq,after:w??"?"},A=be(_,j(u,b)),C=n.sourceChanged?{source_changed:n.sourceChanged}:{};if(D&&w===d.seq){let p=n.repin?_e(e,b,n.repin.by,i,t.display):void 0;return i.out(`unchanged: use-case ${t.display} \u2014 the design agent found nothing to change`),a?.({...ue(u,t.display,T,A),nothing_to_change:!0,...O?{note:O}:{},...p?{repinned:p}:{},...C}),ce(i,t.display,n.sourceChanged),{code:0,outcome:"unchanged"}}return we(i,u,t.display,T,A),a?.({...ue(u,t.display,T,A),...C}),ce(i,t.display,n.sourceChanged),{code:0,outcome:"evolved"}}function _e(e,t,n,i,r){let o=ie({store:e,graph:L(e),ucTip:t,by:n});if(o.errors){i.err?.(`the tests of ${r} couldn't be marked up to date: ${o.errors.map(a=>a.detail).join("; ")}`);return}let s=L(e);if(!(o.moved===0||V(s,t)))return{tests:H(s,t).total}}function ce(e,t,n){n&&e.out($().text("note.source_changed_after",{use_case:t,review:z(n)}))}var z=e=>e.next&&e.next.length>0?e.next.map(t=>t.cmd).join(" and "):null;function Ee(e,t){return n=>{let r=L(e).heads.get(n),o=r?[...e.recordsSince(null)].reverse().find(l=>l.source_head_moves?.[n]===r):void 0,s=o?e.tokenAt(o.seq):null,a=s?e.intentOf(s)?.args?.label:void 0;return{cmd:$().command("next.review_source",{source_id:n,from:typeof a=="string"?a:null,agent_mode:t})}}}function $e(e){let t=new Map,n=0;for(let{cid:r,state:o}of e.staleList()){if(o==="superseded")continue;let s=e.nodeLabel.get(r);if(!s||!W.has(s)||!B(e,r)||!P(e,r))continue;let a=F(e,r,s);!a||e.nodeLabel.get(a)!==k.USECASE||!B(e,a)||(n++,t.has(a)||t.set(a,fe(e,a)))}return{targets:[...t.values()].sort((r,o)=>r.display<o.display?-1:r.display>o.display?1:0),staleCount:n}}function xe(e,t,n){let i=e.map(s=>t(s,n)),r=i.flatMap(s=>s.cmd?[{cmd:s.cmd,why:"review its source's change"}]:[]),o=i.flatMap(s=>s.remedy?[s.remedy]:[]).join(`
|
|
3
3
|
`);return{...r.length>0?{next:r}:{},...o?{remedy:o}:{}}}var pe={[k.TEST]:"test",[k.SCENARIO]:"scenario",[k.AC]:"ac",[k.USECASE]:"usecase"},ve={test:"test",scenario:"scenario",ac:"acceptance criterion",usecase:"use-case"},de=120;function Oe(e,t){let n=e.resolve(t);if(!n)return null;let i=pe[e.nodeLabel.get(n.tip)??""];if(!i)return null;let r=e.getNode(n.tip)?.content??{},o=i==="ac"?r.text:r.title,s=typeof o=="string"?o.replace(/[\u0000-\u001f\u007f]+/g," ").trim():"",a=Array.from(s),l=a.length===0?void 0:a.length>de?`${a.slice(0,de-1).join("")}\u2026`:s,d=e.superseded.has(n.tip)?"removed":e.trust.get(n.tip)==="archived"?"archived":void 0;return{ref:e.nameOf.get(n.tip)??e.displayNameOf(n.tip)??t,label:i,...l?{title:l}:{},cid:n.tip,...d?{dead:d}:{}}}function Ce(e){if(!e.dead)return{ref:e.ref,label:e.label,...e.title?{title:e.title}:{}}}function ke(e,t,n){let i=[];for(let{cid:r,state:o}of e.staleList()){if(o==="superseded"||r===n)continue;let s=e.nodeLabel.get(r),a=pe[s??""];if(!s||!a||!B(e,r)||!P(e,r)||F(e,r,s)!==t)continue;let l=X(e,r);if(!l)continue;let d=e.nameOf.get(r)??e.displayNameOf(r)??r;i.push({display:d,text:`${ve[a]} ${d} \u2014 ${l}`})}return i.sort((r,o)=>r.display<o.display?-1:r.display>o.display?1:0),i[0]?.text??null}var Se=`Judge the scope yourself: change what this genuinely affects and leave the rest as designed.
|
|
4
4
|
If it is ambiguous what should change, ask before changing anything.`;function Re(e,t,n,i,r){let o=t.label==="usecase"?"":` in use-case ${n}`,s=[t.title?`"${t.title}"`:"",t.dead?`${t.dead} earlier`:""].filter(Boolean).join(", "),a=`[kane] evolve started on ${ve[t.label]} ${t.ref}${s?` (${s})`:""}${o}.`,l=i?.trim(),d=l||t.dead?void 0:X(e,t.cid),_=l?void 0:d??(r?ke(e,r,t.cid):null),v=l?`Because: ${l}`:_?`Stale: ${_}`:null;return[a,v,Se].filter(E=>E!==null).join(`
|
|
5
5
|
`)}function ue(e,t,n,i){let r=s=>e.nameOf.get(s)??s,o=s=>({scenario:r(s.scenario),test:s.test?r(s.test):null});return{type:"evolve_diff",use_case:t,generation:n,superseded:i.superseded.map(o),minted:i.minted.map(o),retained:i.retained.map(o),moves:i.moves.map(s=>({ac:r(s.ac),before:s.before.map(r),after:s.after.map(r)}))}}function H(e,t){let n=j(e,t).pairs.flatMap(r=>r.test!==null?[{test:r.test,scenario:r.scenario}]:[]);return{touched:n.filter(({test:r,scenario:o})=>P(e,r)||P(e,o)||e.edgesFrom(r).some(s=>s.type===q.VERIFIES&&P(e,s.dst))).length,total:n.length}}async function Ve(e,t,n){let{io:i,asks:r,runDesign:o,emit:s}=n,a=t.because,l=n.onChild??(s?De(s):void 0);i.out(`evolving ${t.ref??"stale use-cases"}: reading the graph\u2026`);let d=L(e),_=t.ref!==void 0?se(d,t.ref):null;if(_!==null)return I(i,_),2;let v=t.ref!==void 0?ne(d,t.ref):void 0,E="given"in r.blast?r.blast:null,x=n.words?.review??Ee(e,t.mode==="agent"),R=(c,f)=>xe(c,x,f),D=c=>{let{sources:f}=M(d,c.ucTip);return f.length>0?R(f,c.ucTip):void 0},O=(c,f)=>n.words?n.words.question(c,H(d,c.ucTip),a,v===void 0):le(c,f,a),h,y,u=[],b=()=>{for(let{target:c,review:f}of u)i.out($().text("note.source_changed_skipped",{use_case:c.display,review:z(f)})),s?.({type:"evolve_skipped",use_case:c.display,reason:"source_changed",...f})};if(v){let c=ye(d,v);if(!c.ok)return I(i,c.message),2;let f=M(d,c.target.ucTip);if(!a&&S(d,c.target.ucTip)&&J(f)){let m=R(f.sources,c.target.ucTip);return I(i,$().text("note.source_changed",{use_case:c.target.display,review:z(m)})),s?.({type:"evolve_skipped",use_case:c.target.display,reason:"source_changed",...m}),2}if(!a&&S(d,c.target.ucTip)&&!V(d,c.target.ucTip)){let m=r.because?await r.because(c.target.display):void 0;if(m!==null&&typeof m=="object")return i.out(`deferred: the reason to re-design ${c.target.display} waits for an answer \u2014 nothing evolved`),s?.({type:"evolve_paused",pending_because:c.target.display}),3;let N=m?.trim();if(!N)return I(i,$().text("note.nothing_changed",{ref:v})),2;a=N}let g=Oe(d,v);h=[{...c.target,ref:v,...g?{named:g}:{}}]}else{let{targets:c,staleCount:f}=$e(d);if(c.length===0){let g=E?Z(E,[]):null;return g?te(i,g):(s?.({type:"evolve_batch",stale_nodes:f,use_cases:0}),i.out("nothing stale \u2014 nothing to evolve"),0)}if(i.out(`from-stale: ${f} stale node(s) \u2192 ${c.length} use-case(s)`),u=c.flatMap(g=>{let m=M(d,g.ucTip);return S(d,g.ucTip)&&J(m)?[{target:g,review:R(m.sources,g.ucTip)}]:[]}),h=c.filter(g=>!u.some(m=>m.target.ucTip===g.ucTip)),y={stale_nodes:f,use_cases:h.length},h.length===0){let g=E?Z(E,[]):null;return g?te(i,g):(b(),s?.({type:"evolve_batch",...y}),0)}}let w={...a?{because:a}:{},...t.mode?{mode:t.mode}:{},...t.yes?{yes:!0}:{},repin:{by:n.by??{kind:"human",id:"operator"}}},T=c=>{a&&e.signals().append({ts:new Date().toISOString(),command:"evolve",id:c,verdict:"gap-resolved-evolve",polarity:"preference",by:n.by??{kind:"human",id:"operator"},target:c,reason:a})};if(E)return Te({store:e,graph:d,ref:v,targets:h,batch:y,opts:w,answered:E,io:i,runDesign:o,onChild:l,emit:s,signal:T,sayLeftOut:b,reviewFor:D,question:(c,f)=>n.words?n.words.question(c,H(d,c.ucTip),w.because,v===void 0):le(c,f,w.because),...n.words?{why:n.words.answerWhy}:{}});let A=r.blast.ask,C=c=>S(d,c.ucTip)?j(d,c.ucTip).pairs.length:0;y&&(b(),s?.({type:"evolve_batch",...y}));let p=[];for(let[c,f]of h.entries()){let g=C(f);S(d,f.ucTip)&&s?.(me(f,g,a));let m=()=>A(O(f,g),f.display),N=D(f),U=await ge(e,f,{...w,confirm:m,...N?{sourceChanged:N}:{}},i,o,v?"single":"batch",l,s);if(U.outcome==="evolved"&&T(v??f.display),U.outcome==="declined"&&s?.({type:"evolve_skipped",use_case:f.display,reason:"declined"}),U.outcome==="deferred"){let he=h.slice(c).filter(K=>S(d,K.ucTip));return s?.({type:"evolve_paused",pending_questions:he.map(K=>O(K,C(K))),deferred:f.display}),ee([...p,3])}if(v)return U.code;p.push(U.code)}return ee(p)}function Z(e,t){if(e.unreadable!==void 0)return e.unreadable;for(let[n,i]of e.given){if(!t.includes(n))return`${n} is not a question this run asks \u2014 addressable: ${t.length>0?t.join(", "):"(none)"}`;if(typeof i=="object")return`'${i.invalid}' is not a choice for ${n} \u2014 use 1 or proceed, 2 or decline`}return null}async function Te(e){let{store:t,graph:n,ref:i,targets:r,batch:o,opts:s,answered:a,io:l,runDesign:d,onChild:_,emit:v,signal:E}=e,x=[],R=[];for(let u of r){if(!S(n,u.ucTip)){if(i)return I(l,$().text("note.no_design",{use_case:u.display})),2;R.push(u);continue}x.push({target:u,pairs:j(n,u.ucTip).pairs.length})}let D=Z(a,x.map(u=>G(u.target)));if(D)return te(l,D);let O=a.given;o&&(e.sayLeftOut(),v?.({type:"evolve_batch",...o}));for(let u of R)l.out($().text("note.no_design_skipped",{use_case:u.display})),v?.({type:"evolve_skipped",use_case:u.display,reason:"no-design"});for(let u of x)v?.(me(u.target,u.pairs,s.because));let h=x.filter(u=>!O.has(G(u.target)));if(h.length>0){let u=$(),b=[...O.entries()].map(([g,m])=>({id:g,choice:m})),w={...i!==void 0?{ref:i}:{},...s.because?{because:s.because}:{}},T=u.command("next.answer_evolve",{...w,answers:b}),A=g=>({...w,answers:[...b,...h.map(m=>({id:G(m.target),choice:g}))]}),C=h.length===1?`use-case ${h[0].target.display}`:`${h.length} use-cases`,p=[...O.values()].filter(g=>g==="proceed").length,c=p>0?`; the ${p} use-case(s) already answered proceed still re-design`:"",f=[Q(u,"next.answer_evolve",A("proceed"),{why:e.why?e.why("proceed",C):`re-design ${C} now \u2014 supersedes what the change touches, spends design credits${c}`,...e.why?{}:{title:p>0?"Proceed with the remaining re-design":"Proceed with the re-design"}}),Q(u,"next.answer_evolve",A("decline"),{why:e.why?e.why("decline",C):`leave ${C} as designed${c}`,...e.why?{}:{title:p>0?"Decline the remaining question(s)":"Decline"}})].filter(g=>!("cmd"in g)||ae(g.cmd));return v?.({type:"evolve_paused",pending_questions:h.map(g=>e.question(g.target,g.pairs)),...T!==null?{resume:T}:{},next:f}),3}let y=[];for(let{target:u}of x){if(O.get(G(u))==="decline"){l.out(i?"declined \u2014 nothing evolved":`skipped ${u.display}`),v?.({type:"evolve_skipped",use_case:u.display,reason:"declined"});continue}let b=e.reviewFor(u),w=await ge(t,u,{...s,yes:!0,...b?{sourceChanged:b}:{}},l,d,i?"single":"batch",_,v);w.outcome==="evolved"&&E(i??u.display),y.push(w.code)}return ee(y)}function ee(e){let t=e.find(n=>n!==0&&n!==3);return t!==void 0?t:e.includes(3)?3:0}function te(e,t){return e.err?e.err(`error: ${t}`,"ANSWER_USAGE"):e.out(`error: ${t}`),2}function G(e){return`evolve:${e.display}`}function me(e,t,n){return{type:"evolve_target",...e.ref!==void 0?{ref:e.ref}:{},use_case:e.display,pairs:t,...n?{because:n}:{}}}function le(e,t,n){return{id:G(e),header:"Re-design?",text:`Re-design use-case ${e.display}? ${t} scenario/test pair(s) are affected${n?` \u2014 because: ${n}`:""}.`,risk:"med",rationale:"evolve re-designs the whole parent use-case: what the change touches is superseded, the rest is re-emitted verbatim; the run spends design credits",options:[{label:"proceed",detail:`re-design use-case ${e.display} now (${t} pair(s) affected)`},{label:"decline",detail:"leave the current design as it is"}],recommended_index:0,allow_free_text:!1}}function De(e){return t=>{t.kind==="start"?e({type:"child_start",child:"design",subject:t.subject}):t.kind==="end"&&e({type:"child_end",ok:t.ok,dur_s:t.durS,...t.exitCode!==void 0?{exit_code:t.exitCode}:{}})}}export{ye as a,We as b,ge as c,$e as d,xe as e,Oe as f,Se as g,Re as h,Ve as i,G as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as Q,c as Z,d as ee,e as fe,f as de}from"./chunk-
|
|
2
|
+
import{b as Q,c as Z,d as ee,e as fe,f as de}from"./chunk-LHQUCRCH.js";import{a as ge}from"./chunk-JX5NVKTV.js";import{d as le}from"./chunk-FLOQ5NZL.js";import{a as ue}from"./chunk-MKPDF26Q.js";import{b as se}from"./chunk-D6CS62O7.js";import{b as ae}from"./chunk-2PZKMT3I.js";import{a as R,b as E,d as ce}from"./chunk-VE3SUJMA.js";import{c as N}from"./chunk-FBQ7PQJV.js";import{d as ne}from"./chunk-Y6Y6RAY4.js";import{b as re,c as ie}from"./chunk-YI4ESDAX.js";import{e as M}from"./chunk-6K5BEEAJ.js";import{b as oe}from"./chunk-TZXXJWHA.js";import{i as te}from"./chunk-Z7S3IWUX.js";import{r as w}from"./chunk-UJLULWSR.js";import{a as B}from"./chunk-GGV336P5.js";import{a as T,c as W,e as I}from"./chunk-2XW33VOK.js";import{f as z,g as H}from"./chunk-A7RJQJNT.js";import{a as Y}from"./chunk-VZA7BPCK.js";import{a as J}from"./chunk-HCBYKLMW.js";import{a as c,b as u,i as O,j as q}from"./chunk-33DWJV67.js";import{a as ye}from"./chunk-6YGTRKDT.js";import{e as F}from"./chunk-UR6MHSHU.js";var s=F(ye(),1);var r=F(J(),1);function Ae(f){return f.mode==="login"?f.authOnly?"done":"ensure-project":f.complete?"done":f.hasProject?"ensure-folder":"ensure-project"}function Je({resultRef:f,mode:p="singleshot",loginCompleteRef:d,authOnly:A=!1}){let{exit:h}=q(),k=(0,s.useRef)(new Y),P=(0,s.useRef)(new ae),g=(0,s.useRef)(new le),o=k.current,a=P.current,U=g.current,pe=Q(),[x,m]=(0,s.useState)(p==="login"?"login":"gate"),[X,me]=(0,s.useState)(null),[we,$]=(0,s.useState)(null),[Ee,L]=(0,s.useState)(null),[G,ve]=(0,s.useState)(null),[K,S]=(0,s.useState)([]),b=(0,s.useCallback)((e,t,i,n)=>U.log(e,t,i,n),[U]),ke=(0,s.useCallback)((e,t)=>{e?R(o,a,e,t):a.save({project_id:null,project_name:null,folder_id:null,folder_name:null})},[o,a]),C=(0,s.useCallback)(()=>{if(p==="login")d&&(d.current=!0),h();else{let e=a.load().mobile,t=T(e?.tui_target,e?.default_target?.kind),i=t.kind==="unset"||t.kind==="choose-mobile"&&oe();m(i?"target":"input")}},[p,h,d,a]),_=(0,s.useCallback)((e,t)=>{let i=R(o,a,e,t),n=Ae({mode:p,authOnly:A,hasProject:!!i.projectId,complete:ce(i)});n==="done"?C():m(n)},[o,a,C,p,A]);O((e,t)=>{t.ctrl&&e==="c"&&w(0,"Ctrl+C exit")});let V=(0,s.useRef)(!1);s.default.useEffect(()=>{V.current||(V.current=!0,p!=="login"&&de(o,b).then(e=>{me(e),e.status==="authenticated"?_(e.result.profile,e.result.env):e.status==="needs_pick"?m("pick"):($(e.profile??null),L(e.env??null),m("login"))}).catch(e=>{ve(`Auth check failed: ${e instanceof Error?e.message:String(e)}`)}))},[o,b]);let he=(0,s.useCallback)(e=>{f.current={objective:e},h()},[f,h]),Pe=(0,s.useCallback)(async(e,t)=>{o.setActiveProfile(e),o.setDefaultEnv(t),(await fe(o,e,t,b)).status==="authenticated"?_(e,t):($(e),L(t),m("login"))},[o,b,_]),j=(0,s.useCallback)(()=>{let e=o.getActiveProfile(),t=o.getDefaultEnv();if(!e)return null;let i=B(t),n=o.loadBasicAuth(e,t);return new ue(i.controllerBaseUrl,async()=>o.loadCredentials(e,t)?.access_token??null,n,b)},[o,b]),xe=(0,s.useCallback)(async()=>{let e=j();if(!e)return null;let t=e.cached??await e.resolve();if(!t)return null;let i=B(o.getDefaultEnv()),n=new M(i.tmsBaseUrl,t.username,t.access_key);try{let v=(await n.listProjects()).find(D=>D.name==="KaneAI Generated");if(v)return{id:v.project_id,name:v.name};let y=await n.createProject("KaneAI Generated");return{id:y.id,name:y.name}}catch{return null}},[j,o]),be=(0,s.useCallback)(async e=>{let t=j();if(!t)return null;let i=t.cached??await t.resolve();if(!i)return null;let n=B(o.getDefaultEnv()),l=new M(n.tmsBaseUrl,i.username,i.access_key);try{let y=(await l.listFolders(e)).find(je=>je.name==="Untitled");if(y)return{id:y.id,name:y.name};let D=await l.createFolder(e,"Untitled");return{id:D.id,name:D.name}}catch{return null}},[j,o]);if(x==="gate")return(0,r.jsx)(c,{paddingX:1,children:(0,r.jsx)(u,{color:"yellow",children:"Checking authentication..."})});if(G)return(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"red",children:G}),(0,r.jsx)(u,{color:"gray",children:"Press Ctrl+C to exit."})]});if(x==="pick"&&X?.status==="needs_pick")return(0,r.jsx)(Ce,{profiles:X.profiles,onSelect:Pe});if(x==="login")return(0,r.jsx)(ee,{devMode:process.env.KANE_DEV_MODE==="1",profiles:o.listProfiles(),onBasicLogin:async(e,t,i,n)=>{let{validateBasicAuth:l}=await import("./validate-basic-3DX3MMC7.js");await l(t,i,n),o.saveBasicAuth(e,t,{username:i,access_key:n}),o.setActiveProfile(e),o.setDefaultEnv(t)},onOAuthLogin:async(e,t)=>{let{LoginFlow:i}=await import("./login-flow-CHLGQGHK.js");o.setDefaultEnv(t),o.setActiveProfile(e),await new i(e,t,o).login()},onComplete:(e,t)=>{$(e),L(t),o.setActiveProfile(e),o.setDefaultEnv(t),_(e,t)},onCancel:()=>{w(0,"Login cancelled")}});if(x==="ensure-project"){let e=o.getActiveProfile()??"default",t=o.getDefaultEnv(),i=()=>{if(p==="login"){m("ensure-folder");return}R(o,a,e,t).folderId?C():m("ensure-folder")};return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(ie,{resolver:j(),currentProjectId:a.load().project_id,env:t,...re,onSelect:(n,l)=>{E(o,a,e,t,{projectId:n,projectName:l}),S(v=>[...v,`\u2713 Project: ${l} (${n})`]),i()},onCancel:async()=>{let n=await xe();n&&(E(o,a,e,t,{projectId:n.id,projectName:n.name}),S(l=>[...l,`\u2713 Default project: ${n.name} (${n.id})`]),i())}})]})}if(x==="ensure-folder"){let e=o.getActiveProfile()??"default",t=o.getDefaultEnv(),i=o.loadProfileConfig(e,t);return(0,r.jsxs)(c,{flexDirection:"column",children:[(0,r.jsx)(c,{paddingX:1,marginBottom:1,children:(0,r.jsx)(u,{color:"yellow",children:"Project & folder are required to save tests \xB7 Esc to use defaults \xB7 Ctrl+C to exit"})}),(0,r.jsx)(se,{resolver:j(),projectId:i?.project_id??"",currentFolderId:a.load().folder_id,env:t,onSelect:(n,l)=>{E(o,a,e,t,{folderId:n,folderName:l}),S(v=>[...v,`\u2713 Folder: ${l} (${n})`]),C()},onCancel:async()=>{if(!i?.project_id)return;let n=await be(i.project_id);n&&(E(o,a,e,t,{folderId:n.id,folderName:n.name}),S(l=>[...l,`\u2713 Default folder: ${n.name} (${n.id})`]),C())}})]})}if(x==="target"){let e=T(a.load().mobile?.tui_target,a.load().mobile?.default_target?.kind).kind==="choose-mobile";return(0,r.jsx)(c,{paddingX:1,children:(0,r.jsx)(ge,{mode:e?"legacy-mobile":"all",onSelect:t=>{a.setMobile({tui_target:t}),m("input")},onCancel:()=>m("input")})})}if(x==="input"){let e=a.load().mobile,t=T(e?.tui_target,e?.default_target?.kind),i=(()=>{if(H(t.kind)){let n=te(e?.default_target)??"(no device)",l=N(e?.default_app)??"(no app)";return`Config: ${I(t.kind)} \xB7 ${n} \xB7 ${l}`}if(z(t.kind)){let n=W(e,t.kind),l=N(n.app)??"(no app)";return`Config: ${I(t.kind)} \xB7 ${ne(n)} \xB7 ${l}`}return"Config: Desktop \xB7 Chrome"})();return(0,r.jsxs)(c,{flexDirection:"column",children:[K.length>0&&(0,r.jsx)(c,{flexDirection:"column",paddingX:1,marginBottom:1,children:K.map((n,l)=>(0,r.jsx)(u,{color:"green",children:n},l))}),(0,r.jsx)(c,{paddingX:1,children:(0,r.jsx)(u,{color:"gray",children:i})}),(0,r.jsx)(Z,{onSubmit:he,onEscape:()=>w(0,"User pressed Escape"),history:pe,placeholder:"Type an objective..."})]})}return(0,r.jsx)(r.Fragment,{})}function Ce({profiles:f,onSelect:p}){let[d,A]=(0,s.useState)(0),[h,k]=(0,s.useState)(!1);return O((P,g)=>{if(!h){if(g.escape){w(0,"Profile picker cancelled");return}if(g.upArrow&&d>0&&A(o=>o-1),g.downArrow&&d<f.length-1&&A(o=>o+1),g.return){k(!0);let o=f[d];p(o.profile,o.env).catch(()=>k(!1))}}}),(0,r.jsxs)(c,{flexDirection:"column",paddingX:1,children:[(0,r.jsx)(u,{color:"#ff9500",bold:!0,children:"Select a profile:"}),(0,r.jsx)(c,{marginTop:1,flexDirection:"column",children:f.map((P,g)=>(0,r.jsxs)(u,{children:[g===d?"\u276F ":" ",(0,r.jsx)(u,{color:g===d?"#ff9500":"white",bold:g===d,children:P.profile}),(0,r.jsxs)(u,{color:"gray",children:[" [",P.env,"]"]})]},`${P.profile}-${P.env}`))}),h&&(0,r.jsx)(c,{marginTop:1,children:(0,r.jsx)(u,{color:"yellow",children:"Validating credentials..."})})]})}export{Ae as a,Je as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{l as a,m as b,n as c,o as d}from"./chunk-UX2CDUPE.js";import"./chunk-ENG2UTMX.js";import"./chunk-FYCD765R.js";import"./chunk-34R7BNZ2.js";import"./chunk-URAYFJGM.js";import"./chunk-6K5BEEAJ.js";import"./chunk-3G2LSTK5.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-VZA7BPCK.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{c as resolveVerdictTarget,b as runEvidenceLintPolicy,a as runEvidenceValidate,d as runEvidenceVerdict};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{$ as g,V as a,W as b,X as c,Y as d,Z as e,_ as f,_a as r,aa as h,ba as i,ca as j,da as k,ea as l,fa as m,ga as n,ha as o,ia as p,ja as q}from"./chunk-
|
|
2
|
+
import{$ as g,V as a,W as b,X as c,Y as d,Z as e,_ as f,_a as r,aa as h,ba as i,ca as j,da as k,ea as l,fa as m,ga as n,ha as o,ia as p,ja as q}from"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UR6MHSHU.js";export{a as SLUG_RE,b as checkAcyclic,c as checkCardinality,d as citesOf,p as commitDeferGap,n as commitNames,m as commitPairMerge,k as commitProposal,o as commitRetire,l as commitReviewFacts,e as criteriaShape,h as mintEventId,i as nextEventIds,r as recordsSince,q as resolveDeferGaps,j as resolveLivingTip,f as validateCriterionOps,g as validateProposal};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-
|
|
2
|
+
import{a,b,c}from"./chunk-GGV336P5.js";import"./chunk-VZA7BPCK.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{a as getEnvironment,c as latticeAddress,b as targetEnv};
|