@inkeep/open-knowledge 0.0.0-dev-20260427194153 → 0.0.0-dev-20260427210535

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.
Files changed (272) hide show
  1. package/dist/alias-JE7RI5QX-TirEebNy.mjs +1 -0
  2. package/dist/awk2-POPGKRAI-DigGXYmO.mjs +1 -0
  3. package/dist/banner-BxI1wnW9.mjs +3 -0
  4. package/dist/base64-4YMZCVJ5-B4GnvJtR.mjs +1 -0
  5. package/dist/basename-AA2KJYZQ-DlZHEU5f.mjs +1 -0
  6. package/dist/bash-IJWYRKFO-BA1gxmDh.mjs +1 -0
  7. package/dist/build-D4l8tfO0.mjs +2 -0
  8. package/dist/cat-RDUMLXKC-CAQOzqfy.mjs +1 -0
  9. package/dist/chmod-SYMGL4JA-BC2VVHCa.mjs +1 -0
  10. package/dist/{chokidar-DhL3M6Oj.mjs → chokidar-CblsKfnx.mjs} +3 -3
  11. package/dist/chunk-24IMIIXA-Bz7rlZT3.mjs +2 -0
  12. package/dist/chunk-3THT3N7L-klp8GP84.mjs +2 -0
  13. package/dist/chunk-3ZUFRYJ4-C93H8j0V.mjs +2 -0
  14. package/dist/chunk-44UOCSGV-BUBpWxXm.mjs +2 -0
  15. package/dist/chunk-4GTNDTRF-_OVmXcJ-.mjs +8 -0
  16. package/dist/chunk-4HHKTUW3-Dm69hDaZ.mjs +3 -0
  17. package/dist/chunk-4Q4SM6WR-DDQRsilN.mjs +5 -0
  18. package/dist/chunk-55VFSPNA-DVZfQAzN.mjs +3 -0
  19. package/dist/chunk-5QMZ5MUS-DWTkM0vM.mjs +5 -0
  20. package/dist/chunk-5QVNJEHU-BvsipSFW.mjs +9 -0
  21. package/dist/chunk-5V6VZH6T-BCr5_GDF.mjs +2 -0
  22. package/dist/chunk-62RKD26F-D-luOa0m.mjs +21 -0
  23. package/dist/chunk-64BAICW3-CTJNEx4Q.mjs +2 -0
  24. package/dist/chunk-74CEPOFO-D1bzz49u.mjs +23 -0
  25. package/dist/chunk-7L36YK2X-RiPZFKaV.mjs +3 -0
  26. package/dist/chunk-7TSDKFEO-a-GUGBTu.mjs +2 -0
  27. package/dist/chunk-A4HU7SVR-hefV_YmW.mjs +3 -0
  28. package/dist/chunk-A4JSPFCI-U-xWmMMC.mjs +7 -0
  29. package/dist/chunk-A5O5YHGN-C7BVq0eF.mjs +2 -0
  30. package/dist/chunk-A65PWWJC-D7J5l9eq.mjs +3 -0
  31. package/dist/chunk-A7A2DBEE-PLfkXLI4.mjs +7 -0
  32. package/dist/chunk-A7ICOL4V-Drb3XsEL.mjs +14 -0
  33. package/dist/chunk-ALLTKNUZ-BMiTDN50.mjs +6 -0
  34. package/dist/chunk-APT7OOP2-CXHnSuct.mjs +2 -0
  35. package/dist/chunk-BBXLRYSX-DURjrblE.mjs +6 -0
  36. package/dist/chunk-BRGMQKJV-CdrkqzRA.mjs +63 -0
  37. package/dist/chunk-CR5AFCPT-ROmyDFrB.mjs +24 -0
  38. package/dist/chunk-CWQS3NFK-DFdwmFxJ.mjs +2 -0
  39. package/dist/chunk-D4J545R4-C8nMOauR.mjs +12 -0
  40. package/dist/chunk-D6CWQ5DW-B-J4LN9N.mjs +6 -0
  41. package/dist/chunk-D7MEQ3VN-Csvth_Ss.mjs +5 -0
  42. package/dist/chunk-DCAAORBQ-BdrR5ttw.mjs +2 -0
  43. package/dist/chunk-DXB73IDG-C774okS0.mjs +2 -0
  44. package/dist/chunk-EEXR5ZDP-C5AJH114.mjs +3 -0
  45. package/dist/chunk-EIZGF4BS-8bsVXqW0.mjs +9 -0
  46. package/dist/chunk-F23WWYKW-DST0dB7V.mjs +17 -0
  47. package/dist/chunk-F55TLFGB-DqkrAMO5.mjs +10 -0
  48. package/dist/chunk-FEIOJCZD-C4x0A4rb.mjs +75 -0
  49. package/dist/chunk-GCTKCWKD-Deqi1D_N.mjs +4 -0
  50. package/dist/chunk-GFQRA5P5-1fzItQ8F.mjs +8 -0
  51. package/dist/chunk-GOV5EKKI-PN17n-Z0.mjs +10 -0
  52. package/dist/chunk-GXVXFKBA-993FoPmq.mjs +6 -0
  53. package/dist/chunk-HDQ56CKY-pGV4pOJA.mjs +16 -0
  54. package/dist/chunk-HJQJAYMS-Ci3vsKQW.mjs +3 -0
  55. package/dist/chunk-HJWBQKYG-UZig4wUt.mjs +6 -0
  56. package/dist/chunk-HWBSOZZR-Dikp87Ww.mjs +37 -0
  57. package/dist/chunk-HWKDQ44K-CPSjqtR_.mjs +4 -0
  58. package/dist/chunk-I57KEIP3-B1DoH8rp.mjs +11 -0
  59. package/dist/chunk-IPJHKYVM-BbWncVr2.mjs +2 -0
  60. package/dist/chunk-J642UCRS-DB77Y2Wt.mjs +2 -0
  61. package/dist/chunk-JVPRLUMK-DnQCNjpq.mjs +8 -0
  62. package/dist/chunk-KMEYNNUA-DfdK88O_.mjs +16 -0
  63. package/dist/chunk-LL3S3NLB-DxXgE3kY.mjs +2 -0
  64. package/dist/chunk-LPQPILI2-BXfU9TgM.mjs +12 -0
  65. package/dist/chunk-LTZRCH7N-GAjTFNwG.mjs +32 -0
  66. package/dist/chunk-LWEGUNWT-BALY4RLC.mjs +8 -0
  67. package/dist/chunk-MDDMCKUK-D6GWoJsI.mjs +7 -0
  68. package/dist/chunk-MDLLFABN-oBQf6bGE.mjs +73 -0
  69. package/dist/chunk-MHTUABJP-dKmK6Hw7.mjs +9 -0
  70. package/dist/chunk-MIZPJHVH-z-geAni9.mjs +8 -0
  71. package/dist/chunk-MLXIYONF-DB-C8Hx8.mjs +16 -0
  72. package/dist/chunk-MYE6AGBJ-B4pRo9ma.mjs +17 -0
  73. package/dist/chunk-NAERJDUW-CX0lf-xx.mjs +9 -0
  74. package/dist/chunk-NCNPKYJZ-BFGan4lR.mjs +3 -0
  75. package/dist/chunk-NUYSJFDK-D2NXm2ND.mjs +8 -0
  76. package/dist/chunk-NYQYO467-Degkom4D.mjs +33 -0
  77. package/dist/chunk-OARHFVLG-CY8D2Qov.mjs +21 -0
  78. package/dist/chunk-OCLXQMOG-BMsyLQhm.mjs +7 -0
  79. package/dist/chunk-OCS6LSEM-BHslttnj.mjs +14 -0
  80. package/dist/chunk-OJDRYQWQ-BV5MVRVg.mjs +2 -0
  81. package/dist/chunk-OL3S66CO-Bmgu4tW4.mjs +100 -0
  82. package/dist/chunk-PBXLG62G-lGjqkk78.mjs +9 -0
  83. package/dist/chunk-PP6PSHAB-DMC_XCfO.mjs +5 -0
  84. package/dist/chunk-PYSFUGCK-CY7pclEB.mjs +11 -0
  85. package/dist/chunk-QCDB2VPH-D1RuXtOm.mjs +7 -0
  86. package/dist/chunk-QJ7O6ZN3-BH67tCjg.mjs +6 -0
  87. package/dist/chunk-R6QSAL5T-CtbJTvt9.mjs +2 -0
  88. package/dist/chunk-R6VWJ2ZL-B0CcMPyK.mjs +2 -0
  89. package/dist/chunk-RPNGRAAP-BughPjdR.mjs +8 -0
  90. package/dist/chunk-SDNKECQQ-C3GEf3VZ.mjs +6 -0
  91. package/dist/chunk-SYMJJMQ4-CWTh95-4.mjs +22 -0
  92. package/dist/chunk-T56QNPHK-DlKQeuXU.mjs +15 -0
  93. package/dist/chunk-TLSUDHID-B8UnqY4U.mjs +7 -0
  94. package/dist/chunk-TOMNU26N-BcdbBQ2p.mjs +5 -0
  95. package/dist/chunk-TXBZCHCQ-l48TczF5.mjs +6 -0
  96. package/dist/chunk-UNYNJIFU-DwPQMz0F.mjs +140 -0
  97. package/dist/chunk-V7TAPXDL-CnKUp2df.mjs +28 -0
  98. package/dist/chunk-VJFXDYWH-IiUXkKX0.mjs +11 -0
  99. package/dist/chunk-VLGZJRPG-D4NVKJYL.mjs +17 -0
  100. package/dist/chunk-VOBGTVA6-BT7gUxqf.mjs +7 -0
  101. package/dist/chunk-VYOJP4TV-BvibOnKG.mjs +14 -0
  102. package/dist/chunk-WKFATFPP-DCZdrA8x.mjs +5 -0
  103. package/dist/chunk-X2AJGDEF-BaH6i1Rq.mjs +2 -0
  104. package/dist/chunk-XHM67O4N-Cg35xc6b.mjs +2 -0
  105. package/dist/chunk-XKQRETAK-cVWA9gEB.mjs +2 -0
  106. package/dist/chunk-XORM457F-CRToN1RQ.mjs +288 -0
  107. package/dist/chunk-XVDPCNWR-CtK-Xs2O.mjs +12 -0
  108. package/dist/chunk-YCFVLTST-Ox9Z0Nk6.mjs +13 -0
  109. package/dist/chunk-YFG2CMIF-Csgr05KV.mjs +5 -0
  110. package/dist/chunk-YNYSPYQ5-BpP11HXS.mjs +34 -0
  111. package/dist/chunk-YS3AZT3J-BEZxz_aQ.mjs +9 -0
  112. package/dist/chunk-YTNYSM6T-DuBR2-TM.mjs +12 -0
  113. package/dist/chunk-Z6LRHWXI-DbRghyzT.mjs +14 -0
  114. package/dist/chunk-Z7JVV2SM-BzR-yvwK.mjs +12 -0
  115. package/dist/clear-5CZ5X4YR-B5oRhK00.mjs +1 -0
  116. package/dist/cli.mjs +798 -67
  117. package/dist/colors-BnZ-i-vb.mjs +1 -0
  118. package/dist/colors-DoPZvo1q.mjs +2 -0
  119. package/dist/column-WLPMMSTS-fFssyAvW.mjs +1 -0
  120. package/dist/comm-5SLSESQG-DRcwK9Gt.mjs +1 -0
  121. package/dist/constants-BZWlp7wi.mjs +2 -0
  122. package/dist/cp-XOYR4ABJ-BUZu7KNi.mjs +1 -0
  123. package/dist/curl-47BFPSFW-Kn_Na_aU.mjs +26 -0
  124. package/dist/cut-OPC3VAGB-BIRZEN2Y.mjs +1 -0
  125. package/dist/date-DD7FVA2V-DRxppxbV.mjs +1 -0
  126. package/dist/diff-HJF2MPDN-Yo3lE_58.mjs +1 -0
  127. package/dist/dirname-LEMTZZFS-2cTXnmQf.mjs +1 -0
  128. package/dist/dist-BCyi1oM7.mjs +116 -0
  129. package/dist/{dist-mmLEboji.mjs → dist-BWvkug8h.mjs} +34 -50
  130. package/dist/dist-Bx5GgBdJ.mjs +1 -0
  131. package/dist/dist-DRC09WNZ.mjs +199 -0
  132. package/dist/dist-bundle-BSdjl7Rj.mjs +2 -0
  133. package/dist/dist-bundle-BmF5_Mcp.mjs +1 -0
  134. package/dist/du-WO2ENHXQ-B5uda2-L.mjs +1 -0
  135. package/dist/echo-O45JWWI2-B9QCpaZR.mjs +1 -0
  136. package/dist/env-5EPCWSXR--4eujSrM.mjs +1 -0
  137. package/dist/esm-29fM6BBO.mjs +20 -0
  138. package/dist/{esm-DcyORBXm.mjs → esm-BFkWzFey.mjs} +1 -1
  139. package/dist/{execAsync-CUVyYd50.mjs → execAsync-0jii24p9.mjs} +1 -1
  140. package/dist/{execAsync-DXwNXlSG.mjs → execAsync-Czqc-yAz.mjs} +1 -1
  141. package/dist/{execAsync-r1zz6x3t.mjs → execAsync-DgmLXmTx.mjs} +1 -1
  142. package/dist/expand-DTNXU4LQ-BWwDphsm.mjs +1 -0
  143. package/dist/expansion-ENLSRCXJ-BBTiIHJS.mjs +1 -0
  144. package/dist/expr-5T3UU5KE-D5OdgUlD.mjs +1 -0
  145. package/dist/file-ZIGAJ4YS-zZfB3nws.mjs +1 -0
  146. package/dist/find-TPUOAIUQ-DaW1-9Vm.mjs +1 -0
  147. package/dist/flag-coverage-QT4N2Z44-B8zntJyb.mjs +2 -0
  148. package/dist/fold-LDSORVYE-CAfX9d8n.mjs +1 -0
  149. package/dist/{getMachineId-bsd-BrpAo1fJ.mjs → getMachineId-bsd-C1M346yz.mjs} +2 -2
  150. package/dist/{getMachineId-bsd-DZHdCHYD.mjs → getMachineId-bsd-CPESl3L6.mjs} +2 -2
  151. package/dist/{getMachineId-bsd-o7HphUWK.mjs → getMachineId-bsd-DEUypOXJ.mjs} +2 -2
  152. package/dist/{getMachineId-darwin-3D3eRDVl.mjs → getMachineId-darwin-0hBTy7c8.mjs} +2 -2
  153. package/dist/{getMachineId-darwin-CsteOFjK.mjs → getMachineId-darwin-CJK3eX9q.mjs} +2 -2
  154. package/dist/{getMachineId-darwin-D-BjJUXV.mjs → getMachineId-darwin-Vupnt-kR.mjs} +2 -2
  155. package/dist/{getMachineId-linux-C-EpqTRh.mjs → getMachineId-linux-B2nkqMir.mjs} +2 -2
  156. package/dist/{getMachineId-linux-CceeieLZ.mjs → getMachineId-linux-BGQn48cN.mjs} +2 -2
  157. package/dist/{getMachineId-linux-BELE5feP.mjs → getMachineId-linux-CIp07XEX.mjs} +2 -2
  158. package/dist/{getMachineId-unsupported-CUPNvbj5.mjs → getMachineId-unsupported-BnsanXR2.mjs} +2 -2
  159. package/dist/{getMachineId-unsupported-CrmDv6SC.mjs → getMachineId-unsupported-CH1Q20xN.mjs} +2 -2
  160. package/dist/{getMachineId-unsupported-C9qPEPHy.mjs → getMachineId-unsupported-DfSmC7Gy.mjs} +2 -2
  161. package/dist/{getMachineId-win-AH3HxM3-.mjs → getMachineId-win-BmmB_8yL.mjs} +2 -2
  162. package/dist/{getMachineId-win-BHtOEO59.mjs → getMachineId-win-DlPRChXs.mjs} +2 -2
  163. package/dist/{getMachineId-win-CFHq48vo.mjs → getMachineId-win-JnMJbIaW.mjs} +2 -2
  164. package/dist/git-handle-BhGnmvTB-BMB_49Sb.mjs +10 -0
  165. package/dist/git-handle-BhGnmvTB-Di8EsrYa.mjs +1 -0
  166. package/dist/grep-3AIAIJVR-C9A_aSMK.mjs +1 -0
  167. package/dist/gzip-AQXSGOVS-CL228lzk.mjs +1 -0
  168. package/dist/head-HT2B6D2J-DyNkF3aY.mjs +1 -0
  169. package/dist/help-VVWX7SA5-D5WzpTIY.mjs +1 -0
  170. package/dist/history-J4QRNGRO-DUTsR2Sf.mjs +1 -0
  171. package/dist/hostname-BK6HG2DE-zmNkhqtV.mjs +1 -0
  172. package/dist/html-to-markdown-TFCECAGV-Ux5cbjMV.mjs +1 -0
  173. package/dist/index.d.mts +2118 -54
  174. package/dist/index.mjs +1 -1
  175. package/dist/init-AF92T0LI.mjs +1 -0
  176. package/dist/{init-aygOL5mI.mjs → init-CDQXH2-i.mjs} +6 -6
  177. package/dist/init-DOiFaqRI.mjs +254 -0
  178. package/dist/init-SDAphqYo.mjs +1 -0
  179. package/dist/{is-object-CEU0BgQ5.mjs → is-object-BNVklKxg.mjs} +1 -1
  180. package/dist/join-GG2LDHE5-B6C3-ghI.mjs +1 -0
  181. package/dist/jq-ODXZBPLY-Uj_VahOC.mjs +1 -0
  182. package/dist/js-exec-M6UR76J5-DSk5_wnx.mjs +97 -0
  183. package/dist/{keepalive-DCcA7pmC.mjs → keepalive-CZzB5k1h.mjs} +1 -1
  184. package/dist/lib-Dl2j2VNl.mjs +2 -0
  185. package/dist/libesm-DC4M2SkF.mjs +14 -0
  186. package/dist/ln-4TRFBYAT-DiYK6FgR.mjs +1 -0
  187. package/dist/loader-B-hHIGF7.mjs +3 -0
  188. package/dist/loader-DsgFEqrz.mjs +1 -0
  189. package/dist/ls-KSXFZCWH-B0la1Q-P.mjs +1 -0
  190. package/dist/lzma-0LJzVZpl.mjs +2 -0
  191. package/dist/md5sum-INMIK4DX-DAG8dmoX.mjs +1 -0
  192. package/dist/mkdir-TDEMSB6C-CRMB4_AE.mjs +1 -0
  193. package/dist/mv-Z6MORUFL-1iTO8NY5.mjs +1 -0
  194. package/dist/nl-U5YJDM32-IRiMqQcZ.mjs +1 -0
  195. package/dist/od-VJEF2UR5-PasvdXXR.mjs +1 -0
  196. package/dist/{open-browser-ryHU9Kmc.mjs → open-browser-BzMQ6cLf.mjs} +1 -1
  197. package/dist/paste-7N6AFSDS-C3M5_YM6.mjs +1 -0
  198. package/dist/paths-CcbqTPyR.mjs +2 -0
  199. package/dist/paths-DtSqXz-J.mjs +1 -0
  200. package/dist/preview-C9fc_Jna.mjs +1 -0
  201. package/dist/preview-DsHKavXe.mjs +3 -0
  202. package/dist/printf-CX64KX2P-uTOF6Zpa.mjs +1 -0
  203. package/dist/public/assets/McpConsentDialogBody-DgIeLbWq.js +1 -0
  204. package/dist/public/assets/{index-e-6eeSOy.js → index-L-2j8CET.js} +2 -2
  205. package/dist/public/index.html +1 -1
  206. package/dist/pwd-D4OZ7N27-DNkGMjtD.mjs +1 -0
  207. package/dist/python3-AUFTPCU6-MeZyx8_A.mjs +12 -0
  208. package/dist/readlink-MI4GCHJF-DRVZBAvY.mjs +1 -0
  209. package/dist/rev-XOSYPP45-q2MQLs41.mjs +1 -0
  210. package/dist/rg-FOQSCCX3-Cssz8GNh.mjs +1 -0
  211. package/dist/rm-RTZG23RL-fjvVauiI.mjs +1 -0
  212. package/dist/rmdir-XTQXT7RK-C13HY1h7.mjs +1 -0
  213. package/dist/{rolldown-runtime-wcPFST8Q-DriDJLQM.mjs → rolldown-runtime-wcPFST8Q-BB0WpHs3.mjs} +1 -1
  214. package/dist/sed-VFTTATXJ-DO49xc40.mjs +1 -0
  215. package/dist/seq-RN5ZUASB-D9r6kc_Z.mjs +1 -0
  216. package/dist/server-lock-CH0GCP_4-DXqutMlt.mjs +2 -0
  217. package/dist/server-lock-CH0GCP_4-MazZqjDk.mjs +1 -0
  218. package/dist/sha1sum-VJPNLNU6-4uBt63v6.mjs +1 -0
  219. package/dist/sha256sum-PI32XWXY-_uaXSgBK.mjs +1 -0
  220. package/dist/sleep-VZFPZFWA-CS7jDpXp.mjs +1 -0
  221. package/dist/sort-DCNRDA7U-Dmp_2ZoH.mjs +1 -0
  222. package/dist/split-SITCSYCZ-Cu9ifXuc.mjs +1 -0
  223. package/dist/sqlite3-56UMWEY3-D1Xq8d4g.mjs +1 -0
  224. package/dist/src-BkszjXGW.mjs +1 -0
  225. package/dist/start-BMH5fwi_.mjs +2 -0
  226. package/dist/start-jYZEQp_g.mjs +1 -0
  227. package/dist/stat-BT5A227F-Dqepjl-k.mjs +1 -0
  228. package/dist/strings-7PLOGTPD-g6FhPS64.mjs +1 -0
  229. package/dist/tac-SJGXQ4T2-DczI7HKk.mjs +1 -0
  230. package/dist/tail-S5ULNTJU-Bk22kVUG.mjs +1 -0
  231. package/dist/tar-ANUBEFJY-1lwT6ndQ.mjs +1 -0
  232. package/dist/tee-O7VXZDCO-Ftqr8Jad.mjs +1 -0
  233. package/dist/time-DEUO3QV2-BtzQ0nVf.mjs +1 -0
  234. package/dist/timeout-VRKMCG72-Cpzi9cz-.mjs +1 -0
  235. package/dist/touch-DX2IJOQ4-ewCHfbB3.mjs +1 -0
  236. package/dist/tr-2HXZRDSW-DrrobhxR.mjs +1 -0
  237. package/dist/tree-LYXBS7DC-DZnTMKSh.mjs +1 -0
  238. package/dist/true-WHJNXCHG-BaLssNp9.mjs +1 -0
  239. package/dist/unexpand-RGTMIGZM-BOmSL08U.mjs +1 -0
  240. package/dist/uniq-SUNANL47-Cn_JDmUJ.mjs +1 -0
  241. package/dist/wc-TQB3VNOX-DkOBrQlr.mjs +1 -0
  242. package/dist/which-XZHEH76L-DxZJ58G5.mjs +1 -0
  243. package/dist/whoami-DGKU3D2X-Bn1LP0m_.mjs +1 -0
  244. package/dist/{wrapper-DDHUdYtj.mjs → wrapper-BTT6637Z.mjs} +1 -1
  245. package/dist/xan-BXDXYEIB-_Vtao535.mjs +1 -0
  246. package/dist/xan-view-ECQUO7AJ-6vlhfSF-.mjs +1 -0
  247. package/dist/xargs-I6EZUCYF-dHdg4qaj.mjs +1 -0
  248. package/dist/yq-MJMAR36V-pRBq87Ya.mjs +1 -0
  249. package/package.json +1 -1
  250. package/dist/banner-B9XXjTZc.mjs +0 -3
  251. package/dist/colors-CMt7h9Vn.mjs +0 -1
  252. package/dist/colors-Jf5QUiX2.mjs +0 -2
  253. package/dist/constants-CXtb6S9e.mjs +0 -2
  254. package/dist/dist-B8mg-f6q.mjs +0 -1
  255. package/dist/dist-D4iyaPjq.mjs +0 -161
  256. package/dist/git-handle-BhGnmvTB-BLKTZ5Yk.mjs +0 -1
  257. package/dist/git-handle-BhGnmvTB-DnqwJBAv.mjs +0 -2
  258. package/dist/init-BCnlpWMq.mjs +0 -1
  259. package/dist/init-Bc8AaeuH.mjs +0 -5
  260. package/dist/init-Dn8zvSe9.mjs +0 -1
  261. package/dist/loader-CkLCJZ_a.mjs +0 -3
  262. package/dist/loader-VgnU35KK.mjs +0 -1
  263. package/dist/paths-L4UjjxH7.mjs +0 -1
  264. package/dist/paths-uWxFvwPB.mjs +0 -2
  265. package/dist/preview-BRKICSmX.mjs +0 -1
  266. package/dist/preview-DMPV6CsE.mjs +0 -3
  267. package/dist/public/assets/McpConsentDialogBody-rv8E7452.js +0 -1
  268. package/dist/server-lock-CH0GCP_4-DCYOtKMW.mjs +0 -2
  269. package/dist/server-lock-CH0GCP_4-DHiJeSSV.mjs +0 -1
  270. package/dist/src-B0_BgXoG.mjs +0 -1
  271. package/dist/start-BrAnBRSa.mjs +0 -2
  272. package/dist/start-CZ3afhmt.mjs +0 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{c as e,i as t,l as n,o as r,s as i,t as a}from"./init-Bc8AaeuH.mjs";import{n as o,r as s}from"./loader-CkLCJZ_a.mjs";import"./src-B0_BgXoG.mjs";export{e as ALL_EDITOR_IDS,s as ConfigSchema,n as EDITOR_TARGETS,a as detectInstalledEditors,o as loadConfig,t as readExistingMcpEntry,r as writeEditorMcpConfig,i as writeUserMcpConfigs};
