@testmuai/kane-cli 0.10.0-rc.1 → 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-VPD5G67Q.js → ChatSurface-6NZGMNHL.js} +1 -1
- package/dist/{ChromeProfilePicker-CRKQEFYD.js → ChromeProfilePicker-M4WXOB5O.js} +1 -1
- package/dist/{CliFeedbackPrompt-M7BMWLKK.js → CliFeedbackPrompt-6MJA7DF6.js} +1 -1
- package/dist/{CliUploadProgress-OP7DXMC2.js → CliUploadProgress-6NLS7XHH.js} +1 -1
- package/dist/{ConfigView-XI74BCCH.js → ConfigView-O4WKZ5PU.js} +1 -1
- package/dist/{EvidenceViewOffer-HAAK6DS5.js → EvidenceViewOffer-WIEWCZUP.js} +1 -1
- package/dist/FolderPicker-AF7ZMV3M.js +2 -0
- package/dist/InfoBox-D7GGZJU4.js +2 -0
- package/dist/{LinksBox-PNSESNCU.js → LinksBox-DXP66H3H.js} +1 -1
- package/dist/{ProfilesView-PYDZZHKO.js → ProfilesView-TWOY5PVC.js} +1 -1
- package/dist/ProjectPicker-OBYHJJLU.js +2 -0
- package/dist/SaveSessionPrompt-7XSHS4NL.js +2 -0
- package/dist/SingleShotApp-XQUDR36R.js +2 -0
- package/dist/{SummaryBox-FALOODAQ.js → SummaryBox-IA2KS6GT.js} +1 -1
- package/dist/TestMdRunView-LS2QUFWR.js +2 -0
- package/dist/TestrunEvidenceTable-HNDVJDIF.js +2 -0
- package/dist/{WhoamiView-6WXGRANY.js → WhoamiView-SNL75TEF.js} +1 -1
- package/dist/{app-download-RXVZB6MM.js → app-download-UI4ABEIX.js} +1 -1
- package/dist/{assurance-job-C3TXZGLL.js → assurance-job-FFSSS4XV.js} +1 -1
- package/dist/{binary-DJCDMGPX.js → binary-THPLXCOD.js} +1 -1
- package/dist/{bind-XVO4CQYV.js → bind-4XWK3DG2.js} +1 -1
- package/dist/{bootstrap-TY5RANJ7.js → bootstrap-6ACT4ALI.js} +1 -1
- package/dist/{catalog-RRQF4TCA.js → catalog-MYPS2BXY.js} +1 -1
- package/dist/{changelog-GBEVIUFJ.js → changelog-SU674BVE.js} +1 -1
- package/dist/{chunk-AA674WLL.js → chunk-2DYHAP4E.js} +1 -1
- package/dist/{chunk-VG44B5JD.js → chunk-36N3EHW5.js} +1 -1
- package/dist/{chunk-P7MSVLAH.js → chunk-3E4ZO73O.js} +1 -1
- package/dist/{chunk-NWD54VV5.js → chunk-3F5FMH76.js} +1 -1
- package/dist/{chunk-I5NSJBOZ.js → chunk-3OQW2GTA.js} +1 -1
- package/dist/{chunk-LRS5MGBY.js → chunk-3RJHXOZH.js} +1 -1
- package/dist/{chunk-DDJNYQBH.js → chunk-3YTCKCBG.js} +1 -1
- package/dist/{chunk-252FWF2G.js → chunk-457Y5TEC.js} +1 -1
- package/dist/{chunk-DD5TULWQ.js → chunk-4QFTHUJA.js} +1 -1
- package/dist/{chunk-672CQECV.js → chunk-4YW767UV.js} +7 -7
- package/dist/{chunk-7LKCWO2R.js → chunk-5AKJPYUW.js} +3 -3
- package/dist/{chunk-VQLH63X7.js → chunk-6DZX5HLZ.js} +1 -1
- package/dist/{chunk-QHRUBG7J.js → chunk-6EB5VRAN.js} +1 -1
- package/dist/{chunk-QS5ZJFGF.js → chunk-734ORT6O.js} +1 -1
- package/dist/{chunk-57MDWTON.js → chunk-7AET4JKQ.js} +1 -1
- package/dist/{chunk-W3OVSDBN.js → chunk-7HMSMAUG.js} +1 -1
- package/dist/{chunk-FFL55I2M.js → chunk-7NPTL66J.js} +1 -1
- package/dist/{chunk-T7H4LBFK.js → chunk-7SY34IIL.js} +1 -1
- package/dist/{chunk-RFIIM33J.js → chunk-7YT4TTKL.js} +1 -1
- package/dist/{chunk-CPBBYNL7.js → chunk-ACMBMZDQ.js} +1 -1
- package/dist/{chunk-UALJTPSA.js → chunk-AEWNWAXW.js} +1 -1
- package/dist/{chunk-V7S6S5W3.js → chunk-AVSMXDTX.js} +1 -1
- package/dist/{chunk-MGNRNLBE.js → chunk-C2RUDJ46.js} +1 -1
- package/dist/{chunk-QQ4TKLWP.js → chunk-C62QWG4B.js} +1 -1
- package/dist/{chunk-OEWYXCTA.js → chunk-CCP4X75B.js} +1 -1
- package/dist/{chunk-LRXBJTD4.js → chunk-CGITGJ3I.js} +1 -1
- package/dist/{chunk-QCKA665H.js → chunk-CM4CHYSN.js} +1 -1
- package/dist/{chunk-2OOFURWD.js → chunk-CUXY6KQ2.js} +1 -1
- package/dist/{chunk-I6OQISK4.js → chunk-D36V5OX6.js} +1 -1
- package/dist/{chunk-LNNWCBPQ.js → chunk-D7TKE7LK.js} +1 -1
- package/dist/{chunk-2IZRPMZN.js → chunk-D7U2M26S.js} +1 -1
- package/dist/{chunk-SONMD3W5.js → chunk-DDZLCAEO.js} +1 -1
- package/dist/{chunk-NWBLYMH7.js → chunk-DJC7NTLA.js} +1 -1
- package/dist/{chunk-TW63WWEN.js → chunk-DZOYYWOW.js} +1 -1
- package/dist/{chunk-UAWWLLTI.js → chunk-EBPRPNSA.js} +1 -1
- package/dist/{chunk-T3HEJASG.js → chunk-ECPFI75W.js} +1 -1
- package/dist/{chunk-JQSLUGD4.js → chunk-EECDDDSB.js} +1 -1
- package/dist/{chunk-7EXDYXXD.js → chunk-ETZMFRD6.js} +1 -1
- package/dist/{chunk-5BUIIFLC.js → chunk-F22K3RRX.js} +1 -1
- package/dist/{chunk-BJJUKB5K.js → chunk-F5NHG7VB.js} +1 -1
- package/dist/{chunk-B2HXPGIZ.js → chunk-FWDUVFS6.js} +3 -3
- package/dist/{chunk-T4AVLJCW.js → chunk-FWUPJORV.js} +1 -1
- package/dist/{chunk-VYHT2IET.js → chunk-GQRU3B54.js} +1 -1
- package/dist/{chunk-AIXJYMSP.js → chunk-GXKY5A46.js} +1 -1
- package/dist/{chunk-QTZBVDPR.js → chunk-HCJ2N3XB.js} +1 -1
- package/dist/{chunk-XBEYWXPV.js → chunk-HJMCXSUJ.js} +1 -1
- package/dist/{chunk-ZZP5SHUV.js → chunk-HK62JVQM.js} +1 -1
- package/dist/{chunk-3UVSAAES.js → chunk-I4RVVBG3.js} +1 -1
- package/dist/{chunk-JPYW6U4D.js → chunk-I4WXALQR.js} +1 -1
- package/dist/{chunk-OVNRRI4E.js → chunk-ICLUC44J.js} +1 -1
- package/dist/{chunk-DHQ4SQWA.js → chunk-IGEAET7M.js} +1 -1
- package/dist/{chunk-IXW7FOGX.js → chunk-IJ2AHSWW.js} +1 -1
- package/dist/{chunk-2S3W2JT3.js → chunk-IUQOG7Z5.js} +1 -1
- package/dist/{chunk-IBBD36FQ.js → chunk-JZP3Y4ZM.js} +1 -1
- package/dist/{chunk-NDEI7R4K.js → chunk-KODJVOCN.js} +1 -1
- package/dist/{chunk-IMDMRJQ6.js → chunk-KXHJMAZU.js} +1 -1
- package/dist/{chunk-OQ5G773E.js → chunk-L5DALV5N.js} +1 -1
- package/dist/{chunk-S53AQU7R.js → chunk-LAOTVZHV.js} +1 -1
- package/dist/{chunk-NQTYWHPB.js → chunk-LIGTP3A3.js} +1 -1
- package/dist/{chunk-7RPKHKA3.js → chunk-LQQNPMOD.js} +1 -1
- package/dist/{chunk-OZNBTSW5.js → chunk-LUR7JFPP.js} +1 -1
- package/dist/{chunk-QNLVC5ZB.js → chunk-LUZBGTYB.js} +1 -1
- package/dist/{chunk-N3TCNZSX.js → chunk-M43WH5DQ.js} +1 -1
- package/dist/{chunk-432ZOE42.js → chunk-MEKPGQAM.js} +1 -1
- package/dist/{chunk-GZFLJORM.js → chunk-NIVFEACM.js} +1 -1
- package/dist/{chunk-SA6IKFFD.js → chunk-NXAJBSIF.js} +1 -1
- package/dist/{chunk-MII3JOO3.js → chunk-NZ6AV2TA.js} +1 -1
- package/dist/{chunk-2SWSVJUP.js → chunk-OCDBTAYS.js} +1 -1
- package/dist/{chunk-SLKYD44Y.js → chunk-OGFU4YY4.js} +1 -1
- package/dist/{chunk-4LPX2OLV.js → chunk-P3JXJ4BW.js} +1 -1
- package/dist/{chunk-Y4T4SLDO.js → chunk-PAWQ4AKN.js} +1 -1
- package/dist/{chunk-6NWT2TEJ.js → chunk-QBYENBMB.js} +1 -1
- package/dist/{chunk-XIPKSXRQ.js → chunk-QDXKEOKI.js} +3 -3
- package/dist/{chunk-T6K2MEWP.js → chunk-QENCC2ZS.js} +1 -1
- package/dist/{chunk-SWMTXMKB.js → chunk-RF37IJNN.js} +1 -1
- package/dist/{chunk-XJ7HCXKW.js → chunk-RHGW7B5Q.js} +1 -1
- package/dist/{chunk-H3HHSTEK.js → chunk-RTVHJ23A.js} +1 -1
- package/dist/{chunk-OAKYUBD3.js → chunk-SGPAM5DZ.js} +1 -1
- package/dist/{chunk-RG372DON.js → chunk-TU42YZOJ.js} +1 -1
- package/dist/{chunk-V5JGXOV7.js → chunk-TU7TVFBK.js} +1 -1
- package/dist/{chunk-AJQZ3ST5.js → chunk-TW5AA5A7.js} +1 -1
- package/dist/{chunk-WI7K6VKQ.js → chunk-URH4FX3H.js} +1 -1
- package/dist/{chunk-BVO4C5F2.js → chunk-V7USCQWO.js} +1 -1
- package/dist/{chunk-4D5PC6QE.js → chunk-VSVWNRI2.js} +1 -1
- package/dist/{chunk-BZVNI44O.js → chunk-VUFIL5VR.js} +2 -2
- package/dist/{chunk-74W4AOT2.js → chunk-VX657KIK.js} +1 -1
- package/dist/{chunk-A6TJOZ24.js → chunk-VXGN3IV7.js} +1 -1
- package/dist/{chunk-2OSFI33O.js → chunk-VZ4A6WMK.js} +3 -3
- package/dist/{chunk-M6MBMRFR.js → chunk-W4QSZNMB.js} +1 -1
- package/dist/{chunk-EXFDIVNI.js → chunk-W54OT2FU.js} +2 -2
- package/dist/{chunk-NFRA64NU.js → chunk-W6HZF56M.js} +1 -1
- package/dist/{chunk-MZOIHUVX.js → chunk-W72ACCFL.js} +2 -2
- package/dist/{chunk-JD52IXON.js → chunk-WAOUE7MP.js} +1 -1
- package/dist/{chunk-WYSZ6TPW.js → chunk-WEIPY3CI.js} +10 -9
- package/dist/{chunk-I2KOGINW.js → chunk-WXJCJL5L.js} +1 -1
- package/dist/{chunk-LWJRSUE2.js → chunk-WZXPF3BI.js} +1 -1
- package/dist/{chunk-OF7WPCTQ.js → chunk-XLEGGC4Y.js} +1 -1
- package/dist/{chunk-6LIC2R22.js → chunk-XQMWHPZI.js} +1 -1
- package/dist/{chunk-D4FFXCX6.js → chunk-XRNQSXOM.js} +2 -2
- package/dist/{chunk-RW3Z2HMB.js → chunk-XZGEN4NU.js} +1 -1
- package/dist/{chunk-DNGOT65K.js → chunk-Y7E5L42F.js} +1 -1
- package/dist/{chunk-K45BKGB5.js → chunk-YAW6JW6D.js} +1 -1
- package/dist/{chunk-ENL4XTQ2.js → chunk-YGRULEZY.js} +1 -1
- package/dist/{chunk-F3U6T4YD.js → chunk-YHFZFV3A.js} +2 -2
- package/dist/{chunk-RX47NRSM.js → chunk-YLXWAY7D.js} +1 -1
- package/dist/{chunk-WEM3MOAL.js → chunk-YPFQ4UGF.js} +1 -1
- package/dist/{chunk-6U7ID777.js → chunk-YQ5C6UDG.js} +1 -1
- package/dist/{chunk-HFJSP4KD.js → chunk-ZAFJQ3SM.js} +1 -1
- package/dist/{chunk-2NFS4KE4.js → chunk-ZTRRFG52.js} +1 -1
- package/dist/{chunk-L4UVUFL6.js → chunk-ZU4W2QGM.js} +1 -1
- package/dist/{config-5ZOALGKE.js → config-754B73XK.js} +1 -1
- package/dist/{cover-cmd-UA2SVIZZ.js → cover-cmd-NBNZCR6C.js} +1 -1
- package/dist/{credentials-MRG452Y6.js → credentials-F7DYLVWY.js} +1 -1
- package/dist/{deps-bundle-FWINW4XM.js → deps-bundle-PW3WEQJ7.js} +1 -1
- package/dist/{deps-resolve-IET4KIBO.js → deps-resolve-SQYVN76L.js} +1 -1
- package/dist/{design-chat-MM5PJD2N.js → design-chat-F3OEZPNJ.js} +1 -1
- package/dist/{design-headless-FZONCKHW.js → design-headless-OTHYOX3E.js} +1 -1
- package/dist/{design-remote-SPVRIY2H.js → design-remote-2BEGCVCX.js} +2 -2
- package/dist/device-env-CHFRRV6W.js +2 -0
- package/dist/{doctor-VAX2BWQF.js → doctor-XY26Z35T.js} +1 -1
- package/dist/{evidence-LVVK7ROT.js → evidence-P6FFKC7B.js} +1 -1
- package/dist/{evolve-cmd-AGRKG7T3.js → evolve-cmd-WWOB3QJR.js} +1 -1
- package/dist/{evolve-remote-BGHULJTL.js → evolve-remote-WLVY3QID.js} +1 -1
- package/dist/{explain-cmd-WOBGS6KX.js → explain-cmd-OP5I5W3O.js} +1 -1
- package/dist/explore-K5YBGHK6.js +2 -0
- package/dist/{explore-context-tty-JTZVZFOE.js → explore-context-tty-RZ7D2TBV.js} +1 -1
- package/dist/{explore-entry-5OGNLFAU.js → explore-entry-EKXJ67BD.js} +4 -4
- package/dist/{explore-live-2XZHUYFS.js → explore-live-2YVRAQZO.js} +1 -1
- package/dist/{explore-run-tty-LGTIK2NA.js → explore-run-tty-D47FGPX7.js} +2 -2
- package/dist/{extract-bind-NM2BBK4I.js → extract-bind-W2NET364.js} +3 -3
- package/dist/{extract-chat-HLQMJJIC.js → extract-chat-M65NWGUK.js} +1 -1
- package/dist/{extract-cmd-T2TSAC3N.js → extract-cmd-FTFLETOP.js} +2 -2
- package/dist/{extract-headless-OQTQ3FJK.js → extract-headless-G6W6JQ27.js} +1 -1
- package/dist/{folder-flags-WXUR6OPJ.js → folder-flags-KKIH654K.js} +1 -1
- package/dist/{gaps-cmd-PTSKPTF7.js → gaps-cmd-OIDDLRYL.js} +1 -1
- package/dist/{gate-P57VP4E5.js → gate-7AKRPRMK.js} +1 -1
- package/dist/{generate-headless-JYZP6VXZ.js → generate-headless-RURIEKVS.js} +2 -2
- package/dist/index.js +19 -19
- package/dist/{ingest-cmd-LHCBMO4Z.js → ingest-cmd-4G2AK4Y2.js} +3 -3
- package/dist/{ingest-remote-D5TO5JQP.js → ingest-remote-SSLUHQVG.js} +1 -1
- package/dist/install-ZVBHPXGP.js +2 -0
- package/dist/{interactive-bind-5EJQUGKI.js → interactive-bind-SI2ZS55Q.js} +2 -2
- package/dist/{interactive-remote-D77ULJGL.js → interactive-remote-J56EWJGA.js} +1 -1
- package/dist/{lattice-auth-74XGF77Y.js → lattice-auth-6FEVSR7E.js} +1 -1
- package/dist/{lifecycle-cmd-7SM6UCMH.js → lifecycle-cmd-HJ37LTXE.js} +1 -1
- package/dist/{list-cmd-Z6FZXMFU.js → list-cmd-6XL2FYLQ.js} +1 -1
- package/dist/{list-commands-CZYZ7GIG.js → list-commands-5DCCKU3L.js} +1 -1
- package/dist/{list-remote-WOPOC6KK.js → list-remote-LXPQNXYN.js} +1 -1
- package/dist/login-flow-WEK3E476.js +2 -0
- package/dist/{maintenance-cmd-VRTGZVRE.js → maintenance-cmd-BXXHP36K.js} +1 -1
- package/dist/{mobile-prompts-KNAHU64X.js → mobile-prompts-CECJ5UY2.js} +1 -1
- package/dist/{onboarding-LGT6PMDZ.js → onboarding-PDVYMTY5.js} +1 -1
- package/dist/{persist-recorded-session-BX7II5P7.js → persist-recorded-session-A3ID7JFA.js} +1 -1
- package/dist/{pipeline-IXVTVRS5.js → pipeline-GX3LKPI5.js} +1 -1
- package/dist/{prepare-target-ULMKVKMC.js → prepare-target-FMT6QFHZ.js} +1 -1
- package/dist/{pull-cmd-6AL2WYHB.js → pull-cmd-UPFQYUND.js} +1 -1
- package/dist/{pull-route-TTVARJMV.js → pull-route-FWBXJMR7.js} +1 -1
- package/dist/real-device-run-X7JJWOIK.js +2 -0
- package/dist/{reconcile-cmd-R6H37SQR.js → reconcile-cmd-JBH365JL.js} +4 -4
- package/dist/{reconcile-remote-GWDV5CUT.js → reconcile-remote-BCX6SWFC.js} +2 -2
- package/dist/{recording-banner-ACC67Q2U.js → recording-banner-YKBAL6UB.js} +1 -1
- package/dist/registry-VQC757MJ.js +2 -0
- package/dist/remote-entry-X6JMPC2K.js +2 -0
- package/dist/{remote-mode-7G6PLJCW.js → remote-mode-FDPA7EWG.js} +1 -1
- package/dist/{remote-words-45USLRVN.js → remote-words-YVB66R3F.js} +1 -1
- package/dist/{require-project-folder-A3UDRELU.js → require-project-folder-MLMEQJYP.js} +1 -1
- package/dist/{resolve-run-intent-ZGPSUBXV.js → resolve-run-intent-PC7TQZUL.js} +1 -1
- package/dist/{resolver-IPM6R7U4.js → resolver-EID34LQE.js} +1 -1
- package/dist/{review-cmd-NNT5C5RZ.js → review-cmd-EUHFLFMY.js} +1 -1
- package/dist/{run-remote-3AYYVPKX.js → run-remote-SJCRTL7O.js} +1 -1
- package/dist/{run-startup-gate-NKRMKYBB.js → run-startup-gate-YO66G6LS.js} +1 -1
- package/dist/{run-test-md-HE6DUWQR.js → run-test-md-BLNBK4MH.js} +2 -2
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-cmd-GYMETJHG.js → sessions-cmd-S7WZBUCN.js} +1 -1
- package/dist/{sessions-remote-GI7GOBMH.js → sessions-remote-IWHWIQ2T.js} +1 -1
- package/dist/{skill-installer-3QAVQGDH.js → skill-installer-MAVQY6GW.js} +1 -1
- package/dist/{store-X6XPFSKF.js → store-MSA7KASS.js} +1 -1
- package/dist/{store-choice-RT73HAI7.js → store-choice-3OJCV26J.js} +1 -1
- package/dist/{store-guard-SNWKLHQV.js → store-guard-OOSDLMEC.js} +1 -1
- package/dist/{sync-cmd-NBPPDG3B.js → sync-cmd-RDFDMVKQ.js} +1 -1
- package/dist/{sync-setup-5NUCH6N3.js → sync-setup-RBRDUV7Q.js} +1 -1
- package/dist/tcg-generate-KIECTZ2C.js +2 -0
- package/dist/{testmd-actions-GH5BW5V5.js → testmd-actions-CMAG6HWI.js} +1 -1
- package/dist/{testmd-sync-ACKCIOL3.js → testmd-sync-UPAA5UMD.js} +1 -1
- package/dist/token-refresh-KP3AYMYK.js +2 -0
- package/dist/{validate-basic-RE2WLIGQ.js → validate-basic-M5JHHNZA.js} +1 -1
- package/dist/{version-check-4FJVZP3K.js → version-check-Q737BE65.js} +1 -1
- package/dist/{view-cmd-N47BQZPD.js → view-cmd-XSNL5DGI.js} +1 -1
- package/dist/{walk-session-DA7QWXSW.js → walk-session-SHGYLFRB.js} +1 -1
- package/dist/{with-telemetry-7V4LY2BG.js → with-telemetry-PM2HVN2B.js} +1 -1
- package/package.json +11 -11
- package/dist/FolderPicker-W5S6RFCP.js +0 -2
- package/dist/InfoBox-OWUEHV2D.js +0 -2
- package/dist/ProjectPicker-BGFCUGT5.js +0 -2
- package/dist/SaveSessionPrompt-SUJE54GS.js +0 -2
- package/dist/SingleShotApp-4TDXZEUA.js +0 -2
- package/dist/TestMdRunView-4GPRWHEU.js +0 -2
- package/dist/TestrunEvidenceTable-OBVQJ6IO.js +0 -2
- package/dist/device-env-LXJ65AVF.js +0 -2
- package/dist/explore-LOKNOVNP.js +0 -2
- package/dist/install-Z6K2D2VY.js +0 -2
- package/dist/login-flow-2FZEOVHM.js +0 -2
- package/dist/real-device-run-2LFS5WE2.js +0 -2
- package/dist/registry-6IJYQXQC.js +0 -2
- package/dist/remote-entry-YL7O2NJQ.js +0 -2
- package/dist/tcg-generate-Z23CUISY.js +0 -2
- package/dist/token-refresh-4UCYAG6A.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{R as T,U as D,V as E}from"./chunk-
|
|
2
|
+
import{R as T,U as D,V as E}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as C}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import{d as b}from"./chunk-XMPTFXPW.js";import{a as l}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{a as k}from"./chunk-KM3YCIDV.js";import{a as $}from"./chunk-QDFY5GGO.js";import{g as P}from"./chunk-ZFMRQ57Y.js";import{i as j}from"./chunk-PZA3BSOE.js";import"./chunk-2RUSXQ3O.js";import"./chunk-JNSWKGTB.js";import{c as R,h as S}from"./chunk-I4RVVBG3.js";import"./chunk-UUJIGOEO.js";import"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-AZLNLHUA.js";import"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-ZFM77AQU.js";import{b as _}from"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-GMTHZUZ3.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";import{existsSync as N}from"fs";async function x(i,n,a,o=process.cwd(),c){return $({store:C(l(o)),refs:i,opts:n,io:a,credentials:_,converters:{pdf:P,docx:j},remoteDeps:c,onRefusal:k,plugins:S(),connections:R})}async function te(i,n,a,o=process.cwd(),c){return(await x(i,n,a,o,c)).code}async function ne(i,n){if(n.mode!=null&&!["interactive","agent","ci","override"].includes(n.mode)){let{makeHeadlessIO:e,agentRefusal:t}=await import("./headless-io-FFM5T6KL.js");return t(e("ndjson","extract"),`ingest: --mode must be interactive | agent | ci | override, got '${n.mode}'`,"MODE_USAGE")}let a=b();if(n.mode==="interactive"&&!a)return process.stderr.write(`ingest: --mode interactive needs a TTY on stdin and stdout (use --mode agent|ci|override headless)
|
|
3
3
|
`),2;let o=n.mode??(a?"interactive":void 0),c=o==="interactive"||o==="agent"||o==="override";if(!c&&(n.plan||n.force||n.trust!==void 0))return process.stderr.write(`ingest: --plan/--force/--trust steer the extraction \u2014 not available when only landing (use --mode agent to extract headless)
|
|
4
|
-
`),2;{let[{remoteEntry:e},{folderFlagsOf:t},{words:m}]=await Promise.all([import("./remote-entry-
|
|
4
|
+
`),2;{let[{remoteEntry:e},{folderFlagsOf:t},{words:m}]=await Promise.all([import("./remote-entry-X6JMPC2K.js"),import("./folder-flags-KKIH654K.js"),import("./remote-words-YVB66R3F.js")]),f=o==="override"?m.notYet("context ingest --mode override"):void 0,u=o==="override"?m.overrideWithProject(i):void 0,w=await e("context ingest",o==="agent",void 0,{onboard:o==="interactive",...t(n),...u?{notBuilt:u}:{}});if(w!==null){if("exit"in w)return w.exit;if(f){let{printPair:H}=await import("./gate-7AKRPRMK.js");return H(f),2}let{remoteIngest:G}=await import("./ingest-remote-SSLUHQVG.js");return G({choice:w.choice,paths:i,mode:o==="agent"?"agent":o==="interactive"?"interactive":"ci",opts:n})}}let{createInterface:Y}=await import("readline/promises"),v=o==="agent",r=v?(await import("./headless-io-FFM5T6KL.js")).makeHeadlessIO("ndjson","extract"):null,g=N(l(process.cwd()))?D(l(process.cwd())):null;if(g)return r?(r.event(E(g)),r.done(2,"refused")):(process.stderr.write(`error: ${g.text}
|
|
5
5
|
next: ${g.remedy}
|
|
6
6
|
`),2);let I=[],h=()=>{for(let e of I.splice(0))r.event({type:"error",message:e.message,...e.code?{code:e.code}:{}})},A=e=>{for(let t of e)r.event({type:"ingested",source_id:t.source_id,status:t.status,cid:t.source_cid,...t.warnings?.length?{warnings:t.warnings}:{},...t.media?{media:t.media}:{},...t.duplicate_of?{duplicate_of:t.duplicate_of}:{},...t.lineage_candidate?{lineage_candidate:t.lineage_candidate}:{}})},W=e=>{for(let t of e)t.gitignore?.outcome==="added"?r.event({type:"gitignore_updated",path:".gitignore"}):t.gitignore?.outcome==="failed"&&r.event({type:"warning",message:`could not add .context/ to .gitignore: ${t.gitignore.reason}`})},s=r?{out:()=>{},err:(e,t)=>I.push({message:e.replace(/^error: /,""),...t?{code:t}:{}}),isTTY:!1,confirm:async()=>!1}:{out:e=>process.stdout.write(e+`
|
|
7
7
|
`),err:e=>process.stderr.write(e+`
|
|
8
|
-
`),isTTY:a,confirm:async e=>{let t=Y({input:process.stdin,output:process.stdout});try{let m=await t.question(`${e} [Y/n] `);return!/^n(o)?$/i.test(m.trim())}finally{t.close()}}};if(!c){let{withTelemetry:e}=await import("./with-telemetry-
|
|
8
|
+
`),isTTY:a,confirm:async e=>{let t=Y({input:process.stdin,output:process.stdout});try{let m=await t.question(`${e} [Y/n] `);return!/^n(o)?$/i.test(m.trim())}finally{t.close()}}};if(!c){let{withTelemetry:e}=await import("./with-telemetry-PM2HVN2B.js");return e("ingest",async()=>{await T(l(process.cwd()),u=>(s.err??s.out)(u));let{code:t,results:m}=await x(i,{as:n.as},s,void 0,void 0);if(t!==0)return t;let f=m.filter(u=>u.status!=="unchanged").length;return f>0&&(s.err??s.out)(`landed ${f} source(s) \u2014 run kane-cli context extract to extract them`),0},{write:!0})}let y;try{y=r?await(await import("./run-channel-63SVP5OI.js")).runWithChannel({event:r.event},()=>x(i,{as:n.as},s,void 0,void 0)):await x(i,{as:n.as},s,void 0,void 0)}catch(e){if(r)return h(),r.event({type:"error",message:e instanceof Error?e.message:String(e),code:"INGEST_FAILED"}),r.done(1,"error");throw e}let{code:p,results:d}=y;if(r&&W(d),p!==0)return r?(A(d),h(),r.done(p,p===2?"refused":"error")):p;if(d.length===0)return r?r.done(0):0;let{extractCommand:B}=await import("./extract-cmd-FTFLETOP.js"),F=[...new Set(d.map(e=>e.source_id))],O=await B({...n.mode!==void 0?{mode:n.mode}:{},...n.plan?{plan:!0}:{},...n.force?{force:!0}:{},...n.trust!==void 0?{trust:n.trust}:{},sources:F,landed:d});if(O===2&&!v){let e=d.filter(t=>t.status!=="unchanged").length;e>0&&(s.err??s.out)(`note: the ${e} landed source(s) are safe \u2014 extract later with kane-cli context extract`)}return O}export{ne as ingestCommand,te as runIngestCommand,x as runIngestWithResults};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g}from"./chunk-5AKJPYUW.js";import"./chunk-3RJHXOZH.js";import"./chunk-DDZLCAEO.js";import"./chunk-CM4CHYSN.js";import"./chunk-RHGW7B5Q.js";import"./chunk-HCJ2N3XB.js";import"./chunk-NLZZLANH.js";import"./chunk-3F5FMH76.js";import"./chunk-XMPTFXPW.js";import"./chunk-ZU4W2QGM.js";import"./chunk-73Y6T2UK.js";import"./chunk-HIUAUZNL.js";import"./chunk-457Y5TEC.js";import"./chunk-EECDDDSB.js";import"./chunk-7NPTL66J.js";import"./chunk-42PALMW2.js";import"./chunk-KF4DKXSS.js";import"./chunk-AUJSC7PU.js";import"./chunk-JNSWKGTB.js";import"./chunk-3QICDXY5.js";import"./chunk-UUJIGOEO.js";import"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-AZLNLHUA.js";import"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-ZFM77AQU.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import"./chunk-FOJHSG5M.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{a as isLink,e as itemStep,c as pluginItemOf,b as pluginRefusal,g as readIngestFile,f as remoteDepsOf,d as remoteIngest};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as m}from"./chunk-BY65QAAN.js";import{R as j}from"./chunk-
|
|
2
|
+
import{b as m}from"./chunk-BY65QAAN.js";import{R as j}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as _}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import{d as E}from"./chunk-XMPTFXPW.js";import{a as q}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{d as Q,f as S}from"./chunk-YIKF4ERQ.js";import"./chunk-QI5RZ7LL.js";import"./chunk-44B6THYK.js";import{d as V}from"./chunk-W7FLXW6Q.js";import{a as B}from"./chunk-KM3YCIDV.js";import"./chunk-R4JUKTDO.js";import"./chunk-OJ33Q6DU.js";import"./chunk-7KX2BHKG.js";import"./chunk-D756UWY2.js";import"./chunk-LX2I4JEH.js";import"./chunk-O3HHTKZ5.js";import"./chunk-NXRF7FFS.js";import"./chunk-E6KSRQXL.js";import"./chunk-54XA5MZH.js";import"./chunk-QDFY5GGO.js";import"./chunk-VZJ6LUXX.js";import"./chunk-35ECWCCK.js";import"./chunk-IZ65ZPWY.js";import"./chunk-EF47KRUK.js";import"./chunk-3GXN6VF6.js";import"./chunk-Z55KBMYV.js";import"./chunk-LD5B3QFW.js";import{a as O}from"./chunk-MYVKUJGS.js";import"./chunk-3BSYOCSW.js";import{a as N}from"./chunk-EECDDDSB.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-42PALMW2.js";import"./chunk-ZFMRQ57Y.js";import"./chunk-PZA3BSOE.js";import"./chunk-2RUSXQ3O.js";import"./chunk-AUJSC7PU.js";import"./chunk-JNSWKGTB.js";import"./chunk-UUJIGOEO.js";import"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-AZLNLHUA.js";import"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-4IEQNX7F.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-GRURFGBP.js";import"./chunk-MYZHOBS4.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZFM77AQU.js";import{b as y}from"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-QXQ7KVEN.js";import{d as R,f as I}from"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-GMTHZUZ3.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";async function te(e){let[{render:a},t,{QuestionBatchPrompt:s}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./ui-SNV3FD2G.js")]),c=t.default??t;return new Promise(u=>{let l=a(c.createElement(s,{questions:e,onSubmit:k=>{l.unmount(),u(k)}}))})}async function Y(e){let{createInterface:a}=await import("readline/promises"),t=a({input:process.stdin,output:process.stdout});try{return/^y(es)?$/i.test((await t.question(`${e} [y/N] `)).trim())}finally{t.close()}}async function re(e){let{createInterface:a}=await import("readline/promises"),t=a({input:process.stdin,output:process.stdout});try{process.stdout.write(`${e.message}
|
|
3
3
|
`),process.stdout.write(` 1. start at ${e.earliest} instead \u2014 the earliest uncommitted phase (recommended)
|
|
4
4
|
`),process.stdout.write(` 2. proceed anyway \u2014 noted on the record
|
|
5
5
|
`),process.stdout.write(` 3. cancel
|
|
@@ -22,5 +22,5 @@ import{b as m}from"./chunk-BY65QAAN.js";import{R as j}from"./chunk-432ZOE42.js";
|
|
|
22
22
|
`),0):p.pick==="refresh"?(process.stdout.write(`refresh it first: kane-cli maintain evolve ${o.wall.display}
|
|
23
23
|
`),0):(process.stdout.write(`nothing executed \u2014 list use-cases: kane-cli context list
|
|
24
24
|
`),0)}else return process.stderr.write(`design: ${o.message}
|
|
25
|
-
`),o.code}let[{render:G},A,{ScrollbackProvider:U},{ChatSurface:H},{ScrollbackTap:J},{setInkExit:K},{buildDesignChat:L}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./scrollback-GGNBDFQV.js"),import("./ChatSurface-
|
|
25
|
+
`),o.code}let[{render:G},A,{ScrollbackProvider:U},{ChatSurface:H},{ScrollbackTap:J},{setInkExit:K},{buildDesignChat:L}]=await Promise.all([import("./build-5ZN47FAT.js"),import("./react-QWOAB3TB.js"),import("./scrollback-GGNBDFQV.js"),import("./ChatSurface-6NZGMNHL.js"),import("./ScrollbackTap-4SPXGFMU.js"),import("./exit-manager-EDHCETUN.js"),import("./design-chat-F3OEZPNJ.js")]),x=A.default??A,{controller:f,inspect:M,runDeps:W}=await L({site:O(u,l),store:l,credentials:y,agent:t,auth:b,preflight:D,...e.useCase?{useCase:e.useCase}:{}}),P={current:null},d=null,F=0,C=null,w=!1,X=()=>{if(F+=1,F>=2){try{g.unmount()}catch{}m({state:"interrupted",reason:"ctrl+c \xD72",facts:["forced quit \u2014 anything already committed is safe in the store"]}),process.exit(130)}f.requestPause(),C=setTimeout(()=>{w||(w=!0,(async()=>{f.finalizeForExit(),await P.current?.flush();try{g.unmount()}catch{}m({state:"interrupted",facts:["the agent did not confirm the pause within 5s \u2014 nothing new was saved"]}),process.exit(130)})())},5e3)},Z={verb:"design",sid:e.resume??i.ids.session_id,env:R(),...e.useCase?{subject:e.useCase}:{}},g=G(x.createElement(U,null,x.createElement(J,{into:P}),x.createElement(H,{controller:f,verb:"design",onCtrlC:X,inspect:M,meta:Z})),{exitOnCtrlC:!1});K(()=>g.unmount());let $=null;try{let r=S({...V(l,e),confirmRetarget:Y},W({isTTY:E(),onSummary:h=>{d=h},telemetry:i}));r.finally(()=>{w=!0});let n=await r;return $=n,n===1&&process.stderr.write(i.supportFooter()+`
|
|
26
26
|
`),await i.end({exit_code:n}),n}catch(r){throw d||(d={state:"crashed",facts:[`the session ended unexpectedly \u2014 ${r instanceof Error?r.name:"error"}`]}),r}finally{w=!0,C&&clearTimeout(C),f.finalizeForExit(),await P.current?.flush();try{g.unmount()}catch{}d?m(d):$===1&&m({state:"interrupted",facts:["the session ended without saving \u2014 see the error above"]})}}export{we as bindDesignInteractive};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as qt,b as en,c as tn,e as nn,f as sn}from"./chunk-
|
|
2
|
+
import{a as qt,b as en,c as tn,e as nn,f as sn}from"./chunk-734ORT6O.js";import{a as zt,c as Zt}from"./chunk-XQMWHPZI.js";import{a as rn}from"./chunk-BY65QAAN.js";import{a as Ht,b as Kt,c as Gt,f as Vt,k as Jt}from"./chunk-3RJHXOZH.js";import{c as Ft,d as Et,e as _t,g as Tt,h as Dt,i as Ut,j as Bt,m as re,n as Te,o as Lt,p as Wt,q as Qt,r as Yt,s as oe}from"./chunk-DDZLCAEO.js";import"./chunk-CM4CHYSN.js";import"./chunk-RHGW7B5Q.js";import{c as on}from"./chunk-TW5AA5A7.js";import"./chunk-L5DALV5N.js";import{a as De}from"./chunk-IJ2AHSWW.js";import{b as Ee}from"./chunk-YLXWAY7D.js";import"./chunk-RX6776AI.js";import"./chunk-RTVHJ23A.js";import"./chunk-3AGP2BVN.js";import{a as Pt,b as It}from"./chunk-VXGN3IV7.js";import{j as we,k as ne}from"./chunk-HCJ2N3XB.js";import"./chunk-5Y2G4NC7.js";import{a as Me,b as xt}from"./chunk-NLZZLANH.js";import{e as Ct}from"./chunk-3F5FMH76.js";import{i as rt}from"./chunk-XMPTFXPW.js";import{a as Fe,c as $t,d as jt}from"./chunk-ZU4W2QGM.js";import"./chunk-73Y6T2UK.js";import{a as qe,b as Pe}from"./chunk-SMXABALN.js";import{b as Ze}from"./chunk-WN5VKKJ3.js";import"./chunk-P2ZQDQDB.js";import"./chunk-3BSYOCSW.js";import"./chunk-HIUAUZNL.js";import{k as Nt,l as Mt}from"./chunk-457Y5TEC.js";import"./chunk-EECDDDSB.js";import"./chunk-HD6NR44L.js";import{c as _e,e as se}from"./chunk-7NPTL66J.js";import{b as Xt}from"./chunk-BWXLZS5O.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-42PALMW2.js";import"./chunk-KF4DKXSS.js";import"./chunk-AUJSC7PU.js";import"./chunk-3QICDXY5.js";import"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-AZLNLHUA.js";import{b as Ot,c as At}from"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-4IEQNX7F.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-GRURFGBP.js";import"./chunk-MYZHOBS4.js";import"./chunk-ZFM77AQU.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import{A as dt,Ba as G,Ca as U,E as ct,F as lt,G as ut,H as mt,Ha as B,N as Oe,O as te,P as pt,V as Ae,X as ft,ba as he,f as Ie,fa as Ne,ga as gt,ha as vt,ia as ht,la as wt,pa as bt,qa as St,ra as yt,s as ot,ua as kt,va as Rt,y as it,z as at}from"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import{a as st}from"./chunk-I2MC6VVX.js";import{a as fe}from"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import{d as tt}from"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import{oa as nt}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import{m as ze}from"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import{c as et}from"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-3OQW2GTA.js";import{a as ve}from"./chunk-HCBYKLMW.js";import{a as je,b as ge}from"./chunk-33DWJV67.js";import{a as O}from"./chunk-FOJHSG5M.js";import{a as wn}from"./chunk-6YGTRKDT.js";import{y as $e}from"./chunk-D36V5OX6.js";import{e as ee}from"./chunk-UR6MHSHU.js";import{existsSync as Qe}from"fs";import{homedir as Cn}from"os";import{join as mn}from"path";var E=ee(wn(),1);var bn=e=>`${"\u2588".repeat(Math.round(e/10))}${"\u2591".repeat(10-Math.round(e/10))} ${e}%`;function Ue(e,s,r){return r===null||r<=0?e:`${e} ${bn(Math.min(100,Math.round(s/r*100)))}`}function Sn(e){let s=Math.max(0,Math.round(e)),r=Math.floor(s/60);return r===0?`${s}s`:s%60===0?`${r}m`:`${r}m ${s%60}s`}var yn={unreachable:{start:"can't connect",mid:"connection lost"},not_ready:{start:"not ready yet",mid:"not ready yet"},timeout:{start:"taking too long",mid:"taking too long"}};function an(e,s,r,t){switch(e.kind){case"connect":return{kind:"working",step:"connecting"};case"load":return e.part==="history"?{kind:"working",step:Ue("loading the project",e.done,e.total)}:e.part==="search"?{kind:"working",step:"getting the project ready"}:{kind:"working",step:Ue("reading your session",e.done,e.total)};case"write":return e.pending>0?{kind:"working",step:"adding to this session"}:null;case"retry":{let o=yn[e.cause],i=Sn((Date.parse(e.giveUpAt)-s)/1e3);return{kind:"retrying",text:r?`${o.mid} \u2014 pausing in ${i}`:`${o.start} \u2014 giving up in ${i}`}}case"upload":return{kind:"working",step:Ue(e.subject?"uploading":`uploading ${e.file}`,e.sentBytes,e.totalBytes)};case"reading":return{kind:"working",step:`reading ${e.file}`};case"fetching":return{kind:"working",step:e.subject?"fetching":`fetching ${e.file}`,...t!==void 0?{elapsedS:Math.max(0,Math.floor((s-t)/1e3))}:{}};case"save":return e.phase==="saving"?{kind:"working",step:e.project?`saving to "${e.project}" and Test Manager`:"saving"}:null;case"paused":case"ended":case"not_ended":case"finished_before":case"overlap":return null}}var A=ee(ve(),1),cn={progress:null,at:0,controller:null,sid:"",opened:!1,added:0,ask:null,asked:0,notes:[],review:null};function ln(){let e=cn,s=new Set,r=t=>{e={...e,...t};for(let o of s)o(e)};return{progress:t=>r({progress:t,at:Date.now(),...t.kind==="connect"&&t.step==="session"?{opened:!0}:{}}),controller:t=>r({controller:t,progress:null}),opened:(t,o=0)=>r({sid:t,opened:!0,added:o}),ask:t=>r({ask:t,progress:null,asked:t!==null?e.asked+1:e.asked}),note:t=>r({notes:[...e.notes,t]}),review:t=>r({review:t}),subscribe(t){return s.add(t),t(e),()=>{s.delete(t)}}}}var dn=2e3;function un(e){return(0,A.jsx)(qe,{children:(0,A.jsx)(kn,{...e})})}function kn({feed:e,verb:s,meta:r,verbBefore:t,onCtrlC:o}){let[i,x]=(0,E.useState)(cn),[l,g]=(0,E.useState)(Date.now());(0,E.useEffect)(()=>e.subscribe(x),[e]);let b=Ze(),d=(0,E.useRef)(0);(0,E.useEffect)(()=>{for(;d.current<i.notes.length;d.current++)b.append((0,A.jsx)(ge,{children:i.notes[d.current]}))},[i.notes,b]),(0,E.useEffect)(()=>{if(!i.progress)return;let a=setInterval(()=>g(Date.now()),1e3);return()=>clearInterval(a)},[i.progress]),Pe((a,_)=>{_.ctrl&&a==="c"&&o()},{isActive:i.controller===null&&i.ask===null});let C=i.progress,v=C===null?!1:C.kind==="retry"?l-i.at<C.nextInS*1e3+dn:i.controller===null||C.kind==="write"||C.kind==="save"||l-i.at<dn,$=C&&v?an(C,Date.now(),i.opened,i.at):null,j={...r,sid:i.sid},P=i.review?{...j,verb:"review",subject:_e(se(i.review))}:j,S=i.ask?(0,A.jsx)(Rn,{ask:i.ask,status:$,meta:P,onCtrlC:o},i.asked):null;if(i.controller){let a=i.review;return(0,A.jsx)(on,{controller:i.controller,verb:s,meta:a?{...j,verb:"review",subject:_e(se(a))}:j,reconcile:a?.deps??null,remote:{status:$,added:i.added,...S?{takeover:S}:{},...a?{review:{source:a.source,file:a.file,...a.page?{page:a.page}:{},offer:a.deps.offer,...a.deps.resumable?{resumable:a.deps.resumable}:{}}}:{}},onCtrlC:o})}return S||(0,A.jsxs)(je,{flexDirection:"column",children:[(0,A.jsx)(ge,{children:" "}),(0,A.jsx)(Ee,{status:$??{kind:"working",step:"connecting"},meta:t?{...j,verb:t}:j,tallies:{items:i.added>0?[`${i.added} added \xB7 not saved yet`]:[]},keys:["ctrl+c exit"],remote:!0})]})}function Rn({ask:e,status:s,meta:r,onCtrlC:t,gapAbove:o=!0}){let[i,x]=(0,E.useState)(0),[l,g]=(0,E.useState)(null),b=(0,E.useRef)(0),d=(0,E.useRef)(null),C=m=>(b.current=m,void x(m)),v=m=>(d.current=m,void g(m)),$=Pt(e.rows),j=s??e.closing??null,P=m=>{v(null),m.trim()&&$!==null&&e.answer(e.rows[$].key,m.trim())},S=(m,w,y)=>{if(y.return)return P(m);if(y.escape)return v(null);if(y.backspace||y.delete)return v(m.slice(0,-1));if(y.tab||y.ctrl||y.meta)return;let h=w.search(/[\r\n]/);if(h>=0)return P(m+w.slice(0,h));v(m+w)};Pe((m,w)=>{if(w.ctrl&&m==="c"||!w.ctrl&&m.includes(""))return t();if(!j){if(d.current!==null)return S(d.current,m,w);if(w.upArrow)C(Math.max(0,b.current-1));else if(w.downArrow)C(Math.min(e.rows.length-1,b.current+1));else if(w.return){let y=e.rows[b.current];y.free?v(""):e.answer(y.key)}else $!==null&&m&&!w.meta&&!w.escape&&!w.tab&&(C($),S("",m,w))}},{fromFrame:!0});let a=l===null||$===null?null:{value:l,onChange:v,onSubmit:P,onCancel:()=>v(null),keysFromPanel:!0},_=j?["ctrl+c exit"]:["\u2191\u2193 select","\u23CE confirm",...$!==null?["\u270E type your own"]:[],"ctrl+c exit"];return(0,A.jsxs)(je,{flexDirection:"column",children:[j?(0,A.jsx)(ge,{children:" "}):(0,A.jsx)(It,{ask:!0,headline:e.headline,sublines:e.sublines,rows:e.rows,sel:i,focused:l===null,freeText:a,gapAbove:o}),(0,A.jsx)(Ee,{status:j??{kind:"waiting",label:"save this session?"},meta:r,tallies:{items:e.tallies},keys:_,remote:!0})]})}var gn=ee(ve(),1);async function $s(e){let r=(e.start.kind==="resume"?/^(design|evolve)-/.exec(e.start.sessionId)?.[1]:void 0)??e.verb,t={...e,verb:r==="design"||r==="evolve"?"design":"extract",...r==="reconcile"?{review:!0}:{},...r==="evolve"?{evolve:!0}:{}},o;try{o=t.testing?.basicAuth??await Ct()}catch(n){if(!(n instanceof rt))throw n;return ne({code:n.code,message:n.message,...n.remedy?{remedy:n.remedy}:{}}),2}let i=`using project "${t.choice.projectName}", shared with your team`;t.choice.projectName&&!t.choice.onboarded&&e.verb!=="reconcile"&&process.stdout.write(`${i}
|
|
3
3
|
`);let x=!1,l=()=>{x||!t.choice.onboarded||(x=!0,g.note(`${we(t.choice.projectName)}
|
|
4
4
|
${i}`))};if(t.verb==="extract"&&t.start.kind==="new"&&!t.start.body.sourceId&&!t.run.force&&!t.ingest){let n=await Gt({person:Ie({url:t.choice.latticeUrl,basicAuth:o,requestDeadlineMs:Kt}),projectId:t.choice.projectId,me:$t(process.cwd()),now:Date.now(),log:Me("nothing-new")});if(n!==null)return t.choice.onboarded&&Qe(mn(process.cwd(),Fe))&&process.stdout.write(`${we(t.choice.projectName)}
|
|
5
5
|
${i}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f}from"./chunk-3F5FMH76.js";import"./chunk-XMPTFXPW.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{b as forgetCredentials,e as latticeBasicAuth,f as markReader,d as sharedBasicPair,c as sharedCredentialProvider,a as sharedCredentials};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{N as y,O as R,P as L,Q as g,U as N,V as U,W as H}from"./chunk-
|
|
2
|
+
import{N as y,O as R,P as L,Q as g,U as N,V as U,W as H}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as $}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import{e as P,h as l}from"./chunk-XMPTFXPW.js";import{a as D}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-ZFM77AQU.js";import{Ia as _,M as f,R as C,S as w,ga as x,ha as k,na as A}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";import{existsSync as q}from"fs";var I={kind:"human",id:process.env.USER??"operator"},G=["interactive","agent","ci","override"],M=/^(UNKNOWN_|BAD_|INVALID_|MALFORMED_|NOT_|SLUG_TAKEN|ALREADY_|SUPERSEDED_)/;function j(n){return n.every(e=>M.test(e.code))?2:1}function b(n,e,r){let c=j(r);if(e){for(let t of r)e.event({type:"error",code:t.code,message:t.detail});return e.done(c)}for(let t of r)y(n,`${t.code}: ${t.detail}`);return c}function E(n,e){return P("ndjson",e,{stdout:r=>n.out(r.replace(/\n$/,"")),stderr:r=>(n.err??n.out)(r.replace(/\n$/,""))})}async function O(n,e,r,c,t){if(e.mode!==void 0&&!G.includes(e.mode))return l(E(r,n),`${n}: --mode must be interactive | agent | ci | override, got '${e.mode}'`,"MODE_USAGE");if(e.mode!=="agent"){let s=R(c,r);return!s||H(s,r)||t&&!await L(r,t,e.yes)?2:{dir:s,hio:null,store:$(s)}}let o=E(r,n),i=D(c);if(!q(i))return o.event({type:"error",message:"no context store here",remedy:"run kane-cli context ingest <files> first"}),o.done(2,"refused");let m=N(i);return m?(o.event(U(m)),o.done(2,"refused")):t&&!e.yes?l(o,`refusing to ${t} without --yes`,"USAGE","add --yes"):{dir:i,hio:o,store:$(i)}}async function v(n,e){if(!n)return e();try{return await e()}catch(r){if(r instanceof _)throw r;return n.event({type:"error",message:r instanceof Error?r.message:String(r)}),n.done(1,"error")}}function h(n,e,r){return e?e.done(0):(n.out(r),0)}async function V(n,e,r,c=process.cwd()){let t=await O("retire",e,r,c,`retire source ${n} (head \u2192 null + tombstone record)`);if(typeof t=="number")return t;let{dir:o,hio:i,store:m}=t;return v(i,async()=>{let s=f(m),a=k({store:m,graph:s,sourceId:n,reason:e.reason,by:I});return a.errors?b(r,i,a.errors):h(r,i,`retired ${n} (record ${a.record.seq}) \u2014 its use-cases stay until no live source evidences them`)})}async function B(n,e,r,c=process.cwd(),t={}){let o="kane-cli context name <ref> <slug> | kane-cli context name --backfill";if(!n||!e)return t.mode==="agent"?l(E(r,"name"),"name needs a ref and a slug","USAGE",o):((r.err??r.out)(`usage: ${o}`),2);let i=await O("name",t,r,c,null);if(typeof i=="number")return i;let{dir:m,hio:s,store:a}=i;if(A.test(e)){let d=`"${e}" is in the reserved sequential-id namespace (assigned at mint) \u2014 pick a descriptive name`;return s?l(s,d,"USAGE","pick a descriptive name"):(y(r,d),2)}let p=w(f(a),n);return p!==null?s?l(s,p,"USAGE","give more digits of the id"):(y(r,p),2):v(s,async()=>{let d=f(a),u=x({store:a,graph:d,assignments:[{ref:C(d,n),slug:e}],by:I});return u.errors?b(r,s,u.errors):h(r,s,`named ${u.record.names[0].cid} as "${e}" (record ${u.record.seq})`)})}async function F(n,e,r,c=process.cwd()){let t=Number(n),o=await O("revert",e,r,c,`revert record ${t} via a compensation record`);if(typeof o=="number")return o;let{dir:i,hio:m,store:s}=o;return v(m,async()=>{let a=f(s),{commitRevert:p}=await import("./revert-FHOBLZWF.js"),d=p({store:s,graph:a,seq:t,reason:e.reason,by:I});for(let S of d.warnings)m?m.event({type:"warning",message:S}):r.out(`note: ${S}`);if(d.errors)return b(r,m,d.errors);let u=d.record;return h(r,m,`reverted record ${t} via compensation record ${u.seq}: ${u.supersessions.length} supersession(s), ${u.review.length} trust restoration(s), ${Object.keys(u.source_head_moves).length} head move(s) \u2014 history unchanged, effects inverted`)})}async function ne(n,e){return V(n,e,g())}async function te(n,e,r={}){return B(n,e,g(),process.cwd(),r)}async function se(n={},e=process.cwd()){return K(n,g(),e)}async function K(n,e,r=process.cwd()){let c=await O("name",n,e,r,"assign logical ids to every live unnamed node (one commit record)");if(typeof c=="number")return c;let{dir:t,hio:o,store:i}=c;return v(o,async()=>{let{backfillLogicalIds:m}=await import("./logical-ids-RXAQJZ3T.js"),s=f(i),a=m(i,s);return a.errors?b(e,o,a.errors):h(e,o,a.assigned===0?"backfill: every live node already has a logical id":`backfill: assigned ${a.assigned} logical id(s) (record ${a.record.seq})`)})}async function oe(n,e){return F(n,e,g())}export{se as nameBackfillCommand,te as nameCommand,ne as retireCommand,oe as revertCommand,K as runNameBackfillCommand,B as runNameCommand,V as runRetireCommand,F as runRevertCommand};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{O as p}from"./chunk-
|
|
2
|
+
import{O as p}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import{a as h}from"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-WOSANGV6.js";import"./chunk-XMPTFXPW.js";import"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import{d as E}from"./chunk-LCSJ7GOG.js";import"./chunk-HAW5WEKT.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-ZFM77AQU.js";import{vb as m,xb as g}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import{f as a}from"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";var b=[a.SOURCE,a.USECASE,a.SCENARIO,a.AC,a.TEST,a.GAP],O=new Set([a.SCENARIO,a.AC,a.TEST]),w=(r,n,l)=>{let i=r.stale(n);return i==="stale"&&O.has(l)&&!g(r,n)?"fresh":i};function C(r,n){if(r===a.SOURCE)return String(n.source_id??"");let l=n.question?.header,i=n.title??n.text??l??n.kind??"";return String(i)}function v(r,n){if(r.length<=n)return r;let l=r.slice(0,n-1),i=l.lastIndexOf(" ");return`${(i>n*.6?l.slice(0,i):l).trimEnd()}\u2026`}var S=58;async function y(r,n,l=process.cwd()){let i=p(l,n);if(!i)return 2;let s=m(i),o=[...s.nodeLabel.entries()].filter(([e])=>r.all||!s.superseded.has(e)).map(([e,t])=>{let c=s.getNode(e)?.content??{},u=s.trust.get(e)??(t===a.SOURCE?"-":"derived");return{id:t===a.SOURCE?String(c.source_id??""):s.nameOf.get(e)??e.slice(0,19),cid:e,label:t,title:C(t,c),trust:u,fresh:u==="archived"?"-":w(s,e,t)}});if(r.type&&(o=o.filter(e=>e.label===r.type)),r.inferred&&(o=o.filter(e=>e.trust==="derived")),r.stale&&(o=o.filter(e=>e.fresh!=="fresh")),r.undesigned){let e=E(s);o=o.filter(t=>t.label===a.USECASE&&t.trust!=="archived"&&!s.superseded.has(t.cid)&&!e.has(s.tipOf(t.cid))).map(t=>({...t,designed:!1}))}if(!r.all){let e=new Map;for(let t of o)e.set(`${t.label}:${t.id}`,t);o=[...e.values()]}let d=e=>{let t=b.indexOf(e);return t===-1?b.length:t};if(o.sort((e,t)=>d(e.label)-d(t.label)||e.title.localeCompare(t.title)),r.json){for(let e of o)n.out(JSON.stringify(e));return 0}if(o.length===0)return n.out("(no matching nodes)"),0;n.out("trust \xB7 fresh \xB7 title \xB7 id");let f=null;for(let e of o){if(e.label!==f){f=e.label;let c=o.filter(u=>u.label===e.label).length;n.out(""),n.out(`\u2500\u2500 ${e.label} \xB7 ${c} \u2500\u2500`)}let t=v(e.title||"(untitled)",S);n.out(` ${e.trust.padEnd(8)} ${e.fresh.padEnd(6)} ${t.padEnd(S)} ${e.id}`)}{let{heldArchiveScan:e}=await import("./feeder-NY45UFJK.js"),t=e(h(i),s).live.size;t>0&&(n.out(""),n.out(`${t} held archive(s) awaiting confirmation \u2014 kane-cli context review walks them (or --allow-archive --because applies headlessly)`))}return 0}async function A(r){if(r.mode!=null&&!["interactive","agent","ci","override"].includes(r.mode)){let{makeHeadlessIO:i,agentRefusal:s}=await import("./headless-io-FFM5T6KL.js");return s(i("ndjson","list"),`list: --mode must be interactive | agent | ci | override, got '${r.mode}'`,"MODE_USAGE")}{let{remoteEntry:i}=await import("./remote-entry-X6JMPC2K.js"),s=await i("context list",r.mode==="agent",void 0,{onboard:!1});if(s!==null){if("exit"in s)return s.exit;let{remoteListCommand:o}=await import("./list-remote-LXPQNXYN.js");return o(r,s.choice)}}let{mode:n,...l}=r;if(n==="agent"){let[{existsSync:i},{contextDir:s},{makeHeadlessIO:o,agentRefusal:d}]=await Promise.all([import("fs"),import("./paths-UMIX3RJF.js"),import("./headless-io-FFM5T6KL.js")]);if(!i(s(process.cwd())))return d(o("ndjson","list"),"no context store here (run `kane-cli context ingest <files>` first)","NO_STORE")}return y({...l,...n==="agent"?{json:!0}:{}},{out:i=>process.stdout.write(i+`
|
|
3
3
|
`),confirm:async()=>!1,isTTY:!!process.stdout.isTTY})}export{v as capWord,A as listCommand,y as runListCommand,C as titleOf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-YHFZFV3A.js";import"./chunk-V7USCQWO.js";import"./chunk-C6HI6Y3S.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{d as emitNdjson,b as filterByName,g as formatAuthResolutionError,c as paginate,a as parsePagination,i as registerListCommands,e as renderTable,f as resolveTmsBasicAuth,h as validateCreateName};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as O,b as v}from"./chunk-
|
|
2
|
+
import{a as O,b as v}from"./chunk-NIVFEACM.js";import{d as I}from"./chunk-3AGP2BVN.js";import{f as j,g as _}from"./chunk-HCJ2N3XB.js";import{e as L}from"./chunk-3F5FMH76.js";import{i as R}from"./chunk-XMPTFXPW.js";import"./chunk-ZU4W2QGM.js";import"./chunk-73Y6T2UK.js";import"./chunk-457Y5TEC.js";import"./chunk-7NPTL66J.js";import{g as D}from"./chunk-42PALMW2.js";import"./chunk-ZTHYAHDN.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-AZLNLHUA.js";import"./chunk-AQ2OG2EF.js";import"./chunk-DPGOAFKF.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-ZFM77AQU.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import{Ba as T,Ha as d,f as S,x as $,xa as N,ya as b,za as w}from"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import{oa as y}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import{a as h}from"./chunk-FOJHSG5M.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";var C=["source","usecase","scenario","test"];async function F(e){let{opts:r,agent:n}=e;if(r.all)return j(d.optionNotYet("--all"),"list",n);if(r.type!==void 0&&!C.includes(r.type))return j(d.optionNotYet(`--type ${r.type}`),"list",n);let c=r.type===void 0?[...C]:[r.type],l;try{l=await O(e.reads,e.projectId,c)}catch(t){return x(t,e.projectName,n)}r.inferred&&(l=l.filter(t=>t.trust==="derived"));let o=l.filter(t=>t.label==="usecase");if(r.undesigned){let t;try{t=await v(e.reads,e.projectId)}catch(s){return x(s,e.projectName,n)}let a=o.filter(s=>s.upToDate!=="archived"&&s.id!=="-"&&!t.has(s.id));if(r.json||n){for(let s of a)e.out(`${JSON.stringify({id:s.id,label:s.label,title:s.title,trust:s.trust,fresh:s.fresh,designed:!1})}
|
|
3
3
|
`);return 0}if(a.length===0)return e.out(`every use-case in ${e.projectName?`"${e.projectName}"`:"this project"} has a test
|
|
4
4
|
|
|
5
5
|
`),0;e.out(`${a.length===1?"1 use-case has":`${a.length} use-cases have`} no test yet:
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a}from"./chunk-XLEGGC4Y.js";import"./chunk-RFHMDQXZ.js";import"./chunk-LUR7JFPP.js";import"./chunk-C2RUDJ46.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{a as LoginFlow};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{O as E,P as a,Q as m}from"./chunk-
|
|
2
|
+
import{O as E,P as a,Q as m}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import"./chunk-BSRSXYDZ.js";import"./chunk-WOSANGV6.js";import"./chunk-XMPTFXPW.js";import{a as u}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-ZFM77AQU.js";import{pb as l,qb as p,rb as _}from"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";var N=["CHAIN_ERROR","CARDINALITY_VIOLATION","DOUBLE_SUPERSEDE","SUPERSEDE_CYCLE","EDGE_CYCLE","SUPERSEDE_UNKNOWN_OLD","SUPERSEDE_UNKNOWN_NEW","SUPERSEDE_UNKNOWN_ECID","NAME_UNKNOWN_TARGET","UNKNOWN_LABEL","UNKNOWN_EDGE_TYPE","ILLEGAL_EDGE","MISSING_SALIENT","MISSING_FIELD","UNKNOWN_FIELD","UNKNOWN_EDGE_PROP","BAD_ENUM","BAD_CHECK","DERIVED_MISSING","DERIVED_DRIFT","NODE_FILE_MISSING","NODE_FILE_MISMATCH","NODE_FILE_CORRUPT"];function I(e){let t=r=>{let n=N.indexOf(r);return n===-1?N.length:n},o=e[0]?.code??"fsck_failed";for(let r of e)t(r.code)<t(o)&&(o=r.code);return o}function S(e){let t=new Map;for(let s of e.issues)t.set(s.code,(t.get(s.code)??0)+1);let o=[...t.entries()].sort((s,d)=>d[1]-s[1]).map(([s,d])=>`${s}:${d}`);for(;o.length>1&&o.join("/").length>512;)o.pop();let r=o.join("/"),n=e.issues.map(s=>({code:s.code,detail:s.detail.length>512?s.detail.slice(0,512):s.detail})),i=[...n],c=JSON.stringify(i);for(;i.length>0&&Buffer.byteLength(c,"utf8")>16384;)i.pop(),c=JSON.stringify(i);let f=n.length-i.length;return{issue_count:e.issues.length,records:e.records,...e.pending!==void 0?{pending:e.pending}:{},codes:r,issues:c,...f>0?{issues_truncated:f}:{}}}async function O(e,t=process.cwd(),o,r={}){if(!E(t,e))return r.json&&e.out(JSON.stringify({ok:!1,error:"NO_STORE"})),2;let n=_(u(t));if(n.ok)return r.json?e.out(JSON.stringify(n)):e.out(n.pending?`ok: ${n.records} record(s) verified \u2014 ${n.pending} record(s) pending catch-up (applied automatically on the next command)`:`ok: ${n.records} record(s) verified, derived projection in parity`),0;if(r.json)e.out(JSON.stringify(n));else for(let i of n.issues)e.out(`issue: ${p(i)}`);return o&&(o.event("ASR_FSCK_REPORT",S(n)),o.error(I(n.issues))),1}async function D(e,t,o=process.cwd()){if(!E(o,t)||!await a(t,"wipe .context/derived and rebuild it from the verified commit chain",e.yes))return 2;let r=l(u(o));return t.out(`rebuilt: ${r.applied.seq} record(s) replayed, ${Object.keys(r.nodeLabel).length} node(s) projected`),0}async function b(e,t={}){return O(m(),process.cwd(),e,t)}async function k(e={}){return D(e,m())}export{b as fsckCommand,k as rebuildCommand,O as runFsckCommand,D as runRebuildCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as u,b as m,c as s,d as f,e as g}from"./chunk-
|
|
2
|
+
import{a as u,b as m,c as s,d as f,e as g}from"./chunk-6EB5VRAN.js";import{a as l}from"./chunk-YDPTSDIJ.js";import{a as P}from"./chunk-ZTRRFG52.js";import"./chunk-LIGTP3A3.js";import"./chunk-5Y2G4NC7.js";import"./chunk-LQQNPMOD.js";import"./chunk-36N3EHW5.js";import"./chunk-7YT4TTKL.js";import"./chunk-NXAJBSIF.js";import"./chunk-SMXABALN.js";import"./chunk-ZAFJQ3SM.js";import"./chunk-IGEAET7M.js";import"./chunk-CUXY6KQ2.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XRNQSXOM.js";import"./chunk-TZXXJWHA.js";import"./chunk-SXRHKXSE.js";import"./chunk-ICLUC44J.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as T}from"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import{e as p}from"./chunk-UR6MHSHU.js";var d=p(T(),1);import{access as k}from"fs/promises";var n=p(c(),1);async function D(){return await l(r=>(0,n.jsx)(P,{mode:"legacy-mobile",onSelect:e=>{(e==="emulator"||e==="simulator")&&r(e)},onCancel:()=>r(null)}))}async function K(r,e,t){return await l(a=>(0,n.jsx)(g,{targets:r,kind:e,...t?{preselectedTarget:t}:{},onSelect:i=>a(i),onCancel:()=>a(null)}))}function y({kind:r,listApps:e,done:t}){let[a,i]=(0,d.useState)(e?"source":"local");return a==="source"?(0,n.jsx)(u,{kind:r,onSelect:o=>i(o==="local"?"local":"cloud"),onCancel:()=>t(null)}):a==="cloud"&&e?(0,n.jsx)(m,{kind:r,listApps:e,onSelect:o=>t(o.appId),onManualEntry:()=>i("id"),onCancel:()=>i("source")}):a==="id"?(0,n.jsx)(s,{onSubmit:async o=>(t(o),{ok:!0}),onBack:()=>i("cloud")}):(0,n.jsx)(f,{kind:r,onSelect:async o=>{try{await k(o.value)}catch{return{ok:!1,error:`${o.value} is not there.`}}return t(o.value),{ok:!0}},onBack:()=>e?i("source"):t(null),onCancel:()=>t(null)})}async function R(r){return await l(e=>(0,n.jsx)(y,{...r,done:e}))}export{R as promptApp,K as promptDevice,D as promptMobileKind};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as ge}from"./chunk-RX47NRSM.js";import{b as pe}from"./chunk-A6TJOZ24.js";import"./chunk-5Y2G4NC7.js";import{b as ae}from"./chunk-WMGKUERB.js";import{a as ue,b as W}from"./chunk-NLZZLANH.js";import{a as ce,b as le,d as de}from"./chunk-NWD54VV5.js";import"./chunk-XMPTFXPW.js";import{f as me,g as fe}from"./chunk-L4UVUFL6.js";import{a as ie}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import{c as Q,d as ne}from"./chunk-C6HI6Y3S.js";import"./chunk-3G2LSTK5.js";import"./chunk-SWMTXMKB.js";import{a as se}from"./chunk-XZYA7DNH.js";import"./chunk-W3OVSDBN.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-57MDWTON.js";import"./chunk-NWBLYMH7.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import{a as oe,b as J}from"./chunk-MGNRNLBE.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-XBEYWXPV.js";import{a as D}from"./chunk-HCBYKLMW.js";import{a as E,b as f,i as q}from"./chunk-33DWJV67.js";import{a as B}from"./chunk-FOJHSG5M.js";import{a as re}from"./chunk-6YGTRKDT.js";import{y as b}from"./chunk-I6OQISK4.js";import{e as $}from"./chunk-UR6MHSHU.js";var ye=$(re(),1);var u=$(re(),1);var a=$(D(),1),O=5,H=50,Te=250,be=e=>e.replace(/[\\%_]/g,"\\$&"),K=({label:e,tallies:r,keys:o,verb:n,env:t,cols:s})=>(0,a.jsx)(ge,{status:{kind:"waiting",label:e},meta:{verb:n,sid:"",env:t},tallies:{items:r},keys:o,remote:!0,...s?{cols:s}:{}});function je({verb:e,env:r,cols:o,onShared:n,onLocal:t,onCancel:s}){let[j,w]=(0,u.useState)(0),l=(0,u.useRef)(0),x=p=>{l.current=p,w(p)},d=p=>p===0?n():t();return q((p,g)=>{if(g.ctrl&&p==="c"||g.escape)return s();if(g.upArrow)return x(0);if(g.downArrow)return x(1);if(g.return)return d(l.current);(p==="1"||p==="2")&&d(Number(p)-1)}),(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsx)(pe,{ask:!0,headline:"where should this folder's work go?",sublines:["you choose once; later runs in this folder use it"],rows:[{key:"shared",label:"work in a shared project",detail:"your team sees what you save"},{key:"local",label:"work locally",detail:"it stays in this folder, on this machine"}],sel:j,focused:!0}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"shared or local?",tallies:["this folder isn't set up yet"],keys:["\u2191\u2193 select","\u23CE confirm","esc cancel","ctrl+c exit"]})]})}var z=(e,r)=>`page ${Math.floor(e/O)+1}/${Math.max(1,Math.ceil(r/O))}`;function xe({verb:e,env:r,cols:o,tms:n,selectedId:t,settleMs:s=Te,onPick:j,onNew:w,onBack:l,onCancel:x}){let[d,p]=(0,u.useState)({rows:[],total:null,loading:!0,failed:!1}),[g,F]=(0,u.useState)(""),[P,C]=(0,u.useState)(null),[y,k]=(0,u.useState)(0),h=(0,u.useRef)(0);h.current=y;let v=(0,u.useRef)(!1),M=(0,u.useRef)(0),X=(0,u.useRef)(new Set).current;(0,u.useEffect)(()=>{let i=new AbortController;return(async()=>{let c=!0;try{for await(let m of n.listProjectsStream({perPage:H,sort:"-created_at",signal:i.signal})){if(c=!1,i.signal.aborted)return;p(T=>({rows:[...T.rows,...m.projects],total:m.total??T.total,loading:!m.done,failed:!1}))}}catch{i.signal.aborted||p(m=>({...m,loading:!1,failed:c}))}})(),()=>i.abort()},[n]),(0,u.useEffect)(()=>{if(v.current||P!==null||!t)return;let i=d.rows.findIndex(c=>c.project_id===t);i>=0&&(h.current=i,k(i))},[d.rows,t,P]),(0,u.useEffect)(()=>{if(g===""){C(null);return}let i=new AbortController,c=setTimeout(()=>{let m=++M.current;(async()=>{try{for await(let T of n.listProjectsStream({name:be(g),perPage:H,sort:"-created_at",signal:i.signal})){if(i.signal.aborted)return;let ee=M.current===m&&!X.has(m);X.add(m),ee&&(h.current=0,k(0)),C(te=>({seq:m,query:g,rows:!ee&&te?.seq===m?[...te.rows,...T.projects]:T.projects,total:T.total,got:!0,failed:!1}))}}catch{i.signal.aborted||C(T=>({seq:m,query:g,rows:T?.rows??[],total:T?.total??null,got:T?.got??!1,failed:!0}))}})()},s);return()=>{clearTimeout(c),i.abort()}},[g,s,n]);let R=g!=="",S=R&&P!==null&&P.got&&!P.failed?P:null,V=S?S.rows:R&&P?.failed&&P.got?P.rows:d.rows,Y=S!==null&&(S.total??S.rows.length)===0,G=(0,u.useRef)(V);G.current=V;let N=i=>{h.current=i,k(i)};q((i,c)=>{if(c.ctrl&&i==="c")return x();if(c.escape)return R?(F(""),C(null),N(0)):l();if(c.tab)return w();if(c.upArrow||c.downArrow)return v.current=!0,N(Math.max(0,Math.min(G.current.length-1,h.current+(c.upArrow?-1:1))));if(c.return){let m=G.current[h.current];m&&j({id:m.project_id,name:m.name});return}if(c.backspace||c.delete)return F(m=>m.slice(0,-1)),N(0);i&&!c.ctrl&&!c.meta&&(F(m=>m+i),N(0))});let A;if(S){let i=S.total??S.rows.length,c=d.total!==null?` of ${d.total}`:"";A=[i===0?`0${c} projects match`:`${i}${c} projects match \xB7 ${z(y,i)}`]}else if(d.failed)A=[];else if(d.loading)A=d.rows.length===0?[]:[`${d.rows.length} projects so far \xB7 loading more \xB7 ${z(y,d.rows.length)}`];else{let i=d.total??d.rows.length;A=[`${i} projects \xB7 ${z(y,i)}`]}let ve=R?Y?["tab new project","esc clear"]:["\u2191\u2193 select","\u23CE confirm","tab new project","esc clear"]:d.failed?["tab new project","esc back"]:["\u2191\u2193 select","\u23CE confirm","type to search","tab new project","esc back"],I=Math.floor(y/O)*O,Z=R&&P?.failed?"couldn't search \u2014 check your connection and type again":!R&&d.failed?"couldn't load your projects \u2014 check your connection and try again":null;return(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsxs)(E,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(f,{bold:!0,color:b.assuranceAccent,children:"? which project should this folder share its work with?"}),(0,a.jsxs)(f,{children:[(0,a.jsx)(f,{color:b.dim,children:" search "}),g?(0,a.jsx)(f,{children:g}):(0,a.jsx)(f,{color:b.dim,children:"type any part of a name; every project is searched"}),(0,a.jsx)(f,{inverse:!0,children:" "})]}),Z?(0,a.jsx)(f,{color:b.dim,children:` ${Z}`}):null,(0,a.jsx)(f,{children:" "}),Y?(0,a.jsx)(f,{color:b.dim,children:` no project's name has "${g}" in it`}):V.slice(I,I+O).map((i,c)=>(0,a.jsxs)(f,{bold:I+c===y,children:[I+c===y?(0,a.jsx)(f,{color:b.assuranceAccent,children:"\u276F"}):" ",` ${i.name}`,i.project_id===t?(0,a.jsx)(f,{color:b.green,bold:!1,children:" \u25CF selected"}):null]},i.project_id))]}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"pick a project",tallies:A,keys:ve})]})}var _=class extends Error{constructor(o){super(o?"the name is taken by a project the person can't open":"the name is taken by one of the person's projects");this.hidden=o;this.name="ProjectNameTaken"}},he=e=>e.trim().normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase();async function we(e,r,o,n){try{if(o!==void 0)return await e.getProject(o)===null;for await(let t of e.listProjectsStream({name:be(r),perPage:H}))return t.projects.some(s=>he(s.name)===he(r))?!1:typeof t.total=="number"&&t.total<=t.projects.length;return!0}catch(t){return n(`the project holding the taken name couldn't be read, so its line sends the person to the list: ${t instanceof Error?t.message:String(t)}`),!1}}var Se=e=>{let r=e!==null&&typeof e=="object"?e.id:void 0;return typeof r=="string"&&r!==""?r:void 0};async function Pe(e,r,o=()=>{}){let n;try{n=await e.createProject(r)}catch(t){throw t instanceof Q&&t.status===409?new _(await we(e,r,Se(t.body),o)):t}if(n.created===!1)throw new _(await we(e,r,n.id,o));return{id:n.id,name:n.name}}function Ce(e,r){return e instanceof _?e.hidden?`"${r}" is taken by a project that isn't in your list \u2014 try another name`:`"${r}" is already a project in Test Manager \u2014 esc to pick it`:e instanceof Q?e.status===403?"you can't make projects in Test Manager \u2014 esc to pick one from the list":e.status===409?`"${r}" is already a project in Test Manager \u2014 esc to pick it`:"couldn't make the project in Test Manager \u2014 try again, or esc to pick one":"couldn't reach Test Manager \u2014 check your connection and try again"}function ke({verb:e,env:r,cols:o,create:n,onMade:t,onBack:s,onCancel:j}){let[w,l]=(0,u.useState)(""),x=(0,u.useRef)(""),d=k=>{x.current=k(x.current),l(x.current)},p=(0,u.useRef)(!1),[g,F]=(0,u.useState)(!1),P=k=>{p.current=k,F(k)},[C,y]=(0,u.useState)(null);return q((k,h)=>{if(h.ctrl&&k==="c")return j();if(!p.current){if(h.escape)return s();if(h.return){let v=x.current.trim();if(v==="")return;P(!0),n(v).then(M=>t(M),M=>{y(Ce(M,v)),P(!1)});return}if(h.backspace||h.delete)return y(null),d(v=>v.slice(0,-1));k&&!h.ctrl&&!h.meta&&!h.tab&&(y(null),d(v=>v+k))}}),(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsxs)(E,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(f,{bold:!0,color:b.assuranceAccent,children:"? name the new project"}),(0,a.jsx)(f,{color:b.dim,children:" it's made in Test Manager, and this folder shares its work with it"}),(0,a.jsx)(f,{children:" "}),(0,a.jsxs)(f,{children:[(0,a.jsx)(f,{color:b.assuranceAccent,children:"\u276F"}),` ${w}`,(0,a.jsx)(f,{inverse:!0,children:" "})]}),C?(0,a.jsx)(f,{color:b.dim,children:` ${C}`}):null]}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"name the new project",tallies:["a new project in Test Manager"],keys:["\u23CE create","esc back to the list"]})]})}var L=$(D(),1);function Me({verb:e,env:r,selectedId:o,tms:n,create:t,onDone:s}){let[j,w]=(0,ye.useState)("choose"),l=e==="context extract"?"extract":"ingest";return j==="choose"?(0,L.jsx)(je,{verb:l,env:r,onShared:()=>w("list"),onLocal:()=>s("local"),onCancel:()=>s(null)}):j==="list"?(0,L.jsx)(xe,{verb:l,env:r,tms:n,selectedId:o,onPick:s,onNew:()=>w("new"),onBack:()=>w("choose"),onCancel:()=>s(null)}):(0,L.jsx)(ke,{verb:l,env:r,create:t,onMade:s,onBack:()=>w("list"),onCancel:()=>s(null)})}async function Re(){let e=await de();return new ne(oe(J()).tmsBaseUrl,e.username,e.accessKey)}async function Xe(){try{return await ce(),"signed_in"}catch(t){if(!(t instanceof se))throw t}let[{CredentialsManager:e},{TuiConfigStore:r},{runStartupGate:o}]=await Promise.all([import("./credentials-MRG452Y6.js"),import("./store-X6XPFSKF.js"),import("./run-startup-gate-NKRMKYBB.js")]),n=await o({isInteractive:!0,creds:new e,config:new r,onCancel:"return"});return le(),n.cancelled?"cancelled":n.recovered?"signed_in":"not_signed_in"}async function Ye(e,r){r.first.more?.return(void 0);let{CredentialsManager:o}=await import("./credentials-MRG452Y6.js"),n=new o,t=n.getActiveProfile(),s=J(),j=(t?n.loadProfileConfig(t,s)?.project_id:null)??null,w=await Re(),l=await(r.choose??Be)({verb:r.verb,env:s,selectedId:j,tms:w,create:x=>Pe(w,x,U)});if(l===null)return{exit:0};if(l==="local")return{local:!0,made:$e(r.verb,{print:!0}).made};try{fe(process.cwd(),{projectId:l.id,projectName:l.name,writtenBy:"kane-cli"})}catch(x){U(`the folder's link couldn't be written: ${W(x)}`);let{printPair:d}=await import("./gate-P57VP4E5.js"),{words:p}=await import("./remote-words-45USLRVN.js");return d(p.projectFileUnwritable(me(process.cwd()))),{exit:2}}return{choice:{kind:"remote",latticeUrl:e.latticeUrl,projectId:l.id,projectName:l.name,onboarded:!0}}}function $e(e,r){let o;try{o=ae(ie(process.cwd()))}catch(s){return U(`the folder's store couldn't be made, so the command goes on locally as before: ${W(s)}`),{made:!1,gitignore:null}}let n=o.gitignore?.outcome==="added"?"added":o.gitignore?.outcome==="failed"?"failed":null;if(o.gitignore?.outcome==="failed"&&U(`.context couldn't be added to .gitignore: ${o.gitignore.reason}`),!r.print)return{made:!0,gitignore:n};let t=[B.green("\u2713 Working locally"),B.dim(" this folder now has its own context store; its work stays on this machine")];return o.gitignore?.outcome==="added"&&t.push(B.dim(" added .context to .gitignore")),o.gitignore?.outcome==="failed"&&t.push(B.hex(b.amber)(" warning: couldn't add .context to .gitignore; add it to keep it out of git")),e==="context extract"&&t.push(B.dim(" to start, add your documents: kane-cli context ingest <files>")),process.stdout.write(`${t.join(`
|
|
2
|
+
import{b as ge}from"./chunk-YLXWAY7D.js";import{b as pe}from"./chunk-VXGN3IV7.js";import"./chunk-5Y2G4NC7.js";import{b as ae}from"./chunk-WMGKUERB.js";import{a as ue,b as W}from"./chunk-NLZZLANH.js";import{a as ce,b as le,d as de}from"./chunk-3F5FMH76.js";import"./chunk-XMPTFXPW.js";import{f as me,g as fe}from"./chunk-ZU4W2QGM.js";import{a as ie}from"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import{c as Q,d as ne}from"./chunk-C6HI6Y3S.js";import"./chunk-3G2LSTK5.js";import"./chunk-RF37IJNN.js";import{a as se}from"./chunk-XZYA7DNH.js";import"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import{a as oe,b as J}from"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-HJMCXSUJ.js";import{a as D}from"./chunk-HCBYKLMW.js";import{a as E,b as f,i as q}from"./chunk-33DWJV67.js";import{a as B}from"./chunk-FOJHSG5M.js";import{a as re}from"./chunk-6YGTRKDT.js";import{y as b}from"./chunk-D36V5OX6.js";import{e as $}from"./chunk-UR6MHSHU.js";var ye=$(re(),1);var u=$(re(),1);var a=$(D(),1),O=5,H=50,Te=250,be=e=>e.replace(/[\\%_]/g,"\\$&"),K=({label:e,tallies:r,keys:o,verb:n,env:t,cols:s})=>(0,a.jsx)(ge,{status:{kind:"waiting",label:e},meta:{verb:n,sid:"",env:t},tallies:{items:r},keys:o,remote:!0,...s?{cols:s}:{}});function je({verb:e,env:r,cols:o,onShared:n,onLocal:t,onCancel:s}){let[j,w]=(0,u.useState)(0),l=(0,u.useRef)(0),x=p=>{l.current=p,w(p)},d=p=>p===0?n():t();return q((p,g)=>{if(g.ctrl&&p==="c"||g.escape)return s();if(g.upArrow)return x(0);if(g.downArrow)return x(1);if(g.return)return d(l.current);(p==="1"||p==="2")&&d(Number(p)-1)}),(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsx)(pe,{ask:!0,headline:"where should this folder's work go?",sublines:["you choose once; later runs in this folder use it"],rows:[{key:"shared",label:"work in a shared project",detail:"your team sees what you save"},{key:"local",label:"work locally",detail:"it stays in this folder, on this machine"}],sel:j,focused:!0}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"shared or local?",tallies:["this folder isn't set up yet"],keys:["\u2191\u2193 select","\u23CE confirm","esc cancel","ctrl+c exit"]})]})}var z=(e,r)=>`page ${Math.floor(e/O)+1}/${Math.max(1,Math.ceil(r/O))}`;function xe({verb:e,env:r,cols:o,tms:n,selectedId:t,settleMs:s=Te,onPick:j,onNew:w,onBack:l,onCancel:x}){let[d,p]=(0,u.useState)({rows:[],total:null,loading:!0,failed:!1}),[g,F]=(0,u.useState)(""),[P,C]=(0,u.useState)(null),[y,k]=(0,u.useState)(0),h=(0,u.useRef)(0);h.current=y;let v=(0,u.useRef)(!1),M=(0,u.useRef)(0),X=(0,u.useRef)(new Set).current;(0,u.useEffect)(()=>{let i=new AbortController;return(async()=>{let c=!0;try{for await(let m of n.listProjectsStream({perPage:H,sort:"-created_at",signal:i.signal})){if(c=!1,i.signal.aborted)return;p(T=>({rows:[...T.rows,...m.projects],total:m.total??T.total,loading:!m.done,failed:!1}))}}catch{i.signal.aborted||p(m=>({...m,loading:!1,failed:c}))}})(),()=>i.abort()},[n]),(0,u.useEffect)(()=>{if(v.current||P!==null||!t)return;let i=d.rows.findIndex(c=>c.project_id===t);i>=0&&(h.current=i,k(i))},[d.rows,t,P]),(0,u.useEffect)(()=>{if(g===""){C(null);return}let i=new AbortController,c=setTimeout(()=>{let m=++M.current;(async()=>{try{for await(let T of n.listProjectsStream({name:be(g),perPage:H,sort:"-created_at",signal:i.signal})){if(i.signal.aborted)return;let ee=M.current===m&&!X.has(m);X.add(m),ee&&(h.current=0,k(0)),C(te=>({seq:m,query:g,rows:!ee&&te?.seq===m?[...te.rows,...T.projects]:T.projects,total:T.total,got:!0,failed:!1}))}}catch{i.signal.aborted||C(T=>({seq:m,query:g,rows:T?.rows??[],total:T?.total??null,got:T?.got??!1,failed:!0}))}})()},s);return()=>{clearTimeout(c),i.abort()}},[g,s,n]);let R=g!=="",S=R&&P!==null&&P.got&&!P.failed?P:null,V=S?S.rows:R&&P?.failed&&P.got?P.rows:d.rows,Y=S!==null&&(S.total??S.rows.length)===0,G=(0,u.useRef)(V);G.current=V;let N=i=>{h.current=i,k(i)};q((i,c)=>{if(c.ctrl&&i==="c")return x();if(c.escape)return R?(F(""),C(null),N(0)):l();if(c.tab)return w();if(c.upArrow||c.downArrow)return v.current=!0,N(Math.max(0,Math.min(G.current.length-1,h.current+(c.upArrow?-1:1))));if(c.return){let m=G.current[h.current];m&&j({id:m.project_id,name:m.name});return}if(c.backspace||c.delete)return F(m=>m.slice(0,-1)),N(0);i&&!c.ctrl&&!c.meta&&(F(m=>m+i),N(0))});let A;if(S){let i=S.total??S.rows.length,c=d.total!==null?` of ${d.total}`:"";A=[i===0?`0${c} projects match`:`${i}${c} projects match \xB7 ${z(y,i)}`]}else if(d.failed)A=[];else if(d.loading)A=d.rows.length===0?[]:[`${d.rows.length} projects so far \xB7 loading more \xB7 ${z(y,d.rows.length)}`];else{let i=d.total??d.rows.length;A=[`${i} projects \xB7 ${z(y,i)}`]}let ve=R?Y?["tab new project","esc clear"]:["\u2191\u2193 select","\u23CE confirm","tab new project","esc clear"]:d.failed?["tab new project","esc back"]:["\u2191\u2193 select","\u23CE confirm","type to search","tab new project","esc back"],I=Math.floor(y/O)*O,Z=R&&P?.failed?"couldn't search \u2014 check your connection and type again":!R&&d.failed?"couldn't load your projects \u2014 check your connection and try again":null;return(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsxs)(E,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(f,{bold:!0,color:b.assuranceAccent,children:"? which project should this folder share its work with?"}),(0,a.jsxs)(f,{children:[(0,a.jsx)(f,{color:b.dim,children:" search "}),g?(0,a.jsx)(f,{children:g}):(0,a.jsx)(f,{color:b.dim,children:"type any part of a name; every project is searched"}),(0,a.jsx)(f,{inverse:!0,children:" "})]}),Z?(0,a.jsx)(f,{color:b.dim,children:` ${Z}`}):null,(0,a.jsx)(f,{children:" "}),Y?(0,a.jsx)(f,{color:b.dim,children:` no project's name has "${g}" in it`}):V.slice(I,I+O).map((i,c)=>(0,a.jsxs)(f,{bold:I+c===y,children:[I+c===y?(0,a.jsx)(f,{color:b.assuranceAccent,children:"\u276F"}):" ",` ${i.name}`,i.project_id===t?(0,a.jsx)(f,{color:b.green,bold:!1,children:" \u25CF selected"}):null]},i.project_id))]}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"pick a project",tallies:A,keys:ve})]})}var _=class extends Error{constructor(o){super(o?"the name is taken by a project the person can't open":"the name is taken by one of the person's projects");this.hidden=o;this.name="ProjectNameTaken"}},he=e=>e.trim().normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase();async function we(e,r,o,n){try{if(o!==void 0)return await e.getProject(o)===null;for await(let t of e.listProjectsStream({name:be(r),perPage:H}))return t.projects.some(s=>he(s.name)===he(r))?!1:typeof t.total=="number"&&t.total<=t.projects.length;return!0}catch(t){return n(`the project holding the taken name couldn't be read, so its line sends the person to the list: ${t instanceof Error?t.message:String(t)}`),!1}}var Se=e=>{let r=e!==null&&typeof e=="object"?e.id:void 0;return typeof r=="string"&&r!==""?r:void 0};async function Pe(e,r,o=()=>{}){let n;try{n=await e.createProject(r)}catch(t){throw t instanceof Q&&t.status===409?new _(await we(e,r,Se(t.body),o)):t}if(n.created===!1)throw new _(await we(e,r,n.id,o));return{id:n.id,name:n.name}}function Ce(e,r){return e instanceof _?e.hidden?`"${r}" is taken by a project that isn't in your list \u2014 try another name`:`"${r}" is already a project in Test Manager \u2014 esc to pick it`:e instanceof Q?e.status===403?"you can't make projects in Test Manager \u2014 esc to pick one from the list":e.status===409?`"${r}" is already a project in Test Manager \u2014 esc to pick it`:"couldn't make the project in Test Manager \u2014 try again, or esc to pick one":"couldn't reach Test Manager \u2014 check your connection and try again"}function ke({verb:e,env:r,cols:o,create:n,onMade:t,onBack:s,onCancel:j}){let[w,l]=(0,u.useState)(""),x=(0,u.useRef)(""),d=k=>{x.current=k(x.current),l(x.current)},p=(0,u.useRef)(!1),[g,F]=(0,u.useState)(!1),P=k=>{p.current=k,F(k)},[C,y]=(0,u.useState)(null);return q((k,h)=>{if(h.ctrl&&k==="c")return j();if(!p.current){if(h.escape)return s();if(h.return){let v=x.current.trim();if(v==="")return;P(!0),n(v).then(M=>t(M),M=>{y(Ce(M,v)),P(!1)});return}if(h.backspace||h.delete)return y(null),d(v=>v.slice(0,-1));k&&!h.ctrl&&!h.meta&&!h.tab&&(y(null),d(v=>v+k))}}),(0,a.jsxs)(E,{flexDirection:"column",children:[(0,a.jsxs)(E,{marginTop:1,marginBottom:1,flexDirection:"column",children:[(0,a.jsx)(f,{bold:!0,color:b.assuranceAccent,children:"? name the new project"}),(0,a.jsx)(f,{color:b.dim,children:" it's made in Test Manager, and this folder shares its work with it"}),(0,a.jsx)(f,{children:" "}),(0,a.jsxs)(f,{children:[(0,a.jsx)(f,{color:b.assuranceAccent,children:"\u276F"}),` ${w}`,(0,a.jsx)(f,{inverse:!0,children:" "})]}),C?(0,a.jsx)(f,{color:b.dim,children:` ${C}`}):null]}),(0,a.jsx)(K,{verb:e,env:r,...o?{cols:o}:{},label:"name the new project",tallies:["a new project in Test Manager"],keys:["\u23CE create","esc back to the list"]})]})}var L=$(D(),1);function Me({verb:e,env:r,selectedId:o,tms:n,create:t,onDone:s}){let[j,w]=(0,ye.useState)("choose"),l=e==="context extract"?"extract":"ingest";return j==="choose"?(0,L.jsx)(je,{verb:l,env:r,onShared:()=>w("list"),onLocal:()=>s("local"),onCancel:()=>s(null)}):j==="list"?(0,L.jsx)(xe,{verb:l,env:r,tms:n,selectedId:o,onPick:s,onNew:()=>w("new"),onBack:()=>w("choose"),onCancel:()=>s(null)}):(0,L.jsx)(ke,{verb:l,env:r,create:t,onMade:s,onBack:()=>w("list"),onCancel:()=>s(null)})}async function Re(){let e=await de();return new ne(oe(J()).tmsBaseUrl,e.username,e.accessKey)}async function Xe(){try{return await ce(),"signed_in"}catch(t){if(!(t instanceof se))throw t}let[{CredentialsManager:e},{TuiConfigStore:r},{runStartupGate:o}]=await Promise.all([import("./credentials-F7DYLVWY.js"),import("./store-MSA7KASS.js"),import("./run-startup-gate-YO66G6LS.js")]),n=await o({isInteractive:!0,creds:new e,config:new r,onCancel:"return"});return le(),n.cancelled?"cancelled":n.recovered?"signed_in":"not_signed_in"}async function Ye(e,r){r.first.more?.return(void 0);let{CredentialsManager:o}=await import("./credentials-F7DYLVWY.js"),n=new o,t=n.getActiveProfile(),s=J(),j=(t?n.loadProfileConfig(t,s)?.project_id:null)??null,w=await Re(),l=await(r.choose??Be)({verb:r.verb,env:s,selectedId:j,tms:w,create:x=>Pe(w,x,U)});if(l===null)return{exit:0};if(l==="local")return{local:!0,made:$e(r.verb,{print:!0}).made};try{fe(process.cwd(),{projectId:l.id,projectName:l.name,writtenBy:"kane-cli"})}catch(x){U(`the folder's link couldn't be written: ${W(x)}`);let{printPair:d}=await import("./gate-7AKRPRMK.js"),{words:p}=await import("./remote-words-YVB66R3F.js");return d(p.projectFileUnwritable(me(process.cwd()))),{exit:2}}return{choice:{kind:"remote",latticeUrl:e.latticeUrl,projectId:l.id,projectName:l.name,onboarded:!0}}}function $e(e,r){let o;try{o=ae(ie(process.cwd()))}catch(s){return U(`the folder's store couldn't be made, so the command goes on locally as before: ${W(s)}`),{made:!1,gitignore:null}}let n=o.gitignore?.outcome==="added"?"added":o.gitignore?.outcome==="failed"?"failed":null;if(o.gitignore?.outcome==="failed"&&U(`.context couldn't be added to .gitignore: ${o.gitignore.reason}`),!r.print)return{made:!0,gitignore:n};let t=[B.green("\u2713 Working locally"),B.dim(" this folder now has its own context store; its work stays on this machine")];return o.gitignore?.outcome==="added"&&t.push(B.dim(" added .context to .gitignore")),o.gitignore?.outcome==="failed"&&t.push(B.hex(b.amber)(" warning: couldn't add .context to .gitignore; add it to keep it out of git")),e==="context extract"&&t.push(B.dim(" to start, add your documents: kane-cli context ingest <files>")),process.stdout.write(`${t.join(`
|
|
3
3
|
`)}
|
|
4
4
|
|
|
5
5
|
`),{made:!0,gitignore:n}}var U=ue("remote-check");async function Be(e,r={}){let{mountScreen:o}=await import("./ink-screen-RZ7QDIUI.js"),n=null,t=null,s,j=new Promise(l=>s=l);return n=await o((0,L.jsx)(Me,{...e,onDone:l=>{t||(t={p:l},n&&n.unmount().then(()=>s(l)))}}),r),t&&n.unmount().then(()=>s(t.p)),j}export{Me as Chooser,Be as chooseFolder,Ye as onboard,Re as personTms,Xe as signIn,$e as workLocally};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{k as T}from"./chunk-
|
|
2
|
+
import{k as T}from"./chunk-XZGEN4NU.js";import{a as _}from"./chunk-WD52ZNQY.js";import{a as h}from"./chunk-W3USRQX6.js";import{j as P}from"./chunk-JGRXMTME.js";import{a as I,b as S}from"./chunk-77ZZQJLX.js";import"./chunk-65VANXOF.js";import"./chunk-34R7BNZ2.js";import{b as m}from"./chunk-CGITGJ3I.js";import"./chunk-5D7ENQTQ.js";import"./chunk-MYZHOBS4.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4I7YN6YY.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";async function y(e,o={}){e.flushRecorder();let s=e.recorder?.lastWrittenPath??null;if(!s)return e.log("info","PERSIST_SKIPPED","No recorded path \u2014 recorder.flush no-op",{reason:e.sessionName?"recorder_flush_failed":"no_session_name",session_name:e.sessionName}),null;let p;try{p=P(s)}catch(t){throw e.log("error","PERSIST_RESOLVE_FAILED","resolveTestMd threw",{error:t.message,recorded_path:s}),t}let i=e.getRunsAsStepRecords(),u=e.getFlows(),d=[],c=0;for(let t=0;t<i.length;t++){let r=i[t],l=u.slice(c,c+r.totalRunDirs);c+=r.totalRunDirs;let f=l.find(n=>n.status==="failed"||n.status==="error"),R=f?"failed":l.length===0?"skipped":"passed";d.push({rootStepIndex:t+1,status:R,duration_s:l.reduce((n,w)=>n+(w.duration??0),0),reason:f?.reason})}let D=d.some(t=>t.status==="failed")?"failed":"passed",E=new m().load(),g=h(E.code_export?.language==="javascript"?"javascript":"python",o.mobile),a=S(s);e.log("info","PERSIST_START","Building staging dir",{recorded_path:s,output_dir:a,session_dir:e.sessionDir,step_count:i.length,flow_count:u.length});try{await T({resolvedTest:p,sessionDir:e.sessionDir,stepRunRecords:i,outcomes:d,overallStatus:D,startedISO:e.startedAt,durationS:d.reduce((t,r)=>t+(r.duration_s??0),0),sessionId:e.sessionId,commitId:e.sessionId,tmsIds:{testId:e.testId??void 0,testcaseId:o.testcaseId,projectId:o.projectId,folderId:o.folderId,orgId:o.orgId??e.orgId??void 0,sessionName:e.sessionName??I(s)},codeExportDir:o.codeExportDir,codeExportLanguage:g.language,codeExportFramework:g.framework,packTestDir:o.packTestDir}),e.log("info","PERSIST_STAGING_OK","Staging dir built",{output_dir:a}),_(a),e.log("info","PERSIST_OK","Persist complete",{output_dir:a})}catch(t){let r=t;e.log("error","PERSIST_FAILED","staging build / atomic replace failed",{error:r.message,stack:r.stack,output_dir:a}),process.stderr.write(`[persist] staging build / atomic replace failed: ${r.message}
|
|
3
3
|
`)}return{recordedTestPath:s,outputDir:a}}export{y as persistRecordedSession};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-
|
|
2
|
+
import{a,b,c,d}from"./chunk-IUQOG7Z5.js";import"./chunk-W3USRQX6.js";import"./chunk-JQ64X2TO.js";import"./chunk-JIRNI5TB.js";import"./chunk-UTM7D4PI.js";import"./chunk-W54OT2FU.js";import"./chunk-YQ5C6UDG.js";import"./chunk-DREQ3RAA.js";import"./chunk-HQ2E2XCU.js";import"./chunk-SMTBOSEJ.js";import"./chunk-FIP5L6LV.js";import"./chunk-R7KXAISS.js";import"./chunk-WMGKUERB.js";import"./chunk-NLZZLANH.js";import"./chunk-WOSANGV6.js";import"./chunk-65VANXOF.js";import"./chunk-34R7BNZ2.js";import"./chunk-IINZZ4BZ.js";import"./chunk-3F5FMH76.js";import"./chunk-XMPTFXPW.js";import"./chunk-ZU4W2QGM.js";import"./chunk-73Y6T2UK.js";import"./chunk-36N3EHW5.js";import"./chunk-EBPRPNSA.js";import"./chunk-Y6Y6RAY4.js";import"./chunk-NXAJBSIF.js";import"./chunk-C6HI6Y3S.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XRNQSXOM.js";import"./chunk-SXRHKXSE.js";import"./chunk-4JOD47QI.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-VLDCHFXF.js";import"./chunk-EZN7CF45.js";import"./chunk-7XBNMOH4.js";import"./chunk-ZCIWQHCO.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZFM77AQU.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-GMTHZUZ3.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{c as ATTACHED_STOP_RETRY_MS,d as UploadPipeline,b as packPresignEntry,a as readPackForUpload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as a,f as b,g as c,h as d,i as e,j as f}from"./chunk-
|
|
2
|
+
import{e as a,f as b,g as c,h as d,i as e,j as f}from"./chunk-LQQNPMOD.js";import"./chunk-36N3EHW5.js";import"./chunk-7YT4TTKL.js";import"./chunk-NXAJBSIF.js";import"./chunk-IGEAET7M.js";import"./chunk-CUXY6KQ2.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-XRNQSXOM.js";import"./chunk-TZXXJWHA.js";import"./chunk-SXRHKXSE.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{a as MobileHostUnsupportedError,b as MobilePreflightError,c as PACKAGE_ID_REJECTED,e as isInstallablePath,f as prepareTarget,d as toAppSpec};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as z}from"./chunk-
|
|
2
|
+
import{b as z}from"./chunk-I4WXALQR.js";import{b as te}from"./chunk-XQMWHPZI.js";import{d as K}from"./chunk-CM4CHYSN.js";import"./chunk-RHGW7B5Q.js";import{Q as q}from"./chunk-MEKPGQAM.js";import"./chunk-DZOYYWOW.js";import"./chunk-VXGN3IV7.js";import"./chunk-CB4ARIHR.js";import{j as X,k as J}from"./chunk-HCJ2N3XB.js";import"./chunk-BSRSXYDZ.js";import{b as H}from"./chunk-77ZZQJLX.js";import{a as G}from"./chunk-NLZZLANH.js";import"./chunk-WOSANGV6.js";import{e as $}from"./chunk-3F5FMH76.js";import{e as U,i as E}from"./chunk-XMPTFXPW.js";import{a as W,h as R}from"./chunk-ZU4W2QGM.js";import"./chunk-73Y6T2UK.js";import"./chunk-SMXABALN.js";import"./chunk-C6HI6Y3S.js";import"./chunk-WN5VKKJ3.js";import"./chunk-3G2LSTK5.js";import{a as Q,c as Z,e as ee}from"./chunk-P2ZQDQDB.js";import"./chunk-3BSYOCSW.js";import"./chunk-4IEQNX7F.js";import{b as V,c as Y}from"./chunk-MNBGG4H3.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-REKHAN53.js";import"./chunk-GRURFGBP.js";import"./chunk-MYZHOBS4.js";import{c as F}from"./chunk-VLDCHFXF.js";import"./chunk-ZFM77AQU.js";import"./chunk-RF37IJNN.js";import"./chunk-XZYA7DNH.js";import{B as D,Ga as B,Ha as j,f as S,x as L}from"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import{a as A}from"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import{a as _}from"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-PUVMC4PX.js";import"./chunk-B7ZX5HEN.js";import"./chunk-VZ7KXRXB.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-4QTH7VYE.js";import"./chunk-RZ4F3BHX.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-HCBYKLMW.js";import"./chunk-33DWJV67.js";import{a as I}from"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";import{existsSync as oe}from"fs";import{join as pe,relative as fe}from"path";import{existsSync as ae}from"fs";import{join as se,relative as ce}from"path";var x=4,ne=1e3;async function re(e){let a=e.trace??G("context-pull"),i=await de(e.person,e.projectId);if(i==="no_context")return{kind:"no_tests"};a(i.bulk?"tests read: bulk":"tests read: one by one (this shared project has no bulk read)");let d=i.rows.filter(t=>t.name!==null&&t.trust!=="archived");if(e.useCase!==void 0){let t=await e.person.edges(e.projectId,"verifies"),p=new Map;for(let v of t)p.set(v.src,[...p.get(v.src)??[],v.dst]);let{useCases:C,criterionUseCase:N}=await le({person:e.person,projectId:e.projectId,criteria:[...new Set(d.flatMap(v=>p.get(v.cid)??[]))]}),T=C.get(e.useCase.toLowerCase());if(T===void 0)return{kind:"no_such_use_case",useCase:e.useCase};d=d.filter(v=>(p.get(v.cid)??[]).some(ie=>N.get(ie)===T))}if(d.length===0)return{kind:"no_tests"};let f=new Map,c=new Map,s=new Map,g=(t,p,C)=>{f.set(t,{label:"test",content:C}),c.set(t,p),s.set(p,t)};if(i.bulk)for(let t of i.rows)t.name!==null&&g(t.cid,t.name,t.content);else{let t=await M(d,x,p=>e.person.mainNode(e.projectId,p.cid));for(let[p,C]of d.entries())g(C.cid,C.name,t[p].content)}let k=t=>e.person.mainNode(e.projectId,t).catch(p=>p instanceof _&&p.code==="NOT_FOUND"?null:Promise.reject(p)),r=new Set(Y(V(e.cwd)).keys()),u=d.map(t=>t.cid),m=await te({read:k,nodes:f,nameOf:c,byName:s,next:new Map,tests:u,cwd:e.cwd,...e.overwrite?{overwriteEdited:!0}:{}}),h=new Set(d.map(t=>t.name)),P=t=>{let p=f.get(s.get(t)??"")?.content.title;return typeof p=="string"&&p!==""?p:null},O=t=>ce(e.cwd,t)||t,l=t=>!ae(se(H(t),".internal","meta.json")),w=new Map,n=(t,p,C,N)=>{w.set(t,{test:t,title:P(t),...C!==void 0?{file:O(C)}:{},outcome:p,...N!==void 0?{reason:N}:{},...h.has(t)?{}:{imported:!0},...C!==void 0&&p!=="not_written"&&l(C)?{firstRun:!0}:{}})};for(let t of m.wrote)n(t.id,r.has(t.id)?"updated":"new",t.path);for(let t of m.unchanged??[])n(t.id,"unchanged",t.path);for(let t of m.overwrote??[])n(t.id,"replaced",t.path);for(let t of m.refused)n(t.id,t.kind==="edited"?"kept":"not_written",t.kind==="edited"?t.file:void 0,t.kind==="edited"?void 0:A(t));let b=[...d.map(t=>t.name),...[...w.keys()].filter(t=>!h.has(t))].flatMap(t=>w.has(t)?[w.get(t)]:[]),y=ue(b,s,f,e.cwd,a);return{kind:"pulled",tests:b,...y?{needed:y}:{},read:i.bulk?"bulk":"one_by_one"}}async function de(e,a){try{let i=await e.testsWithContent(a);return i!==null?{bulk:!0,rows:i}:{bulk:!1,rows:await e.nodes(a,"test")}}catch(i){if(i instanceof _&&(i.code==="NO_CONTEXT"||i.code==="NOT_FOUND"))return"no_context";throw i}}async function le(e){let[a,i,d,f,c]=await Promise.all([e.person.nodes(e.projectId,"usecase"),e.person.nodes(e.projectId,"scenario"),e.person.nodes(e.projectId,"ac"),e.person.edges(e.projectId,"scoped_to"),e.person.edges(e.projectId,"belongs_to")]),s=new Map,g=new Map;for(let n of[...a,...i,...d])s.set(n.cid,n.label),n.trust!==null&&g.set(n.cid,n.trust);let k=new Map;for(let n of[...f,...c])k.set(n.src,[...k.get(n.src)??[],{ecid:n.ecid,type:n.type,src:n.src,dst:n.dst,props:n.props}]);let r=new Map,u=async n=>{for(let o=n,b=0;!s.has(o)&&!r.has(o)&&b<ne;b++){let y=await e.person.mainNode(e.projectId,o).catch(t=>t instanceof _&&t.code==="NOT_FOUND"?null:Promise.reject(t));if(y===null){r.set(o,null);return}if(s.set(o,y.label),y.supersededBy===null||(r.set(o,y.supersededBy===""?null:y.supersededBy),y.supersededBy===""))return;o=y.supersededBy}},m=n=>{if(!s.has(n)&&!r.has(n))return null;let o=n;for(let b=0;r.get(o)&&b<ne;b++)o=r.get(o);return{cid:n,tip:o,superseded:o!==n||r.has(o)}};await M(e.criteria,x,u);let h=n=>m(n)?.tip??n;await M([...new Set(e.criteria.flatMap(n=>(k.get(h(n))??[]).filter(o=>o.type==="scoped_to").map(o=>o.dst)))],x,u);let P=new Set(e.criteria.flatMap(n=>(k.get(h(n))??[]).filter(o=>o.type==="scoped_to").map(o=>h(o.dst))).filter(n=>s.get(n)==="scenario"));await M([...new Set([...P].flatMap(n=>(k.get(n)??[]).filter(o=>o.type==="belongs_to").map(o=>o.dst)))],x,u);let O={edgesFrom:n=>k.get(n)??[],resolve:m,superseded:r,trust:g,nodeLabel:s},l=new Map(a.flatMap(n=>n.name!==null?[[n.cid,n.name]]:[])),w=new Map;for(let n of e.criteria){let o=m(n)?.tip,b=o===void 0||r.has(o)?null:F(O,o),y=b===null?void 0:l.get(b);y!==void 0&&w.set(n,y)}return{useCases:new Map([...l.values()].map(n=>[n.toLowerCase(),n])),criterionUseCase:w}}async function M(e,a,i){let d=new Array(e.length),f=0,c=async s=>{try{return await i(s)}catch(g){if(g instanceof _&&g.retryable)return i(s);throw g}};return await Promise.all(Array.from({length:Math.min(a,e.length)},async()=>{for(let s=f++;s<e.length;s=f++)d[s]=await c(e[s])})),d}function ue(e,a,i,d,f){try{let c=Q({cwd:d,tests:e.filter(s=>s.file!==void 0&&s.outcome!=="not_written").map(s=>Z(s.test,i.get(a.get(s.test)??"")?.content??{},se(d,s.file)))});return c.variables.length===0&&c.noStartPage.length===0?void 0:c}catch(c){f(`what the pulled tests need couldn't be read: ${ee(c)}`);return}}var me=async e=>S({url:e,basicAuth:await $()});async function We(e,a=q(),i=process.cwd(),d={}){let f=e.mode==="agent"||e.mode==="ci",c=U("ndjson","sync",{stdout:l=>a.out(l.replace(/\n$/,"")),stderr:l=>(a.err??a.out)(l.replace(/\n$/,""))}),s=(l,w)=>f?(c.event({type:"error",code:l.code,message:l.message,...D(l)}),c.done(w)):(J(l),w),g=pe(i,W),k=oe(g),r=()=>{!k&&oe(g)&&R(i)},u=await(d.entry??K)("context pull",f,void 0,z({project:e.project}));if(u!==null&&"exit"in u)return r(),u.exit;if(u===null)return s(j.pullFlagsLinkedOnly(),2);let{choice:m}=u,h=m.projectName;m.onboarded&&(f?c.event({type:"folder_linked",project_id:m.projectId,project:h}):a.out(X(h).replace(/\n$/,"")));let P;try{let l=await(d.person??me)(m.latticeUrl);P=await(d.files??re)({person:l,projectId:m.projectId,cwd:i,...e.useCase!==void 0?{useCase:e.useCase}:{},...e.overwrite?{overwrite:!0}:{}})}catch(l){return m.onboarded&&R(i),L(l,s(...ge(l,h)))}if(P.kind==="no_such_use_case")return s(j.useCaseUnknown(h,P.useCase),2);if(P.kind==="no_tests"){if(f)return c.done(0,void 0,[{cmd:"kane-cli cover --mode agent",why:"shows which use-cases need tests designed"}]);for(let l of j.noTestsYet(h))a.out(l);return 0}let O=P.tests.some(l=>l.outcome==="not_written")?1:0;if(!f){let l=B(P,{project:h,cwd:i,...e.useCase!==void 0?{useCase:e.useCase}:{}});for(let w of l)a.out(w.startsWith("\u2713 ")?I.green(w):w);return O}return we(c,P,i,e.useCase,O)}function ge(e,a){return e instanceof E?[{code:e.code,message:e.message,...e.remedy?{remedy:e.remedy}:{}},2]:e instanceof _&&e.retryable?[j.noConnection(),2]:e instanceof _&&e.status===401?[j.credentialsRejected(),2]:e instanceof _&&(e.code==="NOT_FOUND"||e.status===403||e.status===404)?[j.noAccess(a),2]:[j.pullFailed(a),1]}function we(e,a,i,d,f){for(let r of a.tests)e.event({type:"pull_test",test:r.test,title:r.title,...r.file!==void 0?{file:r.file}:{},outcome:r.outcome,...r.firstRun?{first_run:!0}:{},...r.imported?{imported:!0}:{},...r.reason!==void 0?{reason:r.reason}:{}});let c=a.needed;if(c&&(c.variables.length>0||c.noStartPage.length>0)){let r=u=>fe(i,u)||u;e.event({type:"variables_needed",file:r(c.file),variables:c.variables.map(u=>({name:u.name,...u.secret?{secret:!0}:{},...u.start_page?{start_page:!0}:{}})),no_start_page:c.noStartPage.map(u=>({test:u.test,...u.file!==void 0?{file:r(u.file)}:{}}))})}let s=a.tests.some(r=>r.outcome!=="not_written"&&r.file!==void 0),g=a.tests.some(r=>r.outcome==="kept"),k=[...s?[{cmd:"kane-cli testrun run --agent",why:"runs the tests in this folder"}]:[],...g?[{cmd:`kane-cli context pull --overwrite${d!==void 0?` --use-case ${d}`:""} --mode agent`,why:"replaces the files you changed with the project's"}]:[]];return e.done(f,void 0,k)}export{We as runProjectPull};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{Ha as n}from"./chunk-
|
|
2
|
+
import{Ha as n}from"./chunk-7HMSMAUG.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-I2MC6VVX.js";import"./chunk-RPRXRKKR.js";import"./chunk-QXQ7KVEN.js";import"./chunk-7AET4JKQ.js";import"./chunk-DJC7NTLA.js";import"./chunk-QSCXXNC2.js";import"./chunk-UEE3RZN4.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-6NFOH4AC.js";import"./chunk-7V4BQSSV.js";import"./chunk-VO66KP2W.js";import"./chunk-HHW6MRU3.js";import"./chunk-7DFBOVUB.js";import"./chunk-4I7YN6YY.js";import"./chunk-6PIIUAZF.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";function s(l,e,r){let t=l!==void 0||e.rebase===!0||e.yes===!0||e.answer.length>0,o=e.project!==void 0||e.useCase!==void 0||e.overwrite===!0;if(t&&r.kind==="remote")return n.pullLocationLinked(r.projectName);if(t&&o)return n.pullFlagsMixed();if(t)return"store";let i=r.kind==="local"||r.kind==="pick";return i&&e.project===void 0&&o?n.pullFlagsLinkedOnly():i&&!o?"store":"project"}export{s as pullRoute};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as a,c as b,d as c,e as d}from"./chunk-4QFTHUJA.js";import"./chunk-FWUPJORV.js";import"./chunk-5D7ENQTQ.js";import"./chunk-7YT4TTKL.js";import"./chunk-W6HZF56M.js";import"./chunk-Y6Y6RAY4.js";import"./chunk-NXAJBSIF.js";import"./chunk-SXRHKXSE.js";import"./chunk-NC7D7GOM.js";import"./chunk-ZCRZFAOT.js";import"./chunk-C2RUDJ46.js";import"./chunk-RZ4F3BHX.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-HJMCXSUJ.js";import"./chunk-D36V5OX6.js";import"./chunk-UR6MHSHU.js";export{a as deviceStreamMode,d as hubSessionLost,c as prepareRealDeviceRun,b as realDeviceCredentials};
|