@testmuai/kane-cli 0.10.0-rc.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatSurface-XUV3EQPZ.js +2 -0
- package/dist/{ChromeProfilePicker-M4WXOB5O.js → ChromeProfilePicker-FWPUDKD6.js} +1 -1
- package/dist/{CliFeedbackPrompt-6MJA7DF6.js → CliFeedbackPrompt-D5L2DO6A.js} +1 -1
- package/dist/{CliUploadProgress-6NLS7XHH.js → CliUploadProgress-HQX57WE6.js} +1 -1
- package/dist/{ConfigView-O4WKZ5PU.js → ConfigView-DGQXKEON.js} +1 -1
- package/dist/EvidenceViewOffer-EIANIYN7.js +2 -0
- package/dist/FolderPicker-XOA7FTHF.js +2 -0
- package/dist/InfoBox-OBH7SUGC.js +2 -0
- package/dist/{LinksBox-DXP66H3H.js → LinksBox-WZ4RAMSH.js} +1 -1
- package/dist/{ProfilesView-TWOY5PVC.js → ProfilesView-AGRNPGSW.js} +1 -1
- package/dist/ProjectPicker-6KRLKV4U.js +2 -0
- package/dist/SaveSessionPrompt-J2OPDEOO.js +2 -0
- package/dist/SingleShotApp-QI4B2TSL.js +2 -0
- package/dist/{SummaryBox-IA2KS6GT.js → SummaryBox-XQJUZBAN.js} +1 -1
- package/dist/TestMdRunView-I4MV54FB.js +2 -0
- package/dist/TestrunEvidenceTable-WEIUSW3E.js +2 -0
- package/dist/{WhoamiView-SNL75TEF.js → WhoamiView-JQCURK2M.js} +1 -1
- package/dist/{app-download-UI4ABEIX.js → app-download-OU6AGH2X.js} +1 -1
- package/dist/{assurance-job-FFSSS4XV.js → assurance-job-ZI3L6I4F.js} +1 -1
- package/dist/{binary-THPLXCOD.js → binary-S5YL5GJD.js} +1 -1
- package/dist/bind-LIV72SEZ.js +2 -0
- package/dist/bootstrap-3V6TOO6I.js +2 -0
- package/dist/{bridge-T6QMYKED.js → bridge-SDEP7Y33.js} +1 -1
- package/dist/{catalog-MYPS2BXY.js → catalog-I3PC6LT6.js} +1 -1
- package/dist/catalog-client-WKYG3JN6.js +2 -0
- package/dist/{changelog-SU674BVE.js → changelog-IHNWFYWY.js} +1 -1
- package/dist/chat-committer-FM5NG46O.js +2 -0
- package/dist/{chat-controller-XINCDH6Z.js → chat-controller-FWFQVZTB.js} +1 -1
- package/dist/child-H2YSDFCG.js +2 -0
- package/dist/{chunk-QDFY5GGO.js → chunk-252GEI3H.js} +1 -1
- package/dist/{chunk-TNORODUF.js → chunk-2B75UL7Y.js} +1 -1
- package/dist/{chunk-FWDUVFS6.js → chunk-2EVP636F.js} +17 -17
- package/dist/{chunk-7XBNMOH4.js → chunk-2GE5X2A5.js} +1 -1
- package/dist/{chunk-DJC7NTLA.js → chunk-2L3A5NKZ.js} +1 -1
- package/dist/{chunk-CUXY6KQ2.js → chunk-2N75WO7Y.js} +1 -1
- package/dist/{chunk-CGITGJ3I.js → chunk-2PZKMT3I.js} +1 -1
- package/dist/{chunk-M43WH5DQ.js → chunk-2SY2NCOP.js} +1 -1
- package/dist/{chunk-Q3C6NDGI.js → chunk-32Y6QVFG.js} +1 -1
- package/dist/{chunk-734ORT6O.js → chunk-3OVFKUXV.js} +1 -1
- package/dist/{chunk-IGEAET7M.js → chunk-3T2TYDPT.js} +1 -1
- package/dist/{chunk-TU42YZOJ.js → chunk-3UHPVQLU.js} +1 -1
- package/dist/{chunk-WEIPY3CI.js → chunk-3ZPEQDXZ.js} +1 -1
- package/dist/{chunk-RHGW7B5Q.js → chunk-436FZ4KG.js} +1 -1
- package/dist/{chunk-YQ5C6UDG.js → chunk-4523YDTG.js} +1 -1
- package/dist/{chunk-7SY34IIL.js → chunk-45URQUAK.js} +1 -1
- package/dist/{chunk-VSVWNRI2.js → chunk-4BUEOKFV.js} +1 -1
- package/dist/{chunk-NZ6AV2TA.js → chunk-4JWJH6TB.js} +1 -1
- package/dist/{chunk-YPFQ4UGF.js → chunk-4MNSP4EO.js} +1 -1
- package/dist/{chunk-ZFMRQ57Y.js → chunk-4NUSW4A2.js} +1 -1
- package/dist/{chunk-FSYOTRMC.js → chunk-4R4YUOVY.js} +1 -1
- package/dist/{chunk-FWUPJORV.js → chunk-4SJAOAYY.js} +1 -1
- package/dist/{chunk-SMTBOSEJ.js → chunk-52VCA4K2.js} +1 -1
- package/dist/{chunk-4YW767UV.js → chunk-567D5ZTO.js} +7 -7
- package/dist/{chunk-W4QSZNMB.js → chunk-5IO5ZC4S.js} +1 -1
- package/dist/{chunk-LSDJOVWW.js → chunk-5R3ODQHH.js} +1 -1
- package/dist/{chunk-WXJCJL5L.js → chunk-5T6II7VN.js} +1 -1
- package/dist/{chunk-3YTCKCBG.js → chunk-65BG6GAE.js} +1 -1
- package/dist/{chunk-LAOTVZHV.js → chunk-6DZ7LVOG.js} +1 -1
- package/dist/chunk-6K5BEEAJ.js +2 -0
- package/dist/{chunk-42PALMW2.js → chunk-6TNLITJO.js} +1 -1
- package/dist/{chunk-VXGN3IV7.js → chunk-7C4IEL5V.js} +1 -1
- package/dist/{chunk-PUVMC4PX.js → chunk-7V34ZMMS.js} +1 -1
- package/dist/{chunk-DDZLCAEO.js → chunk-7ZJWUWSN.js} +1 -1
- package/dist/{chunk-ICLUC44J.js → chunk-A3TCFSCK.js} +1 -1
- package/dist/{chunk-F5NHG7VB.js → chunk-A4BB6GLN.js} +1 -1
- package/dist/{chunk-AVSMXDTX.js → chunk-AG5XJWEV.js} +1 -1
- package/dist/{chunk-GQRU3B54.js → chunk-AGXAJ2II.js} +1 -1
- package/dist/{chunk-6UVIY56J.js → chunk-AIGQCMGY.js} +1 -1
- package/dist/{chunk-RX6776AI.js → chunk-AU26ZZTX.js} +1 -1
- package/dist/{chunk-CCP4X75B.js → chunk-AUBSLPJZ.js} +1 -1
- package/dist/{chunk-XQMWHPZI.js → chunk-B2WFW74J.js} +1 -1
- package/dist/{chunk-NXRF7FFS.js → chunk-B7JLM3IX.js} +1 -1
- package/dist/{chunk-LUZBGTYB.js → chunk-BRVIK3BU.js} +1 -1
- package/dist/{chunk-URH4FX3H.js → chunk-BY2B4YJN.js} +1 -1
- package/dist/{chunk-Y7E5L42F.js → chunk-CBVHP7JB.js} +1 -1
- package/dist/{chunk-ZFM77AQU.js → chunk-CJE7PKRV.js} +1 -1
- package/dist/{chunk-2DYHAP4E.js → chunk-CJQUVHHS.js} +1 -1
- package/dist/{chunk-OFSDB7B4.js → chunk-COJINPOK.js} +2 -2
- package/dist/{chunk-JZP3Y4ZM.js → chunk-D6CS62O7.js} +1 -1
- package/dist/{chunk-457Y5TEC.js → chunk-DBTMKBHU.js} +1 -1
- package/dist/{chunk-CM4CHYSN.js → chunk-DHYGCHKB.js} +1 -1
- package/dist/{chunk-DZOYYWOW.js → chunk-DTYT6KBO.js} +1 -1
- package/dist/{chunk-6EB5VRAN.js → chunk-EC5IP5HZ.js} +1 -1
- package/dist/{chunk-35ECWCCK.js → chunk-EH43VWVR.js} +1 -1
- package/dist/{chunk-HQ2E2XCU.js → chunk-ENG2UTMX.js} +1 -1
- package/dist/{chunk-VUFIL5VR.js → chunk-EPJ5SJL2.js} +2 -2
- package/dist/{chunk-YHFZFV3A.js → chunk-EQWMOGLO.js} +9 -9
- package/dist/{chunk-XLEGGC4Y.js → chunk-EVZLINBN.js} +1 -1
- package/dist/{chunk-44B6THYK.js → chunk-EX6ORR7P.js} +1 -1
- package/dist/{chunk-EBPRPNSA.js → chunk-FBQ7PQJV.js} +1 -1
- package/dist/{chunk-AEWNWAXW.js → chunk-FLOQ5NZL.js} +2 -2
- package/dist/{chunk-LCSJ7GOG.js → chunk-FPPVNF53.js} +1 -1
- package/dist/{chunk-F22K3RRX.js → chunk-FPVGA6XT.js} +1 -1
- package/dist/{chunk-IJ2AHSWW.js → chunk-FVYIV36L.js} +1 -1
- package/dist/chunk-FYCD765R.js +161 -0
- package/dist/{chunk-AVI5H4UM.js → chunk-G2KTWFMU.js} +1 -1
- package/dist/{chunk-ACMBMZDQ.js → chunk-G3CYFCSR.js} +1 -1
- package/dist/{chunk-JNSWKGTB.js → chunk-G3J4XY3Z.js} +1 -1
- package/dist/{chunk-KXHJMAZU.js → chunk-GET4DINR.js} +2 -2
- package/dist/{chunk-54XA5MZH.js → chunk-GGS3ATPB.js} +1 -1
- package/dist/{chunk-C2RUDJ46.js → chunk-GGV336P5.js} +1 -1
- package/dist/{chunk-L5DALV5N.js → chunk-GI2JPIX5.js} +1 -1
- package/dist/{chunk-HAW5WEKT.js → chunk-GRO6DLN3.js} +1 -1
- package/dist/{chunk-3RJHXOZH.js → chunk-GXMD23XB.js} +1 -1
- package/dist/chunk-GYDJO32R.js +2 -0
- package/dist/{chunk-W7FLXW6Q.js → chunk-H4KPNGY4.js} +1 -1
- package/dist/{chunk-PAWQ4AKN.js → chunk-HBVHIEPB.js} +1 -1
- package/dist/{chunk-EF47KRUK.js → chunk-HGVM2OZU.js} +1 -1
- package/dist/{chunk-4QFTHUJA.js → chunk-HMQ5M4JJ.js} +1 -1
- package/dist/{chunk-ZTHYAHDN.js → chunk-I2VU2DTS.js} +1 -1
- package/dist/{chunk-7NCJMWFX.js → chunk-J4LQAT5P.js} +1 -1
- package/dist/{chunk-HK62JVQM.js → chunk-JCSVBD4F.js} +1 -1
- package/dist/{chunk-7AET4JKQ.js → chunk-JFBEHCJN.js} +1 -1
- package/dist/{chunk-EECDDDSB.js → chunk-JGLADDRH.js} +1 -1
- package/dist/{chunk-I4WXALQR.js → chunk-JOCEZK2M.js} +1 -1
- package/dist/{chunk-5AKJPYUW.js → chunk-JQ7ZZQXC.js} +3 -3
- package/dist/{chunk-C62QWG4B.js → chunk-JRSEAXFE.js} +1 -1
- package/dist/{chunk-D7U2M26S.js → chunk-JSLKCCD2.js} +1 -1
- package/dist/{chunk-RTVHJ23A.js → chunk-JT6WLJSV.js} +1 -1
- package/dist/{chunk-P3JXJ4BW.js → chunk-JTJ7IPNI.js} +1 -1
- package/dist/{chunk-ZTRRFG52.js → chunk-JX5NVKTV.js} +1 -1
- package/dist/{chunk-QBYENBMB.js → chunk-K2PLULJD.js} +1 -1
- package/dist/{chunk-RF37IJNN.js → chunk-K3OSK6PB.js} +1 -1
- package/dist/{chunk-3GXN6VF6.js → chunk-KDR662D2.js} +1 -1
- package/dist/{chunk-NLZZLANH.js → chunk-KRRZCY7U.js} +1 -1
- package/dist/{chunk-KODJVOCN.js → chunk-LHQUCRCH.js} +1 -1
- package/dist/{chunk-WOSANGV6.js → chunk-LNHBZEDC.js} +1 -1
- package/dist/{chunk-PZA3BSOE.js → chunk-LXM7VHYN.js} +1 -1
- package/dist/{chunk-D7TKE7LK.js → chunk-MHB6DMKZ.js} +1 -1
- package/dist/{chunk-W6HZF56M.js → chunk-MJKRJGER.js} +1 -1
- package/dist/{chunk-V7USCQWO.js → chunk-MKPDF26Q.js} +1 -1
- package/dist/{chunk-VLDCHFXF.js → chunk-MPEIMWQI.js} +1 -1
- package/dist/{chunk-YIKF4ERQ.js → chunk-MW2WNYJO.js} +2 -2
- package/dist/{chunk-MYVKUJGS.js → chunk-N3KTLWJL.js} +1 -1
- package/dist/{chunk-QDXKEOKI.js → chunk-NJCN6LP5.js} +6 -6
- package/dist/{chunk-IUQOG7Z5.js → chunk-NOFJXCYP.js} +1 -1
- package/dist/{chunk-I4RVVBG3.js → chunk-NTXFPNAP.js} +1 -1
- package/dist/{chunk-XZGEN4NU.js → chunk-ONZ2CSTZ.js} +1 -1
- package/dist/{chunk-UYDHOHSZ.js → chunk-OR2B6T3B.js} +1 -1
- package/dist/{chunk-UUJIGOEO.js → chunk-ORNVIEUA.js} +1 -1
- package/dist/{chunk-R7KXAISS.js → chunk-P2LDAW3C.js} +1 -1
- package/dist/{chunk-ECPFI75W.js → chunk-PBWYQR5I.js} +1 -1
- package/dist/{chunk-O3HHTKZ5.js → chunk-PCDIEYV6.js} +1 -1
- package/dist/{chunk-EZN7CF45.js → chunk-PL3SG3M2.js} +1 -1
- package/dist/{chunk-NXAJBSIF.js → chunk-PQXYHI5W.js} +1 -1
- package/dist/{chunk-WAOUE7MP.js → chunk-PTISAIZW.js} +1 -1
- package/dist/{chunk-XZYA7DNH.js → chunk-PVN64537.js} +1 -1
- package/dist/{chunk-NIVFEACM.js → chunk-QECTIQAC.js} +1 -1
- package/dist/chunk-QMOGBKJM.js +2 -0
- package/dist/{chunk-ZU4W2QGM.js → chunk-QQI6N3FO.js} +1 -1
- package/dist/{chunk-7RWP4Y3H.js → chunk-QVP4FSKT.js} +1 -1
- package/dist/{chunk-OCDBTAYS.js → chunk-QWZJ5QDO.js} +2 -2
- package/dist/{chunk-YLXWAY7D.js → chunk-RARD6TC6.js} +1 -1
- package/dist/chunk-RDH3E25Q.js +27 -0
- package/dist/{chunk-AZLNLHUA.js → chunk-RLOJH5O6.js} +1 -1
- package/dist/{chunk-RPRXRKKR.js → chunk-RQKMSNEU.js} +1 -1
- package/dist/{chunk-R4JUKTDO.js → chunk-SB6P5EQH.js} +1 -1
- package/dist/{chunk-TU7TVFBK.js → chunk-SBR6D6GS.js} +1 -1
- package/dist/{chunk-7HMSMAUG.js → chunk-TLOYTGVT.js} +5 -5
- package/dist/{chunk-LUR7JFPP.js → chunk-TZVPDGJD.js} +1 -1
- package/dist/{chunk-D756UWY2.js → chunk-U7NRZBB5.js} +1 -1
- package/dist/{chunk-72RC7JSA.js → chunk-UEPJ26X2.js} +1 -1
- package/dist/chunk-UJLULWSR.js +21 -0
- package/dist/{chunk-LQQNPMOD.js → chunk-ULGBK4NS.js} +1 -1
- package/dist/{chunk-6DZX5HLZ.js → chunk-UNWPBMVM.js} +1 -1
- package/dist/chunk-URAYFJGM.js +87 -0
- package/dist/{chunk-FIP5L6LV.js → chunk-USJ3LUAL.js} +1 -1
- package/dist/chunk-UUWSULIM.js +101 -0
- package/dist/chunk-UX2CDUPE.js +9 -0
- package/dist/{chunk-GXKY5A46.js → chunk-VA3BSIUQ.js} +1 -1
- package/dist/chunk-VQZOKTJ2.js +12 -0
- package/dist/{chunk-36N3EHW5.js → chunk-VVCZRCRD.js} +1 -1
- package/dist/{chunk-HJMCXSUJ.js → chunk-VZA7BPCK.js} +1 -1
- package/dist/{chunk-LIGTP3A3.js → chunk-W3NWHWK2.js} +1 -1
- package/dist/{chunk-E6KSRQXL.js → chunk-WERIGVOH.js} +1 -1
- package/dist/{chunk-ETZMFRD6.js → chunk-WKZLK57W.js} +1 -1
- package/dist/{chunk-3OQW2GTA.js → chunk-WQR2GYP7.js} +1 -1
- package/dist/{chunk-SGPAM5DZ.js → chunk-WX4VGH5Q.js} +1 -1
- package/dist/{chunk-OJ33Q6DU.js → chunk-WZLDFEWR.js} +1 -1
- package/dist/{chunk-ZAFJQ3SM.js → chunk-X3J4CC27.js} +1 -1
- package/dist/chunk-XLQ4F6BI.js +9 -0
- package/dist/{chunk-XRNQSXOM.js → chunk-XMALVGH7.js} +2 -2
- package/dist/{chunk-TW5AA5A7.js → chunk-Y3YULFCK.js} +1 -1
- package/dist/{chunk-7YT4TTKL.js → chunk-YGMQXS2J.js} +1 -1
- package/dist/{chunk-RDP7GWSY.js → chunk-YH4VZVHJ.js} +1 -1
- package/dist/{chunk-YGRULEZY.js → chunk-YI4ESDAX.js} +1 -1
- package/dist/{chunk-YAW6JW6D.js → chunk-YKL5H4K6.js} +1 -1
- package/dist/{chunk-VX657KIK.js → chunk-YKOEABP2.js} +1 -1
- package/dist/{chunk-3E4ZO73O.js → chunk-YYVBE6W2.js} +1 -1
- package/dist/{chunk-MEKPGQAM.js → chunk-Z5BFCTHI.js} +2 -2
- package/dist/{chunk-UEE3RZN4.js → chunk-Z777GGHB.js} +1 -1
- package/dist/{chunk-7NPTL66J.js → chunk-ZGQM6KWN.js} +1 -1
- package/dist/{chunk-QENCC2ZS.js → chunk-ZI3X7DI2.js} +1 -1
- package/dist/{chunk-3F5FMH76.js → chunk-ZKPY3AXW.js} +1 -1
- package/dist/chunk-ZRDX2ARO.js +4 -0
- package/dist/{chunk-MNBGG4H3.js → chunk-ZTAZ2R5Z.js} +1 -1
- package/dist/{chunk-LKQFG4RW.js → chunk-ZY65IZJR.js} +1 -1
- package/dist/{chunk-WZXPF3BI.js → chunk-ZZNQIFFI.js} +1 -1
- package/dist/commands-QOORPTSI.js +2 -0
- package/dist/{committer-JGY66PFM.js → committer-26UZDYSA.js} +1 -1
- package/dist/{config-754B73XK.js → config-B472DZSR.js} +1 -1
- package/dist/{cover-cmd-NBNZCR6C.js → cover-cmd-3VO6QC5Y.js} +1 -1
- package/dist/{credentials-F7DYLVWY.js → credentials-TLT3RQOO.js} +1 -1
- package/dist/{deps-bundle-PW3WEQJ7.js → deps-bundle-CMTIWBS5.js} +1 -1
- package/dist/{deps-resolve-SQYVN76L.js → deps-resolve-XLFZK74A.js} +1 -1
- package/dist/{design-chat-F3OEZPNJ.js → design-chat-I7X3QDDY.js} +1 -1
- package/dist/design-committer-Y7R56RFZ.js +2 -0
- package/dist/design-headless-HUQOXLZB.js +2 -0
- package/dist/{design-remote-2BEGCVCX.js → design-remote-UDC5FP45.js} +2 -2
- package/dist/device-env-MMGISNHN.js +2 -0
- package/dist/dispatch-P2445PUU.js +2 -0
- package/dist/{doctor-XY26Z35T.js → doctor-UHFCIM4B.js} +1 -1
- package/dist/{docx-convert-6IZO5P5K.js → docx-convert-N4KMLLKO.js} +1 -1
- package/dist/{dossier-NROC2MCY.js → dossier-6KMKEIXV.js} +1 -1
- package/dist/evidence-M3JTOJNL.js +2 -0
- package/dist/{evidence-presentation-YYTIDCBS.js → evidence-presentation-DV3DRB4S.js} +1 -1
- package/dist/evolve-cmd-K3JXACMN.js +2 -0
- package/dist/{evolve-remote-WLVY3QID.js → evolve-remote-CUDVV2O2.js} +1 -1
- package/dist/{exit-manager-EDHCETUN.js → exit-manager-EGWAZHCR.js} +1 -1
- package/dist/{explain-cmd-OP5I5W3O.js → explain-cmd-235TY7QX.js} +1 -1
- package/dist/{explain-cmd-VYAANFFZ.js → explain-cmd-R67B4YR3.js} +1 -1
- package/dist/explore-UDD5FHXW.js +2 -0
- package/dist/{explore-context-tty-RZ7D2TBV.js → explore-context-tty-YXEFT32U.js} +1 -1
- package/dist/{explore-entry-EKXJ67BD.js → explore-entry-V6L5FSP4.js} +4 -4
- package/dist/{explore-live-2YVRAQZO.js → explore-live-N5VBLBUI.js} +1 -1
- package/dist/{explore-run-tty-D47FGPX7.js → explore-run-tty-ZZQ33GNA.js} +2 -2
- package/dist/{extract-bind-W2NET364.js → extract-bind-BTINHHE5.js} +3 -3
- package/dist/{extract-chat-M65NWGUK.js → extract-chat-ABZ5S7UU.js} +1 -1
- package/dist/{extract-cmd-FTFLETOP.js → extract-cmd-45OZETCM.js} +2 -2
- package/dist/extract-headless-ALEFAMVS.js +2 -0
- package/dist/{feeder-NY45UFJK.js → feeder-L55TH2NC.js} +1 -1
- package/dist/folder-flags-HTKJCXKB.js +2 -0
- package/dist/{gaps-cmd-OIDDLRYL.js → gaps-cmd-ROGQWK5X.js} +1 -1
- package/dist/{gate-WISOUTHQ.js → gate-QA5J7UZA.js} +1 -1
- package/dist/gate-XFFFX5ZF.js +2 -0
- package/dist/{generate-headless-RURIEKVS.js → generate-headless-DAH3HHRQ.js} +2 -2
- package/dist/hold-passthrough-K5PP26CP.js +2 -0
- package/dist/impact-cmd-3VFJAKYK.js +11 -0
- package/dist/index.js +171 -165
- package/dist/ingest-S5R736ZV.js +2 -0
- package/dist/{ingest-cmd-4G2AK4Y2.js → ingest-cmd-YSEH5EPU.js} +3 -3
- package/dist/ingest-remote-C6AP2Q7E.js +2 -0
- package/dist/install-B26Y2NU4.js +2 -0
- package/dist/{interactive-bind-SI2ZS55Q.js → interactive-bind-P3GTFIZM.js} +4 -4
- package/dist/{interactive-remote-J56EWJGA.js → interactive-remote-PBRQHTAF.js} +2 -2
- package/dist/lane-7IEAE6AC.js +2 -0
- package/dist/lattice-auth-7EL4ET3P.js +2 -0
- package/dist/{lifecycle-cmd-HJ37LTXE.js → lifecycle-cmd-PUNFWKV5.js} +1 -1
- package/dist/{list-cmd-6XL2FYLQ.js → list-cmd-RD7YBF4S.js} +1 -1
- package/dist/list-commands-UZELZAB3.js +2 -0
- package/dist/{list-remote-LXPQNXYN.js → list-remote-KGKXPCQA.js} +1 -1
- package/dist/{locks-cmd-JJ2QNTNY.js → locks-cmd-LXZ6I4QG.js} +1 -1
- package/dist/{logical-ids-RXAQJZ3T.js → logical-ids-D5PFYY4C.js} +1 -1
- package/dist/login-flow-CHLGQGHK.js +2 -0
- package/dist/{maintenance-cmd-BXXHP36K.js → maintenance-cmd-WRWBCP3R.js} +1 -1
- package/dist/{mobile-prompts-CECJ5UY2.js → mobile-prompts-Z7NQHRGP.js} +1 -1
- package/dist/{onboarding-PDVYMTY5.js → onboarding-ZP4XDYEO.js} +1 -1
- package/dist/{open-provider-OZAG6WZS.js → open-provider-U26BBVUE.js} +1 -1
- package/dist/pdf-convert-LMKOKLXT.js +2 -0
- package/dist/{persist-recorded-session-A3ID7JFA.js → persist-recorded-session-4IRYG5CJ.js} +1 -1
- package/dist/phase-seed-2H6OXZXT.js +2 -0
- package/dist/pipeline-U7D25NST.js +2 -0
- package/dist/policy-commands-TY6WOR73.js +8 -0
- package/dist/prepare-target-EVL2QSXA.js +2 -0
- package/dist/{pull-cmd-UPFQYUND.js → pull-cmd-QJQANBAW.js} +1 -1
- package/dist/pull-route-AIOTLA3D.js +2 -0
- package/dist/{readmodel-INMP6MNW.js → readmodel-KXCFPL2M.js} +1 -1
- package/dist/real-device-run-QODMDUXF.js +2 -0
- package/dist/{reconcile-cmd-JBH365JL.js → reconcile-cmd-IJTQAJZX.js} +4 -4
- package/dist/reconcile-deps-2CTIFXDR.js +2 -0
- package/dist/{reconcile-remote-BCX6SWFC.js → reconcile-remote-23D6SXXT.js} +2 -2
- package/dist/{recording-banner-YKBAL6UB.js → recording-banner-MNRMMEX4.js} +1 -1
- package/dist/registry-MZYBLEW2.js +2 -0
- package/dist/remote-entry-DW2J56N4.js +2 -0
- package/dist/remote-mode-AFNCN6EE.js +4 -0
- package/dist/{remote-words-YVB66R3F.js → remote-words-RCNFI2TQ.js} +1 -1
- package/dist/{require-project-folder-MLMEQJYP.js → require-project-folder-7UH43GHI.js} +1 -1
- package/dist/{resolve-run-intent-PC7TQZUL.js → resolve-run-intent-XEWFYMGN.js} +1 -1
- package/dist/{resolver-EID34LQE.js → resolver-QMPX6RBR.js} +1 -1
- package/dist/{revert-FHOBLZWF.js → revert-37346WLE.js} +1 -1
- package/dist/{review-cmd-EUHFLFMY.js → review-cmd-2OECKNL5.js} +1 -1
- package/dist/run-JWOHNWA3.js +2 -0
- package/dist/run-QFJ6ZRVD.js +2 -0
- package/dist/run-remote-66QTUQ2M.js +2 -0
- package/dist/{run-startup-gate-YO66G6LS.js → run-startup-gate-USQFSW47.js} +1 -1
- package/dist/run-test-md-7DRWCSQE.js +19 -0
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-cmd-S7WZBUCN.js → sessions-cmd-LQ2LZQOC.js} +2 -2
- package/dist/{sessions-remote-IWHWIQ2T.js → sessions-remote-H7CQST42.js} +1 -1
- package/dist/{skill-installer-MAVQY6GW.js → skill-installer-LKYY6XFJ.js} +1 -1
- package/dist/{store-MSA7KASS.js → store-KM5MG3XB.js} +1 -1
- package/dist/store-choice-4J2NN6OQ.js +2 -0
- package/dist/store-guard-34GG2TW2.js +2 -0
- package/dist/{store-site-KA2DNBGY.js → store-site-ZSFINU6C.js} +1 -1
- package/dist/stream-warnings-N4KVVWXV.js +2 -0
- package/dist/sync-cmd-3CHSWWWW.js +2 -0
- package/dist/{sync-setup-RBRDUV7Q.js → sync-setup-QQXYO6R4.js} +1 -1
- package/dist/tcg-generate-IPD5FQUW.js +2 -0
- package/dist/{test-definition-VRI4YIYL.js → test-definition-53XNBEDE.js} +1 -1
- package/dist/testmd-actions-V7P7BMKE.js +2 -0
- package/dist/{testmd-sync-UPAA5UMD.js → testmd-sync-PQ4GFKHB.js} +1 -1
- package/dist/tms-client-XWCR7O7J.js +2 -0
- package/dist/token-refresh-LR33BKAB.js +2 -0
- package/dist/{use-case-ref-NE4X4MZN.js → use-case-ref-NA3IXGQW.js} +1 -1
- package/dist/{validate-basic-M5JHHNZA.js → validate-basic-3DX3MMC7.js} +1 -1
- package/dist/verdicts-7GKZEDHV.js +2 -0
- package/dist/{version-check-Q737BE65.js → version-check-OV6AOVED.js} +1 -1
- package/dist/{view-cmd-XSNL5DGI.js → view-cmd-QDKBBNIU.js} +1 -1
- package/dist/{walk-session-SHGYLFRB.js → walk-session-BAYYPIKN.js} +1 -1
- package/dist/with-telemetry-62LW4VFI.js +2 -0
- package/package.json +12 -12
- package/dist/ChatSurface-6NZGMNHL.js +0 -2
- package/dist/EvidenceViewOffer-WIEWCZUP.js +0 -2
- package/dist/FolderPicker-AF7ZMV3M.js +0 -2
- package/dist/InfoBox-D7GGZJU4.js +0 -2
- package/dist/ProjectPicker-OBYHJJLU.js +0 -2
- package/dist/SaveSessionPrompt-7XSHS4NL.js +0 -2
- package/dist/SingleShotApp-XQUDR36R.js +0 -2
- package/dist/TestMdRunView-LS2QUFWR.js +0 -2
- package/dist/TestrunEvidenceTable-HNDVJDIF.js +0 -2
- package/dist/bind-4XWK3DG2.js +0 -2
- package/dist/bootstrap-6ACT4ALI.js +0 -2
- package/dist/chat-committer-ZCSRJEUB.js +0 -2
- package/dist/child-G2GCW73X.js +0 -2
- package/dist/chunk-65VANXOF.js +0 -147
- package/dist/chunk-C6HI6Y3S.js +0 -2
- package/dist/chunk-D36V5OX6.js +0 -2
- package/dist/chunk-HCJ2N3XB.js +0 -12
- package/dist/chunk-NC7D7GOM.js +0 -21
- package/dist/chunk-OGFU4YY4.js +0 -2
- package/dist/chunk-VZ4A6WMK.js +0 -97
- package/dist/chunk-W54OT2FU.js +0 -9
- package/dist/chunk-W72ACCFL.js +0 -27
- package/dist/design-committer-TRYP3LOZ.js +0 -2
- package/dist/design-headless-OTHYOX3E.js +0 -2
- package/dist/device-env-CHFRRV6W.js +0 -2
- package/dist/dispatch-DVQ3H7EJ.js +0 -2
- package/dist/evidence-P6FFKC7B.js +0 -2
- package/dist/evolve-cmd-WWOB3QJR.js +0 -2
- package/dist/explore-K5YBGHK6.js +0 -2
- package/dist/extract-headless-G6W6JQ27.js +0 -2
- package/dist/folder-flags-KKIH654K.js +0 -2
- package/dist/gate-7AKRPRMK.js +0 -2
- package/dist/hold-passthrough-IOWPVB4W.js +0 -2
- package/dist/ingest-PDGS5ZTL.js +0 -2
- package/dist/ingest-remote-SSLUHQVG.js +0 -2
- package/dist/install-ZVBHPXGP.js +0 -2
- package/dist/lane-AQYRIW24.js +0 -2
- package/dist/lattice-auth-6FEVSR7E.js +0 -2
- package/dist/list-commands-5DCCKU3L.js +0 -2
- package/dist/login-flow-WEK3E476.js +0 -2
- package/dist/pdf-convert-447ACUB3.js +0 -2
- package/dist/phase-seed-LCJ4WSYV.js +0 -2
- package/dist/pipeline-GX3LKPI5.js +0 -2
- package/dist/prepare-target-FMT6QFHZ.js +0 -2
- package/dist/pull-route-FWBXJMR7.js +0 -2
- package/dist/real-device-run-X7JJWOIK.js +0 -2
- package/dist/reconcile-deps-TWJ3FTSU.js +0 -2
- package/dist/registry-VQC757MJ.js +0 -2
- package/dist/remote-entry-X6JMPC2K.js +0 -2
- package/dist/remote-mode-FDPA7EWG.js +0 -4
- package/dist/run-5RQUCNYP.js +0 -2
- package/dist/run-PC5YO4AS.js +0 -2
- package/dist/run-remote-SJCRTL7O.js +0 -2
- package/dist/run-test-md-BLNBK4MH.js +0 -17
- package/dist/store-choice-3OJCV26J.js +0 -2
- package/dist/store-guard-OOSDLMEC.js +0 -2
- package/dist/stream-warnings-GEQKKJU7.js +0 -2
- package/dist/sync-cmd-RDFDMVKQ.js +0 -2
- package/dist/tcg-generate-KIECTZ2C.js +0 -2
- package/dist/testmd-actions-CMAG6HWI.js +0 -2
- package/dist/tms-client-NXAB6VJD.js +0 -2
- package/dist/token-refresh-KP3AYMYK.js +0 -2
- package/dist/verdicts-XK3GAUX3.js +0 -2
- package/dist/with-telemetry-PM2HVN2B.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as
|
|
2
|
+
import{b as te}from"./chunk-B2WFW74J.js";import{b as z}from"./chunk-JOCEZK2M.js";import{d as K}from"./chunk-DHYGCHKB.js";import"./chunk-436FZ4KG.js";import{Q as q}from"./chunk-Z5BFCTHI.js";import"./chunk-DTYT6KBO.js";import"./chunk-7C4IEL5V.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{j as X,k as J}from"./chunk-VQZOKTJ2.js";import{a as G}from"./chunk-KRRZCY7U.js";import"./chunk-LNHBZEDC.js";import{a as W,h as R}from"./chunk-QQI6N3FO.js";import{b as H}from"./chunk-77ZZQJLX.js";import"./chunk-73Y6T2UK.js";import{e as $}from"./chunk-ZKPY3AXW.js";import{e as U,i as E}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-6K5BEEAJ.js";import"./chunk-WN5VKKJ3.js";import"./chunk-3G2LSTK5.js";import{a as Q,c as Z,e as ee}from"./chunk-P2ZQDQDB.js";import"./chunk-3BSYOCSW.js";import"./chunk-GRURFGBP.js";import"./chunk-4IEQNX7F.js";import{b as V,c as Y}from"./chunk-ZTAZ2R5Z.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import{c as F}from"./chunk-MPEIMWQI.js";import"./chunk-CJE7PKRV.js";import"./chunk-MYZHOBS4.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import"./chunk-K3OSK6PB.js";import"./chunk-PVN64537.js";import{B as D,Ga as B,Ha as j,f as S,x as L}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import{a as A}from"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import{a as _}from"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-VZ7KXRXB.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-VZA7BPCK.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import{a as I}from"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";import{existsSync as oe}from"fs";import{join as pe,relative as fe}from"path";import{existsSync as ae}from"fs";import{join as se,relative as ce}from"path";var x=4,ne=1e3;async function re(e){let a=e.trace??G("context-pull"),i=await de(e.person,e.projectId);if(i==="no_context")return{kind:"no_tests"};a(i.bulk?"tests read: bulk":"tests read: one by one (this shared project has no bulk read)");let d=i.rows.filter(t=>t.name!==null&&t.trust!=="archived");if(e.useCase!==void 0){let t=await e.person.edges(e.projectId,"verifies"),p=new Map;for(let v of t)p.set(v.src,[...p.get(v.src)??[],v.dst]);let{useCases:C,criterionUseCase:N}=await le({person:e.person,projectId:e.projectId,criteria:[...new Set(d.flatMap(v=>p.get(v.cid)??[]))]}),T=C.get(e.useCase.toLowerCase());if(T===void 0)return{kind:"no_such_use_case",useCase:e.useCase};d=d.filter(v=>(p.get(v.cid)??[]).some(ie=>N.get(ie)===T))}if(d.length===0)return{kind:"no_tests"};let f=new Map,c=new Map,s=new Map,g=(t,p,C)=>{f.set(t,{label:"test",content:C}),c.set(t,p),s.set(p,t)};if(i.bulk)for(let t of i.rows)t.name!==null&&g(t.cid,t.name,t.content);else{let t=await M(d,x,p=>e.person.mainNode(e.projectId,p.cid));for(let[p,C]of d.entries())g(C.cid,C.name,t[p].content)}let k=t=>e.person.mainNode(e.projectId,t).catch(p=>p instanceof _&&p.code==="NOT_FOUND"?null:Promise.reject(p)),r=new Set(Y(V(e.cwd)).keys()),u=d.map(t=>t.cid),m=await te({read:k,nodes:f,nameOf:c,byName:s,next:new Map,tests:u,cwd:e.cwd,...e.overwrite?{overwriteEdited:!0}:{}}),h=new Set(d.map(t=>t.name)),P=t=>{let p=f.get(s.get(t)??"")?.content.title;return typeof p=="string"&&p!==""?p:null},O=t=>ce(e.cwd,t)||t,l=t=>!ae(se(H(t),".internal","meta.json")),w=new Map,n=(t,p,C,N)=>{w.set(t,{test:t,title:P(t),...C!==void 0?{file:O(C)}:{},outcome:p,...N!==void 0?{reason:N}:{},...h.has(t)?{}:{imported:!0},...C!==void 0&&p!=="not_written"&&l(C)?{firstRun:!0}:{}})};for(let t of m.wrote)n(t.id,r.has(t.id)?"updated":"new",t.path);for(let t of m.unchanged??[])n(t.id,"unchanged",t.path);for(let t of m.overwrote??[])n(t.id,"replaced",t.path);for(let t of m.refused)n(t.id,t.kind==="edited"?"kept":"not_written",t.kind==="edited"?t.file:void 0,t.kind==="edited"?void 0:A(t));let b=[...d.map(t=>t.name),...[...w.keys()].filter(t=>!h.has(t))].flatMap(t=>w.has(t)?[w.get(t)]:[]),y=ue(b,s,f,e.cwd,a);return{kind:"pulled",tests:b,...y?{needed:y}:{},read:i.bulk?"bulk":"one_by_one"}}async function de(e,a){try{let i=await e.testsWithContent(a);return i!==null?{bulk:!0,rows:i}:{bulk:!1,rows:await e.nodes(a,"test")}}catch(i){if(i instanceof _&&(i.code==="NO_CONTEXT"||i.code==="NOT_FOUND"))return"no_context";throw i}}async function le(e){let[a,i,d,f,c]=await Promise.all([e.person.nodes(e.projectId,"usecase"),e.person.nodes(e.projectId,"scenario"),e.person.nodes(e.projectId,"ac"),e.person.edges(e.projectId,"scoped_to"),e.person.edges(e.projectId,"belongs_to")]),s=new Map,g=new Map;for(let n of[...a,...i,...d])s.set(n.cid,n.label),n.trust!==null&&g.set(n.cid,n.trust);let k=new Map;for(let n of[...f,...c])k.set(n.src,[...k.get(n.src)??[],{ecid:n.ecid,type:n.type,src:n.src,dst:n.dst,props:n.props}]);let r=new Map,u=async n=>{for(let o=n,b=0;!s.has(o)&&!r.has(o)&&b<ne;b++){let y=await e.person.mainNode(e.projectId,o).catch(t=>t instanceof _&&t.code==="NOT_FOUND"?null:Promise.reject(t));if(y===null){r.set(o,null);return}if(s.set(o,y.label),y.supersededBy===null||(r.set(o,y.supersededBy===""?null:y.supersededBy),y.supersededBy===""))return;o=y.supersededBy}},m=n=>{if(!s.has(n)&&!r.has(n))return null;let o=n;for(let b=0;r.get(o)&&b<ne;b++)o=r.get(o);return{cid:n,tip:o,superseded:o!==n||r.has(o)}};await M(e.criteria,x,u);let h=n=>m(n)?.tip??n;await M([...new Set(e.criteria.flatMap(n=>(k.get(h(n))??[]).filter(o=>o.type==="scoped_to").map(o=>o.dst)))],x,u);let P=new Set(e.criteria.flatMap(n=>(k.get(h(n))??[]).filter(o=>o.type==="scoped_to").map(o=>h(o.dst))).filter(n=>s.get(n)==="scenario"));await M([...new Set([...P].flatMap(n=>(k.get(n)??[]).filter(o=>o.type==="belongs_to").map(o=>o.dst)))],x,u);let O={edgesFrom:n=>k.get(n)??[],resolve:m,superseded:r,trust:g,nodeLabel:s},l=new Map(a.flatMap(n=>n.name!==null?[[n.cid,n.name]]:[])),w=new Map;for(let n of e.criteria){let o=m(n)?.tip,b=o===void 0||r.has(o)?null:F(O,o),y=b===null?void 0:l.get(b);y!==void 0&&w.set(n,y)}return{useCases:new Map([...l.values()].map(n=>[n.toLowerCase(),n])),criterionUseCase:w}}async function M(e,a,i){let d=new Array(e.length),f=0,c=async s=>{try{return await i(s)}catch(g){if(g instanceof _&&g.retryable)return i(s);throw g}};return await Promise.all(Array.from({length:Math.min(a,e.length)},async()=>{for(let s=f++;s<e.length;s=f++)d[s]=await c(e[s])})),d}function ue(e,a,i,d,f){try{let c=Q({cwd:d,tests:e.filter(s=>s.file!==void 0&&s.outcome!=="not_written").map(s=>Z(s.test,i.get(a.get(s.test)??"")?.content??{},se(d,s.file)))});return c.variables.length===0&&c.noStartPage.length===0?void 0:c}catch(c){f(`what the pulled tests need couldn't be read: ${ee(c)}`);return}}var me=async e=>S({url:e,basicAuth:await $()});async function We(e,a=q(),i=process.cwd(),d={}){let f=e.mode==="agent"||e.mode==="ci",c=U("ndjson","sync",{stdout:l=>a.out(l.replace(/\n$/,"")),stderr:l=>(a.err??a.out)(l.replace(/\n$/,""))}),s=(l,w)=>f?(c.event({type:"error",code:l.code,message:l.message,...D(l)}),c.done(w)):(J(l),w),g=pe(i,W),k=oe(g),r=()=>{!k&&oe(g)&&R(i)},u=await(d.entry??K)("context pull",f,void 0,z({project:e.project}));if(u!==null&&"exit"in u)return r(),u.exit;if(u===null)return s(j.pullFlagsLinkedOnly(),2);let{choice:m}=u,h=m.projectName;m.onboarded&&(f?c.event({type:"folder_linked",project_id:m.projectId,project:h}):a.out(X(h).replace(/\n$/,"")));let P;try{let l=await(d.person??me)(m.latticeUrl);P=await(d.files??re)({person:l,projectId:m.projectId,cwd:i,...e.useCase!==void 0?{useCase:e.useCase}:{},...e.overwrite?{overwrite:!0}:{}})}catch(l){return m.onboarded&&R(i),L(l,s(...ge(l,h)))}if(P.kind==="no_such_use_case")return s(j.useCaseUnknown(h,P.useCase),2);if(P.kind==="no_tests"){if(f)return c.done(0,void 0,[{cmd:"kane-cli cover --mode agent",why:"shows which use-cases need tests designed"}]);for(let l of j.noTestsYet(h))a.out(l);return 0}let O=P.tests.some(l=>l.outcome==="not_written")?1:0;if(!f){let l=B(P,{project:h,cwd:i,...e.useCase!==void 0?{useCase:e.useCase}:{}});for(let w of l)a.out(w.startsWith("\u2713 ")?I.green(w):w);return O}return we(c,P,i,e.useCase,O)}function ge(e,a){return e instanceof E?[{code:e.code,message:e.message,...e.remedy?{remedy:e.remedy}:{}},2]:e instanceof _&&e.retryable?[j.noConnection(),2]:e instanceof _&&e.status===401?[j.credentialsRejected(),2]:e instanceof _&&(e.code==="NOT_FOUND"||e.status===403||e.status===404)?[j.noAccess(a),2]:[j.pullFailed(a),1]}function we(e,a,i,d,f){for(let r of a.tests)e.event({type:"pull_test",test:r.test,title:r.title,...r.file!==void 0?{file:r.file}:{},outcome:r.outcome,...r.firstRun?{first_run:!0}:{},...r.imported?{imported:!0}:{},...r.reason!==void 0?{reason:r.reason}:{}});let c=a.needed;if(c&&(c.variables.length>0||c.noStartPage.length>0)){let r=u=>fe(i,u)||u;e.event({type:"variables_needed",file:r(c.file),variables:c.variables.map(u=>({name:u.name,...u.secret?{secret:!0}:{},...u.start_page?{start_page:!0}:{}})),no_start_page:c.noStartPage.map(u=>({test:u.test,...u.file!==void 0?{file:r(u.file)}:{}}))})}let s=a.tests.some(r=>r.outcome!=="not_written"&&r.file!==void 0),g=a.tests.some(r=>r.outcome==="kept"),k=[...s?[{cmd:"kane-cli testrun run --agent",why:"runs the tests in this folder"}]:[],...g?[{cmd:`kane-cli context pull --overwrite${d!==void 0?` --use-case ${d}`:""} --mode agent`,why:"replaces the files you changed with the project's"}]:[]];return e.done(f,void 0,k)}export{We as runProjectPull};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{Ha as n}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";function s(l,e,r){let t=l!==void 0||e.rebase===!0||e.yes===!0||e.answer.length>0,o=e.project!==void 0||e.useCase!==void 0||e.overwrite===!0;if(t&&r.kind==="remote")return n.pullLocationLinked(r.projectName);if(t&&o)return n.pullFlagsMixed();if(t)return"store";let i=r.kind==="local"||r.kind==="pick";return i&&e.project===void 0&&o?n.pullFlagsLinkedOnly():i&&!o?"store":"project"}export{s as pullRoute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{vb as a,wb as b,xb as c,yb as d,zb as e}from"./chunk-
|
|
2
|
+
import{vb as a,wb as b,xb as c,yb as d,zb as e}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{d as evolveStaleCauses,b as graphOver,a as openGraph,c as staleForEvolve,e as supersessionChainOf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as a,c as b,d as c,e as d}from"./chunk-HMQ5M4JJ.js";import"./chunk-4SJAOAYY.js";import"./chunk-5D7ENQTQ.js";import"./chunk-YGMQXS2J.js";import"./chunk-MJKRJGER.js";import"./chunk-Y6Y6RAY4.js";import"./chunk-PQXYHI5W.js";import"./chunk-SXRHKXSE.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-VZA7BPCK.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{a as deviceStreamMode,d as hubSessionLost,c as prepareRealDeviceRun,b as realDeviceCredentials};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as Se}from"./chunk-VUFIL5VR.js";import{d as Qe}from"./chunk-3AGP2BVN.js";import{N as $,O as Le,Q as Ve,S as Be,T as je,U as We,V as fe}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as N}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import"./chunk-XMPTFXPW.js";import{a as de}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{a as he,b as re,c as ve,d as ie,e as nn,f as tn,h as j,i as Re}from"./chunk-47WQBG5I.js";import"./chunk-YDSGXB25.js";import{e as _e,f as on,g as ke,h as $e,i as sn,j as cn,k as an,l as Ee}from"./chunk-OFSDB7B4.js";import{a as we,c as ye,d as rn}from"./chunk-LKQFG4RW.js";import"./chunk-TNORODUF.js";import"./chunk-I6S6DZ2E.js";import"./chunk-W7FLXW6Q.js";import{a as W}from"./chunk-KM3YCIDV.js";import"./chunk-R4JUKTDO.js";import"./chunk-OJ33Q6DU.js";import"./chunk-O3HHTKZ5.js";import{a as Xe,c as en}from"./chunk-LCSJ7GOG.js";import"./chunk-HAW5WEKT.js";import"./chunk-HJLMH7ZM.js";import"./chunk-IZ65ZPWY.js";import"./chunk-73ZFOJOK.js";import"./chunk-EF47KRUK.js";import"./chunk-3GXN6VF6.js";import"./chunk-LD5B3QFW.js";import"./chunk-HD6NR44L.js";import"./chunk-42PALMW2.js";import{a as F,b as qe,c as Je}from"./chunk-JNSWKGTB.js";import{c as ze,h as Ze}from"./chunk-I4RVVBG3.js";import{f as Ke}from"./chunk-UUJIGOEO.js";import{i as me,j as te,k as pe}from"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import{j as Ge,l as ge,n as Ye}from"./chunk-AZLNLHUA.js";import"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-VLDCHFXF.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import{a as Ne}from"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import{b as He}from"./chunk-ZFM77AQU.js";import{b as B}from"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-VJGWVBZR.js";import{Ia as Te,M as Fe,Wa as Z,a as Ce,c as Ue,n as Me,oa as H,vb as U}from"./chunk-UEE3RZN4.js";import{d as Ae}from"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";import{existsSync as le,readFileSync as xn,statSync as In}from"fs";import{basename as G,dirname as fn,resolve as L}from"path";import{isAbsolute as Pn,resolve as bn}from"path";function oe(e,n,t){let r=Fe(e),i=r.heads.get(n);if(typeof i!="string")return{kind:"no-source"};let o=r.mediaOf(i).plugin;if(r.mediaOf(i).format!=="plugin"||o===void 0)return{kind:"not-plugin"};if(o.fetch!==void 0)return{kind:"plugin",plugin:o.id,ref:o.fetch.ref,fetched:!0};let s=null;for(let l of e.recordsSince(null))l.source_head_moves?.[n]===i?s=l.seq:l.source_head_moves?.[n]!==void 0&&(s=null);let c=s===null?null:e.tokenAt(s),p=c===null?null:e.intentOf(c),v=p?.verb==="ingest"?p.args:null;if(v?.source_id!==n||typeof v.label!="string"||v.label==="")return{kind:"no-envelope",plugin:o.id};let d=t!==void 0&&!Pn(v.label)?bn(t,v.label):v.label;return{kind:"plugin",plugin:o.id,ref:d}}var se=e=>Me(e)===null;function ln(e){if(!e||e.stale_refs.length===0)return"\u2014";let n=e.direct_refs??[];return`${e.stale_refs.length} stale${n.length>0?` \xB7 ${n.length} direct`:""}`}function Pe(e,n){let t=[...e.rows.filter(o=>o.kind!=="REMOVE").map(o=>[o.kind,H(o.ref),o.reason,ln(o.impact)]),...e.archive.map(o=>["ARCHIVE",H(o.ref),o.why,ln(o.impact)])],r=Math.max(40,n??100),i=[`reconcile ${e.source_id} \u2014 head ${e.head.status} \xB7 ${t.length} decision${t.length===1?"":"s"}`];return t.length>0&&i.push(...Qe(["kind","ref","why","impact"],t,r,2)),e.changed&&i.push(e.held?`extract ran in override mode; ${e.defaultsTaken??0} default(s) auto-taken; matched-but-changed and new proposals HELD for your verdict (staged \u2014 nothing committed)`:`extract ran in override mode; ${e.defaultsTaken??0} default(s) auto-taken; matched-but-changed proposals auto-committed as edits`),i.push("each row becomes a card below \u2014 verdicts commit as they land"),e.planPath&&i.push(`plan: ${e.planPath}`),i}var gn=new Set(["interactive","agent","ci","override"]);function On(e,n){if(e.mode!==void 0&&!gn.has(e.mode))return{error:`--mode must be interactive | agent | ci | override, got '${e.mode}'`,code:"MODE_USAGE"};let t=e.mode,r="reconcile without a TTY needs an explicit mode \u2014 pass --mode agent|ci|override, or --plan for a preview";return t==="interactive"&&!n?{error:r}:t||(n?"interactive":e.plan?"override":{error:r})}async function un(e){let{makeHeadlessIO:n,agentRefusal:t}=await import("./headless-io-FFM5T6KL.js");return t(n("ndjson","reconcile"),e,"MODE_USAGE")}function Dn(e,n,t,r,i=Ke){if(te(t)){let l=pe(t),g=l?.sourceIdFor(t)??null;if(l===null||g===null)return{error:`--from '${t}' is not a supported remote URL \u2014 supported: ${me.map(m=>m.hint).join("; ")}`};if(r!==void 0&&r!==g)return{error:`--source-id '${r}' does not match this URL's own identity '${g}' \u2014 re-run without --source-id. A source adopted with --as updates by re-running context ingest with the same --as; reconcile follows only the URL's own id`};let h=U(e);if(!h.heads.has(g))return{error:`unknown source '${g}' \u2014 see \`kane-cli context list --type source\`. If this URL was ingested under a custom id, update it by re-running context ingest with the same --as`};if(h.heads.get(g)==null)return{error:`source '${g}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let k=xe(e,g,{remoteUrl:t});return k!==null?{error:k}:{sourceId:g,remoteUrl:t}}if(r===void 0)return{error:"reconcile needs --from <file> AND --source-id <id> \u2014 see `kane-cli context list --type source` for ids"};let o=L(n,t);if(!le(o)||!In(o).isFile())return{error:`--from '${t}' is not a file \u2014 pass the changed source document`};let s=i.route(o,F);if(s!==null)return mn(e,r,s.plugin,o);let c=Ge(o);if(!c.ok)return{error:`--from '${t}' is not an ingestable document \u2014 allowed: ${c.allowlist.join(", ")}`};let p=U(e);if(!p.heads.has(r))return{error:`unknown source '${r}' \u2014 see \`kane-cli context list --type source\``};if(p.heads.get(r)==null)return{error:`source '${r}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let v=xe(e,r,{filePath:o});if(v!==null)return{error:v};let d=null;try{d=Ye(o)}catch{}return d!==null&&d!==r&&p.heads.get(d)!=null?{error:`'${G(o)}' already backs live source '${d}' \u2014 did you mean --source-id ${d}? To truly move these bytes under '${r}', retire '${d}' first`}:{sourceId:r,filePath:o}}function mn(e,n,t,r){let i=U(e);if(!i.heads.has(n))return{error:`unknown source '${n}' \u2014 see \`kane-cli context list --type source\``};let o=i.heads.get(n);if(o==null)return{error:`source '${n}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let s=ge(n,hn(i.mediaOf(o)),t.manifest.id,!1);if(s!==void 0)return{error:s};let c=N(e);for(let[p,v]of i.heads){if(p===n||v==null||i.mediaOf(v).format!=="plugin")continue;let d=oe(c,p,fn(e));if(d.kind==="plugin"&&d.ref===r)return{error:`'${se(r)?r:G(r)}' already backs live source '${p}' \u2014 did you mean --source-id ${p}? To truly move these bytes under '${n}', retire '${p}' first`}}return{sourceId:n,pluginRef:{plugin:t.manifest.id,ref:r}}}function Cn(e,n,t){let r=oe(N(e),n,fn(e));if(r.kind!=="plugin"&&r.kind!=="no-envelope")return{error:pn};let i=vn(t,n,r.plugin);if(i!==null)return{error:i};let o=`kane-cli maintain reconcile --from <file> --source-id ${n}`;if(r.kind==="no-envelope")return{error:`this machine holds no record of the file source '${n}' was read from \u2014 the store was cloned or pulled, or a revert moved its head; pass the file: ${o} [SOURCE_ORIGIN_UNKNOWN]`};if(r.fetched){let s=t.route(r.ref,F);return s===null||s.plugin.manifest.id!==r.plugin?{error:`source '${n}' was read by plugin ${r.plugin} from '${r.ref}', which this build routes to ${s===null?"no plugin":`plugin ${s.plugin.manifest.id}`} \u2014 reconcile it with a build whose plugin ${r.plugin} claims that reference [SOURCE_REF_UNROUTED]`}:{sourceId:n,pluginRef:{plugin:r.plugin,ref:r.ref}}}return F(r.ref)?{sourceId:n,pluginRef:{plugin:r.plugin,ref:r.ref}}:{error:`source '${n}' was last read from '${r.ref}', which is not there \u2014 pass its new place: ${o} [SOURCE_FILE_MISSING]`}}async function Un(e,n,t,r){if(te(n)||!se(n))return null;let i=r.route(n,F);if(i===null)return null;let o=i.plugin,s=o.manifest.id,c;try{c=await Je(o,"claim",Ae.hookMs,()=>o.claim({ref:i.ref,named:i.named,isFile:!1}))}catch(v){return{error:v instanceof Error?v.message:String(v)}}let p=c?.sourceId;return c==null?{error:`plugin ${s} does not read '${n}' \u2014 pass a reference it claims [PLUGIN_NOT_CLAIMED]`}:qe(p)?t!==void 0&&t!==p?{error:`--source-id '${t}' does not match the source plugin ${s} reads '${n}' as, '${p}' \u2014 re-run without --source-id`}:mn(e,p,o,n):{error:`plugin ${s} claimed '${n}' as ${JSON.stringify(p)}, which is not an id a source may have [PLUGIN_SOURCE_ID_INVALID]`}}var pn="reconcile needs --from <file|url> AND --source-id <id> (files only \u2014 a URL derives its own id) \u2014 see `kane-cli context list --type source` for ids";function An(e,n){let t=de(e);if(!le(t))return!1;let r=oe(N(t),n);return r.kind==="plugin"||r.kind==="no-envelope"}function hn(e){return e.format==="plugin"?e.plugin?.id??"":null}function vn(e,n,t){return e.byId(t)!==void 0?null:`PLUGIN_MISSING: source '${n}' is read by the plugin ${t}, which this build does not include \u2014 reconcile it with a build that has the ${t} plugin`}function M(e){return e==null?"(none)":e.slice(0,19)}function ne(e,n,t,r=!1,i){if(e.out(`reconcile ${n.source_id}: head ${n.head.status} \u2014 ${M(n.head.before)} \u2192 ${M(n.head.after)}`),r||(e.out(`note: ${n.note}`),e.out(`skipped arms: ${n.skipped_arms}`)),n.changed&&(e.out(n.held?`extract ran in override mode; ${t?.defaultsTaken??0} default(s) auto-taken; matched-but-changed and new proposals HELD for your verdict (staged \u2014 nothing committed)`:`extract ran in override mode; ${t?.defaultsTaken??0} default(s) auto-taken; matched-but-changed proposals auto-committed as edits`),i?.({type:"defaults_taken",count:t?.defaultsTaken??0})),r){let o=n.changeset??[],s=(p,v)=>{let d=o.filter(l=>l.kind===p).length;return d>0?`${d} ${v}`:null},c=[s("ADD","add"),s("MODIFY","modify"),s("ARCHIVE","archive")].filter(Boolean);n.changed&&e.out(`changeset: ${o.length} item(s)${c.length?` \u2014 ${c.join(" \xB7 ")}`:""}`),e.out(`plan: ${n.rows.length} row(s) \u2014 each gets a card below`);return}if(n.changed){let o=n.changeset??[];e.out(`changeset: ${o.length} item(s)`);for(let s of o)if(s.kind==="MODIFY")e.out(` [MODIFY] ${H(s.ref)} \u2014 ${s.summary} (${M(s.old_cid)} \u2192 ${s.new_cid===null?"(staged)":M(s.new_cid)})`);else if(s.kind==="ADD")e.out(` [ADD] ${H(s.ref)}`);else{e.out(` [ARCHIVE] ${H(s.ref)} \u2014 ${s.why}`);let c=be(s.impact,"retiring drops");c&&e.out(` ${c}`)}}e.out(`plan: ${n.rows.length} row(s)`);for(let o of n.rows){e.out(` [${o.kind}] ${H(o.ref)} \u2014 ${o.reason}`);let s=be(o.impact,"approving marks");s&&e.out(` ${s}`),e.out(` provenance: ${o.provenance}`),e.out(` action: ${o.action}`)}}function Rn(e,n){return Pe({source_id:e.source_id,head:{status:e.head.status},rows:e.rows,archive:(e.changeset??[]).filter(t=>t.kind==="ARCHIVE"),changed:e.changed,held:!!e.held,defaultsTaken:n?.defaultsTaken},process.stdout.columns)}function be(e,n){if(!e||e.stale_refs.length===0)return null;let t=e.direct_refs??[];return`impact: ${n} ${e.stale_refs.length} item(s) stale`+(t.length>0?` \u2014 ${t.length} directly touched: ${t.join(", ")}`:"")}function A(e){return e==="interactive"?"override":e}async function Y(e,n,t,r,i,o,s=[],c="override",p,v,d,l,g,h,k){let{dir:m}=e,b;try{b=Re(m)}catch(f){return $(r,f instanceof Error?f.message:String(f)),1}try{if(!t){let{runWalkSession:f}=await import("./walk-session-SHGYLFRB.js"),{telemetryEnvName:R}=await import("./bootstrap-6ACT4ALI.js");return await f({credentials:B,onIngestRefusal:W,dir:m,rows:n,archive:s,held:p??null,childMode:c,runDesign:l??null,mark:o,markA:d,...v?{archiveState:v}:{},...h?{meta:{verb:"reconcile",sid:h,env:R()}}:{},...k?{resumeCmd:k}:{},signals:E=>T(m,E.ref,E.verdict,E.reason),...g?{script:g}:{}})}return await Hn(e,n,t,r,i,o,s,c,p,v)}finally{b()}}var K=(e,n,t=!1)=>t?`kane-cli maintain reconcile --source-id ${n}`:e?`kane-cli maintain reconcile --from ${e} --source-id ${n}`:void 0,Mn=e=>e===null?void 0:"filePath"in e?e.filePath:"remoteUrl"in e?e.remoteUrl:e.pluginRef.ref,q=e=>`${e} high-risk item(s) need a human \u2014 ci mode won't guess. Walk interactively or use --mode agent.`;function J(e,n,t){let r=n.rows;e({type:"reconcile_plan",source_id:n.source_id,plan_path:t,rows:r.map(i=>({kind:i.kind,ref:i.ref,why:i.reason})),archive:n.changeset.filter(i=>i.kind==="ARCHIVE").map(i=>({ref:i.ref,why:i.why}))})}function ce(e={}){return{type:"reconcile_summary",applied:0,skipped:0,deferred:0,plan_only:0,failed:0,paused:0,stale_created:0,...e}}var X=ce();async function ee(e,n,t,r,i,o,s,c,p){let{dir:v}=e;J(i,n,t);let d=n.changeset.filter(h=>h.kind==="ARCHIVE"&&p?.[h.ref]===void 0),l=n.rows;if(s==="ci"&&d.length>0)return i({type:"error",message:q(d.length),code:"HIGH_RISK_CI"}),i(ce()),2;let g;try{g=Re(v)}catch(h){return i({type:"error",message:h instanceof Error?h.message:String(h)}),i(ce()),2}try{return await Fn(e,n,t,r,i,o,s,l,d,c)}finally{g()}}async function Fn(e,n,t,r,i,o,s,c,p,v){let{dir:d,store:l}=e,g=0,h=0,k=0,m=0,b=0,f=0,R=0,E=new Set,I=(a,y)=>{try{v?.(a,y)}catch{}};for(let[a,y]of c.entries()){i({type:"reconcile_row_start",kind:y.kind,ref:y.ref,...y.impact?{stale:y.impact.stale_refs.length,direct:y.impact.direct_refs?.length??0}:{}});let w=(u,x,_)=>i({type:"reconcile_row_end",kind:y.kind,ref:y.ref,outcome:u,...x!==void 0?{exit_code:x}:{},..._?{detail:_}:{}});if(y.applied){h++,w("skipped");continue}if(y.kind==="REMOVE"){b++,w("plan-only");continue}if(y.held_ref&&n.held){let u=new Set;if(y.kind==="MODIFY"&&y.impact){let _=U(d);for(let P of y.impact.stale_refs){let C=_.resolve(P);C&&_.stale(C.tip)==="fresh"&&u.add(P)}}let x=ke(l,n.held,y.held_ref,Oe);if(!x.ok){k++,R===0&&(R=1),w("failed",1,x.message);continue}if(x.kind==="ADD"){let _=await r(x.ref,{yes:!0,mode:s});if(_!==0){_===3?(m++,R===0&&(R=3),w("paused",3)):(k++,R===0&&(R=1),w("failed",_));continue}}g++,x.kind!=="ADD"&&y.impact&&(f+=u.size),I(a,"approved"),T(d,y.ref,x.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve"),w("applied");continue}let O=we(U(d),y.ref);if(!O.ok){h++,w("skipped");continue}let S=O.target;if(E.has(S.ucTip)){h++,w("skipped");continue}if(y.kind==="ADD"){let u=await r(S.seamRef,{yes:!0,mode:s});if(u===3){m++,R===0&&(R=3),w("paused",3);continue}if(u!==0){k++,R===0&&(R=1),w("failed",u);continue}E.add(S.ucTip),g++,I(a,"approved"),T(d,y.ref,"gap-resolved-create"),w("applied")}else{let u=await ye(l,S,{yes:!0,mode:s},o,r,"batch");u.outcome==="evolved"?(E.add(S.ucTip),g++,I(a,"approved"),T(d,y.ref,"gap-resolved-evolve"),w("applied")):u.outcome==="paused"?(m++,R===0&&(R=u.code),w("paused",u.code)):u.outcome==="failed"?(k++,R===0&&(R=1),w("failed",u.code)):(h++,u.outcome==="unchanged"&&(E.add(S.ucTip),I(a,"skipped")),w("skipped",void 0,u.outcome==="unchanged"?"unchanged \u2014 the design agent found nothing to change":void 0))}}return p.length>0&&s!=="agent"&&(i({type:"reconcile_held",source_id:n.source_id,plan_path:t,held:p.map(a=>({ref:a.ref,why:a.why}))}),b+=p.length),p.length>0&&s==="agent"&&(i({type:"reconcile_paused",plan_path:t,pending:p.map(a=>({ref:a.ref,why:a.why}))}),m+=p.length,R===0&&(R=3)),i(ce({applied:g,skipped:h,plan_only:b,failed:k,paused:m,stale_created:f})),R}var Oe={kind:"human",id:process.env.USER??"operator"};function T(e,n,t,r){Ne(e,Tn(n,t,r))}function Tn(e,n,t){return{ts:new Date().toISOString(),command:"reconcile-walk",id:e,verdict:n,polarity:"preference",by:Oe,target:e,...t!==void 0?{reason:t}:{}}}async function Hn(e,n,t,r,i,o,s=[],c="override",p,v){let{dir:d,store:l}=e,g=0,h=0,k=0,m=0,b=0,f=0,R=0,E=new Set;for(let[I,a]of n.entries()){if(a.applied){r.out(`skipped ${a.ref} \u2014 already applied (${a.applied.outcome} at ${a.applied.at})`),h++;continue}let y=u=>{try{o?.(I,u)}catch(x){$(r,`could not record applied state for ${a.ref}: ${x instanceof Error?x.message:String(x)}`)}};if(a.kind==="REMOVE"){r.out(`REMOVE ${a.ref} \u2014 plan-only in this release (not executed)`),m++;continue}if(a.held_ref&&p){let u=ke(l,p,a.held_ref,Oe);if(!u.ok){$(r,`held ${a.ref}: ${u.message}`),b++,R===0&&(R=1);continue}if(r.out(`committed ${u.ref} (${a.kind==="ADD"?"minted":"updated \u2014 old\u2192new redirect"})`),u.kind==="ADD"){let x=await i(u.ref,{yes:t,mode:c});if(x===3){r.out(`design session for ${u.ref} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above`),f++,R===0&&(R=3),y("approved");continue}if(x!==0){$(r,`design run for ${u.ref} ended with exit code ${x}`),b++,R===0&&(R=1),y("approved");continue}}g++,y("approved"),T(d,a.ref,a.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve");continue}let w=U(d),O=we(w,a.ref);if(!O.ok){r.out(`skipped ${a.ref} \u2014 ${O.message}`),h++;continue}let S=O.target;if(E.has(S.ucTip)){r.out(`skipped ${a.ref} \u2014 use-case ${S.display} already handled in this walk`),h++;continue}if(a.kind==="ADD"){let u=await i(S.seamRef,{yes:t,mode:c});if(u===3){r.out(`design session for ${S.display} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above; this row lands when that session completes`),f++,R===0&&(R=3);continue}if(u!==0){$(r,`design run for ${S.display} ended with exit code ${u}`),b++,R===0&&(R=1);continue}E.add(S.ucTip),g++,y("approved"),T(d,a.ref,"gap-resolved-create")}else{let u=await ye(l,S,{yes:!0,mode:c},r,i,"batch");u.outcome==="evolved"?(E.add(S.ucTip),g++,y("approved"),T(d,a.ref,"gap-resolved-evolve")):u.outcome==="paused"?(f++,R===0&&(R=u.code)):u.outcome==="failed"?(b++,R===0&&(R=u.code)):(h++,u.outcome==="unchanged"&&(E.add(S.ucTip),y("skipped")))}}for(let I of s)if(I.kind==="ARCHIVE"&&v?.[I.ref]===void 0){r.out(`[ARCHIVE] ${I.ref} \u2014 ${I.why}`);{let a=be(I.impact,"retiring drops");a&&r.out(` ${a}`)}r.out(" plan-only \u2014 retire belongs to the interactive session (never headless)"),m++}return r.out(`reconcile walk: ${g} applied, ${h} skipped, ${k} deferred, ${m} plan-only`+(b>0?`, ${b} failed`:"")+(f>0?`, ${f} paused`:"")),R}var Nn=new Set(me.map(e=>e.name));function xe(e,n,t){let r=U(e),i=r.heads.get(n);if(i==null)return null;let o=r.mediaOf(i);if("pluginRef"in t)return ge(n,hn(o),t.pluginRef.plugin,!1)??null;if("remoteUrl"in t){let s=pe(t.remoteUrl)?.name??"remote";return o.format!==s?`source '${n}' is backed by ${o.format} content, not a ${s} source \u2014 reconcile it with the --from it was originally ingested from`:null}return Nn.has(o.format)?`source '${n}' is a remote ${o.format} source \u2014 pass its URL to --from, not a file`:null}function De(e,n,t,r){let{store:i}=e;if("pluginRef"in n){let o=V(r).byId(n.pluginRef.plugin);if(o===void 0)throw new Error(`the plugin ${n.pluginRef.plugin} is not loaded`);let s=V(r).route(n.pluginRef.ref,F),c=s!==null&&s.plugin===o?s:{ref:n.pluginRef.ref,named:!1};return cn(i,o,c.ref,{connect:r.connections??ze,named:c.named,registry:V(r)})}return"remoteUrl"in n?an(i,n.remoteUrl,{out:t.out,err:t.err},B,r.remoteFindProvider):sn(i,n.filePath)}var V=e=>e.plugins??Ze();function wn(e){return"pluginRef"in e?{plugin_ref:e.pluginRef}:"remoteUrl"in e?{remote_url:e.remoteUrl}:{backing_path:e.filePath}}function yn(e,n,t,r){let i=xe(e,n.source_id,t);return i!==null?`stored plan cannot replay: ${i}`:"pluginRef"in t?vn(V(r),n.source_id,t.pluginRef.plugin):null}function _n(e){return e.plugin_ref!==void 0?{pluginRef:e.plugin_ref}:e.remote_url!==void 0?{remoteUrl:e.remote_url}:e.backing_path!==void 0?{filePath:e.backing_path}:null}var ae=Symbol("owned");async function Ie(e,n,t,r,i,o=!1,s=!1,c=!1){let{store:p}=e,v=i.seams??{reingest:De(e,t,r,i),reextract:Ee(p,{credentials:B,onIngestRefusal:W,stage:o,hostOut:h=>r.out(h),hostEmit:h=>{h.type!=="run_start"&&i.emitEvent?.(h)},...i.emitEvent?{}:{hostProgress:h=>process.stderr.write(h+`
|
|
3
|
-
`)}})},d=null,l={reingest:v.reingest,reextract:async h=>d=await v.reextract(h)},g;try{r.out(`reconciling ${n}: re-reading the source and comparing against the graph\u2026`),g=await(i.buildPlan??$e)(p,n,l,c?{reextractUnchanged:!0}:{})}catch(h){return h instanceof Error&&h.message.startsWith("SOURCE_ID_OWNED: ")?($(r,h.message),ae):($(r,`reconcile failed: ${h instanceof Error?h.message:String(h)}`),null)}if(g.changed)if(s)for(let h of Rn(g,d))r.out(h);else ne(r,g,d,!1,i.emitEvent);return g}function kn(e,n){if(n.plugin_ref===void 0||n.held===void 0)return null;let t=U(e).heads.get(n.source_id);if(typeof t!="string")return null;let r=n.held.staged_source_cid,i=null;if(r===void 0||t!==r)i={cid:t,where:"the source is now"};else if(F(n.plugin_ref.ref)){let o=xn(n.plugin_ref.ref),s=Ce("source",Ue(n.source_id,He(o)));s!==t&&(i={cid:s,where:`${G(n.plugin_ref.ref)} now holds`})}return i===null?null:`PLUGIN_VERSION_MOVED: plan ${n.created} was built for ${n.source_id} @${M(r??null)}, ${i.where} @${M(i.cid)} \u2014 its held rows are not carried across a version move; run kane-cli maintain reconcile --source-id ${n.source_id} again`}var $n=Symbol("set-aside");async function Ln(e){let n=N(e),[{render:t},r,{ScrollbackProvider:i},{ChatSurface:o},{makeChatController:s},{makeReconcileDeps:c}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./scrollback-GGNBDFQV.js"),import("./ChatSurface-
|
|
4
|
-
`)}})},m;try{m=await(r.buildPlan??$e)(p,n.source_id,k,{resumeHeld:l})}catch(w){return $(t,`reconcile failed: ${w instanceof Error?w.message:String(w)}`),1}if(i==="interactive"&&!s)for(let w of Rn(m,null))t.out(w);else ne(t,m,null,!1,r.emitEvent);let b=Z(c),f=null;if(b!=null){let w={},O=new Set(m.changeset.filter(S=>S.kind==="ARCHIVE").map(S=>S.ref));for(let[S,u]of Object.entries(n.archive_state??{}))O.has(S)&&(w[S]=u);f=he(c,{version:2,source_id:m.source_id,...wn(g),head_pin:b,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:m.skipped_arms,note:m.note,changeset:m.changeset,rows:m.rows,...m.held?{held:m.held}:{},...Object.keys(w).length>0?{archive_state:w}:{}}),t.out(`plan stored: ${f}`)}if(s){if(i==="agent"||t.machine){let w=r.emitEvent??(()=>{});J(w,m,f),w({...X})}return 0}let R=r.emitEvent??(()=>{}),E=f?re(c,f).plan.archive_state:void 0,I=f?(w,O)=>j(f,w,O):void 0,a=f?(w,O)=>ie(f,w,O):void 0;if(i==="agent"||t.machine)return ee(e,m,f,o,R,t,A(i),I,E);let y=m.changeset.filter(w=>w.kind==="ARCHIVE"&&E?.[w.ref]===void 0);return i==="ci"&&y.length>0?($(t,q(y.length)),2):Y(e,m.rows,i==="override"||i==="ci",t,o,I,m.changeset,A(i),m.held,E,a,v,d,m.source_id,K(n.backing_path??n.remote_url,m.source_id,n.plugin_ref!==void 0))}async function dn(e,n,t={},r=process.cwd()){let{telemetryBootstrap:i,telemetryEnvName:o}=await import("./bootstrap-
|
|
5
|
-
`),2}if(!t&&r===process.cwd()){let{remoteEntry:o}=await import("./remote-entry-
|
|
2
|
+
import{b as Se}from"./chunk-EPJ5SJL2.js";import{d as Qe}from"./chunk-3AGP2BVN.js";import{N as $,O as Le,Q as Ve,S as Be,T as je,U as We,V as fe}from"./chunk-Z5BFCTHI.js";import"./chunk-DTYT6KBO.js";import"./chunk-7C4IEL5V.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as N}from"./chunk-P2LDAW3C.js";import"./chunk-WMGKUERB.js";import"./chunk-LNHBZEDC.js";import{a as de}from"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{a as he,b as re,c as ve,d as ie,e as nn,f as tn,h as j,i as Re}from"./chunk-47WQBG5I.js";import{e as _e,f as on,g as ke,h as $e,i as sn,j as cn,k as an,l as Ee}from"./chunk-COJINPOK.js";import{a as W}from"./chunk-KM3YCIDV.js";import"./chunk-YDSGXB25.js";import{a as we,c as ye,d as rn}from"./chunk-ZY65IZJR.js";import"./chunk-H4KPNGY4.js";import"./chunk-PCDIEYV6.js";import"./chunk-2B75UL7Y.js";import"./chunk-I6S6DZ2E.js";import{a as Xe,c as en}from"./chunk-FPPVNF53.js";import"./chunk-GRO6DLN3.js";import"./chunk-HJLMH7ZM.js";import"./chunk-IZ65ZPWY.js";import"./chunk-SB6P5EQH.js";import"./chunk-WZLDFEWR.js";import"./chunk-HD6NR44L.js";import"./chunk-73ZFOJOK.js";import"./chunk-HGVM2OZU.js";import"./chunk-KDR662D2.js";import"./chunk-LD5B3QFW.js";import{a as F,b as qe,c as Je}from"./chunk-G3J4XY3Z.js";import"./chunk-6TNLITJO.js";import{c as ze,h as Ze}from"./chunk-NTXFPNAP.js";import{f as Ke}from"./chunk-ORNVIEUA.js";import{i as me,j as te,k as pe}from"./chunk-I2VU2DTS.js";import"./chunk-DPGOAFKF.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import{j as Ge,l as ge,n as Ye}from"./chunk-RLOJH5O6.js";import"./chunk-AQ2OG2EF.js";import"./chunk-ZTAZ2R5Z.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-MPEIMWQI.js";import"./chunk-PL3SG3M2.js";import"./chunk-2GE5X2A5.js";import{a as Ne}from"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import{b as He}from"./chunk-CJE7PKRV.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import{b as B}from"./chunk-K3OSK6PB.js";import"./chunk-PVN64537.js";import"./chunk-VJGWVBZR.js";import"./chunk-6PIIUAZF.js";import{Ia as Te,M as Fe,Wa as Z,a as Ce,c as Ue,n as Me,oa as H,vb as U}from"./chunk-Z777GGHB.js";import{d as Ae}from"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-VZ7KXRXB.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-VZA7BPCK.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";import{existsSync as le,readFileSync as xn,statSync as In}from"fs";import{basename as G,dirname as fn,resolve as L}from"path";import{isAbsolute as Pn,resolve as bn}from"path";function oe(e,n,t){let r=Fe(e),i=r.heads.get(n);if(typeof i!="string")return{kind:"no-source"};let o=r.mediaOf(i).plugin;if(r.mediaOf(i).format!=="plugin"||o===void 0)return{kind:"not-plugin"};if(o.fetch!==void 0)return{kind:"plugin",plugin:o.id,ref:o.fetch.ref,fetched:!0};let s=null;for(let l of e.recordsSince(null))l.source_head_moves?.[n]===i?s=l.seq:l.source_head_moves?.[n]!==void 0&&(s=null);let c=s===null?null:e.tokenAt(s),p=c===null?null:e.intentOf(c),v=p?.verb==="ingest"?p.args:null;if(v?.source_id!==n||typeof v.label!="string"||v.label==="")return{kind:"no-envelope",plugin:o.id};let d=t!==void 0&&!Pn(v.label)?bn(t,v.label):v.label;return{kind:"plugin",plugin:o.id,ref:d}}var se=e=>Me(e)===null;function ln(e){if(!e||e.stale_refs.length===0)return"\u2014";let n=e.direct_refs??[];return`${e.stale_refs.length} stale${n.length>0?` \xB7 ${n.length} direct`:""}`}function Pe(e,n){let t=[...e.rows.filter(o=>o.kind!=="REMOVE").map(o=>[o.kind,H(o.ref),o.reason,ln(o.impact)]),...e.archive.map(o=>["ARCHIVE",H(o.ref),o.why,ln(o.impact)])],r=Math.max(40,n??100),i=[`reconcile ${e.source_id} \u2014 head ${e.head.status} \xB7 ${t.length} decision${t.length===1?"":"s"}`];return t.length>0&&i.push(...Qe(["kind","ref","why","impact"],t,r,2)),e.changed&&i.push(e.held?`extract ran in override mode; ${e.defaultsTaken??0} default(s) auto-taken; matched-but-changed and new proposals HELD for your verdict (staged \u2014 nothing committed)`:`extract ran in override mode; ${e.defaultsTaken??0} default(s) auto-taken; matched-but-changed proposals auto-committed as edits`),i.push("each row becomes a card below \u2014 verdicts commit as they land"),e.planPath&&i.push(`plan: ${e.planPath}`),i}var gn=new Set(["interactive","agent","ci","override"]);function On(e,n){if(e.mode!==void 0&&!gn.has(e.mode))return{error:`--mode must be interactive | agent | ci | override, got '${e.mode}'`,code:"MODE_USAGE"};let t=e.mode,r="reconcile without a TTY needs an explicit mode \u2014 pass --mode agent|ci|override, or --plan for a preview";return t==="interactive"&&!n?{error:r}:t||(n?"interactive":e.plan?"override":{error:r})}async function un(e){let{makeHeadlessIO:n,agentRefusal:t}=await import("./headless-io-FFM5T6KL.js");return t(n("ndjson","reconcile"),e,"MODE_USAGE")}function Dn(e,n,t,r,i=Ke){if(te(t)){let l=pe(t),g=l?.sourceIdFor(t)??null;if(l===null||g===null)return{error:`--from '${t}' is not a supported remote URL \u2014 supported: ${me.map(m=>m.hint).join("; ")}`};if(r!==void 0&&r!==g)return{error:`--source-id '${r}' does not match this URL's own identity '${g}' \u2014 re-run without --source-id. A source adopted with --as updates by re-running context ingest with the same --as; reconcile follows only the URL's own id`};let h=U(e);if(!h.heads.has(g))return{error:`unknown source '${g}' \u2014 see \`kane-cli context list --type source\`. If this URL was ingested under a custom id, update it by re-running context ingest with the same --as`};if(h.heads.get(g)==null)return{error:`source '${g}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let k=xe(e,g,{remoteUrl:t});return k!==null?{error:k}:{sourceId:g,remoteUrl:t}}if(r===void 0)return{error:"reconcile needs --from <file> AND --source-id <id> \u2014 see `kane-cli context list --type source` for ids"};let o=L(n,t);if(!le(o)||!In(o).isFile())return{error:`--from '${t}' is not a file \u2014 pass the changed source document`};let s=i.route(o,F);if(s!==null)return mn(e,r,s.plugin,o);let c=Ge(o);if(!c.ok)return{error:`--from '${t}' is not an ingestable document \u2014 allowed: ${c.allowlist.join(", ")}`};let p=U(e);if(!p.heads.has(r))return{error:`unknown source '${r}' \u2014 see \`kane-cli context list --type source\``};if(p.heads.get(r)==null)return{error:`source '${r}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let v=xe(e,r,{filePath:o});if(v!==null)return{error:v};let d=null;try{d=Ye(o)}catch{}return d!==null&&d!==r&&p.heads.get(d)!=null?{error:`'${G(o)}' already backs live source '${d}' \u2014 did you mean --source-id ${d}? To truly move these bytes under '${r}', retire '${d}' first`}:{sourceId:r,filePath:o}}function mn(e,n,t,r){let i=U(e);if(!i.heads.has(n))return{error:`unknown source '${n}' \u2014 see \`kane-cli context list --type source\``};let o=i.heads.get(n);if(o==null)return{error:`source '${n}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let s=ge(n,hn(i.mediaOf(o)),t.manifest.id,!1);if(s!==void 0)return{error:s};let c=N(e);for(let[p,v]of i.heads){if(p===n||v==null||i.mediaOf(v).format!=="plugin")continue;let d=oe(c,p,fn(e));if(d.kind==="plugin"&&d.ref===r)return{error:`'${se(r)?r:G(r)}' already backs live source '${p}' \u2014 did you mean --source-id ${p}? To truly move these bytes under '${n}', retire '${p}' first`}}return{sourceId:n,pluginRef:{plugin:t.manifest.id,ref:r}}}function Cn(e,n,t){let r=oe(N(e),n,fn(e));if(r.kind!=="plugin"&&r.kind!=="no-envelope")return{error:pn};let i=vn(t,n,r.plugin);if(i!==null)return{error:i};let o=`kane-cli maintain reconcile --from <file> --source-id ${n}`;if(r.kind==="no-envelope")return{error:`this machine holds no record of the file source '${n}' was read from \u2014 the store was cloned or pulled, or a revert moved its head; pass the file: ${o} [SOURCE_ORIGIN_UNKNOWN]`};if(r.fetched){let s=t.route(r.ref,F);return s===null||s.plugin.manifest.id!==r.plugin?{error:`source '${n}' was read by plugin ${r.plugin} from '${r.ref}', which this build routes to ${s===null?"no plugin":`plugin ${s.plugin.manifest.id}`} \u2014 reconcile it with a build whose plugin ${r.plugin} claims that reference [SOURCE_REF_UNROUTED]`}:{sourceId:n,pluginRef:{plugin:r.plugin,ref:r.ref}}}return F(r.ref)?{sourceId:n,pluginRef:{plugin:r.plugin,ref:r.ref}}:{error:`source '${n}' was last read from '${r.ref}', which is not there \u2014 pass its new place: ${o} [SOURCE_FILE_MISSING]`}}async function Un(e,n,t,r){if(te(n)||!se(n))return null;let i=r.route(n,F);if(i===null)return null;let o=i.plugin,s=o.manifest.id,c;try{c=await Je(o,"claim",Ae.hookMs,()=>o.claim({ref:i.ref,named:i.named,isFile:!1}))}catch(v){return{error:v instanceof Error?v.message:String(v)}}let p=c?.sourceId;return c==null?{error:`plugin ${s} does not read '${n}' \u2014 pass a reference it claims [PLUGIN_NOT_CLAIMED]`}:qe(p)?t!==void 0&&t!==p?{error:`--source-id '${t}' does not match the source plugin ${s} reads '${n}' as, '${p}' \u2014 re-run without --source-id`}:mn(e,p,o,n):{error:`plugin ${s} claimed '${n}' as ${JSON.stringify(p)}, which is not an id a source may have [PLUGIN_SOURCE_ID_INVALID]`}}var pn="reconcile needs --from <file|url> AND --source-id <id> (files only \u2014 a URL derives its own id) \u2014 see `kane-cli context list --type source` for ids";function An(e,n){let t=de(e);if(!le(t))return!1;let r=oe(N(t),n);return r.kind==="plugin"||r.kind==="no-envelope"}function hn(e){return e.format==="plugin"?e.plugin?.id??"":null}function vn(e,n,t){return e.byId(t)!==void 0?null:`PLUGIN_MISSING: source '${n}' is read by the plugin ${t}, which this build does not include \u2014 reconcile it with a build that has the ${t} plugin`}function M(e){return e==null?"(none)":e.slice(0,19)}function ne(e,n,t,r=!1,i){if(e.out(`reconcile ${n.source_id}: head ${n.head.status} \u2014 ${M(n.head.before)} \u2192 ${M(n.head.after)}`),r||(e.out(`note: ${n.note}`),e.out(`skipped arms: ${n.skipped_arms}`)),n.changed&&(e.out(n.held?`extract ran in override mode; ${t?.defaultsTaken??0} default(s) auto-taken; matched-but-changed and new proposals HELD for your verdict (staged \u2014 nothing committed)`:`extract ran in override mode; ${t?.defaultsTaken??0} default(s) auto-taken; matched-but-changed proposals auto-committed as edits`),i?.({type:"defaults_taken",count:t?.defaultsTaken??0})),r){let o=n.changeset??[],s=(p,v)=>{let d=o.filter(l=>l.kind===p).length;return d>0?`${d} ${v}`:null},c=[s("ADD","add"),s("MODIFY","modify"),s("ARCHIVE","archive")].filter(Boolean);n.changed&&e.out(`changeset: ${o.length} item(s)${c.length?` \u2014 ${c.join(" \xB7 ")}`:""}`),e.out(`plan: ${n.rows.length} row(s) \u2014 each gets a card below`);return}if(n.changed){let o=n.changeset??[];e.out(`changeset: ${o.length} item(s)`);for(let s of o)if(s.kind==="MODIFY")e.out(` [MODIFY] ${H(s.ref)} \u2014 ${s.summary} (${M(s.old_cid)} \u2192 ${s.new_cid===null?"(staged)":M(s.new_cid)})`);else if(s.kind==="ADD")e.out(` [ADD] ${H(s.ref)}`);else{e.out(` [ARCHIVE] ${H(s.ref)} \u2014 ${s.why}`);let c=be(s.impact,"retiring drops");c&&e.out(` ${c}`)}}e.out(`plan: ${n.rows.length} row(s)`);for(let o of n.rows){e.out(` [${o.kind}] ${H(o.ref)} \u2014 ${o.reason}`);let s=be(o.impact,"approving marks");s&&e.out(` ${s}`),e.out(` provenance: ${o.provenance}`),e.out(` action: ${o.action}`)}}function Rn(e,n){return Pe({source_id:e.source_id,head:{status:e.head.status},rows:e.rows,archive:(e.changeset??[]).filter(t=>t.kind==="ARCHIVE"),changed:e.changed,held:!!e.held,defaultsTaken:n?.defaultsTaken},process.stdout.columns)}function be(e,n){if(!e||e.stale_refs.length===0)return null;let t=e.direct_refs??[];return`impact: ${n} ${e.stale_refs.length} item(s) stale`+(t.length>0?` \u2014 ${t.length} directly touched: ${t.join(", ")}`:"")}function A(e){return e==="interactive"?"override":e}async function Y(e,n,t,r,i,o,s=[],c="override",p,v,d,l,g,h,k){let{dir:m}=e,b;try{b=Re(m)}catch(f){return $(r,f instanceof Error?f.message:String(f)),1}try{if(!t){let{runWalkSession:f}=await import("./walk-session-BAYYPIKN.js"),{telemetryEnvName:R}=await import("./bootstrap-3V6TOO6I.js");return await f({credentials:B,onIngestRefusal:W,dir:m,rows:n,archive:s,held:p??null,childMode:c,runDesign:l??null,mark:o,markA:d,...v?{archiveState:v}:{},...h?{meta:{verb:"reconcile",sid:h,env:R()}}:{},...k?{resumeCmd:k}:{},signals:E=>T(m,E.ref,E.verdict,E.reason),...g?{script:g}:{}})}return await Hn(e,n,t,r,i,o,s,c,p,v)}finally{b()}}var K=(e,n,t=!1)=>t?`kane-cli maintain reconcile --source-id ${n}`:e?`kane-cli maintain reconcile --from ${e} --source-id ${n}`:void 0,Mn=e=>e===null?void 0:"filePath"in e?e.filePath:"remoteUrl"in e?e.remoteUrl:e.pluginRef.ref,q=e=>`${e} high-risk item(s) need a human \u2014 ci mode won't guess. Walk interactively or use --mode agent.`;function J(e,n,t){let r=n.rows;e({type:"reconcile_plan",source_id:n.source_id,plan_path:t,rows:r.map(i=>({kind:i.kind,ref:i.ref,why:i.reason})),archive:n.changeset.filter(i=>i.kind==="ARCHIVE").map(i=>({ref:i.ref,why:i.why}))})}function ce(e={}){return{type:"reconcile_summary",applied:0,skipped:0,deferred:0,plan_only:0,failed:0,paused:0,stale_created:0,...e}}var X=ce();async function ee(e,n,t,r,i,o,s,c,p){let{dir:v}=e;J(i,n,t);let d=n.changeset.filter(h=>h.kind==="ARCHIVE"&&p?.[h.ref]===void 0),l=n.rows;if(s==="ci"&&d.length>0)return i({type:"error",message:q(d.length),code:"HIGH_RISK_CI"}),i(ce()),2;let g;try{g=Re(v)}catch(h){return i({type:"error",message:h instanceof Error?h.message:String(h)}),i(ce()),2}try{return await Fn(e,n,t,r,i,o,s,l,d,c)}finally{g()}}async function Fn(e,n,t,r,i,o,s,c,p,v){let{dir:d,store:l}=e,g=0,h=0,k=0,m=0,b=0,f=0,R=0,E=new Set,I=(a,y)=>{try{v?.(a,y)}catch{}};for(let[a,y]of c.entries()){i({type:"reconcile_row_start",kind:y.kind,ref:y.ref,...y.impact?{stale:y.impact.stale_refs.length,direct:y.impact.direct_refs?.length??0}:{}});let w=(u,x,_)=>i({type:"reconcile_row_end",kind:y.kind,ref:y.ref,outcome:u,...x!==void 0?{exit_code:x}:{},..._?{detail:_}:{}});if(y.applied){h++,w("skipped");continue}if(y.kind==="REMOVE"){b++,w("plan-only");continue}if(y.held_ref&&n.held){let u=new Set;if(y.kind==="MODIFY"&&y.impact){let _=U(d);for(let P of y.impact.stale_refs){let C=_.resolve(P);C&&_.stale(C.tip)==="fresh"&&u.add(P)}}let x=ke(l,n.held,y.held_ref,Oe);if(!x.ok){k++,R===0&&(R=1),w("failed",1,x.message);continue}if(x.kind==="ADD"){let _=await r(x.ref,{yes:!0,mode:s});if(_!==0){_===3?(m++,R===0&&(R=3),w("paused",3)):(k++,R===0&&(R=1),w("failed",_));continue}}g++,x.kind!=="ADD"&&y.impact&&(f+=u.size),I(a,"approved"),T(d,y.ref,x.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve"),w("applied");continue}let O=we(U(d),y.ref);if(!O.ok){h++,w("skipped");continue}let S=O.target;if(E.has(S.ucTip)){h++,w("skipped");continue}if(y.kind==="ADD"){let u=await r(S.seamRef,{yes:!0,mode:s});if(u===3){m++,R===0&&(R=3),w("paused",3);continue}if(u!==0){k++,R===0&&(R=1),w("failed",u);continue}E.add(S.ucTip),g++,I(a,"approved"),T(d,y.ref,"gap-resolved-create"),w("applied")}else{let u=await ye(l,S,{yes:!0,mode:s},o,r,"batch");u.outcome==="evolved"?(E.add(S.ucTip),g++,I(a,"approved"),T(d,y.ref,"gap-resolved-evolve"),w("applied")):u.outcome==="paused"?(m++,R===0&&(R=u.code),w("paused",u.code)):u.outcome==="failed"?(k++,R===0&&(R=1),w("failed",u.code)):(h++,u.outcome==="unchanged"&&(E.add(S.ucTip),I(a,"skipped")),w("skipped",void 0,u.outcome==="unchanged"?"unchanged \u2014 the design agent found nothing to change":void 0))}}return p.length>0&&s!=="agent"&&(i({type:"reconcile_held",source_id:n.source_id,plan_path:t,held:p.map(a=>({ref:a.ref,why:a.why}))}),b+=p.length),p.length>0&&s==="agent"&&(i({type:"reconcile_paused",plan_path:t,pending:p.map(a=>({ref:a.ref,why:a.why}))}),m+=p.length,R===0&&(R=3)),i(ce({applied:g,skipped:h,plan_only:b,failed:k,paused:m,stale_created:f})),R}var Oe={kind:"human",id:process.env.USER??"operator"};function T(e,n,t,r){Ne(e,Tn(n,t,r))}function Tn(e,n,t){return{ts:new Date().toISOString(),command:"reconcile-walk",id:e,verdict:n,polarity:"preference",by:Oe,target:e,...t!==void 0?{reason:t}:{}}}async function Hn(e,n,t,r,i,o,s=[],c="override",p,v){let{dir:d,store:l}=e,g=0,h=0,k=0,m=0,b=0,f=0,R=0,E=new Set;for(let[I,a]of n.entries()){if(a.applied){r.out(`skipped ${a.ref} \u2014 already applied (${a.applied.outcome} at ${a.applied.at})`),h++;continue}let y=u=>{try{o?.(I,u)}catch(x){$(r,`could not record applied state for ${a.ref}: ${x instanceof Error?x.message:String(x)}`)}};if(a.kind==="REMOVE"){r.out(`REMOVE ${a.ref} \u2014 plan-only in this release (not executed)`),m++;continue}if(a.held_ref&&p){let u=ke(l,p,a.held_ref,Oe);if(!u.ok){$(r,`held ${a.ref}: ${u.message}`),b++,R===0&&(R=1);continue}if(r.out(`committed ${u.ref} (${a.kind==="ADD"?"minted":"updated \u2014 old\u2192new redirect"})`),u.kind==="ADD"){let x=await i(u.ref,{yes:t,mode:c});if(x===3){r.out(`design session for ${u.ref} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above`),f++,R===0&&(R=3),y("approved");continue}if(x!==0){$(r,`design run for ${u.ref} ended with exit code ${x}`),b++,R===0&&(R=1),y("approved");continue}}g++,y("approved"),T(d,a.ref,a.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve");continue}let w=U(d),O=we(w,a.ref);if(!O.ok){r.out(`skipped ${a.ref} \u2014 ${O.message}`),h++;continue}let S=O.target;if(E.has(S.ucTip)){r.out(`skipped ${a.ref} \u2014 use-case ${S.display} already handled in this walk`),h++;continue}if(a.kind==="ADD"){let u=await i(S.seamRef,{yes:t,mode:c});if(u===3){r.out(`design session for ${S.display} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above; this row lands when that session completes`),f++,R===0&&(R=3);continue}if(u!==0){$(r,`design run for ${S.display} ended with exit code ${u}`),b++,R===0&&(R=1);continue}E.add(S.ucTip),g++,y("approved"),T(d,a.ref,"gap-resolved-create")}else{let u=await ye(l,S,{yes:!0,mode:c},r,i,"batch");u.outcome==="evolved"?(E.add(S.ucTip),g++,y("approved"),T(d,a.ref,"gap-resolved-evolve")):u.outcome==="paused"?(f++,R===0&&(R=u.code)):u.outcome==="failed"?(b++,R===0&&(R=u.code)):(h++,u.outcome==="unchanged"&&(E.add(S.ucTip),y("skipped")))}}for(let I of s)if(I.kind==="ARCHIVE"&&v?.[I.ref]===void 0){r.out(`[ARCHIVE] ${I.ref} \u2014 ${I.why}`);{let a=be(I.impact,"retiring drops");a&&r.out(` ${a}`)}r.out(" plan-only \u2014 retire belongs to the interactive session (never headless)"),m++}return r.out(`reconcile walk: ${g} applied, ${h} skipped, ${k} deferred, ${m} plan-only`+(b>0?`, ${b} failed`:"")+(f>0?`, ${f} paused`:"")),R}var Nn=new Set(me.map(e=>e.name));function xe(e,n,t){let r=U(e),i=r.heads.get(n);if(i==null)return null;let o=r.mediaOf(i);if("pluginRef"in t)return ge(n,hn(o),t.pluginRef.plugin,!1)??null;if("remoteUrl"in t){let s=pe(t.remoteUrl)?.name??"remote";return o.format!==s?`source '${n}' is backed by ${o.format} content, not a ${s} source \u2014 reconcile it with the --from it was originally ingested from`:null}return Nn.has(o.format)?`source '${n}' is a remote ${o.format} source \u2014 pass its URL to --from, not a file`:null}function De(e,n,t,r){let{store:i}=e;if("pluginRef"in n){let o=V(r).byId(n.pluginRef.plugin);if(o===void 0)throw new Error(`the plugin ${n.pluginRef.plugin} is not loaded`);let s=V(r).route(n.pluginRef.ref,F),c=s!==null&&s.plugin===o?s:{ref:n.pluginRef.ref,named:!1};return cn(i,o,c.ref,{connect:r.connections??ze,named:c.named,registry:V(r)})}return"remoteUrl"in n?an(i,n.remoteUrl,{out:t.out,err:t.err},B,r.remoteFindProvider):sn(i,n.filePath)}var V=e=>e.plugins??Ze();function wn(e){return"pluginRef"in e?{plugin_ref:e.pluginRef}:"remoteUrl"in e?{remote_url:e.remoteUrl}:{backing_path:e.filePath}}function yn(e,n,t,r){let i=xe(e,n.source_id,t);return i!==null?`stored plan cannot replay: ${i}`:"pluginRef"in t?vn(V(r),n.source_id,t.pluginRef.plugin):null}function _n(e){return e.plugin_ref!==void 0?{pluginRef:e.plugin_ref}:e.remote_url!==void 0?{remoteUrl:e.remote_url}:e.backing_path!==void 0?{filePath:e.backing_path}:null}var ae=Symbol("owned");async function Ie(e,n,t,r,i,o=!1,s=!1,c=!1){let{store:p}=e,v=i.seams??{reingest:De(e,t,r,i),reextract:Ee(p,{credentials:B,onIngestRefusal:W,stage:o,hostOut:h=>r.out(h),hostEmit:h=>{h.type!=="run_start"&&i.emitEvent?.(h)},...i.emitEvent?{}:{hostProgress:h=>process.stderr.write(h+`
|
|
3
|
+
`)}})},d=null,l={reingest:v.reingest,reextract:async h=>d=await v.reextract(h)},g;try{r.out(`reconciling ${n}: re-reading the source and comparing against the graph\u2026`),g=await(i.buildPlan??$e)(p,n,l,c?{reextractUnchanged:!0}:{})}catch(h){return h instanceof Error&&h.message.startsWith("SOURCE_ID_OWNED: ")?($(r,h.message),ae):($(r,`reconcile failed: ${h instanceof Error?h.message:String(h)}`),null)}if(g.changed)if(s)for(let h of Rn(g,d))r.out(h);else ne(r,g,d,!1,i.emitEvent);return g}function kn(e,n){if(n.plugin_ref===void 0||n.held===void 0)return null;let t=U(e).heads.get(n.source_id);if(typeof t!="string")return null;let r=n.held.staged_source_cid,i=null;if(r===void 0||t!==r)i={cid:t,where:"the source is now"};else if(F(n.plugin_ref.ref)){let o=xn(n.plugin_ref.ref),s=Ce("source",Ue(n.source_id,He(o)));s!==t&&(i={cid:s,where:`${G(n.plugin_ref.ref)} now holds`})}return i===null?null:`PLUGIN_VERSION_MOVED: plan ${n.created} was built for ${n.source_id} @${M(r??null)}, ${i.where} @${M(i.cid)} \u2014 its held rows are not carried across a version move; run kane-cli maintain reconcile --source-id ${n.source_id} again`}var $n=Symbol("set-aside");async function Ln(e){let n=N(e),[{render:t},r,{ScrollbackProvider:i},{ChatSurface:o},{makeChatController:s},{makeReconcileDeps:c}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./scrollback-GGNBDFQV.js"),import("./ChatSurface-XUV3EQPZ.js"),import("./chat-controller-FWFQVZTB.js"),import("./reconcile-deps-2CTIFXDR.js")]),p=r.default??r,v=s(),d=c({credentials:B,onIngestRefusal:W,store:n,note:l=>v.note(l),emitWalkSignal:(l,g,h)=>T(e,l,g,h)});return new Promise(l=>{let g=t(p.createElement(i,null,p.createElement(o,{controller:v,verb:"extract",reconcile:d,autoReview:!0,onReviewExit:()=>{g.unmount(),l(0)},onCtrlC:()=>{g.unmount(),l(d.pending()?3:0)}})),{exitOnCtrlC:!1})})}async function Vn(e,n,t,r,i){let{dir:o}=e,s=re(o,n);if("error"in s)return $(r,s.error),2;let{plan:c,path:p}=s,v=t==="override"||t==="ci";if(n===void 0&&t==="interactive"&&r.isTTY&&!await r.confirm(`apply plan ${G(p)} for ${c.source_id} (created ${c.created})?`))return r.out(`not applying ${G(p)}`),0;let d=i.runDesignForUc??Se,l=i.runDesignForUc??null,g=i.sessionScript,h=(a,y)=>j(p,a,y),k=(a,y)=>ie(p,a,y),m=Z(o);if(m===c.head_pin){if(t==="agent"||r.machine){let y=i.emitEvent??(()=>{});return ee(e,Q(c),p,d,y,r,A(t),h,c.archive_state)}let a=ve(c);if(t==="ci"&&a.length>0)return $(r,q(a.length)),2;if(r.out(`applying stored plan ${G(p)} for ${c.source_id} (${c.rows.length} row(s))`),!v)for(let y of Pe({source_id:c.source_id,head:{status:"stored plan"},rows:c.rows,archive:(c.changeset??[]).filter(w=>w.kind==="ARCHIVE"),changed:!1,held:!!c.held},process.stdout.columns))r.out(y);return Y(e,c.rows,v,r,d,h,c.changeset??[],A(t),c.held,c.archive_state,k,l,g,c.source_id,K(c.backing_path??c.remote_url,c.source_id,c.plugin_ref!==void 0))}let b=kn(o,c);if(b!==null)return $(r,b),2;if(r.out(`graph moved since this plan (${M(c.head_pin)} \u2192 ${M(m)}) \u2014 recomputing`),c.held)return En(e,c,r,i,t,d,!1);let f=_n(c);if(f===null)return $(r,`stored plan for ${c.source_id} names no backing file or URL \u2014 re-run reconcile --from`),2;let R=yn(o,c,f,i);if(R!==null)return $(r,R),2;let E=await Ie(e,c.source_id,f,r,i,!1,t==="interactive");if(E===ae)return 2;if(!E)return 1;if(!E.changed)return ne(r,E,null,!1,i.emitEvent),0;if(t==="agent"||r.machine){let a=i.emitEvent??(()=>{});return ee(e,E,null,d,a,r,A(t))}let I=E.changeset.filter(a=>a.kind==="ARCHIVE");return t==="ci"&&I.length>0?($(r,q(I.length)),2):Y(e,E.rows,v,r,d,void 0,E.changeset,A(t),E.held,void 0,void 0,l,g,E.source_id,K(Mn(f),E.source_id,"pluginRef"in f))}function Q(e,n=!1){return{source_id:e.source_id,changed:!0,head:{status:"unchanged",before:e.head_pin,after:e.head_pin},note:e.note,skipped_arms:e.skipped_arms,changeset:e.changeset??[],rows:n?e.rows.filter(t=>t.applied===void 0):e.rows,...e.held?{held:e.held}:{}}}async function Bn(e,n,t,r,i,o,s){let{dir:c}=e,p=r.runDesignForUc??null,v=r.sessionScript,d=tn(c,n);if(d===null)return null;if("error"in d)return $(t,d.error),2;let{plan:l,path:g}=d,h=l.rows.filter(f=>f.applied===void 0),k=ve(l),m=r.emitEvent??(()=>{});if(h.length===0&&k.length===0){t.out(`already reconciled \u2014 plan ${l.created} applied ${l.rows.length} row(s)`);let f=rn(U(c)).staleCount;return f>0&&(t.out(`${f} item(s) still stale \u2014 kane-cli maintain evolve --from-stale`),m({type:"stale_debt",count:f})),(i==="agent"||t.machine)&&(J(m,Q(l),g),m({...X})),0}let b=Z(c);if(b!==l.head_pin){let f=kn(c,l);if(f!==null){let R=nn(c,g);return t.out(`${f.replace(/^PLUGIN_VERSION_MOVED: /,"").replace(/ — .*$/,"")} \u2014 set aside (${R}); re-extracting ${l.source_id} at its current version`),m({type:"plan_set_aside",source_id:l.source_id,plan_path:R,code:"PLUGIN_VERSION_MOVED"}),$n}return t.out(`plan ${l.created} superseded \u2014 graph moved (${M(l.head_pin)} \u2192 ${M(b)}); recomputing`),En(e,l,t,r,i,o,s)}return t.out(`resuming plan ${l.created} \u2014 ${h.length} pending row(s)${k.length>0?`, ${k.length} undecided archive item(s)`:""}`),s?(ne(t,Q(l),null,!1,r.emitEvent),t.out(`plan stored: ${g}`),(i==="agent"||t.machine)&&(J(m,Q(l),g),m({...X})),0):i==="agent"||t.machine?ee(e,Q(l),g,o,m,t,A(i),(f,R)=>j(g,f,R),l.archive_state):i==="ci"&&k.length>0?($(t,q(k.length)),2):Y(e,l.rows,i==="override"||i==="ci",t,o,(f,R)=>j(g,f,R),l.changeset??[],A(i),l.held,l.archive_state,(f,R)=>ie(g,f,R),p,v,l.source_id,K(l.backing_path??l.remote_url,l.source_id,l.plugin_ref!==void 0))}async function En(e,n,t,r,i,o,s){let{dir:c,store:p}=e,v=r.runDesignForUc??null,d=r.sessionScript,l;if(n.held){let w=U(c),O=new Set(n.rows.filter(u=>u.held_ref!==void 0&&u.applied!==void 0).map(u=>u.held_ref)),S=[];for(let u of n.held.rows){if(O.has(u.temp_ref))continue;if(!u.matched_cid){S.push(u);continue}let x=w.tipOf(u.matched_cid);if(w.superseded.get(x)===null){t.out(`dropped held "${u.title}" \u2014 its use-case was retired meanwhile`),r.emitEvent?.({type:"held_dropped",ref:u.temp_ref,title:u.title,reason:"target_retired"});continue}S.push(x===u.matched_cid?u:{...u,matched_cid:x,uc:{...u.uc,matches_existing:{cid:x}}})}l={source_id:n.held.source_id,...n.plugin_ref!==void 0&&n.held.staged_source_cid!==void 0?{staged_source_cid:n.held.staged_source_cid}:{},rows:S}}let g=_n(n);if(g===null)return $(t,`stored plan for ${n.source_id} names no backing file or URL \u2014 re-run reconcile --from`),2;let h=yn(c,n,g,r);if(h!==null)return $(t,h),2;let k=r.seams??{reingest:De(e,g,t,r),reextract:Ee(p,{credentials:B,onIngestRefusal:W,stage:l!==void 0,hostOut:w=>t.out(w),hostEmit:w=>{w.type!=="run_start"&&r.emitEvent?.(w)},...r.emitEvent?{}:{hostProgress:w=>process.stderr.write(w+`
|
|
4
|
+
`)}})},m;try{m=await(r.buildPlan??$e)(p,n.source_id,k,{resumeHeld:l})}catch(w){return $(t,`reconcile failed: ${w instanceof Error?w.message:String(w)}`),1}if(i==="interactive"&&!s)for(let w of Rn(m,null))t.out(w);else ne(t,m,null,!1,r.emitEvent);let b=Z(c),f=null;if(b!=null){let w={},O=new Set(m.changeset.filter(S=>S.kind==="ARCHIVE").map(S=>S.ref));for(let[S,u]of Object.entries(n.archive_state??{}))O.has(S)&&(w[S]=u);f=he(c,{version:2,source_id:m.source_id,...wn(g),head_pin:b,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:m.skipped_arms,note:m.note,changeset:m.changeset,rows:m.rows,...m.held?{held:m.held}:{},...Object.keys(w).length>0?{archive_state:w}:{}}),t.out(`plan stored: ${f}`)}if(s){if(i==="agent"||t.machine){let w=r.emitEvent??(()=>{});J(w,m,f),w({...X})}return 0}let R=r.emitEvent??(()=>{}),E=f?re(c,f).plan.archive_state:void 0,I=f?(w,O)=>j(f,w,O):void 0,a=f?(w,O)=>ie(f,w,O):void 0;if(i==="agent"||t.machine)return ee(e,m,f,o,R,t,A(i),I,E);let y=m.changeset.filter(w=>w.kind==="ARCHIVE"&&E?.[w.ref]===void 0);return i==="ci"&&y.length>0?($(t,q(y.length)),2):Y(e,m.rows,i==="override"||i==="ci",t,o,I,m.changeset,A(i),m.held,E,a,v,d,m.source_id,K(n.backing_path??n.remote_url,m.source_id,n.plugin_ref!==void 0))}async function dn(e,n,t={},r=process.cwd()){let{telemetryBootstrap:i,telemetryEnvName:o}=await import("./bootstrap-3V6TOO6I.js"),s=i({verb:"reconcile",mode:typeof e.mode=="string"?e.mode:"interactive",contextRoot:L(r,".context"),env:o(),applyPlanPath:typeof e.apply=="string"?L(r,e.apply):void 0,write:!0,longSession:!0});(e.mode==="agent"||n.machine)&&t.emitEvent?.({type:"run_start",session:s.ids.session_id});{let v=le(L(r,".context"))?We(L(r,".context")):null;if(v)return e.mode==="agent"||n.machine?t.emitEvent?.(fe(v)):($(n,v.text),(n.err??n.out)(`next: ${v.remedy}`)),await s.end({exit_code:2}),2}let c=await Be(L(r,".context"));c&&(e.mode==="agent"||n.machine?t.emitEvent?.(je(c)):(n.err??n.out)(c.text));let p=await jn(e,n,t,r);return p===1&&e.mode!=="agent"&&(n.err??n.out)(s.supportFooter()),await s.end({exit_code:p}),p}async function jn(e,n,t={},r=process.cwd()){let i=e.apply!==void 0&&e.apply!==!1,o=typeof e.apply=="string"?e.apply:void 0;if(e.plan&&i)return $(n,"pass --plan OR --apply, not both"),2;let s=e.from!==void 0||!i,c=e.from!==void 0&&te(e.from),p=e.from!==void 0&&!c&&se(e.from)&&!F(L(r,e.from))&&V(t).route(e.from,F)!==null,v=e.from===void 0&&e.sourceId!==void 0&&!i&&An(r,e.sourceId);if(s&&!v&&(!e.from||!e.sourceId&&!c&&!p))return $(n,pn),2;if(e.from&&o!==void 0)return $(n,"pass --from OR --apply <path>, not both \u2014 a stored plan names its own source"),2;let d=Le(r,n);if(!d)return 2;let l=N(d),g={dir:d,store:l};if(e.mode!==void 0&&!gn.has(e.mode))return un(`--mode must be interactive | agent | ci | override, got '${e.mode}'`);let h=e.mode==="agent"||e.mode==="ci"||e.mode==="override";if(i&&!h&&!n.isTTY)return $(n,"refusing to apply without a TTY to confirm \u2014 pass --mode override|ci"),2;let k=!e.plan,m="override";if(e.from||v){let _=On(e,n.isTTY);if(typeof _=="object")return _.code==="MODE_USAGE"?un(_.error):($(n,_.error),2);m=_}let b=m==="override"||m==="ci";if(i&&!e.from){let{makeReconcileDeps:_}=await import("./reconcile-deps-2CTIFXDR.js"),P=o===void 0?_({credentials:B,onIngestRefusal:W,store:l,emitWalkSignal:(D,z,ue)=>T(d,D,z,ue)}).pending():null;if(P?.kind==="cards"){let D=e.mode??"interactive";return!n.isTTY||D!=="interactive"?($(n,`a held changeset for ${P.source} awaits review (${P.count} change(s)) \u2014 resume in a terminal: kane-cli maintain reconcile --apply [HELD_REVIEW]`),2):(t.cardApplyMount??Ln)(d)}let C=e.mode??"interactive";return Vn(g,o===void 0?void 0:L(r,o),C,n,t)}let f=v?Cn(d,e.sourceId,V(t)):(p?await Un(d,e.from,e.sourceId,V(t)):null)??Dn(d,r,e.from,e.sourceId,V(t));if("error"in f)return $(n,f.error),2;let R=_=>_.corrupt>0?($(n,`cannot verify review holds \u2014 ${_.corrupt} session file(s) unreadable; inspect with kane-cli context sessions list, clean with kane-cli context sessions clean, then retry [SESSIONS_UNREADABLE]`),2):_.holders.length>0?($(n,`session ${_.holders[0]} holds item(s) for review pinned to ${f.sourceId} \u2014 finish that review first: kane-cli context extract --resume ${_.holders[0]} [SOURCE_HELD]`),2):null;if(!i){let _=R(_e(l,f.sourceId));if(_!==null)return _}if(m==="interactive"&&!e.plan&&!i){let _=t.seams?.reingest??De(g,f,n,t),P;try{P=await on(l,{sourceId:f.sourceId,reingest:_})}catch(D){return $(n,D instanceof Error?D.message:String(D)),D instanceof Error&&D.message.startsWith("SOURCE_ID_OWNED: ")?2:1}if(P.kind==="held"||P.kind==="unverifiable")return R(P.kind==="held"?{holders:P.holders,corrupt:0}:{holders:[],corrupt:P.corrupt})??2;let C=P.kind==="landed"?P.changeContext:null;if(P.kind==="first")return n.out(`${f.sourceId} landed for the first time \u2014 extract it: kane-cli context extract --source ${f.sourceId}`),0;if(P.kind==="unreadable")return $(n,`${f.sourceId} landed, but its version ${P.version} cannot be read \u2014 no change to review; check the store: kane-cli context fsck`),1;if(C){let z=await(t.chatMount??(async ue=>{let{bindExtractInteractive:Sn}=await import("./extract-bind-BTINHHE5.js");return Sn(ue)}))({mode:"interactive",posture:"reconcile",source:f.sourceId,changeContext:C});return z===3&&_e(l,f.sourceId).holders.length===0?0:z}}let E="pluginRef"in f?{pluginRef:f.pluginRef}:"remoteUrl"in f?{remoteUrl:f.remoteUrl}:{filePath:f.filePath},I=await Ie(g,f.sourceId,E,n,t,!!e.plan||m==="interactive",m==="interactive"&&!e.plan);if(I===ae)return 2;if(!I)return 1;let a=I,y=t.runDesignForUc??Se,w=t.runDesignForUc??null,O=t.sessionScript;if(!a.changed){let _=await Bn(g,f.sourceId,n,t,m,y,!!e.plan);if(_===$n){let P=await Ie(g,f.sourceId,E,n,t,!!e.plan||m==="interactive",m==="interactive"&&!e.plan,!0);if(P===ae)return 2;if(!P)return 1;a=P}else if(_!==null)return _}if(!a.changed){if(ne(n,a,null,!1,t.emitEvent),m==="agent"||n.machine){let _=t.emitEvent??(()=>{});J(_,a,null),_({...X})}return 0}let S=Z(d),u=null;if(S!=null?u=he(d,{version:2,source_id:a.source_id,...wn(E),head_pin:S,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:a.skipped_arms,note:a.note,changeset:a.changeset,rows:a.rows,...a.held?{held:a.held}:{}}):$(n,"no chain head after extract \u2014 plan not stored"),m==="agent"||n.machine){let _=t.emitEvent??(()=>{});if(!k)return J(_,a,u),_({...X}),0;let P=u?(C,D)=>j(u,C,D):void 0;return ee(g,a,u,y,_,n,A(m),P)}if(!k)return u&&n.out(`plan stored: ${u}`),0;let x=a.changeset.filter(_=>_.kind==="ARCHIVE");if(m==="ci"&&x.length>0)return u&&n.out(`plan stored: ${u}`),$(n,q(x.length)),2;if(u){n.out(`plan stored: ${u}`);let _=u;return Y(g,Wn(d,_)??a.rows,b,n,y,(P,C)=>j(_,P,C),a.changeset,A(m),a.held,void 0,void 0,w,O,a.source_id,K(e.from,a.source_id,"pluginRef"in f))}return Y(g,a.rows,b,n,y,void 0,a.changeset,A(m),a.held,void 0,void 0,w,O,a.source_id,K(e.from,a.source_id,"pluginRef"in f))}function Wn(e,n){let t=re(e,n);return"error"in t?null:t.plan.rows}async function bt(e,n={},t,r=process.cwd()){if(e.json&&e.mode!=="override"&&e.mode!=="ci"){let o=e.mode==="agent"?"--mode agent writes NDJSON already":"it needs --mode override or --mode ci";return(t?.stderr??(s=>{process.stderr.write(s)}))(`reconcile: --json ${o}
|
|
5
|
+
`),2}if(!t&&r===process.cwd()){let{remoteEntry:o}=await import("./remote-entry-DW2J56N4.js"),s=await o("maintain reconcile",e.mode==="agent"||e.json===!0);if(s!==null){if("exit"in s)return s.exit;let{remoteReconcile:c}=await import("./reconcile-remote-23D6SXXT.js");return c({choice:s.choice,opts:e})}}let i=e.json===!0;if(e.mode==="agent"||i){let{makeHeadlessIO:o}=await import("./headless-io-FFM5T6KL.js"),s=t?o("ndjson","reconcile",t):o("ndjson","reconcile"),c={...i?{machine:!0}:{},out:s.out,err:k=>s.event({type:"error",message:k}),isTTY:!1,confirm:async()=>!1,ask:async()=>""},{runWithChannel:p}=await import("./run-channel-63SVP5OI.js"),v=2,d=de(r),l=i&&le(d)?Xe(N(d)):null,g=null,h=k=>{let m=k.source_id;k.type==="reconcile_plan"&&typeof m=="string"&&(g=m),s.event(k)};try{v=await p({event:h},()=>dn(e,c,{...n,emitEvent:h},r)),l!==null&&g!==null&&s.event({type:"reconcile_use_cases",source_id:g,use_cases:en(N(d),g,l)})}catch(k){k instanceof Te?(v=2,s.event(fe({code:k.code,text:k.message,remedy:k.remedy}))):(v=1,s.event({type:"error",message:k instanceof Error?k.message:String(k)}))}return s.done(v)}return dn(e,Ve(),n,r)}export{A as childModeFor,T as emitWalkSignal,Un as pluginRefInputs,bt as reconcileCommand,On as resolveReconcileMode,dn as runReconcileCommand,Cn as sourceIdInputs,Dn as validateReconcileInputs,Tn as walkSignal};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d}from"./chunk-4R4YUOVY.js";import"./chunk-COJINPOK.js";import"./chunk-ZY65IZJR.js";import"./chunk-RTVWQK7I.js";import"./chunk-H4KPNGY4.js";import"./chunk-PCDIEYV6.js";import"./chunk-2B75UL7Y.js";import"./chunk-I6S6DZ2E.js";import"./chunk-GRO6DLN3.js";import"./chunk-VZJ6LUXX.js";import"./chunk-EH43VWVR.js";import"./chunk-HJLMH7ZM.js";import"./chunk-IZ65ZPWY.js";import"./chunk-SB6P5EQH.js";import"./chunk-WZLDFEWR.js";import"./chunk-HD6NR44L.js";import"./chunk-3JLEDSG5.js";import"./chunk-73ZFOJOK.js";import"./chunk-HGVM2OZU.js";import"./chunk-KDR662D2.js";import"./chunk-LD5B3QFW.js";import"./chunk-6TNLITJO.js";import"./chunk-DPGOAFKF.js";import"./chunk-ZHWU6L2G.js";import"./chunk-MPEIMWQI.js";import"./chunk-2GE5X2A5.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UR6MHSHU.js";export{a as REVIEW_PAUSED,d as makeReconcileDeps,b as offerLaunch,c as toWalkCard};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as Y,c as O,e as H,f as _,g as W}from"./chunk-
|
|
2
|
+
import{a as Y,c as O,e as H,f as _,g as W}from"./chunk-JQ7ZZQXC.js";import{f as $,k as F}from"./chunk-GXMD23XB.js";import"./chunk-7ZJWUWSN.js";import{b as L}from"./chunk-DHYGCHKB.js";import"./chunk-436FZ4KG.js";import{k as j}from"./chunk-VQZOKTJ2.js";import"./chunk-KRRZCY7U.js";import"./chunk-QQI6N3FO.js";import"./chunk-73Y6T2UK.js";import{e as T}from"./chunk-ZKPY3AXW.js";import{d as x,e as I,i as A}from"./chunk-XMPTFXPW.js";import{a as w}from"./chunk-G3J4XY3Z.js";import"./chunk-HIUAUZNL.js";import{h as U}from"./chunk-DBTMKBHU.js";import"./chunk-JGLADDRH.js";import"./chunk-ZGQM6KWN.js";import"./chunk-6TNLITJO.js";import"./chunk-KF4DKXSS.js";import"./chunk-AUJSC7PU.js";import{h as N}from"./chunk-ORNVIEUA.js";import"./chunk-3QICDXY5.js";import{k as M}from"./chunk-I2VU2DTS.js";import"./chunk-DPGOAFKF.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-RLOJH5O6.js";import"./chunk-AQ2OG2EF.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import{j as E}from"./chunk-REKHAN53.js";import"./chunk-CJE7PKRV.js";import"./chunk-K3OSK6PB.js";import"./chunk-PVN64537.js";import{B as P,Ha as u,f as D,w as C}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import{a as S}from"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-VZA7BPCK.js";import"./chunk-FOJHSG5M.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";var Q=["interactive","agent","ci","override"];async function me(e){try{return await V(e)}finally{await C()}}async function V(e){let{opts:t}=e,a=t.mode==="agent",l=t.mode==="override",p=a||l&&t.json===!0,y=e.testing?.agentLines?{stdout:e.testing.agentLines,stderr:()=>{}}:void 0,f=a||l?E(I(p?"ndjson":"human","reconcile",y),{atQuestionsOnly:!0}):null,g=!a&&!l&&(e.testing?.terminal??x()),d=!1,o=(n,s=2)=>f&&p?(f.event({type:"error",code:n.code,message:n.message,...P(n)}),f.done(s,"refused")):(d&&process.stdout.write(`
|
|
3
3
|
`),j(n),process.stdout.write(`
|
|
4
4
|
`),s);if(t.mode!==void 0&&!Q.includes(t.mode)){let n=I("ndjson","reconcile",y);return n.event({type:"error",code:"MODE_USAGE",message:`--mode must be interactive | agent | ci | override, got '${t.mode}'`}),n.done(2,"refused")}if(t.plan)return o(u.optionNotYet("--plan"));if(t.apply!==void 0&&t.apply!==!1)return o(u.optionNotYet("--apply"));if(t.mode==="ci")return o(u.optionNotYet(`--mode ${t.mode}`));if(t.mode==="interactive"&&!g)return process.stderr.write(`reconcile: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
5
5
|
`),2;if(!t.sourceId)return o(u.reconcileNeeds(e.choice.projectName,a));let i=t.sourceId,r=null,m="";if(t.from){let n=N().route(t.from,w);if(n!==null){let s=w(t.from),c=await O(t.from,n,s?i:void 0);if("refusal"in c)return o(c.refusal,c.exit);if(c.item.sourceId!==i)return o(u.reconcileRefOtherId(i,n.plugin.manifest.id,t.from,c.item.sourceId));r=c.item}else{if(Y(t.from)){let c=M(t.from);return o(u.reviewOnlyFiles(t.from,a,c?U(c.name,t.from,i):void 0))}let s=W(t.from);if(!s.ok)return o(s.refusal);r={kind:"file",path:t.from,node:"",file:s.file,bytes:s.bytes,sourceId:i,limit:s.limit},m=s.supported}}let b;try{b=e.testing?.basicAuth??await T()}catch(n){if(!(n instanceof A))throw n;return o({code:n.code,message:n.message,...n.remedy?{remedy:n.remedy}:{}})}let k=D({url:e.choice.latticeUrl,basicAuth:b,...e.testing?.run?.fetch?{fetch:e.testing.run.fetch}:{}}),B=e.choice.projectId;g&&e.choice.projectName&&(process.stdout.write(`using project "${e.choice.projectName}", shared with your team
|
|
6
|
-
`),d=!0);let R;try{R=await k.sources(B)}catch(n){if(n instanceof S&&n.code==="NOT_FOUND")R=[];else{let{exit:s,...c}=L(n,e.choice,null);return o(c,s)}}let h=R.find(n=>n.sourceId===i);if(h===void 0||h.head===null){let n=r?.kind==="file"?r.file:i;return o(u.reconcileSourceMissing({source:i,file:n,path:t.from??i,project:e.choice.projectName,removed:h!==void 0,agent:a}))}if(r===null){let n=h.media?.format==="plugin"?h.media.plugin:void 0;if(n===void 0||typeof n.id!="string")return o(u.reconcileNeeds(e.choice.projectName,a));let s=n.fetch?.ref;if(typeof s!="string")return o(u.reconcileOriginUnknown(i,a));let c=N().route(s,w);if(c===null||c.plugin.manifest.id!==n.id)return o(u.reconcileRefUnrouted(i,n.id,s,c===null?null:c.plugin.manifest.id));let v=await O(s,c,i);if("refusal"in v)return o(v.refusal,v.exit);r=v.item}return q({choice:e.choice,person:k,basicAuth:b,item:r,supported:m,mode:a?"agent":l?"override":g?"interactive":"ci",io:f,refuse:o,projectLine:d,nothing:u.nothingToReview,...e.testing?{testing:e.testing}:{}})}async function q(e){let{mode:t,io:a,item:l}=e,p=l.sourceId,y=e.choice.projectId,{step:f,ended:g}=H({person:e.person,choice:e.choice,item:l,first:!1,then:t==="ci"?"pause":"review",...e.as!==void 0?{as:e.as}:{},supported:e.supported,retryMs:e.testing?.run?.retryDeadlineMs??12e4,remoteDeps:_(e.testing?.remoteDeps),...e.testing?{testing:e.testing}:{}}),d=e.testing?.remoteDeps?{...e.testing.run,remoteDeps:e.testing.remoteDeps}:e.testing?.run,o={verb:"reconcile",choice:e.choice,start:{kind:"new",body:{projectId:y,verb:"reconcile",mode:t==="interactive"?"interactive":"agent",sourceId:p}},run:{source:p,...t==="override"?{override:!0}:{}}},i;if(t==="interactive"){let{runInteractiveRemote:m}=await import("./interactive-remote-
|
|
6
|
+
`),d=!0);let R;try{R=await k.sources(B)}catch(n){if(n instanceof S&&n.code==="NOT_FOUND")R=[];else{let{exit:s,...c}=L(n,e.choice,null);return o(c,s)}}let h=R.find(n=>n.sourceId===i);if(h===void 0||h.head===null){let n=r?.kind==="file"?r.file:i;return o(u.reconcileSourceMissing({source:i,file:n,path:t.from??i,project:e.choice.projectName,removed:h!==void 0,agent:a}))}if(r===null){let n=h.media?.format==="plugin"?h.media.plugin:void 0;if(n===void 0||typeof n.id!="string")return o(u.reconcileNeeds(e.choice.projectName,a));let s=n.fetch?.ref;if(typeof s!="string")return o(u.reconcileOriginUnknown(i,a));let c=N().route(s,w);if(c===null||c.plugin.manifest.id!==n.id)return o(u.reconcileRefUnrouted(i,n.id,s,c===null?null:c.plugin.manifest.id));let v=await O(s,c,i);if("refusal"in v)return o(v.refusal,v.exit);r=v.item}return q({choice:e.choice,person:k,basicAuth:b,item:r,supported:m,mode:a?"agent":l?"override":g?"interactive":"ci",io:f,refuse:o,projectLine:d,nothing:u.nothingToReview,...e.testing?{testing:e.testing}:{}})}async function q(e){let{mode:t,io:a,item:l}=e,p=l.sourceId,y=e.choice.projectId,{step:f,ended:g}=H({person:e.person,choice:e.choice,item:l,first:!1,then:t==="ci"?"pause":"review",...e.as!==void 0?{as:e.as}:{},supported:e.supported,retryMs:e.testing?.run?.retryDeadlineMs??12e4,remoteDeps:_(e.testing?.remoteDeps),...e.testing?{testing:e.testing}:{}}),d=e.testing?.remoteDeps?{...e.testing.run,remoteDeps:e.testing.remoteDeps}:e.testing?.run,o={verb:"reconcile",choice:e.choice,start:{kind:"new",body:{projectId:y,verb:"reconcile",mode:t==="interactive"?"interactive":"agent",sourceId:p}},run:{source:p,...t==="override"?{override:!0}:{}}},i;if(t==="interactive"){let{runInteractiveRemote:m}=await import("./interactive-remote-PBRQHTAF.js");i=await m({...o,subject:p,ingest:[f],testing:{basicAuth:e.basicAuth,...e.testing?.check?{check:e.testing.check}:{},...d?{run:d}:{},...e.testing?.mount?{mount:e.testing.mount}:{},...e.testing?.onController?{onController:e.testing.onController}:{}}})}else i=await F({...o,mode:"agent",basicAuth:e.basicAuth,io:a,check:e.testing?.check??$,onProgress:()=>{},ingest:[f],signals:!0,onRefusal:m=>{j(m),process.stdout.write(`
|
|
7
7
|
`)},...d?{testing:d}:{}});let r=g();if(r.refused!==null)return e.refuse(r.refused.refusal,r.refused.exit);if(r.added==="unchanged"&&r.behind===0&&!r.unread)return a?a.done(i):(process.stdout.write(`${e.projectLine?`
|
|
8
8
|
`:""}${e.nothing(r.name,e.choice.projectName)}
|
|
9
9
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as s}from"./chunk-3MSXQU2C.js";import{f as a}from"./chunk-
|
|
2
|
+
import{a as s}from"./chunk-3MSXQU2C.js";import{f as a}from"./chunk-YYVBE6W2.js";import"./chunk-34R7BNZ2.js";import"./chunk-QSCXXNC2.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";function m(t){let n=t.sessionName!==null,e={type:"recording_state",enabled:!0,session_id:t.sessionId,persist:n};return t.sessionName&&(e.session_name=t.sessionName),t.testPath&&(e.test_path=t.testPath),t.outputPath&&(e.output_path=t.outputPath),e}async function h(t){if(t.isAgent){a(m(t));return}let n=(await import("./react-QWOAB3TB.js")).default,{render:e,useApp:o}=await import("./build-5ZN47FAT.js"),{useEffect:r}=n,{InfoBox:u}=await import("./InfoBox-OBH7SUGC.js"),l=t.sessionName?[{label:"session",value:t.sessionName},{label:"test",value:s(t.testPath??"")},{label:"output",value:s(t.outputPath??"")}]:[{label:"session",value:"ephemeral"},{label:"note",value:"use /name <name> to persist this session"}];function c(){let{exit:i}=o();return r(()=>{let p=setTimeout(()=>i(),50);return()=>clearTimeout(p)},[i]),n.createElement(u,{title:"Recording",titleColor:"#ff9500",rows:l})}await e(n.createElement(c),{stdout:process.stderr}).waitUntilExit()}export{m as buildRecordingStateEvent,h as printRecordingBanner};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as a,c as b,d as c,e as d,f as e}from"./chunk-2N75WO7Y.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XMALVGH7.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-RZ4F3BHX.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{d as discoverAll,a as knownPlatforms,c as providerFor,b as registeredPlatforms,e as resolveTarget};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-DHYGCHKB.js";import"./chunk-436FZ4KG.js";import"./chunk-VQZOKTJ2.js";import"./chunk-KRRZCY7U.js";import"./chunk-QQI6N3FO.js";import"./chunk-73Y6T2UK.js";import"./chunk-ZKPY3AXW.js";import"./chunk-XMPTFXPW.js";import"./chunk-REKHAN53.js";import"./chunk-K3OSK6PB.js";import"./chunk-PVN64537.js";import"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-VZA7BPCK.js";import"./chunk-FOJHSG5M.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{c as endedRefusal,b as openFailure,e as remoteChoiceForResume,d as remoteEntry,a as remoteRefusal};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{k as i}from"./chunk-VQZOKTJ2.js";import"./chunk-QQI6N3FO.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-REKHAN53.js";import{Ha as t}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-RZ4F3BHX.js";import"./chunk-VZA7BPCK.js";import"./chunk-FOJHSG5M.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";function d(r,e,n){return e==="agent"?"agent":e==="override"?"override":!e&&!process.stdin.isTTY?(process.stderr.write(`${r}: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
|
|
3
|
+
`),{exit:2}):e==="ci"?(i(t.notYet(`${n} --mode ${e}`)),{exit:2}):!process.stdin.isTTY||!process.stdout.isTTY?(process.stderr.write(`${r}: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
4
|
+
`),{exit:2}):"interactive"}export{d as remoteMode};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{$ as A,Aa as $,B as a,Ba as aa,C as b,Ca as ba,D as c,Da as ca,E as d,Ea as da,F as e,Fa as ea,G as f,Ga as fa,H as g,Ha as ga,I as h,J as i,K as j,L as k,M as l,N as m,O as n,P as o,Q as p,R as q,S as r,T as s,U as t,V as u,W as v,X as w,Y as x,Z as y,_ as z,aa as B,ba as C,ca as D,da as E,ea as F,fa as G,ga as H,ha as I,ia as J,ja as K,ka as L,la as M,ma as N,na as O,oa as P,pa as Q,qa as R,ra as S,sa as T,ta as U,ua as V,va as W,wa as X,xa as Y,ya as Z,za as _}from"./chunk-
|
|
2
|
+
import{$ as A,Aa as $,B as a,Ba as aa,C as b,Ca as ba,D as c,Da as ca,E as d,Ea as da,F as e,Fa as ea,G as f,Ga as fa,H as g,Ha as ga,I as h,J as i,K as j,L as k,M as l,N as m,O as n,P as o,Q as p,R as q,S as r,T as s,U as t,V as u,W as v,X as w,Y as x,Z as y,_ as z,aa as B,ba as C,ca as D,da as E,ea as F,fa as G,ga as H,ha as I,ia as J,ja as K,ka as L,la as M,ma as N,na as O,oa as P,pa as Q,qa as R,ra as S,sa as T,ta as U,ua as V,va as W,wa as X,xa as Y,ya as Z,za as _}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{r as ALREADY_DISCARDED,t as CHAT_ONLY,Y as LIST_STATUS,Z as LIST_UP_TO_DATE,_ as LIST_WHY,ca as RESUME_UNREADABLE,x as SAVE_VERB_KEYS,p as WORK_ONLY,L as addAgain,n as addedCount,I as addsText,a as agentRemedy,h as andList,U as casesThere,A as chatOnly,z as counted,d as designChanged,e as designDoneLine,g as designFinishedLine,ba as designWords,f as designedLine,q as discardDetail,M as documentsToAddAgain,i as doneCounted,j as doneLines,aa as evolveWords,c as heldByEvent,b as heldByOf,y as heldChangesOf,D as heldChangesShort,E as heldChangesText,O as itsText,W as joinedNext,$ as projectNamed,fa as pulledLines,Q as remoteResume,v as repinsOf,u as replacedCounts,C as saveCountsOf,H as saveRows,l as savedLines,s as savedResult,F as savesSomething,k as savingLines,o as sharesItems,ea as shellWord,K as startAgainNext,R as testFileOf,X as testFilesField,V as testFilesWords,T as testManagerField,S as testManagerWords,da as unreadableLine,m as updatedCount,N as uploadedFiles,w as withKeeps,P as withoutVersions,ga as words,B as workOnly,G as worthSaving,J as yoursText};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g}from"./chunk-
|
|
2
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g}from"./chunk-GET4DINR.js";import"./chunk-VE3SUJMA.js";import"./chunk-6K5BEEAJ.js";import"./chunk-3G2LSTK5.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{d as buildAutoDefaultAnnouncement,f as buildAutoDefaultedEvent,e as buildAutoDefaultedNdjson,c as buildRemediationMessage,b as decideGateAction,a as loadCachedIds,g as requireProjectFolder};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-YKL5H4K6.js";import"./chunk-ULGBK4NS.js";import"./chunk-VVCZRCRD.js";import"./chunk-YGMQXS2J.js";import"./chunk-PQXYHI5W.js";import"./chunk-3T2TYDPT.js";import"./chunk-2N75WO7Y.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XMALVGH7.js";import"./chunk-TZXXJWHA.js";import"./chunk-SXRHKXSE.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{l as CHOOSE_MOBILE_KIND_FIX,m as CHOOSE_MOBILE_KIND_MESSAGE,h as appNotSetEvent,e as appProblemFor,a as appSuitsTarget,b as deviceFromFlags,g as formatRunningOn,i as missingPieceMessage,c as nameNeedsVersionMessage,d as resolveRunIntent,f as resolveTestmdIntent,k as staleAppMessage,j as staleDeviceMessage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-MKPDF26Q.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";export{a as AuthResolver,b as classifyAuthFailure};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-32Y6QVFG.js";import"./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 commitRevert};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{O as F,R as Q,U as G,V as Y,W as H}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as U}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import{e as P,h as D}from"./chunk-XMPTFXPW.js";import{a as A}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{b as J}from"./chunk-KM3YCIDV.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-ZFM77AQU.js";import{M as C,N as V,R as j,S as E,Ua as M,ea as x}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";import{readFileSync as W}from"fs";import{existsSync as X}from"fs";var Z=new Set(["derived","skipped","archived","drift"]),N={kind:"human",id:process.env.USER??"operator"};function _(r,t){return r.nameOf.get(t)??t.slice(0,19)}function L(r,t){let d=r.getNode(t)?.content??{},h=r.derivesInto(t)[0]?.props.anchor;return{cid:t,uc:{temp_ref:t,title:String(d.title??d.text??""),summary:d.summary!==void 0?String(d.summary):void 0,risk:String(d.risk??"med"),cite:{anchor:typeof h=="string"?h:"\u2014",quote:""},depends_on_hint:[],matches_existing:null}}}function ee(r,t){let d=new Set,{records:h}=M(r);for(let c of h){if(c.proposal_id==null)continue;let a=new Set(c.review.map(u=>u.id));for(let u of c.nodes)a.has(u.cid)||d.add(u.cid)}for(let c of[...d])(t.trust.get(c)!=="derived"||t.superseded.has(c))&&d.delete(c);return d}var re=new Set(["approved","edited","rejected","skipped","supersede"]);function te(r){let t;try{t=JSON.parse(r)}catch(c){return{errors:[`not valid JSON: ${c instanceof Error?c.message:String(c)}`]}}if(!Array.isArray(t))return{errors:['expected a top-level array of {"ref", "resolution", ...} entries']};let d=[],h=[];return t.forEach((c,a)=>{if(c==null||typeof c!="object"||Array.isArray(c)){d.push(`[${a}]: not an object`);return}let u=c;(typeof u.ref!="string"||!u.ref.trim())&&d.push(`[${a}]: "ref" (slug or cid) is required`),(typeof u.resolution!="string"||!re.has(u.resolution))&&d.push(`[${a}]: "resolution" must be one of approved | edited | rejected | skipped | supersede`),u.resolution==="supersede"&&(typeof u.supersede_target!="string"||!u.supersede_target.trim())&&d.push(`[${a}]: resolution "supersede" requires "supersede_target" (slug or cid)`),u.edit!==void 0&&(u.edit==null||typeof u.edit!="object"||Array.isArray(u.edit))&&d.push(`[${a}]: "edit" must be an object ({title?, summary?, risk?})`),d.length===0&&h.push(u)}),d.length>0?{errors:d}:{entries:h}}async function ne(r,t,d,h=process.cwd()){let c=r.queue??"derived";if(!Z.has(c))return t.out(`unknown queue ${c} \u2014 one of: derived | skipped | archived | drift`),2;if(r.mode!=null&&r.mode!=="agent"&&r.mode!=="ci")return(t.err??t.out)(`error: review --mode must be agent | ci, got '${r.mode}'`),2;r.mode==="agent"&&(r={...r,json:!0});let a=r.json?P("ndjson","review",{stdout:s=>t.out(s.replace(/\n$/,"")),stderr:s=>(t.err??t.out)(s.replace(/\n$/,""))}):null,u;if(a){if(u=A(h),!X(u))return a.event({type:"error",message:"no context store here",remedy:"run kane-cli context ingest <files> first"}),a.done(2,"refused");let s=G(u);if(s)return a.event(Y(s)),a.done(2,"refused")}else{let s=F(h,t);if(!s||(u=s,H(u,t)))return 2}let S=U(u),n=C(S),w=s=>(t.err??t.out)(s);if(r.allowArchive&&!r.because?.trim())return w('error: --allow-archive requires --because "<reason>" (the audit trail on the record)'),2;if(r.mode==="ci"&&r.allowArchive)return w("error: ci mode never archives \u2014 nothing committed"),2;if((r.approve?.length??0)>0||(r.skip?.length??0)>0||(r.defer?.length??0)>0){if(r.verdicts)return w("error: --approve/--skip/--defer and --verdicts are mutually exclusive"),2;let s=new Map,o=r.mode==="agent"?a:null,m=[],p=i=>m.push({line:i,event:{type:"error",message:i}}),g=i=>m.push({line:`${i}: names nothing in the graph`,event:{type:"error",code:"ITEM_NOT_FOUND",message:`there's no item ${i} here, so nothing was approved`,remedy:"check the id, then run the command again"}}),v=[],y=i=>n.displayNameOf(i)??_(n,i);for(let i of r.approve??[]){let $=E(n,i);if($!==null){p($);continue}let e=V(n,j(n,i));if(!e){g(i);continue}s.set(e,{resolution:"approved"}),v.push({ref:y(e),resolution:"approved"})}for(let[i,$]of[[r.skip??[],"skipped"],[r.defer??[],"deferred"]])for(let e of i){let f=E(n,e),l=f===null?n.resolve(j(n,e)):null;f!==null?p(f):l?v.push({ref:y(l.tip),resolution:$}):g(e)}if(m.length>0){if(o){for(let i of m)o.event(i.event);return o.done(2,"refused")}for(let i of m)w(`error: ${i.line}`);return w("error: nothing committed (structured verdicts are atomic \u2014 fix every offender and re-run)"),2}if(s.size===0){if(o){for(let i of v)o.event({type:"review_verdict",...i});return o.done(0)}return t.out("nothing changed \u2014 every ref was skipped/deferred"),0}let b=x({store:S,graph:n,verdicts:s,by:N});if(b.errors){if(o){for(let i of b.errors)J(i.code,i.detail);return o.event({type:"error",code:"REVIEW_FAILED",message:"couldn't save the review, so nothing was approved",remedy:"run the command again"}),o.done(1)}for(let i of b.errors)w(`${i.code}: ${i.detail}`);return 1}if(o){for(let i of v)o.event({type:"review_verdict",...i});return o.done(0)}return t.out(`review: committed record ${b.record.seq} \u2014 ${s.size} approved`),0}if(r.verdicts){let s=e=>(t.err??t.out)(e),o;try{o=W(r.verdicts,"utf8")}catch{return s(`error: cannot read verdicts file ${r.verdicts}`),2}let m=te(o);if("errors"in m){for(let e of m.errors)s(`error: --verdicts ${r.verdicts}: ${e}`);return 2}let p=new Set([...n.trust.entries()].filter(([e,f])=>(f==="derived"||f==="archived")&&!n.superseded.has(e)).map(([e])=>e)),g=new Map,v=[];for(let e of m.entries){let f=E(n,e.ref)??(e.supersede_target?E(n,e.supersede_target):null);if(f!==null){v.push(`${e.ref}: ${f}`);continue}let l=V(n,j(n,e.ref));if(!l){v.push(`${e.ref}: names nothing in the graph`);continue}if(!p.has(l)){v.push(`${e.ref}: not in a review queue (trust: ${n.trust.get(l)??"?"})`);continue}if(g.has(l)){v.push(`${e.ref}: duplicate \u2014 an earlier entry already resolves to this node (${_(n,l)})`);continue}let k=e.supersede_target?V(n,j(n,e.supersede_target)):null;if(e.supersede_target&&!k){v.push(`${e.ref}: supersede_target ${e.supersede_target} names nothing live in the graph`);continue}g.set(l,{resolution:e.resolution,...e.reason?{reason:e.reason}:{},...e.edit?{edit:e.edit}:{},...k?{supersedeTarget:k}:{}})}if(v.length>0){for(let e of v)s(`error: --verdicts: ${e}`);return s("error: nothing committed (the verdicts file is atomic \u2014 fix every offender and re-run)"),2}let y=[...g.entries()].filter(([,e])=>e.resolution==="rejected"||e.resolution==="supersede");if(y.length>0&&r.mode==="ci")return s(`error: ci mode never archives \u2014 ${y.length} retiring verdict(s) (rejected/supersede) present, nothing committed`),2;if(y.length>0&&r.allowArchive){let{archiveImpact:e}=await import("./feeder-NY45UFJK.js");for(let[f,l]of y){let k=l.resolution==="supersede"?(()=>{let T=l.supersedeTarget?n.resolve(l.supersedeTarget):null;return T&&!n.superseded.has(T.tip)?T.tip:null})():f;if(k===null)continue;let K=e(n,k),B=l.resolution==="supersede"?`supersede (retires ${_(n,k)})`:`archive ${_(n,k)}`;s(`${B}: ${K.design_children} design child(ren) affected`)}for(let[,f]of y)f.reason||(f.reason=r.because)}let b=y.length>0&&!r.allowArchive,i=x({store:S,graph:n,verdicts:g,by:N,...b?{holdArchives:!0}:{}});if(i.errors){if(i.errors[0]?.code==="NO_VERDICTS")return s("nothing changed \u2014 every item was skipped"),0;for(let e of i.errors)s(`${e.code}: ${e.detail}`);return 1}b&&t.out(`${y.length} archive(s) held for interactive confirmation (re-run with --allow-archive --because "<reason>" to apply headlessly)`);let $=new Map;for(let e of g.values())$.set(e.resolution,($.get(e.resolution)??0)+1);if(r.json)for(let[e,f]of g.entries())t.out(JSON.stringify({ref:_(n,e),cid:e,resolution:f.resolution}));else{let e=[...$.entries()].map(([f,l])=>`${l} ${f}`).join(", ");t.out(`review: committed record ${i.record.seq} \u2014 ${e}`)}return 0}if(c==="drift"){let s=n.staleList().filter(({state:o})=>o!=="superseded").map(({cid:o,state:m})=>({ref:_(n,o),cid:o,state:m,title:String(n.getNode(o)?.content.title??n.getNode(o)?.content.source_id??""),pinned_sources:[...new Set(n.derivesInto(o).map(p=>String(p.props.source_id)))]}));if(r.json){for(let o of s)t.out(JSON.stringify(o));return 0}if(s.length===0)return t.out("drift queue is empty \u2014 every node's evidence matches the current source snapshots"),0;t.out(`${s.length} item(s) whose evidence changed (re-extract the source to re-approve):`);for(let o of s)t.out(` [${o.state}] ${o.ref} \xB7 ${o.title} \xB7 sources: ${o.pinned_sources.join(", ")||"\u2014"}`);return 0}if(!t.isTTY)return a?D(a,"review: verdict queues need a terminal","TTY_REQUIRED","run kane-cli context review in a terminal, or pass --verdicts <file.json>; the drift listing works anywhere"):(t.out("review: verdict queues need a TTY (drift listing works anywhere, or pass --verdicts <file.json>)"),2);let R,q;if(c==="archived")R=[...n.trust.entries()].filter(([s,o])=>o==="archived"&&!n.superseded.has(s)).map(([s])=>L(n,s)),q="skipped";else{let s=ee(u,n),o=[...n.trust.entries()].filter(([p,g])=>g==="derived"&&!n.superseded.has(p)).map(([p])=>p),m=c==="skipped"?o.filter(p=>s.has(p)):o;m.sort((p,g)=>Number(s.has(g))-Number(s.has(p))),R=m.map(p=>L(n,p)),q="skipped"}if(R.length===0)return t.out(`${c} queue is empty`),0;t.out(`${R.length} node(s) in the ${c} queue \u2014 approve promotes, reject ${c==="archived"?"re-archives":"archives"}, edit mints a new version, skip leaves it for later`);let z=await d(R,n,q),I=x({store:S,graph:n,verdicts:z,by:N});if(I.errors){if(I.errors[0]?.code==="NO_VERDICTS")return t.out("nothing changed \u2014 every item was skipped"),0;for(let s of I.errors)t.out(`${s.code}: ${s.detail}`);return 1}let O=I.record;return t.out(`committed record ${O.seq}: ${O.review.length} review fact(s), ${O.supersessions.length} supersession(s), ${O.nodes.length} new version(s)`),0}async function se(r,t,d){let[{render:h},c,{ReviewChecklist:a}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./ui-SNV3FD2G.js")]),u=c.default??c;return new Promise(S=>{let n=h(u.createElement(a,{items:r.map(w=>({uc:w.uc})),defaultResolution:d,onSubmit:w=>{n.unmount(),S(w)}}))})}async function he(r){let{bothTTY:t}=await import("./headless-io-FFM5T6KL.js");return!r.json&&r.mode!=="agent"&&await Q(A(process.cwd()),d=>process.stderr.write(d+`
|
|
2
|
+
import{O as F,R as Q,U as G,V as Y,W as H}from"./chunk-Z5BFCTHI.js";import"./chunk-DTYT6KBO.js";import"./chunk-7C4IEL5V.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as U}from"./chunk-P2LDAW3C.js";import"./chunk-WMGKUERB.js";import"./chunk-LNHBZEDC.js";import{a as A}from"./chunk-73Y6T2UK.js";import{e as P,h as D}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{b as J}from"./chunk-KM3YCIDV.js";import"./chunk-ZTAZ2R5Z.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-PL3SG3M2.js";import"./chunk-2GE5X2A5.js";import"./chunk-ZCIWQHCO.js";import"./chunk-CJE7PKRV.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import"./chunk-6PIIUAZF.js";import{M as C,N as V,R as j,S as E,Ua as M,ea as x}from"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-VZ7KXRXB.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";import{readFileSync as W}from"fs";import{existsSync as X}from"fs";var Z=new Set(["derived","skipped","archived","drift"]),N={kind:"human",id:process.env.USER??"operator"};function _(r,t){return r.nameOf.get(t)??t.slice(0,19)}function L(r,t){let d=r.getNode(t)?.content??{},h=r.derivesInto(t)[0]?.props.anchor;return{cid:t,uc:{temp_ref:t,title:String(d.title??d.text??""),summary:d.summary!==void 0?String(d.summary):void 0,risk:String(d.risk??"med"),cite:{anchor:typeof h=="string"?h:"\u2014",quote:""},depends_on_hint:[],matches_existing:null}}}function ee(r,t){let d=new Set,{records:h}=M(r);for(let c of h){if(c.proposal_id==null)continue;let a=new Set(c.review.map(u=>u.id));for(let u of c.nodes)a.has(u.cid)||d.add(u.cid)}for(let c of[...d])(t.trust.get(c)!=="derived"||t.superseded.has(c))&&d.delete(c);return d}var re=new Set(["approved","edited","rejected","skipped","supersede"]);function te(r){let t;try{t=JSON.parse(r)}catch(c){return{errors:[`not valid JSON: ${c instanceof Error?c.message:String(c)}`]}}if(!Array.isArray(t))return{errors:['expected a top-level array of {"ref", "resolution", ...} entries']};let d=[],h=[];return t.forEach((c,a)=>{if(c==null||typeof c!="object"||Array.isArray(c)){d.push(`[${a}]: not an object`);return}let u=c;(typeof u.ref!="string"||!u.ref.trim())&&d.push(`[${a}]: "ref" (slug or cid) is required`),(typeof u.resolution!="string"||!re.has(u.resolution))&&d.push(`[${a}]: "resolution" must be one of approved | edited | rejected | skipped | supersede`),u.resolution==="supersede"&&(typeof u.supersede_target!="string"||!u.supersede_target.trim())&&d.push(`[${a}]: resolution "supersede" requires "supersede_target" (slug or cid)`),u.edit!==void 0&&(u.edit==null||typeof u.edit!="object"||Array.isArray(u.edit))&&d.push(`[${a}]: "edit" must be an object ({title?, summary?, risk?})`),d.length===0&&h.push(u)}),d.length>0?{errors:d}:{entries:h}}async function ne(r,t,d,h=process.cwd()){let c=r.queue??"derived";if(!Z.has(c))return t.out(`unknown queue ${c} \u2014 one of: derived | skipped | archived | drift`),2;if(r.mode!=null&&r.mode!=="agent"&&r.mode!=="ci")return(t.err??t.out)(`error: review --mode must be agent | ci, got '${r.mode}'`),2;r.mode==="agent"&&(r={...r,json:!0});let a=r.json?P("ndjson","review",{stdout:s=>t.out(s.replace(/\n$/,"")),stderr:s=>(t.err??t.out)(s.replace(/\n$/,""))}):null,u;if(a){if(u=A(h),!X(u))return a.event({type:"error",message:"no context store here",remedy:"run kane-cli context ingest <files> first"}),a.done(2,"refused");let s=G(u);if(s)return a.event(Y(s)),a.done(2,"refused")}else{let s=F(h,t);if(!s||(u=s,H(u,t)))return 2}let S=U(u),n=C(S),w=s=>(t.err??t.out)(s);if(r.allowArchive&&!r.because?.trim())return w('error: --allow-archive requires --because "<reason>" (the audit trail on the record)'),2;if(r.mode==="ci"&&r.allowArchive)return w("error: ci mode never archives \u2014 nothing committed"),2;if((r.approve?.length??0)>0||(r.skip?.length??0)>0||(r.defer?.length??0)>0){if(r.verdicts)return w("error: --approve/--skip/--defer and --verdicts are mutually exclusive"),2;let s=new Map,o=r.mode==="agent"?a:null,m=[],p=i=>m.push({line:i,event:{type:"error",message:i}}),g=i=>m.push({line:`${i}: names nothing in the graph`,event:{type:"error",code:"ITEM_NOT_FOUND",message:`there's no item ${i} here, so nothing was approved`,remedy:"check the id, then run the command again"}}),v=[],y=i=>n.displayNameOf(i)??_(n,i);for(let i of r.approve??[]){let $=E(n,i);if($!==null){p($);continue}let e=V(n,j(n,i));if(!e){g(i);continue}s.set(e,{resolution:"approved"}),v.push({ref:y(e),resolution:"approved"})}for(let[i,$]of[[r.skip??[],"skipped"],[r.defer??[],"deferred"]])for(let e of i){let f=E(n,e),l=f===null?n.resolve(j(n,e)):null;f!==null?p(f):l?v.push({ref:y(l.tip),resolution:$}):g(e)}if(m.length>0){if(o){for(let i of m)o.event(i.event);return o.done(2,"refused")}for(let i of m)w(`error: ${i.line}`);return w("error: nothing committed (structured verdicts are atomic \u2014 fix every offender and re-run)"),2}if(s.size===0){if(o){for(let i of v)o.event({type:"review_verdict",...i});return o.done(0)}return t.out("nothing changed \u2014 every ref was skipped/deferred"),0}let b=x({store:S,graph:n,verdicts:s,by:N});if(b.errors){if(o){for(let i of b.errors)J(i.code,i.detail);return o.event({type:"error",code:"REVIEW_FAILED",message:"couldn't save the review, so nothing was approved",remedy:"run the command again"}),o.done(1)}for(let i of b.errors)w(`${i.code}: ${i.detail}`);return 1}if(o){for(let i of v)o.event({type:"review_verdict",...i});return o.done(0)}return t.out(`review: committed record ${b.record.seq} \u2014 ${s.size} approved`),0}if(r.verdicts){let s=e=>(t.err??t.out)(e),o;try{o=W(r.verdicts,"utf8")}catch{return s(`error: cannot read verdicts file ${r.verdicts}`),2}let m=te(o);if("errors"in m){for(let e of m.errors)s(`error: --verdicts ${r.verdicts}: ${e}`);return 2}let p=new Set([...n.trust.entries()].filter(([e,f])=>(f==="derived"||f==="archived")&&!n.superseded.has(e)).map(([e])=>e)),g=new Map,v=[];for(let e of m.entries){let f=E(n,e.ref)??(e.supersede_target?E(n,e.supersede_target):null);if(f!==null){v.push(`${e.ref}: ${f}`);continue}let l=V(n,j(n,e.ref));if(!l){v.push(`${e.ref}: names nothing in the graph`);continue}if(!p.has(l)){v.push(`${e.ref}: not in a review queue (trust: ${n.trust.get(l)??"?"})`);continue}if(g.has(l)){v.push(`${e.ref}: duplicate \u2014 an earlier entry already resolves to this node (${_(n,l)})`);continue}let k=e.supersede_target?V(n,j(n,e.supersede_target)):null;if(e.supersede_target&&!k){v.push(`${e.ref}: supersede_target ${e.supersede_target} names nothing live in the graph`);continue}g.set(l,{resolution:e.resolution,...e.reason?{reason:e.reason}:{},...e.edit?{edit:e.edit}:{},...k?{supersedeTarget:k}:{}})}if(v.length>0){for(let e of v)s(`error: --verdicts: ${e}`);return s("error: nothing committed (the verdicts file is atomic \u2014 fix every offender and re-run)"),2}let y=[...g.entries()].filter(([,e])=>e.resolution==="rejected"||e.resolution==="supersede");if(y.length>0&&r.mode==="ci")return s(`error: ci mode never archives \u2014 ${y.length} retiring verdict(s) (rejected/supersede) present, nothing committed`),2;if(y.length>0&&r.allowArchive){let{archiveImpact:e}=await import("./feeder-L55TH2NC.js");for(let[f,l]of y){let k=l.resolution==="supersede"?(()=>{let T=l.supersedeTarget?n.resolve(l.supersedeTarget):null;return T&&!n.superseded.has(T.tip)?T.tip:null})():f;if(k===null)continue;let K=e(n,k),B=l.resolution==="supersede"?`supersede (retires ${_(n,k)})`:`archive ${_(n,k)}`;s(`${B}: ${K.design_children} design child(ren) affected`)}for(let[,f]of y)f.reason||(f.reason=r.because)}let b=y.length>0&&!r.allowArchive,i=x({store:S,graph:n,verdicts:g,by:N,...b?{holdArchives:!0}:{}});if(i.errors){if(i.errors[0]?.code==="NO_VERDICTS")return s("nothing changed \u2014 every item was skipped"),0;for(let e of i.errors)s(`${e.code}: ${e.detail}`);return 1}b&&t.out(`${y.length} archive(s) held for interactive confirmation (re-run with --allow-archive --because "<reason>" to apply headlessly)`);let $=new Map;for(let e of g.values())$.set(e.resolution,($.get(e.resolution)??0)+1);if(r.json)for(let[e,f]of g.entries())t.out(JSON.stringify({ref:_(n,e),cid:e,resolution:f.resolution}));else{let e=[...$.entries()].map(([f,l])=>`${l} ${f}`).join(", ");t.out(`review: committed record ${i.record.seq} \u2014 ${e}`)}return 0}if(c==="drift"){let s=n.staleList().filter(({state:o})=>o!=="superseded").map(({cid:o,state:m})=>({ref:_(n,o),cid:o,state:m,title:String(n.getNode(o)?.content.title??n.getNode(o)?.content.source_id??""),pinned_sources:[...new Set(n.derivesInto(o).map(p=>String(p.props.source_id)))]}));if(r.json){for(let o of s)t.out(JSON.stringify(o));return 0}if(s.length===0)return t.out("drift queue is empty \u2014 every node's evidence matches the current source snapshots"),0;t.out(`${s.length} item(s) whose evidence changed (re-extract the source to re-approve):`);for(let o of s)t.out(` [${o.state}] ${o.ref} \xB7 ${o.title} \xB7 sources: ${o.pinned_sources.join(", ")||"\u2014"}`);return 0}if(!t.isTTY)return a?D(a,"review: verdict queues need a terminal","TTY_REQUIRED","run kane-cli context review in a terminal, or pass --verdicts <file.json>; the drift listing works anywhere"):(t.out("review: verdict queues need a TTY (drift listing works anywhere, or pass --verdicts <file.json>)"),2);let R,q;if(c==="archived")R=[...n.trust.entries()].filter(([s,o])=>o==="archived"&&!n.superseded.has(s)).map(([s])=>L(n,s)),q="skipped";else{let s=ee(u,n),o=[...n.trust.entries()].filter(([p,g])=>g==="derived"&&!n.superseded.has(p)).map(([p])=>p),m=c==="skipped"?o.filter(p=>s.has(p)):o;m.sort((p,g)=>Number(s.has(g))-Number(s.has(p))),R=m.map(p=>L(n,p)),q="skipped"}if(R.length===0)return t.out(`${c} queue is empty`),0;t.out(`${R.length} node(s) in the ${c} queue \u2014 approve promotes, reject ${c==="archived"?"re-archives":"archives"}, edit mints a new version, skip leaves it for later`);let z=await d(R,n,q),I=x({store:S,graph:n,verdicts:z,by:N});if(I.errors){if(I.errors[0]?.code==="NO_VERDICTS")return t.out("nothing changed \u2014 every item was skipped"),0;for(let s of I.errors)t.out(`${s.code}: ${s.detail}`);return 1}let O=I.record;return t.out(`committed record ${O.seq}: ${O.review.length} review fact(s), ${O.supersessions.length} supersession(s), ${O.nodes.length} new version(s)`),0}async function se(r,t,d){let[{render:h},c,{ReviewChecklist:a}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./ui-SNV3FD2G.js")]),u=c.default??c;return new Promise(S=>{let n=h(u.createElement(a,{items:r.map(w=>({uc:w.uc})),defaultResolution:d,onSubmit:w=>{n.unmount(),S(w)}}))})}async function he(r){let{bothTTY:t}=await import("./headless-io-FFM5T6KL.js");return!r.json&&r.mode!=="agent"&&await Q(A(process.cwd()),d=>process.stderr.write(d+`
|
|
3
3
|
`)),ne(r,{out:d=>process.stdout.write(d+`
|
|
4
4
|
`),err:d=>process.stderr.write(d+`
|
|
5
5
|
`),confirm:async()=>!1,isTTY:t()},se)}export{te as parseVerdictsFile,he as reviewCommand,ne as runReviewCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b,c,d,e,f,g}from"./chunk-MW2WNYJO.js";import"./chunk-QI5RZ7LL.js";import"./chunk-7KX2BHKG.js";import"./chunk-B7JLM3IX.js";import"./chunk-EX6ORR7P.js";import"./chunk-H4KPNGY4.js";import"./chunk-U7NRZBB5.js";import"./chunk-LX2I4JEH.js";import"./chunk-PCDIEYV6.js";import"./chunk-WERIGVOH.js";import"./chunk-GGS3ATPB.js";import"./chunk-252GEI3H.js";import"./chunk-VZJ6LUXX.js";import"./chunk-EH43VWVR.js";import"./chunk-IZ65ZPWY.js";import"./chunk-SB6P5EQH.js";import"./chunk-WZLDFEWR.js";import"./chunk-3BSYOCSW.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-HGVM2OZU.js";import"./chunk-KDR662D2.js";import"./chunk-Z55KBMYV.js";import"./chunk-LD5B3QFW.js";import"./chunk-G3J4XY3Z.js";import"./chunk-6TNLITJO.js";import"./chunk-4NUSW4A2.js";import"./chunk-LXM7VHYN.js";import"./chunk-2RUSXQ3O.js";import"./chunk-AUJSC7PU.js";import"./chunk-ORNVIEUA.js";import"./chunk-I2VU2DTS.js";import"./chunk-DPGOAFKF.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-RLOJH5O6.js";import{b as a}from"./chunk-AQ2OG2EF.js";import"./chunk-GRURFGBP.js";import"./chunk-4IEQNX7F.js";import"./chunk-ZTAZ2R5Z.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-2GE5X2A5.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-CJE7PKRV.js";import"./chunk-MYZHOBS4.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-QXQ7KVEN.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GMTHZUZ3.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{a as USER_MESSAGE_MAX_BYTES,d as askedRedesign,e as designSessionId,g as formatVariablesClosing,c as openingStatementFor,f as runDesign,b as userMessageOverBudget};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j}from"./chunk-G2KTWFMU.js";import"./chunk-FPPVNF53.js";import"./chunk-GRO6DLN3.js";import{g as a}from"./chunk-WERIGVOH.js";import"./chunk-GGS3ATPB.js";import"./chunk-252GEI3H.js";import"./chunk-VZJ6LUXX.js";import"./chunk-EH43VWVR.js";import"./chunk-HJLMH7ZM.js";import"./chunk-IZ65ZPWY.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-QVP4FSKT.js";import"./chunk-73ZFOJOK.js";import"./chunk-HGVM2OZU.js";import"./chunk-KDR662D2.js";import"./chunk-Z55KBMYV.js";import"./chunk-LD5B3QFW.js";import"./chunk-G3J4XY3Z.js";import"./chunk-6TNLITJO.js";import"./chunk-4NUSW4A2.js";import"./chunk-LXM7VHYN.js";import"./chunk-2RUSXQ3O.js";import"./chunk-KF4DKXSS.js";import"./chunk-AUJSC7PU.js";import"./chunk-ORNVIEUA.js";import"./chunk-I2VU2DTS.js";import"./chunk-DPGOAFKF.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-RLOJH5O6.js";import"./chunk-AQ2OG2EF.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-2GE5X2A5.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-CJE7PKRV.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-GMTHZUZ3.js";import"./chunk-UR6MHSHU.js";export{h as dedupPreFlags,c as deliveredImagesWire,f as displaySourceName,b as extractProtocolCtx,d as extractSessionId,i as ownMatchedOf,a as resolveAnswers,j as runExtract,e as sessionSourceRef,g as sourceBanner};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i}from"./chunk-GXMD23XB.js";import"./chunk-7ZJWUWSN.js";import"./chunk-DHYGCHKB.js";import"./chunk-436FZ4KG.js";import"./chunk-VQZOKTJ2.js";import"./chunk-KRRZCY7U.js";import"./chunk-QQI6N3FO.js";import"./chunk-73Y6T2UK.js";import"./chunk-ZKPY3AXW.js";import"./chunk-XMPTFXPW.js";import{c as a}from"./chunk-HIUAUZNL.js";import"./chunk-DBTMKBHU.js";import"./chunk-JGLADDRH.js";import"./chunk-ZGQM6KWN.js";import"./chunk-6TNLITJO.js";import"./chunk-KF4DKXSS.js";import"./chunk-AUJSC7PU.js";import"./chunk-3QICDXY5.js";import"./chunk-I2VU2DTS.js";import"./chunk-DPGOAFKF.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-RLOJH5O6.js";import"./chunk-AQ2OG2EF.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-CJE7PKRV.js";import"./chunk-K3OSK6PB.js";import"./chunk-PVN64537.js";import"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-VZA7BPCK.js";import"./chunk-FOJHSG5M.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";export{c as IngestRefused,b as IngestStopped,f as PAUSE_SAVES,a as STORE_CALL_TIMEOUT_MS,d as controllerCheck,h as finalExitOf,e as graceVerdict,i as runRemote,g as sessionEventTrace};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-BY2B4YJN.js";import"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-UR6MHSHU.js";export{b as prereqsReady,a as runStartupGate};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as U,c as H}from"./chunk-ZRDX2ARO.js";import{L as Y,M as Q,N as X,O as ee,P as re,Q as te}from"./chunk-UUWSULIM.js";import"./chunk-CBVHP7JB.js";import{d as D}from"./chunk-YYVBE6W2.js";import"./chunk-ONZ2CSTZ.js";import"./chunk-NOFJXCYP.js";import"./chunk-RFEON5GN.js";import"./chunk-Z5BFCTHI.js";import"./chunk-DTYT6KBO.js";import"./chunk-7C4IEL5V.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as N}from"./chunk-3UHPVQLU.js";import{a as j}from"./chunk-CJQUVHHS.js";import"./chunk-WD52ZNQY.js";import"./chunk-W3USRQX6.js";import"./chunk-BHSHGWBL.js";import"./chunk-S3DAAAE5.js";import"./chunk-YKL5H4K6.js";import"./chunk-VQZOKTJ2.js";import"./chunk-XLQ4F6BI.js";import"./chunk-DREQ3RAA.js";import"./chunk-4523YDTG.js";import{b as I}from"./chunk-GYDJO32R.js";import"./chunk-52VCA4K2.js";import"./chunk-USJ3LUAL.js";import"./chunk-P2LDAW3C.js";import"./chunk-WMGKUERB.js";import"./chunk-KRRZCY7U.js";import"./chunk-LNHBZEDC.js";import"./chunk-QQI6N3FO.js";import{d as O}from"./chunk-FLOQ5NZL.js";import"./chunk-72KYMWQ5.js";import"./chunk-JQ64X2TO.js";import{a as K}from"./chunk-BY2B4YJN.js";import"./chunk-4JWJH6TB.js";import{j as V}from"./chunk-JGRXMTME.js";import"./chunk-77ZZQJLX.js";import"./chunk-JIRNI5TB.js";import"./chunk-UTM7D4PI.js";import"./chunk-AUBSLPJZ.js";import"./chunk-5T6II7VN.js";import"./chunk-IINZZ4BZ.js";import"./chunk-TDPWFYTJ.js";import"./chunk-73Y6T2UK.js";import"./chunk-ZKPY3AXW.js";import"./chunk-XMPTFXPW.js";import"./chunk-MKPDF26Q.js";import{d as M,e as P}from"./chunk-UX2CDUPE.js";import"./chunk-ENG2UTMX.js";import"./chunk-FYCD765R.js";import"./chunk-34R7BNZ2.js";import{b as A}from"./chunk-2PZKMT3I.js";import"./chunk-GET4DINR.js";import"./chunk-VE3SUJMA.js";import"./chunk-ULGBK4NS.js";import"./chunk-VVCZRCRD.js";import"./chunk-HMQ5M4JJ.js";import"./chunk-4SJAOAYY.js";import"./chunk-5D7ENQTQ.js";import"./chunk-YGMQXS2J.js";import"./chunk-MJKRJGER.js";import"./chunk-FBQ7PQJV.js";import"./chunk-Y6Y6RAY4.js";import"./chunk-PQXYHI5W.js";import{d as L}from"./chunk-URAYFJGM.js";import"./chunk-SMXABALN.js";import"./chunk-6K5BEEAJ.js";import"./chunk-3T2TYDPT.js";import"./chunk-2N75WO7Y.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XMALVGH7.js";import"./chunk-TZXXJWHA.js";import"./chunk-SXRHKXSE.js";import"./chunk-WN5VKKJ3.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-WX4VGH5Q.js";import"./chunk-TZVPDGJD.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-GRURFGBP.js";import"./chunk-4IEQNX7F.js";import"./chunk-ZTAZ2R5Z.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-MPEIMWQI.js";import"./chunk-PL3SG3M2.js";import"./chunk-2GE5X2A5.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-CJE7PKRV.js";import"./chunk-MYZHOBS4.js";import"./chunk-7V34ZMMS.js";import"./chunk-B7ZX5HEN.js";import"./chunk-K3OSK6PB.js";import{a as h}from"./chunk-PVN64537.js";import{r as $,w as F}from"./chunk-TLOYTGVT.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-RQKMSNEU.js";import"./chunk-I2MC6VVX.js";import"./chunk-QXQ7KVEN.js";import"./chunk-JFBEHCJN.js";import"./chunk-2L3A5NKZ.js";import"./chunk-QSCXXNC2.js";import"./chunk-6PIIUAZF.js";import"./chunk-Z777GGHB.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-6NFOH4AC.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GMTHZUZ3.js";import{n as T,o as _,p as E}from"./chunk-UJLULWSR.js";import"./chunk-ZCRZFAOT.js";import{a as b}from"./chunk-GGV336P5.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-E47GFYXA.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import{a as k}from"./chunk-VZA7BPCK.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-QMOGBKJM.js";import"./chunk-UR6MHSHU.js";import{resolve as ne}from"path";import{existsSync as oe}from"fs";function W(){return{register:(t,o)=>T(t,o),deregister:t=>_(t),cleanup:(t,o)=>E(t,o),remoteLogger:null}}function se(t){if(t.mode!=="agent")return t;let{mode:o,...r}=t;return{...r,agent:!0}}async function Ae(t,o){let r=se(o);if(r.overrideStartUrl!==void 0){let e=U(r.overrideStartUrl);if(!e.ok)return process.stderr.write(e.message),2;r.overrideStartUrl=e.url}let n=ne(t);if(!oe(n))return process.stderr.write(`error: file not found: ${n}
|
|
3
|
+
`),2;if(r.finalValidation!==void 0&&r.finalValidation!=="on"&&r.finalValidation!=="off")return process.stderr.write(`error: --final-validation must be 'on' or 'off'
|
|
4
|
+
`),2;if(!n.endsWith("_test.md"))return process.stderr.write(`error: not a *_test.md file: ${n}
|
|
5
|
+
helpers are import-only \u2014 run a test that @imports it.
|
|
6
|
+
`),2;N(n);let i=!process.stdin.isTTY||!!r.agent;$({verb:"testmd",mode:i?"agent":"interactive"});let m=i?D("testmd"):null,c=W(),s;try{s=V(n)}catch(e){return process.stderr.write(`error: ${e.message}
|
|
7
|
+
`),2}for(let e of s.warnings)process.stderr.write(`warn: ${e}
|
|
8
|
+
`);if(s.steps.length===0)return process.stderr.write(`info: no steps in ${n}; nothing to run.
|
|
9
|
+
`),0;let f;try{f=ie(r)}catch(e){if(e instanceof u)return process.stderr.write(e.message),e.exitCode;throw e}let a=new k,v=new A,G=!!(r.username&&r.accessKey);await K({isInteractive:!!process.stdin.isTTY&&!r.agent&&!G,creds:a,config:v,...I(n)!==null?{authOnly:!0}:{}});let C=a.getActiveProfile()??"default",l=r.env??void 0??a.getDefaultEnv()??"prod",Z=b(l),q="v16-alpha",x=L(l),S,g={files:r.policy??[],ids:r.policyId??[]};if(g.files.length+g.ids.length>0){let e=await M(g,{cwd:process.cwd(),catalogYaml:(await x).yaml,fetchPolicy:P({env:l,profile:C,username:r.username,accessKey:r.accessKey})});if(!e.ok)return process.stderr.write(`error: ${e.message}
|
|
10
|
+
`),2;for(let d of e.warnings)process.stderr.write(`warn: policy ${d}
|
|
11
|
+
`);S=e.policies}let y;try{y=await j({creds:a,env:l,usernameFlag:r.username,accessKeyFlag:r.accessKey,log:()=>{}})}catch(e){return e instanceof h&&e.code==="not_authenticated"?process.stderr.write(`error: Not authenticated. Choose one:
|
|
12
|
+
\u2022 Pass credentials inline: --username <user> --access-key <key>
|
|
13
|
+
\u2022 Run 'kane-cli login --oauth' (browser-based)
|
|
14
|
+
\u2022 Run 'kane-cli login --username <user> --access-key <key>'
|
|
15
|
+
`):e instanceof h&&e.code==="refresh_failed"?process.stderr.write(`error: Token refresh failed. Run 'kane-cli login' to re-authenticate.
|
|
16
|
+
`):process.stderr.write(`error: auth resolution failed: ${e.message}
|
|
17
|
+
`),2}let R=String(y.resolvedCreds?.org_id??"");if(!R)return process.stderr.write("error: TMS did not return an org_id. Run `kane-cli login` again.\n"),2;{let{readMetaIfExists:e,assertOrgMatchOrExit:d}=await import("./testmd-actions-V7P7BMKE.js"),p=d(e(n),R);if(p!==null)return p}let w=new O;m?.attachSessionDir(w.sessionDir);let z=H({isAgent:i,log:(e,d,p,J)=>w.log(e,d,p,J)}),B={path:n,cwd:process.cwd(),opts:r,isAgent:i,disableAskUser:!0,resolved:s,resolvedAuth:y,cliOverrides:f,environment:l,envConfig:Z,profile:C,model:q,creds:a,configStore:v,session:w,evidenceCatalog:x,policies:S};try{return(await Y(B,z,c)).exitCode}catch(e){return process.stderr.write(`error: ${e.message}
|
|
18
|
+
`),2}finally{await F()}}var u=class extends Error{constructor(r,n){super(r);this.exitCode=n;this.name="CliArgError"}};function ie(t){let o={mode:"mode",assertionMode:"assertion_mode",finalValidation:"final_validation",maxSteps:"max_steps",timeout:"timeout",globalContext:"global_context",localContext:"local_context",codeExport:"code_export",codeLanguage:"code_language",headless:"headless",cdpEndpoint:"cdp_endpoint",wsEndpoint:"ws_endpoint"},r=new Set(["max_steps","timeout"]),n={};for(let[i,m]of Object.entries(o)){let c=t[i];if(c===void 0||c==="")continue;let s=c;if(r.has(m)&&(s=Number(c),Number.isNaN(s))){let f="--"+i.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());throw new u(`error: ${f} must be a number
|
|
19
|
+
`,2)}n[m]=s}return n}export{se as agentModeAlias,te as applyCliStepConfig,X as buildStepRunVariables,Q as buildTestLevelVariables,ie as optsToOverrides,ee as replayVariablesForStep,re as resolveStepMaxSteps,Ae as runTestMdFile};
|