@testmuai/kane-cli 0.10.4 → 0.10.5
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-DN7VVN3Y.js → ChatSurface-WKYH5MYP.js} +1 -1
- package/dist/{ChromeProfilePicker-TVGWXTUU.js → ChromeProfilePicker-ROQIRMWR.js} +1 -1
- package/dist/{CliFeedbackPrompt-L5ILK66U.js → CliFeedbackPrompt-55OKAT4W.js} +1 -1
- package/dist/{CliUploadProgress-IU6BQLMV.js → CliUploadProgress-NK2U3CKQ.js} +1 -1
- package/dist/{ConfigView-LU5IRRQU.js → ConfigView-7A5JTKLF.js} +1 -1
- package/dist/{EvidenceViewOffer-DNTARDEL.js → EvidenceViewOffer-U7J5ZRVK.js} +1 -1
- package/dist/{FolderPicker-6E5GE2K2.js → FolderPicker-R4QDIFTW.js} +1 -1
- package/dist/{InfoBox-SFFPLWCV.js → InfoBox-SRQ4TSUT.js} +1 -1
- package/dist/{LinksBox-6YDTIO6I.js → LinksBox-7BWLLQVR.js} +1 -1
- package/dist/{ProfilesView-6C5HJQ3Y.js → ProfilesView-TQTJR4WQ.js} +1 -1
- package/dist/{ProjectPicker-YIQIVXGK.js → ProjectPicker-A5SXNDUL.js} +1 -1
- package/dist/{SaveSessionPrompt-X3N6OGYB.js → SaveSessionPrompt-IECYZMXW.js} +1 -1
- package/dist/SingleShotApp-MN5IE6EU.js +2 -0
- package/dist/{SummaryBox-T7PDXDKS.js → SummaryBox-WFOS6GON.js} +1 -1
- package/dist/{TestMdRunView-HRJSBP2C.js → TestMdRunView-URNSXIVC.js} +1 -1
- package/dist/TestrunEvidenceTable-SZPZMW3J.js +2 -0
- package/dist/{WhoamiView-WGCWD7GP.js → WhoamiView-G6QP4SID.js} +1 -1
- package/dist/{app-download-ZS6ZMX2Z.js → app-download-UGLDWWTX.js} +1 -1
- package/dist/{assurance-job-QO4VJJCL.js → assurance-job-V5QB36WJ.js} +1 -1
- package/dist/{binary-CCCTW3QQ.js → binary-32FXH6PQ.js} +1 -1
- package/dist/{bind-JU4XPDN3.js → bind-3PB77PWJ.js} +1 -1
- package/dist/{bootstrap-BV7HAARR.js → bootstrap-A2O4UZUJ.js} +1 -1
- package/dist/{catalog-ZAROGOJA.js → catalog-P5IOIVYP.js} +1 -1
- package/dist/{catalog-client-QLHCEPPZ.js → catalog-client-LR2KPSU7.js} +1 -1
- package/dist/{changelog-6L7W76ZH.js → changelog-GKIKDJ32.js} +1 -1
- package/dist/{chunk-FTP2K6RS.js → chunk-2AHQ3D3D.js} +1 -1
- package/dist/{chunk-SZQNYDST.js → chunk-2G7UYQOW.js} +1 -1
- package/dist/{chunk-3O2RPYPM.js → chunk-2MBNAW2G.js} +1 -1
- package/dist/{chunk-SO3IXFAJ.js → chunk-2NP3THOE.js} +1 -1
- package/dist/{chunk-YZP4F23B.js → chunk-37KFCYHG.js} +1 -1
- package/dist/{chunk-Z4O5HOFX.js → chunk-3RJRCAUX.js} +3 -3
- package/dist/{chunk-PBVNX43X.js → chunk-4DM5EWEV.js} +1 -1
- package/dist/{chunk-QYWWL7M7.js → chunk-5K7PCSTP.js} +1 -1
- package/dist/{chunk-LCBDNZL3.js → chunk-5LKDOE3P.js} +1 -1
- package/dist/{chunk-ZVSZ6DIQ.js → chunk-5OFHMBZC.js} +2 -2
- package/dist/{chunk-SMSQVGLH.js → chunk-63BFLTJI.js} +1 -1
- package/dist/{chunk-PMYN3XMN.js → chunk-642GD7E6.js} +1 -1
- package/dist/{chunk-HMGM4KO6.js → chunk-66C5A2F5.js} +1 -1
- package/dist/{chunk-3HGKFRFL.js → chunk-6OL5EVRC.js} +1 -1
- package/dist/{chunk-LLDEAV3W.js → chunk-6PZ3SVWE.js} +1 -1
- package/dist/{chunk-7V6JPZBM.js → chunk-6VG2FG67.js} +1 -1
- package/dist/{chunk-Q5B54TR5.js → chunk-6WN4WSXR.js} +1 -1
- package/dist/{chunk-TO2ROHIJ.js → chunk-76MKY7FG.js} +2 -2
- package/dist/{chunk-2CJ75THZ.js → chunk-77BZTEHJ.js} +1 -1
- package/dist/chunk-7TSM2FCL.js +5 -0
- package/dist/{chunk-ECPSBI2Z.js → chunk-A5C7HIAH.js} +1 -1
- package/dist/{chunk-BV7NUIRT.js → chunk-AXOSLGQ4.js} +1 -1
- package/dist/{chunk-DJ76NDW6.js → chunk-BDZWRJAL.js} +1 -1
- package/dist/{chunk-6PURZLKM.js → chunk-BFRWZPIK.js} +1 -1
- package/dist/{chunk-MWLRLQ27.js → chunk-BLHFNL5K.js} +1 -1
- package/dist/chunk-BRWCWZE3.js +2 -0
- package/dist/{chunk-IQMJJN52.js → chunk-BZEW7CSM.js} +1 -1
- package/dist/{chunk-TXRWH6HL.js → chunk-C466XER3.js} +2 -2
- package/dist/{chunk-55W3WAAL.js → chunk-C4UME2PA.js} +1 -1
- package/dist/{chunk-ZHENGHYZ.js → chunk-CBPACEYQ.js} +1 -1
- package/dist/{chunk-IDWAG6L4.js → chunk-CJGQFKLJ.js} +1 -1
- package/dist/{chunk-4G2T54FE.js → chunk-CQBLJTDU.js} +1 -1
- package/dist/{chunk-BPTWMV5L.js → chunk-CVVUBCB7.js} +1 -1
- package/dist/{chunk-4WFN23DE.js → chunk-EIQSXD7B.js} +1 -1
- package/dist/{chunk-AFOP7DVG.js → chunk-EP4WGGMY.js} +1 -1
- package/dist/{chunk-S5PIVHPC.js → chunk-F4GWIX66.js} +1 -1
- package/dist/{chunk-GMSWZIAS.js → chunk-FHULYIG3.js} +1 -1
- package/dist/{chunk-JE5M5QIK.js → chunk-FKA5SWWF.js} +1 -1
- package/dist/{chunk-WHMCVH3T.js → chunk-FLGOQ6Q6.js} +1 -1
- package/dist/{chunk-ABNQL3PQ.js → chunk-FNBHP75S.js} +1 -1
- package/dist/{chunk-GJYMR4RT.js → chunk-FOURJ24E.js} +1 -1
- package/dist/{chunk-UZKVV3LW.js → chunk-FOUUD3LI.js} +1 -1
- package/dist/{chunk-CVVZ6NWR.js → chunk-FP6JCXOS.js} +1 -1
- package/dist/{chunk-WMIR4UXG.js → chunk-H23ZMHHC.js} +1 -1
- package/dist/{chunk-ZFKR5I3J.js → chunk-HHF7AM3D.js} +1 -1
- package/dist/{chunk-6CMBA5SG.js → chunk-HTJDMLZS.js} +1 -1
- package/dist/{chunk-DRWHVVW6.js → chunk-HY5BBSYX.js} +1 -1
- package/dist/{chunk-RG3FNO37.js → chunk-IPXITNFD.js} +1 -1
- package/dist/{chunk-EWSNJ3IX.js → chunk-IT6M7OMG.js} +1 -1
- package/dist/{chunk-5OGYXLOR.js → chunk-ITG5WMQG.js} +1 -1
- package/dist/{chunk-MZ4GTIO2.js → chunk-J3YID4A5.js} +1 -1
- package/dist/{chunk-TELSHQ3W.js → chunk-J44FV6CH.js} +1 -1
- package/dist/{chunk-JYSIPTX3.js → chunk-J5D4IGAM.js} +1 -1
- package/dist/{chunk-WB4JZ67W.js → chunk-J5QFO7LW.js} +1 -1
- package/dist/{chunk-EOLMWSLX.js → chunk-JGQ3VB44.js} +1 -1
- package/dist/{chunk-MOAZZKIZ.js → chunk-JVXEAO62.js} +1 -1
- package/dist/{chunk-YWQNZRJG.js → chunk-JYH7CTF7.js} +1 -1
- package/dist/{chunk-FH4FWIET.js → chunk-JZ7GFPKZ.js} +1 -1
- package/dist/{chunk-I3G3IUKY.js → chunk-KUSHV5SR.js} +1 -1
- package/dist/{chunk-NMCE7VR2.js → chunk-LMOW4NM5.js} +1 -1
- package/dist/{chunk-UVBPUZC4.js → chunk-LPJX5L3F.js} +1 -1
- package/dist/{chunk-4FA44D6S.js → chunk-LWP7E5FU.js} +1 -1
- package/dist/{chunk-MQU6EA44.js → chunk-LXYXCANZ.js} +1 -1
- package/dist/{chunk-5HJRYEOT.js → chunk-MAQVRBUQ.js} +1 -1
- package/dist/{chunk-4WKFM72U.js → chunk-MBNSCXVK.js} +1 -1
- package/dist/{chunk-P7V24ZXP.js → chunk-MIQ6J5YG.js} +1 -1
- package/dist/{chunk-454IWKHT.js → chunk-MUL2QFG2.js} +1 -1
- package/dist/{chunk-DBMDAWTA.js → chunk-N4XUGIAK.js} +1 -1
- package/dist/{chunk-ACBNVGVJ.js → chunk-NAUIJF72.js} +1 -1
- package/dist/{chunk-QFA6JPVE.js → chunk-NFDVDEOH.js} +2 -2
- package/dist/{chunk-BIXABKSK.js → chunk-NGBXXBHP.js} +1 -1
- package/dist/{chunk-RNKJXVG2.js → chunk-NIBNVPAE.js} +1 -1
- package/dist/{chunk-DAV4ONGS.js → chunk-NNVHWFLI.js} +1 -1
- package/dist/{chunk-QOXUGYEA.js → chunk-NZ7UCAN6.js} +1 -1
- package/dist/{chunk-HGKAUG7L.js → chunk-OPR5XIPT.js} +1 -1
- package/dist/{chunk-QXZGBYGQ.js → chunk-PCL2FYPE.js} +1 -1
- package/dist/{chunk-KJZD2ADR.js → chunk-PE3CEG6E.js} +1 -1
- package/dist/{chunk-3VSAAB2W.js → chunk-PKXWYYVK.js} +1 -1
- package/dist/{chunk-56NUPYFG.js → chunk-PSBR2LVL.js} +1 -1
- package/dist/{chunk-H6QHG62O.js → chunk-PZOQ2IQK.js} +1 -1
- package/dist/{chunk-2VLM4L3S.js → chunk-Q4QCSO6Y.js} +1 -1
- package/dist/{chunk-MNELOQ4J.js → chunk-QJ5XHVS5.js} +1 -1
- package/dist/{chunk-JJDD4HPX.js → chunk-QRUAI2ST.js} +1 -1
- package/dist/{chunk-2KPJ62RZ.js → chunk-QWEQ742S.js} +1 -1
- package/dist/{chunk-DXXHCLFC.js → chunk-R6S4EJ5R.js} +1 -1
- package/dist/{chunk-7WWCIS2B.js → chunk-RHQLDNZL.js} +1 -1
- package/dist/{chunk-X3O4VGTM.js → chunk-RM5ZVDVR.js} +1 -1
- package/dist/{chunk-4KFSSETE.js → chunk-RU3SWHRE.js} +1 -1
- package/dist/{chunk-662MCICY.js → chunk-S5UITUBB.js} +1 -1
- package/dist/{chunk-T5FQRUI2.js → chunk-SACFQNUH.js} +7 -7
- package/dist/{chunk-EG3B52WU.js → chunk-SDIHDYWT.js} +1 -1
- package/dist/{chunk-GPIVYCHQ.js → chunk-SFHDRKUX.js} +1 -1
- package/dist/{chunk-EWK3UPEN.js → chunk-SLISNOG6.js} +1 -1
- package/dist/{chunk-OSEXVHEN.js → chunk-TC2PHBPH.js} +1 -1
- package/dist/{chunk-FQ2AMM3E.js → chunk-TPCW5OU5.js} +1 -1
- package/dist/{chunk-P43YHCF3.js → chunk-UJYC2XDD.js} +1 -1
- package/dist/chunk-UV7FPIBL.js +2 -0
- package/dist/{chunk-A74JRNNX.js → chunk-UWEBI76C.js} +1 -1
- package/dist/{chunk-LV7OWLJK.js → chunk-UWQ4KXLB.js} +1 -1
- package/dist/{chunk-73EHVDL5.js → chunk-V24LUINK.js} +1 -1
- package/dist/{chunk-OX3ZAGCH.js → chunk-V3IWCGZT.js} +1 -1
- package/dist/{chunk-4QV2RL6P.js → chunk-VEE2O524.js} +1 -1
- package/dist/{chunk-3JATEWA5.js → chunk-VJRXJJML.js} +2 -2
- package/dist/{chunk-JM45SLKV.js → chunk-VKIUHHNT.js} +2 -2
- package/dist/{chunk-7KASYSFM.js → chunk-W3PQMIXE.js} +1 -1
- package/dist/{chunk-S74NLCFZ.js → chunk-WAC5WISH.js} +1 -1
- package/dist/{chunk-KLY6IQD5.js → chunk-XJV5SF3X.js} +3 -3
- package/dist/{chunk-ATCJ7EHL.js → chunk-XRJH4UF3.js} +1 -1
- package/dist/{chunk-SBW3QVHN.js → chunk-Y3RDLUH5.js} +5 -5
- package/dist/{chunk-BXAPTB2H.js → chunk-YF22VTR5.js} +3 -3
- package/dist/{chunk-TLYFHPNM.js → chunk-YLI7DQMJ.js} +2 -2
- package/dist/{chunk-BK3LWNKB.js → chunk-YQXOD7SV.js} +3 -3
- package/dist/{chunk-PHKJIJ7D.js → chunk-YTWBNACA.js} +1 -1
- package/dist/{chunk-QEBVYQNC.js → chunk-YUFXE6WU.js} +1 -1
- package/dist/{commands-X5T6YANK.js → commands-TRAUFCRZ.js} +1 -1
- package/dist/{config-F5Q6QX27.js → config-O3BWQUP4.js} +1 -1
- package/dist/{cover-cmd-PWUZU4HK.js → cover-cmd-SAWVP7TL.js} +1 -1
- package/dist/{credentials-D5KQMHCK.js → credentials-NNNODDXF.js} +1 -1
- package/dist/{deps-bundle-R7FNIV4M.js → deps-bundle-CXKBCA7W.js} +1 -1
- package/dist/{deps-resolve-IF6P6NWI.js → deps-resolve-K7XNTRZX.js} +1 -1
- package/dist/{design-chat-HYK3HNIM.js → design-chat-S4KYE6PP.js} +1 -1
- package/dist/{design-headless-DR7WB37W.js → design-headless-DDAFAJNR.js} +1 -1
- package/dist/{design-remote-TGUNEWEM.js → design-remote-UITWJ72Q.js} +2 -2
- package/dist/device-env-SBTHFSVK.js +2 -0
- package/dist/doctor-SRMLENYN.js +2 -0
- package/dist/{evidence-SRWISQMQ.js → evidence-FOWW3MOS.js} +1 -1
- package/dist/{evolve-cmd-2BALEYZU.js → evolve-cmd-MDK2H4JY.js} +1 -1
- package/dist/{evolve-remote-OHOUWO65.js → evolve-remote-4G7YFC5H.js} +1 -1
- package/dist/{explain-cmd-VTDAMXAW.js → explain-cmd-Q4NLNJFB.js} +1 -1
- package/dist/{explore-UZWQRJ7H.js → explore-MWUMVGRM.js} +1 -1
- package/dist/{explore-context-tty-PAKJVDJU.js → explore-context-tty-QLMZGYBX.js} +1 -1
- package/dist/{explore-entry-ZOPO7DBZ.js → explore-entry-QMCVGRP4.js} +4 -4
- package/dist/{explore-live-RUAAZGX4.js → explore-live-QIET6WO4.js} +1 -1
- package/dist/{explore-run-tty-DYLMHI7F.js → explore-run-tty-6UTBRCEF.js} +2 -2
- package/dist/{extract-bind-WPICR4IC.js → extract-bind-UTERWZMW.js} +3 -3
- package/dist/{extract-chat-KVUB5HPM.js → extract-chat-4WBNRVPG.js} +1 -1
- package/dist/{extract-cmd-OJ7LXSKL.js → extract-cmd-SYZX6CML.js} +2 -2
- package/dist/{extract-headless-OQJSUSG4.js → extract-headless-QBF77JWP.js} +1 -1
- package/dist/{folder-flags-MEZUAXTT.js → folder-flags-IJ556UET.js} +1 -1
- package/dist/{gaps-cmd-2R4RMWN6.js → gaps-cmd-E55OGZ7P.js} +1 -1
- package/dist/{gate-SM4HPJLA.js → gate-5UIJVMHL.js} +1 -1
- package/dist/{generate-headless-XR3RVULC.js → generate-headless-VYD2QIUO.js} +2 -2
- package/dist/{impact-cmd-EL3QSOAF.js → impact-cmd-3P6SKFJC.js} +2 -2
- package/dist/index.js +20 -20
- package/dist/{ingest-cmd-N3USC7TW.js → ingest-cmd-HMTLO5MB.js} +3 -3
- package/dist/{ingest-remote-2VKWAFJZ.js → ingest-remote-NIW5VAGW.js} +1 -1
- package/dist/install-KJDAGU2R.js +2 -0
- package/dist/{interactive-bind-F7QTQOKC.js → interactive-bind-K3ZQFHLH.js} +2 -2
- package/dist/{interactive-remote-A33J4KMP.js → interactive-remote-SGM76D6M.js} +1 -1
- package/dist/{lattice-auth-IJT542IF.js → lattice-auth-DCAVEQKY.js} +1 -1
- package/dist/{lifecycle-cmd-OKUFZKEX.js → lifecycle-cmd-Y5DH2PL5.js} +1 -1
- package/dist/{list-cmd-7OTI66MQ.js → list-cmd-RYHICCUV.js} +1 -1
- package/dist/{list-commands-FZPVH76I.js → list-commands-QFTIQE6Q.js} +1 -1
- package/dist/{list-remote-BQ4NILCA.js → list-remote-PWAQBF57.js} +1 -1
- package/dist/login-flow-W7RAVXSD.js +2 -0
- package/dist/{maintenance-cmd-BLV7K4RK.js → maintenance-cmd-JNP2KCSI.js} +1 -1
- package/dist/{mobile-prompts-5TGLJUBV.js → mobile-prompts-SP2RULD7.js} +1 -1
- package/dist/{onboarding-F4EIJ4GD.js → onboarding-YPIKXNYA.js} +1 -1
- package/dist/{persist-recorded-session-WYMOHDTB.js → persist-recorded-session-BWGA7WXR.js} +1 -1
- package/dist/{pipeline-XYM6HIDZ.js → pipeline-YE4IRKQX.js} +1 -1
- package/dist/{policy-commands-AOLVAZZD.js → policy-commands-MSJIPHDB.js} +1 -1
- package/dist/{prepare-target-P4AZWC37.js → prepare-target-G7LU4LYX.js} +1 -1
- package/dist/{pull-cmd-C4HMYD4I.js → pull-cmd-G3PVSSFP.js} +1 -1
- package/dist/{pull-route-MHW5PWDW.js → pull-route-5JQUUSU7.js} +1 -1
- package/dist/real-device-run-425XK527.js +2 -0
- package/dist/{reconcile-cmd-VXY737OT.js → reconcile-cmd-QJBYZVUB.js} +4 -4
- package/dist/{reconcile-remote-UGW2433E.js → reconcile-remote-JMV26DLX.js} +2 -2
- package/dist/{recording-banner-EPOTSMYF.js → recording-banner-VZ67EWWQ.js} +1 -1
- package/dist/{registry-WTWTFRXD.js → registry-3YMKU5GC.js} +1 -1
- package/dist/{remote-entry-SPA4CSJJ.js → remote-entry-6LQRYR5F.js} +1 -1
- package/dist/{remote-mode-QO6BDGXM.js → remote-mode-35BQUMEL.js} +1 -1
- package/dist/{remote-words-TAZT4YBT.js → remote-words-QXVFVHOB.js} +1 -1
- package/dist/{require-project-folder-WBCAVVMB.js → require-project-folder-O2XCXDRE.js} +1 -1
- package/dist/{resolve-run-intent-RBOCIYEA.js → resolve-run-intent-QCRZPYXM.js} +1 -1
- package/dist/{resolver-3BGIXYYJ.js → resolver-LWXOB7PH.js} +1 -1
- package/dist/{review-cmd-WE6I5XTY.js → review-cmd-PYU7YCAC.js} +1 -1
- package/dist/{run-remote-6Y62RWMJ.js → run-remote-PS45MTHW.js} +1 -1
- package/dist/{run-startup-gate-Q7FP2IRE.js → run-startup-gate-YBQB2JLF.js} +1 -1
- package/dist/{run-test-md-24MBKBC6.js → run-test-md-XYOCVA6F.js} +2 -2
- package/dist/session-worker.js +2 -2
- package/dist/{sessions-cmd-5NS5P4CP.js → sessions-cmd-WUWZYZJW.js} +1 -1
- package/dist/{sessions-remote-75PDRPOY.js → sessions-remote-4J7ITZB4.js} +1 -1
- package/dist/{skill-installer-7PK64TZE.js → skill-installer-54ZAFNOB.js} +1 -1
- package/dist/{store-AVYBL5HB.js → store-2F26FIUS.js} +1 -1
- package/dist/{store-choice-ZWU3PDNL.js → store-choice-ZE7AZMRC.js} +1 -1
- package/dist/{store-guard-ETUXXG7X.js → store-guard-X5FIEZWZ.js} +1 -1
- package/dist/{sync-cmd-CSTMT6E6.js → sync-cmd-TAVE44DU.js} +1 -1
- package/dist/{sync-setup-Y53K6TJ6.js → sync-setup-M65RX34Y.js} +1 -1
- package/dist/tcg-generate-OXZF7TNQ.js +2 -0
- package/dist/{testmd-actions-BE4YJ6ZZ.js → testmd-actions-4OHRME2Z.js} +1 -1
- package/dist/{testmd-sync-QZWVWTZZ.js → testmd-sync-HM24JCS7.js} +1 -1
- package/dist/token-refresh-3SEDPIXO.js +2 -0
- package/dist/{validate-basic-QWPESO74.js → validate-basic-HWDR665U.js} +1 -1
- package/dist/{version-check-EOYWTY3Z.js → version-check-DRE5KT7F.js} +1 -1
- package/dist/{view-cmd-KG4HI334.js → view-cmd-3UKV3YEX.js} +1 -1
- package/dist/{walk-session-WM4S2JMV.js → walk-session-W6OLG5NT.js} +1 -1
- package/dist/{with-telemetry-RJM3JKL6.js → with-telemetry-BF4BGK5S.js} +1 -1
- package/package.json +11 -11
- package/dist/SingleShotApp-MXNJPU6A.js +0 -2
- package/dist/TestrunEvidenceTable-OGMWTJQF.js +0 -2
- package/dist/chunk-APXJRWIJ.js +0 -2
- package/dist/chunk-V57R4X3O.js +0 -5
- package/dist/chunk-YKOZBFR3.js +0 -2
- package/dist/device-env-LZB3PKMA.js +0 -2
- package/dist/doctor-PLFEA2HM.js +0 -2
- package/dist/install-3IEM3I3X.js +0 -2
- package/dist/login-flow-BYQ7SYGB.js +0 -2
- package/dist/real-device-run-WAOWKEFJ.js +0 -2
- package/dist/tcg-generate-VQLI6NGK.js +0 -2
- package/dist/token-refresh-PZ3TOKAL.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 S,V as D}from"./chunk-
|
|
2
|
+
import{R as T,U as S,V as D}from"./chunk-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as b}from"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-2EKLTUY2.js";import{a as w}from"./chunk-73Y6T2UK.js";import{d as k}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import{a as R}from"./chunk-KM3YCIDV.js";import{a as $}from"./chunk-X66NIHT4.js";import"./chunk-6KUUSONE.js";import{g as P}from"./chunk-LJKTIKZY.js";import{i as j}from"./chunk-BXJNL22L.js";import"./chunk-2RUSXQ3O.js";import{c as A,h as Y}from"./chunk-PSBR2LVL.js";import"./chunk-GRQKMOKE.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import{b as E}from"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-GMTHZUZ3.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";import{statSync as H}from"fs";import{extname as U}from"path";import{existsSync as L}from"fs";async function I(i,n,c,o=process.cwd(),u){return $({store:b(w(o)),refs:i,opts:n,io:c,credentials:E,converters:{pdf:P,docx:j},remoteDeps:u,onRefusal:R,plugins:Y(),connections:A})}async function ie(i,n,c,o=process.cwd(),u){return(await I(i,n,c,o,u)).code}async function se(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 c=k();if(n.mode==="interactive"&&!c)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??(c?"interactive":void 0),u=o==="interactive"||o==="agent"||o==="override";if(!u&&(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:d}]=await Promise.all([import("./remote-entry-
|
|
4
|
+
`),2;{let[{remoteEntry:e},{folderFlagsOf:t},{words:d}]=await Promise.all([import("./remote-entry-6LQRYR5F.js"),import("./folder-flags-IJ556UET.js"),import("./remote-words-QXVFVHOB.js")]),l=o==="override"?d.notYet("context ingest --mode override"):void 0,g=o==="override"?d.overrideWithProject(i):void 0,s=await e("context ingest",o==="agent",void 0,{onboard:o==="interactive",...t(n),...g?{notBuilt:g}:{}});if(s!==null){if("exit"in s)return s.exit;if(l){let{printPair:p}=await import("./gate-5UIJVMHL.js");return p(l),2}let{remoteIngest:m}=await import("./ingest-remote-NIW5VAGW.js");return m({choice:s.choice,paths:i,mode:o==="agent"?"agent":o==="interactive"?"interactive":"ci",opts:n})}}let{createInterface:G}=await import("readline/promises"),y=o==="agent",r=y?(await import("./headless-io-FFM5T6KL.js")).makeHeadlessIO("ndjson","extract"):null,x=L(w(process.cwd()))?S(w(process.cwd())):null;if(x)return r?(r.event(D(x)),r.done(2,"refused")):(process.stderr.write(`error: ${x.text}
|
|
5
5
|
next: ${x.remedy}
|
|
6
6
|
`),2);let h=[],O=()=>{for(let e of h.splice(0))r.event({type:"error",message:e.message,...e.code?{code:e.code}:{}})},N=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}`})},a=r?{out:()=>{},err:(e,t)=>h.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:c,confirm:async e=>{let t=G({input:process.stdin,output:process.stdout});try{let d=await t.question(`${e} [Y/n] `);return!/^n(o)?$/i.test(d.trim())}finally{t.close()}}};if(!u){let{withTelemetry:e}=await import("./with-telemetry-
|
|
8
|
+
`),isTTY:c,confirm:async e=>{let t=G({input:process.stdin,output:process.stdout});try{let d=await t.question(`${e} [Y/n] `);return!/^n(o)?$/i.test(d.trim())}finally{t.close()}}};if(!u){let{withTelemetry:e}=await import("./with-telemetry-BF4BGK5S.js");return e("ingest",async t=>{await T(w(process.cwd()),s=>(a.err??a.out)(s));let{code:d,results:l}=await I(i,{as:n.as},a,void 0,void 0);if(l.forEach((s,m)=>{let p;try{p=i[m]?H(i[m]).size:void 0}catch{p=void 0}t?.event("ASR_INGEST",{work_item_index:m,work_item_count:l.length,format:s.media?.kind??(i[m]&&U(i[m]).slice(1).toLowerCase()||void 0),bytes:p,media_facts:s.media?.delivered})}),d!==0)return d;let g=l.filter(s=>s.status!=="unchanged").length;return g>0&&(a.err??a.out)(`landed ${g} source(s) \u2014 run kane-cli context extract to extract them`),0},{write:!0})}let C;try{C=r?await(await import("./run-channel-IIIYXOIW.js")).runWithChannel({event:r.event},()=>I(i,{as:n.as},a,void 0,void 0)):await I(i,{as:n.as},a,void 0,void 0)}catch(e){if(r)return O(),r.event({type:"error",message:e instanceof Error?e.message:String(e),code:"INGEST_FAILED"}),r.done(1,"error");throw e}let{code:v,results:f}=C;if(r&&W(f),v!==0)return r?(N(f),O(),r.done(v,v===2?"refused":"error")):v;if(f.length===0)return r?r.done(0):0;let{extractCommand:B}=await import("./extract-cmd-SYZX6CML.js"),F=[...new Set(f.map(e=>e.source_id))],_=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:f});if(_===2&&!y){let e=f.filter(t=>t.status!=="unchanged").length;e>0&&(a.err??a.out)(`note: the ${e} landed source(s) are safe \u2014 extract later with kane-cli context extract`)}return _}export{se as ingestCommand,ie as runIngestCommand,I 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-YF22VTR5.js";import"./chunk-NZ7UCAN6.js";import"./chunk-6PZ3SVWE.js";import"./chunk-PKXWYYVK.js";import"./chunk-FOURJ24E.js";import"./chunk-AXOSLGQ4.js";import"./chunk-QLGQDNA3.js";import"./chunk-IT6M7OMG.js";import"./chunk-RM5ZVDVR.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-HIUAUZNL.js";import"./chunk-CVVUBCB7.js";import"./chunk-JZ7GFPKZ.js";import"./chunk-77BZTEHJ.js";import"./chunk-3A4KK22B.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import"./chunk-6KUUSONE.js";import"./chunk-LZPYIFHZ.js";import"./chunk-GRQKMOKE.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-REKHAN53.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-TD6GCEIK.js";import"./chunk-5ORBAYTU.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-FOJHSG5M.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-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as _}from"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-2EKLTUY2.js";import{a as q}from"./chunk-73Y6T2UK.js";import{d as E}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import{a as B}from"./chunk-KM3YCIDV.js";import{d as Q,f as S}from"./chunk-TOOJTCON.js";import"./chunk-QI5RZ7LL.js";import"./chunk-4KCYNP2K.js";import"./chunk-WCIRLITM.js";import"./chunk-XDAHKZ4J.js";import{d as V}from"./chunk-4DRFMDAW.js";import"./chunk-HBGYEA3O.js";import"./chunk-LX2I4JEH.js";import"./chunk-JM6AKCN4.js";import"./chunk-3UY4WPMQ.js";import"./chunk-X66NIHT4.js";import"./chunk-BIGOLVK6.js";import"./chunk-VZJ6LUXX.js";import"./chunk-WZ3FE5MT.js";import"./chunk-W5HFUBXD.js";import"./chunk-OVB5GVRB.js";import"./chunk-JSSM2TWY.js";import"./chunk-Z55KBMYV.js";import{a as O}from"./chunk-E3C4OWSD.js";import"./chunk-LB5NIDW6.js";import"./chunk-H6IPGZTP.js";import"./chunk-LD5B3QFW.js";import"./chunk-U2VYTVKV.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import{a as N}from"./chunk-JZ7GFPKZ.js";import"./chunk-3A4KK22B.js";import"./chunk-FNUGDPTS.js";import"./chunk-6KUUSONE.js";import"./chunk-LJKTIKZY.js";import"./chunk-BXJNL22L.js";import"./chunk-2RUSXQ3O.js";import"./chunk-GRQKMOKE.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import{b as y}from"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import{e as R,h as I}from"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-GMTHZUZ3.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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-DAV4ONGS.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-WKYH5MYP.js"),import("./ScrollbackTap-4SPXGFMU.js"),import("./exit-manager-UZ7DGXS4.js"),import("./design-chat-S4KYE6PP.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-KUSHV5SR.js";import{a as zt,c as Zt}from"./chunk-OPR5XIPT.js";import{a as rn}from"./chunk-BY65QAAN.js";import{c as on}from"./chunk-FKA5SWWF.js";import"./chunk-J5QFO7LW.js";import{a as De}from"./chunk-H23ZMHHC.js";import"./chunk-AL6IAMYV.js";import{a as Ht,b as Kt,c as Gt,f as Vt,k as Jt}from"./chunk-NZ7UCAN6.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-6PZ3SVWE.js";import"./chunk-PKXWYYVK.js";import"./chunk-FOURJ24E.js";import{b as Ee}from"./chunk-JGQ3VB44.js";import"./chunk-LXYXCANZ.js";import"./chunk-3AGP2BVN.js";import{j as we,k as ne}from"./chunk-AXOSLGQ4.js";import{a as Pt,b as It}from"./chunk-FNBHP75S.js";import"./chunk-5Y2G4NC7.js";import{a as Me,b as xt}from"./chunk-QLGQDNA3.js";import{e as Ct}from"./chunk-IT6M7OMG.js";import{a as Fe,c as $t,d as jt}from"./chunk-RM5ZVDVR.js";import"./chunk-73Y6T2UK.js";import{i as rt}from"./chunk-XMPTFXPW.js";import{a as et,b as Pe}from"./chunk-SMXABALN.js";import"./chunk-V3IWCGZT.js";import{b as qe}from"./chunk-WN5VKKJ3.js";import{a as ve}from"./chunk-HCBYKLMW.js";import"./chunk-EUGFABAS.js";import"./chunk-U2VYTVKV.js";import"./chunk-HD6NR44L.js";import{b as Xt}from"./chunk-BWXLZS5O.js";import"./chunk-63EKRZKI.js";import"./chunk-3JLEDSG5.js";import"./chunk-HIUAUZNL.js";import{k as Nt,l as Mt}from"./chunk-CVVUBCB7.js";import"./chunk-JZ7GFPKZ.js";import{c as _e,e as se}from"./chunk-77BZTEHJ.js";import"./chunk-3A4KK22B.js";import"./chunk-CB344EDO.js";import"./chunk-FNUGDPTS.js";import"./chunk-LZPYIFHZ.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import{b as Ot,c as At}from"./chunk-AQ2OG2EF.js";import"./chunk-REKHAN53.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import"./chunk-TD6GCEIK.js";import"./chunk-5ORBAYTU.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.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-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import{a as st}from"./chunk-4C7WVQOD.js";import{oa as nt}from"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import{e as tt}from"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import{o as ze}from"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import{A as $e}from"./chunk-BRWCWZE3.js";import{a as fe}from"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import{c as Ze}from"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.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"./chunk-A7RJQJNT.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)(et,{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=qe(),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-IT6M7OMG.js";import"./chunk-XMPTFXPW.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.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-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as $}from"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-2EKLTUY2.js";import{a as D}from"./chunk-73Y6T2UK.js";import{e as P,h as l}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import{Ia as _,M as f,R as C,S as w,ga as x,ha as k,na as A}from"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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-F6MKJ73M.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-YMNV2MDB.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-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{a as h}from"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-2EKLTUY2.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import{d as E}from"./chunk-PUNFWBRW.js";import"./chunk-J3XOEMKO.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import{vb as m,xb as g}from"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import{f as a}from"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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-VAY4NYBX.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-6LQRYR5F.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-PWAQBF57.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,j,k}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-C466XER3.js";import"./chunk-SDIHDYWT.js";import"./chunk-SB26HQO7.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-UR6MHSHU.js";export{d as emitNdjson,b as filterByName,g as formatAuthResolutionError,h as isAgentMode,c as paginate,a as parsePagination,k as registerListCommands,e as renderTable,j as resolveCtx,f as resolveTmsBasicAuth,i 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-N4XUGIAK.js";import{d as I}from"./chunk-3AGP2BVN.js";import{f as j,g as _}from"./chunk-AXOSLGQ4.js";import{e as L}from"./chunk-IT6M7OMG.js";import"./chunk-RM5ZVDVR.js";import"./chunk-73Y6T2UK.js";import{i as R}from"./chunk-XMPTFXPW.js";import"./chunk-CVVUBCB7.js";import"./chunk-77BZTEHJ.js";import{g as D}from"./chunk-3A4KK22B.js";import"./chunk-3CFAE36M.js";import"./chunk-GBQ4K25P.js";import"./chunk-PGESS7BW.js";import"./chunk-FWGUISUG.js";import"./chunk-C3DMMAFP.js";import"./chunk-AQ2OG2EF.js";import"./chunk-REKHAN53.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-5ORBAYTU.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import{Ba as T,Ha as d,f as S,x as $,xa as N,ya as b,za as w}from"./chunk-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import{oa as y}from"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import{a as h}from"./chunk-FOJHSG5M.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-SFHDRKUX.js";import"./chunk-RFHMDQXZ.js";import"./chunk-HTJDMLZS.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-RZ4F3BHX.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-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import"./chunk-2EKLTUY2.js";import{a as u}from"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-5ORBAYTU.js";import{pb as l,qb as p,rb as _}from"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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-BLHFNL5K.js";import{a as l}from"./chunk-YDPTSDIJ.js";import"./chunk-Q4QCSO6Y.js";import"./chunk-5Y2G4NC7.js";import{a as P}from"./chunk-CJGQFKLJ.js";import"./chunk-UJYC2XDD.js";import"./chunk-SMXABALN.js";import"./chunk-6WN4WSXR.js";import"./chunk-63BFLTJI.js";import"./chunk-2G7UYQOW.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-MUL2QFG2.js";import"./chunk-QWEQ742S.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-VKIUHHNT.js";import"./chunk-TZXXJWHA.js";import"./chunk-NIBNVPAE.js";import{a as c}from"./chunk-HCBYKLMW.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import"./chunk-FOJHSG5M.js";import{a as T}from"./chunk-6YGTRKDT.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.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-EOLMWSLX.js";import{b as pe}from"./chunk-ABNQL3PQ.js";import"./chunk-5Y2G4NC7.js";import{b as ae}from"./chunk-WMGKUERB.js";import{a as ue,b as W}from"./chunk-QLGQDNA3.js";import{a as ce,b as le,d as de}from"./chunk-EWSNJ3IX.js";import{f as me,g as fe}from"./chunk-X3O4VGTM.js";import{a as ie}from"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import{d as Q,e as ne}from"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import{a as D}from"./chunk-HCBYKLMW.js";import"./chunk-ATCJ7EHL.js";import{a as se}from"./chunk-PVN64537.js";import"./chunk-7WWCIS2B.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-DXXHCLFC.js";import"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-4QTH7VYE.js";import{a as oe,b as J}from"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import{z as b}from"./chunk-YKOZBFR3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.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{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-D5KQMHCK.js"),import("./store-AVYBL5HB.js"),import("./run-startup-gate-Q7FP2IRE.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-D5KQMHCK.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-SM4HPJLA.js"),{words:p}=await import("./remote-words-TAZT4YBT.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-JGQ3VB44.js";import{b as pe}from"./chunk-FNBHP75S.js";import"./chunk-5Y2G4NC7.js";import{b as ae}from"./chunk-WMGKUERB.js";import{a as ue,b as W}from"./chunk-QLGQDNA3.js";import{a as ce,b as le,d as de}from"./chunk-IT6M7OMG.js";import{f as me,g as fe}from"./chunk-RM5ZVDVR.js";import{a as ie}from"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import{d as Q,e as ne}from"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import{a as D}from"./chunk-HCBYKLMW.js";import"./chunk-XRJH4UF3.js";import{a as se}from"./chunk-PVN64537.js";import"./chunk-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-4QTH7VYE.js";import{a as oe,b as J}from"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import{A as b}from"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.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{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-NNNODDXF.js"),import("./store-2F26FIUS.js"),import("./run-startup-gate-YBQB2JLF.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-NNNODDXF.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-5UIJVMHL.js"),{words:p}=await import("./remote-words-QXVFVHOB.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-HY5BBSYX.js";import{a as _}from"./chunk-WD52ZNQY.js";import{a as h}from"./chunk-W3USRQX6.js";import{j as P}from"./chunk-V4SL74TK.js";import{a as I,b as S}from"./chunk-77ZZQJLX.js";import"./chunk-Q4JV4U65.js";import{b as f}from"./chunk-PCL2FYPE.js";import"./chunk-5D7ENQTQ.js";import"./chunk-EHB55V23.js";import"./chunk-XDAFRUAJ.js";import"./chunk-HYJVYYAZ.js";import"./chunk-VZ7KXRXB.js";import"./chunk-BRWCWZE3.js";import"./chunk-2XW33VOK.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.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 d=e.getRunsAsStepRecords(),u=e.getFlows(),i=[],c=0;for(let t=0;t<d.length;t++){let r=d[t],l=u.slice(c,c+r.totalRunDirs);c+=r.totalRunDirs;let m=l.find(n=>n.status==="failed"||n.status==="error"),R=m?"failed":l.length===0?"skipped":"passed";i.push({rootStepIndex:t+1,status:R,duration_s:l.reduce((n,w)=>n+(w.duration??0),0),reason:m?.reason})}let D=i.some(t=>t.status==="failed")?"failed":"passed",E=new f().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:d.length,flow_count:u.length});try{await T({resolvedTest:p,sessionDir:e.sessionDir,stepRunRecords:d,outcomes:i,overallStatus:D,startedISO:e.startedAt,durationS:i.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("debug","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{c as a,d as b,e as c,f as d}from"./chunk-
|
|
2
|
+
import{c as a,d as b,e as c,f as d}from"./chunk-7TSM2FCL.js";import"./chunk-W3USRQX6.js";import"./chunk-JIRNI5TB.js";import"./chunk-UTM7D4PI.js";import"./chunk-76MKY7FG.js";import"./chunk-MAQVRBUQ.js";import"./chunk-FP6JCXOS.js";import"./chunk-PEHVBCXM.js";import"./chunk-ZIRSTOEV.js";import"./chunk-TCK7WR3M.js";import"./chunk-WMGKUERB.js";import"./chunk-QLGQDNA3.js";import"./chunk-2EKLTUY2.js";import"./chunk-IINZZ4BZ.js";import"./chunk-IT6M7OMG.js";import"./chunk-RM5ZVDVR.js";import"./chunk-JQ64X2TO.js";import"./chunk-73Y6T2UK.js";import"./chunk-XMPTFXPW.js";import"./chunk-YLI7DQMJ.js";import"./chunk-Z36KVIRR.js";import"./chunk-Q4JV4U65.js";import"./chunk-63BFLTJI.js";import"./chunk-2AHQ3D3D.js";import"./chunk-WLEWXE6L.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-FHULYIG3.js";import"./chunk-SB26HQO7.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-VKIUHHNT.js";import"./chunk-4JOD47QI.js";import"./chunk-TFSWG7AS.js";import"./chunk-JBUKEIYL.js";import"./chunk-W5EDS4DF.js";import"./chunk-XB6BJPDL.js";import"./chunk-ZCIWQHCO.js";import"./chunk-5ORBAYTU.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import"./chunk-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-GMTHZUZ3.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{c as ATTACHED_STOP_RETRY_MS,d as UploadPipeline,b as packPresignEntry,a as readPackForUpload};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{j as I}from"./chunk-
|
|
2
|
+
import{j as I}from"./chunk-C466XER3.js";import"./chunk-SDIHDYWT.js";import{a as j,c as f,n as M}from"./chunk-YLI7DQMJ.js";import"./chunk-Z36KVIRR.js";import{f as b,h as w,i as C,j as E}from"./chunk-Q4JV4U65.js";import{d as $}from"./chunk-FHULYIG3.js";import{a as v,e as h}from"./chunk-SB26HQO7.js";import"./chunk-FCD3NYOM.js";import"./chunk-3G2LSTK5.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import{a as P}from"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-UR6MHSHU.js";var k="meta/metrics-catalog.yaml",x=10,N=200;function d(r){return{out:r.out??(t=>process.stdout.write(`${t}
|
|
3
3
|
`)),err:r.err??(t=>process.stderr.write(`${t}
|
|
4
4
|
`))}}function _(r,t){let i=r.map((c,o)=>Math.max(c.length,...t.map(n=>n[o].length))),a=c=>c.map((o,n)=>n===c.length-1?o:o.padEnd(i[n])).join(" ").trimEnd();return[a(r),...t.map(a)]}function O(r,t){let i=(a,c)=>Object.values(a.metrics).map(o=>({metric:`${c}${o.name}`,catalog:a.id,catalog_version:a.version,type:o.type,unit:o.unit??null,label:o.label??null,description:o.description??null,per_test:o.per_test,range:o.range??null,values:o.values??null}));return[...i(r,""),...t?i(t,"metrics."):[]]}async function G(r,t,i){let{out:a,err:c}=d(i),o=i.load??E,n,s,u;try{if(n=(i.core??C)(),r.pack){let e=await(i.resolvePack??M)(r.pack,t);if(!e)return c(`policy metrics-list: no pack found for "${r.pack}"`),2;let g=await(i.readPackText??b)(e,k);s=g===null?null:o(g),s||c("policy metrics-list: this pack carries no metric catalog: only the built-in metrics apply"),u=s?`${s.id} catalog v${s.version} (from ${e})`:`no producer catalog (${e})`}else{let e=await(i.catalog??$(r.env));s=o(e.yaml),u=`${s.id} catalog v${s.version} (${e.source})`}}catch(e){return c(`policy metrics-list: ${e.message}`),2}let m=O(n,s);if(i.agent){for(let e of m)a(JSON.stringify(e));return 0}for(let e of _(["METRIC","TYPE","UNIT","LABEL"],m.map(g=>[g.metric,g.type,g.unit??"",g.label??""])))a(e);return a(""),a(`Built-in metrics: ${n.id} ${n.version}. Producer metrics: ${u}.`),0}function U(r,t,i){if(!i)return r??t}function T(r,t,i,a){if(r===void 0)return t;let c=Number(r);return!Number.isInteger(c)||c<1||c>i?{error:i===1/0?`${a} must be a positive integer (got "${r}")`:`${a} must be an integer in [1, ${i}] (got "${r}")`}:c}async function Y(r,t){let{out:i,err:a}=d(t),c=T(r.limit,x,N,"--limit"),o=T(r.page,1,1/0,"--page");for(let e of[c,o])if(typeof e!="number")return a(`policy list: ${e.error}`),2;let n;try{n=await t.client.listPolicies({projectId:r.projectId,search:r.search,page:o,perPage:c})}catch(e){return a(`policy list: ${e.message}`),1}let s=n.page<n.lastPage;if(t.agent){for(let e of n.policies)i(JSON.stringify({uid:e.uid,name:e.name,version:e.version,sha256:e.sha256,gates:e.gates,scope:e.scope,latest_result:e.latest_result}));return i(JSON.stringify({_meta:"page",page:n.page,per_page:n.perPage,total:n.total,has_more:s})),0}if(n.policies.length===0)return i(r.projectId?`(no policies in project ${r.projectId})`:"(no policies)"),0;let u=n.policies.map(e=>[e.uid,e.name,String(e.version),String(e.gates.total),e.latest_result?.result??"-"]);for(let e of _(["ID","NAME","VERSION","GATES","LAST RESULT"],u))i(e);i("");let m=(n.page-1)*n.perPage+n.policies.length;return i(s?`${m} of ${n.total} \u2014 next: --page ${n.page+1}`:`${m} of ${n.total}`),i("Judge with one: --policy-id <ID>"),0}async function F(r,t,i,a){let{out:c,err:o}=d(a);if(!t.projectId)return o("policy create: no project: pass --project <id> or bind one with `kane-cli config project <id>`"),2;let n=await j([r],i);if(!n.ok)return o(`policy create: ${n.message}`),2;let s=n.policies[0],u;try{u=await(a.lint??w)(s.content,{source:s.source,catalogYaml:t.catalogYaml})}catch(l){return o(`policy create: cannot lint ${s.source}: ${l.message}`),2}let m=u.filter(l=>l.severity==="error");for(let l of u)l.severity!=="error"&&o(`warn: ${f(s.source,l)}`);if(m.length)return o(`policy create: invalid policy:
|
|
5
5
|
${m.map(l=>f(s.source,l)).join(`
|
|
@@ -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-6WN4WSXR.js";import"./chunk-63BFLTJI.js";import"./chunk-2G7UYQOW.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-MUL2QFG2.js";import"./chunk-QWEQ742S.js";import"./chunk-MMBBQ4OZ.js";import"./chunk-VKIUHHNT.js";import"./chunk-TZXXJWHA.js";import"./chunk-Z7S3IWUX.js";import"./chunk-4JOD47QI.js";import"./chunk-GMTHZUZ3.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.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 te}from"./chunk-HGKAUG7L.js";import{d as K}from"./chunk-3VSAAB2W.js";import"./chunk-GJYMR4RT.js";import{b as z}from"./chunk-ACBNVGVJ.js";import{j as X,k as J}from"./chunk-BV7NUIRT.js";import{Q as q}from"./chunk-DAV4ONGS.js";import"./chunk-H6QHG62O.js";import"./chunk-ABNQL3PQ.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{b as H}from"./chunk-77ZZQJLX.js";import{a as G}from"./chunk-QLGQDNA3.js";import"./chunk-2EKLTUY2.js";import{e as $}from"./chunk-EWSNJ3IX.js";import{a as W,h as R}from"./chunk-X3O4VGTM.js";import"./chunk-73Y6T2UK.js";import{e as U,i as E}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import{a as Q,c as Z,e as ee}from"./chunk-EUGFABAS.js";import"./chunk-U2VYTVKV.js";import"./chunk-REKHAN53.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import{b as V,c as Y}from"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import{c as F}from"./chunk-TFSWG7AS.js";import"./chunk-5ORBAYTU.js";import"./chunk-ATCJ7EHL.js";import"./chunk-PVN64537.js";import{B as D,Ga as B,Ha as j,f as S,x as L}from"./chunk-7WWCIS2B.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-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-DXXHCLFC.js";import"./chunk-IQMJJN52.js";import"./chunk-QSCXXNC2.js";import"./chunk-APXJRWIJ.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-73EHVDL5.js";import"./chunk-YWQNZRJG.js";import"./chunk-YKOZBFR3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import{a as I}from"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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};
|
|
2
|
+
import{b as te}from"./chunk-OPR5XIPT.js";import{d as K}from"./chunk-PKXWYYVK.js";import"./chunk-FOURJ24E.js";import{b as z}from"./chunk-NAUIJF72.js";import{j as X,k as J}from"./chunk-AXOSLGQ4.js";import{Q as q}from"./chunk-NNVHWFLI.js";import"./chunk-PZOQ2IQK.js";import"./chunk-FNBHP75S.js";import"./chunk-BSRSXYDZ.js";import"./chunk-CB4ARIHR.js";import{b as H}from"./chunk-77ZZQJLX.js";import{a as G}from"./chunk-QLGQDNA3.js";import"./chunk-2EKLTUY2.js";import{e as $}from"./chunk-IT6M7OMG.js";import{a as W,h as R}from"./chunk-RM5ZVDVR.js";import"./chunk-73Y6T2UK.js";import{e as U,i as E}from"./chunk-XMPTFXPW.js";import"./chunk-SMXABALN.js";import"./chunk-SB26HQO7.js";import"./chunk-3G2LSTK5.js";import"./chunk-WN5VKKJ3.js";import"./chunk-HCBYKLMW.js";import{a as Q,c as Z,e as ee}from"./chunk-EUGFABAS.js";import"./chunk-U2VYTVKV.js";import"./chunk-REKHAN53.js";import"./chunk-32MFECUA.js";import"./chunk-4IEQNX7F.js";import{b as V,c as Y}from"./chunk-UVL6XQHU.js";import"./chunk-VRIZDOO5.js";import"./chunk-ZHWU6L2G.js";import"./chunk-EHB55V23.js";import{c as F}from"./chunk-TFSWG7AS.js";import"./chunk-5ORBAYTU.js";import"./chunk-XRJH4UF3.js";import"./chunk-PVN64537.js";import{B as D,Ga as B,Ha as j,f as S,x as L}from"./chunk-RHQLDNZL.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-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-OKCVG7AG.js";import"./chunk-XDAFRUAJ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-VZ7KXRXB.js";import"./chunk-4QTH7VYE.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-33DWJV67.js";import{a as I}from"./chunk-FOJHSG5M.js";import"./chunk-6YGTRKDT.js";import"./chunk-A7RJQJNT.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-RHQLDNZL.js";import"./chunk-GFLB2SHW.js";import"./chunk-2TVPA3LL.js";import"./chunk-VJGWVBZR.js";import"./chunk-22PIMG52.js";import"./chunk-4C7WVQOD.js";import"./chunk-5EAJO372.js";import"./chunk-DBMW3VUN.js";import"./chunk-KU3YHPWZ.js";import"./chunk-7V4BQSSV.js";import"./chunk-QXQ7KVEN.js";import"./chunk-R6S4EJ5R.js";import"./chunk-BZEW7CSM.js";import"./chunk-QSCXXNC2.js";import"./chunk-UV7FPIBL.js";import"./chunk-CBEMXSWF.js";import"./chunk-G4K3TP2I.js";import"./chunk-YJAQZMJT.js";import"./chunk-6PIIUAZF.js";import"./chunk-ZAQGIC33.js";import"./chunk-HYJVYYAZ.js";import"./chunk-XTQUCCJH.js";import"./chunk-BRWCWZE3.js";import"./chunk-WTMCDYR3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.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-VEE2O524.js";import"./chunk-FLGOQ6Q6.js";import"./chunk-F2F257PU.js";import"./chunk-5D7ENQTQ.js";import"./chunk-2G7UYQOW.js";import"./chunk-A5C7HIAH.js";import"./chunk-WLEWXE6L.js";import"./chunk-LMOW4NM5.js";import"./chunk-MTMHB5LF.js";import"./chunk-V24LUINK.js";import"./chunk-JYH7CTF7.js";import"./chunk-BRWCWZE3.js";import"./chunk-WMXBRC4B.js";import"./chunk-ZCRZFAOT.js";import"./chunk-RZ4F3BHX.js";import"./chunk-U5V3L5QH.js";import"./chunk-7HO4NX5W.js";import"./chunk-A7RJQJNT.js";import"./chunk-UR6MHSHU.js";export{a as deviceStreamMode,d as hubSessionLost,c as prepareRealDeviceRun,b as realDeviceCredentials};
|