@testmuai/kane-cli 0.9.0 → 0.10.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChatSurface-6NZGMNHL.js +2 -0
- package/dist/ChromeProfilePicker-M4WXOB5O.js +2 -0
- package/dist/CliFeedbackPrompt-6MJA7DF6.js +2 -0
- package/dist/CliUploadProgress-6NLS7XHH.js +2 -0
- package/dist/ConfigView-O4WKZ5PU.js +2 -0
- package/dist/EvidenceViewOffer-WIEWCZUP.js +2 -0
- package/dist/FolderPicker-AF7ZMV3M.js +2 -0
- package/dist/InfoBox-D7GGZJU4.js +2 -0
- package/dist/LinksBox-DXP66H3H.js +2 -0
- package/dist/ProfilesView-TWOY5PVC.js +2 -0
- package/dist/ProjectPicker-OBYHJJLU.js +2 -0
- package/dist/SaveSessionPrompt-7XSHS4NL.js +2 -0
- package/dist/ScrollbackTap-4SPXGFMU.js +2 -0
- package/dist/SingleShotApp-XQUDR36R.js +2 -0
- package/dist/SummaryBox-IA2KS6GT.js +2 -0
- package/dist/TestMdRunView-LS2QUFWR.js +2 -0
- package/dist/TestrunEvidenceTable-HNDVJDIF.js +2 -0
- package/dist/WhoamiView-SNL75TEF.js +2 -0
- package/dist/{agent-parse-2MLJOJTH.js → agent-parse-CAS45UKA.js} +1 -1
- package/dist/app-client-U2YYF65L.js +2 -0
- package/dist/app-download-UI4ABEIX.js +2 -0
- package/dist/assurance-job-FFSSS4XV.js +7 -0
- package/dist/auth-7Z54TMQQ.js +2 -0
- package/dist/{binary-LVHXED3O.js → binary-THPLXCOD.js} +1 -1
- package/dist/bind-4XWK3DG2.js +2 -0
- package/dist/bootstrap-6ACT4ALI.js +2 -0
- package/dist/bridge-T6QMYKED.js +2 -0
- package/dist/build-5ZN47FAT.js +2 -0
- package/dist/catalog-MYPS2BXY.js +2 -0
- package/dist/{changelog-N5AZHXOS.js → changelog-SU674BVE.js} +1 -1
- package/dist/chat-committer-ZCSRJEUB.js +2 -0
- package/dist/chat-controller-XINCDH6Z.js +2 -0
- package/dist/child-G2GCW73X.js +2 -0
- package/dist/chunk-22PIMG52.js +2 -0
- package/dist/chunk-2DYHAP4E.js +2 -0
- package/dist/chunk-2TVPA3LL.js +2 -0
- package/dist/{chunk-FMUV6UCX.js → chunk-2XW33VOK.js} +1 -1
- package/dist/chunk-33DWJV67.js +235 -0
- package/dist/chunk-34R7BNZ2.js +2 -0
- package/dist/chunk-35ECWCCK.js +2 -0
- package/dist/{chunk-OHOJSADN.js → chunk-36N3EHW5.js} +1 -1
- package/dist/chunk-3BSYOCSW.js +3 -0
- package/dist/chunk-3E4ZO73O.js +6 -0
- package/dist/chunk-3F5FMH76.js +2 -0
- package/dist/chunk-3G2LSTK5.js +2 -0
- package/dist/chunk-3GXN6VF6.js +2 -0
- package/dist/chunk-3JLEDSG5.js +4 -0
- package/dist/chunk-3OQW2GTA.js +2 -0
- package/dist/chunk-3QICDXY5.js +5 -0
- package/dist/chunk-3RJHXOZH.js +3 -0
- package/dist/{chunk-Q5RDCSYM.js → chunk-3YTCKCBG.js} +1 -1
- package/dist/chunk-42PALMW2.js +4 -0
- package/dist/chunk-44B6THYK.js +2 -0
- package/dist/chunk-457Y5TEC.js +19 -0
- package/dist/chunk-47WQBG5I.js +6 -0
- package/dist/chunk-4I7YN6YY.js +3 -0
- package/dist/chunk-4IEQNX7F.js +2 -0
- package/dist/chunk-4LTHDJ3D.js +2 -0
- package/dist/chunk-4QFTHUJA.js +34 -0
- package/dist/chunk-4QTH7VYE.js +2 -0
- package/dist/chunk-4YW767UV.js +47 -0
- package/dist/chunk-54XA5MZH.js +2 -0
- package/dist/chunk-5AKJPYUW.js +11 -0
- package/dist/{chunk-AKE2CTV6.js → chunk-5D7ENQTQ.js} +1 -1
- package/dist/chunk-63EKRZKI.js +2 -0
- package/dist/{chunk-EHN5HTUD.js → chunk-65VANXOF.js} +51 -51
- package/dist/{chunk-J3BGYSMD.js → chunk-6DZX5HLZ.js} +8 -8
- package/dist/{chunk-YBAVDT3G.js → chunk-6EB5VRAN.js} +1 -1
- package/dist/chunk-6NFOH4AC.js +4 -0
- package/dist/chunk-6PIIUAZF.js +3 -0
- package/dist/chunk-6UVIY56J.js +2 -0
- package/dist/chunk-72KYMWQ5.js +2 -0
- package/dist/chunk-72RC7JSA.js +21 -0
- package/dist/chunk-734ORT6O.js +4 -0
- package/dist/chunk-77ZZQJLX.js +2 -0
- package/dist/chunk-7AET4JKQ.js +2 -0
- package/dist/chunk-7DFBOVUB.js +2 -0
- package/dist/chunk-7HMSMAUG.js +29 -0
- package/dist/chunk-7HO4NX5W.js +1 -0
- package/dist/chunk-7KX2BHKG.js +2 -0
- package/dist/{chunk-ULGZPRKU.js → chunk-7NCJMWFX.js} +1 -1
- package/dist/chunk-7NPTL66J.js +2 -0
- package/dist/chunk-7RWP4Y3H.js +2 -0
- package/dist/{chunk-PCKIANML.js → chunk-7SY34IIL.js} +1 -1
- package/dist/chunk-7V4BQSSV.js +2 -0
- package/dist/chunk-7XBNMOH4.js +6 -0
- package/dist/{chunk-SOCHN2PY.js → chunk-7YT4TTKL.js} +1 -1
- package/dist/{chunk-C25M2J5Q.js → chunk-ACMBMZDQ.js} +1 -1
- package/dist/chunk-AEWNWAXW.js +18 -0
- package/dist/chunk-AQ2OG2EF.js +2 -0
- package/dist/chunk-AUJSC7PU.js +4 -0
- package/dist/chunk-AVI5H4UM.js +13 -0
- package/dist/chunk-AVSMXDTX.js +2 -0
- package/dist/chunk-AZLNLHUA.js +4 -0
- package/dist/{chunk-HGFWIBVF.js → chunk-B7ZX5HEN.js} +5 -5
- package/dist/{chunk-66MOZKD2.js → chunk-BSRSXYDZ.js} +1 -1
- package/dist/chunk-BWXLZS5O.js +2 -0
- package/dist/chunk-BY65QAAN.js +4 -0
- package/dist/chunk-C2RUDJ46.js +2 -0
- package/dist/chunk-C5Z7MQE6.js +2 -0
- package/dist/{chunk-WDMUPK6I.js → chunk-C62QWG4B.js} +1 -1
- package/dist/chunk-C6HI6Y3S.js +2 -0
- package/dist/chunk-CB4ARIHR.js +2 -0
- package/dist/{chunk-7WXMV3O3.js → chunk-CCP4X75B.js} +1 -1
- package/dist/chunk-CGITGJ3I.js +4 -0
- package/dist/chunk-CM4CHYSN.js +2 -0
- package/dist/{chunk-ZXY4P76I.js → chunk-CUXY6KQ2.js} +1 -1
- package/dist/chunk-D36V5OX6.js +2 -0
- package/dist/chunk-D756UWY2.js +6 -0
- package/dist/chunk-D7TKE7LK.js +2 -0
- package/dist/{chunk-UWXDURAB.js → chunk-D7U2M26S.js} +1 -1
- package/dist/chunk-DBMW3VUN.js +4 -0
- package/dist/chunk-DDZLCAEO.js +5 -0
- package/dist/chunk-DJC7NTLA.js +3 -0
- package/dist/chunk-DPGOAFKF.js +2 -0
- package/dist/chunk-DREQ3RAA.js +2 -0
- package/dist/chunk-DTUPEKEO.js +2 -0
- package/dist/chunk-DZOYYWOW.js +2 -0
- package/dist/chunk-E6KSRQXL.js +8 -0
- package/dist/chunk-EBPRPNSA.js +2 -0
- package/dist/chunk-ECPFI75W.js +5 -0
- package/dist/chunk-EECDDDSB.js +3 -0
- package/dist/chunk-EF47KRUK.js +2 -0
- package/dist/chunk-ETZMFRD6.js +2 -0
- package/dist/chunk-EZN7CF45.js +4 -0
- package/dist/{chunk-CNUCP6DK.js → chunk-F22K3RRX.js} +1 -1
- package/dist/{chunk-WRSIKZ2V.js → chunk-F5NHG7VB.js} +1 -1
- package/dist/{chunk-DHJSM5DT.js → chunk-FCD3NYOM.js} +1 -1
- package/dist/chunk-FIP5L6LV.js +9 -0
- package/dist/chunk-FOJHSG5M.js +6 -0
- package/dist/chunk-FSYOTRMC.js +2 -0
- package/dist/chunk-FWDUVFS6.js +26 -0
- package/dist/chunk-FWUPJORV.js +6 -0
- package/dist/chunk-GFLB2SHW.js +2 -0
- package/dist/chunk-GMTHZUZ3.js +2 -0
- package/dist/chunk-GQRU3B54.js +1397 -0
- package/dist/chunk-GRURFGBP.js +2 -0
- package/dist/chunk-GXKY5A46.js +9 -0
- package/dist/chunk-HAW5WEKT.js +13 -0
- package/dist/chunk-HCJ2N3XB.js +12 -0
- package/dist/chunk-HHW6MRU3.js +6 -0
- package/dist/chunk-HIUAUZNL.js +2 -0
- package/dist/chunk-HJLMH7ZM.js +2 -0
- package/dist/{chunk-YWYORBY3.js → chunk-HJMCXSUJ.js} +1 -1
- package/dist/chunk-HK62JVQM.js +3 -0
- package/dist/{chunk-5GUD3CIH.js → chunk-HQ2E2XCU.js} +1 -1
- package/dist/chunk-I2MC6VVX.js +2 -0
- package/dist/chunk-I4RVVBG3.js +10 -0
- package/dist/chunk-I4WXALQR.js +2 -0
- package/dist/chunk-ICLUC44J.js +2 -0
- package/dist/{chunk-6HU5M2DS.js → chunk-IGEAET7M.js} +1 -1
- package/dist/{chunk-GCISXCDU.js → chunk-IINZZ4BZ.js} +1 -1
- package/dist/chunk-IJ2AHSWW.js +2 -0
- package/dist/{chunk-CSNJPD2J.js → chunk-IUQOG7Z5.js} +3 -3
- package/dist/chunk-IZ65ZPWY.js +3 -0
- package/dist/chunk-JGRXMTME.js +15 -0
- package/dist/{chunk-NBXYL2JT.js → chunk-JIRNI5TB.js} +7 -7
- package/dist/chunk-JNSWKGTB.js +2 -0
- package/dist/chunk-JZP3Y4ZM.js +2 -0
- package/dist/chunk-KF4DKXSS.js +2 -0
- package/dist/chunk-KGNE5CIM.js +2 -0
- package/dist/chunk-KM3YCIDV.js +3 -0
- package/dist/{chunk-HAYV4D2I.js → chunk-KODJVOCN.js} +1 -1
- package/dist/chunk-KU3YHPWZ.js +2 -0
- package/dist/{chunk-M3UAZTDK.js → chunk-KXHJMAZU.js} +2 -2
- package/dist/chunk-L5DALV5N.js +2 -0
- package/dist/chunk-LAOTVZHV.js +6 -0
- package/dist/chunk-LCSJ7GOG.js +2 -0
- package/dist/{chunk-DWMESHFI.js → chunk-LIGTP3A3.js} +1 -1
- package/dist/chunk-LKQFG4RW.js +5 -0
- package/dist/{chunk-EBLXHOE3.js → chunk-LQQNPMOD.js} +1 -1
- package/dist/chunk-LSDJOVWW.js +6 -0
- package/dist/{chunk-C6S2RPZA.js → chunk-LUR7JFPP.js} +1 -1
- package/dist/chunk-LUZBGTYB.js +2 -0
- package/dist/chunk-LX2I4JEH.js +2 -0
- package/dist/{chunk-7GAHJZLH.js → chunk-M43WH5DQ.js} +1 -1
- package/dist/chunk-MEKPGQAM.js +21 -0
- package/dist/chunk-MNBGG4H3.js +16 -0
- package/dist/chunk-MYVKUJGS.js +2 -0
- package/dist/chunk-MYZHOBS4.js +2 -0
- package/dist/chunk-NC7D7GOM.js +21 -0
- package/dist/chunk-NIVFEACM.js +2 -0
- package/dist/chunk-NLZZLANH.js +4 -0
- package/dist/{chunk-XT7XA4DN.js → chunk-NXAJBSIF.js} +1 -1
- package/dist/chunk-NXRF7FFS.js +2 -0
- package/dist/chunk-NZ6AV2TA.js +4 -0
- package/dist/chunk-O3HHTKZ5.js +6 -0
- package/dist/chunk-OCDBTAYS.js +12 -0
- package/dist/chunk-OFSDB7B4.js +3 -0
- package/dist/{chunk-Q5CINJYL.js → chunk-OGFU4YY4.js} +1 -1
- package/dist/chunk-OJ33Q6DU.js +2 -0
- package/dist/chunk-P2ZQDQDB.js +2 -0
- package/dist/{chunk-KXEE6VCA.js → chunk-P3JXJ4BW.js} +1 -1
- package/dist/chunk-PAWQ4AKN.js +2 -0
- package/dist/chunk-PUVMC4PX.js +26 -0
- package/dist/{chunk-SEEEGDVK.js → chunk-PZA3BSOE.js} +1 -1
- package/dist/chunk-Q3C6NDGI.js +2 -0
- package/dist/chunk-QBYENBMB.js +2 -0
- package/dist/chunk-QDFY5GGO.js +5 -0
- package/dist/chunk-QDXKEOKI.js +16 -0
- package/dist/{chunk-6VY62QC2.js → chunk-QENCC2ZS.js} +1 -1
- package/dist/chunk-QI5RZ7LL.js +2 -0
- package/dist/chunk-QXQ7KVEN.js +2 -0
- package/dist/chunk-R4JUKTDO.js +2 -0
- package/dist/chunk-R7KXAISS.js +12 -0
- package/dist/chunk-RDP7GWSY.js +2 -0
- package/dist/chunk-REKHAN53.js +5 -0
- package/dist/chunk-RF37IJNN.js +2 -0
- package/dist/{chunk-KWEOLPBJ.js → chunk-RFEON5GN.js} +1 -1
- package/dist/chunk-RHGW7B5Q.js +2 -0
- package/dist/chunk-RPRXRKKR.js +2 -0
- package/dist/{chunk-EOA6YPES.js → chunk-RTVHJ23A.js} +4 -4
- package/dist/chunk-RTVWQK7I.js +2 -0
- package/dist/chunk-RX6776AI.js +5 -0
- package/dist/{chunk-F7NSSQYZ.js → chunk-SGPAM5DZ.js} +1 -1
- package/dist/chunk-SMTBOSEJ.js +2 -0
- package/dist/chunk-SMXABALN.js +2 -0
- package/dist/{chunk-TM7VRLWS.js → chunk-SXRHKXSE.js} +1 -1
- package/dist/chunk-TNORODUF.js +2 -0
- package/dist/chunk-TU42YZOJ.js +6 -0
- package/dist/chunk-TU7TVFBK.js +2 -0
- package/dist/chunk-TW5AA5A7.js +8 -0
- package/dist/chunk-UEE3RZN4.js +14 -0
- package/dist/chunk-URH4FX3H.js +2 -0
- package/dist/chunk-UTM7D4PI.js +2 -0
- package/dist/chunk-UUJIGOEO.js +2 -0
- package/dist/chunk-UYDHOHSZ.js +2 -0
- package/dist/{chunk-4BZOG6PE.js → chunk-V7USCQWO.js} +1 -1
- package/dist/chunk-VJGWVBZR.js +1 -0
- package/dist/chunk-VLDCHFXF.js +2 -0
- package/dist/chunk-VO66KP2W.js +2 -0
- package/dist/chunk-VRIZDOO5.js +2 -0
- package/dist/{chunk-DOOI2JBD.js → chunk-VSVWNRI2.js} +1 -1
- package/dist/chunk-VUFIL5VR.js +6 -0
- package/dist/chunk-VX657KIK.js +2 -0
- package/dist/chunk-VXGN3IV7.js +2 -0
- package/dist/chunk-VZ4A6WMK.js +97 -0
- package/dist/chunk-VZJ6LUXX.js +2 -0
- package/dist/{chunk-RWSOZPJQ.js → chunk-W4QSZNMB.js} +1 -1
- package/dist/chunk-W54OT2FU.js +9 -0
- package/dist/{chunk-BL3SJDCG.js → chunk-W6HZF56M.js} +1 -1
- package/dist/chunk-W72ACCFL.js +27 -0
- package/dist/chunk-W7FLXW6Q.js +5 -0
- package/dist/chunk-WAOUE7MP.js +9 -0
- package/dist/chunk-WEIPY3CI.js +16 -0
- package/dist/chunk-WMGKUERB.js +6 -0
- package/dist/{chunk-DFS4RMVP.js → chunk-WN5VKKJ3.js} +1 -1
- package/dist/chunk-WOSANGV6.js +5 -0
- package/dist/{chunk-K3IQEL7R.js → chunk-WXJCJL5L.js} +1 -1
- package/dist/chunk-WZXPF3BI.js +2 -0
- package/dist/chunk-XB6BJPDL.js +2 -0
- package/dist/{chunk-4FHK4LKQ.js → chunk-XLEGGC4Y.js} +1 -1
- package/dist/chunk-XMPTFXPW.js +5 -0
- package/dist/chunk-XQMWHPZI.js +3 -0
- package/dist/{chunk-75MMTNPB.js → chunk-XRNQSXOM.js} +2 -2
- package/dist/{chunk-2PKME4VT.js → chunk-XZGEN4NU.js} +4 -4
- package/dist/chunk-XZYA7DNH.js +2 -0
- package/dist/{chunk-OIUV3ISA.js → chunk-Y6Y6RAY4.js} +1 -1
- package/dist/chunk-Y7E5L42F.js +3 -0
- package/dist/{chunk-GFBAK7WQ.js → chunk-YAW6JW6D.js} +7 -7
- package/dist/chunk-YDPTSDIJ.js +2 -0
- package/dist/chunk-YDSGXB25.js +2 -0
- package/dist/chunk-YGRULEZY.js +2 -0
- package/dist/chunk-YHFZFV3A.js +22 -0
- package/dist/chunk-YIKF4ERQ.js +375 -0
- package/dist/chunk-YLXWAY7D.js +2 -0
- package/dist/{chunk-UA2QDAWT.js → chunk-YPFQ4UGF.js} +1 -1
- package/dist/{chunk-4CYBXJIA.js → chunk-YQ5C6UDG.js} +1 -1
- package/dist/chunk-Z55KBMYV.js +2 -0
- package/dist/chunk-ZAFJQ3SM.js +2 -0
- package/dist/chunk-ZCRZFAOT.js +2 -0
- package/dist/chunk-ZFM77AQU.js +2 -0
- package/dist/{chunk-Q6F23V7L.js → chunk-ZFMRQ57Y.js} +1 -1
- package/dist/chunk-ZHWU6L2G.js +5 -0
- package/dist/chunk-ZTHYAHDN.js +17 -0
- package/dist/{chunk-X2A6CC6B.js → chunk-ZTRRFG52.js} +1 -1
- package/dist/chunk-ZU4W2QGM.js +3 -0
- package/dist/committer-JGY66PFM.js +2 -0
- package/dist/config-754B73XK.js +2 -0
- package/dist/controller-client-PB3AZAGG.js +2 -0
- package/dist/cover-cmd-NBNZCR6C.js +2 -0
- package/dist/{credentials-QD32Y7K7.js → credentials-F7DYLVWY.js} +1 -1
- package/dist/{deps-bundle-OI7JJ22L.js → deps-bundle-PW3WEQJ7.js} +1 -1
- package/dist/{deps-resolve-ZOALDS6H.js → deps-resolve-SQYVN76L.js} +1 -1
- package/dist/descriptor-7T32VRMB.js +2 -0
- package/dist/design-chat-F3OEZPNJ.js +2 -0
- package/dist/design-committer-TRYP3LOZ.js +2 -0
- package/dist/design-headless-OTHYOX3E.js +2 -0
- package/dist/design-remote-2BEGCVCX.js +3 -0
- package/dist/device-env-CHFRRV6W.js +2 -0
- package/dist/dispatch-DVQ3H7EJ.js +2 -0
- package/dist/doctor-XY26Z35T.js +2 -0
- package/dist/docx-convert-6IZO5P5K.js +2 -0
- package/dist/{dossier-7HVC6BNK.js → dossier-NROC2MCY.js} +1 -1
- package/dist/evidence-P6FFKC7B.js +2 -0
- package/dist/evidence-presentation-YYTIDCBS.js +2 -0
- package/dist/evolve-cmd-WWOB3QJR.js +2 -0
- package/dist/evolve-remote-WLVY3QID.js +2 -0
- package/dist/{exit-manager-ZLDO54S4.js → exit-manager-EDHCETUN.js} +1 -1
- package/dist/explain-DGJ5T6V5.js +2 -0
- package/dist/explain-cmd-OP5I5W3O.js +12 -0
- package/dist/explain-cmd-VYAANFFZ.js +4 -0
- package/dist/explore-K5YBGHK6.js +2 -0
- package/dist/explore-context-tty-RZ7D2TBV.js +2 -0
- package/dist/explore-entry-EKXJ67BD.js +6 -0
- package/dist/explore-live-2YVRAQZO.js +5 -0
- package/dist/explore-run-tty-D47FGPX7.js +5 -0
- package/dist/extract-bind-W2NET364.js +14 -0
- package/dist/extract-chat-M65NWGUK.js +2 -0
- package/dist/extract-cmd-FTFLETOP.js +6 -0
- package/dist/extract-headless-G6W6JQ27.js +2 -0
- package/dist/feeder-NY45UFJK.js +2 -0
- package/dist/folder-flags-KKIH654K.js +2 -0
- package/dist/gaps-cmd-OIDDLRYL.js +3 -0
- package/dist/gate-7AKRPRMK.js +2 -0
- package/dist/gate-WISOUTHQ.js +2 -0
- package/dist/{generate-headless-6WMJYNI6.js → generate-headless-RURIEKVS.js} +3 -3
- package/dist/headless-io-FFM5T6KL.js +2 -0
- package/dist/hold-passthrough-IOWPVB4W.js +2 -0
- package/dist/identity-HL5CJJXR.js +2 -0
- package/dist/index.js +178 -160
- package/dist/ingest-PDGS5ZTL.js +2 -0
- package/dist/ingest-cmd-4G2AK4Y2.js +8 -0
- package/dist/ingest-remote-SSLUHQVG.js +2 -0
- package/dist/ink-screen-RZ7QDIUI.js +2 -0
- package/dist/install-ZVBHPXGP.js +2 -0
- package/dist/interactive-bind-SI2ZS55Q.js +26 -0
- package/dist/interactive-remote-J56EWJGA.js +65 -0
- package/dist/interrupt-guard-QETBPINI.js +2 -0
- package/dist/lane-AQYRIW24.js +2 -0
- package/dist/lattice-auth-6FEVSR7E.js +2 -0
- package/dist/lifecycle-cmd-HJ37LTXE.js +2 -0
- package/dist/list-cmd-6XL2FYLQ.js +3 -0
- package/dist/list-commands-5DCCKU3L.js +2 -0
- package/dist/list-remote-LXPQNXYN.js +15 -0
- package/dist/locks-cmd-JJ2QNTNY.js +2 -0
- package/dist/logical-ids-RXAQJZ3T.js +2 -0
- package/dist/login-flow-WEK3E476.js +2 -0
- package/dist/maintenance-cmd-BXXHP36K.js +2 -0
- package/dist/mobile-prompts-CECJ5UY2.js +2 -0
- package/dist/{next-KZXH4UA4.js → next-O6SUSX3R.js} +1 -1
- package/dist/{objective-variable-gate-CG2KK5UX.js → objective-variable-gate-3Z7DNVVC.js} +1 -1
- package/dist/onboarding-PDVYMTY5.js +5 -0
- package/dist/open-provider-OZAG6WZS.js +2 -0
- package/dist/{paths-JCYX6UWL.js → paths-UMIX3RJF.js} +1 -1
- package/dist/pdf-convert-447ACUB3.js +2 -0
- package/dist/persist-recorded-session-A3ID7JFA.js +3 -0
- package/dist/phase-seed-LCJ4WSYV.js +2 -0
- package/dist/pipeline-GX3LKPI5.js +2 -0
- package/dist/prepare-target-FMT6QFHZ.js +2 -0
- package/dist/pull-cmd-UPFQYUND.js +2 -0
- package/dist/pull-route-FWBXJMR7.js +2 -0
- package/dist/readmodel-INMP6MNW.js +2 -0
- package/dist/real-device-run-X7JJWOIK.js +2 -0
- package/dist/reconcile-cmd-JBH365JL.js +5 -0
- package/dist/reconcile-deps-TWJ3FTSU.js +2 -0
- package/dist/reconcile-remote-BCX6SWFC.js +13 -0
- package/dist/recording-banner-YKBAL6UB.js +2 -0
- package/dist/registry-VQC757MJ.js +2 -0
- package/dist/remote-entry-X6JMPC2K.js +2 -0
- package/dist/remote-mode-FDPA7EWG.js +4 -0
- package/dist/remote-words-YVB66R3F.js +2 -0
- package/dist/require-project-folder-MLMEQJYP.js +2 -0
- package/dist/resolve-run-intent-PC7TQZUL.js +2 -0
- package/dist/resolver-EID34LQE.js +2 -0
- package/dist/revert-FHOBLZWF.js +2 -0
- package/dist/review-cmd-EUHFLFMY.js +5 -0
- package/dist/run-5RQUCNYP.js +2 -0
- package/dist/run-PC5YO4AS.js +2 -0
- package/dist/run-channel-63SVP5OI.js +2 -0
- package/dist/run-remote-SJCRTL7O.js +2 -0
- package/dist/run-startup-gate-YO66G6LS.js +2 -0
- package/dist/run-test-md-BLNBK4MH.js +17 -0
- package/dist/scrollback-GGNBDFQV.js +2 -0
- package/dist/session-target-DD53UXO7.js +2 -0
- package/dist/session-worker.js +12 -0
- package/dist/sessions-CFV7FOIT.js +2 -0
- package/dist/sessions-cmd-S7WZBUCN.js +26 -0
- package/dist/sessions-remote-IWHWIQ2T.js +3 -0
- package/dist/shell-arg-FN3MT5U7.js +2 -0
- package/dist/{skill-installer-32YYMM4N.js → skill-installer-MAVQY6GW.js} +1 -1
- package/dist/spawner-C7NLLM4F.js +2 -0
- package/dist/store-MSA7KASS.js +2 -0
- package/dist/store-choice-3OJCV26J.js +2 -0
- package/dist/store-guard-OOSDLMEC.js +2 -0
- package/dist/store-id-YZ5WKJ25.js +2 -0
- package/dist/store-site-KA2DNBGY.js +2 -0
- package/dist/stream-warnings-GEQKKJU7.js +2 -0
- package/dist/structured-answers-EQ2AP3F7.js +2 -0
- package/dist/sync-cmd-RDFDMVKQ.js +2 -0
- package/dist/sync-setup-RBRDUV7Q.js +2 -0
- package/dist/{sync-setup-ui-RC727VK6.js → sync-setup-ui-XITPGSO4.js} +2 -2
- package/dist/tcg-generate-KIECTZ2C.js +2 -0
- package/dist/test-definition-VRI4YIYL.js +2 -0
- package/dist/testmd-actions-CMAG6HWI.js +2 -0
- package/dist/testmd-sync-UPAA5UMD.js +2 -0
- package/dist/tms-client-NXAB6VJD.js +2 -0
- package/dist/token-refresh-KP3AYMYK.js +2 -0
- package/dist/trust-gate-AT2XBWN4.js +2 -0
- package/dist/turn-preflight-LHYLRL7G.js +2 -0
- package/dist/ui-SNV3FD2G.js +4 -0
- package/dist/use-case-ref-NE4X4MZN.js +2 -0
- package/dist/validate-basic-M5JHHNZA.js +2 -0
- package/dist/{variable-receipt-YWNS24TH.js → variable-receipt-BXSZO36E.js} +1 -1
- package/dist/verdicts-XK3GAUX3.js +2 -0
- package/dist/version-check-Q737BE65.js +2 -0
- package/dist/{view-cmd-3WHG6MVB.js → view-cmd-XSNL5DGI.js} +4 -3
- package/dist/walk-session-SHGYLFRB.js +2 -0
- package/dist/with-telemetry-PM2HVN2B.js +2 -0
- package/package.json +11 -11
- package/dist/ChatSurface-FJPK3XEJ.js +0 -8
- package/dist/ChromeProfilePicker-7DUDJTE2.js +0 -2
- package/dist/CliFeedbackPrompt-ZZPYC6OS.js +0 -2
- package/dist/CliUploadProgress-WQYKIBAR.js +0 -2
- package/dist/ConfigView-KXNOODDW.js +0 -2
- package/dist/EvidenceViewOffer-BTBVPBZX.js +0 -2
- package/dist/FolderPicker-H4YEX5LV.js +0 -2
- package/dist/InfoBox-DTM7X24Z.js +0 -2
- package/dist/LinksBox-KFG3FVOT.js +0 -2
- package/dist/ProfilesView-KBZHT4KL.js +0 -2
- package/dist/ProjectPicker-OARWULNN.js +0 -2
- package/dist/SaveSessionPrompt-37SMU5MC.js +0 -2
- package/dist/ScrollbackTap-QHJOFYMC.js +0 -2
- package/dist/SingleShotApp-UYCAW65Y.js +0 -2
- package/dist/SummaryBox-6RB5DSAH.js +0 -2
- package/dist/TestMdRunView-ZMOII3PL.js +0 -2
- package/dist/TestrunEvidenceTable-3UP2EYIV.js +0 -2
- package/dist/WhoamiView-MC62GERR.js +0 -2
- package/dist/app-client-PQFJAB63.js +0 -2
- package/dist/app-download-P6YXWSVQ.js +0 -2
- package/dist/auth-LXW4OFKF.js +0 -2
- package/dist/bind-ZYESQSCJ.js +0 -15
- package/dist/bootstrap-DI4UGMH3.js +0 -2
- package/dist/bridge-7J3JE3JS.js +0 -2
- package/dist/build-JIKYOZUH.js +0 -2
- package/dist/catalog-LLME3744.js +0 -2
- package/dist/chat-committer-6D7AQI6Z.js +0 -2
- package/dist/chat-controller-UJQ6Z4RE.js +0 -2
- package/dist/chunk-243ZJHT6.js +0 -4
- package/dist/chunk-2KVECC36.js +0 -2
- package/dist/chunk-2YEHV2CX.js +0 -2
- package/dist/chunk-3MCPTVJX.js +0 -2
- package/dist/chunk-3UI5VTQS.js +0 -4
- package/dist/chunk-3VAU3PNU.js +0 -2
- package/dist/chunk-3YIZG7WZ.js +0 -3
- package/dist/chunk-4Y2WH77W.js +0 -2
- package/dist/chunk-5EOX4MEY.js +0 -2
- package/dist/chunk-5HMN74RZ.js +0 -9
- package/dist/chunk-5LJRZI7S.js +0 -6
- package/dist/chunk-5RCS2LIQ.js +0 -26
- package/dist/chunk-5TQFOPJV.js +0 -2
- package/dist/chunk-5ZFOKYFB.js +0 -5
- package/dist/chunk-63DYVWNX.js +0 -2
- package/dist/chunk-6MD7SR7D.js +0 -9
- package/dist/chunk-7N6OCHPC.js +0 -7
- package/dist/chunk-A2SQD2AY.js +0 -4
- package/dist/chunk-AACQE24F.js +0 -2
- package/dist/chunk-AHFIRHSP.js +0 -18
- package/dist/chunk-AJT34ESA.js +0 -38
- package/dist/chunk-AUMJ4RVA.js +0 -21
- package/dist/chunk-AXTPNZPX.js +0 -2
- package/dist/chunk-BB2W35TW.js +0 -2
- package/dist/chunk-BKM2LWU2.js +0 -3
- package/dist/chunk-BUPRL2TE.js +0 -2
- package/dist/chunk-C44QQJR4.js +0 -239
- package/dist/chunk-CW3RHKLA.js +0 -5
- package/dist/chunk-D6E6KRVX.js +0 -2
- package/dist/chunk-DTRKTBCE.js +0 -17
- package/dist/chunk-DTRSYWZE.js +0 -2
- package/dist/chunk-EVFFDODK.js +0 -5
- package/dist/chunk-F2OBORCG.js +0 -2
- package/dist/chunk-FQNQVC5O.js +0 -5
- package/dist/chunk-FY7TCYPK.js +0 -6
- package/dist/chunk-GTVQYT3D.js +0 -35
- package/dist/chunk-HG5LLZBU.js +0 -2
- package/dist/chunk-I7TIGB7K.js +0 -2
- package/dist/chunk-IICT4VOU.js +0 -2
- package/dist/chunk-ILDHE4P4.js +0 -6
- package/dist/chunk-IPXKUYUK.js +0 -2
- package/dist/chunk-JQY5HRZ4.js +0 -15
- package/dist/chunk-JX6BFEDO.js +0 -4
- package/dist/chunk-K2UJYY2U.js +0 -2
- package/dist/chunk-KBM3XHAM.js +0 -2
- package/dist/chunk-KDNNMU7Q.js +0 -4
- package/dist/chunk-KJQNAOOE.js +0 -6
- package/dist/chunk-LH4IPANP.js +0 -2
- package/dist/chunk-LLG7NEGX.js +0 -6
- package/dist/chunk-LSDWPG6C.js +0 -2
- package/dist/chunk-MSGW4JDG.js +0 -2
- package/dist/chunk-NJ4BXZBX.js +0 -2
- package/dist/chunk-NLCCBXXV.js +0 -2
- package/dist/chunk-NMSZ7G6P.js +0 -2
- package/dist/chunk-OC6H6BYI.js +0 -6
- package/dist/chunk-OJAXOOZ5.js +0 -8
- package/dist/chunk-OMNLAGQC.js +0 -29
- package/dist/chunk-OOCCUUR2.js +0 -2
- package/dist/chunk-OXC6O5O7.js +0 -2
- package/dist/chunk-OZQDD2EX.js +0 -94
- package/dist/chunk-PEDINHVU.js +0 -2
- package/dist/chunk-PNUAP3RY.js +0 -8
- package/dist/chunk-Q2F5QB2W.js +0 -2
- package/dist/chunk-Q4YYAN6E.js +0 -2
- package/dist/chunk-Q6AHSGOE.js +0 -5
- package/dist/chunk-QAB3Y5FQ.js +0 -4
- package/dist/chunk-RDHWNSDP.js +0 -7
- package/dist/chunk-RKXHVP2Z.js +0 -2
- package/dist/chunk-RRY5IXOB.js +0 -2
- package/dist/chunk-RSSOJ3L2.js +0 -21
- package/dist/chunk-RTSBKCZY.js +0 -16
- package/dist/chunk-SID4X77D.js +0 -370
- package/dist/chunk-SRTKRHYI.js +0 -12
- package/dist/chunk-T2ONUKTL.js +0 -5
- package/dist/chunk-U6OTFMIT.js +0 -4
- package/dist/chunk-UD7KKHPW.js +0 -5
- package/dist/chunk-USOYXCZ4.js +0 -2
- package/dist/chunk-USY7VAO6.js +0 -2
- package/dist/chunk-V4B5QA3U.js +0 -4
- package/dist/chunk-VBS33P2C.js +0 -2
- package/dist/chunk-VHW7BMZQ.js +0 -2
- package/dist/chunk-VIO7CCFW.js +0 -5
- package/dist/chunk-VORWZLS3.js +0 -9
- package/dist/chunk-VVOKM2VO.js +0 -2
- package/dist/chunk-W5TTF7GB.js +0 -6
- package/dist/chunk-WESMQEPO.js +0 -2
- package/dist/chunk-WMI4P76K.js +0 -27
- package/dist/chunk-WNOC6MQC.js +0 -2
- package/dist/chunk-WVHMPIDQ.js +0 -2
- package/dist/chunk-XBX643ZD.js +0 -2
- package/dist/chunk-XKHWWKJZ.js +0 -3
- package/dist/chunk-XLSOQLVT.js +0 -2
- package/dist/chunk-Y3ZYN6AK.js +0 -4
- package/dist/chunk-YCCUBQY4.js +0 -2
- package/dist/chunk-YKTYVJBN.js +0 -3
- package/dist/chunk-YLQHY4A7.js +0 -2
- package/dist/chunk-Z7IGTVJW.js +0 -2
- package/dist/chunk-ZC2CKWLB.js +0 -2
- package/dist/chunk-ZER3FZSZ.js +0 -22
- package/dist/chunk-ZJYT72BA.js +0 -9
- package/dist/chunk-ZKSN2SJ7.js +0 -2
- package/dist/chunk-ZLWURCJ7.js +0 -2
- package/dist/committer-2QPBANRD.js +0 -2
- package/dist/config-YGTHSGQN.js +0 -2
- package/dist/controller-client-ZF5IXRUV.js +0 -2
- package/dist/cover-cmd-6RO366CC.js +0 -3
- package/dist/descriptor-3JJUOHBM.js +0 -2
- package/dist/design-committer-D44GSUXY.js +0 -2
- package/dist/device-env-DXDJJMTL.js +0 -2
- package/dist/dispatch-7EWWQRQ5.js +0 -2
- package/dist/doctor-TPYPEEUL.js +0 -2
- package/dist/docx-convert-SQRTF7XS.js +0 -2
- package/dist/evidence-NPFTBGDF.js +0 -2
- package/dist/evidence-presentation-XF23B7F2.js +0 -2
- package/dist/evolve-cmd-VGVXV6XW.js +0 -2
- package/dist/explain-NEFBUX5G.js +0 -2
- package/dist/explain-cmd-GOP5TE63.js +0 -9
- package/dist/explain-cmd-M7IX2YNB.js +0 -3
- package/dist/extract-bind-CKIRLXAJ.js +0 -14
- package/dist/extract-cmd-3EWLSPGS.js +0 -5
- package/dist/feeder-66TUPB2R.js +0 -2
- package/dist/gaps-cmd-WVC5GXQC.js +0 -3
- package/dist/gate-OYRDJMF6.js +0 -2
- package/dist/headless-io-75HUMWZB.js +0 -2
- package/dist/identity-ADZ4PAJF.js +0 -2
- package/dist/ingest-OSNNM3DH.js +0 -2
- package/dist/ingest-cmd-AECK5T4H.js +0 -2
- package/dist/install-ZV3KJZV4.js +0 -2
- package/dist/interactive-bind-IYS6KDOH.js +0 -26
- package/dist/interrupt-guard-UREUWNRL.js +0 -2
- package/dist/lifecycle-cmd-XCSBELFQ.js +0 -2
- package/dist/list-cmd-S4DSN2ET.js +0 -3
- package/dist/list-commands-GLNGHPDU.js +0 -2
- package/dist/locks-cmd-67OHQZNV.js +0 -2
- package/dist/logical-ids-GLVM2SVR.js +0 -2
- package/dist/login-flow-ASUUU7SO.js +0 -2
- package/dist/maintenance-cmd-K5KXRIFL.js +0 -2
- package/dist/mobile-prompts-ZUZTA3RV.js +0 -2
- package/dist/open-provider-YIBB77FE.js +0 -2
- package/dist/pdf-convert-RLXSXFWN.js +0 -2
- package/dist/persist-recorded-session-EWV56TSZ.js +0 -3
- package/dist/phase-seed-MKHEWUN6.js +0 -2
- package/dist/pipeline-LAWACB2O.js +0 -2
- package/dist/prepare-target-WGPCZKLE.js +0 -2
- package/dist/readmodel-FVLRQWZ7.js +0 -2
- package/dist/real-device-run-MDLFKFVQ.js +0 -2
- package/dist/reconcile-cmd-XFM2ZXUJ.js +0 -2
- package/dist/reconcile-deps-V5VLDPYT.js +0 -4
- package/dist/reconcile-engine-VZBTMPUK.js +0 -2
- package/dist/recording-banner-CJHRPHHF.js +0 -2
- package/dist/records-LMCVKPE5.js +0 -2
- package/dist/registry-3JXQFZEG.js +0 -2
- package/dist/require-project-folder-SE5GVCYJ.js +0 -2
- package/dist/resolve-run-intent-DD4MB6UD.js +0 -2
- package/dist/resolver-TLO4SRWV.js +0 -2
- package/dist/revert-NOUECRW4.js +0 -2
- package/dist/review-cmd-7EOYQMPE.js +0 -5
- package/dist/run-EHUNJPW6.js +0 -2
- package/dist/run-OTMPUQSH.js +0 -2
- package/dist/run-channel-RGH4WIQX.js +0 -2
- package/dist/run-test-md-KBDEHGXJ.js +0 -17
- package/dist/scrollback-JLPJR25X.js +0 -2
- package/dist/session-items-2ATN7VXG.js +0 -2
- package/dist/session-target-UMNASXI7.js +0 -2
- package/dist/sessions-NH7WQWMX.js +0 -2
- package/dist/sessions-cmd-M3SECFKQ.js +0 -25
- package/dist/spawner-DPT2RLAO.js +0 -2
- package/dist/store-guard-U32JE6JJ.js +0 -2
- package/dist/store-id-EOSGEKVK.js +0 -2
- package/dist/structured-answers-ZI2B6JJE.js +0 -2
- package/dist/sync-cmd-3EP7LZGL.js +0 -2
- package/dist/sync-setup-SWTBVQEV.js +0 -2
- package/dist/tcg-generate-KXU7E2GF.js +0 -2
- package/dist/testmd-actions-PEWCPQ5R.js +0 -2
- package/dist/testmd-sync-ZWFQWZ2X.js +0 -2
- package/dist/tms-client-KU6HCA23.js +0 -2
- package/dist/token-refresh-QD3OCGJJ.js +0 -2
- package/dist/trust-gate-EX7R2P4Y.js +0 -2
- package/dist/turn-preflight-JGYT7LXP.js +0 -2
- package/dist/ui-JEJGTURD.js +0 -4
- package/dist/validate-basic-AAIXSAWH.js +0 -2
- package/dist/verdicts-LAB5BGCC.js +0 -2
- package/dist/version-check-EHOLX3YH.js +0 -2
- package/dist/walk-session-XP4KYFKO.js +0 -2
- package/dist/with-telemetry-FJMJQDCM.js +0 -2
- /package/dist/{chunk-BKHXPBWN.js → chunk-2RUSXQ3O.js} +0 -0
- /package/dist/{chunk-6J5T5FEY.js → chunk-3AGP2BVN.js} +0 -0
- /package/dist/{chunk-CH273NAE.js → chunk-73Y6T2UK.js} +0 -0
- /package/dist/{chunk-ZMNJBUAO.js → chunk-73ZFOJOK.js} +0 -0
- /package/dist/{chunk-NOL7MNZH.js → chunk-A7RJQJNT.js} +0 -0
- /package/dist/{chunk-N2P4MI32.js → chunk-FWGUISUG.js} +0 -0
- /package/dist/{chunk-UJZZDPDY.js → chunk-HD6NR44L.js} +0 -0
- /package/dist/{chunk-LDPLJFCV.js → chunk-I6S6DZ2E.js} +0 -0
- /package/dist/{chunk-427OQS2N.js → chunk-LD5B3QFW.js} +0 -0
- /package/dist/{chunk-2UIHS2FH.js → chunk-PGESS7BW.js} +0 -0
- /package/dist/{chunk-BZAGVBCX.js → chunk-ZCIWQHCO.js} +0 -0
package/dist/chunk-Y3ZYN6AK.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{j as be,k as se,l as ae,m as xe,n as De,o as ce}from"./chunk-PNUAP3RY.js";import{a as re,c as ie,d as Pe,i as oe}from"./chunk-OJAXOOZ5.js";import{d as Ee}from"./chunk-6J5T5FEY.js";import{a as S}from"./chunk-RRY5IXOB.js";import{a as ee,b as W,c as ne,d as G,e as $e,g as O,h as te}from"./chunk-W5TTF7GB.js";import{a as _e}from"./chunk-BZAGVBCX.js";import{b as J,c as Q,d as X}from"./chunk-DTRKTBCE.js";import{j as ke,l as Re}from"./chunk-7N6OCHPC.js";import{P as E,Q as ge,S as he,U as ve,V as we,W as ye,X as Z}from"./chunk-GTVQYT3D.js";import{z as I}from"./chunk-IICT4VOU.js";import{H as B,t as pe}from"./chunk-RDHWNSDP.js";import{existsSync as Oe,statSync as Te}from"fs";import{basename as q,resolve as U}from"path";function Ie(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 le(e,n){let t=[...e.rows.filter(s=>s.kind!=="REMOVE").map(s=>[s.kind,S(s.ref),s.reason,Ie(s.impact)]),...e.archive.map(s=>["ARCHIVE",S(s.ref),s.why,Ie(s.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(...Ee(["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 Ue=new Set(["interactive","agent","ci","override"]);function Be(e,n){if(e.mode!==void 0&&!Ue.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 Se(e){let{makeHeadlessIO:n,agentRefusal:t}=await import("./headless-io-75HUMWZB.js");return t(n("ndjson","reconcile"),e,"MODE_USAGE")}function Ve(e,n,t,r){if(Q(t)){let m=X(t),a=m?.sourceIdFor(t)??null;if(m===null||a===null)return{error:`--from '${t}' is not a supported remote URL \u2014 supported: ${J.map(f=>f.hint).join("; ")}`};if(r!==void 0&&r!==a)return{error:`--source-id '${r}' does not match this URL's own identity '${a}' \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 c=I(e);if(!c.heads.has(a))return{error:`unknown source '${a}' \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(c.heads.get(a)==null)return{error:`source '${a}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let _=z(e,a,{remoteUrl:t});return _!==null?{error:_}:{sourceId:a,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 i=U(n,t);if(!Oe(i)||!Te(i).isFile())return{error:`--from '${t}' is not a file \u2014 pass the changed source document`};let s=ke(i);if(!s.ok)return{error:`--from '${t}' is not an ingestable document \u2014 allowed: ${s.allowlist.join(", ")}`};let o=I(e);if(!o.heads.has(r))return{error:`unknown source '${r}' \u2014 see \`kane-cli context list --type source\``};if(o.heads.get(r)==null)return{error:`source '${r}' is retired \u2014 restore it first with \`kane-cli context revert\`, then reconcile`};let w=z(e,r,{filePath:i});if(w!==null)return{error:w};let d=null;try{d=Re(i)}catch{}return d!==null&&d!==r&&o.heads.get(d)!=null?{error:`'${q(i)}' 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:i}}function C(e){return e==null?"(none)":e.slice(0,19)}function K(e,n,t,r=!1,i){if(e.out(`reconcile ${n.source_id}: head ${n.head.status} \u2014 ${C(n.head.before)} \u2192 ${C(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 s=n.changeset??[],o=(d,m)=>{let a=s.filter(c=>c.kind===d).length;return a>0?`${a} ${m}`:null},w=[o("ADD","add"),o("MODIFY","modify"),o("ARCHIVE","archive")].filter(Boolean);n.changed&&e.out(`changeset: ${s.length} item(s)${w.length?` \u2014 ${w.join(" \xB7 ")}`:""}`),e.out(`plan: ${n.rows.length} row(s) \u2014 each gets a card below`);return}if(n.changed){let s=n.changeset??[];e.out(`changeset: ${s.length} item(s)`);for(let o of s)if(o.kind==="MODIFY")e.out(` [MODIFY] ${S(o.ref)} \u2014 ${o.summary} (${C(o.old_cid)} \u2192 ${o.new_cid===null?"(staged)":C(o.new_cid)})`);else if(o.kind==="ADD")e.out(` [ADD] ${S(o.ref)}`);else{e.out(` [ARCHIVE] ${S(o.ref)} \u2014 ${o.why}`);let w=de(o.impact,"retiring drops");w&&e.out(` ${w}`)}}e.out(`plan: ${n.rows.length} row(s)`);for(let s of n.rows){e.out(` [${s.kind}] ${S(s.ref)} \u2014 ${s.reason}`);let o=de(s.impact,"approving marks");o&&e.out(` ${o}`),e.out(` provenance: ${s.provenance}`),e.out(` action: ${s.action}`)}}function Ae(e,n){return le({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 de(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 D(e){return e==="interactive"?"override":e}async function H(e,n,t,r,i,s,o=[],w="override",d,m,a,c,_,f,P){let p;try{p=te(e)}catch(u){return E(r,u instanceof Error?u.message:String(u)),1}try{if(!t){let{runWalkSession:u}=await import("./walk-session-XP4KYFKO.js"),{telemetryEnvName:R}=await import("./bootstrap-DI4UGMH3.js");return await u({dir:e,rows:n,archive:o,held:d??null,childMode:w,runDesign:c??null,mark:s,markA:a,...m?{archiveState:m}:{},...f?{meta:{verb:"reconcile",sid:f,env:R()}}:{},...P?{resumeCmd:P}:{},signals:b=>A(e,b.ref,b.verdict,b.reason),..._?{script:_}:{}})}return await Ye(e,n,t,r,i,s,o,w,d,m)}finally{p()}}var F=(e,n)=>e?`kane-cli maintain reconcile --from ${e} --source-id ${n}`:void 0,Le=e=>e===null?void 0:"filePath"in e?e.filePath:e.remoteUrl,L=e=>`${e} high-risk item(s) need a human \u2014 ci mode won't guess. Walk interactively or use --mode agent.`;function T(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 ue(e={}){return{type:"reconcile_summary",applied:0,skipped:0,deferred:0,plan_only:0,failed:0,paused:0,stale_created:0,...e}}var j=ue();async function Y(e,n,t,r,i,s,o,w,d){T(i,n,t);let m=n.changeset.filter(_=>_.kind==="ARCHIVE"&&d?.[_.ref]===void 0),a=n.rows,c;try{c=te(e)}catch(_){return i({type:"error",message:_ instanceof Error?_.message:String(_)}),i(ue()),2}try{return await je(e,n,t,r,i,s,o,a,m,w)}finally{c()}}async function je(e,n,t,r,i,s,o,w,d,m){let a=0,c=0,_=0,f=0,P=0,p=0,u=0,R=new Set,b=(v,g)=>{try{m?.(v,g)}catch{}};for(let[v,g]of w.entries()){i({type:"reconcile_row_start",kind:g.kind,ref:g.ref,...g.impact?{stale:g.impact.stale_refs.length,direct:g.impact.direct_refs?.length??0}:{}});let h=(l,$,x)=>i({type:"reconcile_row_end",kind:g.kind,ref:g.ref,outcome:l,...$!==void 0?{exit_code:$}:{},...x?{detail:x}:{}});if(g.applied){c++,h("skipped");continue}if(g.kind==="REMOVE"){P++,h("plan-only");continue}if(g.held_ref&&n.held){let l=new Set;if(g.kind==="MODIFY"&&g.impact){let x=I(e);for(let M of g.impact.stale_refs){let N=x.resolve(M);N&&x.stale(N.tip)==="fresh"&&l.add(M)}}let $=se(e,n.held,g.held_ref,fe);if(!$.ok){_++,u===0&&(u=1),h("failed",1,$.message);continue}if($.kind==="ADD"){let x=await r($.ref,{yes:!0,mode:o});if(x!==0){x===3?(f++,u===0&&(u=3),h("paused",3)):(_++,u===0&&(u=1),h("failed",x));continue}}a++,$.kind!=="ADD"&&g.impact&&(p+=l.size),b(v,"approved"),A(e,g.ref,$.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve"),h("applied");continue}let k=re(I(e),g.ref);if(!k.ok){c++,h("skipped");continue}let y=k.target;if(R.has(y.ucTip)){c++,h("skipped");continue}if(g.kind==="ADD"){let l=await r(y.seamRef,{yes:!0,mode:o});if(l===3){f++,u===0&&(u=3),h("paused",3);continue}if(l!==0){_++,u===0&&(u=1),h("failed",l);continue}R.add(y.ucTip),a++,b(v,"approved"),A(e,g.ref,"gap-resolved-create"),h("applied")}else{let l=await ie(e,y,{yes:!0,mode:o},s,r,"batch");l.outcome==="evolved"?(R.add(y.ucTip),a++,b(v,"approved"),A(e,g.ref,"gap-resolved-evolve"),h("applied")):l.outcome==="paused"?(f++,u===0&&(u=l.code),h("paused",l.code)):l.outcome==="failed"?(_++,u===0&&(u=1),h("failed",l.code)):(c++,h("skipped"))}}return d.length>0&&(i({type:"reconcile_paused",plan_path:t,pending:d.map(v=>({ref:v.ref,why:v.why}))}),f+=d.length,u===0&&(u=3)),i(ue({applied:a,skipped:c,plan_only:P,failed:_,paused:f,stale_created:p})),u}var fe={kind:"human",id:process.env.USER??"operator"};function A(e,n,t,r){_e(e,{ts:new Date().toISOString(),command:"reconcile-walk",id:n,verdict:t,polarity:"preference",by:fe,target:n,...r!==void 0?{reason:r}:{}})}async function Ye(e,n,t,r,i,s,o=[],w="override",d,m){let a=0,c=0,_=0,f=0,P=0,p=0,u=0,R=new Set;for(let[b,v]of n.entries()){if(v.applied){r.out(`skipped ${v.ref} \u2014 already applied (${v.applied.outcome} at ${v.applied.at})`),c++;continue}let g=l=>{try{s?.(b,l)}catch($){E(r,`could not record applied state for ${v.ref}: ${$ instanceof Error?$.message:String($)}`)}};if(v.kind==="REMOVE"){r.out(`REMOVE ${v.ref} \u2014 plan-only in this release (not executed)`),f++;continue}if(v.held_ref&&d){let l=se(e,d,v.held_ref,fe);if(!l.ok){E(r,`held ${v.ref}: ${l.message}`),P++,u===0&&(u=1);continue}if(r.out(`committed ${l.ref} (${v.kind==="ADD"?"minted":"updated \u2014 old\u2192new redirect"})`),l.kind==="ADD"){let $=await i(l.ref,{yes:t,mode:w});if($===3){r.out(`design session for ${l.ref} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above`),p++,u===0&&(u=3),g("approved");continue}if($!==0){E(r,`design run for ${l.ref} ended with exit code ${$}`),P++,u===0&&(u=1),g("approved");continue}}a++,g("approved"),A(e,v.ref,v.kind==="ADD"?"gap-resolved-create":"gap-resolved-evolve");continue}let h=I(e),k=re(h,v.ref);if(!k.ok){r.out(`skipped ${v.ref} \u2014 ${k.message}`),c++;continue}let y=k.target;if(R.has(y.ucTip)){r.out(`skipped ${v.ref} \u2014 use-case ${y.display} already handled in this walk`),c++;continue}if(v.kind==="ADD"){let l=await i(y.seamRef,{yes:t,mode:w});if(l===3){r.out(`design session for ${y.display} paused \u2014 resume with the "kane-cli design tests --resume <session>" command printed above; this row lands when that session completes`),p++,u===0&&(u=3);continue}if(l!==0){E(r,`design run for ${y.display} ended with exit code ${l}`),P++,u===0&&(u=1);continue}R.add(y.ucTip),a++,g("approved"),A(e,v.ref,"gap-resolved-create")}else{let l=await ie(e,y,{yes:!0,mode:w},r,i,"batch");l.outcome==="evolved"?(R.add(y.ucTip),a++,g("approved"),A(e,v.ref,"gap-resolved-evolve")):l.outcome==="paused"?(p++,u===0&&(u=l.code)):l.outcome==="failed"?(P++,u===0&&(u=l.code)):c++}}for(let b of o)if(b.kind==="ARCHIVE"&&m?.[b.ref]===void 0){r.out(`[ARCHIVE] ${b.ref} \u2014 ${b.why}`);{let v=de(b.impact,"retiring drops");v&&r.out(` ${v}`)}r.out(" plan-only \u2014 retire belongs to the interactive session (never headless)"),f++}return r.out(`reconcile walk: ${a} applied, ${c} skipped, ${_} deferred, ${f} plan-only`+(P>0?`, ${P} failed`:"")+(p>0?`, ${p} paused`:"")),u}var Ke=new Set(J.map(e=>e.name));function z(e,n,t){let r=I(e),i=r.heads.get(n);if(i==null)return null;let s=r.mediaOf(i);if("remoteUrl"in t){let o=X(t.remoteUrl)?.name??"remote";return s.format!==o?`source '${n}' is backed by ${s.format} content, not a ${o} source \u2014 reconcile it with the --from it was originally ingested from`:null}return Ke.has(s.format)?`source '${n}' is a remote ${s.format} source \u2014 pass its URL to --from, not a file`:null}function me(e,n,t,r){return"remoteUrl"in n?De(e,n.remoteUrl,{out:t.out,err:t.err},r.remoteFindProvider):xe(e,n.filePath)}function Me(e){return e.remote_url!==void 0?{remoteUrl:e.remote_url}:e.backing_path!==void 0?{filePath:e.backing_path}:null}async function He(e,n,t,r,i,s=!1,o=!1){let w=i.seams??{reingest:me(e,t,r,i),reextract:ce(e,{stage:s,hostOut:c=>r.out(c),hostEmit:c=>{c.type!=="run_start"&&i.emitEvent?.(c)},...i.emitEvent?{}:{hostProgress:c=>process.stderr.write(c+`
|
|
3
|
-
`)}})},d=null,m={reingest:w.reingest,reextract:async c=>d=await w.reextract(c)},a;try{r.out(`reconciling ${n}: re-reading the source and comparing against the graph\u2026`),a=await(i.buildPlan??ae)(e,n,m)}catch(c){return E(r,`reconcile failed: ${c instanceof Error?c.message:String(c)}`),null}if(a.changed)if(o)for(let c of Ae(a,d))r.out(c);else K(r,a,d,!1,i.emitEvent);return a}async function Ne(e){let[{render:n},t,{ScrollbackProvider:r},{ChatSurface:i},{makeChatController:s},{makeReconcileDeps:o}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./scrollback-JLPJR25X.js"),import("./ChatSurface-FJPK3XEJ.js"),import("./chat-controller-UJQ6Z4RE.js"),import("./reconcile-deps-V5VLDPYT.js")]),w=t.default??t,d=s(),m=o({contextDir:e,note:a=>d.note(a)});return new Promise(a=>{let c=n(w.createElement(r,null,w.createElement(i,{controller:d,verb:"extract",reconcile:m,autoReview:!0,onReviewExit:()=>{c.unmount(),a(0)},onCtrlC:()=>{c.unmount(),a(m.pending()?3:0)}})),{exitOnCtrlC:!1})})}async function We(e,n,t,r,i){let s=W(e,n);if("error"in s)return E(r,s.error),2;let{plan:o,path:w}=s,d=t==="override"||t==="ci";if(n===void 0&&t==="interactive"&&r.isTTY&&!await r.confirm(`apply plan ${q(w)} for ${o.source_id} (created ${o.created})?`))return r.out(`not applying ${q(w)}`),0;let m=i.runDesignForUc??oe,a=i.runDesignForUc??null,c=i.sessionScript,_=(v,g)=>O(w,v,g),f=(v,g)=>G(w,v,g),P=B(e);if(P===o.head_pin){if(t==="agent"){let g=i.emitEvent??(()=>{});return Y(e,V(o),w,m,g,r,D(t),_,o.archive_state)}let v=ne(o);if(t==="ci"&&v.length>0)return E(r,L(v.length)),2;if(r.out(`applying stored plan ${q(w)} for ${o.source_id} (${o.rows.length} row(s))`),!d)for(let g of le({source_id:o.source_id,head:{status:"stored plan"},rows:o.rows,archive:(o.changeset??[]).filter(h=>h.kind==="ARCHIVE"),changed:!1,held:!!o.held},process.stdout.columns))r.out(g);return H(e,o.rows,d,r,m,_,o.changeset??[],D(t),o.held,o.archive_state,f,a,c,o.source_id,F(o.backing_path??o.remote_url,o.source_id))}if(r.out(`graph moved since this plan (${C(o.head_pin)} \u2192 ${C(P)}) \u2014 recomputing`),o.held)return Fe(e,o,r,i,t,m,!1);let p=Me(o);if(p===null)return E(r,`stored plan for ${o.source_id} names no backing file or URL \u2014 re-run reconcile --from`),2;let u=z(e,o.source_id,p);if(u!==null)return E(r,`stored plan cannot replay: ${u}`),2;let R=await He(e,o.source_id,p,r,i,!1,t==="interactive");if(!R)return 1;if(!R.changed)return K(r,R,null,!1,i.emitEvent),0;if(t==="agent"){let v=i.emitEvent??(()=>{});return Y(e,R,null,m,v,r,D(t))}let b=R.changeset.filter(v=>v.kind==="ARCHIVE");return t==="ci"&&b.length>0?(E(r,L(b.length)),2):H(e,R.rows,d,r,m,void 0,R.changeset,D(t),R.held,void 0,void 0,a,c,R.source_id,F(Le(p),R.source_id))}function V(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 Ge(e,n,t,r,i,s,o){let w=r.runDesignForUc??null,d=r.sessionScript,m=$e(e,n);if(m===null)return null;if("error"in m)return E(t,m.error),2;let{plan:a,path:c}=m,_=a.rows.filter(u=>u.applied===void 0),f=ne(a),P=r.emitEvent??(()=>{});if(_.length===0&&f.length===0){t.out(`already reconciled \u2014 plan ${a.created} applied ${a.rows.length} row(s)`);let u=Pe(I(e)).staleCount;return u>0&&(t.out(`${u} item(s) still stale \u2014 kane-cli maintain evolve --from-stale`),P({type:"stale_debt",count:u})),i==="agent"&&(T(P,V(a),c),P({...j})),0}let p=B(e);return p!==a.head_pin?(t.out(`plan ${a.created} superseded \u2014 graph moved (${C(a.head_pin)} \u2192 ${C(p)}); recomputing`),Fe(e,a,t,r,i,s,o)):(t.out(`resuming plan ${a.created} \u2014 ${_.length} pending row(s)${f.length>0?`, ${f.length} undecided archive item(s)`:""}`),o?(K(t,V(a),null,!1,r.emitEvent),t.out(`plan stored: ${c}`),i==="agent"&&(T(P,V(a),c),P({...j})),0):i==="agent"?Y(e,V(a),c,s,P,t,D(i),(u,R)=>O(c,u,R),a.archive_state):i==="ci"&&f.length>0?(E(t,L(f.length)),2):H(e,a.rows,i==="override"||i==="ci",t,s,(u,R)=>O(c,u,R),a.changeset??[],D(i),a.held,a.archive_state,(u,R)=>G(c,u,R),w,d,a.source_id,F(a.backing_path??a.remote_url,a.source_id)))}async function Fe(e,n,t,r,i,s,o){let w=r.runDesignForUc??null,d=r.sessionScript,m;if(n.held){let h=I(e),k=new Set(n.rows.filter(l=>l.held_ref!==void 0&&l.applied!==void 0).map(l=>l.held_ref)),y=[];for(let l of n.held.rows){if(k.has(l.temp_ref))continue;if(!l.matched_cid){y.push(l);continue}let $=h.tipOf(l.matched_cid);if(h.superseded.get($)===null){t.out(`dropped held "${l.title}" \u2014 its use-case was retired meanwhile`),r.emitEvent?.({type:"held_dropped",ref:l.temp_ref,title:l.title,reason:"target_retired"});continue}y.push($===l.matched_cid?l:{...l,matched_cid:$,uc:{...l.uc,matches_existing:{cid:$}}})}m={source_id:n.held.source_id,rows:y}}let a=Me(n);if(a===null)return E(t,`stored plan for ${n.source_id} names no backing file or URL \u2014 re-run reconcile --from`),2;let c=z(e,n.source_id,a);if(c!==null)return E(t,`stored plan cannot replay: ${c}`),2;let _=r.seams??{reingest:me(e,a,t,r),reextract:ce(e,{stage:m!==void 0,hostOut:h=>t.out(h),hostEmit:h=>{h.type!=="run_start"&&r.emitEvent?.(h)},...r.emitEvent?{}:{hostProgress:h=>process.stderr.write(h+`
|
|
4
|
-
`)}})},f;try{f=await(r.buildPlan??ae)(e,n.source_id,_,{resumeHeld:m})}catch(h){return E(t,`reconcile failed: ${h instanceof Error?h.message:String(h)}`),1}if(i==="interactive"&&!o)for(let h of Ae(f,null))t.out(h);else K(t,f,null,!1,r.emitEvent);let P=B(e),p=null;if(P!=null){let h={},k=new Set(f.changeset.filter(y=>y.kind==="ARCHIVE").map(y=>y.ref));for(let[y,l]of Object.entries(n.archive_state??{}))k.has(y)&&(h[y]=l);p=ee(e,{version:2,source_id:f.source_id,...n.remote_url!==void 0?{remote_url:n.remote_url}:{backing_path:n.backing_path},head_pin:P,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:f.skipped_arms,note:f.note,changeset:f.changeset,rows:f.rows,...f.held?{held:f.held}:{},...Object.keys(h).length>0?{archive_state:h}:{}}),t.out(`plan stored: ${p}`)}if(o){if(i==="agent"){let h=r.emitEvent??(()=>{});T(h,f,p),h({...j})}return 0}let u=r.emitEvent??(()=>{}),R=p?W(e,p).plan.archive_state:void 0,b=p?(h,k)=>O(p,h,k):void 0,v=p?(h,k)=>G(p,h,k):void 0;if(i==="agent")return Y(e,f,p,s,u,t,D(i),b,R);let g=f.changeset.filter(h=>h.kind==="ARCHIVE"&&R?.[h.ref]===void 0);return i==="ci"&&g.length>0?(E(t,L(g.length)),2):H(e,f.rows,i==="override"||i==="ci",t,s,b,f.changeset,D(i),f.held,R,v,w,d,f.source_id,F(n.backing_path??n.remote_url,f.source_id))}async function Ce(e,n,t={},r=process.cwd()){let{telemetryBootstrap:i,telemetryEnvName:s}=await import("./bootstrap-DI4UGMH3.js"),o=i({verb:"reconcile",mode:typeof e.mode=="string"?e.mode:"interactive",contextRoot:U(r,".context"),env:s(),applyPlanPath:typeof e.apply=="string"?U(r,e.apply):void 0,write:!0,longSession:!0});e.mode==="agent"&&t.emitEvent?.({type:"run_start",session:o.ids.session_id});{let m=Oe(U(r,".context"))?ye(U(r,".context")):null;if(m)return e.mode==="agent"?t.emitEvent?.(Z(m)):(E(n,m.text),(n.err??n.out)(`next: ${m.remedy}`)),await o.end({exit_code:2}),2}let w=await ve(U(r,".context"));w&&(e.mode==="agent"?t.emitEvent?.(we(w)):(n.err??n.out)(w.text));let d=await qe(e,n,t,r);return d===1&&e.mode!=="agent"&&(n.err??n.out)(o.supportFooter()),await o.end({exit_code:d}),d}async function qe(e,n,t={},r=process.cwd()){let i=e.apply!==void 0&&e.apply!==!1,s=typeof e.apply=="string"?e.apply:void 0;if(e.plan&&i)return E(n,"pass --plan OR --apply, not both"),2;let o=e.from!==void 0||!i,w=e.from!==void 0&&Q(e.from);if(o&&(!e.from||!e.sourceId&&!w))return E(n,"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"),2;if(e.from&&s!==void 0)return E(n,"pass --from OR --apply <path>, not both \u2014 a stored plan names its own source"),2;let d=ge(r,n);if(!d)return 2;if(e.mode!==void 0&&!Ue.has(e.mode))return Se(`--mode must be interactive | agent | ci | override, got '${e.mode}'`);let m=e.mode==="agent"||e.mode==="ci"||e.mode==="override";if(i&&!m&&!n.isTTY)return E(n,"refusing to apply without a TTY to confirm \u2014 pass --mode override|ci"),2;let a=!e.plan,c="override";if(e.from){let k=Be(e,n.isTTY);if(typeof k=="object")return k.code==="MODE_USAGE"?Se(k.error):(E(n,k.error),2);c=k}let _=c==="override"||c==="ci";if(i&&!e.from){let{makeReconcileDeps:k}=await import("./reconcile-deps-V5VLDPYT.js"),y=s===void 0?k({contextDir:d}).pending():null;if(y?.kind==="cards"){let $=e.mode??"interactive";return!n.isTTY||$!=="interactive"?(E(n,`a held changeset for ${y.source} awaits review (${y.count} change(s)) \u2014 resume in a terminal: kane-cli maintain reconcile --apply [HELD_REVIEW]`),2):(t.cardApplyMount??Ne)(d)}let l=e.mode??"interactive";return We(d,s===void 0?void 0:U(r,s),l,n,t)}let f=Ve(d,r,e.from,e.sourceId);if("error"in f)return E(n,f.error),2;if(!i){let{sessionsHoldingSource:k}=await import("./sessions-NH7WQWMX.js"),{holders:y,corrupt:l}=k(d,f.sourceId);if(l>0)return E(n,`cannot verify review holds \u2014 ${l} session file(s) unreadable; inspect with kane-cli context sessions list, clean with kane-cli context sessions clean, then retry [SESSIONS_UNREADABLE]`),2;if(y.length>0)return E(n,`session ${y[0]} holds item(s) for review pinned to ${f.sourceId} \u2014 finish that review first: kane-cli context extract --resume ${y[0]} [SOURCE_HELD]`),2}if(c==="interactive"&&!e.plan&&!i){let k=t.seams?.reingest??me(d,f,n,t),y;try{y=await k(f.sourceId)}catch($){return E(n,$ instanceof Error?$.message:String($)),1}let l=y.status==="unchanged"?null:be(d,f.sourceId);if(y.status!=="unchanged"&&!l)return n.out(`${f.sourceId} landed for the first time \u2014 extract it: kane-cli context extract --source ${f.sourceId}`),0;if(l){let x=await(t.chatMount??(async M=>{let{bindExtractInteractive:N}=await import("./extract-bind-CKIRLXAJ.js");return N(M)}))({mode:"interactive",posture:"reconcile",source:f.sourceId,changeContext:l});if(x===3){let{sessionsHoldingSource:M}=await import("./sessions-NH7WQWMX.js");if(M(d,f.sourceId).holders.length===0)return 0}return x}}let P="remoteUrl"in f?{remoteUrl:f.remoteUrl}:{filePath:f.filePath},p=await He(d,f.sourceId,P,n,t,!!e.plan||c==="interactive",c==="interactive"&&!e.plan);if(!p)return 1;let u=t.runDesignForUc??oe,R=t.runDesignForUc??null,b=t.sessionScript;if(!p.changed){let k=await Ge(d,f.sourceId,n,t,c,u,!!e.plan);if(k!==null)return k;if(K(n,p,null,!1,t.emitEvent),c==="agent"){let y=t.emitEvent??(()=>{});T(y,p,null),y({...j})}return 0}let v=B(d),g=null;if(v!=null?g=ee(d,{version:2,source_id:p.source_id,..."remoteUrl"in P?{remote_url:P.remoteUrl}:{backing_path:P.filePath},head_pin:v,created:new Date().toISOString().replace(/[:.]/g,"-"),skipped_arms:p.skipped_arms,note:p.note,changeset:p.changeset,rows:p.rows,...p.held?{held:p.held}:{}}):E(n,"no chain head after extract \u2014 plan not stored"),c==="agent"){let k=t.emitEvent??(()=>{});if(!a)return T(k,p,g),k({...j}),0;let y=g?(l,$)=>O(g,l,$):void 0;return Y(d,p,g,u,k,n,D(c),y)}if(!a)return g&&n.out(`plan stored: ${g}`),0;let h=p.changeset.filter(k=>k.kind==="ARCHIVE");if(c==="ci"&&h.length>0)return g&&n.out(`plan stored: ${g}`),E(n,L(h.length)),2;if(g){n.out(`plan stored: ${g}`);let k=g;return H(d,ze(d,k)??p.rows,_,n,u,(y,l)=>O(k,y,l),p.changeset,D(c),p.held,void 0,void 0,R,b,p.source_id,F(e.from,p.source_id))}return H(d,p.rows,_,n,u,void 0,p.changeset,D(c),p.held,void 0,void 0,R,b,p.source_id,F(e.from,p.source_id))}function ze(e,n){let t=W(e,n);return"error"in t?null:t.plan.rows}async function hn(e,n={},t,r=process.cwd()){if(e.mode==="agent"){let{makeHeadlessIO:i}=await import("./headless-io-75HUMWZB.js"),s=t?i("ndjson","reconcile",t):i("ndjson","reconcile"),o={out:s.out,err:m=>s.event({type:"error",message:m}),isTTY:!1,confirm:async()=>!1,ask:async()=>""},{runWithChannel:w}=await import("./run-channel-RGH4WIQX.js"),d=2;try{d=await w({event:m=>s.event(m)},()=>Ce(e,o,{...n,emitEvent:m=>s.event(m)},r))}catch(m){m instanceof pe?(d=2,s.event(Z({code:m.code,text:m.message,remedy:m.remedy}))):(d=1,s.event({type:"error",message:m instanceof Error?m.message:String(m)}))}return s.done(d)}return Ce(e,he(),n,r)}export{Be as a,Ve as b,D as c,A as d,Ce as e,hn as f};
|
package/dist/chunk-YCCUBQY4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as m}from"./chunk-HCBYKLMW.js";import{a as l,b as i,i as c}from"./chunk-C44QQJR4.js";import{e as p}from"./chunk-UR6MHSHU.js";var e=p(m(),1);function g({value:r,onChange:n,onSubmit:x,onCancel:d,placeholder:o,masked:a}){c((s,t)=>{if(t.return){x?.(r);return}if(t.escape){d?.();return}if(t.backspace||t.delete){n(r.slice(0,-1));return}t.tab||t.ctrl||t.meta||s&&n(r+s)});let f=a?"\u2022".repeat(r.length):r;return(0,e.jsx)(l,{children:r.length===0&&o?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{inverse:!0,children:" "}),(0,e.jsx)(i,{dimColor:!0,children:o})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(i,{children:f}),(0,e.jsx)(i,{inverse:!0,children:" "})]})})}export{g as a};
|
package/dist/chunk-YKTYVJBN.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var u={prod:"https://kaneai-api.lambdatest.com/v16-controller/v1",stage:"https://auteur-stage-automind.lambdatestinternal.com/v16-controller/v1"};function g(e=process.env){return e.TESTMUAI_BASE_URL||u[e.TESTMUAI_ENV==="stage"?"stage":"prod"]}function p(e=process.env){return e.TESTMUAI_BASE_URL&&e.TESTMUAI_ENV!=="stage"?"note: TESTMUAI_BASE_URL applies to context/design commands only \u2014 run/testmd use your configured environment":null}async function T(e,t=process.env,c=fetch){let o=g(t),l=`${o}/assurance/turn`,n={"Content-Type":"application/json"},a=e.TESTMUAI_BASIC_AUTH??t.TESTMUAI_BASIC_AUTH,i=e.TESTMUAI_API_KEY??t.TESTMUAI_API_KEY;a?n.Authorization=`Basic ${a}`:i&&(n.Authorization=`Bearer ${i}`);let s;try{s=(await c(l,{method:"POST",headers:n,body:"{}",signal:AbortSignal.timeout(8e3)})).status}catch(r){return{ok:!1,message:`error: cannot reach the controller at ${o} (${r instanceof Error?r.message:String(r)})
|
|
3
|
-
hint: check your network connection and login (kane-cli whoami)`}}return s===404?{ok:!1,message:"error: this environment does not support assurance sessions yet (404) \u2014 update kane-cli, or contact support if the problem persists"}:s===401?{ok:!1,message:`error: your credentials were rejected (401) \u2014 run kane-cli login (active environment: ${t.TESTMUAI_ENV??"prod"})`}:{ok:!0}}export{g as a,p as b,T as c};
|
package/dist/chunk-YLQHY4A7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var S=new Set(["SYNC_BEHIND","SYNC_DIVERGED","SYNC_POSITION_TAKEN","SYNC_LOCAL_MOVED"]),i=new Set(["SYNC_REMOTE_CHAIN_BROKEN","SYNC_OBJECT_CORRUPT","SYNC_LOCAL_RECORD_CORRUPT"]),s=class extends Error{constructor(n,e,u,p){super(e);this.code=n;this.remedy=u;this.diagnostic=p}};function Y(r){return S.has(r)?3:i.has(r)?1:2}var o="kane-context/v1",E=`${o}/commits/`,f=`${o}/meta.json`,O=1e3,C=999999999,c=new RegExp(`^${o}/commits/(\\d{6})/(\\d{9})\\.json$`),R=/^sha256:([0-9a-f]{64})$/;function N(r,t){let n=R.exec(r);if(!n)throw new Error(`not a ${t} fingerprint: ${r} \u2014 expected sha256:<64 lower-case hex>`);return n[1]}function _(r){if(!Number.isInteger(r)||r<1||r>C)throw new Error(`bad position ${r} \u2014 a position is a whole number from 1 to ${C}`);return String(Math.floor((r-1)/O)).padStart(6,"0")}function g(r){return`${E}${_(r)}/${String(r).padStart(9,"0")}.json`}function l(r){return`${E}${_(r)}/`}function d(r){let t=c.exec(r);if(!t)return null;let n=Number(t[2]);return n<1||t[1]!==_(n)?null:n}function D(r){let t=N(r,"blob");return`${o}/blobs/${t.slice(0,2)}/${t.slice(2)}`}function L(r,t){return`${a(r)}${N(t,"proposal digest").slice(0,12)}.json`}function a(r){let t=I(r);if(t===""||t==="."||t==="..")throw new Error(`bad proposal id ${JSON.stringify(r)} \u2014 a proposal id names a folder`);return`${o}/proposals/${t}/`}function I(r){let t="";for(let n of Buffer.from(r,"utf8")){let e=String.fromCharCode(n);t+=/^[a-z0-9._-]$/.test(e)?e:`~${n.toString(16).padStart(2,"0")}`}return t}function $(r){if(!/^[0-9a-f]{16,32}$/.test(r))throw new Error("probe nonce must be 16 to 32 lower-case hex characters");return`${o}/probe/${r}`}export{s as a,Y as b,E as c,f as d,g as e,l as f,d as g,D as h,L as i,a as j,$ as k};
|
package/dist/chunk-Z7IGTVJW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{y as o}from"./chunk-5TQFOPJV.js";import{a as m}from"./chunk-HCBYKLMW.js";import{a as e,b as i}from"./chunk-C44QQJR4.js";import{e as d}from"./chunk-UR6MHSHU.js";var r=d(m(),1),s={default:o.muted,error:o.red,success:o.green,info:o.orange,warning:o.orange};function h({title:t,titleColor:a,borderColor:l,variant:n="default",children:c,width:u,paddingX:x=2,paddingY:g=0,marginBottom:f=0}){let p=l??s[n],B=a??(n==="default"?o.orange:s[n]);return(0,r.jsxs)(e,{flexDirection:"column",marginBottom:f,children:[t&&(0,r.jsx)(e,{marginBottom:0,children:(0,r.jsxs)(i,{color:B,bold:!0,children:[" ",t]})}),(0,r.jsx)(e,{borderStyle:"round",borderColor:p,flexDirection:"column",paddingX:x,paddingY:g,width:u,children:c})]})}function k({label:t,value:a,labelColor:l=o.dim,valueColor:n,labelWidth:c=14}){return(0,r.jsxs)(e,{children:[(0,r.jsx)(e,{width:c,flexShrink:0,children:(0,r.jsx)(i,{color:l,children:t})}),(0,r.jsx)(e,{flexShrink:1,children:(0,r.jsx)(i,{color:n,wrap:"wrap",children:a})})]})}function I({label:t}){return(0,r.jsx)(e,{marginTop:1,marginBottom:0,children:(0,r.jsx)(i,{bold:!0,children:t})})}export{h as a,k as b,I as c};
|
package/dist/chunk-ZC2CKWLB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{y as n}from"./chunk-5TQFOPJV.js";import{a as s}from"./chunk-HCBYKLMW.js";import{a,b as i}from"./chunk-C44QQJR4.js";import{e as r}from"./chunk-UR6MHSHU.js";var o=r(s(),1);function g({bindings:c,suppressEscBack:p=!1,escBackLabel:m="back to chat"}){let e=c.map(t=>`${t.keys} ${t.label}`);return p||e.push(`esc \xB7 ${m}`),(0,o.jsx)(a,{marginTop:1,children:(0,o.jsx)(i,{color:n.dim,children:e.join(" \xB7 ")})})}export{g as a};
|
package/dist/chunk-ZER3FZSZ.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as k}from"./chunk-4BZOG6PE.js";import{a as m}from"./chunk-2KVECC36.js";import{r as a}from"./chunk-RSSOJ3L2.js";import{a as y}from"./chunk-NMSZ7G6P.js";import{a as h}from"./chunk-YWYORBY3.js";var $=10,u=200,N=1e4,S=1e6;function T(t,e,r="streaming"){let n=r==="full-fetch"?S:N,o=$,i=0;if(t!==void 0){let s=Number(t);if(!Number.isInteger(s)||s<1||s>u)return{error:`--limit must be an integer in [1, ${u}] (got "${t}")`};o=s}if(e!==void 0){let s=Number(e);if(!Number.isInteger(s)||s<0||s>n)return{error:`--offset must be an integer in [0, ${n}] (got "${e}")`};i=s}return{limit:o,offset:i}}function C(t,e){if(!e)return t;let r=e.toLowerCase();return t.filter(n=>n.name.toLowerCase().includes(r))}function j(t,{limit:e,offset:r}){let n=t.slice(r,r+e),o=t.length>r+e;return{slice:n,hasMore:o}}function v(t,e,r=n=>process.stdout.write(`${n}
|
|
3
|
-
`)){for(let n of t)r(JSON.stringify(n));r(JSON.stringify({_meta:"page",limit:e.limit,offset:e.offset,returned:t.length,has_more:e.has_more}))}function b(t,e,r=n=>process.stdout.write(`${n}
|
|
4
|
-
`)){if(t.length===0){r("(no results)");return}let n=Math.max(2,...t.map(s=>s.id.length)),o=`${"ID".padEnd(n)} NAME`;r(o),r(`${"-".repeat(n)} ----`);for(let s of t)r(`${s.id.padEnd(n)} ${s.name}`);r("");let i=e.offset+t.length;if(e.hasMore){let s=e.totalIsLowerBound?`${e.total}+`:`${e.total}`;r(`${i} of ${s} \u2014 next: --offset ${e.offset+e.limit}`)}else r(`${t.length} shown (${e.total} total)`)}async function B(t,e,r){if(r.username&&r.accessKey)return{ok:!0,creds:{username:r.username,access_key:r.accessKey}};let n=new h,o=n.loadBasicAuth(t,e);if(o)return{ok:!0,creds:{username:o.username,access_key:o.access_key}};let i=n.loadCredentials(t,e);if(!i)return{ok:!1,reason:"no_credentials"};let s=i.access_token;try{let{refreshOAuthToken:d}=await import("./token-refresh-QD3OCGJJ.js"),w=await d({creds:n,profile:t,env:e,credentials:i});w&&(s=w.accessToken)}catch(d){return{ok:!1,reason:"refresh_failed",detail:d instanceof Error?d.message:String(d)}}let c=y(e),f=await new k(c.controllerBaseUrl,async()=>s,null).resolve();return f?{ok:!0,creds:{username:f.username,access_key:f.access_key}}:{ok:!1,reason:"exchange_failed"}}function E(t,e,r){switch(r.reason){case"no_credentials":return{message:`error: no credentials for profile "${t}" [${e}]. Run \`kane-cli login\` or pass --username/--access-key.
|
|
5
|
-
`,exitCode:2};case"refresh_failed":return{message:`error: OAuth token refresh failed for profile "${t}" [${e}]${r.detail?`: ${r.detail}`:""}. Run \`kane-cli login\` to re-auth.
|
|
6
|
-
`,exitCode:2};case"exchange_failed":return{message:`error: TMS credential exchange failed for profile "${t}" [${e}]. Token may be revoked \u2014 try \`kane-cli login\`; if the problem persists, TMS may be down.
|
|
7
|
-
`,exitCode:2}}}function O(t){return{id:t.project_id,name:t.name}}function M(t){return{id:t.id,name:t.name}}async function P(t,e,r,n){let o=r+n+1,i=[],s=!0;for await(let c of t.listProjectsStream({name:e})){if(i.push(...c.projects),c.done){s=!0;break}if(i.length>=o){s=!1;break}}return{items:i,doneStreaming:s}}function g(t){return!!t.agent||!process.stdin.isTTY||!process.stdout.isTTY}function _(t,e=r=>process.stdout.write(`${r}
|
|
8
|
-
`)){e(JSON.stringify(t))}function x(t,e){if(!t)return{error:`${e} name is required: kane-cli ${e}s create "<name>"`};let r=t.trim();return r.length===0?{error:`${e} name cannot be empty or whitespace`}:r.length>255?{error:`${e} name must be <= 255 characters`}:{name:r}}async function A(t){let e=T(t.limit,t.offset);if("error"in e){process.stderr.write(`error: ${e.error}
|
|
9
|
-
`),a(2,`projects: ${e.error}`);return}let r=await p(t);if(r)try{let n=new m(r.tmsBaseUrl,r.auth.username,r.auth.access_key),{items:o,doneStreaming:i}=await P(n,t.search,e.offset,e.limit),{slice:s,hasMore:c}=j(o,e),l=!i||c,f=s.map(O);g(t)?v(f,{limit:e.limit,offset:e.offset,has_more:l}):b(f,{limit:e.limit,offset:e.offset,total:o.length,hasMore:l,totalIsLowerBound:!i}),a(0,"projects list complete")}catch(n){process.stderr.write(`error: ${n instanceof Error?n.message:String(n)}
|
|
10
|
-
`),a(1,`projects list failed: ${n instanceof Error?n.message:String(n)}`)}}async function I(t,e){let r=x(t,"project");if("error"in r){process.stderr.write(`error: ${r.error}
|
|
11
|
-
`),a(2,`projects create: ${r.error}`);return}let n=await p(e);if(n)try{let i=await new m(n.tmsBaseUrl,n.auth.username,n.auth.access_key).createProject(r.name,e.description),s={id:i.id,name:i.name};g(e)?_(s):(process.stdout.write(`Created project "${s.name}" (${s.id}).
|
|
12
|
-
`),process.stdout.write(`Bind it to your active profile with: kane-cli config project ${s.id}
|
|
13
|
-
`)),a(0,"projects create complete")}catch(o){process.stderr.write(`error: ${o instanceof Error?o.message:String(o)}
|
|
14
|
-
`),a(1,`projects create failed: ${o instanceof Error?o.message:String(o)}`)}}async function F(t){let e=T(t.limit,t.offset,"full-fetch");if("error"in e){process.stderr.write(`error: ${e.error}
|
|
15
|
-
`),a(2,`folders: ${e.error}`);return}let r=await p(t);if(r)try{let o=await new m(r.tmsBaseUrl,r.auth.username,r.auth.access_key).listFolders(t.project),i=C(o,t.search),{slice:s,hasMore:c}=j(i,e),l=s.map(M);g(t)?v(l,{limit:e.limit,offset:e.offset,has_more:c}):b(l,{limit:e.limit,offset:e.offset,total:i.length,hasMore:c}),a(0,"folders list complete")}catch(n){process.stderr.write(`error: ${n instanceof Error?n.message:String(n)}
|
|
16
|
-
`),a(1,`folders list failed: ${n instanceof Error?n.message:String(n)}`)}}async function L(t,e){let r=x(t,"folder");if("error"in r){process.stderr.write(`error: ${r.error}
|
|
17
|
-
`),a(2,`folders create: ${r.error}`);return}let n=await p(e);if(n)try{let i=await new m(n.tmsBaseUrl,n.auth.username,n.auth.access_key).createFolder(e.project,r.name,e.description),s={id:i.id,name:i.name};g(e)?_(s):(process.stdout.write(`Created folder "${s.name}" (${s.id}).
|
|
18
|
-
`),process.stdout.write(`Bind it to your active profile with: kane-cli config folder ${s.id}
|
|
19
|
-
`)),a(0,"folders create complete")}catch(o){process.stderr.write(`error: ${o instanceof Error?o.message:String(o)}
|
|
20
|
-
`),a(1,`folders create failed: ${o instanceof Error?o.message:String(o)}`)}}async function p(t){let e=new h,r=t.profile??e.getActiveProfile()??"default",n=t.env??e.getDefaultEnv(),o=y(n),i=await B(r,n,t);if(!i.ok){let{message:s,exitCode:c}=E(r,n,i);return process.stderr.write(s),a(c,`${i.reason} for "${r}" [${n}]`),null}return{profile:r,envName:n,tmsBaseUrl:o.tmsBaseUrl,auth:i.creds}}function q(t){t.command("projects").description("List or create TMS projects (TTY = friendly output; non-TTY / --agent = NDJSON). After `create`, bind the new id to the active profile with `kane-cli config project <id>`.").argument("<action>","'list' or 'create'").argument("[name]","Project name (required for 'create')").option("--search <term>","Server-side name search (case-insensitive substring; list only)").option("--limit <n>",`Max items to return (1-${u}, default ${$}; list only)`).option("--offset <n>","Skip N items from the start (default 0; list only)").option("--description <text>","Project description (create only; default empty)").option("--profile <name>","Profile name (default: active)").option("--env <name>","Environment (prod or stage)").option("--username <user>","Basic auth username (skip stored creds)").option("--access-key <key>","Basic auth access key").option("--agent","Force NDJSON output (auto-on when stdin is not a TTY)").action(async(e,r,n)=>{if(e==="list")return A(n);if(e==="create")return I(r,n);process.stderr.write(`error: unknown action "${e}" (try: list, create)
|
|
21
|
-
`),a(2,`projects: unknown action "${e}"`)}),t.command("folders").description("List or create TMS folders (TTY = friendly output; non-TTY / --agent = NDJSON). After `create`, bind the new id to the active profile with `kane-cli config folder <id>`.").argument("<action>","'list' or 'create'").argument("[name]","Folder name (required for 'create')").requiredOption("--project <id>","TMS project id (required for both list and create)").option("--search <term>","Client-side name substring filter (case-insensitive; list only)").option("--limit <n>",`Max items to return (1-${u}, default ${$}; list only)`).option("--offset <n>","Skip N items from the start (default 0; list only)").option("--description <text>","Folder description (create only; default empty)").option("--profile <name>","Profile name (default: active)").option("--env <name>","Environment (prod or stage)").option("--username <user>","Basic auth username (skip stored creds)").option("--access-key <key>","Basic auth access key").option("--agent","Force NDJSON output (auto-on when stdin is not a TTY)").action(async(e,r,n)=>{if(e==="list")return F(n);if(e==="create")return L(r,n);process.stderr.write(`error: unknown action "${e}" (try: list, create)
|
|
22
|
-
`),a(2,`folders: unknown action "${e}"`)})}export{T as a,C as b,j as c,v as d,b as e,B as f,E as g,x as h,q as i};
|
package/dist/chunk-ZJYT72BA.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{d as Ne,h as Ve}from"./chunk-AACQE24F.js";import{b as _,c as z,d as Fe,f as U,g as H}from"./chunk-5GUD3CIH.js";import{b as K,c as C,d as Y,e as q}from"./chunk-4CYBXJIA.js";import{c as Ue,d as He}from"./chunk-RTSBKCZY.js";import{a as A,b as D,d as Oe}from"./chunk-EHN5HTUD.js";import{h as j,k as Me,m as Te,o as $e}from"./chunk-OMNLAGQC.js";import{d as Be}from"./chunk-VVOKM2VO.js";import{b as x,c as h}from"./chunk-VZ7KXRXB.js";import{a as V,c as Ce,d as Le,e as je,f as B}from"./chunk-GCISXCDU.js";import{z as O}from"./chunk-IICT4VOU.js";import{a as ze}from"./chunk-CH273NAE.js";import{a as Se,b as Ee}from"./chunk-OHOJSADN.js";import{e as Re,f as Pe}from"./chunk-OIUV3ISA.js";import{a as Ae,b as N,c as De}from"./chunk-HG5LLZBU.js";import{f as xe}from"./chunk-NOL7MNZH.js";import{a as Ie}from"./chunk-5TQFOPJV.js";function S(e){if(e===null)return"broken";let t=Math.floor(e/100);return t===1?"passed":t===7?"failed":t===2?"skipped":"broken"}var I={failed:3,broken:2,passed:1,skipped:0};function W(e){let t="skipped";for(let r of e)I[r]>I[t]&&(t=r);return t}import{createHash as vt}from"crypto";import{basename as ht}from"path";function G(e){let t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,40);return t.length>0?t:"session"}function J(e){return vt("sha256").update(e).digest("hex").slice(0,8)}function X(e){let t=ht(e).replace(/_test\.md$/i,"").replace(/\.md$/i,"");return`${G(t)}-${J(e)}`}function Z(e,t){return`${G(e)}-${J(t)}`}function Q(e){let t=e?.trim();return t||void 0}function Ke(e=process.env){let t=Q(e.TEST_INSTANCE_ID),r=Q(e.JOB_ID),n=Q(e.TASK_ID);return{...t?{testInstanceId:t}:{},...r?{jobId:r}:{},...n?{taskId:n}:{}}}function ee(e,t=process.env){let r=Ke(t),n={...r.testInstanceId?{hyper_test_instance_id:r.testInstanceId}:{},...r.jobId?{hyper_job_id:r.jobId}:{},...r.taskId?{hyper_task_id:r.taskId}:{},...e},i={};for(let[o,s]of Object.entries(n))typeof s=="string"&&s.length>0&&(i[o]=s);return i}function wt(e,t){return{pack_test_dir:e,ordinal_offset:t}}import{promises as w}from"fs";import{join as y}from"path";function te(e){let t={evidence:"0.1",run_id:e.execution_id,status:"running",title:e.title,started:e.started,environment:{producer:{name:"kane-cli",version:e.producerVersion},...e.surfaces?{surfaces:e.surfaces}:{},run_kind:e.run_kind,origin:e.origin,pid:e.pid},...e.credits!==void 0?{metrics:{credits:{value:e.credits,type:"count"}}}:{}};return h(t,{lineWidth:-1})}async function re(e,t,r,n=process.cwd(),i){let o=i??_(e.execution_id,n),s=y(o,"tests",t);return await w.mkdir(y(o,"coverage"),{recursive:!0}),await w.writeFile(y(o,"coverage",".keep"),""),await w.mkdir(s,{recursive:!0}),await w.writeFile(y(o,"run.yaml"),te(e)),r&&await w.writeFile(y(s,r.path),r.content),o}async function yt(e,t=process.cwd()){let r=_(e.execution_id,t);await w.mkdir(y(r,"coverage"),{recursive:!0}),await w.writeFile(y(r,"coverage",".keep"),"");let n=x(te(e));return n.environment&&delete n.environment.run_kind,await w.writeFile(y(r,"run.yaml"),h(n,{lineWidth:-1})),r}async function bt(e,t=process.cwd()){return D(_(e,t),new Date().toISOString())}async function ne(e,t=process.cwd()){await w.rm(_(e,t),{recursive:!0,force:!0})}import{promises as ie}from"fs";import{join as oe}from"path";function F(e){let t={evidence:"0.1",test:e.testId,status:e.status,...e.durationMs!==void 0?{duration_ms:e.durationMs}:{},...e.attempts&&e.attempts.length?{attempts:e.attempts}:{},...e.flaky!==void 0?{flaky:e.flaky}:{},...e.adaptiveHeal?{adaptive_heal:e.adaptiveHeal}:{},...e.definitionPath?{definition:{path:e.definitionPath}}:{},...e.definitionId?{definition_id:e.definitionId}:{},...e.assuranceId?{assurance_id:e.assuranceId}:{},...Object.keys(e.externalId).length?{external_id:e.externalId}:{},...e.tags&&e.tags.length?{tags:e.tags}:{},...Object.keys(e.environment).length?{environment:e.environment}:{},steps:e.steps};return h(t,{lineWidth:-1})}function se(e){return h({logs:e},{lineWidth:-1})}async function ae(e,t,r){await ie.writeFile(oe(e,"tests",t,"result.yaml"),r)}async function ce(e,t,r){let n=oe(e,"tests",t,"logs");await ie.mkdir(n,{recursive:!0}),await ie.writeFile(oe(n,"meta.yaml"),r)}import{promises as M}from"fs";import{join as Ye}from"path";function qe(e){return Ye(e,".internal","meta.json")}async function We(e){let t;try{t=await M.readFile(qe(e),"utf8")}catch(n){if(n?.code==="ENOENT")return null;throw n}let r=JSON.parse(t);if(!r||typeof r!="object"||Array.isArray(r))throw new Error("meta.json is not a JSON object");return r}async function ue(e,t){let r;try{r=await We(e)??{}}catch(s){console.warn(`evidence: meta.json at ${e} unreadable \u2014 skipping execution-pointer append to preserve identity`,s);return}let n=Array.isArray(r.executions)?r.executions:[];n.push(t),r.executions=n,await M.mkdir(Ye(e,".internal"),{recursive:!0});let i=qe(e),o=`${i}.tmp-${process.pid}-${Date.now()}`;await M.writeFile(o,JSON.stringify(r,null,2)+`
|
|
3
|
-
`),await M.rename(o,i)}async function kt(e){try{let t=await We(e);return t&&Array.isArray(t.executions)?t.executions:[]}catch{return[]}}async function xt(e,t,r=process.cwd()){let n=await U(e,r);if(!n){let o=`evidence: no pack found for "${e}"`;return t.json?console.log(JSON.stringify({valid:!1,error:"not_found",target:e})):console.error(o),2}let i=await A(n,t.profile??"L1");return t.json?console.log(JSON.stringify({valid:i.valid,status:i.status,diagnostics:i.diagnostics})):console.log(`evidence: ${i.valid?"valid":"INVALID"} (${t.profile??"L1"}, status ${i.status})`),i.valid?0:1}function de(e){let t=[];for(let r of e){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(i=>i.resultCode):[r.resultCode];for(let i of n)t.push(S(i))}return W(t)}function It(e){let t=null;for(let r of e){let n=r.perFlow&&r.perFlow.length?r.perFlow.map(i=>i.resultCode):[r.resultCode];for(let i of n)i!=null&&(t==null||I[S(i)]>I[S(t)]||I[S(i)]===I[S(t)]&&i>t)&&(t=i)}return t}import{promises as St}from"fs";import{extname as Ge,basename as Et}from"path";var Rt={".ndjson":"ndjson",".log":"log",".json":"json",".har":"har"};async function le(e){let t;try{t=await St.readdir(e)}catch{return[]}return t.filter(r=>r!=="meta.yaml"&&!r.startsWith(".")).sort().map(r=>({name:Et(r,Ge(r)),file:r,format:Rt[Ge(r)]??"txt"}))}import{mkdirSync as Pt,appendFileSync as At}from"fs";import{join as Je}from"path";function pe(e,t){return Je(e,"tests",t,"logs")}function me(e,t,r,n={},i){try{i?.(t,r,r,n)}catch{}if(e)try{Pt(e,{recursive:!0});let o=JSON.stringify({ts:new Date().toISOString(),level:t,event:r,...n})+`
|
|
4
|
-
`;At(Je(e,"diagnostics.ndjson"),o)}catch{}}import{promises as b}from"fs";import{dirname as $t,join as E}from"path";import{statSync as Dt}from"fs";import{promises as fe}from"fs";import{basename as Ct,join as Lt}from"path";var jt=1e6,Ot=2e6;function Ft(){return Se.map(e=>Ee(e))}function Xe(e=Ft()){return e.map(t=>{let r=0;try{r=Dt(t).size}catch{}return{path:t,offset:r}})}var Mt=/\x1b\[[0-9;]*[A-Za-z]/g;async function Tt(e,t,r){let n;try{n=await fe.open(e,"r");let i=(await n.stat()).size,o=t<=i?t:0,s=i-o;if(s<=0)return null;let a=s>r?i-r:o,u=Buffer.alloc(Math.min(s,r));return await n.read(u,0,u.length,a),u.toString("utf8")}catch{return null}finally{await n?.close().catch(()=>{})}}async function Ze(e,t){let r=t.caps?.stderr??jt,n=t.caps?.appium??Ot,i=[];t.runnerStderrPath&&i.push({src:t.runnerStderrPath,from:0,cap:r});for(let o of t.appiumMarks??[])i.push({src:o.path,from:o.offset,cap:n});for(let o of i){let s=await Tt(o.src,o.from,o.cap);if(s===null)continue;let a=s.replace(Mt,"");if(a!=="")try{await fe.mkdir(e,{recursive:!0}),await fe.writeFile(Lt(e,Ct(o.src)),a)}catch{}}}async function Nt(e){try{let t=E(e,"tests"),r=await b.readdir(t).catch(()=>[]);for(let n of r){let i=E(t,n,"steps"),o=await b.readdir(i).catch(()=>[]);for(let s of o){let a=await b.readFile(E(i,s,"failure.yaml"),"utf8").catch(()=>null);if(a!=null)try{let u=x(a);if(u&&typeof u=="object"&&u.triage)return!0}catch{}}}}catch{}return!1}async function Qe(e,t,r,n={}){let i=E(e,"tests",t,"logs");if(r)try{await b.mkdir(i,{recursive:!0}),await b.copyFile(r,E(i,"tui.log"))}catch{}await Ze(i,{runnerStderrPath:r?E($t(r),"runner-stderr.log"):void 0,appiumMarks:n.appiumMarks});let o=await le(i);if(!o.length&&n.requireRealLog)throw new Error(`evidence test ${t} has no real log to declare`);o.length&&await ce(e,t,se(o))}async function ge(e){let t=e.cwd??process.cwd(),r=e.packDir??_(e.executionId,t);if(!e.saved&&!e.packDir)return await ne(e.executionId,t),{sealed:!1};await Qe(r,e.testId,e.tuiLogPath,{requireRealLog:e.requireRealLog,appiumMarks:e.appiumMarks});let n=E(r,"run.yaml"),i=x(await b.readFile(n,"utf8"));i.environment={...i.environment??{},saved:e.saved,run_kind:e.runKind},await b.writeFile(n,h(i,{lineWidth:-1}));let o=await b.open(n,"r+");try{await o.sync()}finally{await o.close()}let s=await Nt(r);await D(r,new Date().toISOString());let a;try{let c=await A(r,"L1");a=c.valid;let p=(c.diagnostics??[]).filter(l=>String(l?.code??"").includes("failure.status_disagrees"));if(p.length>0)if(e.expectStatusDisagrees||s){let l=e.expectStatusDisagrees?"expected under --bug-detection continue":"self-explained by triaged failure record(s)";console.warn(`evidence: ${p.length} status_disagrees advisory(ies) \u2014 ${l}`)}else console.warn(`evidence: ${p.length} status_disagrees advisory(ies) \u2014 step verdicts disagree with their failure records`,p);if(!c.valid){console.warn(`evidence: sealed pack ${e.executionId} failed L1 validation`,c.diagnostics);let l=String(c.diagnostics?.[0]?.code??"");me(pe(r,e.testId),"warn","EVIDENCE_INVALID",{execution_id:e.executionId,first_code:l,surface:e.surface??"testmd"},e.log)}}catch(c){console.warn(`evidence: validation error for ${e.executionId}`,c)}let u;if(e.saved&&e.packDir)try{u=await Fe(r,e.executionId,t)}catch(c){console.warn(`evidence: store install failed for ${e.executionId}`,c)}if(e.outputStemDir)try{await ue(e.outputStemDir,{execution_id:e.executionId,run_kind:e.runKind,status:e.verdict,valid:a,at:new Date().toISOString()})}catch(c){console.warn(`evidence: execution-pointer append failed for ${e.executionId} (pack is sealed)`,c)}return{sealed:!0,valid:a,storePath:u}}import{release as et}from"os";import{execFileSync as Vt}from"child_process";var tt=!1,T;function Bt(){if(!tt)if(tt=!0,process.platform==="darwin")try{T=Vt("sw_vers",["-productVersion"],{timeout:2e3}).toString().trim()||void 0}catch{T=et()||void 0}else T=et()||void 0;return T}function _e(e){let t={os:V(process.platform)},r=Bt();if(r&&(t.os_version=r),e.cdpBrowser){let o=/^([A-Za-z]+)\/(\d+)/.exec(e.cdpBrowser);o&&(t.browser=o[1].replace(/^Headless/,""),t.browser_version=o[2])}e.resolution&&(t.resolution=e.resolution);let n=Le(t,e.runnerEnvironment);if(!n.native_platform)return n;e.deviceName&&(n.device=e.deviceName),!n.os_version&&e.deviceOsVersion&&(n.os_version=e.deviceOsVersion);let i=Ae(e.deviceApp);if(i&&(n.app=i),e.deviceModel){let o=N(e.deviceModel);o&&(n.device_slug=o)}else if(xe(n.target)){let o=e.runnerEnvironment?.device,s=Pe(o);s&&(n.device=s);let a=Re(o),u=a?N(a):void 0;u&&(n.device_slug=u)}return e.pixelResolution&&(n.viewport=n.resolution??zt(e.pixelResolution,n.pixel_ratio)??e.pixelResolution,n.resolution=e.pixelResolution),n}function zt(e,t){if(!t||!Number.isFinite(t)||t<=0)return;let r=/^(\d+)x(\d+)$/.exec(e);if(r)return`${Math.round(Number(r[1])/t)}x${Math.round(Number(r[2])/t)}`}async function rt(e){if(e)try{let t=await fetch(`${e}/json/version`,{signal:AbortSignal.timeout(2e3)});if(!t.ok)return;let r=await t.json();return typeof r.Browser=="string"?r.Browser:void 0}catch{return}}function Ut(e){let t;return()=>(t||(t=rt(e)),t)}import{promises as v,existsSync as k,readFileSync as qt}from"fs";import{basename as Wt,join as m}from"path";import{readFileSync as Ht}from"fs";import{dirname as Kt,resolve as Yt}from"path";function nt(e,t){let r=Yt(e),n=Ht(r,"utf8");return j(t?Me(n,Te(Kt(r),t)):n)}async function it(e){for(let t of await v.readdir(e,{withFileTypes:!0})){let r=m(e,t.name);if(t.isDirectory()){await it(r);continue}try{await v.unlink(r)}catch{await v.truncate(r,0)}}await v.rmdir(e).catch(()=>{})}function Gt(e){let t=e.authorBoundary<0||e.authorBoundary>e.totalSteps?e.totalSteps:e.authorBoundary;return{shrink_count:e.shrinkCount,complete_reauthor:t===0&&e.totalSteps>0,author_boundary:t,total_steps:e.totalSteps,reauthored_steps:e.totalSteps-t,credits_consumed:Math.round(e.creditsConsumed*100)/100}}var L=class e{constructor(t){this.opts=t}executionId;testId;definitionPath=null;definitionContent=null;accumulatedSteps=[];maxOrdinal=0;_attempts=[];_packDirOverride;_attached=!1;appiumMarks=Xe();get attached(){return this._attached}static async attach(t){let r=Wt(t.packDir).replace(/\.evidence$/,""),n=new e({origin:"testrun",runKind:"author",pid:process.pid,title:t.testId,started:new Date().toISOString(),producerVersion:Ie,cwd:t.cwd});n.executionId=r,n.testId=t.testId,n._packDirOverride=t.packDir,n._attached=!0;let i=m(t.packDir,"tests",t.testId);return await v.mkdir(i,{recursive:!0}),t.definition&&(await v.writeFile(m(i,t.definition.path),t.definition.content),n.definitionPath=t.definition.path,n.definitionContent=t.definition.content),n}async start(){if(this._attached)throw new Error("attach-mode session is already started");this.executionId=z(),this.testId=this.opts.testmdRelPath?X(this.opts.testmdRelPath):Z(this.opts.objectiveOrName??"session",this.opts.sessionId??this.executionId);let t=this.opts.definition??null;return await re({execution_id:this.executionId,title:this.opts.title,started:this.opts.started,producerVersion:this.opts.producerVersion,surfaces:this.opts.surfaces,run_kind:this.opts.runKind,origin:this.opts.origin,pid:this.opts.pid,...this.opts.credits!==void 0?{credits:this.opts.credits}:{}},this.testId,t,this.opts.cwd,this.opts.packRootDir?this.pack:void 0),t&&(this.definitionPath=t.path,this.definitionContent=t.content),{executionId:this.executionId,testId:this.testId,packTestDir:this.packTestDir}}get pack(){return this._packDirOverride?this._packDirOverride:this.opts.packRootDir?m(this.opts.packRootDir,`${this.executionId}.evidence`):_(this.executionId,this.opts.cwd)}get packTestDir(){return m(this.pack,"tests",this.testId)}async writeDefinition(t,r="test.md"){await v.writeFile(m(this.packTestDir,r),t),this.definitionPath=r,this.definitionContent=t}computeAssuranceId(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let t=m(this.opts.cwd,this.opts.testmdRelPath);if(k(t))return $e(qt(t,"utf8"))?.id}}catch{}}computeDefinitionId(){try{if(this.opts.testmdRelPath&&this.opts.cwd){let t=m(this.opts.cwd,this.opts.testmdRelPath),r=m(this.opts.cwd,".context"),n=k(r)?O(r):void 0;if(k(t))return nt(t,n)}if(this.definitionContent!=null)return j(this.definitionContent)}catch{}}noteSpawn(t){this.accumulatedSteps.push(...t.steps),this.maxOrdinal=Math.max(this.maxOrdinal,t.maxOrdinal)}nextOrdinalOffset(){return this.maxOrdinal}get steps(){return this.accumulatedSteps}get attempts(){return this._attempts}async archiveAttempt(t,r,n={}){let i=this._attempts.length+1,o=m(this.packTestDir,String(i)),s=n.log,a=(c,d)=>s?.("warn","ARCHIVE_ATTEMPT_FAILED",`Attempt ${i}: ${c} could not be archived into ${i}/; the next attempt will mingle with it`,{attempt:i,dir:c,error:String(d)}),u;try{await v.mkdir(o,{recursive:!0})}catch(c){a(`${i}/`,c)}for(let c of["steps","logs","v16-trajectory"]){let d=m(this.packTestDir,c);if(!k(d))continue;let p=m(o,c);try{await v.rename(d,p);continue}catch(l){s?.("warn","ARCHIVE_ATTEMPT_RENAME_FAILED",`Attempt ${i}: rename of ${c}/ refused; copying it into ${i}/ and emptying the originals in place`,{attempt:i,dir:c,error:String(l),fallback:"copy+truncate"})}try{await v.cp(d,p,{recursive:!0}),await it(d)}catch(l){a(c,l)}}try{this.definitionPath&&k(m(this.packTestDir,this.definitionPath))&&await v.copyFile(m(this.packTestDir,this.definitionPath),m(o,this.definitionPath));let c=m(o,"steps");if(k(c)){for(let d of await v.readdir(c))if(k(m(c,d,"failure.yaml"))){u=`${i}/steps/${d}/failure.yaml`;break}}}catch(c){a("definition + failure pointer",c)}return this._attempts.push({n:i,status:t,steps:this.accumulatedSteps,...r!==void 0?{failedAt:r}:{},...u?{failure:u}:{}}),this.accumulatedSteps=[],this.maxOrdinal=0,i}async writeResult(t){let r=de(t.spawns),n=this._attempts.length?[...this._attempts.map(g=>({status:g.status})),{status:r,...t.durationMs!==void 0?{duration_ms:t.durationMs}:{}}]:void 0,i=n?new Set(n.map(g=>g.status)).size>1:void 0,o=this._attempts.length>0,s=t.heal,a=o||s?.forced?{triggered:o,...o?{outcome:r==="passed"?"healed":"exhausted"}:{},...s?Gt(s):{},...o?{attempts:this._attempts.map(g=>({n:g.n,status:g.status,failed_at:g.failedAt??-1,...g.failure?{failure:g.failure}:{}}))}:{}}:void 0,u=this.pack,c=ee(t.externalIdInput),d=B(t.runnerEnv,t.intentEnv),p=this.computeDefinitionId(),l=this.computeAssuranceId();await ae(u,this.testId,F({testId:this.testId,status:r,durationMs:t.durationMs,definitionPath:this.definitionPath,definitionId:p,assuranceId:l,externalId:c,environment:d,steps:t.steps,tags:t.tags,attempts:n,flaky:i,adaptiveHeal:a}));for(let g of this._attempts){let R=m(this.packTestDir,String(g.n));k(R)&&await v.writeFile(m(R,"result.yaml"),F({testId:this.testId,status:g.status,definitionPath:this.definitionPath,definitionId:p,assuranceId:l,externalId:c,environment:d,steps:g.steps,tags:t.tags}))}let f=t.externalIdInput;return t.log&&(f.commit_id||f.test_id||f.testcase_id)&&t.log("info","EVIDENCE_EXTERNAL_ID","Evidence external-id mapping",{execution_id:this.executionId,commit_id:f.commit_id??null,test_id:f.test_id??null,testcase_id:f.testcase_id??null,tc_id:c.tc_id??null,project_id:f.project_id??null,session_id:f.session_id??null,session_name:f.session_name??null,hyper_test_instance_id:c.hyper_test_instance_id??null,hyper_job_id:c.hyper_job_id??null,hyper_task_id:c.hyper_task_id??null,dataset_id:c.dataset_id??null,dataset_row_id:c.dataset_row_id??null,dataset_version_id:c.dataset_version_id??null}),r}get id(){return this.executionId}get test(){return this.testId}};async function Jt(e,t,r=H){try{let n=await r(e);if(n.aborted.length>0||n.removed.length>0)try{t?.("info","EVIDENCE_RECOVERY","Startup evidence recovery swept incomplete packs",{aborted:n.aborted,removed:n.removed,origin:"startup"})}catch{}return n}catch(n){return console.warn("evidence: startup recovery failed",n),{aborted:[],removed:[]}}}import{promises as ur}from"fs";import{existsSync as ve,mkdirSync as rr,readdirSync as nr,readFileSync as ir,rmSync as or,statSync as sr,writeFileSync as ar}from"fs";import{join as P}from"path";import{mkdirSync as Xt,renameSync as Zt,rmSync as Qt,writeFileSync as er}from"fs";import{join as ot}from"path";var tr=5e6;function st(e,t,r){let n=ot(e,"coverage","sources"),i=new Map,o=!1;try{for(let s of r.usecases)for(let a of s.sources){if(i.has(a.id)){a.file=i.get(a.id);continue}if(!a.cid)continue;let u=Be(t,a.cid);if(u===null||u.byteLength>tr)continue;o||(Xt(n,{recursive:!0}),o=!0);let c=ot(n,a.id),d=`${c}.tmp-${process.pid}`;er(d,u),Zt(d,c);let p=`coverage/sources/${a.id}`;i.set(a.id,p),a.file=p}}catch{for(let s of r.usecases)for(let a of s.sources)delete a.file;if(o)try{Qt(n,{recursive:!0,force:!0})}catch{}}}var cr={passed:"passed",failed:"failed",broken:"blocked",skipped:"not-run"},at=(e,t)=>{try{if(!ve(t))return{status:"skipped",reason:"no context store at the project root"};let r=P(e,"tests");if(!ve(r))return{status:"skipped",reason:"pack has no tests/"};let n=new Map;for(let a of nr(r)){let u=P(r,a,"result.yaml");if(!ve(u)||!sr(P(r,a)).isDirectory())continue;let c=x(ir(u,"utf8"));if(!c?.definition_id&&!c?.assurance_id)continue;let d=Ue(c.steps??[]),p={testShortId:String(c.test??a),execution:cr[String(c.status)]??"not-run",...d.length?{acs:d}:{}};c.assurance_id&&n.set(`id:${c.assurance_id}`,p),c.definition_id&&n.set(`def:${c.definition_id}`,p)}let i=Ve(O(t),n,{scope:"run"}),o=Ne(i);st(e,t,i);let s=h({...i,rollup:o},{lineWidth:-1});return rr(P(e,"coverage"),{recursive:!0}),ar(P(e,"coverage","usecases.yaml"),s),{status:"written"}}catch(r){try{or(P(e,"coverage","sources"),{recursive:!0,force:!0})}catch{}return{status:"skipped",reason:r instanceof Error?r.message:String(r)}}};async function dr(e){try{let t=new L({origin:"inline",runKind:"author",pid:e.pid,title:e.title,started:new Date().toISOString(),producerVersion:e.producerVersion,surfaces:e.surfaces,objectiveOrName:e.objectiveOrName,sessionId:e.sessionId,cwd:e.cwd,packRootDir:e.packRootDir}),r=await t.start();return{session:t,...r,packDir:t.pack,spawns:[],startedAtMs:Date.now(),cwd:e.cwd}}catch(t){return console.warn("evidence: inline pack creation failed",t),null}}function lr(e,t,r){if(!e)return;e.session.noteSpawn(t),t.resolution&&(e.resolution=t.resolution),e.runnerEnvironment=Ce(e.runnerEnvironment,t.runnerEnvironment);let n=(r?.per_flow_metadata??[]).map(i=>({resultCode:i?.result_code!=null?Number(i.result_code):null}));e.spawns.push({resultCode:r?.result_code!=null?Number(r.result_code):null,...n.length?{perFlow:n}:{}})}function pr(e){if(e)return{packTestDir:e.packTestDir,ordinalOffset:e.session.nextOrdinalOffset()}}async function mr(e,t){if(!e)return null;if(e.finalized)return e.finalized;let r=(n,i,o)=>t.log?t.log("warn",n,i,o):console.warn(`evidence: ${i}`,o??"");try{if(t.recordedTestPath)try{await e.session.writeDefinition(await ur.readFile(t.recordedTestPath,"utf8"))}catch(s){r("EVIDENCE_DEFINITION_FAILED","could not attach synthesized test.md",{error:String(s)})}let n=t.cdpBrowserCapture?await t.cdpBrowserCapture():void 0,i=await e.session.writeResult({steps:e.session.steps,spawns:e.spawns.length?e.spawns:[{resultCode:null}],externalIdInput:{...t.externalIdInput,execution_id:e.executionId},runnerEnv:_e({cdpBrowser:n,resolution:e.resolution,runnerEnvironment:e.runnerEnvironment,deviceName:t.deviceName,deviceModel:t.deviceModel,deviceApp:t.deviceApp,pixelResolution:await De(e.packTestDir)}),intentEnv:je(t.model,e.runnerEnvironment),durationMs:t.durationMs??Date.now()-e.startedAtMs,log:t.log});try{if(t.recordedTestPath){let s=He({cwd:t.cwd??e.cwd??process.cwd(),members:[{path:t.recordedTestPath,verdict:i,executionId:e.executionId,startedAt:new Date(e.startedAtMs).toISOString(),mode:"inline",local:t.local??!1}]});for(let a of s.warnings)r("EXEC_SYNC",a)}}catch(s){r("EXEC_SYNC","exec-sync failed",{error:String(s)})}try{let s=(t.coverageWriter??at)(e.packDir,ze(t.cwd??e.cwd??process.cwd()));s.status==="skipped"&&r("EVIDENCE_COVERAGE_SKIPPED",`coverage/usecases.yaml not written: ${s.reason}`)}catch(s){r("EVIDENCE_COVERAGE_SKIPPED","coverage writer threw",{error:String(s)})}let o=await ge({executionId:e.executionId,testId:e.testId,saved:t.saved,runKind:"author",verdict:i,cwd:t.cwd??e.cwd,packDir:e.packDir,tuiLogPath:t.tuiLogPath,log:t.log,surface:"inline",requireRealLog:!!e.runnerEnvironment?.native_platform,appiumMarks:e.session.appiumMarks});return e.finalized=o,t.log?.("info","EVIDENCE_SEALED","Inline pack sealed",{execution_id:e.executionId,verdict:i,valid:o.valid,pack:e.packDir,store_copy:o.storePath??null}),o}catch(n){return r("EVIDENCE_SEAL_FAILED","inline pack finalize failed",{error:String(n)}),null}}import{statSync as fr,openSync as gr,readSync as _r,closeSync as vr}from"fs";import{basename as hr,resolve as wr}from"path";async function yr(e,t,r={}){let n=r.out??(d=>process.stdout.write(d+`
|
|
5
|
-
`)),i=d=>(n(`error: ${d}`),2);if(t.env!=="prod"&&t.env!=="stage")return i(`invalid --env: ${String(t.env)}`);if(t.port!==void 0&&(!Number.isInteger(t.port)||t.port<1||t.port>65535))return i("invalid --port: expected an integer 1-65535");let o;try{o=C(t.env,t.viewerUrl),new URL(o)}catch{return i(`invalid --viewer-url: ${t.viewerUrl}`)}if(e.length===0)return i("no pack paths given");let s=new Map;for(let d of e){let p=wr(d),l;try{l=fr(p)}catch{return i(`${d}: not found`)}if(l.isDirectory())return i(`${d}: is a directory \u2014 packs must be sealed .evidence files (run the execution to completion, or seal it, first)`);if(!l.isFile())return i(`${d}: not a regular file`);let f=Buffer.alloc(2),g=gr(p,"r");try{_r(g,f,0,2,0)}finally{vr(g)}if(f.toString("latin1")!=="PK")return i(`${d}: not a sealed evidence pack (zip magic missing)`);let R=hr(p);if(s.has(R))return i(`duplicate pack basename: ${R} (URL names collide \u2014 rename one)`);s.set(R,p)}let a=r.log??((d,p,l)=>process.stderr.write(`warn: ${p} reason=${l.reason} path=${l.path}
|
|
6
|
-
`)),u;try{u=await K({packs:s,allowedOrigins:[new URL(o).origin],port:t.port,log:a})}catch(d){return i(`could not bind 127.0.0.1${t.port?`:${t.port}`:""} \u2014 ${d.message}`)}n(`serving ${s.size} pack${s.size===1?"":"s"} on http://127.0.0.1:${u.port}`);for(let d of s.keys()){let p=u.urlFor(d);n(d),n(` pack ${p}`),n(` viewer ${Y(p,o)}`)}return n("press Ctrl-C to stop"),await(r.hold??br)(),await u.close(),0}function br(){return new Promise(e=>{let t=process.listeners("SIGINT");process.removeAllListeners("SIGINT"),process.once("SIGINT",()=>{for(let r of t)process.on("SIGINT",r);e()})})}import{promises as $}from"fs";import{tmpdir as Sr}from"os";import{join as dt,resolve as we}from"path";var kr=["error","prefer_first","prefer_latest","discard"],xr=["external_id.commit_id","external_id.test_id","external_id.dataset_row_id","environment.os","environment.os_version","environment.browser","environment.browser_version","environment.device","environment.app"];function ct(e){let t=e.replace(/-/g,"_");return kr.includes(t)?t:null}function ut(e){let t=e==="discard"?{on_collision:"discard"}:{on_collision:"error",identity:{keys:[...xr],on_same:e??"nest",on_different:e?"error":"split"}};return h({packs:{require_status:"finalized",require_valid:"L1",on_ineligible:"abort"},tests:t,rules:[{file:"run.yaml",key:"run_id",must:"different",on_violation:"skip"},{file:"result.yaml",key:"external_id.project_id",must:"same",on_violation:"error"},{file:"result.yaml",key:"external_id.org_id",must:"same",on_violation:"error"}]},{lineWidth:-1})}async function he(e){try{if(!e.isTTY){e.log(q(e.packPath));return}let t=C(e.env);await(e.renderPrompt??Ir)(e.packPath,t)}catch(t){try{e.log(`evidence view failed \u2014 ${t.message}`)}catch{}}}async function Ir(e,t){let r=await import("./react-QWOAB3TB.js"),{render:n}=await import("./build-JIKYOZUH.js"),{EvidenceViewOffer:i}=await import("./EvidenceViewOffer-BTBVPBZX.js");await new Promise(o=>{let s=n(r.default.createElement(i,{packPath:e,viewerBase:t,onDone:()=>{s.unmount(),o()}}),{stdout:process.stderr,exitOnCtrlC:!1})})}async function Er(e,t,r=process.cwd(),n={}){let i=n.out??(l=>process.stdout.write(l+`
|
|
7
|
-
`)),o=n.err??(l=>process.stderr.write(l+`
|
|
8
|
-
`)),s=l=>(o(`evidence merge: ${l}`),2);if(!t.runId)return s("--run-id is required (merged identity is the caller's fact)");if(t.rules&&t.onCollision)return s("--rules and --on-collision are mutually exclusive");let a;if(t.onCollision!==void 0){let l=ct(t.onCollision);if(!l)return s(`invalid --on-collision: ${t.onCollision} (expected error | prefer-first | prefer-latest | discard)`);a=l}let u=[];for(let l of e){let f=await Rr(l,r);if(!f)return s(`no pack found for "${l}"`);u.push(f)}let c=t.out?we(r,t.out):_(t.runId,r),d=null,p;t.rules?p=we(r,t.rules):(d=await $.mkdtemp(dt(Sr(),"kane-merge-rules-")),p=dt(d,"merge-rules.yaml"),await $.writeFile(p,ut(a)));try{let l=await(n.mergeFn??Oe)(u,{runId:t.runId,out:c,rulesPath:p,title:t.title,finalize:t.finalize});return t.json?i(JSON.stringify(l)):Pr(i,l),l.output.finalized&&!t.json&&await(n.offer??he)({packPath:c,env:t.env,isTTY:n.isTTY??(!!process.stdin.isTTY&&!!process.stderr.isTTY),log:o}),0}catch(l){let f=l instanceof Error?l.message:String(l);return l?.code==="ABORT"?(o(`evidence merge: aborted \u2014 ${f}`),1):s(f)}finally{d&&await $.rm(d,{recursive:!0,force:!0}).catch(()=>{})}}async function Rr(e,t){let r=we(t,e);if(await lt(r))return r;let n=_(e,t);return await lt(n)?n:null}async function lt(e){try{return await $.stat(e),!0}catch{return!1}}function Pr(e,t){let{packs:r,tests:n,output:i}=t;e(`evidence: merged ${n.merged} tests from ${r.eligible.length} packs -> ${i.path} (${i.finalized?"sealed":"live"})`);for(let o of r.skipped)e(` skipped ${o.runId}: ${o.rule} \u2014 ${o.reason}`);for(let o of n.collisions){let s;o.action==="nest"?s=`nested into ${o.folder}, latest ${o.winner}`:o.action==="split"?s=`split into ${o.folder}`:s=`winner ${o.winner}`,e(` collision ${o.test}: ${s} (${o.rule})`)}for(let o of n.discarded)e(` discarded ${o}`)}import{copyFileSync as Ar,existsSync as ye,mkdirSync as Dr}from"fs";import{join as pt}from"path";function Cr(e,t,r){try{let n=pt(e,"auteur","execution.json");if(ye(n))return!0;for(let i of t)if(!(!i||!ye(i)))return Dr(pt(e,"auteur"),{recursive:!0}),Ar(i,n),!0}catch(n){try{r?.("debug","EVIDENCE_BLOB_COPY_FAILED","auteur execution blob copy failed",{operation:"ensureAuteurExecution",source:t.find(i=>i&&ye(i))??null,error:n instanceof Error?n.message:String(n)})}catch{}}return!1}import{mkdirSync as Lr,writeFileSync as jr}from"fs";import{join as mt}from"path";function Or(e,t,r){try{return Lr(mt(e,"auteur"),{recursive:!0}),jr(mt(e,"auteur","dataset.json"),JSON.stringify(t,null,2)+`
|
|
9
|
-
`,"utf8"),!0}catch(n){try{r?.("debug","EVIDENCE_DATASET_WRITE_FAILED","auteur dataset record write failed",{dataset_id:t.dataset_id,error:n instanceof Error?n.message:String(n)})}catch{}}return!1}import{readFileSync as Fr}from"fs";import{join as Mr}from"path";var ft="module_block";var Tr=new Set(["generative_block",ft]);function ke(e){let t=[],r=!0,n=o=>{if(o===null||typeof o!="object")return;let s=o;if(Array.isArray(s.operations))for(let a of s.operations){let u=a?.operation_id;typeof u=="string"&&u&&t.push(u)}if(Array.isArray(s.children)){Tr.has(s.content_type)||(r=!1);for(let a of s.children)n(a)}if(Array.isArray(s.branches)){r=!1;for(let a of s.branches){let u=a?.children;if(Array.isArray(u))for(let c of u)n(c)}}},i=e?.instructions;if(Array.isArray(i))for(let o of i)n(o);return{ids:t,linear:r}}function $r(e){return ke(e).ids}function be(e,t){let r=new Set(t.map(a=>a.action_id).filter(Boolean)),n=-1;for(let a of r){let u=e.indexOf(a);u>n&&(n=u)}let i=t.reduce((a,u)=>Math.max(a,u.ordinal),0),o=new Set,s=[];for(let a of e.slice(n+1))r.has(a)||o.has(a)||(o.add(a),s.push({id:a,ordinal:++i,status:"skipped",action_id:a}));return s}function gt(e,t){let r=new Set(t),n=e.filter(o=>o.action_id);if(n.some(o=>r.has(o.action_id))||n.length>t.length)return null;let i=0;return e.map(o=>o.action_id?{...o,action_id:t[i++]}:o)}function Nr(e,t){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(t[r]!==e[r].action_id)return!1;return!0}function Vr(e,t,r,n=!0){if(t.length===0)return{steps:e,tail:[]};let i=(r&&n?gt(e,t):null)??e,o=i.filter(a=>a.action_id),s=new Set(t);return o.length>0&&o.every(a=>s.has(a.action_id))?{steps:i,tail:be(t,i)}:o.length>0&&!Nr(o,t)?{steps:i,tail:[],unjoined:!0}:{steps:i,tail:be(t,i)}}function _t(e){try{let t=Fr(Mr(e,"auteur","execution.json"),"utf8");return ke(JSON.parse(t))}catch{return{ids:[],linear:!0}}}function Br(e){return _t(e).ids}export{S as a,W as b,G as c,J as d,X as e,Z as f,Ke as g,ee as h,wt as i,te as j,re as k,yt as l,bt as m,ne as n,F as o,se as p,ae as q,ce as r,ue as s,kt as t,xt as u,de as v,It as w,le as x,pe as y,me as z,Qe as A,ge as B,_e as C,rt as D,Ut as E,L as F,Jt as G,at as H,dr as I,lr as J,pr as K,mr as L,yr as M,ut as N,he as O,Er as P,Cr as Q,Or as R,ft as S,ke as T,$r as U,be as V,gt as W,Vr as X,_t as Y,Br as Z};
|
package/dist/chunk-ZKSN2SJ7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as i,c as s}from"./chunk-VZ7KXRXB.js";import{existsSync as o,mkdirSync as l,readFileSync as c,writeFileSync as g}from"fs";import{dirname as u,join as m}from"path";function a(t,r){let e=r.startsWith("sha256:")?r.slice(7):r;return m(t,"design","rationale",`${e}.yaml`)}function h(t,r,e){let n=a(t,r);return l(u(n),{recursive:!0}),g(n,s(e,{sortKeys:!0,lineWidth:-1})),n}function y(t,r){let e=a(t,r);return o(e)?i(c(e,"utf8")):null}export{h as a,y as b};
|
package/dist/chunk-ZLWURCJ7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as l}from"./chunk-RZ4F3BHX.js";var a=class{config;buffer=[];stepBuffer=new Map;flushTimer=null;currentRunIndex=null;stopped=!1;_inFlightFlush=null;_stoppingFast=!1;_droppedBatches=0;_droppedEntries=0;constructor(t){this.config=t}start(){if(this.flushTimer)return;let t=this.config.flushIntervalMs??5e3;this.flushTimer=setInterval(()=>{this.flush().catch(()=>{})},t),this.flushTimer.unref&&this.flushTimer.unref()}setRunIndex(t){this.currentRunIndex=t}log(t,e,r,s={}){if(this.stopped)return;let i=this.buildEntry(t,e,r,s);this.buffer.push(i)}logStep(t,e,r,s={}){if(this.stopped)return;let i=this.buildEntry("debug",e,r,s);i.run_index=t,this.stepBuffer.has(t)||this.stepBuffer.set(t,[]),this.stepBuffer.get(t).push(i)}escalate(t){let e=this.stepBuffer.get(t);e&&e.length>0&&this.buffer.push(...e),this.stepBuffer.delete(t)}discardSteps(t){this.stepBuffer.delete(t)}async flush(){if(this.buffer.length===0)return;let t=this._flushBody();this._inFlightFlush=t;try{await t}finally{this._inFlightFlush===t&&(this._inFlightFlush=null)}}async _flushBody(){let t=this.buffer.splice(0),e=null;try{e=await this.config.getToken()}catch{this.buffer.unshift(...t);return}let r={"Content-Type":"application/json"};e&&(r.Authorization=`Bearer ${e}`);let s=JSON.stringify(t);for(let i=0;i<3;i++){try{let n=new AbortController,o=setTimeout(()=>n.abort(),1e4),u=await l(this.config.proxyUrl,{method:"POST",headers:r,body:s,signal:n.signal});if(clearTimeout(o),u.ok)return}catch{}if(this._stoppingFast){this.buffer.unshift(...t);return}i<2&&await new Promise(n=>setTimeout(n,1e3*Math.pow(2,i)))}this._droppedBatches++,this._droppedEntries+=t.length}async flushOnce(t){if(this.buffer.length===0)return"empty";let e=this.buffer.splice(0),r=Date.now()+t,s=!1,i,n=null;try{n=await Promise.race([this.config.getToken(),new Promise(h=>{i=setTimeout(()=>{s=!0,h(null)},t),i.unref&&i.unref()})])}catch{n=null}finally{i&&clearTimeout(i)}let o=r-Date.now();if(s||o<=0)return this.buffer.unshift(...e),"timeout";let u={"Content-Type":"application/json"};n&&(u.Authorization=`Bearer ${n}`);try{let h=new AbortController,f=setTimeout(()=>h.abort(),o);f.unref&&f.unref();let p=await l(this.config.proxyUrl,{method:"POST",headers:u,body:JSON.stringify(e),signal:h.signal});return clearTimeout(f),p.ok?"sent":(this.buffer.unshift(...e),"failed")}catch{return this.buffer.unshift(...e),Date.now()>=r?"timeout":"failed"}}async stopAndFlushOnce(t){let e=Date.now()+t;this._stoppingFast=!0,this.stopped=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null);let r=this._inFlightFlush;if(r){let i;await Promise.race([r.catch(()=>{}),new Promise(n=>{i=setTimeout(n,t),i.unref&&i.unref()})]),i&&clearTimeout(i)}if(this.buffer.length===0)return"empty";let s=e-Date.now();if(s<=0)return"timeout";try{return await this.flushOnce(s)}catch{return"failed"}}drainBuffer(){return this.buffer.splice(0)}get droppedBatches(){return this._droppedBatches}get droppedEntries(){return this._droppedEntries}async shutdown(){this._droppedBatches>0&&this.log("warn","LOG_DROPS",`Dropped ${this._droppedEntries} entries in ${this._droppedBatches} batches`,{dropped_batches:this._droppedBatches,dropped_entries:this._droppedEntries}),this.stopped=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),await this.flush()}shutdownSync(){this.stopped=!0,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null)}get bufferSize(){return this.buffer.length}stepBufferSize(t){return this.stepBuffer.get(t)?.length??0}buildEntry(t,e,r,s){return{hostname:"kane-cli",service:"kane-cli",ddsource:"kane-cli",ddtags:`version:${this.config.device.cli_version}`,level:t,event:e,message:r,session_id:this.config.sessionId,run_index:e.startsWith("tcg_")?null:this.currentRunIndex,identity:this.config.identity,device:this.config.device,context:s,timestamp:new Date().toISOString()}}};export{a};
|
|
@@ -1,2 +0,0 @@
|
|
|
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,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r}from"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import{L as a}from"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{b as SLUG_RE,c as checkAcyclic,d as checkCardinality,e as citesOf,q as commitDeferGap,o as commitNames,n as commitPairMerge,l as commitProposal,p as commitRetire,m as commitReviewFacts,f as criteriaShape,i as mintEventId,j as nextEventIds,a as recordsSince,r as resolveDeferGaps,k as resolveLivingTip,g as validateCriterionOps,h as validateProposal};
|
package/dist/config-YGTHSGQN.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as O}from"./chunk-LDPLJFCV.js";import{P as g,Q as S,S as G}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import{e as w,f as $}from"./chunk-5GUD3CIH.js";import{d as x}from"./chunk-WESMQEPO.js";import{e as k}from"./chunk-EHN5HTUD.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import{b}from"./chunk-VZ7KXRXB.js";import{z as R}from"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{basename as h}from"path";import{statSync as A}from"fs";function C(t,e){if(!t)return 1;let o=t.resolve(e);return!o||o.superseded?1:t.getNode(o.tip)?.content.risk==="high"?3:1}function D(t,e){return t.usecases.map(o=>{let s=o.acceptance_criteria??[],a=s.filter(n=>(n.covered_by??[]).length>0),l=s.filter(n=>n.execution==="passed"),i=s.filter(n=>n.execution==="failed"),u=s.filter(n=>n.execution==="blocked"),d=0,m=0;for(let n of s){let f=C(e,n.id);d+=f,n.execution==="passed"&&(m+=f)}let r=d===0?0:Math.round(100*m/d),p=a.length===0?"uncovered":s.length===l.length?"covered":u.length>0&&i.length===0?"blocked":"partial";return{id:o.id,title:o.title,status:p,pct:r,acs:{total:s.length,covered:a.length,passed:l.length,failed:i.length,blocked:u.length},stale:s.filter(n=>n.fresh==="stale").map(n=>n.id)}})}async function P(t){let e=await w(t);return e.length===0?null:e.map(o=>({p:o,m:A(o).mtimeMs})).sort((o,s)=>s.m-o.m)[0].p}var N={covered:"\u2714",partial:"\u25D0",uncovered:"\u2716",blocked:"\u23F8"};function _(t){let e=Math.round(t/10);return"\u2588".repeat(e)+"\u2591".repeat(10-e)}async function I(t,e=G(),o=process.cwd()){if(t.mode!==void 0&&t.mode!=="agent"&&t.mode!=="ci"&&t.mode!=="interactive")return g(e,`--mode must be interactive | agent | ci, got '${t.mode}'`),2;if(t.mode==="agent"||t.mode==="ci"){let{makeHeadlessIO:r,agentRefusal:p}=await import("./headless-io-75HUMWZB.js"),n=r("ndjson","cover",{stdout:c=>e.out(c.replace(/\n$/,"")),stderr:c=>(e.err??e.out)(c.replace(/\n$/,""))}),f=[],v=[],j={out:c=>f.push(c),err:c=>v.push(c),confirm:async()=>!1,isTTY:!1};if(await I({...t,json:!0,mode:void 0},j,o)!==0)return p(n,v.join("; ")||"cover refused");let y=JSON.parse(f.join(`
|
|
3
|
-
`));return n.event({type:"coverage",...y}),n.done(0,void 0,M(y.completeness??[]))}let s=S(o,e);if(!s)return 2;let a=t.from?await $(t.from,o):await P(o);if(!a)return g(e,t.from?`no evidence pack at '${t.from}'`:"no evidence pack in .testmuai/evidence \u2014 run a test first, or pass --from <pack>"),2;let l=await k(a,"coverage/usecases.yaml");if(l==null)return g(e,`${h(a)} carries no coverage/usecases.yaml \u2014 the pack predates coverage or its project had no .context at seal time`),2;let i=b(l);if(!i||!Array.isArray(i.usecases))return g(e,`${h(a)}: coverage/usecases.yaml is not a usecases document`),2;let u=R(s),d=D(i,u),m=await x(u,"design");if(t.json)return e.out(JSON.stringify({pack:a,depth:d,completeness:m},null,2)),0;e.out(`coverage \u2014 ${h(a)}`),e.out(""),e.out("depth (proven by the pack):");for(let r of d){let p=r.stale.length?` \xB7 ${r.stale.length} stale`:"";e.out(` ${N[r.status]} ${_(r.pct)} ${String(r.pct).padStart(3)}% ${r.id} \u2014 ${r.status} (${r.acs.passed}/${r.acs.total} ACs proven${r.acs.failed?`, ${r.acs.failed} failed`:""}${r.acs.blocked?`, ${r.acs.blocked} blocked`:""})${p}`)}e.out(""),e.out("completeness (live graph):"),m.length===0&&e.out(" no design gaps \u2014 every AC verified, every use-case scenarioed");for(let r of m)e.out(` [${r.risk}] ${r.tag} ${r.ref} \u2014 ${r.why}`),e.out(` \u2192 ${r.ready_command}`);return 0}function M(t){return t.filter(e=>e.ready_command.startsWith("kane-cli ")&&O(e.ready_command)).slice(0,4).map(e=>({cmd:e.ready_command,why:e.why}))}export{I as coverCommand,M as coverNext,D as depthRows};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-EVFFDODK.js";import"./chunk-KJQNAOOE.js";import"./chunk-BB2W35TW.js";import"./chunk-KDNNMU7Q.js";import"./chunk-VVOKM2VO.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as captureForceScope,b as commitDesign,c as designPhaseLadder};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-HG5LLZBU.js";import"./chunk-XT7XA4DN.js";import"./chunk-TM7VRLWS.js";import"./chunk-RZ4F3BHX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{b as deviceSlug,a as evidenceAppName,c as readFirstStepPixelWindow};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-DTRKTBCE.js";import"./chunk-2UIHS2FH.js";import"./chunk-YKTYVJBN.js";import"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-N2P4MI32.js";import"./chunk-VVOKM2VO.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{b as REMOTE_PROVIDERS,d as findProvider,a as landingReceipt,c as looksLikeUrl};
|
package/dist/doctor-TPYPEEUL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-6HU5M2DS.js";import"./chunk-ZXY4P76I.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-75MMTNPB.js";import"./chunk-MSGW4JDG.js";import"./chunk-TZXXJWHA.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-RZ4F3BHX.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{d as doctorExitCode,c as doctorPreflightBlocked,b as renderDoctorText,a as runDoctor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-SEEEGDVK.js";import"./chunk-2UIHS2FH.js";import"./chunk-Q2F5QB2W.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-VVOKM2VO.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-MSGW4JDG.js";import"./chunk-UR6MHSHU.js";export{a as DOCX_CONVERTER_POLICY,b as DOCX_CONVERTER_VERSION,d as DOCX_IMAGE_CAP,c as DOCX_IMAGE_DIMENSION_FLOOR,f as DOCX_IMAGE_MAX_BYTES,g as DOCX_IMAGE_MAX_PIXELS,e as DOCX_VISION_BYTE_BUDGET,i as convertDocx,h as renderTokens};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{A as K,B as L,C as M,D as N,E as O,F as P,G as Q,I as R,J as S,K as T,L as U,M as _,O as $,P as aa,Q as ba,R as ca,T as da,U as ea,V as fa,W as ga,X as ha,Y as ia,Z as ja,a as c,b as d,c as e,d as f,e as g,f as h,h as i,i as j,j as t,k as u,l as v,m as w,n as x,o as y,p as z,q as A,r as B,s as C,t as D,u as E,v as F,w as G,x as H,y as I,z as J}from"./chunk-ZJYT72BA.js";import"./chunk-AACQE24F.js";import{a as n,b as o,c as p,e as q,f as r,g as s}from"./chunk-5GUD3CIH.js";import{a as V,b as W,c as X,d as Y,e as Z}from"./chunk-4CYBXJIA.js";import"./chunk-RTSBKCZY.js";import"./chunk-WESMQEPO.js";import{a as k,b as l,c as m}from"./chunk-EHN5HTUD.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import{a,f as b}from"./chunk-GCISXCDU.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-OHOJSADN.js";import"./chunk-OIUV3ISA.js";import"./chunk-HG5LLZBU.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-75MMTNPB.js";import"./chunk-MSGW4JDG.js";import"./chunk-XT7XA4DN.js";import"./chunk-TM7VRLWS.js";import"./chunk-4JOD47QI.js";import"./chunk-NMSZ7G6P.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-UR6MHSHU.js";export{P as EvidenceSession,C as appendExecutionPointer,M as assembleExecutionEnv,b as buildEnvironment,j as buildEvidenceRunConfig,i as buildExternalId,z as buildLogsMetaYaml,y as buildResultYaml,t as buildRunYaml,O as createCdpBrowserCapture,u as createRunningPack,v as createRunningPackRoot,H as declareLogsFromDir,J as diagnostics,x as discardPack,ba as ensureAuteurExecution,N as fetchCdpBrowserString,L as finalizeEvidencePack,U as finalizeInlineEvidence,K as finalizeMemberTestLogs,ea as flattenAuteurLeafIds,da as flattenAuteurLeaves,T as inlineEvidenceBlock,q as listPacks,p as newExecutionId,a as normalizeOs,S as noteInlineSpawn,$ as offerEvidenceView,o as packPath,I as packTestLogsDir,V as parseRange,D as readExecutionPointers,ja as readPackLeafIds,ia as readPackLeaves,s as recoverStore,ga as remapReplayActionIds,r as resolvePack,ha as resolveReplayResultSteps,F as rollupTestStatus,aa as runEvidenceMerge,_ as runEvidenceServe,E as runEvidenceValidate,Q as runStartupRecovery,l as sealPack,w as sealPackById,Z as serveHint,f as shortHash,e as slugify,W as startEvidenceLocalServer,R as startInlineEvidence,n as storeDir,m as sweepStore,fa as synthesizeSkippedTail,h as testIdForInline,g as testIdForTestmd,k as validatePack,c as verdictFromResultCode,X as viewerBaseFor,Y as viewerUrlFor,d as worstOf,G as worstResultCode,ca as writeAuteurDataset,B as writeLogsMeta,A as writeResult};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-ULGZPRKU.js";import"./chunk-5GUD3CIH.js";import"./chunk-EHN5HTUD.js";import"./chunk-VZ7KXRXB.js";import"./chunk-UR6MHSHU.js";export{a as collectEvidenceRows,b as serveCommands};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-OJAXOOZ5.js";import"./chunk-Q6AHSGOE.js";import"./chunk-LDPLJFCV.js";import"./chunk-LSDWPG6C.js";import"./chunk-UJZZDPDY.js";import"./chunk-5ZFOKYFB.js";import"./chunk-BZAGVBCX.js";import"./chunk-FY7TCYPK.js";import"./chunk-KDNNMU7Q.js";import"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{g as EVOLVE_SCOPE_ADVICE,h as composeEvolveStatement,b as designStateOf,k as evolveCommand,c as evolveOneUc,j as forwardChildLine,i as liveRunDesignForUc,f as namedEntityOf,a as resolveParentUc,e as runEvolveCommand,d as staleTargets};
|
package/dist/explain-NEFBUX5G.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-F2OBORCG.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as explain};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-F2OBORCG.js";import{Q as i}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import{z as n}from"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";async function f(s,p){let o=i(process.cwd(),{out:r=>process.stdout.write(r+`
|
|
3
|
-
`),err:r=>process.stderr.write(r+`
|
|
4
|
-
`),confirm:async()=>!1,isTTY:!!process.stdout.isTTY});if(!o)return 2;let c=n(o),t=a(o,c,s);if(p.json)return process.stdout.write(JSON.stringify(t)+`
|
|
5
|
-
`),t.target?0:1;if(!t.target)return process.stdout.write(`error: ${s} names nothing in the graph
|
|
6
|
-
`),1;let e=t.target;process.stdout.write(`${e.slug??e.cid} ${e.label} tip ${e.tip}
|
|
7
|
-
`);for(let r of t.entries)process.stdout.write(` #${r.seq} ${r.ts} ${r.kind} ${r.detail}${r.rationale?`
|
|
8
|
-
why: ${r.rationale}`:""}
|
|
9
|
-
`);return 0}export{f as explainCommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as E}from"./chunk-ZKSN2SJ7.js";import{a as x}from"./chunk-F2OBORCG.js";import"./chunk-VZ7KXRXB.js";import{z as h}from"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import{f as d,g}from"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import{a as k}from"./chunk-CH273NAE.js";import"./chunk-UR6MHSHU.js";async function _(f,$={}){let m=$.contextDir??k(process.cwd()),e=$.out??(c=>process.stdout.write(c+`
|
|
3
|
-
`)),o=h(m),u=o.resolve(f);if(!u){let c=[...o.names.keys()].filter(n=>/^(t|sc|ac|gap)-/.test(n)).sort();return e(`no design rationale recorded for ${f} (exists: ${c.slice(0,12).join(", ")||"(no designed items)"})`),1}let a=u.tip,s=o.nodeLabel.get(a),r=o.getNode(a),l=o.nameOf.get(a)??a.slice(0,19);if(s===d.TEST){let c=String(r?.content.definitionId??""),n=c?E(m,c):null;if(!n){let i=null;for(let S of o.edgesFrom(a))if(S.type===g.VERIFIES){for(let p of o.edgesFrom(S.dst))if(p.type===g.SCOPED_TO){i=o.nameOf.get(p.dst)??p.dst.slice(0,19);break}if(i)break}return e(`no design rationale recorded for ${f} (exists: test ${l}, but its sidecar is missing \u2014 re-run: kane-cli design tests${i?` --use-case ${i}`:""} --force)`),1}e(`${l} \u2014 ${String(r?.content.title??"")}`),e(`technique: ${n.technique}`),e(`profile family: ${n.profile_family}`),e(`anchored to: ${n.anchor}`),e(`expected how: ${n.expected_how}`),e(`combinatorial: strength ${n.combinatorial.strength} \u2014 ${n.combinatorial.reason}`),e(`surface: ${n.surface_state} \xB7 deferred bindings: ${n.deferred_bindings}`);let t=r?.content.check;t&&e(`check: ${String(t.kind)} ${String(t.operator)} ${String(t.operand??t.within??"")} \u2014 verified against ${String(t.verified_against)}`);for(let i of o.edgesFrom(a))i.type===g.AUTOMATES&&e(`automates: ${o.nameOf.get(i.dst)??i.dst.slice(0,19)}`),i.type===g.VERIFIES&&e(`verifies: ${o.nameOf.get(i.dst)??i.dst.slice(0,19)}`),i.type===g.REUSES&&e(`imports: ${o.nameOf.get(i.dst)??i.dst.slice(0,19)}`);return 0}if(s===d.SCENARIO||s===d.AC||s===d.GAP){let n=x(m,o,f).entries.filter(t=>t.kind==="judgement"||t.kind==="review");if(e(`${l} \u2014 ${String(r?.content.title??r?.content.text??"")}`),s===d.SCENARIO&&(e(`case type: ${String(r?.content.case_type??"")} \xB7 intent: ${String(r?.content.intent??"")}`),e(`technique: ${String(r?.content.technique_notes??"")}`)),s===d.AC){let t=r?.content.expected_answer;e(`kind: ${String(r?.content.kind??"")}${t?` \xB7 oracle: ${String(t.operator)} ${String(t.operand??"")}`:""}`)}n.length===0&&e("(no recorded judgements yet \u2014 approvals and design-time judgements land here)");for(let t of n)e(t.kind==="judgement"?`judgement: ${t.rationale??t.detail}`:`review: ${t.detail}`);return 0}return e(`no design rationale recorded for ${f} (exists: ${s??"nothing"} ${l} \u2014 design explains tests, scenarios, ACs, and gaps)`),1}export{_ as designExplainCommand};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as $}from"./chunk-A2SQD2AY.js";import{a as A}from"./chunk-OC6H6BYI.js";import{a as ie}from"./chunk-LSDWPG6C.js";import{f as se,g as U}from"./chunk-SRTKRHYI.js";import"./chunk-ZMNJBUAO.js";import"./chunk-W5TTF7GB.js";import"./chunk-I7TIGB7K.js";import"./chunk-5HMN74RZ.js";import"./chunk-VORWZLS3.js";import"./chunk-VBS33P2C.js";import"./chunk-WVHMPIDQ.js";import"./chunk-XKHWWKJZ.js";import"./chunk-BB2W35TW.js";import"./chunk-AXTPNZPX.js";import"./chunk-U6OTFMIT.js";import"./chunk-BZAGVBCX.js";import"./chunk-V4B5QA3U.js";import"./chunk-SEEEGDVK.js";import{e as W}from"./chunk-OXC6O5O7.js";import"./chunk-243ZJHT6.js";import"./chunk-DTRKTBCE.js";import"./chunk-2UIHS2FH.js";import{c as L}from"./chunk-YKTYVJBN.js";import"./chunk-FY7TCYPK.js";import"./chunk-63DYVWNX.js";import"./chunk-427OQS2N.js";import"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-Q6F23V7L.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import{T as ee,U as te,V as re,W as Y,X as ne}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import{c as O}from"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import{a as C}from"./chunk-CH273NAE.js";import{a as B,b as H}from"./chunk-3YIZG7WZ.js";import"./chunk-ZLWURCJ7.js";import"./chunk-QSCXXNC2.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";import{existsSync as oe}from"fs";async function he(n){let[{render:s},a,{QuestionBatchPrompt:m}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./ui-JEJGTURD.js")]),h=a.default??a;return new Promise(x=>{let v=s(h.createElement(m,{questions:n,onSubmit:t=>{v.unmount(),x(t)}}))})}async function we(n,s){let[{render:a},m,{ReviewChecklist:h}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./ui-JEJGTURD.js")]),x=m.default??m;return new Promise(v=>{let t=a(x.createElement(h,{items:n.map(f=>{let w=s.get(f.temp_ref);return{uc:f,dedupWith:w&&!w.archived?w.cid:void 0,archivedMatch:w?.archived?{cid:w.cid,reason:w.reason}:void 0}}),onSubmit:f=>{t.unmount(),v(f)}}))})}async function ye(n){let{createInterface:s}=await import("readline/promises"),a=s({input:process.stdin,output:process.stdout});try{let m=await a.question(`${n} [y/N] `);return/^y(es)?$/i.test(m.trim())}finally{a.close()}}async function Ae(n){let s=C(process.cwd()),a=H({verb:"extract",mode:n.plan?"cli":"interactive",contextRoot:s,env:B(),resumeSid:n.resume,write:!0,longSession:!0});await ee(s,r=>process.stderr.write(r+`
|
|
3
|
-
`));{let r=oe(s)?Y(s):null;if(r)return process.stderr.write(`error: ${r.text}
|
|
4
|
-
next: ${r.remedy}
|
|
5
|
-
`),await a.end({exit_code:2}),2}let h={...await W(),...a.spawnEnv()},x=await L(h);if(!x.ok)return process.stderr.write((x.message??"error: turn-endpoint preflight failed")+`
|
|
6
|
-
`),process.stderr.write(a.supportFooter()+`
|
|
7
|
-
`),a.error("preflight_auth"),await a.end({exit_code:2}),2;let v=async()=>x;if(n.plan){let r=await U(n,{contextDir:s,agent:A,preflightTurn:v,ask:he,review:we,confirmStale:ye,out:l=>process.stdout.write(l+`
|
|
8
|
-
`),progress:l=>process.stderr.write(l+`
|
|
9
|
-
`),isTTY:O(),auth:h,telemetry:a});return r===1&&process.stderr.write(a.supportFooter()+`
|
|
10
|
-
`),await a.end({exit_code:r}),r}let[{render:t},f,{ScrollbackProvider:w},{ChatSurface:z},{ScrollbackTap:u},{makeChatController:F},{setInkExit:Q},T]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./scrollback-JLPJR25X.js"),import("./ChatSurface-FJPK3XEJ.js"),import("./ScrollbackTap-QHJOFYMC.js"),import("./chat-controller-UJQ6Z4RE.js"),import("./exit-manager-ZLDO54S4.js"),Promise.all([import("./chat-committer-6D7AQI6Z.js"),import("./descriptor-3JJUOHBM.js"),import("./explain-NEFBUX5G.js"),import("./readmodel-FVLRQWZ7.js")])]),[{commitChatTurn:J},{topologyDescriptor:j},{explain:e},{openGraph:i}]=T,S=f.default??f,o=F({commitChatTurn:J,descriptor:j(),contextDir:s,refreshGraph:()=>i(s),graph:i(s),explain:e,by:{kind:"human",id:"owner"},dedupFlags:r=>se(r,i(s))}),q={current:null},P=null,K=0,G=null,I=!1,ae=()=>{if(K+=1,K>=2){try{M.unmount()}catch{}$({state:"interrupted",reason:"ctrl+c \xD72",facts:["forced quit \u2014 anything already committed is safe in the store"]}),process.exit(130)}o.requestPause(),G=setTimeout(()=>{I||(I=!0,(async()=>{o.finalizeForExit(),await q.current?.flush();try{M.unmount()}catch{}$({state:"interrupted",facts:["the agent did not confirm the pause within 5s \u2014 nothing new was saved"]}),process.exit(130)})())},5e3)},ce=await import("./dossier-7HVC6BNK.js"),de=r=>{try{return ce.buildDossier(i(s),r)}catch{return null}},ue={listUcs:()=>{let r=i(s),l=new Set(o.state.turns.flatMap(c=>(c.items??[]).map(p=>p.title.toLowerCase()))),d={high:0,med:1,low:2};return r.byLabel("usecase").filter(c=>!r.superseded.has(c.cid)).map((c,p)=>{let k=c.content,b=String(k.title??c.cid.slice(0,12)),V=ie(r,c.cid),E=V?V.designed_at_cid===c.cid?"current":"stale":void 0;return{key:c.cid,title:b,badge:E==="current"?"designed":E==="stale"?"designed \xB7 stale":l.has(b.toLowerCase())?"drafted this session":"existing",designed:E,risk:k.risk,i:p}}).sort((c,p)=>(d[c.risk??"zz"]??3)-(d[p.risk??"zz"]??3)||c.i-p.i).map(({key:c,title:p,badge:k,designed:b})=>({key:c,title:p,badge:k,designed:b}))},runDesignChild:async(r,l=!1,d="design")=>{try{let{designEntryCheck:g,confirmUnreviewedViaAsk:_}=await import("./trust-gate-EX7R2P4Y.js"),y=g(i(s),r);if(!y.ok&&(y.code==="UC_UNREVIEWED"||y.code==="UC_ARCHIVED")&&!await _(D=>o.ask(D),y))return o.note(`design child refused \u2014 approve it first: ${y.reviewCmd}`),2}catch{}let[{runDesign:c}]=await Promise.all([import("./run-OTMPUQSH.js")]),p="",k=(()=>{try{let g=i(s),_=g.resolve(r);return(_?g.getNode(_.cid)?.content?.title:void 0)??r}catch{return r}})(),{collectSessionItems:b}=await import("./session-items-2ATN7VXG.js"),V=b(o.state.turns).entries.length,E=o.state.credits?.total,fe=Date.now();o.ledger({kind:"childOpen",verb:d,subject:k});let ge=g=>{let _=Math.max(1,Math.round((Date.now()-fe)/1e3)),y=b(o.state.turns).entries.length-V,R=o.state.credits?.total,D=R!==void 0&&E!==void 0?R-E:R;o.ledger(g===0?{kind:"childClose",verb:d,subject:k,ok:!0,durS:_,...y>0?{results:`${y} item${y===1?"":"s"}`}:{},...D!==void 0&&D>0?{credits:D}:{}}:{kind:"childClose",verb:d,subject:k,ok:!1,durS:_,exitCode:g,fixCmd:`kane-cli design tests --use-case ${r}${l||d==="evolve"?" --force":""}`});let Z=b(o.state.turns).entries.length;o.ledger({kind:"childBack",parentVerb:"extract",context:`${Z} draft${Z===1?"":"s"} saved`})},N=1;try{N=await c({useCase:r,force:l,mode:"interactive"},{contextDir:s,agent:A,preflightTurn:v,ask:g=>o.ask(g),chat:o,nested:!0,out:g=>{p=g},progress:()=>{},isTTY:!0,auth:h})}finally{ge(N)}return N!==0&&p&&o.note(p),N}},{makeReconcileDeps:le}=await import("./reconcile-deps-V5VLDPYT.js"),me=le({contextDir:s,...n.changeContext?{changeContext:n.changeContext}:{},note:r=>o.note(r)}),pe={verb:"extract",sid:n.resume??a.ids.session_id,env:B(),...n.source?{subject:n.source}:{}},M=t(S.createElement(w,null,S.createElement(u,{into:q}),S.createElement(z,{controller:o,verb:"extract",onCtrlC:ae,chain:ue,inspect:de,reconcile:me,meta:pe})),{exitOnCtrlC:!1});Q(()=>M.unmount());let X=null;try{let r=U(n,{contextDir:s,agent:A,preflightTurn:v,onSummary:d=>{P=d},ask:d=>o.ask(d),review:async d=>new Map(d.map(c=>[c.temp_ref,{resolution:"skipped"}])),confirmStale:async()=>!0,out:d=>o.note(d),progress:()=>{},isTTY:O(),auth:h,chat:o,telemetry:a});r.finally(()=>{I=!0});let l=await r;return X=l,l===1&&process.stderr.write(a.supportFooter()+`
|
|
11
|
-
`),await a.end({exit_code:l}),l}catch(r){throw P||(P={state:"crashed",facts:[`the session ended unexpectedly \u2014 ${r instanceof Error?r.name:"error"}`]}),r}finally{I=!0,G&&clearTimeout(G),o.finalizeForExit(),await q.current?.flush();try{M.unmount()}catch{}P?$(P):X===1&&$({state:"interrupted",facts:["the session ended without saving \u2014 see the error above"]})}}async function $e(n){let s=H({verb:"extract",mode:n.mode,contextRoot:C(process.cwd()),env:B(),resumeSid:n.resume,write:!0,longSession:!0}),{makeHeadlessIO:a,resolveEncoding:m,guardedChannels:h}=await import("./headless-io-75HUMWZB.js"),{withStructuredNext:x,prepareStructuredResume:v}=await import("./structured-answers-ZI2B6JJE.js"),t=x(a(m(n.mode),"extract")),f=await te(C(process.cwd()));f&&(m(n.mode)==="ndjson"?t.event(re(f)):t.progress(f.text));let{runWithChannel:w}=await import("./run-channel-RGH4WIQX.js"),z=m(n.mode)==="ndjson"?e=>w({event:i=>t.event(i)},e):e=>e();for(let e of n.landed??[]){let i=e;t.event({type:"ingested",source_id:e.source_id,status:e.status,cid:e.source_cid,...i.warnings?.length?{warnings:i.warnings}:{},...i.media?{media:i.media}:{},...i.duplicate_of?{duplicate_of:i.duplicate_of}:{},...i.lineage_candidate?{lineage_candidate:i.lineage_candidate}:{}})}{let e=oe(C(process.cwd()))?Y(C(process.cwd())):null;if(e)return m(n.mode)==="ndjson"?t.event(ne(e)):t.progress(`error: ${e.text}
|
|
12
|
-
next: ${e.remedy}`),await s.end({exit_code:2}),t.done(2,"refused")}let u;try{u=v({opts:n,contextDir:C(process.cwd()),verb:"extract"})}catch(e){let i=e instanceof Error?e.message:String(e);return t.out(`error: ${i}`),n.mode==="agent"&&t.event({type:"error",message:i}),await s.end({exit_code:1}),n.mode==="agent"?t.done(1,"error"):1}if(u.kind==="refuse")return t.out(u.error),n.mode==="agent"&&t.event({type:"error",message:u.error,code:u.code}),await s.end({exit_code:2}),n.mode==="agent"?t.done(2,"refused"):2;let F=n;if(u.kind==="apply"){for(let e of u.notes)t.out(e);if(u.matchedQids.length>0){t.out(`applying ${u.matchedQids.length} structured answer(s) from --answer to the paused session's pending questions`);for(let e of u.matchedQids)t.event({type:"panel_resolved",id:e,by:"user",via:"flag"})}u.statement&&(F={...n,message:[n.message,u.statement].filter(Boolean).join(`
|
|
13
|
-
|
|
14
|
-
`)})}let{makeInterruptGuard:Q}=await import("./interrupt-guard-UREUWNRL.js"),T=Q(A,e=>t.out(e)),j=h(t,()=>T.interrupted(),/^error: (agent failed|repair run failed|agent ended)/);try{let e=await z(async()=>{let i={...await W(),...s.spawnEnv()};return U(F,{contextDir:C(process.cwd()),agent:T.agent,preflightTurn:()=>L(i),ask:async()=>[],review:async S=>new Map(S.map(o=>[o.temp_ref,{resolution:"skipped"}])),confirmStale:async()=>!1,out:j.out,emit:j.emit,progress:t.progress,isTTY:!1,auth:i,telemetry:s})});return T.interrupted()&&e!==3?(t.out("interrupted \u2014 no session saved"),await s.end({exit_code:130}),t.done(130)):(e===1&&t.out(s.supportFooter()),await s.end({exit_code:e}),t.done(e))}catch(e){return t.event({type:"error",message:`error: extract failed: ${e instanceof Error?e.message:String(e)}`}),t.out(`error: extract failed: ${e instanceof Error?e.message:String(e)}`),t.out('hint: the full trace is in the file named on the "trace:" line at the start of this run'),t.done(1)}finally{T.dispose()}}export{$e as bindExtractHeadless,Ae as bindExtractInteractive};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as i}from"./chunk-CH273NAE.js";import"./chunk-UR6MHSHU.js";import{existsSync as u}from"fs";async function g(e){if(e.mode!=null&&!["interactive","agent","ci","override"].includes(e.mode)){let{makeHeadlessIO:t,agentRefusal:r}=await import("./headless-io-75HUMWZB.js");return r(t("ndjson","extract"),`extract: --mode must be interactive | agent | ci | override, got '${e.mode}'`,"MODE_USAGE")}let n=async(t,r)=>{if(e.mode!=="agent")return process.stderr.write(t+`
|
|
3
|
-
`),2;let{makeHeadlessIO:o,agentRefusal:c}=await import("./headless-io-75HUMWZB.js");return c(o("ndjson","extract"),t,r)};if(e.apply)return n("extract: --apply is not implemented yet \u2014 coming with the plan\u2192apply workflow (run without --apply, or use --plan to preview)");{let{validateResumeMessage:t}=await import("./headless-io-75HUMWZB.js"),r=t(e,"extract");if(r)return n(r)}{let{gateStructuredFlags:t}=await import("./structured-answers-ZI2B6JJE.js"),r=t(e,"extract");if(r)return n(r,"STRUCTURED_FLAGS_USAGE")}if(e.withSource&&!e.resume)return n("extract: --with-source pairs with --resume \u2014 it lands the source and sets the resumed session's pending questions aside");if(e.queued)return n("extract: --queued is gone \u2014 extract sweeps every pending source by default (just run kane-cli context extract)");if(!u(i(process.cwd())))return n("error: no context store here (run `kane-cli context ingest <files>` first)","NO_STORE");if(!e.mode&&!process.stdin.isTTY)return process.stderr.write(`extract: no TTY \u2014 pass an explicit --mode agent|ci|override to run headless
|
|
4
|
-
`),2;let s=e.mode??"interactive";if(s==="interactive"){if(!process.stdin.isTTY||!process.stdout.isTTY)return process.stderr.write(`extract: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
5
|
-
`),2;let{bindExtractInteractive:t}=await import("./extract-bind-CKIRLXAJ.js");return t(e)}let{bindExtractHeadless:a}=await import("./extract-bind-CKIRLXAJ.js");return a({...e,mode:s})}export{g as extractCommand};
|
package/dist/feeder-66TUPB2R.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-K2UJYY2U.js";import"./chunk-FY7TCYPK.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as archiveImpact,b as heldArchiveScan,c as reviewCards,d as reviewCounts};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{P as G,Q as re,S as oe,o as ne,p as se}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import{a as H,b as q,c as Q,d as X,e as Z,f as ee,g as te}from"./chunk-AACQE24F.js";import{f as V}from"./chunk-5GUD3CIH.js";import{a as O,b as F,c as C,d as z}from"./chunk-WESMQEPO.js";import"./chunk-EHN5HTUD.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import{z as Y}from"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import{f as E,g as U}from"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";function me(e,t){return e.length===0?"not_run":Q(e,t).verified?"proven":q(e,t).some(r=>r.verdict==="failed")?"failing":"blocked"}function ie(e,t){let s=null;for(let{cid:g}of e.byLabel(E.TEST))for(let o of e.execHistory(g))(!s||String(o.started_at)>s.started_at)&&(s={execution_id:String(o.execution_id),started_at:String(o.started_at)});if(!s)return null;let r=H[t],a=te(e),l=X(a).aspects[t],x={},u={},m=0,h=0,R=0;for(let g of a.usecases){let o=[];for(let v of g.acceptance_criteria){let f=v.executions??[],p=me(f,r);o.push(p),p==="failing"?m++:p==="blocked"?h++:p==="not_run"&&R++;let y=[],c;if(p==="failing"){let n=null,d=e.resolve(v.id)?.cid;for(let b of v.covered_by){let w=e.execHistory(b).map($=>({verdict:String(ee(e,$.per_ac,d,v.id)??$.verdict),oracle_mode:String($.oracle_mode),ts:String($.started_at),execution_id:String($.execution_id)})).filter($=>r.counted_verdicts.includes($.verdict)&&r.accepted_oracle_modes.includes($.oracle_mode)),S=w[w.length-1];S?.verdict==="failed"&&(y.push(b),(!n||S.ts>n.ts)&&(n={ts:S.ts,execution_id:S.execution_id}))}c=n?.execution_id}else p==="blocked"&&(c=f[f.length-1]?.execution_id);x[v.id]={state:p,viaTests:y,...c?{executionId:c}:{}}}let i=o.some(v=>v!=="not_run"),k=l.usecases[g.id],_=i?k.status==="covered"?"proven":k.status==="partial"?"partial":o.includes("failing")?"failing":o.includes("blocked")?"blocked":"not_run":"not_run";u[g.id]={pct:k.pct,status:_}}return{aspect:t,pct:l.summary.coverage_pct,acs_proven:l.summary.acs_verified,failing:m,blocked:h,not_run:R,latest_run:s,perUc:u,perAc:x,config:{...r,source:"graph_execution_facts",denominator:"current_live_acs"}}}var he=["failing","blocked","needs-refresh","needs-tests","needs-scenarios","happy-only","possible-duplicate","not-yet-run"],ve={failing:"failing",blocked:"blocked","needs-refresh":"needs refresh","needs-tests":"needs tests","needs-scenarios":"needs scenarios","happy-only":"happy path only","possible-duplicate":"possible duplicate","not-yet-run":"not yet run"},M={high:0,med:1,low:2};function D(e,t){let s=/^(.*?)(\d+)$/.exec(e),r=/^(.*?)(\d+)$/.exec(t);return s&&r&&s[1]===r[1]?Number(s[2])-Number(r[2]):e<t?-1:e>t?1:0}function I(e){if(!e||/^sha256:/.test(e))return"(unnamed)";let t=/^(uc|ac|sc|t)-(\d+)$/.exec(e);return t?`${t[1].toUpperCase()}-${t[2]}`:e}function be(e,t=5){let s=e.trim().split(/\s+/);return s.slice(0,t).join(" ")+(s.length>t?"\u2026":"")}function ye(e,t){let s=e.resolve(t),r=s?e.getNode(e.tipOf(s.cid))?.content:null;return String(r?.title??r?.text??"")}function ce(e,t){let s=e.resolve(t);return{id:s?e.displayNameOf(e.tipOf(s.cid))??e.displayNameOf(s.cid):null,title:be(ye(e,t),8)}}function xe(e,t){let s=e.resolve(t);if(!s)return null;let r=e.tipOf(s.cid);if(!O(e,r))return null;let a=e.nodeLabel.get(r);if(a===E.USECASE)return r;if(a===E.AC)return C(e,r);if(a===E.TEST){let l=e.edgesFrom(r).find(u=>u.type===U.VERIFIES&&O(e,u.dst));if(l)return C(e,l.dst);let x=e.edgesFrom(r).find(u=>u.type===U.AUTOMATES&&O(e,u.dst));if(x){let u=e.edgesFrom(x.dst).find(m=>m.type===U.BELONGS_TO&&O(e,m.dst));return u?u.dst:null}}return null}function L(e){if(e.tag==="reuse-candidate"&&e.stage==="design")return"possible-duplicate";switch(e.kind){case"no-verifies":return"needs-tests";case"zero-scenario":return"needs-scenarios";case"happy-only":return"happy-only";case"stale-ac":case"stale-test":return"needs-refresh";case"execution-failed":return"failing";case"execution-blocked":return"blocked";case"covered-not-run":return"not-yet-run";default:return"other"}}function ke(e,t){let s=e.resolve(t),r=s?e.getNode(e.tipOf(s.cid))?.content.risk:null;return r==="high"||r==="med"||r==="low"?r:"med"}function le(e,t,s,r,a){let l=a.servePaths??new Map,x=e.byLabel(E.USECASE).filter(({cid:o})=>O(e,o)),u=new Map(x.map(o=>[o.cid,o])),m=new Map(x.map(({cid:o})=>[o,[]])),h=[];for(let o of t){if(o.stage!=="design")continue;let i={...o,...ce(e,o.ref)},k=xe(e,o.ref),_=k?m.get(k):void 0;_&&L(o)!=="other"?_.push(i):h.push(i)}let R=new Map(x.map(({cid:o})=>[o,{total:0,designed:0}]));for(let{cid:o}of e.byLabel(E.AC)){if(!O(e,o))continue;let i=C(e,o),k=i?R.get(i):void 0;if(!k)continue;k.total++;let _=F(e,o);if(_&&k.designed++,!r)continue;let v=e.nameOf.get(o)??o,f=r.perAc[v];if(!f)continue;let{id:p,title:y}=ce(e,v),c={ref:e.displayNameOf(o)??o,id:p,title:y,risk:ke(e,v),stage:"cover"},n=m.get(i);f.state==="failing"?n.push({...c,kind:"execution-failed",tag:"evolve",why:"covering test failed against this AC",ready_command:f.executionId&&l.has(f.executionId)?`kane-cli evidence serve ${l.get(f.executionId)}`:"kane-cli testrun run",via_tests:f.viaTests,...f.executionId?{execution_id:f.executionId}:{},...f.executionId&&l.has(f.executionId)?{servePath:l.get(f.executionId)}:{},...a.testFiles?{viaFiles:f.viaTests.map(d=>a.testFiles.get(d)??null)}:{}}):f.state==="blocked"?n.push({...c,kind:"execution-blocked",tag:"reuse-candidate",why:"the formula could count no run \u2014 broken/skipped or an unaccepted oracle",ready_command:f.executionId&&l.has(f.executionId)?`kane-cli evidence serve ${l.get(f.executionId)}`:"kane-cli testrun run",...f.executionId?{execution_id:f.executionId}:{},...f.executionId&&l.has(f.executionId)?{servePath:l.get(f.executionId)}:{}}):f.state==="not_run"&&_&&n.push({...c,kind:"covered-not-run",tag:"reuse-candidate",why:"a covering test exists but has not run yet",ready_command:"kane-cli testrun run"})}let g=[];for(let{cid:o,content:i}of x){let k=e.displayNameOf(o)??o,_=e.nameOf.get(o)??o,v=s.perUc[k]??{pct:0,status:"undesigned",staleAcs:0},f=r?r.perUc[_]??{pct:0,status:"not_run"}:null,p=r!==null&&(f===null||f.status==="not_run"),y=R.get(o),c=m.get(o)??[],n=new Set(c.filter(b=>L(b)==="needs-refresh").map(b=>b.ref)),d=[];for(let b of he){let w=c.filter($=>L($)===b);if(b==="needs-tests"&&(w=w.filter($=>!n.has($.ref))),w.length===0)continue;w.sort(($,T)=>(M[$.risk]??3)-(M[T.risk]??3)||D($.ref,T.ref));let S=b==="failing"||b==="blocked"||w.length<=2||new Set(w.map($=>$.ready_command)).size>1;d.push({key:b,label:ve[b],...b==="needs-refresh"?{suffix:"source moved since these were designed"}:{},rows:w,...S?{}:{rosterCommand:w[0].ready_command}})}g.push({slug:k,title:String(i.title??""),risk:String(i.risk??""),des:v,prov:f,provAbsent:p,acTotal:y.total,acDesigned:y.designed,groups:d})}return g.sort((o,i)=>(M[o.risk]??3)-(M[i.risk]??3)||D(o.slug,i.slug)),h.sort((o,i)=>(M[o.risk]??3)-(M[i.risk]??3)||D(o.ref,i.ref)),{stage:a.stage,aspect:a.aspect,top:a.top,dc:s,pa:r,ucs:g,other:h}}function N(e,t){let s=Math.round(e/100*t);return"\u2588".repeat(s)+"\u2591".repeat(t-s)}function W(e,t){return e==="all"||t.stage===e}function B(e,t){return e.length<=t?e:t<=1?e.slice(0,t):e.slice(0,t-1)+"\u2026"}var _e={failing:"failing",blocked:"blocked","needs-refresh":"stale","needs-tests":"needs test","needs-scenarios":"no scenario","happy-only":"happy only","possible-duplicate":"duplicate?","not-yet-run":"to run"},$e=["failing","blocked","needs-refresh","needs-tests","needs-scenarios","happy-only","possible-duplicate"];function ue(e,t){let s=Date.parse(e);if(Number.isNaN(s))return e;let r=Math.max(0,Math.floor((t-s)/1e3));return r<60?"just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`}function we(e,t){return(t.get("failing")??[]).length?0:(t.get("blocked")??[]).length?1:(t.get("needs-tests")??[]).length||(t.get("needs-scenarios")??[]).length?2:(t.get("needs-refresh")??[]).length?3:(t.get("not-yet-run")??[]).length>0||e.provAbsent?4:5}function de(e,t){let s=new Map;for(let g of t.groups)g.rows.length&&s.set(g.key,g.rows);let r=new Map;for(let g of t.groups){let o=g.rows.filter(i=>W(e.stage,i));o.length&&r.set(g.key,o)}let a=[],l=[],x=[],u=new Set;for(let g of $e){let o=r.get(g);if(o){for(let i of o){let k=g==="failing"&&i.via_tests?.length?` \xB7 via ${i.via_tests.map(_=>I(_)).join(", ")}`:"";a.push({id:i.ref===t.slug?"\u2014":I(i.id??i.ref),cls:_e[g],risk:i.ref===t.slug?"\u2014":i.risk,title:(i.ref===t.slug?i.why:i.title)+k})}if(g==="failing"||g==="blocked")for(let i of o)i.servePath&&u.add(`kane-cli evidence serve ${i.servePath}`);for(let i of o)i.ready_command&&!i.ready_command.startsWith("kane-cli evidence serve")&&i.ready_command!=="kane-cli testrun run"&&u.add(i.ready_command)}}let m=[...u].sort((g,o)=>Number(o.startsWith("kane-cli evidence serve"))-Number(g.startsWith("kane-cli evidence serve")));l.push(...m.map(g=>`\u21B3 ${g}`));let h=s.get("not-yet-run")??[],R=e.pa===null?t.acDesigned:h.length;return e.pa!==null&&R>0&&x.push(`${R} to run`),{uc:t,rows:a,spans:l,tails:x,toRun:R,severity:we(t,s)}}function pe(e,t){let{dc:s,pa:r}=e,a=Math.max(80,Math.min(t.width,100)),l=n=>t.color?`\x1B[2m${n}\x1B[22m`:n,x=t.now??Date.now(),u=[],m=r?.latest_run?`last run ${ue(r.latest_run.started_at,x)}`:"no runs yet";u.push(`coverage \u2014 designed \xD7 proven \xB7 ${e.aspect} \xB7 ${m}`),u.push(""),u.push(P(`designed ${String(s.pct).padStart(3)}% ${N(s.pct,10)} ${s.acs_designed} ACs have a verifying test`,t.color)),r?u.push(P(`proven ${String(r.pct).padStart(3)}% ${N(r.pct,10)} ${r.acs_proven} \xB7 ${r.failing} failing \xB7 ${r.blocked} blocked \xB7 ${r.not_run} not yet run`,t.color)):u.push("proven \u2014 no runs recorded yet \xB7 run tests, then re-run"),u.push("");let h=e.ucs.map(n=>de(e,n));h.sort((n,d)=>n.severity-d.severity||D(n.uc.slug,d.uc.slug));let R=h.some(n=>n.rows.length||n.spans.length||n.tails.length||r!==null&&n.toRun>0),g=n=>{let[d,b]=n.split("/").map(Number);return b>0&&d===b};if(!R&&g(s.acs_designed)&&(r===null||g(r.acs_proven))){let n=e.ucs.length,d=`use-case${n===1?"":"s"}`;return u.push(r?`no gaps \u2014 all ${n} ${d} designed and proven`:`no gaps \u2014 all ${n} ${d} designed \xB7 nothing run yet`),u.push(l("inspect a use-case: kane-cli cover gaps <uc-id>")),u}let o=(n,d)=>n.groups.filter(b=>d.includes(b.key)).reduce((b,w)=>b+w.rows.length,0),i=h.map(n=>({band:n,failing:o(n.uc,["failing"]),blocked:o(n.uc,["blocked"]),stale:o(n.uc,["needs-refresh"]),design:o(n.uc,["needs-tests","needs-scenarios"]),run:n.toRun})),k=[];i.some(n=>n.failing)&&k.push({hdr:"FAILING",get:n=>n.failing}),i.some(n=>n.blocked)&&k.push({hdr:"BLOCKED",get:n=>n.blocked}),i.some(n=>n.stale)&&k.push({hdr:"STALE",get:n=>n.stale}),i.some(n=>n.design)&&k.push({hdr:"TO DESIGN",get:n=>n.design}),i.some(n=>n.run)&&k.push({hdr:"TO RUN",get:n=>n.run}),a<100&&(k.length=0);let _=Math.min(16,Math.max(4,...h.map(n=>I(n.uc.slug).length))),v=15,f=k.map(n=>n.hdr.length+2),p=a-_-2-3-v-3-v-f.reduce((n,d)=>n+d,0)-2,y=n=>n.padStart(Math.floor((v+n.length)/2)).padEnd(v),c=`${" ".repeat(_+2)}${"USE CASE".padEnd(p+3)}${y("DESIGNED")} ${y("PROVEN")}`+k.map((n,d)=>n.hdr.padStart(f[d])).join("");u.push(l(c.trimEnd().slice(0,a)));for(let n of i){let d=n.band.uc,b=`${String(d.des.pct).padStart(3)}% ${N(d.des.pct,10)}`,w=r===null||d.provAbsent?Te("no runs",v,t.color):`${String(d.prov?.pct??0).padStart(3)}% ${N(d.prov?.pct??0,10)}`,S=k.map((T,j)=>String(T.get(n)||"\u2014").padStart(f[j])).join(""),$=`${B(I(d.slug),_).padEnd(_)} ${B(d.title,p).padEnd(p)} ${b} ${w}${S}`;u.push(P($,t.color))}return u.push(""),u.push(l("inspect a use-case: kane-cli cover gaps <uc-id>")),u}function Te(e,t,s){let r=e.padStart(Math.floor((t+e.length)/2)).padEnd(t);return s?`\x1B[2m${r}\x1B[22m`:r}function P(e,t){return t?e.replace(/(\s*\d+%) (█*)(░*)/g,(s,r,a,l)=>{let x=Number(r.trim().replace("%","")),u=x===100?"\x1B[32m":"\x1B[33m";return`${x===0?"\x1B[31m":u}${r}\x1B[39m ${u}${a}\x1B[39m\x1B[2m${l}\x1B[22m`}):e}function fe(e,t,s,r){let{pa:a}=e,l=Math.max(80,Math.min(r.width,100)),x=p=>r.color?`\x1B[2m${p}\x1B[22m`:p,u=r.now??Date.now(),m=[],h=e.ucs.find(p=>p.slug===t),R=a?.latest_run?`last run ${ue(a.latest_run.started_at,u)}`:"no runs yet";m.push(`${I(t)} \xB7 ${h?.title??""} \u2014 risk ${h?.risk??"\u2014"} \xB7 ${e.aspect} \xB7 ${R}`.slice(0,l)),m.push("");let g=h?de(e,h):null;if(h&&g){m.push(P(`designed ${String(h.des.pct).padStart(3)}% ${N(h.des.pct,10)} ${h.acDesigned}/${h.acTotal} ACs have a verifying test`,r.color));let p=g.tails.length?` \xB7 ${g.tails.join(" \xB7 ")}`:"";a===null||h.provAbsent?m.push(`proven \u2014 no runs yet${p}`):m.push(P(`proven ${String(h.prov?.pct??0).padStart(3)}% ${N(h.prov?.pct??0,10)} ${p.replace(/^ · /,"")}`,r.color)),m.push("")}let o=Math.min(16,Math.max(5,...s.map(p=>I(p.id).length))),i=10,k=5,_=l-o-2-i-2-k-2;m.push(x(`${" ".repeat(o+2)}${"STATE".padEnd(i+2)}${"RISK".padEnd(k+2)}ACCEPTANCE CRITERION`));let v=p=>{if(!r.color)return p;let y=p.trim(),c=y.startsWith("proven")?"\x1B[32m":y==="failing"||y==="needs test"?"\x1B[31m":y==="blocked"||y==="stale"?"\x1B[33m":"\x1B[2m",n=c==="\x1B[2m"?"\x1B[22m":"\x1B[39m";return p.replace(y,`${c}${y}${n}`)};for(let p of s){let c=(p.text+(p.via?` \xB7 via ${p.via}`:"")).split(/\s+/),n=[],d="";for(let b of c)d&&d.length+1+b.length>_?(n.push(d),d=b):d=d?`${d} ${b}`:b;d&&n.push(d),n.forEach((b,w)=>{w===0?m.push(`${B(I(p.id),o).padEnd(o)} ${v(p.state.padEnd(i))} ${p.risk.padEnd(k)} ${b}`):m.push(`${" ".repeat(o+2+i+2+k+2)}${b}`)})}let f=[];if(h&&g){for(let y of g.spans){let c=y.replace(/^↳ /,"");if(c.startsWith("kane-cli evidence serve")){let n=s.filter(d=>d.state==="blocked"||d.state==="failing").map(d=>I(d.id)).join(" \xB7 ");f.push({label:"see why",cmd:c,...n?{note:`(explains ${n})`}:{}})}else f.push({label:"design",cmd:c})}let p=s.filter(y=>y.state==="to run").length;if(p>0){let c=s.some(n=>n.state==="failing")?"(review evidence first \u2014 a re-run may heal over failures)":f.some(n=>n.label==="see why")?`(${p} ACs never executed \u2014 see why first)`:`(${p} ACs never executed)`;f.push({label:"first run",cmd:"kane-cli testrun run",note:c})}}if(f.length){m.push(""),m.push("next");let p=Math.max(...f.map(c=>c.label.length))+2,y=c=>r.color?`\x1B[36m${c}\x1B[39m`:c;for(let c of f){let n=` ${c.label.padEnd(p)}`;if(n.length+c.cmd.length>l){let d=c.cmd.lastIndexOf(" ",l-n.length),b=d>0?c.cmd.slice(0,d):c.cmd.slice(0,l-n.length),w=d>0?c.cmd.slice(d+1):c.cmd.slice(l-n.length);m.push(`${n}${y(b)}`),m.push(`${" ".repeat(n.length)}${y(w)}`),c.note&&m.push(x(`${" ".repeat(n.length)}${c.note}`))}else c.note&&n.length+c.cmd.length+3+c.note.length<=l?m.push(`${n}${y(c.cmd)} ${x(c.note)}`):(m.push(`${n}${y(c.cmd)}`),c.note&&m.push(x(`${" ".repeat(n.length)}${c.note}`)))}}return m.push(""),m.push(x("all use-cases: kane-cli cover gaps")),m}function K(e){let{dc:t,pa:s}=e,r=a=>e.top!==void 0?a.slice(0,e.top):a;return{stage:e.stage,rollup_version:1,design_completeness:{pct:t.pct,acs_designed:t.acs_designed,usecases_complete:t.usecases_complete,ucs_needing_scenarios:t.ucs_needing_scenarios,config:t.config},...s?{proven:{aspect:s.aspect,pct:s.pct,acs_proven:s.acs_proven,failing:s.failing,blocked:s.blocked,not_run:s.not_run,latest_run:s.latest_run,config:s.config}}:{},usecases:e.ucs.map(a=>({id:/^sha256:/.test(a.slug)?null:a.slug,title:a.title,risk:a.risk,design_completeness:{pct:a.des.pct,status:a.des.status},stale_acs:a.des.staleAcs,...s?{proven:a.prov??{pct:0,status:"not_run"}}:{},pending:r(a.groups.flatMap(l=>l.rows).filter(l=>W(e.stage,l))).map(ae)})),other:e.other.filter(a=>W(e.stage,a)).map(ae)}}function ae(e){let{servePath:t,viaFiles:s,meta:r,...a}=e;return{...a}}async function Re(e,t,s=oe(),r=process.cwd()){if(t.mode!==void 0&&t.mode!=="agent"&&t.mode!=="ci"&&t.mode!=="interactive")return G(s,`--mode must be interactive | agent | ci, got '${t.mode}'`),2;if(t.mode==="agent"||t.mode==="ci"){let{makeHeadlessIO:_,agentRefusal:v}=await import("./headless-io-75HUMWZB.js"),{parsesAgainstGrammar:f}=await import("./next-KZXH4UA4.js"),p=_("ndjson","gaps",{stdout:T=>s.out(T.replace(/\n$/,"")),stderr:T=>(s.err??s.out)(T.replace(/\n$/,""))}),y=[],c=[],n={out:T=>y.push(T),err:T=>c.push(T),confirm:async()=>!1,isTTY:!1};if(await Re(e,{...t,json:!0,mode:void 0},n,r)!==0)return v(p,c.join("; ")||"cover gaps refused");let b=JSON.parse(y.join(`
|
|
3
|
-
`));p.event({type:"gaps",...b});let w=[],S=new Set,$=(T,j)=>{if(Array.isArray(T)){for(let A of T)$(A,j);return}if(T&&typeof T=="object"){let A=T,J=typeof A.why=="string"?A.why:j;typeof A.ready_command=="string"&&A.ready_command.startsWith("kane-cli ")&&f(A.ready_command)&&!S.has(A.ready_command)&&(S.add(A.ready_command),w.push({cmd:A.ready_command,why:J||"close the gap"}));for(let ge of Object.values(A))$(ge,J)}};return $(b,"close the gap"),p.done(0,void 0,w.slice(0,4))}let a=t.stage??"all";if(a!=="design"&&a!=="cover"&&a!=="all")return G(s,`--stage must be design | cover | all, got '${a}'`),2;if(t.top!==void 0&&(!Number.isInteger(t.top)||t.top<1))return G(s,"--top must be a positive integer"),2;let l=t.rollup??"lenient";if(l!=="lenient"&&l!=="strict")return G(s,`--rollup must be lenient | strict, got '${l}'`),2;let x=re(r,s);if(!x)return 2;let u=Y(x),m=Z(u),h=ie(u,l),R=await z(u,"design"),g=new Map;if(h)for(let _ of Object.values(h.perAc)){if(!_.executionId||g.has(_.executionId))continue;let v=await V(_.executionId,r);v&&g.set(_.executionId,Se(v,r))}let o=new Map;for(let[_,v]of se(ne(r)))v.length===1&&o.set(_,v[0].split("/").pop());let i=le(u,R,m,h,{stage:a,top:t.top,aspect:l,servePaths:g,testFiles:o});if(e!==void 0){let _=u.resolve(e),v=_?u.tipOf(_.cid):null;if(!v||u.nodeLabel.get(v)!==E.USECASE||!O(u,v))return G(s,`no use-case '${e}' in the graph`),2;let f=u.displayNameOf(v)??v;if(t.json){let c=K(i);return s.out(JSON.stringify({...c,usecases:c.usecases.filter(n=>n.id===f),other:[]},null,2)),0}let p=Ae(u,v,h,o),y=s.isTTY&&process.stdout.columns?process.stdout.columns:100;for(let c of fe(i,f,p,{width:y,color:s.isTTY}))s.out(c);return 0}if(t.json)return s.out(JSON.stringify(K(i),null,2)),0;if(m.usecases_complete==="0/0")return s.out("nothing to measure yet \u2014 no live use-cases in the graph"),0;let k=s.isTTY&&process.stdout.columns?process.stdout.columns:100;for(let _ of pe(i,{width:k,color:s.isTTY}))s.out(_);return 0}function Se(e,t){let s=t.endsWith("/")?t:t+"/";return e.startsWith(s)?e.slice(s.length):e}function Ae(e,t,s,r){let a=[];for(let{cid:l,content:x}of e.byLabel(E.AC)){if(!O(e,l)||C(e,l)!==t)continue;let u=F(e,l),m=e.nameOf.get(l)??l,h=s?.perAc[m],R=e.stale(l)!=="fresh",g=u?h?.state==="proven"?"proven \u2713":h?.state==="failing"?"failing":h?.state==="blocked"?"blocked":R?"stale":"to run":"needs test",o=h?.state==="failing"&&h.viaTests.length?h.viaTests.map(i=>`${I(i)}${r.get(i)?` ${r.get(i)}`:""}`).join(", "):void 0;a.push({id:e.displayNameOf(l)??l,state:g,risk:String(x.risk??""),text:String(x.text??x.title??""),...o?{via:o}:{}})}return a.sort((l,x)=>D(l.id,x.id)),a}export{Re as gapsCommand};
|
package/dist/gate-OYRDJMF6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-T2ONUKTL.js";import"./chunk-UR6MHSHU.js";export{a as EVENT_SCHEMA_VERSION,e as MAX_MESSAGE_BYTES,h as UsageRefused,g as agentRefusal,c as bothTTY,i as guardedChannels,d as makeHeadlessIO,b as resolveEncoding,f as validateResumeMessage};
|
package/dist/ingest-OSNNM3DH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f}from"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-VVOKM2VO.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-UR6MHSHU.js";export{a as compositePayloadBytes,d as ensureContextDir,f as ingestBytes,e as ingestFile,b as slugFromFilename,c as versionBaseOf};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c}from"./chunk-VORWZLS3.js";import"./chunk-SEEEGDVK.js";import"./chunk-DTRKTBCE.js";import"./chunk-2UIHS2FH.js";import"./chunk-YKTYVJBN.js";import"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-Q6F23V7L.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import"./chunk-CH273NAE.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";export{c as ingestCommand,b as runIngestCommand,a as runIngestWithResults};
|
package/dist/install-ZV3KJZV4.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-A2SQD2AY.js";import{d as S}from"./chunk-SID4X77D.js";import"./chunk-ZKSN2SJ7.js";import"./chunk-EVFFDODK.js";import"./chunk-KJQNAOOE.js";import"./chunk-LSDWPG6C.js";import"./chunk-5HMN74RZ.js";import"./chunk-VORWZLS3.js";import"./chunk-VBS33P2C.js";import"./chunk-WVHMPIDQ.js";import"./chunk-XKHWWKJZ.js";import"./chunk-BB2W35TW.js";import"./chunk-AXTPNZPX.js";import"./chunk-U6OTFMIT.js";import"./chunk-BZAGVBCX.js";import"./chunk-V4B5QA3U.js";import"./chunk-SEEEGDVK.js";import"./chunk-243ZJHT6.js";import"./chunk-DTRKTBCE.js";import"./chunk-2UIHS2FH.js";import"./chunk-YKTYVJBN.js";import"./chunk-FY7TCYPK.js";import"./chunk-63DYVWNX.js";import"./chunk-427OQS2N.js";import"./chunk-7N6OCHPC.js";import"./chunk-KDNNMU7Q.js";import"./chunk-Q2F5QB2W.js";import"./chunk-Q6F23V7L.js";import"./chunk-BKHXPBWN.js";import"./chunk-N2P4MI32.js";import"./chunk-USY7VAO6.js";import{T as _}from"./chunk-GTVQYT3D.js";import"./chunk-4Y2WH77W.js";import{c as E}from"./chunk-T2ONUKTL.js";import"./chunk-66MOZKD2.js";import"./chunk-YLQHY4A7.js";import"./chunk-VHW7BMZQ.js";import"./chunk-OMNLAGQC.js";import"./chunk-VVOKM2VO.js";import"./chunk-HGFWIBVF.js";import"./chunk-VZ7KXRXB.js";import"./chunk-IICT4VOU.js";import"./chunk-D6E6KRVX.js";import"./chunk-3UI5VTQS.js";import"./chunk-RDHWNSDP.js";import"./chunk-FQNQVC5O.js";import"./chunk-XLSOQLVT.js";import"./chunk-UD7KKHPW.js";import{a as q}from"./chunk-CH273NAE.js";import{a as C,b as V}from"./chunk-3YIZG7WZ.js";import"./chunk-ZLWURCJ7.js";import"./chunk-QSCXXNC2.js";import"./chunk-KBM3XHAM.js";import"./chunk-2YEHV2CX.js";import"./chunk-5LJRZI7S.js";import"./chunk-BKM2LWU2.js";import"./chunk-YCCUBQY4.js";import"./chunk-MSGW4JDG.js";import"./chunk-RSSOJ3L2.js";import"./chunk-5EOX4MEY.js";import"./chunk-RZ4F3BHX.js";import"./chunk-FMUV6UCX.js";import"./chunk-NOL7MNZH.js";import"./chunk-5TQFOPJV.js";import"./chunk-DFS4RMVP.js";import"./chunk-HCBYKLMW.js";import"./chunk-C44QQJR4.js";import"./chunk-6YGTRKDT.js";import"./chunk-UR6MHSHU.js";async function ee(e){let[{render:c},t,{QuestionBatchPrompt:n}]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./ui-JEJGTURD.js")]),l=t.default??t;return new Promise(i=>{let y=c(l.createElement(n,{questions:e,onSubmit:w=>{y.unmount(),i(w)}}))})}async function j(e){let{createInterface:c}=await import("readline/promises"),t=c({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await t.question(`${e} [y/N] `)).trim())}finally{t.close()}}async function te(e){let{createInterface:c}=await import("readline/promises"),t=c({input:process.stdin,output:process.stdout});try{process.stdout.write(`${e.message}
|
|
3
|
-
`),process.stdout.write(` 1. start at ${e.earliest} instead \u2014 the earliest uncommitted phase (recommended)
|
|
4
|
-
`),process.stdout.write(` 2. proceed anyway \u2014 noted on the record
|
|
5
|
-
`),process.stdout.write(` 3. cancel
|
|
6
|
-
`);let n=(await t.question("pick [1-3, \u23CE = 1] ")).trim();return n===""||n==="1"?"earliest":n==="2"?"proceed":"cancel"}finally{t.close()}}async function B(e){let{createInterface:c}=await import("readline/promises"),t=c({input:process.stdin,output:process.stdout});try{if(process.stdout.write(`${e.message}
|
|
7
|
-
`),e.wall==="already-designed"){process.stdout.write(` 1. view the existing design (recommended)
|
|
8
|
-
`),process.stdout.write(` 2. redesign \u2014 asks a reason; ${e.impactPairs} live pair(s) superseded, with any typed blocker gaps standing in for their tests
|
|
9
|
-
`),process.stdout.write(` 3. pick another use-case
|
|
10
|
-
`);let l=(await t.question("pick [1-3, \u23CE = 1] ")).trim();return l===""||l==="1"?{pick:"view"}:l==="2"?{pick:"redesign",because:(await t.question("because (reason for the redesign): ")).trim()}:{pick:"back"}}process.stdout.write(` 1. refresh first \u2014 evolve re-designs against the moved use-case (recommended)
|
|
11
|
-
`),process.stdout.write(` 2. proceed anyway \u2014 asks a reason, noted on the record
|
|
12
|
-
`),process.stdout.write(` 3. back
|
|
13
|
-
`);let n=(await t.question("pick [1-3, \u23CE = 1] ")).trim();return n===""||n==="1"?{pick:"refresh"}:n==="2"?{pick:"proceed",because:(await t.question("because (reason for proceeding): ")).trim()}:{pick:"back"}}finally{t.close()}}async function ce(e){let[{resolveAgentAuthEnv:c},{runAgent:t},{preflightTurn:n}]=await Promise.all([import("./spawner-DPT2RLAO.js"),import("./bridge-7J3JE3JS.js"),import("./turn-preflight-JGYT7LXP.js")]),l=await c(),i=q(process.cwd()),{baseUrlAdvisory:y}=await import("./turn-preflight-JGYT7LXP.js"),w=y();w&&process.stderr.write(w+`
|
|
14
|
-
`),await _(i,r=>process.stderr.write(r+`
|
|
15
|
-
`));let a=V({verb:"design",mode:e.plan?"cli":"interactive",contextRoot:i,env:C(),resumeSid:e.resume,write:!0,longSession:!0}),k={...l,...a.spawnEnv()},b=await n(k);if(!b.ok)return process.stderr.write((b.message??"error: turn-endpoint preflight failed")+`
|
|
16
|
-
`),process.stderr.write(a.supportFooter()+`
|
|
17
|
-
`),a.error("preflight_auth"),await a.end({exit_code:2}),2;let D=async()=>b;if(e.plan){let r=await S({...e,confirmRetarget:j,askPhaseEntry:te,askDesignEntry:B},{contextDir:i,agent:t,preflightTurn:D,ask:ee,out:o=>process.stdout.write(o+`
|
|
18
|
-
`),progress:o=>process.stderr.write(o+`
|
|
19
|
-
`),isTTY:E(),auth:k,telemetry:a});return r===1&&process.stderr.write(a.supportFooter()+`
|
|
20
|
-
`),await a.end({exit_code:r}),r}if(!e.resume&&e.useCase&&!e.phase){let[{openGraph:r},{designGate:o}]=await Promise.all([import("./readmodel-FVLRQWZ7.js"),import("./gate-OYRDJMF6.js")]),s=r(i),u=o(s,e.useCase,!!e.force);if(!u.ok)if(u.wall){let{captureForceScope:Z}=await import("./design-committer-D44GSUXY.js"),d=await B({wall:u.wall.kind,message:u.message,display:u.wall.display,impactPairs:Z(s,e.useCase).length});if(d.pick==="redesign"||d.pick==="proceed"){if(!d.because.trim())return process.stderr.write(`a redesign needs a reason (--because) \u2014 nothing executed
|
|
21
|
-
`),2;e={...e,force:!0,because:e.because??d.because.trim()}}else return d.pick==="view"?(process.stdout.write(`view the existing design: kane-cli context view ${u.wall.display}
|
|
22
|
-
`),0):d.pick==="refresh"?(process.stdout.write(`refresh it first: kane-cli maintain evolve ${u.wall.display}
|
|
23
|
-
`),0):(process.stdout.write(`nothing executed \u2014 list use-cases: kane-cli context list
|
|
24
|
-
`),0)}else return process.stderr.write(`design: ${u.message}
|
|
25
|
-
`),u.code}let[{render:G},F,{ScrollbackProvider:N},{ChatSurface:O},{ScrollbackTap:Q},{makeChatController:Y},{setInkExit:z},U]=await Promise.all([import("./build-JIKYOZUH.js"),import("./react-QWOAB3TB.js"),import("./scrollback-JLPJR25X.js"),import("./ChatSurface-FJPK3XEJ.js"),import("./ScrollbackTap-QHJOFYMC.js"),import("./chat-controller-UJQ6Z4RE.js"),import("./exit-manager-ZLDO54S4.js"),Promise.all([import("./chat-committer-6D7AQI6Z.js"),import("./descriptor-3JJUOHBM.js"),import("./explain-NEFBUX5G.js"),import("./readmodel-FVLRQWZ7.js")])]),[{commitChatTurn:H},{topologyDescriptor:J},{explain:K},{openGraph:v}]=U,x=F.default??F,R={current:null},A={current:[]},p=Y({commitChatTurn:H,descriptor:J("design"),contextDir:i,refreshGraph:()=>v(i),graph:v(i),explain:K,by:{kind:"human",id:"owner"},templateVersion:()=>R.current,pendingForceScope:()=>A.current,...e.useCase?{ucRef:e.useCase}:{}}),{buildDossier:L}=await import("./dossier-7HVC6BNK.js"),M=r=>{try{return L(v(i),r)}catch{return null}},P={current:null},m=null,$=0,T=null,g=!1,W=()=>{if($+=1,$>=2){try{h.unmount()}catch{}f({state:"interrupted",reason:"ctrl+c \xD72",facts:["forced quit \u2014 anything already committed is safe in the store"]}),process.exit(130)}p.requestPause(),T=setTimeout(()=>{g||(g=!0,(async()=>{p.finalizeForExit(),await P.current?.flush();try{h.unmount()}catch{}f({state:"interrupted",facts:["the agent did not confirm the pause within 5s \u2014 nothing new was saved"]}),process.exit(130)})())},5e3)},X={verb:"design",sid:e.resume??a.ids.session_id,env:C(),...e.useCase?{subject:e.useCase}:{}},h=G(x.createElement(N,null,x.createElement(Q,{into:P}),x.createElement(O,{controller:p,verb:"design",onCtrlC:W,inspect:M,meta:X})),{exitOnCtrlC:!1});z(()=>h.unmount());let I=null;try{let r=S({...e,confirmRetarget:j},{contextDir:i,agent:t,onTemplateVersion:s=>{R.current=s},onForceScope:s=>{A.current=s},preflightTurn:D,onSummary:s=>{m=s},ask:s=>p.ask(s),out:s=>p.note(s),progress:()=>{},isTTY:E(),auth:k,chat:p,telemetry:a});r.finally(()=>{g=!0});let o=await r;return I=o,o===1&&process.stderr.write(a.supportFooter()+`
|
|
26
|
-
`),await a.end({exit_code:o}),o}catch(r){throw m||(m={state:"crashed",facts:[`the session ended unexpectedly \u2014 ${r instanceof Error?r.name:"error"}`]}),r}finally{g=!0,T&&clearTimeout(T),p.finalizeForExit(),await P.current?.flush();try{h.unmount()}catch{}m?f(m):I===1&&f({state:"interrupted",facts:["the session ended without saving \u2014 see the error above"]})}}export{ce as bindDesignInteractive};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-UR6MHSHU.js";function S(d,p,c=5e3){let u=process.listeners("SIGINT");process.removeAllListeners("SIGINT");let s=!1,r=!1,o=!1,n=new Set,i=[],a=e=>{try{e.send({type:"pause"})}catch{}let t=setTimeout(()=>{try{e.kill()}catch{}},c);t.unref?.(),i.push(t)},l=()=>{if(!s){s=!0,p(n.size>0?"interrupt \u2014 asking the agent to pause and save the session (Ctrl+C again to kill)":"interrupt \u2014 finishing the current step (Ctrl+C again to exit now)");for(let e of n)a(e);return}r=!0,n.size===0&&process.exit(130);for(let e of n)try{e.kill()}catch{}};return process.on("SIGINT",l),{agent:((...e)=>{let t=d(...e);if(n.add(t),Promise.resolve(t.exited).catch(()=>{}).finally(()=>n.delete(t)),r)try{t.kill()}catch{}else s&&a(t);return t}),interrupted:()=>s,dispose:()=>{if(!o){o=!0;for(let e of i)clearTimeout(e);process.removeListener("SIGINT",l);for(let e of u)process.on("SIGINT",e)}}}}export{S as makeInterruptGuard};
|