@inkeep/open-knowledge 0.50.0-beta.11 → 0.50.0-beta.13
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/{abnfDiagram-VRR7QNED-DWDzSKGM.mjs → abnfDiagram-VRR7QNED-CifY53Cb.mjs} +2 -2
- package/dist/{acp-harness-probe-DRAaVrjf.mjs → acp-harness-probe-BRzTGQPW.mjs} +3 -3
- package/dist/alias-JE7RI5QX-D4n6ct-s.mjs +1 -0
- package/dist/{arc-DXUbbcxK.mjs → arc-CXI7xUjm.mjs} +2 -2
- package/dist/architecture-TIHT7OUA-BE8plkIy.mjs +1 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs → architectureDiagram-ZJ3FMSHR-bIjZfWqc.mjs} +2 -2
- package/dist/{array-BbgQa93P.mjs → array-BxvVYvCD.mjs} +1 -1
- package/dist/{awk2-BBAGSFUB-Dq-YdAGA.mjs → awk2-BBAGSFUB-mmQuqryx.mjs} +1 -1
- package/dist/{banner-Be20aAVc.mjs → banner-B6HYYw6k.mjs} +1 -1
- package/dist/{base64-4YMZCVJ5-dXz6vbV-.mjs → base64-4YMZCVJ5-CMwa-nV5.mjs} +1 -1
- package/dist/{basename-AA2KJYZQ-BhoOTAHi.mjs → basename-AA2KJYZQ-qOuF7yJE.mjs} +1 -1
- package/dist/bash-IJWYRKFO-Dv3tavm3.mjs +1 -0
- package/dist/{blockDiagram-677ZJIJ3-yJugV29e.mjs → blockDiagram-677ZJIJ3-CpbM3epf.mjs} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-BFQQLctA.mjs → c4Diagram-LMCZKHZV-BD6yUjvB.mjs} +2 -2
- package/dist/{cat-RDUMLXKC-DFuXWxVq.mjs → cat-RDUMLXKC-CDX9zihc.mjs} +1 -1
- package/dist/channel-C1EZ3Cv_.mjs +2 -0
- package/dist/{chmod-SYMGL4JA-ByMUk130.mjs → chmod-SYMGL4JA-D0kGSLaV.mjs} +1 -1
- package/dist/{chokidar-dh8zokRd.mjs → chokidar-CMbOXikG.mjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-Ck8oGqYt.mjs → chunk-2Q5K7J3B-DqdLeGRA.mjs} +2 -2
- package/dist/{chunk-2TRDZQLB-AH-I_6yN.mjs → chunk-2TRDZQLB-gp_t9c4Y.mjs} +1 -1
- package/dist/{chunk-32BRIVSS-Dwq69mnI.mjs → chunk-32BRIVSS-XYZfTStz.mjs} +2 -2
- package/dist/{chunk-3BS5SKQH-DpdUzS0R.mjs → chunk-3BS5SKQH-HZ6z6wVG.mjs} +3 -3
- package/dist/{chunk-3H6UQG3A-BWCaN15a.mjs → chunk-3H6UQG3A-BMHA6cy_.mjs} +2 -2
- package/dist/{chunk-3ZUFRYJ4-H1A1hWy1.mjs → chunk-3ZUFRYJ4-dXTnHXJv.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF-Cx89i2Y1.mjs → chunk-4GTNDTRF-C_jTvQe4.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-Dk2l1S8J.mjs → chunk-4HHKTUW3-C0THzwCu.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-CGuvvBWe.mjs → chunk-4Q4SM6WR-PC7l8Nw6.mjs} +2 -2
- package/dist/{chunk-52WLFC77-Cn-qt8h-.mjs → chunk-52WLFC77-Dx0kOaIq.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-D2U7n2ka.mjs → chunk-55VFSPNA-C6Zy4paq.mjs} +2 -2
- package/dist/{chunk-5FCAYU7R-DszODYLe.mjs → chunk-5FCAYU7R-DtUYK8N7.mjs} +2 -2
- package/dist/{chunk-5HE753X5-DDnyF29o.mjs → chunk-5HE753X5-BOOWBZ0m.mjs} +2 -2
- package/dist/{chunk-5JV3BV7I-BkeVAZnj.mjs → chunk-5JV3BV7I-CkhohPJD.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-DS9zA_YV.mjs → chunk-5QVNJEHU-Y4vDIIOv.mjs} +2 -2
- package/dist/{chunk-5TONJI2A-CzUNHQPX.mjs → chunk-5TONJI2A-CH5pkTrL.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-DBFenjXz.mjs → chunk-5V6VZH6T-DOa3BRZD.mjs} +2 -2
- package/dist/{chunk-5VM5RSS4-C8vNNqW0.mjs → chunk-5VM5RSS4-D8VF3oKI.mjs} +2 -2
- package/dist/{chunk-62RKD26F-C4qK_fA-.mjs → chunk-62RKD26F-8hloI0L5.mjs} +2 -2
- package/dist/{chunk-64BAICW3-BupSxcu5.mjs → chunk-64BAICW3-DBXBwSOH.mjs} +2 -2
- package/dist/{chunk-6Z5SFZXK-Cz0C4bhB.mjs → chunk-6Z5SFZXK-C075dOUN.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-BUVWiXkJ.mjs → chunk-74CEPOFO-CukBzgc1.mjs} +1 -1
- package/dist/{chunk-7BUUIJ7U-D7hE25H9.mjs → chunk-7BUUIJ7U-f1elfo77.mjs} +2 -2
- package/dist/{chunk-7L36YK2X-CGwYuotX.mjs → chunk-7L36YK2X-BGJaUmS5.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-DBB10vPw.mjs → chunk-7TSDKFEO-CNjAbA1P.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-BZJ8xDMo.mjs → chunk-A4HU7SVR-CCTrKdQB.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-Dej71yGP.mjs → chunk-A4JSPFCI-DajVdKHH.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-C-0S-s_f.mjs → chunk-A65PWWJC-C-hcxfZo.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-DCXJ1xmx.mjs → chunk-A7A2DBEE-qSQcWS6a.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-BQZ9JZ1A.mjs → chunk-A7ICOL4V-BnS48daC.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-D2ZOfcEz.mjs → chunk-ALLTKNUZ-h3DkPQr7.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-D-DaFB7K.mjs → chunk-APT7OOP2-D4fQkI0I.mjs} +2 -2
- package/dist/{chunk-BIQX33UG-Bmho6v3L.mjs → chunk-BIQX33UG-COfXMiTJ.mjs} +2 -2
- package/dist/{chunk-C7G6YPKG-BAX_SClW.mjs → chunk-C7G6YPKG-OX__HWxf.mjs} +2 -2
- package/dist/{chunk-CQNSW5MT-FekKjn0i.mjs → chunk-CQNSW5MT-Cb1cqQRt.mjs} +2 -2
- package/dist/{chunk-CYSBUYHQ-BftsYwRW.mjs → chunk-CYSBUYHQ-B4-ppab8.mjs} +2 -2
- package/dist/{chunk-D4J545R4-Br_5qOnE.mjs → chunk-D4J545R4-BSSyYhq_.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-3AWPydfx.mjs → chunk-D6CWQ5DW-CfOJMdG6.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-Df6An2jd.mjs → chunk-D7MEQ3VN-t7WGQTJn.mjs} +2 -2
- package/dist/{chunk-DBKNVD4L-DNQP2COw.mjs → chunk-DBKNVD4L-n6jYSppo.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-BDLVpBG2.mjs → chunk-DCAAORBQ-Csr_bach.mjs} +2 -2
- package/dist/{chunk-EEXR5ZDP-CE452hsE.mjs → chunk-EEXR5ZDP-DHDSM8Cg.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-CSFp0aUh.mjs → chunk-EIZGF4BS-CQom3CXw.mjs} +2 -2
- package/dist/{chunk-EMLP6XTP-C2yfLzVC.mjs → chunk-EMLP6XTP-B9HJTcgK.mjs} +2 -2
- package/dist/{chunk-EX3LRPZG-Chp9b-Lc.mjs → chunk-EX3LRPZG-CJXUIqRR.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-qKke1WqP.mjs → chunk-F23WWYKW-CqmJHfs_.mjs} +2 -2
- package/dist/{chunk-FWX5IMBZ-Cn1xNcn5.mjs → chunk-FWX5IMBZ-BZ5TJEkl.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-D0obXRun.mjs → chunk-GCTKCWKD-DaM9S1AG.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-CDovwI7Z.mjs → chunk-GOV5EKKI-C-RQSVxu.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-D-BGCybM.mjs → chunk-GXVXFKBA-RIRyJGvt.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-CI8IkhlS.mjs → chunk-HDQ56CKY-CREcvui6.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-BHzb4Ncl.mjs → chunk-HJQJAYMS-B-JtedZb.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-B-KESSoV.mjs → chunk-HJWBQKYG-LHJ71_Q6.mjs} +2 -2
- package/dist/{chunk-HKLCLINH-Bgw53oZd.mjs → chunk-HKLCLINH-BpO-uXL1.mjs} +3 -3
- package/dist/{chunk-HL6NGDO2-CftrHAlX.mjs → chunk-HL6NGDO2-BrwBzY5D.mjs} +2 -2
- package/dist/{chunk-HOUHSVGY-C3h3PdhC.mjs → chunk-HOUHSVGY-q17cYlbE.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-CGcvROg-.mjs → chunk-HWKDQ44K-Ca2TjRi7.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-iiTO2OC-.mjs → chunk-I57KEIP3-D7P1gGRR.mjs} +1 -1
- package/dist/{chunk-ICXQ74PX-DbJy3VdO.mjs → chunk-ICXQ74PX-DL0eOUe3.mjs} +2 -2
- package/dist/{chunk-JG7HCLWE-lUInQ_44.mjs → chunk-JG7HCLWE-OAdm-dOX.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-FzUEFQw9.mjs → chunk-JVPRLUMK-D4dgC-kP.mjs} +2 -2
- package/dist/{chunk-JWPE2WC7-iDbhfJR-.mjs → chunk-JWPE2WC7-DdfpL_yU.mjs} +2 -2
- package/dist/{chunk-K6LIBGJA-BXxOXTjI.mjs → chunk-K6LIBGJA-BjeUsobh.mjs} +2 -2
- package/dist/{chunk-KEIR6QF5-BLwvtFl6.mjs → chunk-KEIR6QF5-CSQn6Mqu.mjs} +1 -1
- package/dist/{chunk-KMEYNNUA-1KiUKBQV.mjs → chunk-KMEYNNUA-C8NOqwuc.mjs} +2 -2
- package/dist/{chunk-KRBPSX3W-YDdgrCmf.mjs → chunk-KRBPSX3W-CA3be-GR.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-D0lLKwVi.mjs → chunk-LL3S3NLB-CVMnLnle.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-DpPs5vSq.mjs → chunk-LTZRCH7N-BVgQX7ys.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-DOK-XWMd.mjs → chunk-LWEGUNWT-BHyAIqRk.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-CTA6qEdN.mjs → chunk-MDDMCKUK-VSIrKrD6.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-B2tA3LLA.mjs → chunk-MDLLFABN-DQ3dWAHi.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-CrR3MfDw.mjs → chunk-MHTUABJP-CHc_qsDr.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-d3bhRfh4.mjs → chunk-MIZPJHVH-C_BrXHPW.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-C0S_CKb1.mjs → chunk-MLXIYONF-B-vm9fnI.mjs} +1 -1
- package/dist/{chunk-MOJQB5TN-CUt4IiNv.mjs → chunk-MOJQB5TN-Da31nYdf.mjs} +2 -2
- package/dist/{chunk-MOZMSUNE-DCxwDKn7.mjs → chunk-MOZMSUNE-B5kgHl3e.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-CMoRJzYM.mjs → chunk-MYE6AGBJ-B1nnJTrG.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-Ck-SZ2Ps.mjs → chunk-NAERJDUW-Br68-Rrx.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-BxqfYu6d.mjs → chunk-NCNPKYJZ-BoPSvcFt.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-DfaBzW-k.mjs → chunk-NUYSJFDK-D3fW0z8Y.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-DC3689MV.mjs → chunk-OCLXQMOG-jjXsGHS6.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-BY3_3dNt.mjs → chunk-OCS6LSEM-O_xWB45H.mjs} +2 -2
- package/dist/{chunk-OGEWGWER-DgPAesMA.mjs → chunk-OGEWGWER-DogLxEmQ.mjs} +2 -2
- package/dist/{chunk-OSBZ3O6U-BVpvamr7.mjs → chunk-OSBZ3O6U-BL69ZkWc.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-C12xrBbG.mjs → chunk-PBXLG62G-DHYP3zNq.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-tlM6YKyg.mjs → chunk-PP6PSHAB-DJdfqM0M.mjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CIWYIjrF.mjs → chunk-PUDLZKDR-C6_GL-hZ.mjs} +2 -2
- package/dist/{chunk-PXTK5WE2-DNbfUrIy.mjs → chunk-PXTK5WE2-BjypHZuZ.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-DqdcBhD4.mjs → chunk-PYSFUGCK-1wyQjjIa.mjs} +2 -2
- package/dist/{chunk-Q4XR5HBZ-jWirJQsj.mjs → chunk-Q4XR5HBZ-CmIyTunu.mjs} +2 -2
- package/dist/{chunk-QBLGF6JB-hMrl9lGc.mjs → chunk-QBLGF6JB-Chmqe3JT.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-Cv7mIZWG.mjs → chunk-QCDB2VPH-DeT7iDe9.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-BRN048sn.mjs → chunk-QJ7O6ZN3-pLJnBWb_.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-CxzbKF59.mjs → chunk-R6QSAL5T-FbTgG420.mjs} +1 -1
- package/dist/{chunk-R7FJI6CG-bmCS8vOS.mjs → chunk-R7FJI6CG-DtnOBvxJ.mjs} +2 -2
- package/dist/{chunk-RPNGRAAP-BTpXCNpb.mjs → chunk-RPNGRAAP-zk52I-x5.mjs} +2 -2
- package/dist/{chunk-RYQCIY6F-Dt7I2-Oy.mjs → chunk-RYQCIY6F-BhxDRSmm.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-BNRfy-15.mjs → chunk-SDNKECQQ-Ba_9RHGh.mjs} +2 -2
- package/dist/{chunk-SNN4IESC-oXVGT9qo.mjs → chunk-SNN4IESC-WFycXHLb.mjs} +1 -1
- package/dist/{chunk-T56QNPHK-lY6QjpkL.mjs → chunk-T56QNPHK-ziWY7afD.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-BP7dARSe.mjs → chunk-TLSUDHID-KzcTune6.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-BFsBBT9j.mjs → chunk-TOMNU26N-GYFcPoRs.mjs} +2 -2
- package/dist/{chunk-TP4BZANS-C6KGxaUf.mjs → chunk-TP4BZANS-DGEEtypx.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-DxPX5PCF.mjs → chunk-TXBZCHCQ-DnLUMlQb.mjs} +2 -2
- package/dist/{chunk-U6XO7XAA-BHty90wb.mjs → chunk-U6XO7XAA-CAV8Xz4u.mjs} +2 -2
- package/dist/{chunk-V5MWI2OL-DApVl_z4.mjs → chunk-V5MWI2OL-CVoVr5km.mjs} +1 -1
- package/dist/{chunk-V7JOEXUC-DNM56rwe.mjs → chunk-V7JOEXUC-CY4XfSMA.mjs} +2 -2
- package/dist/{chunk-V7TAPXDL-CrGsULIH.mjs → chunk-V7TAPXDL-C2FVL1Cc.mjs} +2 -2
- package/dist/chunk-VAUOI2AC-jixxcqz-.mjs +2 -0
- package/dist/{chunk-VJFXDYWH-DXnppZsu.mjs → chunk-VJFXDYWH-CsNcAcBk.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-_4QbVbSJ.mjs → chunk-VOBGTVA6-C9eHBVbd.mjs} +2 -2
- package/dist/{chunk-VR4S4FIN-RUJ5PgRH.mjs → chunk-VR4S4FIN-C_LXRmnl.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-DG_cm0JM.mjs → chunk-VYOJP4TV-BUWMbzbv.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-DygaP6No.mjs → chunk-WKFATFPP-BENmMUsK.mjs} +2 -2
- package/dist/{chunk-WYO6CB5R-DN1R0VLx.mjs → chunk-WYO6CB5R-Brxa0zhE.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-BXjUENXL.mjs → chunk-X2AJGDEF-Bub3T_lz.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-CYJSOFLN.mjs → chunk-XKQRETAK-DHeM48F0.mjs} +2 -2
- package/dist/{chunk-XKWWSDBF-BTj39eCO.mjs → chunk-XKWWSDBF-ni5TCqSh.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-BSVT7Ttz.mjs → chunk-XVDPCNWR-DoK2rHj9.mjs} +2 -2
- package/dist/chunk-XXDRQBXY-CQXT_9AZ.mjs +2 -0
- package/dist/{chunk-Y2CYZVJY-acXC9Sbb.mjs → chunk-Y2CYZVJY-BW8wJnWV.mjs} +1 -1
- package/dist/{chunk-YMMW5UAP-CE-EQ2Is.mjs → chunk-YMMW5UAP-BQm_v5Kl.mjs} +2 -2
- package/dist/{chunk-YOTPTUD7-63S9b4Z2.mjs → chunk-YOTPTUD7-DNauVPQF.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DFPh_641.mjs → chunk-YTNYSM6T-C3I3Zko5.mjs} +2 -2
- package/dist/{chunk-YULBWSET-B6FKJjk9.mjs → chunk-YULBWSET-CkTpBwtE.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-BCgawaNX.mjs → chunk-Z6LRHWXI-BACRBvOV.mjs} +1 -1
- package/dist/{chunk-Z7JVV2SM-CTUpikzI.mjs → chunk-Z7JVV2SM-BtK-_LmQ.mjs} +2 -2
- package/dist/{chunk-ZGVPDNZ5-CyyHBEs2.mjs → chunk-ZGVPDNZ5-UmSUWBQJ.mjs} +2 -2
- package/dist/{chunk-ZIRB5QZD-K23GvNu-.mjs → chunk-ZIRB5QZD-CmUycQw3.mjs} +2 -2
- package/dist/{chunk-ZZO3UDB3-MiEiJy8J.mjs → chunk-ZZO3UDB3-Cz8Gdrsy.mjs} +2 -2
- package/dist/classDiagram-OUVF2IWQ-DkvHcHg8.mjs +2 -0
- package/dist/classDiagram-v2-EOCWNBFH-C9xEWxX3.mjs +2 -0
- package/dist/{clear-5CZ5X4YR-BICGLF_r.mjs → clear-5CZ5X4YR-BiAnnKkP.mjs} +1 -1
- package/dist/cli.mjs +61 -62
- package/dist/{column-WLPMMSTS-D0I9TpQ2.mjs → column-WLPMMSTS-B-DDJ8BB.mjs} +1 -1
- package/dist/{comm-5SLSESQG-D2Rs9Jmo.mjs → comm-5SLSESQG-Bra_WoCJ.mjs} +1 -1
- package/dist/constants-COPfVWti.mjs +2 -0
- package/dist/{cose-bilkent-JH36ORCC-B1gjUwU3.mjs → cose-bilkent-JH36ORCC-BfqwRENl.mjs} +2 -2
- package/dist/{du-WO2ENHXQ-oQRVbsEF.mjs → cp-XOYR4ABJ-DngaDNNP.mjs} +1 -1
- package/dist/{curl-47BFPSFW-Ko1BcK_R.mjs → curl-47BFPSFW-eHCZdiPu.mjs} +2 -2
- package/dist/{cut-OPC3VAGB-BAhJz0Qh.mjs → cut-OPC3VAGB-CivcnWkF.mjs} +1 -1
- package/dist/cynefin-VYW2F7L2-DPwh86oV.mjs +1 -0
- package/dist/{cynefinDiagram-TSTJHNR4-CoESbhp4.mjs → cynefinDiagram-TSTJHNR4-CpOWwyYe.mjs} +2 -2
- package/dist/{cytoscape.esm-D6l9Lhue.mjs → cytoscape.esm-S8jaq1C7.mjs} +1 -1
- package/dist/{dagre-BkPA5x_w.mjs → dagre-BaMkyuee.mjs} +2 -2
- package/dist/{dagre-VKFMJZFB-BhCtWAkc.mjs → dagre-VKFMJZFB-DwCCM0Xp.mjs} +2 -2
- package/dist/{head-HT2B6D2J-CHIR76LI.mjs → date-DD7FVA2V-jnHsShFZ.mjs} +1 -1
- package/dist/{defaultLocale-DN4qDyCE.mjs → defaultLocale-BWtuB8BB.mjs} +1 -1
- package/dist/{diagram-FQU43EPY-BdshpOzp.mjs → diagram-FQU43EPY-BQAC9zdy.mjs} +2 -2
- package/dist/{diagram-G47NLZAW-Lw1fB9_w.mjs → diagram-G47NLZAW-CuvDx6FS.mjs} +2 -2
- package/dist/{diagram-NH7WQ7WH-DnzwFaQq.mjs → diagram-NH7WQ7WH-C_jC8qIM.mjs} +2 -2
- package/dist/{diagram-OA4YK3LP-BXU-URV1.mjs → diagram-OA4YK3LP-Bn50iqJR.mjs} +2 -2
- package/dist/{diagram-WEI45ONY-CD_Zpcvk.mjs → diagram-WEI45ONY-BDhDmqvX.mjs} +2 -2
- package/dist/diff-HJF2MPDN-4GoCoHUK.mjs +1 -0
- package/dist/{dirname-LEMTZZFS-BG01-R4_.mjs → dirname-LEMTZZFS-BOmi4y1i.mjs} +1 -1
- package/dist/{dist-CMZz8-Ge.mjs → dist-C-LC4jV0.mjs} +1 -1
- package/dist/{cp-XOYR4ABJ-OfwEEWhR.mjs → du-WO2ENHXQ-B55Wl_Sp.mjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-D-647A1u.mjs → ebnfDiagram-CCIWWBDH-BrF0vS_c.mjs} +2 -2
- package/dist/echo-O45JWWI2-BQH9Rbvo.mjs +1 -0
- package/dist/env-5EPCWSXR-Dw_d1C_s.mjs +1 -0
- package/dist/{erDiagram-Q63AITRT-DviwoNdm.mjs → erDiagram-Q63AITRT-ke2iIs_t.mjs} +2 -2
- package/dist/esm-DmX1RzAi.mjs +20 -0
- package/dist/eventmodeling-45OFAUF4-DGzNexs8.mjs +1 -0
- package/dist/{execAsync-BLKHjfg7.mjs → execAsync-BA_C-_A9.mjs} +1 -1
- package/dist/{execAsync-C5ympCkf.mjs → execAsync-BqpCoDXT.mjs} +1 -1
- package/dist/{expand-DTNXU4LQ-XU44HrWp.mjs → expand-DTNXU4LQ-HW95aAXH.mjs} +1 -1
- package/dist/expr-YYCVMXE3-S1QPzhwP.mjs +1 -0
- package/dist/{date-DD7FVA2V-BGJ9-l0O.mjs → file-IGDTDPLG-Bs0TzVWz.mjs} +1 -1
- package/dist/find-DH2ALKQS-Ds4UmE23.mjs +1 -0
- package/dist/flag-coverage-6JEX67RU-BwjLnPN2.mjs +2 -0
- package/dist/flowDiagram-23GEKE2U-CP46dUl2.mjs +1 -0
- package/dist/{fold-LDSORVYE-DumfsCQO.mjs → fold-LDSORVYE-D3m5AEML.mjs} +1 -1
- package/dist/{fs-traced-DJHV_QPy.mjs → fs-traced-BUirY9_X.mjs} +3 -3
- package/dist/fs-traced-CDdByB1Z.mjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DnN5cTGV.mjs → ganttDiagram-NO4QXBWP-COgIprWR.mjs} +2 -2
- package/dist/{getMachineId-bsd-B_NuwbXS.mjs → getMachineId-bsd-CIJruWed.mjs} +2 -2
- package/dist/{getMachineId-bsd-neTWr-l3.mjs → getMachineId-bsd-CR6ADOtk.mjs} +2 -2
- package/dist/{getMachineId-darwin-BP4aVKkL.mjs → getMachineId-darwin-CsjV7rRA.mjs} +2 -2
- package/dist/{getMachineId-darwin-DKDl-xYO.mjs → getMachineId-darwin-DfwRihra.mjs} +2 -2
- package/dist/{getMachineId-linux-Bexb2iRT.mjs → getMachineId-linux-BFZntue3.mjs} +1 -1
- package/dist/{getMachineId-linux-YTb5epZX.mjs → getMachineId-linux-Db26oBf8.mjs} +1 -1
- package/dist/{getMachineId-unsupported-Ddv20ynQ.mjs → getMachineId-unsupported-D0viNi1R.mjs} +1 -1
- package/dist/{getMachineId-unsupported-DdwXS_Q3.mjs → getMachineId-unsupported-DprC99Fl.mjs} +1 -1
- package/dist/{getMachineId-win-BNx0EbPq.mjs → getMachineId-win-51ZBNzaO.mjs} +2 -2
- package/dist/{getMachineId-win-D8cNuBNk.mjs → getMachineId-win-BK2WTxBT.mjs} +2 -2
- package/dist/gitGraph-TEB2WS4Q-BmT0y88b.mjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs → gitGraphDiagram-IHSO6WYX-Dii-ToNc.mjs} +2 -2
- package/dist/{graphlib-DXQPHTiH.mjs → graphlib-BDAowsct.mjs} +1 -1
- package/dist/grep-2HUTXO5U-xFL26YrS.mjs +1 -0
- package/dist/gzip-AQXSGOVS-CSmJK8Rj.mjs +1 -0
- package/dist/{file-IGDTDPLG-sPfWVy9T.mjs → head-HT2B6D2J-CfgVUXjv.mjs} +1 -1
- package/dist/help-VVWX7SA5-DOWLYy0x.mjs +1 -0
- package/dist/history-J4QRNGRO-Dche7T8E.mjs +1 -0
- package/dist/{hostname-BK6HG2DE-Clwz043m.mjs → hostname-BK6HG2DE-DQrUsDdl.mjs} +1 -1
- package/dist/html-to-markdown-TFCECAGV-CS2kaY1h.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/info-DKCQHKI2-svktUZ6l.mjs +1 -0
- package/dist/{infoDiagram-FWYZ7A6U-CD5T72Pd.mjs → infoDiagram-FWYZ7A6U-DPvNkkYe.mjs} +2 -2
- package/dist/init-BvRbf5jC.mjs +1 -0
- package/dist/{init-D8OKme52.mjs → init-DRQyOUkz.mjs} +1 -1
- package/dist/{init-Bi1d2uLD.mjs → init-pIJddeyG.mjs} +43 -43
- package/dist/{ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs → ishikawaDiagram-FXEZZL3T-B1d77HdO.mjs} +2 -2
- package/dist/{join-GG2LDHE5-BIH_-8vD.mjs → join-GG2LDHE5-D3-YSo2O.mjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BywkQV2b.mjs → journeyDiagram-5HDEW3XC-DE8I99vn.mjs} +2 -2
- package/dist/jq-LYZFFBZB-BPcTXH--.mjs +1 -0
- package/dist/{js-exec-VXN6TZ7U-BrugyKqi.mjs → js-exec-VXN6TZ7U-14kXJVQY.mjs} +2 -2
- package/dist/{kanban-definition-HUTT4EX6-DIgH0tMg.mjs → kanban-definition-HUTT4EX6-Cw3CuKcg.mjs} +2 -2
- package/dist/{launch-json-removal-BUYuUwT_.mjs → launch-json-removal-CnIk3WE-.mjs} +2 -2
- package/dist/{lib-DuDqLKFD.mjs → lib-DD6URxCv.mjs} +1 -1
- package/dist/{lib-ozx_WsjS.mjs → lib-GfyUqUMQ.mjs} +1 -1
- package/dist/{line-eTDW_zUy.mjs → line-CJOWyLcQ.mjs} +2 -2
- package/dist/{linear-Cn1royVQ.mjs → linear-B98AeboV.mjs} +2 -2
- package/dist/{ln-4TRFBYAT-B0hi-FAf.mjs → ln-4TRFBYAT-DDI4VC8k.mjs} +1 -1
- package/dist/loader-B2V-uVIv.mjs +1 -0
- package/dist/{loader-DXsqPNjF.mjs → loader-BeDgboJk.mjs} +2 -2
- package/dist/{logger-DFxEUjvj.mjs → logger-CnfEoHs1.mjs} +2 -2
- package/dist/ls-KSXFZCWH-DtBVxnlG.mjs +1 -0
- package/dist/{lzma-CD6C2vYw.mjs → lzma-BHUlFqhy.mjs} +1 -1
- package/dist/{map-bDB3k8vA.mjs → map--Gi5y9ID.mjs} +2 -2
- package/dist/{mcp-migrate-event-B1gJf6bG.mjs → mcp-migrate-event-BsswfOLm.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-6QMuVHyp.mjs +1 -0
- package/dist/{mermaid-parser.core-uwQfwzUX.mjs → mermaid-parser.core-l2oLJb5a.mjs} +2 -2
- package/dist/{mermaid.core-BgpKViY0.mjs → mermaid.core-BW-ojLzZ.mjs} +3 -3
- package/dist/{mindmap-definition-LN4V7U3C-H3p7uT-G.mjs → mindmap-definition-LN4V7U3C-DszaH9jw.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-B7FUPgJT.mjs +1 -0
- package/dist/mv-Z6MORUFL-CiC5IjMZ.mjs +1 -0
- package/dist/{nl-U5YJDM32-BO1kUpkn.mjs → nl-U5YJDM32-D0P18t46.mjs} +1 -1
- package/dist/{od-VJEF2UR5-DxUGtlve.mjs → od-VJEF2UR5-CVvpPv2t.mjs} +1 -1
- package/dist/{open-browser-CHq05YCN.mjs → open-browser-OsCLGa-m.mjs} +2 -2
- package/dist/{ordinal-BFK2XMXf.mjs → ordinal-BAodviWw.mjs} +2 -2
- package/dist/packet-7NZHBO7P-Bwz73sSr.mjs +1 -0
- package/dist/paste-7N6AFSDS-wGVGynNz.mjs +1 -0
- package/dist/{path-CIoCsClp.mjs → path-BHIKZp6_.mjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-PBU61CXk.mjs → pegDiagram-2B236MQR-BWcVFngN.mjs} +2 -2
- package/dist/pie-RZYD4A2V-CE38luFp.mjs +1 -0
- package/dist/{pieDiagram-ENE6RG2P-ClZWrO6e.mjs → pieDiagram-ENE6RG2P-C3vtfksj.mjs} +2 -2
- package/dist/preview-B9gSOFlh.mjs +1 -0
- package/dist/{preview-BENkmrSy.mjs → preview-hjy0gI0i.mjs} +2 -2
- package/dist/printf-CX64KX2P-CaJGJKBk.mjs +1 -0
- package/dist/pwd-D4OZ7N27-BSUHCKp6.mjs +1 -0
- package/dist/{python3-DNGS4G3E-OzxoFG34.mjs → python3-DNGS4G3E-B2EbGP6l.mjs} +2 -2
- package/dist/{quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs → quadrantDiagram-ABIIQ3AL-CiO_sFTm.mjs} +2 -2
- package/dist/radar-I7S5WNFK-pz955tjg.mjs +1 -0
- package/dist/railroad-3IZDKUUU-AFlm6w4m.mjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-BTUueThU.mjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-BUaSAE_y.mjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-WqmNlxVP.mjs +1 -0
- package/dist/{railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs → railroadDiagram-RFXS5EU6-DkLolDmi.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-jTt0vAz9.mjs +1 -0
- package/dist/{repair-launch-json-D_fCoitG.mjs → repair-launch-json-BocgwEI5.mjs} +2 -2
- package/dist/repair-mcp-configs-BrBkt_hT.mjs +2 -0
- package/dist/repair-skills-BMZ7VleT.mjs +1 -0
- package/dist/repair-skills-C-3CmI5S.mjs +4 -0
- package/dist/{requirementDiagram-TGXJPOKE-H6OWjjJE.mjs → requirementDiagram-TGXJPOKE-DIdD7wig.mjs} +2 -2
- package/dist/{rev-XOSYPP45-BYe7prl1.mjs → rev-XOSYPP45-BSIdnqPx.mjs} +1 -1
- package/dist/rg-XNF3R3II-C4OSm0Dp.mjs +1 -0
- package/dist/rm-RTZG23RL--LfClUwt.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Dfu2C4rD.mjs +1 -0
- package/dist/{rough.cjs-BGkc0Naf.mjs → rough.cjs-CV0Ml7Xq.mjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-CtBVJJox.mjs → sankeyDiagram-HTMAVEWB-BCm3ffYX.mjs} +2 -2
- package/dist/{sed-JAPPVBEU-D9bYEx2I.mjs → sed-JAPPVBEU-CDtlHkuH.mjs} +1 -1
- package/dist/seq-RN5ZUASB-C9jABiAl.mjs +1 -0
- package/dist/{sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs → sequenceDiagram-DBY2YBRQ-ytgs0V7Z.mjs} +2 -2
- package/dist/server-lock-C_lebUd3.mjs +1 -0
- package/dist/{server-lock-qqJQphTS.mjs → server-lock-DbS4Uxaj.mjs} +2 -2
- package/dist/sha1sum-VJPNLNU6-DxVErSr_.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-EG_naFg1.mjs +1 -0
- package/dist/{sizeCapture-X5ZJPWSS-Izaz24Pi.mjs → sizeCapture-X5ZJPWSS-ChxCz8k2.mjs} +2 -2
- package/dist/{skill-teardown-B4kT3Fxa.mjs → skill-teardown-CH2C4nmj.mjs} +2 -2
- package/dist/{sleep-VZFPZFWA-5fZFI3Vy.mjs → sleep-VZFPZFWA-B7Ffcstc.mjs} +1 -1
- package/dist/sort-DCNRDA7U-BysvX8_9.mjs +1 -0
- package/dist/{split-SITCSYCZ-BdATfTxU.mjs → split-SITCSYCZ-BplA1_68.mjs} +1 -1
- package/dist/{sqlite3-TE5AIOTF-BIRMe0xz.mjs → sqlite3-TE5AIOTF-BbzgGp0m.mjs} +1 -1
- package/dist/{src-BPVU4Y0o.mjs → src-BbZVR6qh.mjs} +2 -2
- package/dist/src-BxyYlbvx.mjs +1 -0
- package/dist/src-DFKvCzqo.mjs +20 -0
- package/dist/{src-n7camJHB.mjs → src-Dg0jHVcz.mjs} +1 -1
- package/dist/src-y0X27yQX.mjs +2032 -0
- package/dist/start-C9fu-159.mjs +1 -0
- package/dist/start-Dtt8oak3.mjs +10 -0
- package/dist/stat-BT5A227F-CXXodVC_.mjs +1 -0
- package/dist/{stateDiagram-2N3HPSRC-pAn2bDnn.mjs → stateDiagram-2N3HPSRC-BL08Hdlz.mjs} +2 -2
- package/dist/stateDiagram-v2-6OUMAXLB-DWhomgSq.mjs +2 -0
- package/dist/strings-7PLOGTPD-Nwy6Xrva.mjs +1 -0
- package/dist/{swimlanes-5IMT3BWC-nSsjdSnj.mjs → swimlanes-5IMT3BWC-BLoq7OFB.mjs} +2 -2
- package/dist/swimlanesDiagram-G3AALYLV-Cv2Skneu.mjs +9 -0
- package/dist/{tac-SJGXQ4T2-DphHfCAY.mjs → tac-SJGXQ4T2-CDjky8wm.mjs} +1 -1
- package/dist/tail-S5ULNTJU-BeMiY4Ip.mjs +1 -0
- package/dist/{tar-MZQD7NO4-oAQoyk28.mjs → tar-MZQD7NO4-CvmpRV6c.mjs} +1 -1
- package/dist/tee-O7VXZDCO-DvqoGhss.mjs +1 -0
- package/dist/time-DEUO3QV2-wD_Yk1Gc.mjs +1 -0
- package/dist/{timeline-definition-FHXFAJF6-CnTXJoEq.mjs → timeline-definition-FHXFAJF6-B04TQQaT.mjs} +2 -2
- package/dist/{timeout-VRKMCG72-jeMAkAMc.mjs → timeout-VRKMCG72-0jgK5Ox1.mjs} +1 -1
- package/dist/touch-DX2IJOQ4-DJPgV9CW.mjs +1 -0
- package/dist/tr-2HXZRDSW-sXW7fivD.mjs +1 -0
- package/dist/tree-LYXBS7DC-CvV2g1Ry.mjs +1 -0
- package/dist/treeView-QDETBFTQ-c4b9tG2O.mjs +1 -0
- package/dist/treemap-6X3UGDF4-DrpuzrWt.mjs +1 -0
- package/dist/true-WHJNXCHG-BZzpC6GD.mjs +1 -0
- package/dist/ui-B35mCBIN.mjs +3 -0
- package/dist/ui-D9Vnv2aH.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-DNf7-ZPk.mjs +1 -0
- package/dist/uniq-SUNANL47-B-K7MChP.mjs +1 -0
- package/dist/{vennDiagram-L72KCM5P-CqTzYRfa.mjs → vennDiagram-L72KCM5P-Ceol1qSg.mjs} +2 -2
- package/dist/wardley-OPB4EBWU-B4h8UV8p.mjs +1 -0
- package/dist/{wardleyDiagram-EHGQE667-WhxG-nRT.mjs → wardleyDiagram-EHGQE667-DNEGm0iK.mjs} +2 -2
- package/dist/wc-TQB3VNOX-BSm-v72n.mjs +1 -0
- package/dist/which-XZHEH76L-BOgRrNLi.mjs +1 -0
- package/dist/whoami-DGKU3D2X-BsXYdCHU.mjs +1 -0
- package/dist/write-project-skill-BP9EVRr-.mjs +38 -0
- package/dist/xan-UD7JYIL2-BXWuwgCX.mjs +1 -0
- package/dist/xan-view-OW2TB7Z3-BGaBgg3C.mjs +1 -0
- package/dist/xargs-I6EZUCYF-DFS4BAln.mjs +1 -0
- package/dist/{xychartDiagram-FW5EYKEG-DDE7TRrw.mjs → xychartDiagram-FW5EYKEG-D7BmnN1n.mjs} +2 -2
- package/dist/yq-OAKYHSXH-T6sHAYIQ.mjs +1 -0
- package/package.json +4 -4
- package/dist/alias-JE7RI5QX-VxEqWoTW.mjs +0 -1
- package/dist/architecture-TIHT7OUA-Bl3hpxt3.mjs +0 -1
- package/dist/bash-IJWYRKFO-jaJEvAZe.mjs +0 -1
- package/dist/channel-Cjp51EO_.mjs +0 -2
- package/dist/chunk-VAUOI2AC-BdotBBDE.mjs +0 -2
- package/dist/chunk-XXDRQBXY-D1gFTzjI.mjs +0 -2
- package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +0 -2
- package/dist/constants-DLJSo46_.mjs +0 -2
- package/dist/cynefin-VYW2F7L2-C-aICrN-.mjs +0 -1
- package/dist/diff-HJF2MPDN-CQAaA8lM.mjs +0 -1
- package/dist/echo-O45JWWI2-BPosfKdD.mjs +0 -1
- package/dist/env-5EPCWSXR-DygzVPiG.mjs +0 -1
- package/dist/eventmodeling-45OFAUF4-CJqJ2hnR.mjs +0 -1
- package/dist/expr-YYCVMXE3-DI2glLwn.mjs +0 -1
- package/dist/find-DH2ALKQS-CEKaRkgJ.mjs +0 -1
- package/dist/flag-coverage-6JEX67RU-QmoBigPs.mjs +0 -2
- package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +0 -1
- package/dist/fs-traced-GKhfy5ua.mjs +0 -1
- package/dist/gitGraph-TEB2WS4Q-_V7TMkJv.mjs +0 -1
- package/dist/grep-2HUTXO5U-DG5Ulinc.mjs +0 -1
- package/dist/gzip-AQXSGOVS-D6UYmM0C.mjs +0 -1
- package/dist/help-VVWX7SA5-BbK0QLPX.mjs +0 -1
- package/dist/history-J4QRNGRO-5XgHJL_Q.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-BsVwcc4T.mjs +0 -1
- package/dist/info-DKCQHKI2-DIsEz1l_.mjs +0 -1
- package/dist/init-CqUUUDta.mjs +0 -1
- package/dist/jq-LYZFFBZB-Dlyx6Y7w.mjs +0 -1
- package/dist/loader-DAMg0xnL.mjs +0 -1
- package/dist/ls-KSXFZCWH-C_kbnNdU.mjs +0 -1
- package/dist/md5sum-INMIK4DX-DGvi_A-E.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-CMOt1jIT.mjs +0 -1
- package/dist/mv-Z6MORUFL-CqyCV_Ze.mjs +0 -1
- package/dist/packet-7NZHBO7P-B64OS2eJ.mjs +0 -1
- package/dist/paste-7N6AFSDS-BJHZcYXH.mjs +0 -1
- package/dist/pie-RZYD4A2V-B313HDTA.mjs +0 -1
- package/dist/preview-aNluJ6KN.mjs +0 -1
- package/dist/printf-CX64KX2P-841sNxew.mjs +0 -1
- package/dist/pwd-D4OZ7N27-C41v1g3B.mjs +0 -1
- package/dist/radar-I7S5WNFK-BdiwGd2_.mjs +0 -1
- package/dist/railroad-3IZDKUUU-O4nBw7jb.mjs +0 -1
- package/dist/railroad-abnf-AHOZXSZD-CDaO5Dcu.mjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-CS4l_gpR.mjs +0 -1
- package/dist/railroad-peg-LSFZ7HO6-bbLhALeS.mjs +0 -1
- package/dist/readlink-MI4GCHJF-CQlQ03aa.mjs +0 -1
- package/dist/repair-mcp-configs-C3cLZGEE.mjs +0 -2
- package/dist/repair-skills-BKjhKhUN.mjs +0 -4
- package/dist/repair-skills-DN4OicpR.mjs +0 -1
- package/dist/rg-XNF3R3II-CmxxmmUf.mjs +0 -1
- package/dist/rm-RTZG23RL-Bl5s9ltJ.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-C1ccje2_.mjs +0 -1
- package/dist/seq-RN5ZUASB-CFySG-xk.mjs +0 -1
- package/dist/server-lock-rwNc7NVh.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-DgLJCjAg.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-DZ42pgY3.mjs +0 -1
- package/dist/sort-DCNRDA7U-RFl0HYBr.mjs +0 -1
- package/dist/src-BB2_Ksle.mjs +0 -2032
- package/dist/src-DyAkipH8.mjs +0 -1
- package/dist/src-Joe5Ft2d.mjs +0 -20
- package/dist/start-BUeLlQd8.mjs +0 -1
- package/dist/start-CYM9hyHf.mjs +0 -4
- package/dist/stat-BT5A227F-Dd-OyLQQ.mjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +0 -2
- package/dist/strings-7PLOGTPD-v3qEuUEm.mjs +0 -1
- package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +0 -9
- package/dist/tail-S5ULNTJU-D6qRQZwV.mjs +0 -1
- package/dist/tee-O7VXZDCO-odVO6Wjw.mjs +0 -1
- package/dist/time-DEUO3QV2-CviQF55F.mjs +0 -1
- package/dist/touch-DX2IJOQ4-CyiMRd7b.mjs +0 -1
- package/dist/tr-2HXZRDSW-CCce6lU_.mjs +0 -1
- package/dist/tree-LYXBS7DC-pAC77Hbt.mjs +0 -1
- package/dist/treeView-QDETBFTQ-BCAjffnq.mjs +0 -1
- package/dist/treemap-6X3UGDF4-Dv-54pyt.mjs +0 -1
- package/dist/true-WHJNXCHG-Dzdq7R5f.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-B06mOUPB.mjs +0 -1
- package/dist/uniq-SUNANL47-BIgIOFSf.mjs +0 -1
- package/dist/wardley-OPB4EBWU-DSvo57UC.mjs +0 -1
- package/dist/wc-TQB3VNOX-9RyJlZXB.mjs +0 -1
- package/dist/which-XZHEH76L-SMFjHhz2.mjs +0 -1
- package/dist/whoami-DGKU3D2X-BIUooLXE.mjs +0 -1
- package/dist/write-project-skill-BD0rO6kN.mjs +0 -56
- package/dist/xan-UD7JYIL2-DAuAMQ0H.mjs +0 -1
- package/dist/xan-view-OW2TB7Z3-CwG0zS53.mjs +0 -1
- package/dist/xargs-I6EZUCYF-INAdKqnR.mjs +0 -1
- package/dist/yq-OAKYHSXH-C1fFFHD4.mjs +0 -1
- /package/dist/{expansion-VBDYWVZR-CpX0YZMb.mjs → expansion-VBDYWVZR-C0SApT6U.mjs} +0 -0
package/dist/src-DyAkipH8.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-c73kUNxd.mjs";import"./write-project-skill-BD0rO6kN.mjs";import"./src-Joe5Ft2d.mjs";import"./acp-harness-probe-DRAaVrjf.mjs";import"./init-Bi1d2uLD.mjs";import{n as e}from"./loader-DXsqPNjF.mjs";import"./skill-teardown-B4kT3Fxa.mjs";import"./preview-BENkmrSy.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
|
package/dist/src-Joe5Ft2d.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{H as t,U as n,ct as r}from"./sleep-DdJljU3h.mjs";import{Ga as i,Ns as a,Ps as o,X as s,Z as c}from"./src-c73kUNxd.mjs";import{Jr as l,Tn as u,_i as d,at as f,it as p,ot as m,rt as h}from"./src-BB2_Ksle.mjs";import{D as ee,F as g,I as _,k as v}from"./fs-traced-DJHV_QPy.mjs";import{C as y,S as b,d as x,y as S}from"./server-lock-qqJQphTS.mjs";import{t as C}from"./yazl-DZr4PyKA.mjs";import{m as w,p as te,v as T}from"./write-project-skill-BD0rO6kN.mjs";import{c as ne}from"./colors-BsmVIwfM.mjs";import{n as re}from"./acp-harness-probe-DRAaVrjf.mjs";import{E,T as D,_ as ie,o as O,w as k,x as A,y as j}from"./init-Bi1d2uLD.mjs";import{n as ae}from"./constants-DLJSo46_.mjs";import{t as M}from"./is-object-ByG7RnjH.mjs";import"./loader-DXsqPNjF.mjs";import"./skill-teardown-B4kT3Fxa.mjs";import"./preview-BENkmrSy.mjs";import{execSync as oe,spawnSync as se}from"node:child_process";import{basename as N,dirname as P,join as F,relative as ce,resolve as I,sep as le}from"node:path";import{cpSync as ue,createWriteStream as de,existsSync as L,lstatSync as fe,mkdirSync as R,mkdtempSync as pe,readFileSync as z,readdirSync as B,readlinkSync as me,rmSync as V,statSync as he,writeFileSync as H}from"node:fs";import{arch as ge,freemem as _e,homedir as U,hostname as ve,platform as ye,release as be,tmpdir as xe,totalmem as Se,type as Ce,uptime as we}from"node:os";import"node:fs/promises";import{createHash as Te}from"node:crypto";var W=r();const Ee=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function De(e,t,n=u){if(e!==void 0&&!Ee.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Oe=null;function ke(e){Oe=e}function Ae(){return Oe??process.cwd()}function je(){return F(U(),`.ok`,`bug-reports`)}function Me(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=je(),r=`${t}-bugreport`,i=F(n,`${r}.zip`);for(let e=2;L(i);e+=1)i=F(n,`${r}-${e}.zip`);return i}function Ne(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let e=z(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return L(F(e,`.ok`))?Te(`sha256`).update(I(e)).digest(`hex`).slice(0,12):null}function Pe(){let e={timestamp:new Date().toISOString(),platform:ye(),osType:Ce(),osRelease:be(),hostname:`[redacted]`,uptime:we(),freeMem:_e(),totalMem:Se(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=oe(`sw_vers -productVersion 2>/dev/null`,l({encoding:`utf8`})).trim()}catch{}try{let t=F(__dirname,`..`,`..`,`package.json`);L(t)&&(e.okVersion=JSON.parse(z(t,`utf8`)).version)}catch{}return e}const Fe=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function G(e){let t=N(e);return Fe.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function Ie(e,t){return ze(e,t).files}const Le=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function Re(e,t=re){let n=F(e,`${t}.ShipIt`);return L(n)?Le.map(e=>F(n,e)).filter(e=>L(e)):[]}function ze(e,t){if(!L(t))return{files:[],excludedByProjectSlug:0};let n=B(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>F(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(G),i=[],a=r.filter(t=>{try{return z(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!G(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function Be(e){let t=F(e,`.ok`,`local`);return L(t)?{files:[`server.lock`,`last-spawn-error.log`,s].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Ve(e){let t=F(e,`.ok`,`local`,`logs`);return L(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function He(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=o(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function Ue(e){for(let t of e.files)try{He({zipfile:e.zipfile,name:`${e.prefix}/${N(t)}`,content:z(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function We(t){let{redact:n,outputPath:r,logger:i}=t,o=t.userLogsDir??F(U(),`.ok`,`logs`),s=t.projectDir?Ne(t.projectDir,i):null;R(P(r),{recursive:!0}),i?.info({projectSlug:s},`gathering diagnostic data`);let c=Pe();c.desktop=t.desktop??null,c.language=t.language??null;let{files:l,excludedByProjectSlug:u}=ze(s,o),{files:d}=t.projectDir?Be(t.projectDir):{files:[]},{files:f}=t.projectDir?Ve(t.projectDir):{files:[]},p=t.shipItLogFiles??[];i?.info({logFileCount:l.length,logFilesExcludedByProjectSlug:u,lockFileCount:d.length,localSinkFileCount:f.length,shipItLogFileCount:p.length},`files collected`);let m=[],h=[],{ZipFile:ee}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),g=new ee;Ue({zipfile:g,files:[...l,...p],prefix:`logs`,redact:n,bundleFiles:h,redactions:m,logger:i}),Ue({zipfile:g,files:d,prefix:`lockdir`,redact:n,bundleFiles:h,redactions:m,logger:i}),Ue({zipfile:g,files:f,prefix:`local-logs`,redact:n,bundleFiles:h,redactions:m,logger:i});for(let e of t.extraFiles??[])try{let t=z(e.sourcePath),n=`extra/${e.zipName??N(e.sourcePath)}`;g.addBuffer(t,n),h.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&He({zipfile:g,name:`note.txt`,content:t.note,redact:n,bundleFiles:h,redactions:m});let _=JSON.stringify(c,null,2);g.addBuffer(Buffer.from(_,`utf8`),`sysinfo.json`),h.push(`sysinfo.json`);let v={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:s,files:h,redactions:m,sysinfo:c};g.addBuffer(Buffer.from(JSON.stringify(v,null,2),`utf8`),`MANIFEST.json`);let y=m.reduce((e,t)=>e+t.lineCount,0),b=new Set(p.map(e=>`logs/${N(e)}`)),x=h.filter(e=>b.has(e)),S=s?h.filter(e=>e.startsWith(`logs/`)&&!G(e)&&!b.has(e)):[],C=[`# Bug Report Bundle`,``,`Generated: ${v.generatedAt}`,`Project: ${s??`(unscoped)`}`,`Discipline version: ${v.disciplineVersion}`,``,`## Contents`,``,...h.map(e=>`- ${e}`),``,`## Privacy`,``,...S.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...S.map(e=>`- ${e}`),``]:[],...x.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...x.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${a.join(`, `)}`,y>0?`${y} line(s) were scrubbed across ${m.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
|
|
2
|
-
`);g.addBuffer(Buffer.from(C,`utf8`),`README.md`),g.end();let w=de(r);return g.outputStream.pipe(w),await new Promise((e,t)=>{w.on(`close`,e),w.on(`error`,t)}),i?.info({bundlePath:r,fileCount:h.length,redactionCount:y},`bundle written`),{zipPath:r,summary:{projectSlug:s,files:h,redactions:m,redactedLineCount:y,generatedAt:v.generatedAt}}}var Ge=e(C(),1),K=e(ne(),1);function Ke(e){return _({absPath:v(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function qe({home:e=U(),env:r=process.env}={}){let a=Ke(e),{override:o,preferenceList:s}=ee(r),{locale:c,source:l}=i({override:o,storedPreference:a,supportedLocales:n,preferenceList:s,autoDetectableLocales:t});return{preference:a,locale:c,source:l,systemLanguages:s}}function Je(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return Je(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!Ye(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Xe(e,t){let n=z(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
3
|
-
`),i=n.split(`
|
|
4
|
-
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}H(e,r?`${a.join(`
|
|
5
|
-
`)}\n`:a.join(`
|
|
6
|
-
`))}function Ze(e,t){let n=z(e,`utf-8`);if(n.trim().length!==0)try{let r=q(JSON.parse(n),t),i=n.endsWith(`
|
|
7
|
-
`)?`
|
|
8
|
-
`:``;H(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Je(n,t.contentDir);r!==n&&H(e,r)}}function Qe(e,t){let n=z(e,`utf-8`),r=Je(n,t.contentDir);r!==n&&H(e,r)}function $e(e){try{return B(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>F(e,t.name))}catch{return[]}}const et=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function tt(e){return/\.log\.\d+$/.test(e)}function nt(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||tt(e)}function rt(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of $e(F(e.stagingDir,n)))nt(r)?Xe(r,t):r.endsWith(`.json`)?Ze(r,t):Qe(r,t);for(let n of $e(F(e.stagingDir,`state`))){let e=N(n);n.endsWith(`.jsonl`)?Xe(n,t):et.has(e)?Ze(n,t):Qe(n,t)}}const it=[`.ok`,`local`,`telemetry`],at=[`.ok`,`local`,`logs`],ot=[`.ok`,`local`,`loss-capture`],st=`spans-current.jsonl`,ct=`spans-prev.jsonl`,lt=`server-current.jsonl`,ut=`server-prev.jsonl`,dt=`loss-current.jsonl`,ft=`loss-prev.jsonl`;function pt(e){return F(e,...it,st)}function mt(e){return F(e,...it,ct)}function ht(e){return F(e,...at,lt)}function gt(e){return F(e,...at,ut)}function _t(e){return F(e,...ot,dt)}function vt(e){return F(e,...ot,ft)}const yt=1e3;async function bt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}async function xt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}async function St(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}function Ct(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
|
|
9
|
-
`)}\n`:null}catch{return null}}function wt(e){let t=F(e,`.git`,`ok`);if(!L(t))return null;let n=se(`git`,[`-C`,t,`log`,`--oneline`,`-50`],l({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Tt(e){let t=F(e,`.git`,`ok`);if(!L(t))return null;let n=se(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],l({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Et(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function Dt(){return{nodeVersion:process.version,platform:ye(),arch:ge()}}function Ot(){return process.env.OTEL_SDK_DISABLED===`false`}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function kt(e){if(!L(e))return{};let t;try{t=(0,W.parse)(z(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!J(t))return{};let n=t.telemetry;if(!J(n))return{};let r=n.localSink;return J(r)?r:{}}function At(e){return typeof e==`boolean`?e:void 0}function jt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y(e){if(J(e))return jt(e.maxBytes)}function Mt(e){let t=kt(v(`project`,e)),n=kt(v(`project-local`,e));return{enabled:At(n.enabled)??At(t.enabled)??!0,spansMaxBytes:Y(n.spans)??Y(t.spans)??52428800,logsMaxBytes:Y(n.logs)??Y(t.logs)??26214400}}function Nt(e){return Te(`sha256`).update(e).digest(`hex`)}function Pt(e){let t=z(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function Ft(e){let t=z(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function X(e,t){if(!L(e))return!1;try{return R(P(t),{recursive:!0}),ue(e,t),!0}catch{return!1}}function It(e){let t=[],n=e=>{let r=B(e,{withFileTypes:!0});for(let i of r){let r=F(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Lt=new Set([`.jsonl`]);function Rt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Lt.has(e.slice(t))}const zt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function Bt(e){if(tt(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:zt.has(e.slice(t))}function Vt(e){let t=[];for(let n of It(e)){let r=Ht(e,n);if(!Bt(r))continue;let{redacted:i,patterns:a,lineCount:s}=o(z(n,`utf-8`));a.length!==0&&(H(n,i),t.push({file:r,lineCount:s,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Ht(e,t){return ce(e,t).split(le).join(`/`)}async function Ut(e){let t=I(e.contentDir),n=I(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??bt,a=r.fetchAgentEffects??xt,o=r.fetchWatcherRecent??St,l=r.readShadowHead??wt,u=r.readCheckpointRefs??Tt,d=r.now??(()=>new Date),f=r.okVersion??(()=>ae),p=r.readDesktopEnv??Et,m=r.readLanguage??qe,h=r.readRuntime??Dt,ee=r.isOtlpPushEnabled??Ot,g=pe(F(xe(),`ok-bundle-`));try{R(F(g,`telemetry`),{recursive:!0}),R(F(g,`logs`),{recursive:!0}),R(F(g,`state`),{recursive:!0}),X(pt(n),F(g,`telemetry`,st)),X(mt(n),F(g,`telemetry`,ct)),X(ht(n),F(g,`logs`,lt)),X(gt(n),F(g,`logs`,ut));for(let t of e.userLogFiles??[])X(t,F(g,`logs`,N(t)));let _=F(n,`.ok`,`local`),v=F(_,`server.lock`),y=`not-running`,b=`no server.lock`,x=null;if(L(v)){X(v,F(g,`state`,`server.lock`));try{let e=z(v,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?x=t.port:b=`lock present but no port`}catch{b=`lock present but unparseable`}}if(x!==null){let e=await i(x);e===null?b=`agent-presence endpoint at :${x} unreachable`:(H(F(g,`state`,`agent-presence.json`),e),y=`running`,b=``);let t=await a(x);t!==null&&H(F(g,`state`,`agent-effects.json`),t);let n=await o(x);if(n!==null){let e=Ct(n);e!==null&&H(F(g,`state`,`watcher-recent.jsonl`),e)}}let S=l(t);S!==null&&H(F(g,`state`,`shadow-head.txt`),S);let C=u(t);C!==null&&H(F(g,`state`,`checkpoint-refs.txt`),C),X(_t(n),F(g,`state`,dt)),X(vt(n),F(g,`state`,ft)),X(F(_,`last-spawn-error.log`),F(g,`state`,`last-spawn-error.log`)),X(F(_,c),F(g,`state`,c)),X(F(_,s),F(g,`state`,s));let w=h(),te=p(),T=m(),ne={ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:te,language:T}};H(F(g,`state`,`runtime.json`),`${JSON.stringify(ne,null,2)}\n`);let re=y===`running`?`running
|
|
10
|
-
`:`not-running (${b})\n`;if(H(F(g,`state`,`server-status.txt`),re),e.processDir&&L(e.processDir)){let t=F(g,`process`);R(t,{recursive:!0}),ue(e.processDir,t,{recursive:!0})}let E=e.redact===!0;E&&rt({stagingDir:g,contentDir:t}),e.note&&H(F(g,`note.txt`),e.note);let D=null;e.scrubSecrets===!0&&(D=Vt(g));for(let t of e.extraFiles??[])X(t.sourcePath,F(g,`extra`,t.zipName??N(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let ie=Mt(n),O=It(g),k=[],A=0,j=0;for(let e of O){let t=Ht(g,e),n=he(e).size,r=Rt(t)?Pt(e):0;k.push({path:t,bytes:n,lines:r}),A+=n,t.startsWith(`telemetry/`)&&Rt(t)&&(j+=Ft(e))}let ae={applied:E};D!==null&&(ae.secretScrub=D);let M={schemaVersion:2,createdAt:d().toISOString(),ok:{version:f(),nodeVersion:w.nodeVersion,platform:w.platform,arch:w.arch},host:{desktop:te,language:T},contentDir:{pathSha256:Nt(t),absolutePath:E?`<CONTENT_DIR>`:t},telemetry:{localSink:ie,otlpPushEnabled:ee()},redaction:ae,serverStatus:y,files:k};H(F(g,`manifest.json`),`${JSON.stringify(M,null,2)}\n`);let oe=O.some(e=>{try{return z(e,`utf-8`).includes(t)}catch{return!1}}),se={totalBytes:A,fileCount:k.length,docNameCount:j,contentDirVisible:oe,redacted:E},P=!1;return{stagingDir:g,manifest:M,summary:se,cleanup:()=>{P||(P=!0,V(g,{recursive:!0,force:!0}))}}}catch(e){throw V(g,{recursive:!0,force:!0}),e}}async function Wt(e){let{collected:t,outputPath:n}=e,r=P(n);if(!L(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Ge.ZipFile,a=It(t.stagingDir);for(let e of a){let n=Ht(t.stagingDir,e);i.addFile(e,n)}i.end();let o=de(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function Gt(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let t=(0,W.parse)(z(n,`utf-8`)),r=M(t)?t.content:void 0,i=M(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return I(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return I(e)}async function Kt(e,t,n,r){let i=Ne(t,e.logger),a=await Ut({contentDir:Gt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...Ie(i,e.userLogsDir??F(U(),`.ok`,`logs`)),...Re(e.cachesDir??F(U(),`Library`,`Caches`))],deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{R(P(e.outputPath),{recursive:!0}),await Wt({collected:a,outputPath:e.outputPath});let t=a.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:i,files:a.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:a.manifest.createdAt}}}finally{a.cleanup()}}async function qt(e){let{projectDir:t}=e,n=e.readDesktopEnv??Et,r=e.readLanguage??qe;if(e.level===`full`&&t!==void 0)return Kt(e,t,n,r);let{zipPath:i,summary:a}=await We({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:Re(e.cachesDir??F(U(),`Library`,`Caches`)),logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n(),language:r()});return{zipPath:i,summary:{level:e.level,systemWide:t===void 0,projectSlug:a.projectSlug,files:a.files,redactions:a.redactions,redactedLineCount:a.redactedLineCount,generatedAt:a.generatedAt}}}function Z(e,t,n={}){let r=x(e,t);if(!L(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(z(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!y(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??b)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??S())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??ve();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function Jt(e){return e.replace(/:\d+$/,``)}function Yt(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Jt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Jt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Jt(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}const Xt=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Zt(e){return F(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Qt={existsSync:e=>L(e),readFileSync:(e,t)=>z(e,t),lstatSync:e=>fe(e),readlinkSync:e=>me(e)};function $t(e,t=Qt){let n=Zt(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function en(e){let t=e.replace(Xt,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function tn(e,t,n=Qt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function nn(e){return te(e)||w(e)||A(e)}const rn=10*1024*1024;function an(e,t,n,r){let i=O(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!nn(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(V(a,{force:!0}),{kind:`removed`}):e.format===`toml`?cn(a,o):e.format===`yaml`?sn(a,e.topLevelKey,o):on(a,e.topLevelKey,e.serverMapSubKey,o)}function on(e,t,n,r){let i;try{i=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>rn)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=E(i,ie(t,n,r));return o?(g(e,a,{mode:k(e)}),{kind:`removed`}):{kind:`not-present`}}function sn(e,t,n){let r;try{r=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>rn)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,W.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),l=D(a);a.trim()===``||a.endsWith(`
|
|
11
|
-
`)?c.endsWith(`
|
|
12
|
-
`)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
|
|
13
|
-
`).replace(/\n/g,`\r
|
|
14
|
-
`));let u=`${i?``:``}${c}`;return u!==r&&g(e,u,{mode:k(e)}),{kind:`removed`}}function cn(e,t){let n=j();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=z(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=D(a),s=a.trim()===``||a.endsWith(`
|
|
15
|
-
`),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
|
|
16
|
-
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
|
|
17
|
-
`).replace(/\n/g,`\r
|
|
18
|
-
`));let u=`${i?``:``}${l}`;return u!==r&&g(e,u,{mode:k(e)}),{kind:`removed`}}function ln(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function un(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function dn(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:p(r),command:r,isDesktop:ln(r)}}function fn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&fn(e)?`ui-orphan`:`stale`}const pn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function mn(e){switch(e){case`running`:return K.default.green(e);case`desktop`:return K.default.blue(e);case`foreign`:return K.default.cyan(e);case`ui-orphan`:return K.default.magenta(e);case`stale`:return K.default.yellow(e)}}function hn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function gn(e){return`${hn(e.server.usage)} | ${hn(e.ui?.usage??null)}`}function _n(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function vn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,_n(e),gn(e),t,String(n),un(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=mn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=K.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
|
|
19
|
-
`)}async function yn(e={}){let t=e.discover??h,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??f,a=e.resolveUsage??m,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=dn(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(vn(e.all?s:s.filter(e=>pn.has(Q(e)))))}function bn(){return new T(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await yn({all:t.all===!0||e===`all`,json:t.json===!0})})}function xn(e,t,n={}){let r=n.isAlive??b,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function Sn(e){let t=e.inspect??(t=>Z(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=xn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function Cn(e,t=b){let n=await h(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function wn(e){let t=Sn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function Tn(e){return new T(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=Sn({lockDir:d(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await yn({});return}if(n===`all`){let e=await h();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,b)&&!$(r,b)||(wn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await Cn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}wn(t);return}wn(d(I(Ae(),n)))})}export{Ae as _,Xt as a,$t as c,Z as d,qt as f,je as g,Me as h,an as i,en as l,Wt as m,Tn as n,tn as o,Ut as p,bn as r,Zt as s,Sn as t,Yt as u,ke as v,De as y};
|
|
20
|
-
//# sourceMappingURL=src-Joe5Ft2d.mjs.map
|
package/dist/start-BUeLlQd8.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,r as t,v as n}from"./start-CYM9hyHf.mjs";export{t as bootStartServer,e as resolveHost,n as startCommand};
|
package/dist/start-CYM9hyHf.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import"./sleep-DdJljU3h.mjs";import{Q as e,Y as t}from"./src-c73kUNxd.mjs";import{En as n,a as r,ii as i}from"./src-BB2_Ksle.mjs";import{v as a,y as o}from"./write-project-skill-BD0rO6kN.mjs";import{a as s,c,d as l,i as u,o as d,r as f,t as p}from"./acp-harness-probe-DRAaVrjf.mjs";import{n as m}from"./constants-DLJSo46_.mjs";import{spawn as h}from"node:child_process";import{basename as g,join as _,posix as v,resolve as y}from"node:path";import{closeSync as b,existsSync as x,mkdirSync as S,openSync as C}from"node:fs";import{rm as w}from"node:fs/promises";import{setTimeout as T}from"node:timers/promises";function E(e){return v.join(v.dirname(e),`..`,`Frameworks`,`OpenKnowledge Server.app`,`Contents`,`MacOS`,`OpenKnowledge Helper`)}const D=/\/[^/]+\.app\/Contents\/MacOS\/[^/]+$/;function O(e){if(e.platform!==`darwin`||!D.test(e.execPath))return null;let t=E(e.execPath);return e.exists(t)?t:null}function k(e={}){let t=e.execPath??process.execPath,n=e.platform??process.platform,r=e.argv??process.argv,i=e.exists??x,a=r[1];return a?{command:O({execPath:t,platform:n,exists:i})??t,prefixArgs:[a]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx -y @inkeep/open-knowledge@latest\`. This re-introduces the registry-fetch surface that re-exec was fixing. Observed argv: ${JSON.stringify(r)}`),{command:`npx`,prefixArgs:[`-y`,`@inkeep/open-knowledge@latest`]})}function A(e,t){return e.host??t.HOST??`127.0.0.1`}function j(e,t){return t&&(e===`::`||e===`::1`||e===`[::1]`||e===`localhost`||e===`0.0.0.0`)?{host:`127.0.0.1`,coerced:!0}:{host:e,coerced:!1}}function M(e){let t=g(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var N=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}};function P(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function F(t){x(t.lockDir)||S(t.lockDir,{recursive:!0});let n=C(_(t.lockDir,e),`w`),r=t.spawn??h,{PORT:i,...a}=process.env,o=k();try{let e=r(o.command,[...o.prefixArgs,...t.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,n],windowsHide:!0,cwd:t.cwd,env:{...a,ELECTRON_RUN_AS_NODE:`1`}});return e.unref(),e}finally{try{b(n)}catch{}}}function I(e,t,n,r=!1){return e??(n!==void 0||r?void 0:t)}function L(e,t){return e!==void 0&&t!==null&&t.port>0&&t.draining!==!0}function R(e,t,n){return e??+(t!=null&&!n)}async function z(e){let t=e.spawn??h,n=k(),{PORT:r,...i}=process.env,a=t(n.command,[...n.prefixArgs,`ui`,`--port`,String(e.uiPort)],{cwd:e.cwd,stdio:`inherit`,windowsHide:!0,env:{...i,ELECTRON_RUN_AS_NODE:`1`}}),o=!1,s=e=>{o=!0;try{a.kill(e)}catch{}},c=()=>s(`SIGINT`),l=()=>s(`SIGTERM`);process.once(`SIGINT`,c),process.once(`SIGTERM`,l),await new Promise(e=>{a.on(`exit`,(t,n)=>{process.exitCode=R(t,n,o),e()}),a.on(`error`,t=>{console.error(`[start] connect fallback: failed to spawn ok ui — ${t instanceof Error?t.message:String(t)}`),process.exitCode=1,e()})}),process.removeListener(`SIGINT`,c),process.removeListener(`SIGTERM`,l)}async function B(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}const V=t;function H(e,t,n=e=>w(e,{recursive:!0,force:!0})){return async()=>{try{await e()}finally{try{await n(t)}catch(e){process.stderr.write(`[start] ephemeral temp dir reap failed for ${t}: ${e instanceof Error?e.message:String(e)}\n`)}}}}function U(e,t={}){let n=t.exit??(e=>process.exit(e)),r=t.getActiveHandles??(()=>{let e=process._getActiveHandles;return e?e.call(process):null});return async()=>{let i=!1;try{await e()}catch(e){i=!0,t.log?.error({err:e},`idle-shutdown: destroy failed — exiting anyway`)}finally{let e=null;try{let t=r();if(t!==null){e={};for(let n of t){let t=n?.constructor?.name??`unknown`;e[t]=(e[t]??0)+1}}}catch{e=null}t.log?.info({event:`idle-shutdown-exit`,exitCode:+!!i,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(+!!i)}}}async function W(e){let t=e.sigtermGraceMs??V,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>T(e)),i=e.reason??`teardown`;try{let a=e.readUiLock(),o=e.spawnedUiPid();if(a&&e.isAlive(a.pid)&&a.pid!==o)e.log?.info({pid:a.pid,port:a.port,spawnedUiPid:o},`${i}: ui.lock holder is not our spawned sibling — leaving it alone`);else if(a&&e.isAlive(a.pid))try{e.killPid(a.pid,`SIGTERM`),e.log?.info({pid:a.pid,port:a.port},`${i}: SIGTERM UI sibling`);let o=Date.now()+t;for(;Date.now()<o&&e.isAlive(a.pid);)await r(n);if(e.isAlive(a.pid))try{e.killPid(a.pid,`SIGKILL`),e.log?.warn({pid:a.pid,graceMs:t},`${i}: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:a.pid,err:t},`${i}: SIGKILL failed`)}}catch(t){e.log?.warn({pid:a.pid,err:t},`${i}: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t},`${i}: UI lookup failed; proceeding`)}}function G(e){let{destroy:t,...n}=e;return async()=>{await W({...n,reason:`idle-shutdown`}),await t()}}async function K(e){let{config:t,cwd:a,host:o}=e,s=e.skipAutoInit??!1,u=e.skipUiAutoSpawn??!1,d=e.idleThresholdMs??18e5,{existsSync:f,mkdirSync:m}=await import(`node:fs`),{basename:h,dirname:g}=await import(`node:path`),{bootServer:_,getLogger:v,isProcessAlive:y,readUiLock:b,resolveContentDir:x,resolveLockDir:S,waitForServerLockDrain:C}=await import(`./src-n7camJHB.mjs`),w=e.log??v(`start`),E=e.singleFile!==void 0,D=e.projectDir??a,O=E?r(e.singleFile).canonicalFilePath:void 0,k=O?g(O):void 0,A=O?h(O):void 0;if(!E){if(!s&&!n(a))throw new N(a);let t=process.env.OK_RECLAIM_DISABLE??null,r=e=>{let t=typeof e.event==`string`?e.event:``;(t.endsWith(`-failed`)||t.endsWith(`-error`)||t.endsWith(`-missing`))&&w.warn({event:e},`[start] reclaim sweep reported a problem`)};try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-C3cLZGEE.mjs`)).repairMcpConfigs)({projectDir:a,reclaimDisableEnv:t,logger:r})}catch(e){w.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-D_fCoitG.mjs`)).repairLaunchJson)({projectDir:a,reclaimDisableEnv:t,logger:r})}catch(e){w.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-DN4OicpR.mjs`)).repairSkills)({projectDir:a,reclaimDisableEnv:t,logger:r})}catch(e){w.warn({err:e},`[start] skill repair sweep failed; continuing`)}}let j=k??x(t,a);!E&&!f(j)&&(m(j,{recursive:!0}),w.info({contentDir:j},`Created content directory`));let M=null,I=null,L=async({lockDir:t})=>{if(M=P({uiLock:b(t),isAlive:y}),M.action===`spawn`&&!u)try{let n=e.uiPort===void 0?void 0:[`ui`,`--port`,String(e.uiPort)];I=F({lockDir:t,cwd:a,spawn:e.spawn,args:n}).pid??null,w.info({reason:M.reason,uiPort:e.uiPort},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else M.action===`skip`&&w.info({port:M.port,pid:M.pid},`UI already running at port ${M.port}`)},R=e.reactShellDistDir===void 0,z=l(),V=i();{let e=S(E?D:a),t=Date.now(),n=await C(e);n!==`no-drain`&&w.info({event:`start-waited-for-draining-predecessor`,outcome:n,waitedMs:Date.now()-t,drainLockDir:e},n===`released`?`[start] predecessor server finished draining — proceeding`:`[start] predecessor server still draining after wait — proceeding to collide`)}let W=await _({config:t,contentDir:j,projectDir:E?D:a,contentRoot:E?void 0:t.content.dir,port:e.port,host:o,...e.enableRemote===!0?{enableRemote:!0}:{},quiet:!1,detectGh:c,tokenStore:z,embeddingsKeyStore:V,...E?{ephemeral:!0,singleDocRelPath:A,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],probeHarnessManagedMcpEntry:(e,t)=>p(e,t),attachUiSibling:R,idleShutdownMs:d,skipAutoInit:!0,...R?{spawnUiSiblingFn:L}:{},idleShutdownHandler:t=>{let n=G({readUiLock:()=>b(W.lockDir),spawnedUiPid:()=>I,isAlive:y,killPid:(e,t)=>{process.kill(e,t)},destroy:t,log:w});return U(E?H(n,D):n,{log:w,exit:e.idleExit})},log:w,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});M||={action:`skip`,reason:`alive`,pid:0,port:0};let K=M,q=null;if(K.action===`skip`)q=K.port>0?K.port:null;else if(!u){let t=e.uiBindTimeoutMs??3e3;q=await B({readUiLock:()=>b(W.lockDir),now:Date.now,sleep:e=>T(e),timeoutMs:t,pollIntervalMs:50}),q===null&&w.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:W.httpServer,destroy:W.destroy,lockDir:W.lockDir,contentDir:j,port:W.port,ready:W.ready,degraded:W.degraded,uiSpawnDecision:M,spawnedUiPid:I,resolvedUiPort:q}}function q(e){if(e===`browser`||e===`app`)return e;throw new o(`--mode must be 'browser' or 'app'`)}function J(e){let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<1||t>65535)throw new o(`--ui-port must be a port number between 1 and 65535`);return t}function Y(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function X(e){let t=[`Stopping OpenKnowledge…`,`Saving pending changes and releasing the server lock — this can take a few seconds.`];return e===`SIGINT`&&t.push(`Press Ctrl+C again to force quit.`),t}async function Z(e,t){let n=Y(process.env);n!==null&&(process.env.OK_CONSOLE_LEVEL=n);let{renderBanner:r}=await import(`./banner-Be20aAVc.mjs`),{accent:i,dim:a,error:o,warning:s}=await import(`./colors-MGDi6UGf.mjs`),c=process.cwd(),l=t.remote!==void 0&&t.remote!==!1,u=typeof t.remote==`string`?t.remote:void 0,d=u===void 0?e:{...e,remote:{...e.remote,url:u}};process.title=M(c),l&&(typeof d.remote?.url!=`string`||d.remote.url===``)&&(console.error(o("--remote requires a public tunnel URL — pass it (`ok start --remote https://<your-tunnel-host>`) or set remote.url in .ok/config.yml.")),process.exit(78)),l&&console.warn(s([``,`⚠ REMOTE ACCESS ENABLED — no server-side authentication.`,` Anyone who can reach ${d.remote?.url} has FULL control of this`,` knowledge base, including sync, publishing, credentials, and local operations.`,` Restrict who can reach it at the tunnel: ngrok OAuth, Cloudflare Access,`,` Tailscale ACLs, or equivalent edge auth.`,``].join(`
|
|
2
|
-
`)));let f=A(t,process.env),p=j(f,l);p.coerced&&console.warn(`remote access is enabled and ${f} is not an IPv4 loopback bind — tunnels proxy to 127.0.0.1, so binding ${f} would leave the tunnel dialing a dead port. Using 127.0.0.1.`);let h=p.host,g=t.port===void 0?void 0:Number(t.port),_=process.env.PORT?Number(process.env.PORT):void 0,v=t.uiPort===void 0?void 0:Number(t.uiPort);l&&g===void 0&&_!==void 0&&console.warn(`remote access is enabled — ignoring env PORT=${process.env.PORT}; the tunnel's port mapping targets the stable remote port (${d.remote?.port??24550}). Pass --port to override deliberately.`);let b=I(g,_,v,l)??(l?d.remote?.port??24550:void 0);if(v!==void 0){let{readServerLock:e,resolveLockDir:t}=await import(`./src-n7camJHB.mjs`);if(L(v,e(t(c)))){await z({cwd:c,uiPort:v});return}}let S=t.reactShellDistDir;if(l&&S===void 0){let e=import.meta.dirname??new URL(`.`,import.meta.url).pathname;S=[y(e,`public`),y(e,`../../app/dist`),y(e,`../../../app/dist`)].find(e=>x(e)),S===void 0&&console.warn(`remote access: bundled web UI not found — serving /mcp and /api only over the tunnel.`)}let C;try{C=await K({config:d,cwd:c,host:h,port:b,...v===void 0?{}:{uiPort:v},...t.serveContentAssets===void 0?{}:{serveContentAssets:t.serveContentAssets},...S?{reactShellDistDir:S}:{},...t.singleFile?{singleFile:t.singleFile}:{},...t.projectDir?{projectDir:t.projectDir}:{},...l?{enableRemote:!0}:{}})}catch(e){e instanceof N&&(console.error(o(e.message)),process.exit(1));let t=await import(`./src-n7camJHB.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),e instanceof t.RemoteConfigError&&(console.error(o(e.message)),process.exit(78)),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(o(e.message)),process.exit(1)),v!==void 0&&Q(e,t)){await z({cwd:c,uiPort:v});return}let n=$(e,c,t);n!==null&&(console.error(o(n)),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let w=!1,T=async e=>{if(w)return;w=!0;let[t,...n]=X(e);console.log(i(`\n${t}`));for(let e of n)console.log(a(` ${e}`));if(C.spawnedUiPid!==null)try{let{getLogger:e,isProcessAlive:t,readUiLock:n}=await import(`./src-n7camJHB.mjs`);await W({readUiLock:()=>n(C.lockDir),spawnedUiPid:()=>C.spawnedUiPid,isAlive:t,killPid:(e,t)=>process.kill(e,t),log:e(`start`),reason:`shutdown`})}catch(e){console.error(`${o(`ui sibling teardown failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`)}try{await C.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{T(`SIGINT`)}),process.once(`SIGTERM`,()=>{T(`SIGTERM`)});let E=`http://${h}:${C.port}`,D=h===`0.0.0.0`||h===`::`?`http://0.0.0.0:${C.port}`:void 0,O=C.resolvedUiPort,k=O!==null&&O>0?`http://${h}:${O}`:E;console.log(r({name:`open-knowledge`,version:m,localUrl:k,apiUrl:k===E?void 0:E,networkUrl:D,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let P={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};C.ready.then(async()=>{if(C.degraded.length>0){console.log();for(let e of C.degraded){let t=P[e]??`${e} (check server logs for details)`;console.warn(` ${s(`⚠`)} ${s(e)}: ${a(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-CHq05YCN.mjs`);e(k)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function Q(e,t){let n=t.ServerLockCollisionError;return n!==void 0&&e instanceof n}function $(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=_(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`OpenKnowledge desktop is currently running on this project. Quit it or use --cwd to point elsewhere.`:r.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function ee(e){return new a(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`--ui-port <port>`,`Pin the ok ui sibling to <port> and connect (not exit) if a server already runs here — the worktree-preview recipe path`,J).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,q).option(`--serve-content-assets`,`Serve content assets from this server (now the default; kept for compatibility)`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).option(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).option(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).option(`--remote [url]`,`Serve through a tunnel: admit requests carrying the tunnel Host with NO server-side auth (anyone who can reach the URL has full control — restrict access at the tunnel with edge auth). Bare --remote uses remote.url from .ok/config.yml; --remote <url> supplies it for this run.`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
|
|
3
|
-
`),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.uiPort!==void 0&&e.push(`--ui-port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=u(f());if(n.available){s({spawn:h},n);return}console.error(d(n.reason)),process.exit(1)}await Z(n,t)})}export{k as C,U as S,F as _,j as a,$ as b,P as c,Q as d,I as f,L as g,Z as h,G as i,M as l,Y as m,B as n,R as o,A as p,K as r,z as s,N as t,X as u,ee as v,H as x,W as y};
|
|
4
|
-
//# sourceMappingURL=start-CYM9hyHf.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-5QVNJEHU-DS9zA_YV.mjs";export{e as statCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-Chp9b-Lc.mjs";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-VYOJP4TV-DG_cm0JM.mjs";export{e as strings};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import"./chunk-ZIRB5QZD-K23GvNu-.mjs";import{r as t,t as n}from"./chunk-PUDLZKDR-CIWYIjrF.mjs";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|
|
9
|
-
//# sourceMappingURL=swimlanesDiagram-G3AALYLV-CdQlHesp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-DCAAORBQ-BDLVpBG2.mjs";export{e as tailCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-55VFSPNA-D2U7n2ka.mjs";export{e as teeCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-CWQS3NFK-HnFncXpd.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-Z6LRHWXI-BCgawaNX.mjs";export{e as timeCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-OCLXQMOG-DC3689MV.mjs";export{e as touchCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-62RKD26F-C4qK_fA-.mjs";export{e as trCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-XVDPCNWR-BSVT7Ttz.mjs";export{e as treeCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BLwvtFl6.mjs";import{n as e}from"./chunk-CQNSW5MT-FekKjn0i.mjs";export{e as createTreeViewServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BLwvtFl6.mjs";import{n as e}from"./chunk-R7FJI6CG-bmCS8vOS.mjs";export{e as createTreemapServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{i as e,t}from"./chunk-R6QSAL5T-CxzbKF59.mjs";export{e as falseCommand,t as trueCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-PYSFUGCK-DqdcBhD4.mjs";export{e as unexpand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-WKFATFPP-DygaP6No.mjs";export{e as uniqCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-KEIR6QF5-BLwvtFl6.mjs";import{n as e}from"./chunk-5FCAYU7R-DszODYLe.mjs";export{e as createWardleyServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-GXVXFKBA-D-BGCybM.mjs";export{e as wcCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-A65PWWJC-C-0S-s_f.mjs";export{e as whichCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{t as e}from"./chunk-HJQJAYMS-BHzb4Ncl.mjs";export{e as whoami};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Ho as r,Xo as i,Zo as a,ts as o}from"./src-c73kUNxd.mjs";import{Ir as s,gr as c}from"./src-BB2_Ksle.mjs";import{basename as l,dirname as u,isAbsolute as d,join as f,posix as p,relative as m,resolve as h,sep as g,win32 as _}from"node:path";import{cpSync as ee,existsSync as v,lstatSync as te,mkdirSync as y,readFileSync as ne,realpathSync as b,rmSync as x,statSync as re}from"node:fs";import{homedir as S}from"node:os";var C=n((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),w=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),T=n((e=>{let{humanReadableArgName:t}=w();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
2
|
-
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
3
|
-
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
4
|
-
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),E=n((e=>{let{InvalidArgumentError:t}=C();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r===void 0?!1:r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
5
|
-
- a short flag is a single dash and a single character
|
|
6
|
-
- either use a single dash and a single character (for a short flag)
|
|
7
|
-
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(t)?Error(`${n}
|
|
8
|
-
- too many short flags`):i.test(t)?Error(`${n}
|
|
9
|
-
- too many long flags`):Error(`${n}
|
|
10
|
-
- unrecognised flag format`)}if(t===void 0&&n===void 0)throw Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),ie=n((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),ae=n((t=>{let n=e(`node:events`).EventEmitter,r=e(`node:child_process`),i=e(`node:path`),a=e(`node:fs`),o=e(`node:process`),{Argument:s,humanReadableArgName:c}=w(),{CommanderError:l}=C(),{Help:u,stripColor:d}=T(),{Option:f,DualOptions:p}=E(),{suggestSimilar:m}=ie();var h=class e extends n{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),outputError:(e,t)=>t(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,getOutHasColors:()=>_()??(o.stdout.isTTY&&o.stdout.hasColors?.()),getErrHasColors:()=>_()??(o.stderr.isTTY&&o.stderr.hasColors?.()),stripColor:e=>d(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...e},this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
11
|
-
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new s(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t?.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,e&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let[,n,r]=(e??`help [command]`).match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,(e||t)&&this._initCommandGroup(a),this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this._initCommandGroup(e),this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
12
|
-
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new f(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
13
|
-
- already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._collectValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{r(t,`error: option '${e.flags}' argument '${t}' is invalid.`,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{r(t,`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof f)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){o.versions?.electron&&(t.from=`electron`);let e=o.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=o.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
14
|
-
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(a.existsSync(e))return;let r=`'${e}' does not exist
|
|
15
|
-
- if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
16
|
-
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
17
|
-
- ${t?`searched for local subcommand relative to directory '${t}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`}`;throw Error(r)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(this._checkForMissingExecutable(u,d,e._name),t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=g(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`)this._checkForMissingExecutable(u,d,e._name);else if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent?.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)===void 0?!1:this.getOptionValueSource(t)!==`default`});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t;function i(e){return e.length>1&&e[0]===`-`}let a=e=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(e)?!this._getCommandAndAncestors().some(e=>e.options.map(e=>e.short).some(e=>/^-\d$/.test(e))):!1,o=null,s=null,c=0;for(;c<e.length||s;){let l=s??e[c++];if(s=null,l===`--`){r===n&&r.push(l),r.push(...e.slice(c));break}if(o&&(!i(l)||a(l))){this.emit(`option:${o.name()}`,l);continue}if(o=null,i(l)){let t=this._findOption(l);if(t){if(t.required){let n=e[c++];n===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,n)}else if(t.optional){let n=null;c<e.length&&(!i(e[c])||a(e[c]))&&(n=e[c++]),this.emit(`option:${t.name()}`,n)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(l.length>2&&l[0]===`-`&&l[1]!==`-`){let e=this._findOption(`-${l[1]}`);if(e){e.required||e.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${e.name()}`,l.slice(2)):(this.emit(`option:${e.name()}`),s=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let e=l.indexOf(`=`),t=this._findOption(l.slice(0,e));if(t&&(t.required||t.optional)){this.emit(`option:${t.name()}`,l.slice(e+1));continue}}if(r===t&&i(l)&&!(this.commands.length===0&&a(l))&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),n.push(...e.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l,...e.slice(c));break}else if(this._defaultCommandName){n.push(l,...e.slice(c));break}}if(this._passThroughOptions){r.push(l,...e.slice(c));break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
18
|
-
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new p(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=m(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=m(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??``:(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??``:(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??``:(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e||={};let t=!!e.error,n,r,i;return t?(n=e=>this._outputConfiguration.writeErr(e),r=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=e=>this._outputConfiguration.writeOut(e),r=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:e=>(r||(e=this._outputConfiguration.stripColor(e)),n(e)),hasColors:r,helpWidth:i}}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,r)),this.emit(`beforeHelp`,r);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!=`string`&&!Buffer.isBuffer(i)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,r),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,r))}helpOption(e,t){return typeof e==`boolean`?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??`-h, --help`,t??`display help for command`),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(o.exitCode??0);t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
19
|
-
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function g(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}function _(){if(o.env.NO_COLOR||o.env.FORCE_COLOR===`0`||o.env.FORCE_COLOR===`false`)return!1;if(o.env.FORCE_COLOR||o.env.CLICOLOR_FORCE!==void 0)return!0}t.Command=h,t.useColor=_}));const{program:oe,createCommand:se,createArgument:ce,createOption:le,CommanderError:ue,InvalidArgumentError:D,InvalidOptionArgumentError:de,Command:fe,Argument:pe,Option:me,Help:he}=t(n((e=>{let{Argument:t}=w(),{Command:n}=ae(),{CommanderError:r,InvalidArgumentError:i}=C(),{Help:a}=T(),{Option:o}=E();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default,O=i,k=a,ge=o,A=`node`,j={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`},M=`# ok-mcp-v2
|
|
20
|
-
USER_BUNDLE="$HOME/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
21
|
-
[ -f "$USER_BUNDLE" ] && [ -x "$USER_BUNDLE" ] && exec "$USER_BUNDLE" mcp
|
|
22
|
-
BUNDLE="/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
23
|
-
[ -f "$BUNDLE" ] && [ -x "$BUNDLE" ] && exec "$BUNDLE" mcp
|
|
24
|
-
DEB_BUNDLE="/opt/OpenKnowledge/resources/cli/bin/ok.sh"
|
|
25
|
-
[ -f "$DEB_BUNDLE" ] && [ -x "$DEB_BUNDLE" ] && exec "$DEB_BUNDLE" mcp
|
|
26
|
-
command -v npx >/dev/null 2>&1 && exec npx -y @inkeep/open-knowledge@latest mcp
|
|
27
|
-
for d in "$HOME/.nvm/versions/node"/*/bin "$HOME/.fnm/node-versions"/*/installation/bin "$HOME/.asdf/installs/nodejs"/*/bin /opt/homebrew/bin /usr/local/bin "$HOME/.local/bin" "$HOME/.volta/bin"; do
|
|
28
|
-
[ -f "$d/npx" ] && [ -x "$d/npx" ] && exec "$d/npx" -y @inkeep/open-knowledge@latest mcp
|
|
29
|
-
done
|
|
30
|
-
echo "OpenKnowledge: install OK Desktop or Node.js 24+, then restart your editor" >&2
|
|
31
|
-
exit 127`,N=`# ok-mcp-win-v1
|
|
32
|
-
if ($env:PATHEXT -notmatch 'CMD') { $env:PATHEXT = '.COM;.EXE;.BAT;.CMD;' + $env:PATHEXT }
|
|
33
|
-
if ($env:APPDATA) {
|
|
34
|
-
$shim = Join-Path $env:APPDATA 'npm\\ok.cmd'
|
|
35
|
-
if (Test-Path -LiteralPath $shim -PathType Leaf) { & $shim mcp; exit $LASTEXITCODE }
|
|
36
|
-
}
|
|
37
|
-
$ok = Get-Command ok.cmd -CommandType Application -ErrorAction SilentlyContinue
|
|
38
|
-
if ($ok) { & $ok.Source mcp; exit $LASTEXITCODE }
|
|
39
|
-
$npx = Get-Command npx.cmd -CommandType Application -ErrorAction SilentlyContinue
|
|
40
|
-
if ($npx) { & $npx.Source -y '@inkeep/open-knowledge@latest' mcp; exit $LASTEXITCODE }
|
|
41
|
-
$dirs = @()
|
|
42
|
-
if ($env:ProgramFiles) { $dirs += Join-Path $env:ProgramFiles 'nodejs' }
|
|
43
|
-
if ($env:NVM_SYMLINK) { $dirs += $env:NVM_SYMLINK }
|
|
44
|
-
if ($env:LOCALAPPDATA) {
|
|
45
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'fnm\\aliases\\default'
|
|
46
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'Volta\\bin'
|
|
47
|
-
$dirs += Join-Path $env:LOCALAPPDATA 'pnpm'
|
|
48
|
-
}
|
|
49
|
-
if ($env:USERPROFILE) { $dirs += Join-Path $env:USERPROFILE 'scoop\\shims' }
|
|
50
|
-
foreach ($d in $dirs) {
|
|
51
|
-
$probe = Join-Path $d 'npx.cmd'
|
|
52
|
-
if (Test-Path -LiteralPath $probe -PathType Leaf) { & $probe -y '@inkeep/open-knowledge@latest' mcp; exit $LASTEXITCODE }
|
|
53
|
-
}
|
|
54
|
-
[Console]::Error.WriteLine('OpenKnowledge: install Node.js 24+ (npm i -g @inkeep/open-knowledge), then restart your editor')
|
|
55
|
-
exit 127`,P=`// ok-pi-bridge`,F=`${P}-v1`,I=`ok-pi-managed-extension`;function L(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command===`/bin/sh`){if(!Array.isArray(t.args)||t.args[0]!==`-l`||t.args[1]!==`-c`)return!1;let e=t.args[2];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command===`powershell`){if(!Array.isArray(t.args)||t.args[0]!==`-NoProfile`||t.args[1]!==`-NonInteractive`||t.args[2]!==`-Command`)return!1;let e=t.args[3];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}if(t.type===`local`&&Array.isArray(t.command)){if(t.command[0]===`/bin/sh`){if(t.command[1]!==`-l`||t.command[2]!==`-c`)return!1;let e=t.command[3];return typeof e==`string`&&e.includes(`# ok-mcp-v2`)}if(t.command[0]===`powershell`){if(t.command[1]!==`-NoProfile`||t.command[2]!==`-NonInteractive`||t.command[3]!==`-Command`)return!1;let e=t.command[4];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}return!1}if(t.command===`ok-pi-managed-extension`){if(!Array.isArray(t.args))return!1;let e=t.args[0];return typeof e==`string`&&e.startsWith(F)}return!1}function R(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=h(e);if(l(t)===`cli.mjs`&&l(u(t))===`dist`)return t;let n=t.split(g),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return f(i.length===0?g:i.join(g),`packages`,`cli`,`dist`,`cli.mjs`)}function z(e={}){return e.mode===`dev`?{command:A,args:[R(),`mcp`],env:{...j}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{command:`/bin/sh`,args:[`-l`,`-c`,M]}}function _e(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[A,R(),`mcp`],environment:{...j}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,N]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,M]}}function ve(e){if(typeof e!=`object`||!e)return!1;let t=e;return B(t,z({mode:`published`,platformName:`darwin`}))||B(t,z({mode:`published`,platformName:`win32`}))}function B(e,t){return Object.keys(e).length===Object.keys(t).length?ye(e,t):!1}function ye(e,t){if(e.command!==t.command)return!1;let n=t.args;return!Array.isArray(n)||!Array.isArray(e.args)||e.args.length!==n.length?!1:e.args.every((e,t)=>e===n[t])}function V(e,t){let n=e=>typeof e==`string`&&e.includes(`# ok-mcp`);return t===`/bin/sh`?e[0]===`-l`&&e[1]===`-c`&&n(e[2]):t===`powershell`?e[0]===`-NoProfile`&&e[1]===`-NonInteractive`&&e[2]===`-Command`&&n(e[3]):!1}function be(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.enabled===!1||typeof t.command!=`string`||!Array.isArray(t.args)?!1:V(t.args,t.command)}function xe(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.type!==`local`||t.enabled===!1||!Array.isArray(t.command))return!1;let[n,...r]=t.command;return typeof n==`string`&&V(r,n)}function H(e){return e===`win32`?_:p}function Se(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ce(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.claude.json`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env;if(t===`darwin`)return p.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??_.join(n,`AppData`,`Roaming`);return _.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.cursor`,`mcp.json`)}function we(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).CODEX_HOME??H(t).join(n,`.codex`)}function G(e={}){return H(e.platformName??process.platform).join(we(e),`config.toml`)}function K(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=(e.env??process.env).COPILOT_HOME??H(t).join(n,`.copilot`);return H(t).join(r,`mcp-config.json`)}function Te(e={}){let t=e.platformName??process.platform,n=e.home??S(),r=e.env??process.env,i=H(t);if(t===`win32`){let e=r.APPDATA??i.join(n,`AppData`,`Roaming`);return i.join(e,`opencode`)}let a=r.XDG_CONFIG_HOME??i.join(n,`.config`);return i.join(a,`opencode`)}function q(e={}){return H(e.platformName??process.platform).join(Te(e),`opencode.json`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.openclaw`,`openclaw.json`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.hermes`,`config.yaml`)}function Oe(e={}){let t=e.platformName??process.platform,n=e.home??S();return(e.env??process.env).PI_CODING_AGENT_DIR??H(t).join(n,`.pi`,`agent`)}function ke(e={}){let t=e.platformName??process.platform,n=e.home??S();return H(t).join(n,`.gemini`,`config`,`mcp_config.json`)}function Ae(e,t){let n=H(t),r=n.join(e,`.lmstudio`,`mcp.json`),i=n.join(e,`.cache`,`lm-studio`,`mcp.json`);return t===`darwin`?[i,r]:[r,i]}function J(e={}){let t=e.platformName??process.platform,n=Ae(e.home??S(),t);return n.find(e=>v(e))||n.find(e=>v(u(e)))||n[0]}const Y={claude:{id:`claude`,label:k.claude,configPath:(e,t)=>Ce({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.claude`),projectConfigPath:e=>f(e,`.mcp.json`),projectSkillPath:e=>f(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:k[`claude-desktop`],configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(U({home:t}))},cursor:{id:`cursor`,label:k.cursor,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(W({home:t})),projectConfigPath:e=>f(e,`.cursor`,`mcp.json`),projectSkillPath:e=>f(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:k.codex,configPath:(e,t)=>G({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(G({home:t})),projectConfigPath:e=>f(e,`.codex`,`config.toml`),projectSkillPath:e=>f(e,`.codex`,`skills`,`open-knowledge`,`SKILL.md`)},copilot:{id:`copilot`,label:k.copilot,configPath:(e,t)=>K({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(K({home:t})),projectSkillPath:e=>f(e,`.github`,`skills`,`open-knowledge`,`SKILL.md`)},opencode:{id:`opencode`,label:k.opencode,configPath:(e,t)=>q({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>r,buildEntry:(e,t)=>_e(t),scope:`global`,detectPath:(e,t)=>u(q({home:t})),projectConfigPath:e=>f(e,`opencode.json`),projectSkillPath:e=>f(e,`.opencode`,`skills`,`open-knowledge`,`SKILL.md`)},openclaw:{id:`openclaw`,label:k.openclaw,configPath:(e,t)=>Ee({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.openclaw`),offerOnlyWhenDetected:!0},pi:{id:`pi`,label:k.pi,configPath:()=>{throw Error("Pi has no user-global MCP config; OK's integration is the project-scoped bridge extension at .pi/extensions/open-knowledge.ts (run `ok init` in the project).")},format:`file`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:()=>{throw Error(`Pi has no MCP entry shape; the managed bridge file is built by buildPiExtensionSource (integrations/pi-extension.ts).`)},scope:`project`,detectPath:(e,t)=>Oe({home:t}),projectConfigPath:e=>f(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>f(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)},antigravity:{id:`antigravity`,label:k.antigravity,configPath:(e,t)=>ke({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.gemini`),offerOnlyWhenDetected:!0},"lm-studio":{id:`lm-studio`,label:k[`lm-studio`],configPath:(e,t)=>J({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>u(J({home:t})),offerOnlyWhenDetected:!0},hermes:{id:`hermes`,label:k.hermes,configPath:(e,t)=>De({home:t}),format:`yaml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>z(t),scope:`global`,detectPath:(e,t)=>f(t??S(),`.hermes`),offerOnlyWhenDetected:!0}};function je(e){let t=e.filter(e=>!Object.hasOwn(Y,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${O.join(`, `)}`);return e.map(e=>Y[e])}function X(e,t){let n;try{n=te(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(n?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);Z(e,t)}function Me(e,t){Z(e,t)}function Z(e,t){let n;try{n=b(t)}catch{n=h(t)}let r=u(e);for(;r.length>1&&r!==g;){let t;try{t=b(r)}catch(e){if(e.code===`ENOENT`){r=u(r);continue}throw e}let i=m(n,t);if(i===``||!i.startsWith(`..`)&&!d(i))return;throw Error(`Refusing to write at ${e}: ancestor ${r} resolves to ${t}, which is outside the project directory ${n}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function Q(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ne(e,t,n){try{if(re(n).size>10485760)return!1}catch{return!1}let r;try{r=ne(n,`utf-8`)}catch{return!1}let i=[],a=s(r.charCodeAt(0)===65279?r.slice(1):r,i,{allowTrailingComma:!0,disallowComments:!1});if(i.length>0||!Q(a))return!1;let o=a[e.topLevelKey];if(!Q(o))return!1;let c=e.serverMapSubKey?o[e.serverMapSubKey]:o;return Q(c)?Q(c[e.serverName(t)]):!1}function Pe(e,t,n={}){if(e.id!==`copilot`)return!0;try{return Ne(e,t,e.configPath(t,n.home))}catch{return!1}}function $(e,t,n={}){let r=e.projectSkillPath?.(t);if(!r)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};if(!Pe(e,t,n))return{editorId:e.id,label:e.label,action:`skipped-prerequisite`,path:r};try{let n=c(`project`,{checkDesktop:!0}),i=u(r);X(i,t);let a=v(r)?`overwritten`:`written`;return x(i,{recursive:!0,force:!0}),y(u(i),{recursive:!0}),ee(n,i,{recursive:!0}),{editorId:e.id,label:e.label,action:a,path:r}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}export{je as _,k as a,me as b,P as c,z as d,be as f,Se as g,xe as h,O as i,F as l,ve as m,Me as n,Y as o,L as p,$ as r,ge as s,X as t,I as u,fe as v,D as y};
|
|
56
|
-
//# sourceMappingURL=write-project-skill-BD0rO6kN.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-PXTK5WE2-DNbfUrIy.mjs";import"./chunk-7TSDKFEO-DBB10vPw.mjs";import"./chunk-KRBPSX3W-YDdgrCmf.mjs";import"./chunk-DBKNVD4L-DNQP2COw.mjs";import{t as e}from"./chunk-3BS5SKQH-DpdUzS0R.mjs";export{e as xanCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-PXTK5WE2-DNbfUrIy.mjs";import{c as e}from"./chunk-DBKNVD4L-DNQP2COw.mjs";export{e as cmdView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-TOMNU26N-BFsBBT9j.mjs";export{e as xargsCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-PXTK5WE2-DNbfUrIy.mjs";import"./chunk-7TSDKFEO-DBB10vPw.mjs";import"./chunk-KRBPSX3W-YDdgrCmf.mjs";import{t as e}from"./chunk-6Z5SFZXK-Cz0C4bhB.mjs";export{e as yqCommand};
|
|
File without changes
|