@inkeep/open-knowledge 0.8.0-beta.22 → 0.8.0-beta.23
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/alias-JE7RI5QX-DvXqsNuT.mjs +1 -0
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-POPGKRAI-DjdS5H9u.mjs +1 -0
- package/dist/{banner-2j-_SAt6.mjs → banner-D39r_H1d.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-KM4zCU91.mjs +1 -0
- package/dist/basename-AA2KJYZQ-623KrTZh.mjs +1 -0
- package/dist/bash-IJWYRKFO-Czh-Vt61.mjs +1 -0
- package/dist/{build-fAc55Z_L.mjs → build-CHU3LuiR.mjs} +1 -1
- package/dist/build-DxnNKCqf.mjs +1 -0
- package/dist/cat-RDUMLXKC-BcPFfXNy.mjs +1 -0
- package/dist/chmod-SYMGL4JA-DNQ-_FB-.mjs +1 -0
- package/dist/{chokidar-Drw_7KKo.mjs → chokidar-CblsKfnx.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-BPYIgkX5.mjs → chunk-24IMIIXA-B6yIPkk2.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-DJBUbZXN.mjs → chunk-3THT3N7L-DztAF386.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-BZnpEf92.mjs → chunk-3ZUFRYJ4-C93H8j0V.mjs} +1 -1
- package/dist/{chunk-44UOCSGV-Bldn7atv.mjs → chunk-44UOCSGV-CaFxJDHm.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF--1mJs7-X.mjs → chunk-4GTNDTRF-_OVmXcJ-.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-MVqoi_T3.mjs → chunk-4HHKTUW3-Dm69hDaZ.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-CvGF-_Q8.mjs → chunk-4Q4SM6WR-DDQRsilN.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-BI6dNKjc.mjs → chunk-55VFSPNA-DVZfQAzN.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-BQ6AJ7O6.mjs → chunk-5QMZ5MUS-CAp625aG.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-BvfNka90.mjs → chunk-5QVNJEHU-BvsipSFW.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-D7bOa6u8.mjs → chunk-5V6VZH6T-BCr5_GDF.mjs} +2 -2
- package/dist/{chunk-62RKD26F-CNcG0-gc.mjs → chunk-62RKD26F-CBIDfuTL.mjs} +2 -2
- package/dist/{chunk-64BAICW3-Ct0k59pL.mjs → chunk-64BAICW3-CTJNEx4Q.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-CExCjuFQ.mjs → chunk-74CEPOFO-D1bzz49u.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-Q1rIcbLT.mjs → chunk-7L36YK2X-RiPZFKaV.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-CVXHdZlP.mjs → chunk-7TSDKFEO-a-GUGBTu.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-BecnXf_j.mjs → chunk-A4HU7SVR-hefV_YmW.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-CFUAbT7E.mjs → chunk-A4JSPFCI-v5lUtffG.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-C4hFXTXp.mjs → chunk-A5O5YHGN-DvJz5Cpw.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-DCxPAHkR.mjs → chunk-A65PWWJC-D7J5l9eq.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-Cz9e5Bhr.mjs → chunk-A7A2DBEE-PLfkXLI4.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-BsLyPNES.mjs → chunk-A7ICOL4V-Drb3XsEL.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-HEyM2sBV.mjs → chunk-ALLTKNUZ-BMiTDN50.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-CR6NU00o.mjs → chunk-APT7OOP2-CXHnSuct.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-mzBO0XWz.mjs → chunk-BBXLRYSX-DHx5dxhT.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-BKd1VT2Z.mjs → chunk-BRGMQKJV-CUNiOrRZ.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-D7NkQWcH.mjs → chunk-CR5AFCPT-BWXo8X-o.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-CKoiDb4a.mjs → chunk-CWQS3NFK-Co4ALolT.mjs} +1 -1
- package/dist/{chunk-D4J545R4-Cx98m4P-.mjs → chunk-D4J545R4-C8nMOauR.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-CI9YGPey.mjs → chunk-D6CWQ5DW-Cik2LGX1.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-BMterGJ_.mjs → chunk-D7MEQ3VN-Csvth_Ss.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-D6297aec.mjs → chunk-DCAAORBQ-BdrR5ttw.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-DiBHw8JN.mjs → chunk-DXB73IDG-DIKSLkPq.mjs} +1 -1
- package/dist/{chunk-EEXR5ZDP-Bn4vQQ9d.mjs → chunk-EEXR5ZDP-C5AJH114.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-DpDxPaeq.mjs → chunk-EIZGF4BS-8bsVXqW0.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-CJjGfJog.mjs → chunk-F23WWYKW-DST0dB7V.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-Bin48pra.mjs → chunk-F55TLFGB-oTuag-aK.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-B2ACHNVA.mjs → chunk-FEIOJCZD-C25Und0M.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-BHUn6H7z.mjs → chunk-GCTKCWKD-Deqi1D_N.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-Cud1eg4y.mjs → chunk-GFQRA5P5-DnjwTqP3.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-21xKIzGR.mjs → chunk-GOV5EKKI-i-yw_7Ty.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-Cj_Fxv_5.mjs → chunk-GXVXFKBA-993FoPmq.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-C-CmmYx3.mjs → chunk-HDQ56CKY-pGV4pOJA.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-BIgu03Ox.mjs → chunk-HJQJAYMS-Ci3vsKQW.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-rWCXbrjW.mjs → chunk-HJWBQKYG-UZig4wUt.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-uOggqK2F.mjs → chunk-HWBSOZZR-LxiTl7Bc.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-_GSIs_AO.mjs → chunk-HWKDQ44K-CPSjqtR_.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-7YwPR338.mjs → chunk-I57KEIP3-DwNGEmJW.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-CkYRWt-S.mjs → chunk-IPJHKYVM-C3IodQq7.mjs} +1 -1
- package/dist/{chunk-J642UCRS-Cyg-aSoS.mjs → chunk-J642UCRS-DuJ82Ao2.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-DSRfSbMx.mjs → chunk-JVPRLUMK-DnQCNjpq.mjs} +2 -2
- package/dist/{chunk-KMEYNNUA-CDMPzUOg.mjs → chunk-KMEYNNUA-DfdK88O_.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-CRM1v6xO.mjs → chunk-LL3S3NLB-DxXgE3kY.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-BI3cmSCQ.mjs → chunk-LPQPILI2-CfDX1Tyv.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-zhq7ggMR.mjs → chunk-LTZRCH7N-GAjTFNwG.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-DsSNdmG6.mjs → chunk-LWEGUNWT-BALY4RLC.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-BOemNzYa.mjs → chunk-MDDMCKUK-BrBgeH_z.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-BUZLLdU-.mjs → chunk-MDLLFABN-oBQf6bGE.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-CFOPmfuD.mjs → chunk-MHTUABJP-dKmK6Hw7.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-DRUAnovn.mjs → chunk-MIZPJHVH-D3ET6RI_.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-C43lG0dq.mjs → chunk-MLXIYONF-dOe6Iqcc.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-IJhb8Pnd.mjs → chunk-MYE6AGBJ-B4pRo9ma.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-B0-n_gxK.mjs → chunk-NAERJDUW-CYdostkt.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-CTS9W0AE.mjs → chunk-NCNPKYJZ-BFGan4lR.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-J6Py8CIT.mjs → chunk-NUYSJFDK-CU1FKadr.mjs} +2 -2
- package/dist/{chunk-NYQYO467-DRNkyF-U.mjs → chunk-NYQYO467-DUxnOnNG.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-98yp8JRG.mjs → chunk-OARHFVLG-CpUL83N9.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-Bwp2OfcJ.mjs → chunk-OCLXQMOG-LAs82g00.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-B8tIhL1k.mjs → chunk-OCS6LSEM-y5pQiBQp.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-XHSNzsVx.mjs → chunk-OJDRYQWQ-ikvLWpfV.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-DAKw4RBb.mjs → chunk-OL3S66CO-DjFShiWt.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-CLbYzY24.mjs → chunk-PBXLG62G-CU755yEQ.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-DU1u4KhR.mjs → chunk-PP6PSHAB-DMC_XCfO.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-BHCYaqaR.mjs → chunk-PYSFUGCK-CY7pclEB.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-B7sObey-.mjs → chunk-QCDB2VPH-D1RuXtOm.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-SwU_vJqW.mjs → chunk-QJ7O6ZN3-BH67tCjg.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-CfNKT29I.mjs → chunk-R6QSAL5T-CtbJTvt9.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-DIztW2nG.mjs → chunk-R6VWJ2ZL-FwG_Za20.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-C_hK2f_6.mjs → chunk-RPNGRAAP-BughPjdR.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-ivh2-vsR.mjs → chunk-SDNKECQQ-C3GEf3VZ.mjs} +2 -2
- package/dist/{chunk-SYMJJMQ4-N8usXlyn.mjs → chunk-SYMJJMQ4-tl6Dz6VW.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-BpY2JAwZ.mjs → chunk-T56QNPHK-Dzjonwlk.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-PXPLisKA.mjs → chunk-TLSUDHID-DYvzalvd.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-BVt75BK5.mjs → chunk-TOMNU26N-DYqwg_75.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-CzW3I1vv.mjs → chunk-TXBZCHCQ-l48TczF5.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-5QHcA85X.mjs → chunk-UNYNJIFU-B6KF1Gqq.mjs} +3 -3
- package/dist/{chunk-V7TAPXDL-DImQ2x1N.mjs → chunk-V7TAPXDL-CnKUp2df.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-HJeqU79C.mjs → chunk-VJFXDYWH-IiUXkKX0.mjs} +2 -2
- package/dist/{chunk-VLGZJRPG-BdCxuGR9.mjs → chunk-VLGZJRPG-ChVasMna.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-BrLYHV3X.mjs → chunk-VOBGTVA6-BT7gUxqf.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-CyUuqbM6.mjs → chunk-VYOJP4TV-BvibOnKG.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-Bs2wgFlc.mjs → chunk-WKFATFPP-DCZdrA8x.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-Bcm-Bs1P.mjs → chunk-X2AJGDEF-BaH6i1Rq.mjs} +1 -1
- package/dist/{chunk-XHM67O4N-VMZIJhmy.mjs → chunk-XHM67O4N-akBjDPaR.mjs} +1 -1
- package/dist/{chunk-XKQRETAK--OBLek3Q.mjs → chunk-XKQRETAK-cVWA9gEB.mjs} +2 -2
- package/dist/{chunk-XORM457F-DPa9UklK.mjs → chunk-XORM457F-BlSrSdGX.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-D-2j42Wk.mjs → chunk-XVDPCNWR-CtK-Xs2O.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-DLBC7Zw_.mjs → chunk-YCFVLTST-uJkMN44i.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-QAvMGKqJ.mjs → chunk-YFG2CMIF-DYVCRkoM.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-DzToRSq3.mjs → chunk-YNYSPYQ5-DesxOVHh.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-BLSxIHIX.mjs → chunk-YS3AZT3J-DqU1hDNV.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DC2EcahF.mjs → chunk-YTNYSM6T-ChSQxUVG.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-Dwj1jdge.mjs → chunk-Z6LRHWXI-CEAGkbzj.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-B1GYGO5h.mjs → chunk-Z7JVV2SM-BzR-yvwK.mjs} +2 -2
- package/dist/clear-5CZ5X4YR-DQDNPZFX.mjs +1 -0
- package/dist/cli.mjs +5 -5
- package/dist/{colors-DEbd2OH6.mjs → colors-BtKMHmBX.mjs} +1 -1
- package/dist/colors-t2HkW8lF.mjs +1 -0
- package/dist/column-WLPMMSTS-D7ZdQMYX.mjs +1 -0
- package/dist/comm-5SLSESQG-D314YMTX.mjs +1 -0
- package/dist/constants-ZD4bB9uD.mjs +2 -0
- package/dist/cp-XOYR4ABJ-BoeqT96E.mjs +1 -0
- package/dist/{curl-47BFPSFW-D1Ai6Ase.mjs → curl-47BFPSFW-CseKVLFy.mjs} +2 -2
- package/dist/cut-OPC3VAGB-BduNLBmG.mjs +1 -0
- package/dist/date-DD7FVA2V-CXtS-UgC.mjs +1 -0
- package/dist/diff-HJF2MPDN-BIBcfzYf.mjs +1 -0
- package/dist/dirname-LEMTZZFS-y-nYlas9.mjs +1 -0
- package/dist/{dist-BRdwpvRU.mjs → dist-CL9tjej4.mjs} +1 -1
- package/dist/{dist-Ca54A9UG.mjs → dist-DUA-uDSk.mjs} +64 -64
- package/dist/du-WO2ENHXQ-DxBFDhE9.mjs +1 -0
- package/dist/echo-O45JWWI2-D2qFOnG-.mjs +1 -0
- package/dist/env-5EPCWSXR-3enSMuUq.mjs +1 -0
- package/dist/{execAsync-Bpfn4nfY.mjs → execAsync-0jii24p9.mjs} +1 -1
- package/dist/{execAsync-BtSomP_N.mjs → execAsync-Czqc-yAz.mjs} +1 -1
- package/dist/{execAsync-D93HRpVy.mjs → execAsync-DgmLXmTx.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-ByrWF7LC.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-ZEK-CtLJ.mjs +1 -0
- package/dist/expr-5T3UU5KE-DslbMHGH.mjs +1 -0
- package/dist/file-ZIGAJ4YS-5ydJB32I.mjs +1 -0
- package/dist/find-TPUOAIUQ-B-6hQsZ1.mjs +1 -0
- package/dist/flag-coverage-QT4N2Z44-BWjM15GF.mjs +2 -0
- package/dist/fold-LDSORVYE-BcrX-J9k.mjs +1 -0
- package/dist/{getMachineId-bsd-B17iO60u.mjs → getMachineId-bsd-BCJXEJCn.mjs} +2 -2
- package/dist/{getMachineId-bsd-CoWfSNjc.mjs → getMachineId-bsd-D7C80Q-x.mjs} +2 -2
- package/dist/{getMachineId-bsd-OuF-VvA3.mjs → getMachineId-bsd-GIcY1fmf.mjs} +2 -2
- package/dist/{getMachineId-darwin-BpLOQVU5.mjs → getMachineId-darwin-C9wsuHP1.mjs} +2 -2
- package/dist/{getMachineId-darwin-CVTu_op_.mjs → getMachineId-darwin-D9y6ky_l.mjs} +2 -2
- package/dist/{getMachineId-darwin-t-Bfqk_6.mjs → getMachineId-darwin-DG876t7S.mjs} +2 -2
- package/dist/{getMachineId-linux-BnxRLexR.mjs → getMachineId-linux-BJESQahL.mjs} +1 -1
- package/dist/{getMachineId-linux-DeBhqVXn.mjs → getMachineId-linux-Bt9mk0EE.mjs} +1 -1
- package/dist/{getMachineId-linux-BmnQivfI.mjs → getMachineId-linux-D9atImpV.mjs} +1 -1
- package/dist/{getMachineId-unsupported-CsZB09JV.mjs → getMachineId-unsupported-DAbsbHrs.mjs} +1 -1
- package/dist/{getMachineId-unsupported-DpFmOcSz.mjs → getMachineId-unsupported-Dabs3aBp.mjs} +1 -1
- package/dist/{getMachineId-unsupported-60J1q9rW.mjs → getMachineId-unsupported-cApRznzG.mjs} +1 -1
- package/dist/{getMachineId-win-BqUG1yKa.mjs → getMachineId-win-1MPHaim9.mjs} +2 -2
- package/dist/{getMachineId-win-DPcPexEZ.mjs → getMachineId-win-CH98qgwX.mjs} +2 -2
- package/dist/{getMachineId-win-B1Mk_gfO.mjs → getMachineId-win-CU_iAQo9.mjs} +2 -2
- package/dist/{gh-detect-CauEoJLn.mjs → gh-detect-DIxiI-Um.mjs} +2 -2
- package/dist/git-handle-BJwB5EBp-D5YTDzvd.mjs +1 -0
- package/dist/git-handle-uz8TUFSi-BRV63-ar.mjs +10 -0
- package/dist/grep-3AIAIJVR-Gk5ggptS.mjs +1 -0
- package/dist/gzip-AQXSGOVS-DVhom50G.mjs +1 -0
- package/dist/head-HT2B6D2J-ahSJqSiq.mjs +1 -0
- package/dist/help-VVWX7SA5-DWuklTmV.mjs +1 -0
- package/dist/history-J4QRNGRO-DF-FzAzf.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BduSSI6z.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-Dyh1D0fg.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/init-B3sHjwRn.mjs +1 -0
- package/dist/{init-CVUAGlni.mjs → init-BJpQMku2.mjs} +4 -4
- package/dist/{is-object-Cg453afR.mjs → is-object-C-4FJ0rP.mjs} +1 -1
- package/dist/join-GG2LDHE5-DbbozPoG.mjs +1 -0
- package/dist/jq-ODXZBPLY-DDNFO29H.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-BYzv20nM.mjs → js-exec-M6UR76J5-Cw-W_H_2.mjs} +2 -2
- package/dist/{lib-DvSbHPnW.mjs → lib-Dl2j2VNl.mjs} +1 -1
- package/dist/{libesm-YL3Bqolr.mjs → libesm-B_qVEpZ1.mjs} +1 -1
- package/dist/ln-4TRFBYAT-D-c9GUlv.mjs +1 -0
- package/dist/{loader-DEjyJycG.mjs → loader-9ZE042z8.mjs} +2 -2
- package/dist/loader-CAPOtJR1.mjs +1 -0
- package/dist/ls-KSXFZCWH-Cpvwn_RB.mjs +1 -0
- package/dist/{lzma-CldL5ztj.mjs → lzma-BSHkPrAt.mjs} +1 -1
- package/dist/{mcp-migrate-event-CyH1VVyy.mjs → mcp-migrate-event-BF8ILHwp.mjs} +1 -1
- package/dist/md5sum-INMIK4DX-ysJE_fRH.mjs +1 -0
- package/dist/mkdir-TDEMSB6C-Doj-uc1V.mjs +1 -0
- package/dist/mv-Z6MORUFL-CB3JJwR7.mjs +1 -0
- package/dist/nl-U5YJDM32-DNpHPr0D.mjs +1 -0
- package/dist/od-VJEF2UR5-CU4HUmLC.mjs +1 -0
- package/dist/{open-browser-C9GRQw2D.mjs → open-browser-C6LU_1mt.mjs} +1 -1
- package/dist/paste-7N6AFSDS-CRLhW5JD.mjs +1 -0
- package/dist/preview-_ZVhPWmW.mjs +1 -0
- package/dist/{preview-8GeUlQ4U.mjs → preview-eJbjCNUv.mjs} +2 -2
- package/dist/printf-CX64KX2P-BRDA91sv.mjs +1 -0
- package/dist/pwd-D4OZ7N27-DOBMwDAQ.mjs +1 -0
- package/dist/{python3-AUFTPCU6-8zelkhgh.mjs → python3-AUFTPCU6-C02r6EXI.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-C7jxdmka.mjs +1 -0
- package/dist/{repair-launch-json-D4EDx1qE.mjs → repair-launch-json-i_sB1efd.mjs} +2 -2
- package/dist/{repair-mcp-configs-C4W8hER9.mjs → repair-mcp-configs-KzNjJe5Y.mjs} +2 -2
- package/dist/{repair-skills-Cjs7REOr.mjs → repair-skills-B0MyM-S8.mjs} +2 -2
- package/dist/repair-skills-B75azgiA.mjs +1 -0
- package/dist/rev-XOSYPP45-BrzxRIO9.mjs +1 -0
- package/dist/rg-FOQSCCX3-D0ctWk6O.mjs +1 -0
- package/dist/rm-RTZG23RL-DZt78fCD.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-CJJKrOdm.mjs +1 -0
- package/dist/sed-VFTTATXJ-Cv8KiT35.mjs +1 -0
- package/dist/seq-RN5ZUASB-BD6p5vId.mjs +1 -0
- package/dist/server-lock-BIY3RMaC-CfCHCMTe.mjs +2 -0
- package/dist/server-lock-v2ktHD7l-C-3wEnoU.mjs +1 -0
- package/dist/sha1sum-VJPNLNU6-DukJfnER.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-QlLE_NGo.mjs +1 -0
- package/dist/sleep-VZFPZFWA-gwZmptDS.mjs +1 -0
- package/dist/sort-DCNRDA7U-Bnmzizlk.mjs +1 -0
- package/dist/split-SITCSYCZ-NsOC8k0n.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-D2ymLPIL.mjs +1 -0
- package/dist/{src-BQr1GKJv.mjs → src-DgUEXwrg.mjs} +2 -2
- package/dist/{start-CldQJe7l.mjs → start-BjM8Y0Uq.mjs} +2 -2
- package/dist/start-BweZxW7r.mjs +1 -0
- package/dist/stat-BT5A227F-Di81wqB8.mjs +1 -0
- package/dist/strings-7PLOGTPD-DKTG3t3M.mjs +1 -0
- package/dist/tac-SJGXQ4T2-CMuGqDl5.mjs +1 -0
- package/dist/tail-S5ULNTJU-CxhswWhX.mjs +1 -0
- package/dist/tar-ANUBEFJY-BajYpRKO.mjs +1 -0
- package/dist/tee-O7VXZDCO-DwJ0hUpW.mjs +1 -0
- package/dist/time-DEUO3QV2-W5vzutuD.mjs +1 -0
- package/dist/timeout-VRKMCG72-wW3XOtt7.mjs +1 -0
- package/dist/touch-DX2IJOQ4-C7eGjNGd.mjs +1 -0
- package/dist/tr-2HXZRDSW-DlafN6SW.mjs +1 -0
- package/dist/tree-LYXBS7DC-Ou8JkGQ1.mjs +1 -0
- package/dist/true-WHJNXCHG-B4B4ZHqp.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-D6xZmTWp.mjs +1 -0
- package/dist/uniq-SUNANL47-Ce9L4IzE.mjs +1 -0
- package/dist/wc-TQB3VNOX-dwG38U4n.mjs +1 -0
- package/dist/which-XZHEH76L-Cw9SQliE.mjs +1 -0
- package/dist/whoami-DGKU3D2X-hzRI9gvz.mjs +1 -0
- package/dist/{write-project-skill-yR3pYdTj.mjs → write-project-skill-grQBEqMb.mjs} +2 -2
- package/dist/xan-BXDXYEIB-loWv9Mk3.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-8Lt55NoE.mjs +1 -0
- package/dist/xargs-I6EZUCYF-CG6axhMW.mjs +1 -0
- package/dist/yazl-CJayzk0b.mjs +1 -0
- package/dist/{yazl-BKdvfH0Q.mjs → yazl-DjRp4wSy.mjs} +1 -1
- package/dist/yq-MJMAR36V-CsEAtdgj.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-DiMuvZ_b.mjs +0 -1
- package/dist/awk2-POPGKRAI-BeVnDraO.mjs +0 -1
- package/dist/base64-4YMZCVJ5-B4tjJP2m.mjs +0 -1
- package/dist/basename-AA2KJYZQ-BDBZjFZG.mjs +0 -1
- package/dist/bash-IJWYRKFO-UQr9bYdp.mjs +0 -1
- package/dist/build-5_QDpj2G.mjs +0 -1
- package/dist/cat-RDUMLXKC-D-Lvspp-.mjs +0 -1
- package/dist/chmod-SYMGL4JA-C9nV9I5a.mjs +0 -1
- package/dist/clear-5CZ5X4YR-DKZjZQKM.mjs +0 -1
- package/dist/colors-B75xIh3W.mjs +0 -1
- package/dist/column-WLPMMSTS-KeKoME8E.mjs +0 -1
- package/dist/comm-5SLSESQG-f07t_kbe.mjs +0 -1
- package/dist/constants-DoYWKOfq.mjs +0 -2
- package/dist/cp-XOYR4ABJ-T4RhGkGw.mjs +0 -1
- package/dist/cut-OPC3VAGB-I2VCQmsN.mjs +0 -1
- package/dist/date-DD7FVA2V-726kEzqx.mjs +0 -1
- package/dist/diff-HJF2MPDN-DGxFa9Fq.mjs +0 -1
- package/dist/dirname-LEMTZZFS-BXgOaoej.mjs +0 -1
- package/dist/du-WO2ENHXQ-BsCwKI6D.mjs +0 -1
- package/dist/echo-O45JWWI2-DLZg7wXN.mjs +0 -1
- package/dist/env-5EPCWSXR-C5vCIn-C.mjs +0 -1
- package/dist/expand-DTNXU4LQ-BlyiHu-Q.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-CedPCKSI.mjs +0 -1
- package/dist/expr-5T3UU5KE-Cibsfrp2.mjs +0 -1
- package/dist/file-ZIGAJ4YS-DAHjzYSb.mjs +0 -1
- package/dist/find-TPUOAIUQ-B6Q1kA1J.mjs +0 -1
- package/dist/flag-coverage-QT4N2Z44-CspB_4zD.mjs +0 -2
- package/dist/fold-LDSORVYE-O9T5HKO_.mjs +0 -1
- package/dist/git-handle-CjyGVy33-B_7lAMm9.mjs +0 -10
- package/dist/git-handle-CjyGVy33-lwHYMDQ0.mjs +0 -1
- package/dist/grep-3AIAIJVR-BZ96dHZF.mjs +0 -1
- package/dist/gzip-AQXSGOVS-Cd0FzI4A.mjs +0 -1
- package/dist/head-HT2B6D2J-_8qJ44Y0.mjs +0 -1
- package/dist/help-VVWX7SA5-nLv-kQgx.mjs +0 -1
- package/dist/history-J4QRNGRO-BFBrUjOI.mjs +0 -1
- package/dist/hostname-BK6HG2DE-CSD4JAoH.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-1itrHcsS.mjs +0 -1
- package/dist/init-DIl5O63L.mjs +0 -1
- package/dist/join-GG2LDHE5-CQlHJDoT.mjs +0 -1
- package/dist/jq-ODXZBPLY-S6TqGJov.mjs +0 -1
- package/dist/ln-4TRFBYAT-Ch5rvb9d.mjs +0 -1
- package/dist/loader-7flVKLEn.mjs +0 -1
- package/dist/ls-KSXFZCWH-D_f10oDS.mjs +0 -1
- package/dist/md5sum-INMIK4DX-BX1tQou-.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-BfIhr62Z.mjs +0 -1
- package/dist/mv-Z6MORUFL-BejgWBGu.mjs +0 -1
- package/dist/nl-U5YJDM32-Da4W1JfF.mjs +0 -1
- package/dist/od-VJEF2UR5-CEABTjhC.mjs +0 -1
- package/dist/paste-7N6AFSDS-Dy-ZdSmA.mjs +0 -1
- package/dist/preview-xC9SBSxk.mjs +0 -1
- package/dist/printf-CX64KX2P-BlwE4RVF.mjs +0 -1
- package/dist/pwd-D4OZ7N27-Dt_xnI1A.mjs +0 -1
- package/dist/readlink-MI4GCHJF-Z4cZ2KAJ.mjs +0 -1
- package/dist/repair-skills-BlQp9JSE.mjs +0 -1
- package/dist/rev-XOSYPP45-B-ZnKgE3.mjs +0 -1
- package/dist/rg-FOQSCCX3-CYZLZUMA.mjs +0 -1
- package/dist/rm-RTZG23RL-ibWWiOu8.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-DMTHF36H.mjs +0 -1
- package/dist/rolldown-runtime-twds-ZHy-DU73unG7.mjs +0 -2
- package/dist/sed-VFTTATXJ-aqlHXp32.mjs +0 -1
- package/dist/seq-RN5ZUASB-bQnXHGvz.mjs +0 -1
- package/dist/server-lock-BniQ3qki-C_0QTo_r.mjs +0 -2
- package/dist/server-lock-BniQ3qki-D-qFWWUB.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-CcW4qlsk.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-DrJUb3sN.mjs +0 -1
- package/dist/sleep-VZFPZFWA-B1ZBrvAs.mjs +0 -1
- package/dist/sort-DCNRDA7U-BB4WJgyf.mjs +0 -1
- package/dist/split-SITCSYCZ-x4Y-DA6y.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-CY0-gfQK.mjs +0 -1
- package/dist/start-BGi1RpFb.mjs +0 -1
- package/dist/stat-BT5A227F-D6H5uqhc.mjs +0 -1
- package/dist/strings-7PLOGTPD-DPGaNEOP.mjs +0 -1
- package/dist/tac-SJGXQ4T2-kzO3q4pS.mjs +0 -1
- package/dist/tail-S5ULNTJU-CFPNNUdK.mjs +0 -1
- package/dist/tar-ANUBEFJY-RRKF2LBe.mjs +0 -1
- package/dist/tee-O7VXZDCO-ME2-H9TH.mjs +0 -1
- package/dist/time-DEUO3QV2-BTPD4eTE.mjs +0 -1
- package/dist/timeout-VRKMCG72-B4YT9w6n.mjs +0 -1
- package/dist/touch-DX2IJOQ4-B8zV5e5M.mjs +0 -1
- package/dist/tr-2HXZRDSW-5mSbPCHX.mjs +0 -1
- package/dist/tree-LYXBS7DC-DNl0GTgm.mjs +0 -1
- package/dist/true-WHJNXCHG-CMYHoY79.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-Df742ryg.mjs +0 -1
- package/dist/uniq-SUNANL47-_OEYW1YV.mjs +0 -1
- package/dist/wc-TQB3VNOX-CfS7oyuj.mjs +0 -1
- package/dist/which-XZHEH76L-BQVUqgjz.mjs +0 -1
- package/dist/whoami-DGKU3D2X-DPUnZuMu.mjs +0 -1
- package/dist/xan-BXDXYEIB-D6d2arbs.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-DanvS4LJ.mjs +0 -1
- package/dist/xargs-I6EZUCYF-BE34OAki.mjs +0 -1
- package/dist/yazl-Cw7cic8l.mjs +0 -1
- package/dist/yq-MJMAR36V-XOqahbXI.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{r,t as i}from"./esm-CEs3LWY3.mjs";import{F as a,Ft as o,Lt as s,O as c,Ti as l,_i as u,an as d,bi as f,di as p,dn as m,fn as h,gi as g,gn as _,oi as v,ri as y,ui as b,un as x,vi as S,yn as C}from"./dist-Ca54A9UG.mjs";import"./constants-DoYWKOfq.mjs";import{t as w}from"./is-object-Cg453afR.mjs";import{i as T,o as E,r as ee,s as D,t as O}from"./colors-DEbd2OH6.mjs";import{t as te}from"./preview-8GeUlQ4U.mjs";import{n as ne,t as re}from"./write-project-skill-yR3pYdTj.mjs";import{execFileSync as ie}from"node:child_process";import ae,{basename as oe,dirname as k,isAbsolute as A,join as j,posix as M,relative as N,resolve as P,sep as se,win32 as F}from"node:path";import{existsSync as I,mkdirSync as ce,readFileSync as le,realpathSync as ue,writeFileSync as de}from"node:fs";import L from"node:process";import{homedir as R}from"node:os";import{AsyncLocalStorage as fe,AsyncResource as pe}from"node:async_hooks";import{stripVTControlCharacters as me,styleText as z}from"node:util";import*as he from"node:readline";import{randomUUID as ge}from"node:crypto";import{createServer as _e,request as ve}from"node:http";import{connect as ye}from"node:net";function be(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const xe={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},Se={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},Ce={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},we={...xe,...Se},Te={...xe,...Ce},B=be()?we:Te;Object.entries(Se);var Ee=n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));const De=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),Oe=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,ke=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Ae=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,je=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Me=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Ne=/\t{1,1000}/y,Pe=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Fe=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Ie=/\p{M}+/gu,Le={limit:1/0,ellipsis:``},Re=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Re(i,Le,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Fe,l],[Ae,0],[je,o],[Ne,s],[Pe,c],[Me,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Ie,``)){let t=e.codePointAt(0)||0;if(S=Oe(t)?2:ke(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Me?De(e.slice(p,n.lastIndex)):n===Pe?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},ze={limit:1/0,ellipsis:``,ellipsisWidth:0},V=(e,t={})=>Re(e,ze,t).width,Be=`]8;;`,Ve=RegExp(`(?:\\[(?<code>\\d+)m|\\${Be}(?<uri>.*))`,`y`),He=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Ue=e=>`[${e}m`,We=e=>`${Be}${e}`,Ge=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:V(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=V(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(Be,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ke=e=>{let t=e.split(` `),n=t.length;for(;n&&!V(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},qe=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=V(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=V(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Ge(s,r,t),c=V(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Ge(s,r,t),c=V(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Ge(s,r,t),c=V(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ke(e)));let l=s.join(`
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{r,t as i}from"./esm-CEs3LWY3.mjs";import{F as a,Ft as o,Lt as s,O as c,Ti as l,_i as u,an as d,bi as f,di as p,dn as m,fn as h,gi as g,gn as _,oi as v,ri as y,ui as b,un as x,vi as S,yn as C}from"./dist-DUA-uDSk.mjs";import"./constants-ZD4bB9uD.mjs";import{t as w}from"./is-object-C-4FJ0rP.mjs";import{i as T,o as E,r as ee,s as D,t as O}from"./colors-BtKMHmBX.mjs";import{t as te}from"./preview-eJbjCNUv.mjs";import{n as ne,t as re}from"./write-project-skill-grQBEqMb.mjs";import{execFileSync as ie}from"node:child_process";import ae,{basename as oe,dirname as k,isAbsolute as A,join as j,posix as M,relative as N,resolve as P,sep as se,win32 as F}from"node:path";import{existsSync as I,mkdirSync as ce,readFileSync as le,realpathSync as ue,writeFileSync as de}from"node:fs";import L from"node:process";import{homedir as R}from"node:os";import{AsyncLocalStorage as fe,AsyncResource as pe}from"node:async_hooks";import{stripVTControlCharacters as me,styleText as z}from"node:util";import*as he from"node:readline";import{randomUUID as ge}from"node:crypto";import{createServer as _e,request as ve}from"node:http";import{connect as ye}from"node:net";function be(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const xe={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},Se={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},Ce={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},we={...xe,...Se},Te={...xe,...Ce},B=be()?we:Te;Object.entries(Se);var Ee=n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));const De=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),Oe=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,ke=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Ae=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,je=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Me=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Ne=/\t{1,1000}/y,Pe=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Fe=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Ie=/\p{M}+/gu,Le={limit:1/0,ellipsis:``},Re=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Re(i,Le,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Fe,l],[Ae,0],[je,o],[Ne,s],[Pe,c],[Me,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Ie,``)){let t=e.codePointAt(0)||0;if(S=Oe(t)?2:ke(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Me?De(e.slice(p,n.lastIndex)):n===Pe?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},ze={limit:1/0,ellipsis:``,ellipsisWidth:0},V=(e,t={})=>Re(e,ze,t).width,Be=`]8;;`,Ve=RegExp(`(?:\\[(?<code>\\d+)m|\\${Be}(?<uri>.*))`,`y`),He=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Ue=e=>`[${e}m`,We=e=>`${Be}${e}`,Ge=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:V(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=V(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(Be,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ke=e=>{let t=e.split(` `),n=t.length;for(;n&&!V(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},qe=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=V(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=V(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Ge(s,r,t),c=V(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Ge(s,r,t),c=V(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Ge(s,r,t),c=V(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ke(e)));let l=s.join(`
|
|
2
2
|
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===``){Ve.lastIndex=e+1;let t=Ve.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
3
3
|
`){a&&(r+=We(``));let e=i?He(i):void 0;i&&e&&(r+=Ue(e))}else t===`
|
|
4
4
|
`&&(i&&He(i)&&(r+=Ue(i)),a&&(r+=We(a)))}return r},Je=/\r?\n/;function Ye(e,t,n){return String(e).normalize().split(Je).map(e=>qe(e,t,n)).join(`
|
|
@@ -273,9 +273,9 @@ for d in "$HOME/.nvm/versions/node"/*/bin "$HOME/.fnm/node-versions"/*/installat
|
|
|
273
273
|
done
|
|
274
274
|
echo "Open Knowledge: install OK Desktop or Node.js 24+, then restart your editor" >&2
|
|
275
275
|
exit 127`]}}function Qn(e){return e===`win32`?F:M}function $n(e={}){let t=e.platformName??process.platform,n=e.home??R();return Qn(t).join(n,`.claude.json`)}function er(e={}){let t=e.platformName??process.platform,n=e.home??R(),r=e.env??process.env;if(t===`darwin`)return M.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??F.join(n,`AppData`,`Roaming`);return F.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function tr(e={}){let t=e.platformName??process.platform,n=e.home??R();return Qn(t).join(n,`.cursor`,`mcp.json`)}function nr(e={}){let t=e.platformName??process.platform,n=e.home??R();return(e.env??process.env).CODEX_HOME??Qn(t).join(n,`.codex`)}function rr(e={}){return Qn(e.platformName??process.platform).join(nr(e),`config.toml`)}const Q={claude:{id:`claude`,label:X.claude,configPath:(e,t)=>$n({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>c,buildEntry:(e,t)=>Z(t),scope:`global`,detectPath:(e,t)=>j(t??R(),`.claude`),projectConfigPath:e=>j(e,`.mcp.json`),projectSkillPath:e=>j(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:X[`claude-desktop`],configPath:(e,t)=>er({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>c,buildEntry:(e,t)=>Z(t),scope:`global`,detectPath:(e,t)=>k(er({home:t}))},cursor:{id:`cursor`,label:X.cursor,configPath:(e,t)=>tr({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>c,buildEntry:(e,t)=>Z(t),scope:`global`,detectPath:(e,t)=>k(tr({home:t})),projectConfigPath:e=>j(e,`.cursor`,`mcp.json`),projectSkillPath:e=>j(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:X.codex,configPath:(e,t)=>rr({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>c,buildEntry:(e,t)=>Z(t),scope:`global`,detectPath:(e,t)=>k(rr({home:t})),projectConfigPath:e=>j(e,`.codex`,`config.toml`),projectSkillPath:e=>j(e,`.agents`,`skills`,`open-knowledge`,`SKILL.md`)}};function ir(e){let t=e.filter(e=>!Object.hasOwn(Q,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${Jn.join(`, `)}`);return e.map(e=>Q[e])}function $(e,t,n,r,i){let a=`urn:uuid:${ge()}`;if(e.headersSent||e.writableEnded||e.destroyed){console.error(`[ok ui] emitProblem called after headers sent — suppressed`,{type:n,status:t,instance:a});return}let o={type:n,title:r,status:t,instance:a,...i===void 0?{}:{detail:i}},s=f.safeParse(o);if(!s.success){console.error(`[ok ui] emitProblem produced an invalid ProblemDetails body:`,{issues:s.error.issues,originalStatus:t,body:o}),e.writeHead(500,{"Content-Type":`application/problem+json`,"X-Content-Type-Options":`nosniff`,"Cache-Control":`no-store`}),e.end(JSON.stringify({type:`urn:ok:error:internal-server-error`,title:`Internal server error.`,status:500,instance:a}));return}e.writeHead(t,{"Content-Type":`application/problem+json`,"X-Content-Type-Options":`nosniff`,"Cache-Control":`no-store`}),e.end(JSON.stringify(o))}const ar=1e4;function or(e,t){let n=e.socket?.remoteAddress;if(n!==void 0&&!_(n))return $(t,403,`urn:ok:error:loopback-required`,`Request must originate from a loopback address.`),!0;if(!h(e.headers.host))return $(t,403,`urn:ok:error:host-not-allowed`,`Host header is not in the loopback allowlist.`),!0;let r=e.headers.origin;return r!==void 0&&!m(r)?($(t,403,`urn:ok:error:invalid-origin`,`Origin header is not in the loopback allowlist.`),!0):!1}const sr=3e4;function cr(e,t){let n=e.socket?.remoteAddress;if(n!==void 0&&!_(n)||!h(e.headers.host))return t.destroy(),!0;let r=e.headers.origin;return typeof r==`string`&&!m(r)?(t.destroy(),!0):!1}function lr(e,t,n,r,i,a){a.add(t),t.once(`close`,()=>a.delete(t));let o=ye({host:r,port:i,timeout:ar});a.add(o),o.once(`close`,()=>a.delete(o));let s=!1,c=n=>{if(!s){if(s=!0,n!==void 0){let t=n.err;console.warn(JSON.stringify({event:n.event,upstreamHost:r,upstreamPort:i,url:e.url,code:t instanceof Error?t.code:void 0,message:t instanceof Error?t.message:void 0}))}try{o.destroy()}catch{}try{t.destroy()}catch{}}};o.once(`connect`,()=>{o.setTimeout(0);let a=[`${e.method??`GET`} ${e.url??`/`} HTTP/1.1`,`host: ${r}:${i}`];for(let[t,n]of Object.entries(e.headers))if(t.toLowerCase()!==`host`&&n!==void 0)if(Array.isArray(n))for(let e of n)a.push(`${t}: ${e}`);else a.push(`${t}: ${n}`);try{o.write(`${a.join(`\r
|
|
276
|
-
`)}\r\n\r\n`),n.length>0&&o.write(n)}catch(e){c({event:`proxy-upgrade-handshake-write-failed`,err:e});return}o.on(`data`,e=>{t.writable&&t.write(e)}),t.on(`data`,e=>{o.writable&&o.write(e)})}),o.once(`timeout`,()=>{c({event:`proxy-upgrade-upstream-connect-timeout`})}),o.on(`error`,e=>c({event:`proxy-upgrade-upstream-error`,err:e})),t.on(`error`,e=>c({event:`proxy-upgrade-client-error`,err:e})),o.once(`close`,()=>c()),t.once(`close`,()=>c())}const ur=[`connection`,`keep-alive`,`proxy-authenticate`,`proxy-authorization`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`cookie`,`set-cookie`];async function dr(e){let t=e.upstreamTimeoutMs??ar,n=new Set,r=_e((n,r)=>{or(n,r)||pr(n,r,e.upstreamHost,e.upstreamPort,t)});r.on(`upgrade`,(t,r,i)=>{cr(t,r)||lr(t,r,i,e.upstreamHost,e.upstreamPort,n)}),await new Promise((t,n)=>{let i=e=>n(e);r.once(`error`,i),r.listen(e.listenPort,e.host,()=>{r.off(`error`,i),t()})});let i=r.address();return{httpServer:r,port:typeof i==`object`&&i?i.port:e.listenPort,close:()=>new Promise(e=>{for(let e of n)try{e.destroy()}catch{}n.clear(),r.close(()=>e()),r.closeIdleConnections()})}}function fr(e,t,n){pr(e,t,n.upstreamHost,n.upstreamPort,n.upstreamTimeoutMs??ar)}function pr(e,t,n,r,i){let a={...e.headers};delete a.host;for(let e of ur)delete a[e];e.setTimeout(sr,()=>{if(t.headersSent)try{t.end()}catch{}else try{$(t,408,`urn:ok:error:request-timeout`,`Proxy request exceeded the per-request deadline.`,`Slow-loris-class: client did not finish within ${sr/1e3}s.`)}catch{}try{e.socket?.destroy()}catch{}});let o=ve({host:n,port:r,method:e.method,path:e.url,headers:{...a,host:`${n}:${r}`}},e=>{let n={...e.headers};for(let e of ur)delete n[e];t.writeHead(e.statusCode??502,n),e.pipe(t),e.once(`error`,()=>{try{t.end()}catch{}})});i>0&&o.setTimeout(i,()=>{if(!t.headersSent)$(t,504,`urn:ok:error:gateway-timeout`,`Upstream did not respond before the gateway deadline.`,`Upstream timeout: ${i/1e3}s elapsed without a response.`);else try{t.end()}catch{}o.destroy()}),o.on(`error`,()=>{if(!t.headersSent)$(t,502,`urn:ok:error:collab-server-not-running`,`Collab server is unreachable.`,`Upstream connection failed or dropped before a response was received.`);else try{t.end()}catch{}}),e.on(`error`,()=>{o.destroy()}),e.pipe(o)}const mr=39847,hr=39848;async function gr(e){await Promise.all(e.map(e=>new Promise(t=>{e.close(()=>t())})))}async function _r(e){let{existsSync:t}=await import(`node:fs`),{createServer:n}=await import(`node:http`),{resolve:r}=await import(`node:path`),{acquireUiLock:i,createAssetServeMiddleware:a,createContentFilter:o,readServerLock:s,releaseUiLock:c,updateUiLockPort:d}=await import(`./dist-
|
|
276
|
+
`)}\r\n\r\n`),n.length>0&&o.write(n)}catch(e){c({event:`proxy-upgrade-handshake-write-failed`,err:e});return}o.on(`data`,e=>{t.writable&&t.write(e)}),t.on(`data`,e=>{o.writable&&o.write(e)})}),o.once(`timeout`,()=>{c({event:`proxy-upgrade-upstream-connect-timeout`})}),o.on(`error`,e=>c({event:`proxy-upgrade-upstream-error`,err:e})),t.on(`error`,e=>c({event:`proxy-upgrade-client-error`,err:e})),o.once(`close`,()=>c()),t.once(`close`,()=>c())}const ur=[`connection`,`keep-alive`,`proxy-authenticate`,`proxy-authorization`,`te`,`trailer`,`transfer-encoding`,`upgrade`,`cookie`,`set-cookie`];async function dr(e){let t=e.upstreamTimeoutMs??ar,n=new Set,r=_e((n,r)=>{or(n,r)||pr(n,r,e.upstreamHost,e.upstreamPort,t)});r.on(`upgrade`,(t,r,i)=>{cr(t,r)||lr(t,r,i,e.upstreamHost,e.upstreamPort,n)}),await new Promise((t,n)=>{let i=e=>n(e);r.once(`error`,i),r.listen(e.listenPort,e.host,()=>{r.off(`error`,i),t()})});let i=r.address();return{httpServer:r,port:typeof i==`object`&&i?i.port:e.listenPort,close:()=>new Promise(e=>{for(let e of n)try{e.destroy()}catch{}n.clear(),r.close(()=>e()),r.closeIdleConnections()})}}function fr(e,t,n){pr(e,t,n.upstreamHost,n.upstreamPort,n.upstreamTimeoutMs??ar)}function pr(e,t,n,r,i){let a={...e.headers};delete a.host;for(let e of ur)delete a[e];e.setTimeout(sr,()=>{if(t.headersSent)try{t.end()}catch{}else try{$(t,408,`urn:ok:error:request-timeout`,`Proxy request exceeded the per-request deadline.`,`Slow-loris-class: client did not finish within ${sr/1e3}s.`)}catch{}try{e.socket?.destroy()}catch{}});let o=ve({host:n,port:r,method:e.method,path:e.url,headers:{...a,host:`${n}:${r}`}},e=>{let n={...e.headers};for(let e of ur)delete n[e];t.writeHead(e.statusCode??502,n),e.pipe(t),e.once(`error`,()=>{try{t.end()}catch{}})});i>0&&o.setTimeout(i,()=>{if(!t.headersSent)$(t,504,`urn:ok:error:gateway-timeout`,`Upstream did not respond before the gateway deadline.`,`Upstream timeout: ${i/1e3}s elapsed without a response.`);else try{t.end()}catch{}o.destroy()}),o.on(`error`,()=>{if(!t.headersSent)$(t,502,`urn:ok:error:collab-server-not-running`,`Collab server is unreachable.`,`Upstream connection failed or dropped before a response was received.`);else try{t.end()}catch{}}),e.on(`error`,()=>{o.destroy()}),e.pipe(o)}const mr=39847,hr=39848;async function gr(e){await Promise.all(e.map(e=>new Promise(t=>{e.close(()=>t())})))}async function _r(e){let{existsSync:t}=await import(`node:fs`),{createServer:n}=await import(`node:http`),{resolve:r}=await import(`node:path`),{acquireUiLock:i,createAssetServeMiddleware:a,createContentFilter:o,readServerLock:s,releaseUiLock:c,updateUiLockPort:d}=await import(`./dist-CL9tjej4.mjs`),{default:f}=await import(`./build-DxnNKCqf.mjs`),{resolveContentDir:m,resolveLockDir:h}=await import(`./dist-CL9tjej4.mjs`),g=m(e.config,e.cwd),_=h(e.cwd);i(_,{port:0,worktreeRoot:e.cwd});let v=import.meta.dirname??new URL(`.`,import.meta.url).pathname,y=[r(v,`public`),r(v,`../../app/dist`),r(v,`../../../app/dist`)].find(e=>t(e)),b=y?f(y,{single:!0,gzip:!0,immutable:!0,extensions:[]}):null,x=t(g)?a({contentFilter:o({projectDir:e.cwd,contentDir:g}),contentSirv:f(g,{dotfiles:!1,dev:!0,extensions:[]}),inlineExtensions:S,assetExtensions:p,blocklistExtensions:u}):null,C=e.port,w=null,T=(e,t)=>{let n=e.url?.split(`?`)[0];if((n===`/`||n===``)&&(e.url=`/index.html`),!(n?.startsWith(`/api/`)&&or(e,t))){if(n===`/api/config`&&(e.method===`GET`||e.method===`HEAD`)){w?.();let n=s(_),r=e.headers.host??`localhost:${C}`,i=n&&n.port>0?`ws://${r}/collab`:null,a=JSON.stringify({collabUrl:i,previewUrl:null,port:C});t.setHeader(`Content-Type`,`application/json`),t.setHeader(`Cache-Control`,`no-store`),t.setHeader(`X-Content-Type-Options`,`nosniff`),t.statusCode=200,e.method===`HEAD`?t.end():t.end(a);return}if(n?.startsWith(`/api/`)){w?.();let r=s(_);if(!r||r.port<=0){$(t,503,`urn:ok:error:collab-server-not-running`,"Collab server not running. Start `ok start` or run `ok status`.",`Path: ${n}`);return}fr(e,t,{upstreamHost:`localhost`,upstreamPort:r.port});return}if(b&&n?.startsWith(`/assets/`)){b(e,t,()=>{x?x(e,t,()=>vr(t,n)):vr(t,n)});return}if(x){x(e,t,()=>{b?b(e,t):vr(t,n)});return}if(b){b(e,t);return}vr(t,n)}},E=new Set,ee=(e,t,n)=>{if(cr(e,t))return;let r=e.url?.split(`?`)[0]??``;if(r!==`/collab`&&!r.startsWith(`/collab/`)){t.destroy();return}let i=s(_);if(!i||i.port<=0){console.warn(JSON.stringify({event:`ok-ui-upgrade-no-collab-lock`,url:r,reason:"server.lock missing or port unbound — is `ok start` running?"})),t.destroy();return}lr(e,t,n,`localhost`,i.port,E)},D=()=>{for(let e of E)try{e.destroy()}catch{}E.clear()},O=e.host===void 0?[`::1`,`127.0.0.1`]:[e.host],te=[],ne=e.port,re=e=>e instanceof Error&&e.code===`EADDRINUSE`,ie=async()=>{await Promise.all(te.splice(0).map(e=>new Promise(t=>{try{e.close(()=>t())}catch{t()}})))},ae=async e=>{ne=e;for(let e of O){let t=n(T);t.on(`upgrade`,ee),te.push(t),await new Promise((n,r)=>{let i=e=>r(e);t.once(`error`,i),t.listen(ne,e,()=>{t.off(`error`,i);let e=t.address();typeof e==`object`&&e&&(ne=e.port),n()})})}};try{try{await ae(e.port)}catch(t){if(e.fallbackToKernel===!0&&re(t))await ie(),await ae(0);else throw t}}catch(e){await ie();try{c(_)}catch{}throw e}let oe=ne;C=oe,d(_,oe);let k=e.scheduler??l,A=e.safetyNetMs??432e5,j=null,M=!1,N=!1,P=()=>{M||(M=!0,j!==null&&(k.clearTimeout(j),j=null))},se=()=>{if(P(),!N){N=!0;try{c(_)}catch{}}},F=()=>{M||A<=0||(j!==null&&(k.clearTimeout(j),j=null),j=k.setTimeout(()=>{j=null,console.warn(`[ui] safety-net (${A}ms) reached — shutting down (D-025 backstop)`);try{e.onSafetyNet?.()}catch{}D();for(let e of te)try{e.close()}catch{}se()},A))},I=()=>{M||A<=0||F()};return w=I,F(),{httpServers:te,port:oe,release:se,detachSafetyNet:P,nudgeSafetyNet:I,drainUpgradeSockets:D}}function vr(e,t){$(e,404,`urn:ok:error:not-found`,`Resource not found.`,t===void 0?void 0:`Path: ${t}`)}function yr(e,t){if(e!==void 0){let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<0||t>65535)throw Error(`Invalid --port value '${e}'`);return{port:t,fallbackToKernel:!1}}if(t!==void 0&&t!==``){let e=Number.parseInt(t,10);if(Number.isNaN(e)||e<0||e>65535)throw Error(`Invalid PORT env value '${t}'`);return{port:e,fallbackToKernel:!1}}return{port:mr,fallbackToKernel:!0}}async function br(e){let t=e.readLock??(async()=>{let{readUiLock:t}=await import(`./dist-CL9tjej4.mjs`);return t(e.lockDir)}),n=await t();if(!n)throw Error(`UI lock collision reported but the lock disappeared before handling — retry acquiring.`);if(n.port===e.requestedPort&&n.port>0)return{mode:`already-running`,port:n.port};let r=n.port;if(r===0){let n=Date.now()+(e.pollDeadlineMs??2e3),i=e.pollIntervalMs??100;for(;Date.now()<n;){await new Promise(e=>{setTimeout(e,i)});let e=await t();if(e&&e.port>0){r=e.port;break}}if(r===0)throw Error("UI did not bind within 2s; run `ok clean`");if(r===e.requestedPort)return{mode:`already-running`,port:r}}return{mode:`proxy`,handle:await dr({listenPort:e.requestedPort,host:e.host,upstreamHost:`localhost`,upstreamPort:r}),upstreamPort:r}}function xr(e){return new i(`ui`).description(`Serve the Open Knowledge React editor UI`).option(`-p, --port <port>`,`UI port (default: $PORT env or ${mr}, kernel-allocated fallback if busy)`).option(`-H, --host <host>`,"UI host. Default: two-socket loopback bind (`[::1]` + `127.0.0.1`) so cross-family collisions fail loud. Pass an explicit host (e.g. `127.0.0.1`, `0.0.0.0`) to bind a single socket on that host.").action(async t=>{let{dim:n}=await import(`./colors-t2HkW8lF.mjs`),{UiLockCollisionError:r}=await import(`./dist-CL9tjej4.mjs`),{resolveLockDir:i}=await import(`./dist-CL9tjej4.mjs`),a=e(),o=t.host,s;try{s=yr(t.port,process.env.PORT)}catch(e){console.error(e instanceof Error?e.message:String(e)),process.exitCode=1;return}let c=s.port;try{let e=await _r({config:a,cwd:process.cwd(),port:c,fallbackToKernel:s.fallbackToKernel,host:o}),t=o===void 0||o===`::`||o===`0.0.0.0`?`localhost`:o;console.log(`${n(`[ui]`)} listening on http://${t}:${e.port}`);let r=!1,i=t=>{if(r)return;r=!0,console.log(n(`\n[ui] Shutting down (${t})`)),e.detachSafetyNet();let i=()=>{try{e.release()}finally{process.exit(process.exitCode??0)}};e.drainUpgradeSockets(),gr(e.httpServers).then(i,i),setTimeout(i,2e3).unref()};process.once(`SIGINT`,()=>i(`SIGINT`)),process.once(`SIGTERM`,()=>i(`SIGTERM`));return}catch(e){if(!(e instanceof r))throw e;let t=i(process.cwd()),a=o??`localhost`,s;try{s=await br({requestedPort:c,host:a,lockDir:t})}catch(e){console.error(e instanceof Error?e.message:String(e)),process.exit(1)}if(s.mode===`already-running`){if(console.log(`UI already running at http://${a}:${s.port}`),Sr(process)){await new Promise(e=>{let t=t=>{console.log(n(`\n[ui-keepalive] Shutting down (${t})`)),e()};process.once(`SIGINT`,()=>t(`SIGINT`)),process.once(`SIGTERM`,()=>t(`SIGTERM`))});return}process.exit(0)}console.log(`UI running at http://${a}:${s.upstreamPort}; acting as HTTP proxy on port ${s.handle.port}`);let l=!1,u=e=>{l||(l=!0,console.log(n(`\n[ui-proxy] Shutting down (${e})`)),s.handle.close().finally(()=>process.exit(process.exitCode??0)),setTimeout(()=>process.exit(process.exitCode??0),2e3).unref())};process.once(`SIGINT`,()=>u(`SIGINT`)),process.once(`SIGTERM`,()=>u(`SIGTERM`))}})}function Sr(e){let t=e.stdout.isTTY===!0,n=typeof e.env.PORT==`string`&&e.env.PORT!==``;return!t||n}function Cr(e){if(!I(e))return{};let t=le(e,`utf-8`).trim();if(t===``)return{};try{let n=JSON.parse(t);if(w(n))return n;throw Error(`${e} root must be a JSON object`)}catch(t){throw t instanceof SyntaxError?Error(`${e} contains invalid JSON: ${t.message}`):t}}function wr(e){if(!I(e))return{};let t=le(e,`utf-8`).trim();if(t===``)return{};try{let n=Fn(t);if(w(n))return n;throw Error(`${e} root must be a TOML table`)}catch(t){throw Error(`${e} contains invalid TOML: ${t instanceof Error?t.message:String(t)}`)}}function Tr(e,t){y(e,`${JSON.stringify(t,null,2)}\n`)}function Er(e,t){let n=Wn(t);y(e,n.endsWith(`
|
|
277
277
|
`)?n:`${n}\n`)}const Dr=e=>e!==`project`,Or=e=>e!==`user`;async function kr(){let e=await dn({message:`Where should the MCP server be configured?
|
|
278
278
|
`,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function Ar(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??kr)():`both`}const jr=`0.0.1`,Mr=`open-knowledge-ui`,Nr=[`-y`,`@inkeep/open-knowledge@latest`,`ui`];function Pr(e,t={}){let n=j(e,`.claude`,`launch.json`),r=t.mode===`dev`?{name:Mr,runtimeExecutable:`node`,runtimeArgs:[Zn(),`ui`],port:hr,autoPort:!0}:{name:Mr,runtimeExecutable:`npx`,runtimeArgs:[...Nr],port:hr,autoPort:!0};try{if(re(n,e),!I(n))return ce(k(n),{recursive:!0}),de(n,`${JSON.stringify({version:jr,configurations:[r]},null,2)}\n`,`utf-8`),{action:`created`,configPath:n};let t=le(n,`utf-8`).trim(),i=t?JSON.parse(t):{};if(!w(i))return{action:`failed`,configPath:n,error:`launch.json root is not an object`};let a=Array.isArray(i.configurations)?i.configurations:[],o=a.findIndex(e=>w(e)&&e.name===`open-knowledge-ui`);o>=0?a[o]=r:a.push(r);let s={...i,version:i.version??jr,configurations:a};return de(n,`${JSON.stringify(s,null,2)}\n`,`utf-8`),{action:o>=0?`merged`:`created`,configPath:n}}catch(e){return{action:`failed`,configPath:n,error:e instanceof Error?e.message:String(e)}}}function Fr(e,t,n){try{return I(e.detectPath?.(t,n)??k(e.configPath(t,n)))}catch{return!1}}function Ir(e,t,n,r,i){let a=e.serverName(t),o;try{o=i??e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:a,error:t instanceof Error?t.message:String(t)}}if(!i&&!n.skipAvailabilityCheck&&!Fr(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{re(o,t)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),configScope:`project`}}let s;try{s=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}try{ce(k(o),{recursive:!0})}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}let c,l;try{v(`${o}.lock`,()=>{let t=e.format===`toml`?wr(o):Cr(o),n=t[e.topLevelKey]??{};c=n[a];let r={...t,[e.topLevelKey]:{...n,[a]:s}};e.format===`toml`?Er(o,r):Tr(o,r)},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){l=e instanceof Error?e:Error(String(e))}return l?{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:l.message,...i===void 0?{}:{configScope:`project`}}:{editorId:e.id,label:e.label,action:c===void 0?`written`:`overwritten`,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}function Lr(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!I(n)))return{editorId:e.id,label:e.label,path:n}}async function Rr(e){let t=ir(e.editors),n={mode:`published`,skipAvailabilityCheck:!0};return t.map(t=>Ir(t,``,n,e.home))}function zr(e,t,n,r){let i=Br(e,t,n,r);return i.kind===`present`?i.entry:null}function Br(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!I(i))return{kind:`absent`};let a;try{a=le(i,`utf-8`)}catch(e){return{kind:`corrupt`,error:e instanceof Error?e.message:String(e)}}if(a.trim()===``)return{kind:`corrupt`,error:`file is empty`};let o;try{o=e.format===`toml`?wr(i):Cr(i)}catch(e){return{kind:`corrupt`,error:e instanceof Error?e.message:String(e)}}let s=o[e.topLevelKey];if(!w(s))return{kind:`no-entry`};let c=s[e.serverName(t)];return w(c)?{kind:`present`,entry:c}:{kind:`no-entry`}}async function Vr(e={}){let t=P(e.cwd??process.cwd()),n=qn(t,{homeDir:e.home}),r=n.projectRoot,i=!I(j(r,`.ok`));n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&console.log(`[ok] Initialized OK at ${r} — opened parent of ${N(r,t)} because it contains a .git folder`);let a={mode:e.devMcp?`dev`:`published`},c=await s(r),l;try{l=d(r,{contentDir:n.defaultContentDir})}catch(t){let n=Q.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:c.didInit,claudeDesktopDetected:!1,mcpAction:`failed`,mcpPath:n,mcpError:`Content scaffolding failed: ${t instanceof Error?t.message:String(t)}`}}let u=await Ar({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),f=e.editors??Ur(r,e.home),p=e.editors??Jn.filter(e=>Q[e].projectConfigPath!==void 0),m=ir(f),h=ir(p),g=e.mcp===!1||u===null,_=Array.from(new Map([...m,...g?[]:h].map(e=>[e.id,e])).values()),v=m.filter(t=>Fr(t,r,e.home)),y=[],b=[],S=new Set;for(let t of _){if(g){let n=``;try{n=t.configPath(r,e.home)}catch{}y.push({editorId:t.id,label:t.label,action:`skipped-flag`,configPath:n,serverName:t.serverName(r)});continue}if(Dr(u)&&m.includes(t)&&y.push(Ir(t,r,a,e.home)),Or(u)&&h.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=Ir(t,r,a,e.home,n);y.push(i),(i.action===`written`||i.action===`overwritten`)&&S.add(n)}}for(let e of h)e.projectSkillPath&&b.push(ne(e,r));let C=!g&&u!==null&&Or(u)?h.filter(e=>!e.projectConfigPath).map(e=>e.label):void 0,w=g?[]:v.map(e=>Lr(e,r)).filter(e=>e!==void 0).filter(e=>!S.has(e.path)),T=v.some(e=>e.id===`claude`)&&!g?Pr(r,a):void 0,E=await(e.installUserSkill??x)({home:e.home}),ee=o({home:e.home}),D=g?`skipped-flag`:`skipped-missing`,O=y.find(e=>e.editorId===`claude`)??y[0]??{action:D,configPath:Q.claude.configPath(r,e.home)};return{projectRoot:r,contentCreated:l.created,contentUpdated:l.updated,contentSkipped:l.skipped,editors:y,projectSkills:b,legacyProjectConfigs:w,launchJson:T,skillInstall:E,didGitInit:c.didInit,claudeDesktopDetected:ee,mcpAction:O.action,mcpPath:O.configPath,mcpError:`error`in O?O.error:void 0,projectScopeUnsupportedLabels:C}}function Hr(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`),s=e=>{let n=e.configPath.startsWith(t)?N(t,e.configPath):e.configPath;switch(e.action){case`created`:return` app preview server ${n} configured for Claude Code Desktop embedded browser`;case`merged`:return` app preview server ${n} updated for Claude Code Desktop embedded browser`;case`failed`:return` app preview server ${n} FAILED: ${e.error}`}};e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`);let c=j(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(O(`Content scaffolded at ${c}/`)),e.contentCreated.length>0&&n.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&n.push(` Updated: ${e.contentUpdated.join(`, `)}`)):n.push(O(`Content already present at ${c}/`)),e.contentSkipped.length>0&&n.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),n.push(``),e.mcpError&&e.editors.length===0)n.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)if(n.push(O(`MCP server configuration:`)),e.mcpAction===`skipped-flag`)n.push(` MCP config not written — use without --no-mcp to configure editors`);else if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}else n.push(` No supported editor config directories detected; skipped MCP registration`);else if(a)n.push(`MCP config not written — use without --no-mcp to configure editors`);else if(o)n.push(O(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(O(`MCP server configuration:`));for(let r of e.editors){let i=r.configPath.startsWith(t)?N(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),a=r.serverName===`open-knowledge`?``:` (${r.serverName})`,o=r.configScope===`project`?` (project)`:``,c=`${r.label}${o}`,l=` `.repeat(Math.max(1,20-c.length)),u=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${c}${l}${i} ${E(`registered`)}${a}${u}`);break;case`overwritten`:n.push(` ${c}${l}${i} ${E(`updated`)}${a}${u}`);break;case`skipped-missing`:n.push(` ${c}${l}${i} config root missing; skipped`);break;case`failed`:n.push(` ${c}${l}${i} ${ee(`FAILED`)}: ${r.error}`);break;case`skipped-flag`:break}r.editorId===`claude`&&e.launchJson&&n.push(s(e.launchJson))}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}}if(e.projectSkills.length>0){n.push(``),n.push(O(`Project-local skills:`));for(let r of e.projectSkills){let e=`${r.label} (project)`,i=` `.repeat(Math.max(1,20-e.length)),a=r.path?N(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${E(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${E(`updated`)}`);break;case`skipped-unsupported`:n.push(` ${e}${i}no known project skill surface; skipped`);break;case`failed`:n.push(` ${e}${i}${a} ${ee(`FAILED`)}: ${r.error}`);break}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${N(t,r.path)}`);n.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(n.push(``),n.push(O(`User-global skill:`)),e.skillInstall){case`installed`:n.push(` open-knowledge ${E(`installed to detected agent hosts`)} via \`npx skills\``);break;case`skip-current`:n.push(` open-knowledge ${E(`already installed at current version`)}`);break;case`failed`:n.push(` ${D(`open-knowledge install failed — MCP still configured; run manually:`)}`),n.push(` ${D(` npx skills@~1.5.0 add <bundled-path> --agent '*' -g -y --copy`)}`);break}if(e.claudeDesktopDetected&&(n.push(``),n.push(`Claude Desktop App detected. To enable in Claude Chat & Cowork, run: ${O(`ok install-skill`)}`)),e.preview?(n.push(``),n.push(te(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),r){let t=new Set,r=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);n.push(``),n.push(`${E(`✓`)} ${O(`Next steps:`)}`),n.push(` 1. Open your editor (${T(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${T(`ok seed`)} — empty repo, Karpathy 3-layer`),n.push(` - ${T(`mcp__open-knowledge__discover`)} — existing repo, extract conventions`),n.push(` 4. Use the MCP workflow tools as you build the wiki:`),n.push(` - ${T(`mcp__open-knowledge__ingest`)} — capture an external source`),n.push(` - ${T(`mcp__open-knowledge__research`)} — gather sources and write findings`),n.push(` - ${T(`mcp__open-knowledge__consolidate`)} — promote research to canonical articles`)}return n.join(`
|
|
279
279
|
`)}function Ur(e,t){let n=[];for(let r of Jn)Fr(Q[r],e,t)&&n.push(r);return n}function Wr(){return new i(`init`).description(`Scaffold .ok/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the .ok/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).addOption(new r(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).action(async e=>{let t=process.cwd(),n;try{n=await Vr({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope})}catch(e){if(e instanceof a){process.stderr.write(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.
|
|
280
|
-
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-
|
|
281
|
-
//# sourceMappingURL=init-
|
|
280
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-_ZVhPWmW.mjs`),{loadConfig:t}=await import(`./loader-CAPOtJR1.mjs`),{resolveContentDir:r}=await import(`./dist-CL9tjej4.mjs`),{config:i}=t(n.projectRoot),a=r(i,n.projectRoot);n.preview=e({projectDir:n.projectRoot,contentDir:a})}catch(e){n.previewWarning=e instanceof Error?e.message:String(e)}process.stdout.write(`${Hr(n,n.projectRoot)}\n`),(n.editors.some(e=>e.action===`failed`)||n.mcpAction===`failed`)&&(process.exitCode=1)})}export{B as A,mt as C,Xe as D,st as E,Ye as O,dt as S,gt as T,Z as _,Hr as a,pt as b,Ar as c,Ir as d,Rr as f,Q as g,X as h,Ur as i,Ee as k,Vr as l,Jn as m,Nr as n,Wr as o,xr as p,Br as r,zr as s,Mr as t,Pr as u,Xn as v,ft as w,ut as x,qn as y};
|
|
281
|
+
//# sourceMappingURL=init-BJpQMku2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{e as t};
|
|
2
|
-
//# sourceMappingURL=is-object-
|
|
2
|
+
//# sourceMappingURL=is-object-C-4FJ0rP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-A7ICOL4V-Drb3XsEL.mjs";export{e as join};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import"./chunk-7TSDKFEO-a-GUGBTu.mjs";import"./chunk-BBXLRYSX-DHx5dxhT.mjs";import{t as e}from"./chunk-YCFVLTST-uJkMN44i.mjs";export{e as jqCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-R6VWJ2ZL-
|
|
1
|
+
import"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as i,t as a}from"./chunk-3THT3N7L-DztAF386.mjs";import{t as o}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{t as s}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{n as c,t as l}from"./chunk-I57KEIP3-DwNGEmJW.mjs";import{fileURLToPath as u}from"node:url";import{AsyncLocalStorage as d}from"node:async_hooks";import{randomBytes as f}from"node:crypto";import{Worker as p}from"node:worker_threads";var m=1e4,h=6e4,g=new d,_=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
|
|
2
2
|
|
|
3
3
|
Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
|
|
4
4
|
|
|
@@ -94,4 +94,4 @@ Limits:
|
|
|
94
94
|
`,exitCode:2};let o=n.isModule,c=n.stripTypes;a&&a!==`-c`&&a!==`<stdin>`&&((a.endsWith(`.mjs`)||a.endsWith(`.mts`)||a.endsWith(`.ts`))&&(o=!0),(a.endsWith(`.ts`)||a.endsWith(`.mts`))&&(c=!0)),!o&&/\bawait\s+[\w([`]/.test(r)&&(o=!0);let l=t.jsBootstrapCode;return O(r,t,a,n.scriptArgs,l,o,c)}},j={name:`node`,async execute(){return{stdout:``,stderr:`node: this sandbox uses js-exec instead of node
|
|
95
95
|
|
|
96
96
|
${_}`,exitCode:1}}};export{A as jsExecCommand,j as nodeStubCommand};
|
|
97
|
-
//# sourceMappingURL=js-exec-M6UR76J5-
|
|
97
|
+
//# sourceMappingURL=js-exec-M6UR76J5-Cw-W_H_2.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{i as e,t}from"./chunk-FK9Q3tQk.mjs";var n=t((t=>{let{promisify:n}=e(`util`),{isUint8Array:r}=e(`util/types`);function i(){try{return e(`../build/Release/zstd.node`)}catch{try{return e(`../build/Debug/zstd.node`)}catch(e){throw e}}}let a=i(),o=n(a.compress),s=n(a.decompress);t.compress=async function(e,t){if(!r(e))throw TypeError(`parameter 'data' must be a Uint8Array.`);if(t!=null&&typeof t!=`number`)throw TypeError(`parameter 'compressionLevel' must be a number.`);try{return await o(e,t??3)}catch(e){throw Error(`zstd: ${e.message}`)}},t.decompress=async function(e){if(!r(e))throw TypeError(`parameter 'data' must be a Uint8Array.`);try{return await s(e)}catch(e){throw Error(`zstd: ${e.message}`)}},t.getDefinedNapiVersion=a.getDefinedNapiVersion}));export default n();export{};
|
|
2
|
-
//# sourceMappingURL=lib-
|
|
2
|
+
//# sourceMappingURL=lib-Dl2j2VNl.mjs.map
|
|
@@ -11,4 +11,4 @@ var e=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&
|
|
|
11
11
|
`),n=e.split(`
|
|
12
12
|
`).map(e=>e+`
|
|
13
13
|
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}export{w as n,_ as r,T as t};
|
|
14
|
-
//# sourceMappingURL=libesm-
|
|
14
|
+
//# sourceMappingURL=libesm-B_qVEpZ1.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-PBXLG62G-CU755yEQ.mjs";export{e as lnCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ei as e,Wi as t,ai as n,ii as r,ji as i,p as a}from"./dist-
|
|
1
|
+
import{Ei as e,Wi as t,ai as n,ii as r,ji as i,p as a}from"./dist-DUA-uDSk.mjs";import{t as o}from"./constants-ZD4bB9uD.mjs";import{t as s}from"./is-object-C-4FJ0rP.mjs";import{resolve as c}from"node:path";import{existsSync as l,readFileSync as u}from"node:fs";import{realpath as d}from"node:fs/promises";async function f(e){let t=c(e);try{return await d(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}var p=t();function m(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];s(a)&&s(i)?n[r]=m(i,a):a!==void 0&&(n[r]=a)}return n}function h(e){if(!l(e))return{value:null,path:e,source:null,doc:null};let t;try{t=u(e,`utf-8`)}catch(t){return console.warn(`[config] Failed to read ${e}: ${t instanceof Error?t.message:t}`),{value:null,path:e,source:null,doc:null}}let n=(0,p.parseDocument)(t);if(n.errors.length>0)return console.warn(`[config] Failed to parse ${e}: ${n.errors.map(e=>e.message).join(`; `)}`),{value:null,path:e,source:t,doc:null};let r=n.toJSON();return s(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}const g=[`include`,`exclude`];function _(e){let t="Run `ok config migrate` to strip the obsolete key from config.yml automatically, or remove it by hand.";return e===`exclude`?[`Move these patterns to .okignore at the project root (gitignore syntax, 1:1 migration).`,t].join(` `):[`content.include has been removed.`,`For subdirectory scoping, set content.dir in .ok/config.yml instead.`,`For pattern-based filtering, use .okignore (gitignore syntax — exclude-only; do not copy include patterns directly).`,t].join(` `)}function v(e){let t=e.value;if(!s(t))return[];let n=t.content;if(!s(n))return[];let r=[];for(let t of g)if(t in n){let n=[`content`,t],a;e.doc!==null&&e.source!==null&&(a=i({file:e.path,source:e.source,doc:e.doc,path:n})),r.push({code:`REMOVED_KEY`,path:n,redirect:_(t),...a===void 0?{}:{source:a}})}return r}function y(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),r={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=i({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function b(t){let i=t??process.cwd(),s=[],l=n(`user`,i),u=r({absPath:l}),d={};u.valid&&u.source!==void 0?(d=m(d,u.value),s.push(l)):u.valid;let f=c(i,`.ok`,o),p=h(f);if(p.value!==null){let t=v(p);if(t.length>0)throw Error(t.map(e).join(`
|
|
2
2
|
|
|
3
3
|
`));d=m(d,p.value),s.push(f)}x(d,[`upload`,`maxBytes`],`streaming uploads have no user-facing cap`),x(d,[`github`,`oauthAppClientId`],`use the OPEN_KNOWLEDGE_GITHUB_CLIENT_ID env var instead`),x(d,[`server`,`host`],`use the --host flag or HOST env var instead`),x(d,[`server`,`openOnAgentEdit`]),x(d,[`mcp`,`autoStart`],`to disable auto-start, set OK_MCP_AUTOSTART=0`),x(d,[`mcp`,`tools`,`read_document`,`historyDepth`]),x(d,[`mcp`,`tools`,`grep`,`maxResults`]),x(d,[`mcp`,`tools`,`search`,`maxResults`]),x(d,[`preview`,`baseUrl`],"preview URLs now resolve only to the running UI process — start one with `ok ui`");let g=a.safeParse(d);if(!g.success){let t={code:`SCHEMA_INVALID`,issues:y(g.error.issues,p)};throw Error(e(t))}return{config:g.data,sources:s}}function x(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){if(!s(r))return;r=r[t[e]]}if(!s(r))return;let i=t[t.length-1];if(r[i]===void 0)return;let a=t.join(`.`);console.warn(`[config] ${a} is no longer user-configurable; ${n??`the value is hardcoded in @inkeep/open-knowledge-core`}. Remove the key to silence this warning.`)}function S(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=f(e.startupCwd);return async o=>{let s=await f(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,S as t};
|
|
4
|
-
//# sourceMappingURL=loader-
|
|
4
|
+
//# sourceMappingURL=loader-9ZE042z8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-9ZE042z8.mjs";export{e as loadConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-V7TAPXDL-CnKUp2df.mjs";export{e as lsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire as e}from"node:module";import{EventEmitter as t}from"node:events";import*as n from"node:path";import{createReadStream as r,createWriteStream as i}from"node:fs";import*as a from"node:os";import{fileURLToPath as o}from"node:url";import{Transform as s}from"node:stream";import{pipeline as c}from"node:stream/promises";import*as l from"node:assert";var u=class extends Error{constructor(e,t){super(e),this.name=`LZMAError`,this.errno=t,this.code=t,Error.captureStackTrace(this,this.constructor)}},d=class extends u{constructor(e){super(`Cannot allocate memory`,e),this.name=`LZMAMemoryError`}},ee=class extends u{constructor(e){super(`Memory usage limit was reached`,e),this.name=`LZMAMemoryLimitError`}},te=class extends u{constructor(e){super(`File format not recognized`,e),this.name=`LZMAFormatError`}},ne=class extends u{constructor(e){super(`Invalid or unsupported options`,e),this.name=`LZMAOptionsError`}},re=class extends u{constructor(e){super(`Data is corrupt`,e),this.name=`LZMADataError`}},f=class extends u{constructor(e){super(`No progress is possible`,e),this.name=`LZMABufferError`}},p=class extends u{constructor(e){super(`Programming error`,e),this.name=`LZMAProgrammingError`}};function ie(e,t){switch(e){case 5:return new d(e);case 6:return new ee(e);case 7:return new te(e);case 8:return new ne(e);case 9:return new re(e);case 10:return new f(e);case 11:return new p(e);default:return new u(t||ae(e),e)}}function ae(e){let t=[`Operation completed successfully`,`End of stream was reached`,`Input stream has no integrity check`,`Cannot calculate the integrity check`,`Integrity check type is not available`,`Cannot allocate memory`,`Memory usage limit was reached`,`File format not recognized`,`Invalid or unsupported options`,`Data is corrupt`,`No progress is possible`,`Programming error`];return e<0||e>=t.length?`Unknown LZMA error code: ${e}`:t[e]}var oe=class extends t{constructor(e=10){if(super(),this.maxConcurrent=e,this.queue=[],this.metrics={active:0,queued:0,completed:0,failed:0},e<1)throw RangeError(`maxConcurrent must be at least 1`)}async compress(e,t){return this.enqueue(()=>Q(e,t))}async decompress(e,t){return this.enqueue(()=>$(e,t))}getMetrics(){return{...this.metrics}}get queueLength(){return this.queue.length}get activeCount(){return this.metrics.active}get isAtCapacity(){return this.metrics.active>=this.maxConcurrent}async enqueue(e){return new Promise((t,n)=>{this.queue.push({fn:e,resolve:t,reject:n}),this.metrics.queued=this.queue.length,this.emit(`queue`,{...this.metrics}),this.processQueue()})}processQueue(){if(this.metrics.active>=this.maxConcurrent||this.queue.length===0)return;let e=this.queue.shift();e&&(this.metrics.active++,this.metrics.queued=this.queue.length,this.emit(`start`,{...this.metrics}),Promise.resolve().then(()=>e.fn()).then(t=>{this.metrics.completed++,e.resolve(t),this.emit(`complete`,{...this.metrics})}).catch(t=>{this.metrics.failed++,e.reject(t),this.emit(`error-task`,t,{...this.metrics})}).finally(()=>{this.metrics.active--,this.emit(`metrics`,{...this.metrics}),this.processQueue()}))}async drain(){return this.metrics.active===0?Promise.resolve():new Promise(e=>{let t=()=>{this.metrics.active===0&&(this.off(`metrics`,t),e())};this.on(`metrics`,t)})}clearQueue(){let e=this.queue.length,t=Error(`Task cancelled: queue cleared`);for(let e of this.queue)e.reject(t);return this.queue=[],this.metrics.queued=0,this.emit(`metrics`,{...this.metrics}),e}};const se=o(import.meta.url),ce=n.dirname(se),le=e(import.meta.url),ue=n.resolve(n.join(ce,`..`)),m=le(`node-gyp-build`)(ue),de=a.cpus().length,h={NONE:m.LZMA_CHECK_NONE,CRC32:m.LZMA_CHECK_CRC32,CRC64:m.LZMA_CHECK_CRC64,SHA256:m.LZMA_CHECK_SHA256},g={DEFAULT:m.LZMA_PRESET_DEFAULT,EXTREME:m.LZMA_PRESET_EXTREME},fe={TELL_NO_CHECK:m.LZMA_TELL_NO_CHECK,TELL_UNSUPPORTED_CHECK:m.LZMA_TELL_UNSUPPORTED_CHECK,TELL_ANY_CHECK:m.LZMA_TELL_ANY_CHECK,CONCATENATED:m.LZMA_CONCATENATED},_={LZMA2:m.LZMA_FILTER_LZMA2,X86:m.LZMA_FILTER_X86,POWERPC:m.LZMA_FILTER_POWERPC,IA64:m.LZMA_FILTER_IA64,ARM:m.LZMA_FILTER_ARM,ARMTHUMB:m.LZMA_FILTER_ARMTHUMB,SPARC:m.LZMA_FILTER_SPARC},v={FAST:m.LZMA_MODE_FAST,NORMAL:m.LZMA_MODE_NORMAL},y={RUN:m.LZMA_RUN,SYNC_FLUSH:m.LZMA_SYNC_FLUSH,FULL_FLUSH:m.LZMA_FULL_FLUSH,FINISH:m.LZMA_FINISH},b={OK:m.LZMA_OK,STREAM_END:m.LZMA_STREAM_END,NO_CHECK:m.LZMA_NO_CHECK,UNSUPPORTED_CHECK:m.LZMA_UNSUPPORTED_CHECK,GET_CHECK:m.LZMA_GET_CHECK,MEM_ERROR:m.LZMA_MEM_ERROR,MEMLIMIT_ERROR:m.LZMA_MEMLIMIT_ERROR,FORMAT_ERROR:m.LZMA_FORMAT_ERROR,OPTIONS_ERROR:m.LZMA_OPTIONS_ERROR,DATA_ERROR:m.LZMA_DATA_ERROR,BUF_ERROR:m.LZMA_BUF_ERROR,PROG_ERROR:m.LZMA_PROG_ERROR},x={..._,X86_ALT:m.LZMA_FILTER_X86,POWERPC_ALT:m.LZMA_FILTER_POWERPC,IA64_ALT:m.LZMA_FILTER_IA64,ARM_ALT:m.LZMA_FILTER_ARM,ARMTHUMB_ALT:m.LZMA_FILTER_ARMTHUMB,FILTERS_MAX:m.LZMA_FILTERS_MAX},S=y.RUN,C=y.SYNC_FLUSH,w=y.FULL_FLUSH,T=y.FINISH,E=b.OK,D=b.STREAM_END,O=b.NO_CHECK,k=b.UNSUPPORTED_CHECK,A=b.GET_CHECK,j=b.MEM_ERROR,M=b.MEMLIMIT_ERROR,N=b.FORMAT_ERROR,P=b.OPTIONS_ERROR,F=b.DATA_ERROR,I=b.BUF_ERROR,L=b.PROG_ERROR,R=x.X86_ALT,z=x.POWERPC_ALT,B=x.IA64_ALT,V=x.ARM_ALT,pe=x.ARMTHUMB_ALT,H=x.FILTERS_MAX;var U=class extends s{constructor(e,t={},n){super(n);let r;if(t.filters){if(!Array.isArray(t.filters))throw Error(`Filters need to be in an array!`);try{r=[...t.filters]}catch{throw Error(`Filters need to be in an array!`)}}else r=[_.LZMA2];this._opts={check:t.check??h.NONE,preset:t.preset??g.DEFAULT,filters:r,mode:t.mode??v.NORMAL,threads:t.threads??1,chunkSize:t.chunkSize??m.BUFSIZ,flushFlag:t.flushFlag??m.LZMA_RUN},this._chunkSize=this._opts.chunkSize,this._flushFlag=this._opts.flushFlag,l.ok(Array.isArray(this._opts.filters),`Filters need to be in an array!`),this._opts.filters.indexOf(_.LZMA2)===-1&&this._opts.filters.push(_.LZMA2);let i=this._opts.filters.indexOf(_.LZMA2);i!==-1&&i!==this._opts.filters.length-1&&(this._opts.filters.splice(i,1),this._opts.filters.push(_.LZMA2)),e===m.STREAM_ENCODE&&(m.HAS_THREADS_SUPPORT||(this._opts.threads=1),this._opts.threads===0&&(this._opts.threads=de)),this.lzma=new m.LZMA(e,this._opts),this._closed=!1,this._hadError=!1,this._offset=0,this._buffer=Buffer.alloc(this._chunkSize),this._bytesRead=0,this._bytesWritten=0,this.on(`onerror`,e=>{this._hadError=!0;let t=this._createLZMAError(e);this.emit(`error`,t)}),this.once(`end`,()=>this.close())}_createLZMAError(e){return ie(e)}get bytesRead(){return this._bytesRead}get bytesWritten(){return this._bytesWritten}_emitProgress(){let e={bytesRead:this._bytesRead,bytesWritten:this._bytesWritten};this.emit(`progress`,e)}_reallocateBuffer(){this._offset=0,this._buffer=Buffer.alloc(this._chunkSize)}flush(e,t){let n=this._writableState,r,i;typeof e==`function`||e===void 0&&!t?(i=e,r=m.LZMA_SYNC_FLUSH):(r=e,i=t),n.ended?i&&process.nextTick(i):n.ending?i&&this.once(`end`,i):n.needDrain?this.once(`drain`,()=>{this.flush(i)}):(this._flushFlag=r,this.write(Buffer.alloc(0),`utf8`,i))}close(e){e&&process.nextTick(e),!this._closed&&(this.lzma.close(),this._closed=!0,process.nextTick(()=>{this.emit(`close`)}))}_transform(e,t,n){let r=this._writableState,i=(r.ending||r.ended)&&(!e||r.length===e.length);if(e!==null&&!(e instanceof Buffer)){n(Error(`invalid input`));return}if(this._closed){n(Error(`lzma binding closed`));return}e&&(this._bytesRead+=e.length);let a;i?a=m.LZMA_FINISH:(a=this._flushFlag,e&&e.length>=r.length&&(this._flushFlag=this._opts.flushFlag)),this._processChunk(e,a,n)}_flush(e){if(this._closed){process.nextTick(()=>e());return}this._transform(Buffer.alloc(0),`utf8`,e)}_processChunk(e,t,n){let r=typeof n==`function`;l.ok(!this._closed,`Stream closed!`);let i=e?.length,a=this._chunkSize-this._offset,o=0;if(!r){let n=[],r=0,s=null,c=(e,t,s)=>{if(this._hadError)return!1;if(e!==m.LZMA_OK&&e!==m.LZMA_STREAM_END)return this.emit(`onerror`,e),!1;let c=a-s;if(l.ok(c>=0,`More bytes after than before! Delta = ${c}`),c>0){let e=this._buffer.subarray(this._offset,this._offset+c);this._offset+=c,n.push(e),r+=c}return(s===0||this._offset>=this._chunkSize)&&(a=this._chunkSize,this._reallocateBuffer()),s===0||t>0?(o+=(i??0)-t,i=t,!0):!1};for(this.on(`error`,e=>{s=e});;){let[n,r,a]=this.lzma.codeSync(t,e,o,i,this._buffer,this._offset);if(this._hadError||!c(n,r,a))break}try{if(this._hadError)throw s??Error(`Unknown LZMA error`);return Buffer.concat(n,r)}finally{this.close()}}let s=(r,c,u)=>{if(this._hadError)return!1;if(r!==m.LZMA_OK&&r!==m.LZMA_STREAM_END)return this.emit(`onerror`,r),!1;let d=a-u;if(l.ok(d>=0,`More bytes after than before! Delta = ${d}`),d>0){let e=this._buffer.subarray(this._offset,this._offset+d);this._offset+=d,this._bytesWritten+=d,this.push(e),this._emitProgress()}if((u===0||this._offset>=this._chunkSize)&&(a=this._chunkSize,this._reallocateBuffer()),u===0||c>0)return o+=(i??0)-c,i=c,this.lzma.code(t,e,o,i,this._buffer,this._offset,s),!1;if(n&&!this._closed)try{n()}catch{this.emit(`onerror`,m.LZMA_PROG_ERROR)}return!1};this.lzma.code(t,e,o,i,this._buffer,this._offset,s)}},W=class extends U{constructor(e,t){super(m.STREAM_ENCODE,e,t)}},G=class extends U{constructor(e,t){super(m.STREAM_DECODE,e,t)}};function K(e,t){return new W(e,t)}function q(e,t){return new G(e,t)}function me(){return m.HAS_THREADS_SUPPORT}function he(e){return m.isXZ(e)}function ge(){return m.versionString()}function _e(){return m.versionNumber()}function ve(e){return m.easyEncoderMemusage(e)}function ye(){return m.easyDecoderMemusage()}function be(e){return m.parseFileIndex(e)}var J;(function(e){e.SUCCESS=`Operation completed successfully`,e.STREAM_END=`End of stream was reached`,e.NO_CHECK=`Input stream has no integrity check`,e.UNSUPPORTED_CHECK=`Cannot calculate the integrity check`,e.GET_CHECK=`Integrity check type is not available`,e.MEM_ERROR=`Cannot allocate memory`,e.MEMLIMIT_ERROR=`Memory usage limit was reached`,e.FORMAT_ERROR=`File format not recognized`,e.OPTIONS_ERROR=`Invalid or unsupported options`,e.DATA_ERROR=`Data is corrupt`,e.BUF_ERROR=`No progress is possible`,e.PROG_ERROR=`Programming error`})(J||={});const xe=[J.SUCCESS,J.STREAM_END,J.NO_CHECK,J.UNSUPPORTED_CHECK,J.GET_CHECK,J.MEM_ERROR,J.MEMLIMIT_ERROR,J.FORMAT_ERROR,J.OPTIONS_ERROR,J.DATA_ERROR,J.BUF_ERROR,J.PROG_ERROR];function Y(e,t,n){let r,i;typeof t==`function`?(i=t,r={}):(r=t,i=n),Ce(new G(r),e,i)}function Se(e,t){return we(new G(t),e)}function X(e,t,n){let r,i;typeof t==`function`?(i=t,r={}):(r=t,i=n),Ce(new W(r),e,i)}function Z(e,t){return we(new W(t),e)}function Q(e,t){return new Promise((n,r)=>{X(e,t||{},(e,t)=>{e?r(e):n(t)})})}function $(e,t){return new Promise((n,r)=>{Y(e,t||{},(e,t)=>{e?r(e):n(t)})})}function Ce(e,t,n){let r=[],i=0,a=()=>{let t;for(;(t=e.read())!==null;)r.push(t),i+=t.length;e.once(`readable`,a)},o=()=>{n(null,Buffer.concat(r,i)),e.close()};e.on(`error`,t=>{e.removeListener(`end`,o),e.removeListener(`readable`,a),n(t)}),e.on(`end`,o),e.end(t),a()}function we(e,t){let n;if(typeof t==`string`)n=Buffer.from(t);else if(t instanceof Buffer)n=t;else throw TypeError(`Not a string or buffer`);return e._processChunk(n,m.LZMA_FINISH)}async function Te(e,t,n){let a=r(e),o=i(t);await c(a,K(n),o)}async function Ee(e,t,n){let a=r(e),o=i(t);await c(a,q(n),o)}var De={Xz:W,Unxz:G,XzStream:U,hasThreads:me,messages:xe,check:h,preset:g,flag:fe,filter:_,mode:v,createXz:K,createUnxz:q,unxz:Y,unxzSync:Se,xz:X,xzSync:Z,xzAsync:Q,unxzAsync:$,LZMA_RUN:S,LZMA_SYNC_FLUSH:C,LZMA_FULL_FLUSH:w,LZMA_FINISH:T,LZMA_OK:E,LZMA_STREAM_END:D,LZMA_NO_CHECK:O,LZMA_UNSUPPORTED_CHECK:k,LZMA_GET_CHECK:A,LZMA_MEM_ERROR:j,LZMA_MEMLIMIT_ERROR:M,LZMA_FORMAT_ERROR:N,LZMA_OPTIONS_ERROR:P,LZMA_DATA_ERROR:F,LZMA_BUF_ERROR:I,LZMA_PROG_ERROR:L,LZMA_FILTER_X86:R,LZMA_FILTER_POWERPC:z,LZMA_FILTER_IA64:B,LZMA_FILTER_ARM:V,LZMA_FILTER_ARMTHUMB:pe,LZMA_FILTERS_MAX:H};export{y as LZMAAction,f as LZMABufferError,re as LZMADataError,u as LZMAError,J as LZMAErrorMessage,x as LZMAFilter,te as LZMAFormatError,d as LZMAMemoryError,ee as LZMAMemoryLimitError,ne as LZMAOptionsError,oe as LZMAPool,p as LZMAProgrammingError,b as LZMAStatus,I as LZMA_BUF_ERROR,F as LZMA_DATA_ERROR,H as LZMA_FILTERS_MAX,V as LZMA_FILTER_ARM,pe as LZMA_FILTER_ARMTHUMB,B as LZMA_FILTER_IA64,z as LZMA_FILTER_POWERPC,R as LZMA_FILTER_X86,T as LZMA_FINISH,N as LZMA_FORMAT_ERROR,w as LZMA_FULL_FLUSH,A as LZMA_GET_CHECK,M as LZMA_MEMLIMIT_ERROR,j as LZMA_MEM_ERROR,O as LZMA_NO_CHECK,E as LZMA_OK,P as LZMA_OPTIONS_ERROR,L as LZMA_PROG_ERROR,S as LZMA_RUN,D as LZMA_STREAM_END,C as LZMA_SYNC_FLUSH,k as LZMA_UNSUPPORTED_CHECK,G as Unxz,W as Xz,U as XzStream,h as check,q as createUnxz,K as createXz,De as default,ye as easyDecoderMemusage,ve as easyEncoderMemusage,_ as filter,fe as flag,me as hasThreads,he as isXZ,xe as messages,v as mode,be as parseFileIndex,g as preset,Y as unxz,$ as unxzAsync,Ee as unxzFile,Se as unxzSync,_e as versionNumber,ge as versionString,X as xz,Q as xzAsync,Te as xzFile,Z as xzSync};
|
|
2
|
-
//# sourceMappingURL=lzma-
|
|
2
|
+
//# sourceMappingURL=lzma-BSHkPrAt.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
function e(e){let{priorCommand:n,priorArgs:r}=t(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:n,priorArgs:r}}function t(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}export{t as n,e as t};
|
|
2
|
-
//# sourceMappingURL=mcp-migrate-event-
|
|
2
|
+
//# sourceMappingURL=mcp-migrate-event-BF8ILHwp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-APT7OOP2-CXHnSuct.mjs";export{e as md5sumCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-MDDMCKUK-BrBgeH_z.mjs";export{e as mkdirCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-A4JSPFCI-v5lUtffG.mjs";export{e as mvCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-F23WWYKW-DST0dB7V.mjs";export{e as nl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-PP6PSHAB-DMC_XCfO.mjs";export{e as od};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{execFile as e}from"node:child_process";const t=new Set([`http:`,`https:`]),n=/[\u0000-\u0020\u007F-\u009F"'`\\&|<>^()$;{}[\]*?!~]/;function r(e,t){console.warn(`Could not auto-open browser (${t}); visit ${e} manually`)}function i(i){let a;try{a=new URL(i)}catch{r(i,`invalid URL`);return}if(!t.has(a.protocol)){r(i,`unsupported scheme '${a.protocol}'`);return}if(n.test(i)){r(i,`URL contains unsafe characters`);return}e(process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,process.platform===`win32`?[`/c`,`start`,``,i]:[i],e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${i} manually`)})}export{i as openBrowser};
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
2
|
+
//# sourceMappingURL=open-browser-C6LU_1mt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-JVPRLUMK-DnQCNjpq.mjs";export{e as pasteCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-eJbjCNUv.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Ct as e}from"./dist-
|
|
1
|
+
import{Ct as e}from"./dist-DUA-uDSk.mjs";import"./constants-ZD4bB9uD.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-eJbjCNUv.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-T56QNPHK-Dzjonwlk.mjs";export{e as printfCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-A4HU7SVR-hefV_YmW.mjs";export{e as pwdCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-R6VWJ2ZL-
|
|
1
|
+
import"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as i}from"./chunk-24IMIIXA-B6yIPkk2.mjs";import{n as a,t as o}from"./chunk-3THT3N7L-DztAF386.mjs";import{t as s}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{r as c,t as l}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{n as u,t as d}from"./chunk-I57KEIP3-DwNGEmJW.mjs";import{fileURLToPath as f}from"node:url";import{randomBytes as p}from"node:crypto";import{Worker as m}from"node:worker_threads";var h=1e4,g=6e4,_={name:`python3`,summary:`Execute Python code via CPython Emscripten`,usage:`python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]`,description:[`Execute Python code using CPython compiled to WebAssembly via Emscripten.`,``,`This command runs Python in an isolated environment with access to`,`the virtual filesystem. Standard library modules are available.`],options:[`-c CODE Execute CODE as Python script`,`-m MODULE Run library module as a script`,`--version Show Python version`,`--help Show this help`],examples:[`python3 -c "print(1 + 2)"`,`python3 -c "import sys; print(sys.version)"`,`python3 script.py`,`python3 script.py arg1 arg2`,`echo 'print("hello")' | python3`],notes:[`CPython runs in WebAssembly, so execution may be slower than native Python.`,`Standard library modules are available (no pip install).`,`Maximum execution time is 30 seconds by default.`]};function v(e){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(e.length===0)return t;let n=e.findIndex(e=>!e.startsWith(`-`)||e===`-`||e===`--`);for(let r=0;r<(n===-1?e.length:n);r++){let n=e[r];if(n===`-c`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'c'
|
|
2
2
|
`,exitCode:2}:(t.code=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`-m`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'm'
|
|
3
3
|
`,exitCode:2}:(t.module=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`--version`||n===`-V`)return t.showVersion=!0,t;if(n.startsWith(`-`)&&n!==`-`)return{stdout:``,stderr:`python3: unrecognized option '${n}'
|
|
4
4
|
`,exitCode:2}}if(n!==-1){let r=e[n];r===`--`?n+1<e.length&&(t.scriptFile=e[n+1],t.scriptArgs=e.slice(n+2)):(t.scriptFile=r,t.scriptArgs=e.slice(n+1))}return t}var y=new WeakMap;function b(e){let t=y.get(e);return t||(t={executionQueue:[],isExecuting:!1},y.set(e,t)),t}var x=f(new URL(`./worker.js`,import.meta.url));function S(){return p(16).toString(`hex`)}function C(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?{success:!0}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}function w(t){if(t.isExecuting||t.executionQueue.length===0)return;for(;t.executionQueue.length>0&&t.executionQueue[0].canceled;)t.executionQueue.shift();if(t.executionQueue.length===0)return;let n=t.executionQueue.shift();if(!n)return;t.isExecuting=!0;let r;try{r=e.runTrusted(()=>new m(x,{workerData:n.input}))}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t);return}n.workerRef&&(n.workerRef.current=r);let a=i(n.requireDefenseContext,`python3`,`worker message callback`,e=>{n.resolve(C(e,n.input.protocolToken)),t.isExecuting=!1,r.terminate(),w(t)}),c=i(n.requireDefenseContext,`python3`,`worker error callback`,e=>{let r=o(s(e));n.resolve({success:!1,error:r}),t.isExecuting=!1,w(t)}),l=i(n.requireDefenseContext,`python3`,`worker exit callback`,()=>{t.isExecuting&&(n.resolve({success:!1,error:`Worker exited unexpectedly`}),t.isExecuting=!1,w(t))});r.on(`message`,e=>{try{a(e)}catch(e){let i=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(i)}),t.isExecuting=!1,r.terminate(),w(t)}}),r.on(`error`,e=>{try{c(e)}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}}),r.on(`exit`,()=>{try{l()}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}})}async function T(e,a,c,l=[]){let f=u(),p=new d(f,a.fs,a.cwd,`python3`,a.fetch,a.limits?.maxOutputSize??0),m=a.limits?.maxPythonTimeoutMs??h,_=a.fetch?Math.max(m,g):m,v=b(a.fs),y={protocolToken:S(),sharedBuffer:f,pythonCode:e,cwd:a.cwd,env:r(a.env),args:l,scriptPath:c,timeoutMs:_},x={current:null},C=new Promise(e=>{let r={input:y,resolve:()=>{},workerRef:x,requireDefenseContext:a.requireDefenseContext},s=i(a.requireDefenseContext,`python3`,`worker timeout callback`,()=>{x.current?x.current.terminate():r.canceled=!0,e({success:!1,error:`Execution timeout: exceeded ${_}ms limit`})}),c=n(()=>{try{s()}catch(t){e({success:!1,error:o(t instanceof Error?t.message:String(t))})}},_);r.resolve=n=>{t(c),e(n)},v.executionQueue.push(r),w(v)}),[T,E]=await Promise.all([p.run(_).catch(e=>({stdout:``,stderr:`python3: bridge error: ${o(s(e))}
|
|
@@ -9,4 +9,4 @@ import"./chunk-R6VWJ2ZL-DIztW2nG.mjs";import"./chunk-CWQS3NFK-CKoiDb4a.mjs";impo
|
|
|
9
9
|
`,exitCode:2};try{r=await t.fs.readFile(e),i=n.scriptFile}catch(e){let t=a(e.message);return{stdout:``,stderr:`python3: can't open file '${n.scriptFile}': ${t}
|
|
10
10
|
`,exitCode:2}}}else if(t.stdin.trim())r=t.stdin,i=`<stdin>`;else return{stdout:``,stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
|
|
11
11
|
`,exitCode:2};return T(r,t,i,n.scriptArgs)}},D={name:`python`,async execute(e,t){return E.execute(e,t)}};export{E as python3Command,D as pythonCommand};
|
|
12
|
-
//# sourceMappingURL=python3-AUFTPCU6-
|
|
12
|
+
//# sourceMappingURL=python3-AUFTPCU6-C02r6EXI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-HJWBQKYG-UZig4wUt.mjs";export{e as readlinkCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,u as t}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{n as e,u as t}from"./init-BJpQMku2.mjs";import{t as n}from"./is-object-C-4FJ0rP.mjs";import{join as r}from"node:path";import{existsSync as i,readFileSync as a}from"node:fs";const o=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`]];function s(t){if(t.runtimeExecutable!==`npx`||!Array.isArray(t.runtimeArgs))return`preserved`;if(c(t.runtimeArgs,e))return`canonical`;for(let e of o)if(c(t.runtimeArgs,e))return`legacy-bare`;return`preserved`}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function l(e){let o=e.logger??u,c=r(e.projectDir,`.claude`,`launch.json`);if(e.reclaimDisableEnv===`1`)return o({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:c,outcome:`skipped-reclaim-disabled`},repairedCount:0};if(!i(c))return{outcome:{configPath:c,outcome:`no-file`},repairedCount:0};let l;try{let e=a(c,`utf-8`).trim();l=e?JSON.parse(e):{}}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`launch-json-repair-read-failed`,configPath:c,error:t}),{outcome:{configPath:c,outcome:`read-failed`,error:t},repairedCount:0}}if(!n(l)){let e=`launch.json root is not an object`;return o({event:`launch-json-repair-read-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`read-failed`,error:e},repairedCount:0}}let d=l.configurations;if(!Array.isArray(d))return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let f=d.find(e=>n(e)&&e.name===`open-knowledge-ui`);if(!f)return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let p=s(f);if(p===`canonical`)return{outcome:{configPath:c,outcome:`canonical`},repairedCount:0};if(p===`preserved`)return{outcome:{configPath:c,outcome:`preserved`},repairedCount:0};let m=t(e.projectDir,{mode:`published`});if(m.action===`failed`){let e=m.error??`unknown write failure`;return o({event:`launch-json-repair-write-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`write-failed`,error:e},repairedCount:0}}return o({event:`launch-json-repair-applied`,configPath:c}),{outcome:{configPath:c,outcome:`repaired`},repairedCount:1}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-i_sB1efd.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e,g as t,m as n,s as r,v as i}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{d as e,g as t,m as n,s as r,v as i}from"./init-BJpQMku2.mjs";import{t as a}from"./mcp-migrate-event-BF8ILHwp.mjs";import{homedir as o}from"node:os";function s(e){let r=e.logger??u,i=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of n){let n=t[o],s=c(()=>n.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:n,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),n.projectConfigPath){let t=n.projectConfigPath,i=c(()=>t(e.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:n,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},o=r(t.target,t.cwd,t.home,t.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(i(o))return{...n,outcome:`canonical`};t.logger(a({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:o}));let s=e(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-KzNjJe5Y.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./esm-CEs3LWY3.mjs";import{Gn as t,Ln as n,Vn as r,Yr as i,Zn as a}from"./dist-
|
|
1
|
+
import{t as e}from"./esm-CEs3LWY3.mjs";import{Gn as t,Ln as n,Vn as r,Yr as i,Zn as a}from"./dist-DUA-uDSk.mjs";import{t as o}from"./write-project-skill-grQBEqMb.mjs";import{dirname as s,join as c,resolve as l}from"node:path";import{existsSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,rmSync as m,statSync as h,writeFileSync as g}from"node:fs";import{homedir as _}from"node:os";const v=[{hostDir:`.claude`,editorId:`claude`},{hostDir:`.cursor`,editorId:`cursor`},{hostDir:`.agents`,editorId:`codex`}],y=`open-knowledge-discovery`,b=[`.agents`,`skills`,y],x={existsSync:e=>u(e),isDirectory:e=>{try{return h(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>p(e),readFileSync:e=>f(e),writeFileSync:(e,t)=>{g(e,t)},mkdirSync:(e,t)=>{d(e,t)},rmSync:(e,t)=>{m(e,t)}},S={resolveProjectBundledSkillDir:()=>a(`project`,{checkDesktop:!1}),resolveDiscoveryBundledSkillDir:()=>a(`discovery`,{checkDesktop:!1}),readBundledVersion:()=>n(),readRecordedVersion:e=>r(e,`cli-hosts`),writeRecordedVersion:(e,t)=>i(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>t(e)};function C(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function w(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(s(t),{recursive:!0}),T(e,t,n)}function T(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=c(e,r),a=c(t,r);n.isDirectory(i)?T(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function E(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of v){let s=c(e,t.hostDir,`skills`,`open-knowledge`),l=c(s,`SKILL.md`);if(!n.existsSync(l)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:s});continue}try{o(s,e),w(i,s,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`reclaimed`}),r({event:`project-skill-reclaim-reclaimed`,scope:`project`,editorId:t.editorId,path:s})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:s,error:n})}}return{outcome:`done`,entries:a}}async function D(e,t,n,r){let i=e=>{t.recordEvent(e).catch(()=>{})},a=()=>new Date().toISOString(),o;try{o=await t.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let s;try{s=await t.readRecordedVersion(e)}catch(e){r({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),s=null}if(s!==null&&s===o)return r({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:o}),{outcome:`skipped`,reason:`version-current`};let l;try{l=t.resolveDiscoveryBundledSkillDir()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`bundle-missing:${t}`}),{outcome:`skipped`,reason:`bundle-missing`}}let u=[],d=c(e,...b),f=n.existsSync(d);try{w(l,d,n),u.push({kind:`central`,path:d,outcome:f?`overwritten`:`written`}),r({event:`user-skill-reclaim-central-written`,scope:`user`,path:d,preexisting:f,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);u.push({kind:`central`,path:d,outcome:`failed`,error:t}),r({event:`user-skill-reclaim-central-failed`,scope:`user`,path:d,error:t})}for(let t of v){let i=c(e,t.hostDir),a=c(i,`skills`,y);if(a===d){u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-collapsed-with-central`});continue}if(!n.existsSync(i)){u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-host-absent`});continue}let s=n.existsSync(a);try{w(l,a,n),u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:s?`overwritten`:`written`}),r({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,preexisting:s,version:o})}catch(e){let n=e instanceof Error?e.message:String(e);u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`failed`,error:n}),r({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,error:n})}}let p=u.find(e=>e.kind===`central`);if(p?.outcome===`written`||p?.outcome===`overwritten`){let n=null;try{await t.writeRecordedVersion(e,o),r({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:o})}catch(e){n=e instanceof Error?e.message:String(e),r({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:o,error:n})}i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:n===null?`installed`:`failed`,version:o,...n===null?{}:{reason:`state-write-failed:${n}`}})}else{let e=u.some(e=>e.kind===`host`&&e.outcome===`failed`);i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,version:o,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:o,entries:u}}async function O(e){let t=e.logger??C,n=e.fs??x,r=e.home??_(),i={...S,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:E(e.projectDir,i,n,t),user:await D(r,i,n,t)}}function k(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function A(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`reclaimed`).length,r=e.project.entries.filter(e=>e.outcome===`no-token`).length,i=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} reclaimed, ${r} no-token, ${i} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
|
|
2
2
|
`)}function j(){return new e(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").action(async()=>{let e=await O({projectDir:l(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${A(e)}\n`),process.exitCode=k(e)})}export{j as n,O as t};
|
|
3
|
-
//# sourceMappingURL=repair-skills-
|
|
3
|
+
//# sourceMappingURL=repair-skills-B0MyM-S8.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-B0MyM-S8.mjs";export{e as repairSkills};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-QCDB2VPH-D1RuXtOm.mjs";export{e as rev};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-7TSDKFEO-a-GUGBTu.mjs";import"./chunk-VLGZJRPG-ChVasMna.mjs";import{t as e}from"./chunk-NYQYO467-DUxnOnNG.mjs";export{e as rgCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MIZPJHVH-D3ET6RI_.mjs";export{e as rmCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-OCS6LSEM-y5pQiBQp.mjs";export{e as rmdirCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-OL3S66CO-DjFShiWt.mjs";export{e as sedCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-A7A2DBEE-PLfkXLI4.mjs";export{e as seqCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{dirname as e,resolve as t}from"node:path";import{closeSync as n,existsSync as r,mkdirSync as i,openSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c,writeSync as l}from"node:fs";import{hostname as u}from"node:os";import{fileURLToPath as d}from"node:url";function f(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function p(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}function m(){try{let n=t(e(d(import.meta.url)),`..`,`package.json`),r=JSON.parse(o(n,`utf-8`));if(typeof r.version==`string`&&r.version.length>0)return r.version}catch{}return`0.0.0-unknown`}const h=m(),g=1;var _=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`Open Knowledge ${n} already running on port ${e.port} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function v(e,n){return t(e,`${n}.lock`)}const y=new Map;function b(e){y.set(e,(y.get(e)??0)+1)}function x(e){let t=y.get(e);return t===void 0||t<=1?(y.delete(e),!0):(y.set(e,t-1),!1)}function S(e,t){try{let n=JSON.parse(o(e,`utf-8`));return n&&typeof n==`object`&&p(n.pid)?n:(console.warn(`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return console.warn(`${t} Corrupt lock file at ${e} — replacing`),null}}function C(e){let{lockName:t,lockDir:o,metadata:d}=e,p=`[${t}-lock]`;i(o,{recursive:!0});let m=v(o,t),g={pid:process.pid,hostname:u(),port:d.port,startedAt:new Date().toISOString(),worktreeRoot:d.worktreeRoot,...d.kind!==void 0&&{kind:d.kind},...d.parentPid!==void 0&&{parentPid:d.parentPid},...d.capabilities!==void 0&&{capabilities:d.capabilities},protocolVersion:d.protocolVersion??1,runtimeVersion:d.runtimeVersion??h},y=JSON.stringify(g,null,2);for(let e=0;e<3;e++){if(!r(m))try{let e=a(m,`wx`,384);try{l(e,y)}finally{n(e)}return b(m),w({lockName:t,lockDir:o,lockPath:m})}catch(e){if(e.code!==`EEXIST`)throw e}let e=S(m,p);if(e){let n=e.hostname===u();if(n&&e.pid===process.pid)return c(m,y,{encoding:`utf-8`,mode:384}),b(m),w({lockName:t,lockDir:o,lockPath:m});if(n&&f(e.pid))throw new _(e,m,t);console.warn(`${p} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{s(m)}catch{}}throw Error(`${p} Failed to acquire ${m} after 3 attempts (concurrent acquire contention).`)}function w(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>O({lockName:t,lockDir:n}),updatePort:e=>T({lockName:t,lockDir:n,port:e})}}function T(e){let{lockName:t,lockDir:n,port:i}=e,a=`[${t}-lock]`,s=v(n,t);if(!r(s)){console.warn(`${a} Lock file missing at ${s} during port update — skipping`);return}let l;try{let e=JSON.parse(o(s,`utf-8`));if(!e||typeof e!=`object`||!p(e.pid)){console.warn(`${a} Corrupt lock at ${s} during port update — skipping`);return}l=e}catch{console.warn(`${a} Unreadable lock at ${s} during port update — skipping`);return}if(l.pid===process.pid&&!(typeof l.hostname==`string`&&l.hostname!==u())){l.port=i;try{c(s,JSON.stringify(l,null,2),{encoding:`utf-8`,mode:384})}catch(e){console.warn(`${a} Failed to update port in ${s}: ${e instanceof Error?e.message:String(e)}`)}}}function E(e){let{lockName:t,lockDir:n}=e,i=v(n,t);if(!r(i))return null;let a;try{let e=JSON.parse(o(i,`utf-8`));if(!e||typeof e!=`object`||!p(e.pid))return null;a=e}catch{return null}if(a.hostname!==u())return null;if(!f(a.pid)){try{s(i)}catch{}return null}return a}function D(e){let{lockName:t,lockDir:n}=e,i=v(n,t);if(!r(i))return{status:`absent`};let a;try{a=JSON.parse(o(i,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!a||typeof a!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:a};let c=a;if(!p(c.pid)||typeof c.hostname!=`string`||typeof c.port!=`number`||typeof c.startedAt!=`string`||typeof c.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:a};let l={pid:c.pid,hostname:c.hostname,port:c.port,startedAt:c.startedAt,worktreeRoot:c.worktreeRoot,protocolVersion:typeof c.protocolVersion==`number`?c.protocolVersion:void 0,runtimeVersion:typeof c.runtimeVersion==`string`?c.runtimeVersion:void 0};if(l.hostname!==u())return{status:`stale`,lock:l};if(!f(l.pid)){try{s(i)}catch{}return{status:`stale`,lock:l}}return l.protocolVersion===void 0||l.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:a}:{status:`live`,lock:l}}function O(e){let{lockName:t,lockDir:n}=e,i=`[${t}-lock]`,a=v(n,t);if(x(a)&&r(a))try{let e=JSON.parse(o(a,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||typeof e.hostname==`string`&&e.hostname!==u())return;s(a)}catch(e){console.warn(`${i} Failed to release ${a}: ${e instanceof Error?e.message:String(e)}`)}}var k=class extends _{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function A(e,t){try{return C({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof _&&e.lockName===`server`?new k(e.existing,e.lockPath):e}}function j(e,t){T({lockName:`server`,lockDir:e,port:t})}function M(e){return E({lockName:`server`,lockDir:e})}function N(e){O({lockName:`server`,lockDir:e})}export{C as a,p as c,D as d,M as f,j as g,T as h,k as i,v as l,N as m,h as n,A as o,O as p,g as r,f as s,_ as t,E as u};
|
|
2
|
+
//# sourceMappingURL=server-lock-BIY3RMaC-CfCHCMTe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./server-lock-BIY3RMaC-CfCHCMTe.mjs";export{e as updateServerLockPort};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-XKQRETAK-cVWA9gEB.mjs";export{e as sha1sumCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5V6VZH6T-BCr5_GDF.mjs";export{e as sha256sumCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as e}from"./chunk-GOV5EKKI-i-yw_7Ty.mjs";export{e as sleepCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-KMEYNNUA-DfdK88O_.mjs";export{e as sortCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MYE6AGBJ-B4pRo9ma.mjs";export{e as split};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-HWBSOZZR-LxiTl7Bc.mjs";export{e as sqlite3Command};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./gh-detect-
|
|
2
|
-
//# sourceMappingURL=src-
|
|
1
|
+
import"./gh-detect-DIxiI-Um.mjs";import{d as e,g as t,u as n}from"./init-BJpQMku2.mjs";import"./loader-9ZE042z8.mjs";import"./preview-eJbjCNUv.mjs";import{n as r}from"./write-project-skill-grQBEqMb.mjs";import{dirname as i,isAbsolute as a,join as o,relative as s,resolve as c}from"node:path";import{statSync as l}from"node:fs";import{readFile as u,realpath as d}from"node:fs/promises";function f(e){return e.replace(/:\d+$/,``)}function p(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:f(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:f(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:f(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}function m(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}async function h(e,t){let n,r;try{n=await d(c(e)),r=await d(c(i(e)))}catch{return{kind:`not-git`}}if(!_(n,r))return{kind:`symlink-escape`};let s=o(n,`.git`),f;try{f=l(s)}catch{return{kind:`not-git`}}let m;if(f.isDirectory()){let e;try{e=await d(s)}catch{return{kind:`not-git`}}if(!_(e,n))return{kind:`symlink-escape`};m=e}else if(f.isFile()){let e;try{e=await u(s,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),i=a(r)?r:c(n,r);try{m=await d(i)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let h=o(await g(m),`config`),v;try{v=await u(h,`utf-8`)}catch{return{kind:`not-git`}}let b=y(v);if(b===null)return{kind:`no-origin`};let x=p(b);if(x===null||x.hostname!==`github.com`)return{kind:`non-github`};let S=x.owner.toLowerCase()===t.owner.toLowerCase(),C=x.name.toLowerCase()===t.repo.toLowerCase();return!S||!C?{kind:`wrong-repo`,actualOwner:x.owner,actualRepo:x.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${x.owner}/${x.name}.git`}}async function g(e){let t;try{t=(await u(o(e,`commondir`),`utf-8`)).trim()}catch{return e}if(t.length===0)return e;let n=a(t)?t:c(e,t);try{return await d(n)}catch{return n}}function _(e,t){if(e===t)return!0;let n=s(t,e);return n.length>0&&!n.startsWith(`..`)&&!a(n)}function v(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function y(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=v(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return b(r[1])}return null}function b(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const x=[{id:`mcp-config`,write(t,n,r){let i=t.projectConfigPath?.(n);if(!i)return{integration:`mcp-config`,editorId:t.id,action:`skipped-unsupported`};try{let a=e(t,n,r,void 0,i);return a.action===`written`||a.action===`overwritten`?{integration:`mcp-config`,editorId:t.id,action:a.action,path:a.configPath}:a.action===`failed`?{integration:`mcp-config`,editorId:t.id,action:`failed`,path:a.configPath,error:a.error??`unknown failure`}:{integration:`mcp-config`,editorId:t.id,action:`failed`,path:a.configPath,error:`unexpected project-scope action: ${a.action}`}}catch(e){return{integration:`mcp-config`,editorId:t.id,action:`failed`,path:i,error:e instanceof Error?e.message:String(e)}}}},{id:`project-skill`,write(e,t,n){try{let n=r(e,t);return{integration:`project-skill`,editorId:e.id,action:n.action,...n.path?{path:n.path}:{},...n.error?{error:n.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function S(e,n,r={},i=x){let a=[];for(let o of n){let n=t[o];for(let t of i)a.push(t.write(n,e,r))}return a}function C(e,t,r={}){return{integrations:S(e,t,r),claudeLaunchJson:t.includes(`claude`)?n(e,r):void 0}}export{p as i,h as n,m as r,C as t};
|
|
2
|
+
//# sourceMappingURL=src-DgUEXwrg.mjs.map
|