1
+ import{c as e,i as t,l as n,o as r,s as i,t as a}from"./init-DOiFaqRI.mjs";import{n as o,r as s}from"./loader-B-hHIGF7.mjs";import"./src-BkszjXGW.mjs";export{e as ALL_EDITOR_IDS,s as ConfigSchema,n as EDITOR_TARGETS,a as detectInstalledEditors,o as loadConfig,t as readExistingMcpEntry,r as writeEditorMcpConfig,i as writeUserMcpConfigs};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./init-DOiFaqRI.mjs";export{o as detectInstalledEditors,n as formatInitResult,i as initCommand,t as readExistingMcpEntry,e as runInit,r as writeEditorMcpConfig,a as writeUserMcpConfigs};
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./constants-CXtb6S9e.mjs";import{p as n}from"./dist-D4iyaPjq.mjs";import{existsSync as r,mkdirSync as i,readFileSync as a,writeFileSync as o}from"node:fs";import{join as s,resolve as c}from"node:path";const l=`# Open Knowledge — workspace configuration
1
+ import{n as e,t}from"./constants-BZWlp7wi.mjs";import{p as n}from"./dist-DRC09WNZ.mjs";import{join as r,resolve as i}from"node:path";import{existsSync as a,mkdirSync as o,readFileSync as s,writeFileSync as c}from"node:fs";const l=`# Open Knowledge — workspace configuration
2
2
  #
3
3
  # This file overrides built-in defaults for this workspace. Every key below
4
4
  # is commented out and shows its current default value. Uncomment any key
@@ -110,11 +110,11 @@ import{n as e,t}from"./constants-CXtb6S9e.mjs";import{p as n}from"./dist-D4iyaPj
110
110
  # title: Articles
111
111
  # description: Canonical knowledge committed after a team decision. Produced by the \`consolidate\` tool with a \`supersedes:\` chain tying back to the research that preceded it.
112
112
  # tags: [article, canonical, layer-consolidate]
113
- `;function u(e,t){return r(e)?!1:(o(e,t,`utf-8`),!0)}function d(e){let t=s(e,`.gitignore`),i=`# Open Knowledge — local editor config (not tracked upstream)\n${n}/\n`;if(!r(t))return o(t,i,`utf-8`),`created`;let c=a(t,`utf-8`),l=new Set([n,`${n}/`,`/${n}`,`/${n}/`]);return c.split(`
114
- `).map(e=>e.trim()).some(e=>l.has(e))?`already-present`:(o(t,`${c}${c.length===0||c.endsWith(`
113
+ `;function u(e,t){return a(e)?!1:(c(e,t,`utf-8`),!0)}function d(e){let t=r(e,`.gitignore`),i=`# Open Knowledge — local editor config (not tracked upstream)\n${n}/\n`;if(!a(t))return c(t,i,`utf-8`),`created`;let o=s(t,`utf-8`),l=new Set([n,`${n}/`,`/${n}`,`/${n}/`]);return o.split(`
114
+ `).map(e=>e.trim()).some(e=>l.has(e))?`already-present`:(c(t,`${o}${o.length===0||o.endsWith(`
115
115
  `)?``:`
116
- `}${c.length>0&&!c.endsWith(`
116
+ `}${o.length>0&&!o.endsWith(`
117
117
 
118
118
  `)?`
119
- `:``}${i}`,`utf-8`),`appended`)}const f=[{name:`.gitignore`,content:`${t}/\nserver.lock\nui.lock\nsync-state.json\n`},{name:e,content:l}];function p(e){let r=c(e,n),a=[],o=[];i(r,{recursive:!0}),i(s(r,t),{recursive:!0});for(let e of f)u(s(r,e.name),e.content)?a.push(e.name):o.push(e.name);return{created:a,skipped:o}}export{p as n,d as t};
120
- //# sourceMappingURL=init-aygOL5mI.mjs.map
119
+ `:``}${i}`,`utf-8`),`appended`)}const f=[{name:`.gitignore`,content:`${t}/\nserver.lock\nui.lock\nsync-state.json\n`},{name:e,content:l}];function p(e){let a=i(e,n),s=[],c=[];o(a,{recursive:!0}),o(r(a,t),{recursive:!0});for(let e of f)u(r(a,e.name),e.content)?s.push(e.name):c.push(e.name);return{created:s,skipped:c}}export{p as n,d as t};
120
+ //# sourceMappingURL=init-CDQXH2-i.mjs.map
@@ -0,0 +1,254 @@
1
+ import{t as e}from"./esm-29fM6BBO.mjs";import{r as t}from"./constants-BZWlp7wi.mjs";import{p as n}from"./dist-DRC09WNZ.mjs";import{K as r,_ as i,at as a,q as o}from"./dist-BWvkug8h.mjs";import{n as s}from"./init-CDQXH2-i.mjs";import{t as c}from"./preview-DsHKavXe.mjs";import{s as l,t as u}from"./colors-DoPZvo1q.mjs";import{t as d}from"./is-object-BNVklKxg.mjs";import{basename as f,dirname as p,join as m,posix as h,relative as g,resolve as ee,sep as _,win32 as v}from"node:path";import{existsSync as y,mkdirSync as b,readFileSync as x,writeFileSync as S}from"node:fs";import{homedir as C}from"node:os";
2
+ /*!
3
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are met:
8
+ *
9
+ * 1. Redistributions of source code must retain the above copyright notice, this
10
+ * list of conditions and the following disclaimer.
11
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ * this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * 3. Neither the name of the copyright holder nor the names of its contributors
15
+ * may be used to endorse or promote products derived from this software without
16
+ * specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ */
29
+ function te(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function ne(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
30
+ `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
31
+ `))}return i}var w=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=te(t.toml,t.ptr),i=ne(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
32
+ /*!
33
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ *
36
+ * Redistribution and use in source and binary forms, with or without
37
+ * modification, are permitted provided that the following conditions are met:
38
+ *
39
+ * 1. Redistributions of source code must retain the above copyright notice, this
40
+ * list of conditions and the following disclaimer.
41
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
42
+ * this list of conditions and the following disclaimer in the
43
+ * documentation and/or other materials provided with the distribution.
44
+ * 3. Neither the name of the copyright holder nor the names of its contributors
45
+ * may be used to endorse or promote products derived from this software without
46
+ * specific prior written permission.
47
+ *
48
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
49
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
52
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
55
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58
+ */
59
+ function re(e,t){let n=0;for(;e[t-++n]===`\\`;);return--n&&n%2}function T(e,t=0,n=e.length){let r=e.indexOf(`
60
+ `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function E(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
61
+ `)return n;if(r===`\r`&&e[n+1]===`
62
+ `)return n+1;if(r<` `&&r!==` `||r===``)throw new w(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function D(e,t,n,r){let i;for(;;){for(;(i=e[t])===` `||i===` `||!n&&(i===`
63
+ `||i===`\r`&&e[t+1]===`
64
+ `);)t++;if(r||i!==`#`)break;t=E(e,t)}return t}function ie(e,t,n,r,i=!1){if(!r)return t=T(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=T(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
65
+ `||t===`\r`&&e[a+1]===`
66
+ `))return a}throw new w(`cannot find end of structure`,{toml:e,ptr:t})}function O(e,t){let n=e[t],r=n===e[t+1]&&e[t+1]===e[t+2]?e.slice(t,t+3):n;t+=r.length-1;do t=e.indexOf(r,++t);while(t>-1&&n!==`'`&&re(e,t));return t>-1&&(t+=r.length,r.length>1&&(e[t]===n&&t++,e[t]===n&&t++)),t}
67
+ /*!
68
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
69
+ * SPDX-License-Identifier: BSD-3-Clause
70
+ *
71
+ * Redistribution and use in source and binary forms, with or without
72
+ * modification, are permitted provided that the following conditions are met:
73
+ *
74
+ * 1. Redistributions of source code must retain the above copyright notice, this
75
+ * list of conditions and the following disclaimer.
76
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
77
+ * this list of conditions and the following disclaimer in the
78
+ * documentation and/or other materials provided with the distribution.
79
+ * 3. Neither the name of the copyright holder nor the names of its contributors
80
+ * may be used to endorse or promote products derived from this software without
81
+ * specific prior written permission.
82
+ *
83
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
84
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
85
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
86
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
87
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
89
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
90
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
91
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
92
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
93
+ */
94
+ let ae=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var oe=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(ae);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};
95
+ /*!
96
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
97
+ * SPDX-License-Identifier: BSD-3-Clause
98
+ *
99
+ * Redistribution and use in source and binary forms, with or without
100
+ * modification, are permitted provided that the following conditions are met:
101
+ *
102
+ * 1. Redistributions of source code must retain the above copyright notice, this
103
+ * list of conditions and the following disclaimer.
104
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
105
+ * this list of conditions and the following disclaimer in the
106
+ * documentation and/or other materials provided with the distribution.
107
+ * 3. Neither the name of the copyright holder nor the names of its contributors
108
+ * may be used to endorse or promote products derived from this software without
109
+ * specific prior written permission.
110
+ *
111
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
112
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
113
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
114
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
115
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
116
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
117
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
118
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
119
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
120
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
121
+ */
122
+ let se=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ce=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,le=/^[+-]?0[0-9_]/,ue=/^[0-9a-f]{2,8}$/i,k={b:`\b`,t:` `,n:`
123
+ `,f:`\f`,r:`\r`,e:`\x1B`,'"':`"`,"\\":`\\`};function de(e,t=0,n=e.length){let r=e[t]===`'`,i=e[t++]===e[t]&&e[t]===e[t+1];i&&(n-=2,e[t+=2]===`\r`&&t++,e[t]===`
124
+ `&&t++);let a=0,o,s=``,c=t;for(;t<n-1;){let n=e[t++];if(n===`
125
+ `||n===`\r`&&e[t]===`
126
+ `){if(!i)throw new w(`newlines are not allowed in strings`,{toml:e,ptr:t-1})}else if(n<` `&&n!==` `||n===``)throw new w(`control characters are not allowed in strings`,{toml:e,ptr:t-1});if(o){if(o=!1,n===`x`||n===`u`||n===`U`){let r=e.slice(t,t+=n===`x`?2:n===`u`?4:8);if(!ue.test(r))throw new w(`invalid unicode escape`,{toml:e,ptr:a});try{s+=String.fromCodePoint(parseInt(r,16))}catch{throw new w(`invalid unicode escape`,{toml:e,ptr:a})}}else if(i&&(n===`
127
+ `||n===` `||n===` `||n===`\r`)){if(t=D(e,t-1,!0),e[t]!==`
128
+ `&&e[t]!==`\r`)throw new w(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:a});t=D(e,t)}else if(n in k)s+=k[n];else throw new w(`unrecognized escape sequence`,{toml:e,ptr:a});c=t}else !r&&n===`\\`&&(a=t-1,o=!0,s+=e.slice(c,a))}return s+e.slice(c,n-1)}function fe(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=se.test(e);if(i||ce.test(e)){if(le.test(e))throw new w(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new w(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new w(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new oe(e);if(!a.isValid())throw new w(`invalid value`,{toml:t,ptr:n});return a}
129
+ /*!
130
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
131
+ * SPDX-License-Identifier: BSD-3-Clause
132
+ *
133
+ * Redistribution and use in source and binary forms, with or without
134
+ * modification, are permitted provided that the following conditions are met:
135
+ *
136
+ * 1. Redistributions of source code must retain the above copyright notice, this
137
+ * list of conditions and the following disclaimer.
138
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
139
+ * this list of conditions and the following disclaimer in the
140
+ * documentation and/or other materials provided with the distribution.
141
+ * 3. Neither the name of the copyright holder nor the names of its contributors
142
+ * may be used to endorse or promote products derived from this software without
143
+ * specific prior written permission.
144
+ *
145
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
146
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
147
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
148
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
149
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
150
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
151
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
152
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
153
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
154
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
155
+ */
156
+ function pe(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(E(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function A(e,t,n,r,i){if(r===0)throw new w(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?ge(e,t,r,i):he(e,t,r,i);if(n){if(s=D(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new w(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}let o;if(a===`"`||a===`'`){o=O(e,t);let r=de(e,t,o);if(n){if(o=D(e,o),e[o]&&e[o]!==`,`&&e[o]!==n&&e[o]!==`
157
+ `&&e[o]!==`\r`)throw new w(`unexpected character encountered`,{toml:e,ptr:o});o+=+(e[o]===`,`)}return[r,o]}o=ie(e,t,`,`,n);let s=pe(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new w(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=D(e,t+s[1]),o+=+(e[o]===`,`)),[fe(s[0],e,t,i),o]}
158
+ /*!
159
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
160
+ * SPDX-License-Identifier: BSD-3-Clause
161
+ *
162
+ * Redistribution and use in source and binary forms, with or without
163
+ * modification, are permitted provided that the following conditions are met:
164
+ *
165
+ * 1. Redistributions of source code must retain the above copyright notice, this
166
+ * list of conditions and the following disclaimer.
167
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
168
+ * this list of conditions and the following disclaimer in the
169
+ * documentation and/or other materials provided with the distribution.
170
+ * 3. Neither the name of the copyright holder nor the names of its contributors
171
+ * may be used to endorse or promote products derived from this software without
172
+ * specific prior written permission.
173
+ *
174
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
175
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
176
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
177
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
178
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
179
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
180
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
181
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
182
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
183
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
184
+ */
185
+ let me=/^[a-zA-Z0-9-_]+[ \t]*$/;function j(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new w(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new w(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let s=O(e,t);if(s<0)throw new w(`unfinished string encountered`,{toml:e,ptr:t});r=e.indexOf(`.`,s);let c=e.slice(s,r<0||r>a?a:r),l=T(c);if(l>-1)throw new w(`newlines are not allowed in keys`,{toml:e,ptr:t+r+l});if(c.trimStart())throw new w(`found extra tokens after the string part`,{toml:e,ptr:s});if(a<s&&(a=e.indexOf(n,s),a<0))throw new w(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(de(e,t,s))}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!me.test(n))throw new w(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,D(e,a+1,!0,!0)]}function he(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new w(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=E(e,t);else if(o!==` `&&o!==` `&&o!==`
186
+ `&&o!==`\r`){let o,s=i,c=!1,[l,u]=j(e,t-1);for(let n=0;n<l.length;n++){if(n&&(s=c?s[o]:s[o]={}),o=l[n],(c=Object.hasOwn(s,o))&&(typeof s[o]!=`object`||a.has(s[o])))throw new w(`trying to redefine an already defined value`,{toml:e,ptr:t});!c&&o===`__proto__`&&Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new w(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=A(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new w(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function ge(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new w(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=E(e,t);else if(a!==` `&&a!==` `&&a!==`
187
+ `&&a!==`\r`){let a=A(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new w(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}
188
+ /*!
189
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
190
+ * SPDX-License-Identifier: BSD-3-Clause
191
+ *
192
+ * Redistribution and use in source and binary forms, with or without
193
+ * modification, are permitted provided that the following conditions are met:
194
+ *
195
+ * 1. Redistributions of source code must retain the above copyright notice, this
196
+ * list of conditions and the following disclaimer.
197
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
198
+ * this list of conditions and the following disclaimer in the
199
+ * documentation and/or other materials provided with the distribution.
200
+ * 3. Neither the name of the copyright holder nor the names of its contributors
201
+ * may be used to endorse or promote products derived from this software without
202
+ * specific prior written permission.
203
+ *
204
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
205
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
206
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
207
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
208
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
209
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
210
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
211
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
212
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
213
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
214
+ */
215
+ function M(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function _e(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=D(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=j(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new w(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=M(n[0],r,i,t?2:1);if(!c)throw new w(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=j(e,s),i=M(r[0],a,o,0);if(!i)throw new w(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=A(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=D(e,s,!0),e[s]&&e[s]!==`
216
+ `&&e[s]!==`\r`)throw new w(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=D(e,s)}return r}
217
+ /*!
218
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
219
+ * SPDX-License-Identifier: BSD-3-Clause
220
+ *
221
+ * Redistribution and use in source and binary forms, with or without
222
+ * modification, are permitted provided that the following conditions are met:
223
+ *
224
+ * 1. Redistributions of source code must retain the above copyright notice, this
225
+ * list of conditions and the following disclaimer.
226
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
227
+ * this list of conditions and the following disclaimer in the
228
+ * documentation and/or other materials provided with the distribution.
229
+ * 3. Neither the name of the copyright holder nor the names of its contributors
230
+ * may be used to endorse or promote products derived from this software without
231
+ * specific prior written permission.
232
+ *
233
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
234
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
235
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
236
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
237
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
238
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
239
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
240
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
241
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
242
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
243
+ */
244
+ let N=/^[a-z0-9-_]+$/i;function P(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function ve(e){for(let t=0;t<e.length;t++)if(P(e[t])!==`object`)return!1;return e.length!=0}function F(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function I(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:r&&Number.isInteger(e)?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return F(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return ye(e,n,r);if(t===`array`)return be(e,n,r)}function ye(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=N.test(o)?o:F(o),i+=` = `,i+=I(e[o],P(e[o]),t-1,n)}return i+` }`}function be(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=I(e[i],P(e[i]),t-1,n)}return r+` ]`}function xe(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
245
+ `}[[${t}]]\n`,i+=L(0,e[a],t,n,r);return i}function L(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=P(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=N.test(c)?c:F(c);if(e===`array`&&ve(t[c]))o+=(o&&`
246
+ `)+xe(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
247
+ `)+L(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=I(t[c],e,r,i),a+=`
248
+ `}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Se(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(P(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=L(0,e,``,t,n);return r[r.length-1]===`
249
+ `?r:r+`
250
+ `}const R=[`claude`,`claude-desktop`,`cursor`,`vscode`,`windsurf`,`codex`],Ce=[`@inkeep/open-knowledge`,`mcp`],we={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`};function z(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=ee(e);if(f(t)===`cli.mjs`&&f(p(t))===`dist`)return t;let n=t.split(_),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return m(i.length===0?_:i.join(_),`packages`,`cli`,`dist`,`cli.mjs`)}function B(e={}){return e.cliPath?{command:e.cliPath,args:[`mcp`]}:e.mode===`dev`?{command:`node`,args:[z(e.cliEntryPath),`mcp`],env:{...we}}:{command:`npx`,args:[...Ce]}}function V(e){return e===`win32`?v:h}function Te(e={}){let t=e.platformName??process.platform,n=e.home??C(),r=e.env??process.env,i=V(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??C();return V(t).join(n,`.claude.json`)}function H(e={}){let t=e.platformName??process.platform,n=e.home??C(),r=e.env??process.env;if(t===`darwin`)return h.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??v.join(n,`AppData`,`Roaming`);return v.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??C();return V(t).join(n,`.cursor`,`mcp.json`)}function W(e={}){return V(e.platformName??process.platform).join(Te(e),`Code`,`User`,`mcp.json`)}function G(e={}){let t=e.platformName??process.platform,n=e.home??C();return V(t).join(n,`.codeium`,`windsurf`,`mcp_config.json`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??C();return(e.env??process.env).CODEX_HOME??V(t).join(n,`.codex`)}function K(e={}){return V(e.platformName??process.platform).join(De(e),`config.toml`)}function q(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>q(e,t[n]));if(d(e)&&d(t)){let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((e,t)=>e===r[t])&&n.every(n=>q(e[n],t[n]))}return!1}function Oe(e,t){return Object.entries(t).every(([t,n])=>q(e[t],n))}function ke(e,t){return{...e,...t}}function J(e){return{...e,isCompatible(t,n,r){return Oe(t,e.buildEntry(n,r))},mergeManagedFields(t,n,r){return ke(t,e.buildEntry(n,r))}}}const Y={claude:J({id:`claude`,label:`Claude Code`,configPath:(e,t)=>Ee({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>t,buildEntry:(e,t)=>B(t),scope:`global`,detectPath:(e,t)=>m(t??C(),`.claude`),legacyProjectConfigPath:e=>m(e,`.mcp.json`)}),"claude-desktop":J({id:`claude-desktop`,label:`Claude Desktop`,configPath:(e,t)=>H({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>t,buildEntry:(e,t)=>B(t),scope:`global`,detectPath:(e,t)=>p(H({home:t}))}),cursor:J({id:`cursor`,label:`Cursor`,configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>t,buildEntry:(e,t)=>B(t),scope:`global`,detectPath:(e,t)=>p(U({home:t})),legacyProjectConfigPath:e=>m(e,`.cursor`,`mcp.json`)}),vscode:J({id:`vscode`,label:`VS Code`,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`servers`,serverName:()=>t,buildEntry:(e,t)=>({type:`stdio`,...B(t)}),scope:`global`,detectPath:(e,t)=>p(W({home:t})),legacyProjectConfigPath:e=>m(e,`.vscode`,`mcp.json`)}),windsurf:J({id:`windsurf`,label:`Windsurf`,configPath:(e,t)=>G({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>t,buildEntry:(e,t)=>B(t),scope:`global`,detectPath:(e,t)=>p(G({home:t}))}),codex:J({id:`codex`,label:`Codex`,configPath:(e,t)=>K({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>t,buildEntry:(e,t)=>B(t),scope:`global`,detectPath:(e,t)=>p(K({home:t})),legacyProjectConfigPath:e=>m(e,`.codex`,`config.toml`)})};function Ae(e){let t=e.filter(e=>!(e in Y));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${R.join(`, `)}`);return e.map(e=>Y[e])}function je(e){if(!y(e))return{};let t=x(e,`utf-8`).trim();if(t===``)return{};try{let n=JSON.parse(t);if(d(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 Me(e){if(!y(e))return{};let t=x(e,`utf-8`).trim();if(t===``)return{};try{let n=_e(t);if(d(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 Ne(e,t){b(p(e),{recursive:!0}),S(e,`${JSON.stringify(t,null,2)}\n`,`utf-8`)}function Pe(e,t){b(p(e),{recursive:!0});let n=Se(t);S(e,n.endsWith(`
251
+ `)?n:`${n}\n`,`utf-8`)}const Fe=`0.0.1`,X=`open-knowledge-ui`;function Ie(e,t={}){let n=m(e,`.claude`,`launch.json`),r=t.mode===`dev`?{name:X,runtimeExecutable:`node`,runtimeArgs:[z(t.cliEntryPath),`ui`],port:3e3}:{name:X,runtimeExecutable:`npx`,runtimeArgs:[`@inkeep/open-knowledge`,`ui`],port:3e3};try{if(!y(n))return b(p(n),{recursive:!0}),S(n,`${JSON.stringify({version:Fe,configurations:[r]},null,2)}\n`,`utf-8`),{action:`created`,configPath:n};let e=x(n,`utf-8`).trim(),t=e?JSON.parse(e):{};if(!d(t))return{action:`failed`,configPath:n,error:`launch.json root is not an object`};let i=Array.isArray(t.configurations)?t.configurations:[],a=i.findIndex(e=>d(e)&&e.name===X);a>=0?i[a]=r:i.push(r);let o={...t,version:t.version??Fe,configurations:i};return S(n,`${JSON.stringify(o,null,2)}\n`,`utf-8`),{action:a>=0?`merged`:`created`,configPath:n}}catch(e){return{action:`failed`,configPath:n,error:e instanceof Error?e.message:String(e)}}}function Z(e,t,n){try{return y(e.detectPath?.(t,n)??p(e.configPath(t,n)))}catch{return!1}}function Q(e,t,n,r){let i=e.serverName(t),a;try{a=e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:i,error:t instanceof Error?t.message:String(t)}}if(!n.skipAvailabilityCheck&&!Z(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:a,serverName:i};let o;try{o=e.format===`toml`?Me(a):je(a)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}let s=o[e.topLevelKey]??{},c=s[i],l;try{l=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}let u={...o,[e.topLevelKey]:{...s,[i]:l}};try{e.format===`toml`?Pe(a,u):Ne(a,u)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}return{editorId:e.id,label:e.label,action:c===void 0?`written`:`overwritten`,configPath:a,serverName:i}}function Le(e,t){let n=e.legacyProjectConfigPath?.(t);if(!(!n||!y(n)))return{editorId:e.id,label:e.label,path:n}}async function Re(e){let t=Ae(e.editors),n={mode:`published`,cliPath:e.cliPath,skipAvailabilityCheck:!0};return t.map(t=>Q(t,``,n,e.home))}function ze(e,t,n){let r;try{r=e.configPath(t,n)}catch{return null}let i;try{i=e.format===`toml`?Me(r):je(r)}catch{return null}let a=i[e.topLevelKey];if(!d(a))return null;let o=a[e.serverName(t)];return d(o)?o:null}async function Be(e={}){let t=ee(e.cwd??process.cwd()),n={mode:e.devMcp?`dev`:`published`,cliEntryPath:e.cliEntryPath},i=await o(t),c;try{c=s(t)}catch(n){let r=Y.claude.configPath(t,e.home);return{contentCreated:[],contentSkipped:[],editors:[],legacyProjectConfigs:[],didGitInit:i.didInit,claudeDesktopDetected:!1,mcpAction:`failed`,mcpPath:r,mcpError:`Content scaffolding failed: ${n instanceof Error?n.message:String(n)}`}}let l=Ae(e.editors??$(t,e.home)),u=l.filter(n=>Z(n,t,e.home)),d=[];for(let r of l){if(e.mcp===!1){let n=``;try{n=r.configPath(t,e.home)}catch{}d.push({editorId:r.id,label:r.label,action:`skipped-flag`,configPath:n,serverName:r.serverName(t)});continue}d.push(Q(r,t,n,e.home))}let f=e.mcp===!1?[]:u.map(e=>Le(e,t)).filter(e=>e!==void 0),p=u.some(e=>e.id===`claude`)&&e.mcp!==!1?Ie(t,n):void 0,m=await(e.installUserSkill??a)({home:e.home}),h=r({home:e.home}),g=e.mcp===!1?`skipped-flag`:`skipped-missing`,_=d.find(e=>e.editorId===`claude`)??d[0]??{action:g,configPath:Y.claude.configPath(t,e.home)};return{contentCreated:c.created,contentSkipped:c.skipped,editors:d,legacyProjectConfigs:f,launchJson:p,skillInstall:m,didGitInit:i.didInit,claudeDesktopDetected:h,mcpAction:_.action,mcpPath:_.configPath,mcpError:`error`in _?_.error:void 0}}function Ve(e,t){let r=[],i=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),a=e.editors.some(e=>e.action===`failed`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),s=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`),d=e=>{let n=e.configPath.startsWith(t)?g(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&&r.push(`Initialized git repo at ${t}/.git/ (default branch: main)`);let f=m(t,n);if(e.contentCreated.length>0?(r.push(`Content scaffolded at ${f}/`),r.push(` Created: ${e.contentCreated.join(`, `)}`)):r.push(`Content already present at ${f}/`),e.contentSkipped.length>0&&r.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),r.push(``),e.mcpError&&e.editors.length===0)r.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)r.push(`MCP server configuration:`),r.push(e.mcpAction===`skipped-flag`?` MCP config not written — use without --no-mcp to configure editors`:` No supported editor config directories detected; skipped MCP registration`);else if(o)r.push(`MCP config not written — use without --no-mcp to configure editors`);else if(s)r.push(`MCP server configuration:`),r.push(` No supported editor config directories detected; skipped MCP registration`);else{r.push(`MCP server configuration:`);for(let n of e.editors){let i=n.configPath.startsWith(t)?g(t,n.configPath):n.configPath.replace(/^\/Users\/[^/]+/,`~`),a=n.serverName===`open-knowledge`?``:` (${n.serverName})`,o=` `.repeat(Math.max(1,14-n.label.length)),s=n.editorId===`claude-desktop`&&(n.action===`written`||n.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(n.action){case`written`:r.push(` ${n.label}${o}${i} registered${a}${s}`);break;case`overwritten`:r.push(` ${n.label}${o}${i} updated${a}${s}`);break;case`skipped-missing`:r.push(` ${n.label}${o}${i} config root missing; skipped`);break;case`failed`:r.push(` ${n.label}${o}${i} FAILED: ${n.error}`);break;case`skipped-flag`:break}n.editorId===`claude`&&e.launchJson&&r.push(d(e.launchJson))}}if(a&&(r.push(``),r.push(`For failed editors, add the MCP server entry manually. See:`),r.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){r.push(``),r.push(`Legacy project MCP configs detected:`);for(let n of e.legacyProjectConfigs)r.push(` ${n.label} ${g(t,n.path)}`);r.push(` These project-local files may override the new global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(r.push(``),r.push(`User-global skill:`),e.skillInstall){case`installed`:r.push(" open-knowledge installed to detected agent hosts via `npx skills`");break;case`skip-current`:r.push(` open-knowledge already installed at current version`);break;case`failed`:r.push(` ${l(`open-knowledge install failed — MCP still configured; run manually:`)}`),r.push(` ${l(` npx skills@~1.5.0 add <bundled-path> --agent '*' -g -y --copy`)}`);break}if(e.claudeDesktopDetected&&(r.push(``),r.push(`Claude Desktop App detected. To enable in Claude Chat & Cowork, run: ${u(`ok install-skill`)}`)),e.preview?(r.push(``),r.push(c(e.preview,t))):e.previewWarning&&(r.push(``),r.push(`Content preview unavailable: ${e.previewWarning}`)),i){let t=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.label);r.push(``),r.push(`Next steps:`),r.push(` 1. Open your editor (${t.join(` / `)})`),r.push(` 2. Approve the MCP server when prompted`),r.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),r.push(` - ok seed`),r.push(` 4. Use the three MCP workflow tools as you build the wiki:`),r.push(` - mcp__open-knowledge__ingest — capture an external source`),r.push(` - mcp__open-knowledge__research — gather sources and write findings`),r.push(` - mcp__open-knowledge__consolidate — promote research to canonical articles`)}return r.join(`
252
+ `)}function $(e,t){let n=[];for(let r of R)Z(Y[r],e,t)&&n.push(r);return n}function He(){return new e(`init`).description(`Scaffold ${n}/ 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 ${n}/ 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`).action(async e=>{let t=process.cwd(),n;try{n=await Be({cwd:t,mcp:e.mcp,devMcp:e.devMcp})}catch(e){if(e instanceof i){process.stderr.write(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.
253
+ `),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-C9fc_Jna.mjs`),{loadConfig:r}=await import(`./loader-DsgFEqrz.mjs`),{resolveContentDir:i}=await import(`./paths-DtSqXz-J.mjs`),{config:a}=r(t),o=i(a,t);n.preview=e({projectDir:t,contentDir:o,include:a.content.include,exclude:a.content.exclude})}catch(e){n.previewWarning=e instanceof Error?e.message:String(e)}process.stdout.write(`${Ve(n,t)}\n`),(n.editors.some(e=>e.action===`failed`)||n.mcpAction===`failed`)&&(process.exitCode=1)})}export{Be as a,R as c,ze as i,Y as l,Ve as n,Q as o,He as r,Re as s,$ as t};
254
+ //# sourceMappingURL=init-DOiFaqRI.mjs.map
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./init-CDQXH2-i.mjs";export{t as ensureOkGitignoredAtRoot,e as initContent};
@@ -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-CEU0BgQ5.mjs.map
2
+ //# sourceMappingURL=is-object-BNVklKxg.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{n as e}from"./chunk-A7ICOL4V-Drb3XsEL.mjs";export{e as join};
@@ -0,0 +1 @@
1
+ import"./chunk-YNYSPYQ5-BpP11HXS.mjs";import"./chunk-DXB73IDG-C774okS0.mjs";import"./chunk-5QMZ5MUS-DWTkM0vM.mjs";import"./chunk-24IMIIXA-Bz7rlZT3.mjs";import"./chunk-7TSDKFEO-a-GUGBTu.mjs";import"./chunk-BBXLRYSX-DURjrblE.mjs";import{t as e}from"./chunk-YCFVLTST-Ox9Z0Nk6.mjs";export{e as jqCommand};
@@ -0,0 +1,97 @@
1
+ import"./chunk-R6VWJ2ZL-B0CcMPyK.mjs";import"./chunk-CWQS3NFK-DFdwmFxJ.mjs";import"./chunk-DXB73IDG-C774okS0.mjs";import{t as e}from"./chunk-5QMZ5MUS-DWTkM0vM.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-C7BVq0eF.mjs";import{r}from"./chunk-OJDRYQWQ-BV5MVRVg.mjs";import{n as i,t as a}from"./chunk-3THT3N7L-klp8GP84.mjs";import{t as o}from"./chunk-44UOCSGV-BUBpWxXm.mjs";import{t as s}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{n as c,t as l}from"./chunk-I57KEIP3-B1DoH8rp.mjs";import{AsyncLocalStorage as u}from"node:async_hooks";import{fileURLToPath as d}from"node:url";import{Worker as f}from"node:worker_threads";import{randomBytes as p}from"node:crypto";var m=1e4,h=6e4,g=new u,_=`js-exec - Sandboxed JavaScript/TypeScript runtime with Node.js-compatible APIs
2
+
3
+ Usage: js-exec [OPTIONS] [-c CODE | FILE] [ARGS...]
4
+
5
+ Options:
6
+ -c CODE Execute inline code
7
+ -m, --module Enable ES module mode (import/export)
8
+ --strip-types Strip TypeScript type annotations
9
+ --version, -V Show version
10
+ --help Show this help
11
+
12
+ Examples:
13
+ js-exec -c "console.log(1 + 2)"
14
+ js-exec script.js
15
+ js-exec app.ts
16
+ echo 'console.log("hello")' | js-exec
17
+
18
+ File Extension Auto-Detection:
19
+ .js script mode (module mode if top-level await detected)
20
+ .mjs ES module mode
21
+ .ts, .mts ES module mode + TypeScript stripping
22
+
23
+ Node.js Compatibility:
24
+ Code written for Node.js largely works here. Both require and import
25
+ are supported, the node: prefix works, and standard globals like process,
26
+ console, and fetch are available. All I/O is synchronous.
27
+
28
+ Available modules:
29
+ fs, path, child_process, process, console,
30
+ os, url, assert, util, events, buffer, stream,
31
+ string_decoder, querystring
32
+
33
+ fs (global, require('fs'), or import from 'node:fs'):
34
+ readFileSync, writeFileSync, appendFileSync, copyFileSync, renameSync
35
+ readdirSync, mkdirSync, rmSync, unlinkSync, rmdirSync
36
+ statSync, lstatSync, existsSync, realpathSync, chmodSync
37
+ symlinkSync, readlinkSync, readFileBuffer
38
+ fs.promises.readFile, fs.promises.writeFile, fs.promises.access, ...
39
+
40
+ path: join, resolve, dirname, basename, extname, normalize,
41
+ relative, isAbsolute, parse, format, sep, delimiter
42
+
43
+ child_process:
44
+ execSync(cmd) throws on non-zero exit, returns stdout
45
+ spawnSync(cmd, args) returns { stdout, stderr, status }
46
+
47
+ process (also global): argv, cwd(), exit(), env, platform, arch,
48
+ version, versions
49
+
50
+ os: platform(), arch(), homedir(), tmpdir(), type(), hostname(),
51
+ EOL, cpus(), endianness()
52
+
53
+ url: URL, URLSearchParams, parse(), format()
54
+
55
+ assert: ok(), equal(), strictEqual(), deepEqual(), throws(),
56
+ doesNotThrow(), fail()
57
+
58
+ util: format(), inspect(), promisify(), types, inherits()
59
+
60
+ events: EventEmitter (on, once, emit, off, removeListener, ...)
61
+
62
+ buffer: Buffer.from(), Buffer.alloc(), Buffer.concat(),
63
+ Buffer.isBuffer(), toString(), slice(), equals()
64
+
65
+ stream: Readable, Writable, Duplex, Transform, PassThrough, pipeline
66
+
67
+ string_decoder: StringDecoder (write, end)
68
+
69
+ querystring: parse(), stringify(), escape(), unescape()
70
+
71
+ Other Globals:
72
+ console log (stdout), error/warn (stderr)
73
+ fetch(url, opts) HTTP; returns Promise<Response> (Web Fetch API)
74
+ URL, URLSearchParams, Headers, Request, Response
75
+ Buffer Buffer.from(), Buffer.alloc(), etc.
76
+
77
+ Not Available:
78
+ http, https, net, tls, crypto, zlib, dns, cluster, worker_threads,
79
+ vm, v8, readline, and other Node.js built-in modules that require
80
+ native bindings. Use fetch() for HTTP requests.
81
+
82
+ Limits:
83
+ Memory: 64 MB per execution
84
+ Timeout: 10 s (60 s with network; configurable via maxJsTimeoutMs)
85
+ Engine: QuickJS (compiled to WebAssembly)
86
+ `;function v(e){let t={code:null,scriptFile:null,showVersion:!1,scriptArgs:[],isModule:!1,stripTypes:!1};if(e.length===0)return t;for(let n=0;n<e.length;n++){let r=e[n];if(r===`-m`||r===`--module`){t.isModule=!0;continue}if(r===`--strip-types`){t.stripTypes=!0;continue}if(r===`-c`)return n+1>=e.length?{stdout:``,stderr:`js-exec: option requires an argument -- 'c'
87
+ `,exitCode:2}:(t.code=e[n+1],t.scriptArgs=e.slice(n+2),t);if(r===`--version`||r===`-V`)return t.showVersion=!0,t;if(r.startsWith(`-`)&&r!==`-`&&r!==`--`)return{stdout:``,stderr:`js-exec: unrecognized option '${r}'
88
+ `,exitCode:2};if(r===`--`)return n+1<e.length&&(t.scriptFile=e[n+1],t.scriptArgs=e.slice(n+2)),t;if(!r.startsWith(`-`))return t.scriptFile=r,t.scriptArgs=e.slice(n+1),t}return t}var y=null,b=null,x=[],S=null,C=d(new URL(`./worker.js`,import.meta.url));function w(){for(;x.length>0&&x[0].canceled;)x.shift();if(S||x.length===0)return;let e=x.shift();e&&(S=e,E().postMessage(S.input))}function T(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`}: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 E(){if(b&&=(t(b),null),y)return y;let n=e.runTrusted(()=>new f(C));return y=n,n.on(`message`,e=>{if(y===n){if(S){let t=T(e,S.input.protocolToken);S.resolve(t),S=null}x.length>0?w():D()}}),n.on(`error`,e=>{if(y===n){if(S){let t=a(o(e));S.resolve({success:!1,error:t}),S=null}for(let e of x)e.resolve({success:!1,error:`Worker crashed`});x.length=0,y=null}}),n.on(`exit`,()=>{y===n&&(y=null,S&&=(S.resolve({success:!1,error:`Worker exited unexpectedly`}),null),x.length>0&&w())}),n}function D(){b=n(()=>{y&&!S&&x.length===0&&(y.terminate(),y=null)},5e3)}async function O(e,t,n,r=[],i,a,o){return g.getStore()?{stdout:``,stderr:`js-exec: recursive invocation is not supported
89
+ `,exitCode:1}:k(e,t,n,r,i,a,o)}async function k(e,i,s,u=[],d,f,_){let v=c(),b=i.exec,C=b?(e,t)=>g.run(!0,()=>b(e,t)):void 0,T=new l(v,i.fs,i.cwd,`js-exec`,i.fetch,i.limits?.maxOutputSize??0,C),E=i.limits?.maxJsTimeoutMs??m,D=i.fetch?Math.max(E,h):E,O={protocolToken:p(16).toString(`hex`),sharedBuffer:v,jsCode:e,cwd:i.cwd,env:r(i.env),args:u,scriptPath:s,bootstrapCode:d,isModule:f,stripTypes:_,timeoutMs:D},k,A=new Promise(e=>{k=e}),j={input:O,resolve:()=>{}},M=n(()=>{if(S===j){let e=y;e&&(y=null,e.terminate()),S=null,w()}else j.canceled=!0,S||w();j.resolve({success:!1,error:`Execution timeout: exceeded ${D}ms limit`})},D);j.resolve=e=>{t(M),k(e)},x.push(j),w();let[N,P]=await Promise.all([T.run(D),A.catch(e=>({success:!1,error:a(o(e))}))]);return!P.success&&P.error?{stdout:N.stdout,stderr:`${N.stderr}js-exec: ${a(P.error)}
90
+ `,exitCode:N.exitCode||1}:N}var A={name:`js-exec`,async execute(e,t){if(s(e))return{stdout:_,stderr:``,exitCode:0};let n=v(e);if(`exitCode`in n)return n;if(n.showVersion)return{stdout:`QuickJS (quickjs-emscripten)
91
+ `,stderr:``,exitCode:0};let r,a;if(n.code!==null)r=n.code,a=`-c`;else if(n.scriptFile!==null){let e=t.fs.resolvePath(t.cwd,n.scriptFile);if(!await t.fs.exists(e))return{stdout:``,stderr:`js-exec: can't open file '${n.scriptFile}': No such file or directory
92
+ `,exitCode:2};try{r=await t.fs.readFile(e),a=e}catch(e){return{stdout:``,stderr:`js-exec: can't open file '${n.scriptFile}': ${i(e.message)}
93
+ `,exitCode:2}}}else if(t.stdin.trim())r=t.stdin,a=`<stdin>`;else return{stdout:``,stderr:`js-exec: no input provided (use -c CODE or provide a script file)
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
+
96
+ ${_}`,exitCode:1}}};export{A as jsExecCommand,j as nodeStubCommand};
97
+ //# sourceMappingURL=js-exec-M6UR76J5-DSk5_wnx.mjs.map
@@ -1,2 +1,2 @@
1
1
  function e(e){let t=e.scheduler??{setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)},n=e.initialBackoffMs??1e3,r=e.maxBackoffMs??3e4,i=e.createWebSocket??(e=>new WebSocket(e)),a=e.logger??null,o=e.log,s=null,c=null,l=!1,u=n;function d(e,t,n){try{a?a[e](t,n):o?.(t)}catch{}}function f(){if(l)return;c!==null&&t.clearTimeout(c);let e=u;u=Math.min(u*2,r),d(`debug`,`scheduling reconnect`,{backoffMs:e}),c=t.setTimeout(()=>{c=null,p().catch(e=>d(`warn`,`reconnect failed`,{error:String(e)}))},e)}async function p(){if(l)return;let t;try{t=await e.resolveWsUrl()}catch(e){d(`warn`,`resolveWsUrl threw`,{error:String(e)}),f();return}if(!t){f();return}let r=e.connectionId?`&connectionId=${encodeURIComponent(e.connectionId)}`:``,a=`${t}/collab/keepalive?pid=${process.pid}${r}`;try{s=i(a)}catch(e){d(`warn`,`WebSocket constructor failed`,{url:a,error:String(e)}),s=null,f();return}s.addEventListener(`open`,()=>{d(`info`,`connected`,{url:t}),u=n}),s.addEventListener(`close`,()=>{l||(d(`info`,`disconnected`,{url:t}),s=null,f())}),s.addEventListener(`error`,()=>{d(`debug`,`websocket error observed`,{url:t,readyState:s?.readyState,reason:`error-event`})})}return queueMicrotask(()=>{p().catch(e=>d(`warn`,`initial connect failed`,{error:String(e)}))}),{close:()=>{if(!l&&(l=!0,c!==null&&(t.clearTimeout(c),c=null),s)){try{s.close()}catch{}s=null}},isConnected:()=>s!==null&&s.readyState===1}}export{e as startKeepalive};
2
- //# sourceMappingURL=keepalive-DCcA7pmC.mjs.map
2
+ //# sourceMappingURL=keepalive-CZzB5k1h.mjs.map
@@ -0,0 +1,2 @@
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-Dl2j2VNl.mjs.map
@@ -0,0 +1,14 @@
1
+ var e=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends e{};function t(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function n(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function r(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function i(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function a(e,t){return r(e,t,``)}function o(e,t){return i(e,t,``)}function s(e,t){return t.slice(0,c(e,t))}function c(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function l(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function u(e,t){if(t)return f(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function d(e,t){if(t)return f(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function f(e,t){if(!t)return[d(e),u(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=l(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}const p=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,m=RegExp(`[${p}]+|\\s+|[^${p}]`,`ug`);new class extends e{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=l(e,r)}else n=e.match(m)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&h(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&h(n,i,r,null,t.intlSegmenter),e}};function h(e,c,l,p,m){if(c&&l){let[s,u]=f(c.value,m),[d,h]=f(l.value,m);if(e){let n=t(s,d);e.value=i(e.value,d,n),c.value=a(c.value,n),l.value=a(l.value,n)}if(p){let e=n(u,h);p.value=r(p.value,h,e),c.value=o(c.value,e),l.value=o(l.value,e)}}else if(l){if(e){let e=d(l.value,m);l.value=l.value.substring(e.length)}if(p){let e=d(p.value,m);p.value=p.value.substring(e.length)}}else if(e&&p){let s=d(p.value,m),[l,u]=f(c.value,m),h=t(s,l);c.value=a(c.value,h);let g=n(a(s,h),u);c.value=o(c.value,g),p.value=r(p.value,s,g),e.value=i(e.value,s,s.slice(0,s.length-g.length))}else if(p){let e=d(p.value,m),t=s(u(c.value,m),e);c.value=o(c.value,t)}else if(e){let t=s(u(e.value,m),d(c.value,m));c.value=a(c.value,t)}}new class extends e{tokenize(e){let t=RegExp(`(\\r?\\n)|[${p}]+|[^\\S\\n\\r]+|[^${p}]`,`ug`);return e.match(t)||[]}};const g=new class extends e{constructor(){super(...arguments),this.tokenize=v}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
+ `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
+ `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
+ `)&&(e=e.slice(0,-1)),t.endsWith(`
5
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function _(e,t,n){return g.diff(e,t,n)}function v(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
6
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function y(e){return e==`.`||e==`!`||e==`?`}new class extends e{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(y(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends e{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends e{constructor(){super(...arguments),this.tokenize=v}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(b(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function b(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=b(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=b(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends e{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};const x={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function S(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;_(n,r,Object.assign(Object.assign({},s),{callback:t=>{e(l(t))}}))}else return l(_(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||E(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s)if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
7
+ `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function C(e,t){if(t||=x,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>C(e,t)).join(`
8
+ `)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
9
+ `)+`
10
+ `}function w(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;S(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?C(e,o.headerOptions):void 0)}}))}else{let s=S(e,t,n,r,i,a,o);return s?C(s,o?.headerOptions):void 0}}function T(e,t,n,r,i,a){return w(e,e,t,n,r,i,a)}function E(e){let t=e.endsWith(`
11
+ `),n=e.split(`
12
+ `).map(e=>e+`
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-DC4M2SkF.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{n as e}from"./chunk-PBXLG62G-lGjqkk78.mjs";export{e as lnCommand};
@@ -0,0 +1,3 @@
1
+ import{t as e}from"./dist-BCyi1oM7.mjs";import{n as t}from"./constants-BZWlp7wi.mjs";import{B as n,K as r,Z as i,et as a,p as o,q as s,z as c}from"./dist-DRC09WNZ.mjs";import{t as l}from"./is-object-BNVklKxg.mjs";import{resolve as u}from"node:path";import{existsSync as d,readFileSync as f}from"node:fs";import{homedir as p}from"node:os";import{realpath as m}from"node:fs/promises";async function h(e){let t=u(e);try{return await m(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}}const g=s({title:i().optional(),description:i().optional(),tags:c(i()).optional()}).strict(),_=s({match:i().min(1,"`match` must be a non-empty glob pattern (e.g. 'specs/**' or 'reports/*/**')"),frontmatter:g}).strict(),v=s({content:s({dir:i().default(`.`),include:c(i()).min(1).default([`**/*.md`,`**/*.mdx`]),exclude:c(i()).default([])}).default({dir:`.`,include:[`**/*.md`,`**/*.mdx`],exclude:[]}),github:s({oauthAppClientId:i().default(`Ov23liqlSd0V1MwR6rhI`)}).default({oauthAppClientId:`Ov23liqlSd0V1MwR6rhI`}),sync:s({enabled:n().optional(),pushIntervalSeconds:r().int().min(1).default(60),pullIntervalSeconds:r().int().min(1).default(30),autoCommit:n().default(!0),autoPush:n().default(!0),autoPull:n().default(!0),commitMessage:i().default(`auto`)}).default({pushIntervalSeconds:60,pullIntervalSeconds:30,autoCommit:!0,autoPush:!0,autoPull:!0,commitMessage:`auto`}),server:s({port:r().int().min(0).max(65535).default(0),host:i().regex(/^[\w.\-:]+$/,`Invalid hostname`).default(`localhost`),openOnAgentEdit:n().default(!1)}).default({port:0,host:`localhost`,openOnAgentEdit:!1}),persistence:s({debounceMs:r().int().min(0).default(2e3),maxDebounceMs:r().int().min(0).default(1e4)}).default({debounceMs:2e3,maxDebounceMs:1e4}),preview:s({baseUrl:a().optional()}).default({}),folders:c(_).default([]),mcp:s({autoStart:n().default(!0),tools:s({read_document:s({historyDepth:r().int().min(0).default(5)}).default({historyDepth:5}),search:s({maxResults:r().int().min(1).default(50)}).default({maxResults:50})}).default({read_document:{historyDepth:5},search:{maxResults:50}})}).default({autoStart:!0,tools:{read_document:{historyDepth:5},search:{maxResults:50}}})});var y=e();function b(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];l(a)&&l(i)?n[r]=b(i,a):a!==void 0&&(n[r]=a)}return n}function x(e){if(!d(e))return null;try{let t=(0,y.parse)(f(e,`utf-8`));return l(t)?t:null}catch(t){return console.warn(`[config] Failed to parse ${e}: ${t instanceof Error?t.message:t}`),null}}function S(e){let n=e??process.cwd(),r=[],i=u(p(),o,t),a={},s=x(i);s&&(a=b(a,s),r.push(i));let c=u(n,o,t),l=x(c);l&&(a=b(a,l),r.push(c));let d=v.safeParse(a);if(!d.success){let e=d.error.issues.map(e=>` ${e.path.join(`.`)}: ${e.message}`);throw Error(`Invalid configuration:\n${e.join(`
2
+ `)}`)}return{config:d.data,sources:r}}function C(e,t=process.env){let n=e;return t.PORT&&(n={...n,server:{...n.server,port:Number(t.PORT)}}),t.HOST&&(n={...n,server:{...n.server,host:t.HOST}}),n}function w(e){let t=e.env??process.env,n=e.cacheMs??1e3,r=e.loadConfigFn??S,i=new Map,a=new Map,o=h(e.startupCwd);return async s=>{let c=await h(s??e.startupCwd),l=Date.now(),u=i.get(c);if(u&&u.expiresAt>l)return u.config;let d=a.get(c);if(d)return await d;let f=(async()=>{if(c===await o){let r=C(e.startupConfig,t);return i.set(c,{config:r,expiresAt:Date.now()+n}),r}let a=C(r(c).config,t);return i.set(c,{config:a,expiresAt:Date.now()+n}),a})();a.set(c,f);try{return await f}finally{a.delete(c)}}}export{h as i,S as n,v as r,w as t};
3
+ //# sourceMappingURL=loader-B-hHIGF7.mjs.map
@@ -0,0 +1 @@
1
+ import{n as e}from"./loader-B-hHIGF7.mjs";export{e as loadConfig};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{t as e}from"./chunk-V7TAPXDL-CnKUp2df.mjs";export{e as lsCommand};
@@ -0,0 +1,2 @@
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*as c from"node:assert";import{pipeline as l}from"node:stream/promises";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,c.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`;c.ok(!this._closed,`Stream closed!`);let i=e?.length,a=this._chunkSize-this._offset,o=0;if(!r){let n=[],r=0,s=null,l=(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 l=a-s;if(c.ok(l>=0,`More bytes after than before! Delta = ${l}`),l>0){let e=this._buffer.subarray(this._offset,this._offset+l);this._offset+=l,n.push(e),r+=l}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||!l(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,l,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(c.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||l>0)return o+=(i??0)-l,i=l,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 l(a,K(n),o)}async function Ee(e,t,n){let a=r(e),o=i(t);await l(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-0LJzVZpl.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{n as e}from"./chunk-APT7OOP2-CXHnSuct.mjs";export{e as md5sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{t as e}from"./chunk-MDDMCKUK-D6GWoJsI.mjs";export{e as mkdirCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{t as e}from"./chunk-A4JSPFCI-U-xWmMMC.mjs";export{e as mvCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{n as e}from"./chunk-F23WWYKW-DST0dB7V.mjs";export{e as nl};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.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";function t(t){e(process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,process.platform===`win32`?[`/c`,`start`,``,t]:[t],e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${t} manually`)})}export{t as openBrowser};
2
- //# sourceMappingURL=open-browser-ryHU9Kmc.mjs.map
2
+ //# sourceMappingURL=open-browser-BzMQ6cLf.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-C774okS0.mjs";import{t as e}from"./chunk-JVPRLUMK-DnQCNjpq.mjs";export{e as pasteCommand};
@@ -0,0 +1,2 @@
1
+ import"./constants-BZWlp7wi.mjs";import{p as e}from"./dist-DRC09WNZ.mjs";import{resolve as t}from"node:path";function n(e,n){return t(n,e.content.dir)}function r(n){return t(n,e)}export{r as n,n as t};
2
+ //# sourceMappingURL=paths-CcbqTPyR.mjs.map
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./paths-CcbqTPyR.mjs";export{t as resolveContentDir,e as resolveLockDir};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./preview-DsHKavXe.mjs";export{t as formatPreviewBlock,e as previewContent};