@inkeep/open-knowledge 0.49.0 → 0.49.2

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 (834) hide show
  1. package/dist/abnfDiagram-VRR7QNED-DWDzSKGM.mjs +2 -0
  2. package/dist/acp-harness-probe-O9BEMpdb.mjs +3 -0
  3. package/dist/alias-JE7RI5QX-BLuOrjl2.mjs +7 -0
  4. package/dist/alias-JE7RI5QX-VxEqWoTW.mjs +1 -0
  5. package/dist/arc-DXUbbcxK.mjs +2 -0
  6. package/dist/architecture-TIHT7OUA-Bl3hpxt3.mjs +1 -0
  7. package/dist/architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs +37 -0
  8. package/dist/array-BbgQa93P.mjs +2 -0
  9. package/dist/awk2-BBAGSFUB-ClUuupKf.mjs +21 -0
  10. package/dist/awk2-BBAGSFUB-Dq-YdAGA.mjs +1 -0
  11. package/dist/banner-Be20aAVc.mjs +3 -0
  12. package/dist/base64-4YMZCVJ5-CtkujsXK.mjs +6 -0
  13. package/dist/base64-4YMZCVJ5-dXz6vbV-.mjs +1 -0
  14. package/dist/basename-AA2KJYZQ-BhoOTAHi.mjs +1 -0
  15. package/dist/basename-AA2KJYZQ-CEdH80GO.mjs +6 -0
  16. package/dist/bash-IJWYRKFO-BDtU-lTC.mjs +6 -0
  17. package/dist/bash-IJWYRKFO-jaJEvAZe.mjs +1 -0
  18. package/dist/blockDiagram-677ZJIJ3-yJugV29e.mjs +133 -0
  19. package/dist/c4Diagram-LMCZKHZV-BFQQLctA.mjs +11 -0
  20. package/dist/cat-RDUMLXKC-D1H4LA3Z.mjs +6 -0
  21. package/dist/cat-RDUMLXKC-DFuXWxVq.mjs +1 -0
  22. package/dist/channel-Cjp51EO_.mjs +2 -0
  23. package/dist/chmod-SYMGL4JA-ByMUk130.mjs +1 -0
  24. package/dist/chmod-SYMGL4JA-lEGJICyB.mjs +8 -0
  25. package/dist/chokidar-dh8zokRd.mjs +4 -0
  26. package/dist/chunk-24IMIIXA-RjlBWJtr.mjs +2 -0
  27. package/dist/chunk-2Q5K7J3B-Ck8oGqYt.mjs +2 -0
  28. package/dist/chunk-2TRDZQLB-AH-I_6yN.mjs +18 -0
  29. package/dist/chunk-2TRDZQLB-ZoW1EBbl.mjs +18 -0
  30. package/dist/chunk-32BRIVSS-Dwq69mnI.mjs +2 -0
  31. package/dist/chunk-3BS5SKQH-DpdUzS0R.mjs +140 -0
  32. package/dist/chunk-3H6UQG3A-BWCaN15a.mjs +9 -0
  33. package/dist/chunk-3THT3N7L-DYkTD3HD.mjs +2 -0
  34. package/dist/chunk-3ZUFRYJ4-H1A1hWy1.mjs +2 -0
  35. package/dist/chunk-3ZUFRYJ4-ekaYB_vG.mjs +2 -0
  36. package/dist/chunk-44UOCSGV-D1FZHMOP.mjs +2 -0
  37. package/dist/chunk-4GTNDTRF-Cx89i2Y1.mjs +8 -0
  38. package/dist/chunk-4HHKTUW3-Dk2l1S8J.mjs +3 -0
  39. package/dist/chunk-4Q4SM6WR-CGuvvBWe.mjs +5 -0
  40. package/dist/chunk-52WLFC77-Cn-qt8h-.mjs +11 -0
  41. package/dist/chunk-55VFSPNA-D2U7n2ka.mjs +3 -0
  42. package/dist/chunk-5FCAYU7R-DszODYLe.mjs +2 -0
  43. package/dist/chunk-5HE753X5-DDnyF29o.mjs +2 -0
  44. package/dist/chunk-5JV3BV7I-BkeVAZnj.mjs +2 -0
  45. package/dist/chunk-5QMZ5MUS-C5NTf5Rj.mjs +5 -0
  46. package/dist/chunk-5QVNJEHU-DS9zA_YV.mjs +9 -0
  47. package/dist/chunk-5TONJI2A-CzUNHQPX.mjs +3 -0
  48. package/dist/chunk-5V6VZH6T-DBFenjXz.mjs +2 -0
  49. package/dist/chunk-5VM5RSS4-C8vNNqW0.mjs +16 -0
  50. package/dist/chunk-62RKD26F-C4qK_fA-.mjs +21 -0
  51. package/dist/chunk-64BAICW3-BupSxcu5.mjs +2 -0
  52. package/dist/chunk-6Z5SFZXK-Cz0C4bhB.mjs +288 -0
  53. package/dist/chunk-74CEPOFO-BUVWiXkJ.mjs +23 -0
  54. package/dist/chunk-74CEPOFO-BYrCYxKO.mjs +23 -0
  55. package/dist/chunk-7BUUIJ7U-D7hE25H9.mjs +2 -0
  56. package/dist/chunk-7L36YK2X-CGwYuotX.mjs +3 -0
  57. package/dist/chunk-7L36YK2X-DAp-upAs.mjs +3 -0
  58. package/dist/chunk-7TSDKFEO-CE_P23TY.mjs +2 -0
  59. package/dist/chunk-7TSDKFEO-DBB10vPw.mjs +2 -0
  60. package/dist/chunk-A4HU7SVR-BZJ8xDMo.mjs +3 -0
  61. package/dist/chunk-A4JSPFCI-Dej71yGP.mjs +7 -0
  62. package/dist/chunk-A5O5YHGN-CczwCZ4d.mjs +2 -0
  63. package/dist/chunk-A65PWWJC-C-0S-s_f.mjs +3 -0
  64. package/dist/chunk-A7A2DBEE-DCXJ1xmx.mjs +7 -0
  65. package/dist/chunk-A7ICOL4V-BQZ9JZ1A.mjs +14 -0
  66. package/dist/chunk-ALLTKNUZ-D2ZOfcEz.mjs +6 -0
  67. package/dist/chunk-APT7OOP2-D-DaFB7K.mjs +2 -0
  68. package/dist/chunk-B74TABJS-BJwhrR8a.mjs +34 -0
  69. package/dist/chunk-BIQX33UG-Bmho6v3L.mjs +2 -0
  70. package/dist/chunk-C7G6YPKG-BAX_SClW.mjs +2 -0
  71. package/dist/chunk-CQNSW5MT-FekKjn0i.mjs +2 -0
  72. package/dist/chunk-CWQS3NFK-CcBWgb8o.mjs +2 -0
  73. package/dist/chunk-CYSBUYHQ-BftsYwRW.mjs +2 -0
  74. package/dist/chunk-D4J545R4-Br_5qOnE.mjs +12 -0
  75. package/dist/chunk-D6CWQ5DW-3AWPydfx.mjs +6 -0
  76. package/dist/chunk-D7MEQ3VN-Df6An2jd.mjs +5 -0
  77. package/dist/chunk-DBKNVD4L-B3hX287s.mjs +10 -0
  78. package/dist/chunk-DBKNVD4L-DNQP2COw.mjs +10 -0
  79. package/dist/chunk-DCAAORBQ-BDLVpBG2.mjs +2 -0
  80. package/dist/chunk-DHbaKqs-.mjs +1 -0
  81. package/dist/chunk-DXB73IDG-BBwE27jK.mjs +2 -0
  82. package/dist/chunk-EEXR5ZDP-CE452hsE.mjs +3 -0
  83. package/dist/chunk-EEXR5ZDP-Df-EPnbj.mjs +3 -0
  84. package/dist/chunk-EIZGF4BS-86nrMkyt.mjs +9 -0
  85. package/dist/chunk-EIZGF4BS-CSFp0aUh.mjs +9 -0
  86. package/dist/chunk-EMLP6XTP-C2yfLzVC.mjs +2 -0
  87. package/dist/chunk-EX3LRPZG-Chp9b-Lc.mjs +232 -0
  88. package/dist/chunk-F23WWYKW-qKke1WqP.mjs +17 -0
  89. package/dist/chunk-FWX5IMBZ-Cn1xNcn5.mjs +2 -0
  90. package/dist/chunk-GCTKCWKD-D0obXRun.mjs +4 -0
  91. package/dist/chunk-GFQRA5P5-XqPO4cim.mjs +3 -0
  92. package/dist/chunk-GOV5EKKI-CDovwI7Z.mjs +10 -0
  93. package/dist/chunk-GXVXFKBA-D-BGCybM.mjs +6 -0
  94. package/dist/chunk-HDQ56CKY-CI8IkhlS.mjs +16 -0
  95. package/dist/chunk-HDQ56CKY-Pa-7c4rC.mjs +16 -0
  96. package/dist/chunk-HJQJAYMS-BHzb4Ncl.mjs +3 -0
  97. package/dist/chunk-HJWBQKYG-B-KESSoV.mjs +6 -0
  98. package/dist/chunk-HKLCLINH-Bgw53oZd.mjs +63 -0
  99. package/dist/chunk-HL6NGDO2-CftrHAlX.mjs +24 -0
  100. package/dist/chunk-HOUHSVGY-C3h3PdhC.mjs +2 -0
  101. package/dist/chunk-HWKDQ44K-CGcvROg-.mjs +4 -0
  102. package/dist/chunk-HWKDQ44K-D3ZbaPl8.mjs +4 -0
  103. package/dist/chunk-I57KEIP3-_HYA-njf.mjs +11 -0
  104. package/dist/chunk-I57KEIP3-iiTO2OC-.mjs +11 -0
  105. package/dist/chunk-ICXQ74PX-DbJy3VdO.mjs +3 -0
  106. package/dist/chunk-IPJHKYVM-3ANqAo3C.mjs +2 -0
  107. package/dist/chunk-JG7HCLWE-lUInQ_44.mjs +3 -0
  108. package/dist/chunk-JVPRLUMK-FzUEFQw9.mjs +8 -0
  109. package/dist/chunk-JWPE2WC7-iDbhfJR-.mjs +2 -0
  110. package/dist/chunk-K6LIBGJA-BXxOXTjI.mjs +12 -0
  111. package/dist/chunk-KEIR6QF5-BLwvtFl6.mjs +176 -0
  112. package/dist/chunk-KMEYNNUA-1KiUKBQV.mjs +16 -0
  113. package/dist/chunk-KRBPSX3W-DeaaVEij.mjs +6 -0
  114. package/dist/chunk-KRBPSX3W-YDdgrCmf.mjs +6 -0
  115. package/dist/chunk-LL3S3NLB-D0lLKwVi.mjs +2 -0
  116. package/dist/chunk-LTZRCH7N-DpPs5vSq.mjs +32 -0
  117. package/dist/chunk-LWEGUNWT-DOK-XWMd.mjs +8 -0
  118. package/dist/chunk-MDDMCKUK-CTA6qEdN.mjs +7 -0
  119. package/dist/chunk-MDLLFABN-B2tA3LLA.mjs +73 -0
  120. package/dist/chunk-MHTUABJP-CrR3MfDw.mjs +9 -0
  121. package/dist/chunk-MIZPJHVH-d3bhRfh4.mjs +8 -0
  122. package/dist/chunk-MLXIYONF-C0S_CKb1.mjs +16 -0
  123. package/dist/chunk-MOJQB5TN-CUt4IiNv.mjs +89 -0
  124. package/dist/chunk-MOZMSUNE-DCxwDKn7.mjs +2 -0
  125. package/dist/chunk-MYE6AGBJ-CMoRJzYM.mjs +17 -0
  126. package/dist/chunk-NAERJDUW-Ck-SZ2Ps.mjs +9 -0
  127. package/dist/chunk-NCNPKYJZ-BxqfYu6d.mjs +3 -0
  128. package/dist/chunk-NUYSJFDK-DfaBzW-k.mjs +8 -0
  129. package/dist/chunk-OCLXQMOG-DC3689MV.mjs +7 -0
  130. package/dist/chunk-OCS6LSEM-BY3_3dNt.mjs +14 -0
  131. package/dist/chunk-OGEWGWER-DgPAesMA.mjs +2 -0
  132. package/dist/chunk-OJDRYQWQ-B9KRyRFZ.mjs +2 -0
  133. package/dist/chunk-OSBZ3O6U-BVpvamr7.mjs +2 -0
  134. package/dist/chunk-PBXLG62G-C12xrBbG.mjs +9 -0
  135. package/dist/chunk-PP6PSHAB-tlM6YKyg.mjs +5 -0
  136. package/dist/chunk-PUDLZKDR-CIWYIjrF.mjs +157 -0
  137. package/dist/chunk-PXTK5WE2-DNbfUrIy.mjs +22 -0
  138. package/dist/chunk-PXTK5WE2-e9kxtsgu.mjs +22 -0
  139. package/dist/chunk-PYSFUGCK-DqdcBhD4.mjs +11 -0
  140. package/dist/chunk-Q4XR5HBZ-jWirJQsj.mjs +71 -0
  141. package/dist/chunk-QBLGF6JB-hMrl9lGc.mjs +2 -0
  142. package/dist/chunk-QCDB2VPH-Cv7mIZWG.mjs +7 -0
  143. package/dist/chunk-QJ7O6ZN3-BRN048sn.mjs +6 -0
  144. package/dist/chunk-R6QSAL5T-CxzbKF59.mjs +2 -0
  145. package/dist/chunk-R6VWJ2ZL-DmUcUF0z.mjs +2 -0
  146. package/dist/chunk-R7FJI6CG-bmCS8vOS.mjs +2 -0
  147. package/dist/chunk-RPNGRAAP-BTpXCNpb.mjs +8 -0
  148. package/dist/chunk-RYQCIY6F-Dt7I2-Oy.mjs +2 -0
  149. package/dist/chunk-SDNKECQQ-BNRfy-15.mjs +6 -0
  150. package/dist/chunk-SNN4IESC-CZPQ88bY.mjs +2 -0
  151. package/dist/chunk-SNN4IESC-oXVGT9qo.mjs +2 -0
  152. package/dist/chunk-T56QNPHK-lY6QjpkL.mjs +15 -0
  153. package/dist/chunk-TLSUDHID-BP7dARSe.mjs +7 -0
  154. package/dist/chunk-TOMNU26N-BFsBBT9j.mjs +5 -0
  155. package/dist/chunk-TP4BZANS-C6KGxaUf.mjs +21 -0
  156. package/dist/chunk-TXBZCHCQ-DxPX5PCF.mjs +6 -0
  157. package/dist/chunk-U6XO7XAA-BHty90wb.mjs +3 -0
  158. package/dist/chunk-V5MWI2OL-DApVl_z4.mjs +5 -0
  159. package/dist/chunk-V7JOEXUC-DNM56rwe.mjs +207 -0
  160. package/dist/chunk-V7TAPXDL-CrGsULIH.mjs +28 -0
  161. package/dist/chunk-VAUOI2AC-BdotBBDE.mjs +2 -0
  162. package/dist/chunk-VJFXDYWH-DXnppZsu.mjs +11 -0
  163. package/dist/chunk-VOBGTVA6-_4QbVbSJ.mjs +7 -0
  164. package/dist/chunk-VR4S4FIN-RUJ5PgRH.mjs +2 -0
  165. package/dist/chunk-VYOJP4TV-DG_cm0JM.mjs +14 -0
  166. package/dist/chunk-WKFATFPP-DygaP6No.mjs +5 -0
  167. package/dist/chunk-WYO6CB5R-DN1R0VLx.mjs +130 -0
  168. package/dist/chunk-X2AJGDEF-BXjUENXL.mjs +2 -0
  169. package/dist/chunk-X2AJGDEF-ivzQBp_p.mjs +2 -0
  170. package/dist/chunk-XKQRETAK-CYJSOFLN.mjs +2 -0
  171. package/dist/chunk-XKWWSDBF-BTj39eCO.mjs +37 -0
  172. package/dist/chunk-XVDPCNWR-BSVT7Ttz.mjs +12 -0
  173. package/dist/chunk-XXDRQBXY-D1gFTzjI.mjs +2 -0
  174. package/dist/chunk-Y2CYZVJY-acXC9Sbb.mjs +2 -0
  175. package/dist/chunk-YMMW5UAP-CE-EQ2Is.mjs +33 -0
  176. package/dist/chunk-YOTPTUD7-63S9b4Z2.mjs +2 -0
  177. package/dist/chunk-YTNYSM6T-DFPh_641.mjs +12 -0
  178. package/dist/chunk-YULBWSET-B6FKJjk9.mjs +14 -0
  179. package/dist/chunk-Z6LRHWXI-BCgawaNX.mjs +14 -0
  180. package/dist/chunk-Z7JVV2SM-CTUpikzI.mjs +12 -0
  181. package/dist/chunk-ZGVPDNZ5-CyyHBEs2.mjs +63 -0
  182. package/dist/chunk-ZIRB5QZD-K23GvNu-.mjs +39 -0
  183. package/dist/chunk-ZZO3UDB3-MiEiJy8J.mjs +100 -0
  184. package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +2 -0
  185. package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +2 -0
  186. package/dist/clear-5CZ5X4YR-9EZyt4MH.mjs +2 -0
  187. package/dist/clear-5CZ5X4YR-BICGLF_r.mjs +1 -0
  188. package/dist/cli.mjs +22 -22
  189. package/dist/column-WLPMMSTS-D0I9TpQ2.mjs +1 -0
  190. package/dist/column-WLPMMSTS-Do8HgL6q.mjs +8 -0
  191. package/dist/comm-5SLSESQG-0igXzBnl.mjs +12 -0
  192. package/dist/comm-5SLSESQG-D2Rs9Jmo.mjs +1 -0
  193. package/dist/constants-C3InsrBS.mjs +2 -0
  194. package/dist/cose-bilkent-JH36ORCC-B1gjUwU3.mjs +2 -0
  195. package/dist/cp-XOYR4ABJ-CpnwcT2f.mjs +8 -0
  196. package/dist/cp-XOYR4ABJ-OfwEEWhR.mjs +1 -0
  197. package/dist/curl-47BFPSFW-Ko1BcK_R.mjs +26 -0
  198. package/dist/cut-OPC3VAGB-BAhJz0Qh.mjs +1 -0
  199. package/dist/cut-OPC3VAGB-nJAw1cEp.mjs +6 -0
  200. package/dist/cynefin-VYW2F7L2-C-aICrN-.mjs +1 -0
  201. package/dist/cynefinDiagram-TSTJHNR4-CoESbhp4.mjs +63 -0
  202. package/dist/cytoscape.esm-D6l9Lhue.mjs +332 -0
  203. package/dist/dagre-BkPA5x_w.mjs +2 -0
  204. package/dist/dagre-VKFMJZFB-BhCtWAkc.mjs +5 -0
  205. package/dist/date-DD7FVA2V-BGJ9-l0O.mjs +1 -0
  206. package/dist/date-DD7FVA2V-W_sbdO4n.mjs +5 -0
  207. package/dist/defaultLocale-DN4qDyCE.mjs +2 -0
  208. package/dist/diagram-FQU43EPY-BdshpOzp.mjs +4 -0
  209. package/dist/diagram-G47NLZAW-Lw1fB9_w.mjs +25 -0
  210. package/dist/diagram-NH7WQ7WH-DnzwFaQq.mjs +25 -0
  211. package/dist/diagram-OA4YK3LP-BXU-URV1.mjs +31 -0
  212. package/dist/diagram-WEI45ONY-CD_Zpcvk.mjs +42 -0
  213. package/dist/diff-HJF2MPDN-CQAaA8lM.mjs +1 -0
  214. package/dist/diff-HJF2MPDN-EjmLU95d.mjs +7 -0
  215. package/dist/dirname-LEMTZZFS-BG01-R4_.mjs +1 -0
  216. package/dist/dirname-LEMTZZFS-Dg3ijqjM.mjs +5 -0
  217. package/dist/dist-CMZz8-Ge.mjs +2 -0
  218. package/dist/du-WO2ENHXQ-jqWYqk_n.mjs +8 -0
  219. package/dist/du-WO2ENHXQ-oQRVbsEF.mjs +1 -0
  220. package/dist/ebnfDiagram-CCIWWBDH-D-647A1u.mjs +2 -0
  221. package/dist/echo-O45JWWI2-BPosfKdD.mjs +1 -0
  222. package/dist/echo-O45JWWI2-gk6mEMAU.mjs +4 -0
  223. package/dist/env-5EPCWSXR-BU5zTNDV.mjs +9 -0
  224. package/dist/env-5EPCWSXR-DygzVPiG.mjs +1 -0
  225. package/dist/erDiagram-Q63AITRT-DviwoNdm.mjs +86 -0
  226. package/dist/eventmodeling-45OFAUF4-CJqJ2hnR.mjs +1 -0
  227. package/dist/execAsync-BLKHjfg7.mjs +2 -0
  228. package/dist/execAsync-C5ympCkf.mjs +2 -0
  229. package/dist/expand-DTNXU4LQ-D2bEx87V.mjs +11 -0
  230. package/dist/expand-DTNXU4LQ-XU44HrWp.mjs +1 -0
  231. package/dist/expr-YYCVMXE3-DI2glLwn.mjs +1 -0
  232. package/dist/expr-YYCVMXE3-wI0boF3e.mjs +5 -0
  233. package/dist/file-IGDTDPLG-DkYMcmTl.mjs +24 -0
  234. package/dist/file-IGDTDPLG-sPfWVy9T.mjs +1 -0
  235. package/dist/find-DH2ALKQS-B6bMjuwo.mjs +12 -0
  236. package/dist/find-DH2ALKQS-CEKaRkgJ.mjs +1 -0
  237. package/dist/flag-coverage-6JEX67RU-QmoBigPs.mjs +2 -0
  238. package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +1 -0
  239. package/dist/fold-LDSORVYE-Dhx0k6vg.mjs +12 -0
  240. package/dist/fold-LDSORVYE-DumfsCQO.mjs +1 -0
  241. package/dist/fs-traced-DVpoNaQJ.mjs +12 -0
  242. package/dist/fs-traced-_QGcVmcb.mjs +1 -0
  243. package/dist/ganttDiagram-NO4QXBWP-DnN5cTGV.mjs +293 -0
  244. package/dist/getMachineId-bsd-B_NuwbXS.mjs +2 -0
  245. package/dist/getMachineId-bsd-neTWr-l3.mjs +2 -0
  246. package/dist/getMachineId-darwin-BP4aVKkL.mjs +3 -0
  247. package/dist/getMachineId-darwin-DKDl-xYO.mjs +3 -0
  248. package/dist/getMachineId-linux-Bexb2iRT.mjs +2 -0
  249. package/dist/getMachineId-linux-YTb5epZX.mjs +2 -0
  250. package/dist/getMachineId-unsupported-Ddv20ynQ.mjs +2 -0
  251. package/dist/getMachineId-unsupported-DdwXS_Q3.mjs +2 -0
  252. package/dist/getMachineId-win-BNx0EbPq.mjs +2 -0
  253. package/dist/getMachineId-win-D8cNuBNk.mjs +2 -0
  254. package/dist/git-handle-DBSzQutT.mjs +1 -0
  255. package/dist/git-handle-r3d7s3VF.mjs +10 -0
  256. package/dist/gitGraph-TEB2WS4Q-_V7TMkJv.mjs +1 -0
  257. package/dist/gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs +107 -0
  258. package/dist/graphlib-DXQPHTiH.mjs +2 -0
  259. package/dist/grep-2HUTXO5U-9G7xEEms.mjs +9 -0
  260. package/dist/grep-2HUTXO5U-DG5Ulinc.mjs +1 -0
  261. package/dist/gzip-AQXSGOVS-BcGYw5wM.mjs +32 -0
  262. package/dist/gzip-AQXSGOVS-D6UYmM0C.mjs +1 -0
  263. package/dist/head-HT2B6D2J-B5ybc-my.mjs +2 -0
  264. package/dist/head-HT2B6D2J-CHIR76LI.mjs +1 -0
  265. package/dist/help-VVWX7SA5-Bb8T3djf.mjs +16 -0
  266. package/dist/help-VVWX7SA5-BbK0QLPX.mjs +1 -0
  267. package/dist/history-J4QRNGRO-5XgHJL_Q.mjs +1 -0
  268. package/dist/history-J4QRNGRO-DesXbqi2.mjs +3 -0
  269. package/dist/hostname-BK6HG2DE-Clwz043m.mjs +1 -0
  270. package/dist/hostname-BK6HG2DE-DTiGP5th.mjs +3 -0
  271. package/dist/html-to-markdown-TFCECAGV-BsVwcc4T.mjs +1 -0
  272. package/dist/html-to-markdown-TFCECAGV-DLUGt6pW.mjs +73 -0
  273. package/dist/index.d.mts +6867 -242
  274. package/dist/index.mjs +1521 -1
  275. package/dist/info-DKCQHKI2-DIsEz1l_.mjs +1 -0
  276. package/dist/infoDiagram-FWYZ7A6U-CD5T72Pd.mjs +3 -0
  277. package/dist/init-Cg1MczGq.mjs +638 -0
  278. package/dist/init-D8OKme52.mjs +2 -0
  279. package/dist/init-DnqdKHDS.mjs +1 -0
  280. package/dist/ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs +71 -0
  281. package/dist/join-GG2LDHE5-7k4Syl20.mjs +14 -0
  282. package/dist/join-GG2LDHE5-BIH_-8vD.mjs +1 -0
  283. package/dist/journeyDiagram-5HDEW3XC-BywkQV2b.mjs +140 -0
  284. package/dist/jq-LYZFFBZB-BZ4XP29I.mjs +14 -0
  285. package/dist/jq-LYZFFBZB-Dlyx6Y7w.mjs +1 -0
  286. package/dist/js-exec-VXN6TZ7U-BrugyKqi.mjs +97 -0
  287. package/dist/js-exec-VXN6TZ7U-Ds5SsewK.mjs +97 -0
  288. package/dist/kanban-definition-HUTT4EX6-DIgH0tMg.mjs +90 -0
  289. package/dist/launch-json-removal-DFF5AXyX.mjs +2 -0
  290. package/dist/lib-B2tLN_O_.mjs +2 -0
  291. package/dist/lib-DuDqLKFD.mjs +195 -0
  292. package/dist/lib-ozx_WsjS.mjs +2 -0
  293. package/dist/libesm-qUf-Au5c.mjs +14 -0
  294. package/dist/line-eTDW_zUy.mjs +2 -0
  295. package/dist/linear-Cn1royVQ.mjs +2 -0
  296. package/dist/ln-4TRFBYAT-B0hi-FAf.mjs +1 -0
  297. package/dist/ln-4TRFBYAT-DGrhTL40.mjs +9 -0
  298. package/dist/loader-4hXM3EID.mjs +1 -0
  299. package/dist/loader-CJynt8EV.mjs +2 -0
  300. package/dist/logger-DFxEUjvj.mjs +39 -0
  301. package/dist/ls-KSXFZCWH-C_kbnNdU.mjs +1 -0
  302. package/dist/ls-KSXFZCWH-GOWXktO9.mjs +28 -0
  303. package/dist/lzma-CD6C2vYw.mjs +2 -0
  304. package/dist/lzma-CG6o9sq-.mjs +2 -0
  305. package/dist/map-bDB3k8vA.mjs +2 -0
  306. package/dist/md-manager-BbSzMHHE.mjs +2 -0
  307. package/dist/md5sum-INMIK4DX-BlgGpdCD.mjs +2 -0
  308. package/dist/md5sum-INMIK4DX-DGvi_A-E.mjs +1 -0
  309. package/dist/mermaid-parser.core-uwQfwzUX.mjs +4 -0
  310. package/dist/mermaid.core-BgpKViY0.mjs +16 -0
  311. package/dist/mindmap-definition-LN4V7U3C-H3p7uT-G.mjs +97 -0
  312. package/dist/mkdir-TDEMSB6C-BVcgITXm.mjs +7 -0
  313. package/dist/mkdir-TDEMSB6C-CMOt1jIT.mjs +1 -0
  314. package/dist/mv-Z6MORUFL-CqyCV_Ze.mjs +1 -0
  315. package/dist/mv-Z6MORUFL-El0zMsEA.mjs +7 -0
  316. package/dist/nl-U5YJDM32-BO1kUpkn.mjs +1 -0
  317. package/dist/nl-U5YJDM32-Y_hGSMac.mjs +17 -0
  318. package/dist/od-VJEF2UR5-CueTpZ68.mjs +5 -0
  319. package/dist/od-VJEF2UR5-DxUGtlve.mjs +1 -0
  320. package/dist/open-browser-BgReR_t5.mjs +2 -0
  321. package/dist/ordinal-BFK2XMXf.mjs +2 -0
  322. package/dist/packet-7NZHBO7P-B64OS2eJ.mjs +1 -0
  323. package/dist/parse-worker.d.mts +6626 -1
  324. package/dist/parse-worker.mjs +1 -1
  325. package/dist/paste-7N6AFSDS-BJHZcYXH.mjs +1 -0
  326. package/dist/paste-7N6AFSDS-BnqApCW_.mjs +8 -0
  327. package/dist/path-CIoCsClp.mjs +2 -0
  328. package/dist/pegDiagram-2B236MQR-PBU61CXk.mjs +2 -0
  329. package/dist/pie-RZYD4A2V-B313HDTA.mjs +1 -0
  330. package/dist/pieDiagram-ENE6RG2P-ClZWrO6e.mjs +40 -0
  331. package/dist/preview-BnqROnAm.mjs +1 -0
  332. package/dist/preview-Dnob-x-p.mjs +3 -0
  333. package/dist/printf-CX64KX2P-841sNxew.mjs +1 -0
  334. package/dist/printf-CX64KX2P-B_vWcqAL.mjs +15 -0
  335. package/dist/public/assets/ActivityModeContent-H-D1VX7m.js +1 -0
  336. package/dist/public/assets/AgentDiffPane-B-gK5PsE.js +2 -0
  337. package/dist/public/assets/ChangedOutsideBadge-D741mWRP.js +1 -0
  338. package/dist/public/assets/DocumentContext-CIVf31K9.js +38 -0
  339. package/dist/public/assets/FeedbackForm-YmqhKCxZ.js +1 -0
  340. package/dist/public/assets/ImportSkillDialog-DQBS4ypC.js +1 -0
  341. package/dist/public/assets/ManagedArtifactProperties-CE_UbtEZ.js +1 -0
  342. package/dist/public/assets/ManagedArtifactProperties-CawqG1nH.js +2 -0
  343. package/dist/public/assets/SessionsHost-Bp7gQA1o.js +2 -0
  344. package/dist/public/assets/SettingsDialogBody-BLpulm10.js +12 -0
  345. package/dist/public/assets/SkillToolbarControls-oKXEehFt.js +1 -0
  346. package/dist/public/assets/SourceEditor-C6NdTjpn.js +1 -0
  347. package/dist/public/assets/TerminalWindowApp-DDnvJYMu.js +1 -0
  348. package/dist/public/assets/ThreadView-CGjBIs53.js +10 -0
  349. package/dist/public/assets/TimelineDiffPane-BWfU5B2x.js +2 -0
  350. package/dist/public/assets/agent-diff-store-CwO6mhOq.js +1 -0
  351. package/dist/public/assets/auth-state-cache-BBgW3LTD.js +11 -0
  352. package/dist/public/assets/comment-chips-h8GZFVHH.js +5 -0
  353. package/dist/public/assets/follow-file-CJHokzM7.js +1 -0
  354. package/dist/public/assets/index-B6VepqFk.js +2097 -0
  355. package/dist/public/assets/selection-context-iNNNmmJS.js +4 -0
  356. package/dist/public/assets/skill-actions-8q8e7e5S.js +2 -0
  357. package/dist/public/assets/typing-burst-detector-D_ygX_hf.js +8 -0
  358. package/dist/public/assets/use-activity-panel-pkBl8bMj.js +1 -0
  359. package/dist/public/assets/use-open-skill-Mk41LRxd.js +1 -0
  360. package/dist/public/assets/use-skill-directory-Dzvfx2id.js +1 -0
  361. package/dist/public/assets/use-timeline-entry-diff-Dk10Z55V.js +6 -0
  362. package/dist/public/index.html +13 -13
  363. package/dist/pwd-D4OZ7N27-C41v1g3B.mjs +1 -0
  364. package/dist/pwd-D4OZ7N27-NYST_A3S.mjs +3 -0
  365. package/dist/python3-DNGS4G3E-DaBJervu.mjs +12 -0
  366. package/dist/python3-DNGS4G3E-OzxoFG34.mjs +12 -0
  367. package/dist/quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs +8 -0
  368. package/dist/radar-I7S5WNFK-BdiwGd2_.mjs +1 -0
  369. package/dist/railroad-3IZDKUUU-O4nBw7jb.mjs +1 -0
  370. package/dist/railroad-abnf-AHOZXSZD-CDaO5Dcu.mjs +1 -0
  371. package/dist/railroad-ebnf-EBAXGLYW-CS4l_gpR.mjs +1 -0
  372. package/dist/railroad-peg-LSFZ7HO6-bbLhALeS.mjs +1 -0
  373. package/dist/railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs +2 -0
  374. package/dist/readlink-MI4GCHJF-CQlQ03aa.mjs +1 -0
  375. package/dist/readlink-MI4GCHJF-Dl1Uxmrf.mjs +6 -0
  376. package/dist/repair-launch-json-DF-pHfel.mjs +2 -0
  377. package/dist/repair-mcp-configs-Cr9jCNwk.mjs +2 -0
  378. package/dist/repair-skills-DADI6iaT.mjs +4 -0
  379. package/dist/repair-skills-DKwDAoHc.mjs +1 -0
  380. package/dist/requirementDiagram-TGXJPOKE-H6OWjjJE.mjs +85 -0
  381. package/dist/rev-XOSYPP45-BYe7prl1.mjs +1 -0
  382. package/dist/rev-XOSYPP45-D6eJxPKd.mjs +7 -0
  383. package/dist/rg-XNF3R3II-CmxxmmUf.mjs +1 -0
  384. package/dist/rg-XNF3R3II-vKB7djPZ.mjs +33 -0
  385. package/dist/rm-RTZG23RL-Bl5s9ltJ.mjs +1 -0
  386. package/dist/rm-RTZG23RL-sCMTtbxP.mjs +8 -0
  387. package/dist/rmdir-XTQXT7RK-C1ccje2_.mjs +1 -0
  388. package/dist/rmdir-XTQXT7RK-DZfv6Zfz.mjs +14 -0
  389. package/dist/rough.cjs-BGkc0Naf.mjs +2 -0
  390. package/dist/sankeyDiagram-HTMAVEWB-CtBVJJox.mjs +41 -0
  391. package/dist/sed-JAPPVBEU-C7wh6RxT.mjs +100 -0
  392. package/dist/sed-JAPPVBEU-D9bYEx2I.mjs +1 -0
  393. package/dist/seq-RN5ZUASB-CFySG-xk.mjs +1 -0
  394. package/dist/seq-RN5ZUASB-R5HjEVux.mjs +7 -0
  395. package/dist/sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs +163 -0
  396. package/dist/server-lock-U8YDpJpq.mjs +1 -0
  397. package/dist/server-lock-aXnDVUI8.mjs +2 -0
  398. package/dist/sha1sum-VJPNLNU6-DfzpfxJ-.mjs +2 -0
  399. package/dist/sha1sum-VJPNLNU6-DgLJCjAg.mjs +1 -0
  400. package/dist/sha256sum-PI32XWXY-DZ42pgY3.mjs +1 -0
  401. package/dist/sha256sum-PI32XWXY-DrKtnAPK.mjs +2 -0
  402. package/dist/sizeCapture-X5ZJPWSS-Izaz24Pi.mjs +2 -0
  403. package/dist/skill-teardown-onVYT1VF.mjs +2 -0
  404. package/dist/sleep-VZFPZFWA-5fZFI3Vy.mjs +1 -0
  405. package/dist/sleep-VZFPZFWA-CBARUnrz.mjs +10 -0
  406. package/dist/sort-DCNRDA7U-RFl0HYBr.mjs +1 -0
  407. package/dist/sort-DCNRDA7U-vT57Mw8o.mjs +16 -0
  408. package/dist/split-SITCSYCZ-BdATfTxU.mjs +1 -0
  409. package/dist/split-SITCSYCZ-Ci_IfVPT.mjs +17 -0
  410. package/dist/sqlite3-TE5AIOTF-BIRMe0xz.mjs +1 -0
  411. package/dist/sqlite3-TE5AIOTF-BhXSdz7U.mjs +37 -0
  412. package/dist/src-BPVU4Y0o.mjs +2 -0
  413. package/dist/src-BmS3oGY4.mjs +1 -0
  414. package/dist/src-Dt5dAyFQ.mjs +2032 -0
  415. package/dist/src-TKCctdpc.mjs +348 -0
  416. package/dist/src-cRpQSbXB.mjs +1 -0
  417. package/dist/src-pUQbXiSN.mjs +20 -0
  418. package/dist/start-DQdc8wXO.mjs +4 -0
  419. package/dist/start-XIVqnuqY.mjs +1 -0
  420. package/dist/stat-BT5A227F-CEZPXJ9_.mjs +9 -0
  421. package/dist/stat-BT5A227F-Dd-OyLQQ.mjs +1 -0
  422. package/dist/stateDiagram-2N3HPSRC-pAn2bDnn.mjs +2 -0
  423. package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +2 -0
  424. package/dist/strings-7PLOGTPD-CiVw0Uh4.mjs +14 -0
  425. package/dist/strings-7PLOGTPD-v3qEuUEm.mjs +1 -0
  426. package/dist/swimlanes-5IMT3BWC-nSsjdSnj.mjs +2 -0
  427. package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +9 -0
  428. package/dist/tac-SJGXQ4T2-BL4Xd7y6.mjs +9 -0
  429. package/dist/tac-SJGXQ4T2-DphHfCAY.mjs +1 -0
  430. package/dist/tail-S5ULNTJU-Cfa1pDQZ.mjs +2 -0
  431. package/dist/tail-S5ULNTJU-D6qRQZwV.mjs +1 -0
  432. package/dist/tar-MZQD7NO4-HJsWmzu9.mjs +63 -0
  433. package/dist/tar-MZQD7NO4-oAQoyk28.mjs +1 -0
  434. package/dist/tee-O7VXZDCO-D95l5L5Z.mjs +3 -0
  435. package/dist/tee-O7VXZDCO-odVO6Wjw.mjs +1 -0
  436. package/dist/time-DEUO3QV2-CviQF55F.mjs +1 -0
  437. package/dist/time-DEUO3QV2-DwnT4FOS.mjs +14 -0
  438. package/dist/timeline-definition-FHXFAJF6-CnTXJoEq.mjs +121 -0
  439. package/dist/timeout-VRKMCG72-DFU5EkCe.mjs +12 -0
  440. package/dist/timeout-VRKMCG72-jeMAkAMc.mjs +1 -0
  441. package/dist/touch-DX2IJOQ4-CRX6GYeb.mjs +7 -0
  442. package/dist/touch-DX2IJOQ4-CyiMRd7b.mjs +1 -0
  443. package/dist/tr-2HXZRDSW-ByYmbFae.mjs +21 -0
  444. package/dist/tr-2HXZRDSW-CCce6lU_.mjs +1 -0
  445. package/dist/tree-LYXBS7DC-Dq6aWetx.mjs +12 -0
  446. package/dist/tree-LYXBS7DC-pAC77Hbt.mjs +1 -0
  447. package/dist/treeView-QDETBFTQ-BCAjffnq.mjs +1 -0
  448. package/dist/treemap-6X3UGDF4-Dv-54pyt.mjs +1 -0
  449. package/dist/true-WHJNXCHG-Dzdq7R5f.mjs +1 -0
  450. package/dist/true-WHJNXCHG-XC4ZnbBw.mjs +2 -0
  451. package/dist/unexpand-RGTMIGZM-B06mOUPB.mjs +1 -0
  452. package/dist/unexpand-RGTMIGZM-BL5sZ5_Z.mjs +11 -0
  453. package/dist/uniq-SUNANL47-BIgIOFSf.mjs +1 -0
  454. package/dist/uniq-SUNANL47-DBRSkw7j.mjs +5 -0
  455. package/dist/vennDiagram-L72KCM5P-CqTzYRfa.mjs +35 -0
  456. package/dist/wardley-OPB4EBWU-DSvo57UC.mjs +1 -0
  457. package/dist/wardleyDiagram-EHGQE667-WhxG-nRT.mjs +79 -0
  458. package/dist/wc-TQB3VNOX-9RyJlZXB.mjs +1 -0
  459. package/dist/wc-TQB3VNOX-DqHFY4jy.mjs +6 -0
  460. package/dist/which-XZHEH76L-CbmRVw8E.mjs +3 -0
  461. package/dist/which-XZHEH76L-SMFjHhz2.mjs +1 -0
  462. package/dist/whoami-DGKU3D2X-BDJh39KM.mjs +3 -0
  463. package/dist/whoami-DGKU3D2X-BIUooLXE.mjs +1 -0
  464. package/dist/write-project-skill-DOogyZge.mjs +56 -0
  465. package/dist/xan-UD7JYIL2-DAuAMQ0H.mjs +1 -0
  466. package/dist/xan-UD7JYIL2-DQo9f-1a.mjs +140 -0
  467. package/dist/xan-view-OW2TB7Z3-BhVOL6hm.mjs +1 -0
  468. package/dist/xan-view-OW2TB7Z3-CwG0zS53.mjs +1 -0
  469. package/dist/xargs-I6EZUCYF-C_ZtmUCd.mjs +5 -0
  470. package/dist/xargs-I6EZUCYF-INAdKqnR.mjs +1 -0
  471. package/dist/xychartDiagram-FW5EYKEG-DDE7TRrw.mjs +8 -0
  472. package/dist/yazl-BlMyAOcT.mjs +2 -0
  473. package/dist/yq-OAKYHSXH-C1fFFHD4.mjs +1 -0
  474. package/dist/yq-OAKYHSXH-COzSqY4J.mjs +288 -0
  475. package/package.json +7 -6
  476. package/dist/abnfDiagram-VRR7QNED-DQjgDcgA.mjs +0 -2
  477. package/dist/acp-harness-probe-DOXp9Wx4.mjs +0 -3
  478. package/dist/alias-JE7RI5QX-BfILuEvo.mjs +0 -1
  479. package/dist/arc-CO8jsQkL.mjs +0 -2
  480. package/dist/architecture-TIHT7OUA-CScIhnar.mjs +0 -1
  481. package/dist/architectureDiagram-ZJ3FMSHR-CkUIG8wd.mjs +0 -37
  482. package/dist/array-Cerc_8W3.mjs +0 -2
  483. package/dist/awk2-BBAGSFUB-BH8WxyhW.mjs +0 -1
  484. package/dist/banner-CIK2GwPx.mjs +0 -3
  485. package/dist/base64-4YMZCVJ5-CDuRvFBG.mjs +0 -1
  486. package/dist/basename-AA2KJYZQ-sv8gJZXS.mjs +0 -1
  487. package/dist/bash-IJWYRKFO-DKUaUgF9.mjs +0 -1
  488. package/dist/blockDiagram-677ZJIJ3-sLhYyPCr.mjs +0 -133
  489. package/dist/c4Diagram-LMCZKHZV-Cg6dfUXU.mjs +0 -11
  490. package/dist/cat-RDUMLXKC-BtNo16C3.mjs +0 -1
  491. package/dist/channel-DRk0OEK0.mjs +0 -2
  492. package/dist/chmod-SYMGL4JA-B15Xlp42.mjs +0 -1
  493. package/dist/chokidar-CVNrjmRM.mjs +0 -4
  494. package/dist/chunk-2Q5K7J3B-2Es1K_NO.mjs +0 -2
  495. package/dist/chunk-2TRDZQLB-G1LvPXqq.mjs +0 -18
  496. package/dist/chunk-32BRIVSS-ok2xg0Je.mjs +0 -2
  497. package/dist/chunk-3BS5SKQH-CFcrGLDG.mjs +0 -140
  498. package/dist/chunk-3H6UQG3A-Dx5ykWR0.mjs +0 -9
  499. package/dist/chunk-3ZUFRYJ4-DzbWfyzV.mjs +0 -2
  500. package/dist/chunk-4GTNDTRF-COTPYeV6.mjs +0 -8
  501. package/dist/chunk-4HHKTUW3-BkuKGebe.mjs +0 -3
  502. package/dist/chunk-4Q4SM6WR-i8tiQRv3.mjs +0 -5
  503. package/dist/chunk-52WLFC77-BaT5_S-q.mjs +0 -11
  504. package/dist/chunk-55VFSPNA-Ct9maI6O.mjs +0 -3
  505. package/dist/chunk-5FCAYU7R-of7BBDNL.mjs +0 -2
  506. package/dist/chunk-5HE753X5-9kILZ5Nr.mjs +0 -2
  507. package/dist/chunk-5JV3BV7I-BKVVlFxh.mjs +0 -2
  508. package/dist/chunk-5QVNJEHU-CvZ-NmqQ.mjs +0 -9
  509. package/dist/chunk-5TONJI2A-CGHpmUrS.mjs +0 -3
  510. package/dist/chunk-5V6VZH6T-DdeqP2TW.mjs +0 -2
  511. package/dist/chunk-5VM5RSS4-COK1ErrI.mjs +0 -16
  512. package/dist/chunk-62RKD26F-RtrcFE7S.mjs +0 -21
  513. package/dist/chunk-64BAICW3-0h-yIc1e.mjs +0 -2
  514. package/dist/chunk-6Z5SFZXK-C5owNg1o.mjs +0 -288
  515. package/dist/chunk-74CEPOFO--xsxhUFC.mjs +0 -23
  516. package/dist/chunk-7BUUIJ7U-_1oXd84C.mjs +0 -2
  517. package/dist/chunk-7L36YK2X-VlH7dlrD.mjs +0 -3
  518. package/dist/chunk-7TSDKFEO-BjOrsK6M.mjs +0 -2
  519. package/dist/chunk-A4HU7SVR-oMNSpej4.mjs +0 -3
  520. package/dist/chunk-A4JSPFCI-DtnWqT5O.mjs +0 -7
  521. package/dist/chunk-A65PWWJC-LctFeUxK.mjs +0 -3
  522. package/dist/chunk-A7A2DBEE-DuuhuGG1.mjs +0 -7
  523. package/dist/chunk-A7ICOL4V-CzYDHdxM.mjs +0 -14
  524. package/dist/chunk-ALLTKNUZ-BnLIZXEI.mjs +0 -6
  525. package/dist/chunk-APT7OOP2-DESh647P.mjs +0 -2
  526. package/dist/chunk-BIQX33UG-BVtPexox.mjs +0 -2
  527. package/dist/chunk-C7G6YPKG-DpNJWc2e.mjs +0 -2
  528. package/dist/chunk-CQNSW5MT-B6mAd0WS.mjs +0 -2
  529. package/dist/chunk-CYSBUYHQ-CTWbbsmm.mjs +0 -2
  530. package/dist/chunk-D4J545R4-Dy3lcp_X.mjs +0 -12
  531. package/dist/chunk-D6CWQ5DW-Dl4tJcwX.mjs +0 -6
  532. package/dist/chunk-D7MEQ3VN-B-Qyxyo5.mjs +0 -5
  533. package/dist/chunk-DBKNVD4L-Y2Mnp5lC.mjs +0 -10
  534. package/dist/chunk-DCAAORBQ-BxtVrSMT.mjs +0 -2
  535. package/dist/chunk-EEXR5ZDP-BcjEP2wd.mjs +0 -3
  536. package/dist/chunk-EIZGF4BS-DYiqM1Ss.mjs +0 -9
  537. package/dist/chunk-EMLP6XTP-AFimKO17.mjs +0 -2
  538. package/dist/chunk-EX3LRPZG-BYcqQlY8.mjs +0 -232
  539. package/dist/chunk-F23WWYKW-BuCITNd6.mjs +0 -17
  540. package/dist/chunk-FWX5IMBZ-BFNo8SGu.mjs +0 -2
  541. package/dist/chunk-GCTKCWKD-jz3yOk3f.mjs +0 -4
  542. package/dist/chunk-GOV5EKKI-IRzA9ik3.mjs +0 -10
  543. package/dist/chunk-GXVXFKBA-CGc4vqMu.mjs +0 -6
  544. package/dist/chunk-HDQ56CKY-Svz-iz8m.mjs +0 -16
  545. package/dist/chunk-HJQJAYMS-SgZmT_QE.mjs +0 -3
  546. package/dist/chunk-HJWBQKYG-BqFDM0xp.mjs +0 -6
  547. package/dist/chunk-HKLCLINH-DKx243zB.mjs +0 -63
  548. package/dist/chunk-HL6NGDO2-B9GCn41X.mjs +0 -24
  549. package/dist/chunk-HOUHSVGY-Cg_2_CUd.mjs +0 -2
  550. package/dist/chunk-HWKDQ44K-CVxg-h0V.mjs +0 -4
  551. package/dist/chunk-I57KEIP3-FVl4IVXz.mjs +0 -11
  552. package/dist/chunk-ICXQ74PX-CewdqzeE.mjs +0 -3
  553. package/dist/chunk-JG7HCLWE-BgiWVzAI.mjs +0 -3
  554. package/dist/chunk-JVPRLUMK-CH7w4zyh.mjs +0 -8
  555. package/dist/chunk-JWPE2WC7-cMhWwV9I.mjs +0 -2
  556. package/dist/chunk-K6LIBGJA-DI9ZkJey.mjs +0 -12
  557. package/dist/chunk-KEIR6QF5-BhaMJNB5.mjs +0 -176
  558. package/dist/chunk-KMEYNNUA-CabTsa7P.mjs +0 -16
  559. package/dist/chunk-KRBPSX3W-ciCGjpAL.mjs +0 -6
  560. package/dist/chunk-LL3S3NLB-r8mDpVuz.mjs +0 -2
  561. package/dist/chunk-LTZRCH7N-Cj1hz7m7.mjs +0 -32
  562. package/dist/chunk-LWEGUNWT-C3ON4AHi.mjs +0 -8
  563. package/dist/chunk-MDDMCKUK-D3MZs3FF.mjs +0 -7
  564. package/dist/chunk-MDLLFABN-DgTeOfIY.mjs +0 -73
  565. package/dist/chunk-MHTUABJP-BbSobv_U.mjs +0 -9
  566. package/dist/chunk-MIZPJHVH-CzqfuBdK.mjs +0 -8
  567. package/dist/chunk-MLXIYONF-BcM04nM_.mjs +0 -16
  568. package/dist/chunk-MOJQB5TN-CidbQQ7m.mjs +0 -89
  569. package/dist/chunk-MOZMSUNE-DTiZcqZ1.mjs +0 -2
  570. package/dist/chunk-MYE6AGBJ-B3ukegXT.mjs +0 -17
  571. package/dist/chunk-NAERJDUW-CoAYVGR3.mjs +0 -9
  572. package/dist/chunk-NCNPKYJZ-C1KcgrGe.mjs +0 -3
  573. package/dist/chunk-NUYSJFDK-sPbPxu4W.mjs +0 -8
  574. package/dist/chunk-OCLXQMOG-BdLZfp3D.mjs +0 -7
  575. package/dist/chunk-OCS6LSEM-7beNWT9m.mjs +0 -14
  576. package/dist/chunk-OGEWGWER-B-Vr80Fa.mjs +0 -2
  577. package/dist/chunk-OSBZ3O6U-DwDyo3Ly.mjs +0 -2
  578. package/dist/chunk-PBXLG62G-ww-bn-Tp.mjs +0 -9
  579. package/dist/chunk-PP6PSHAB-xKRHmmOd.mjs +0 -5
  580. package/dist/chunk-PUDLZKDR-CI0pacGF.mjs +0 -157
  581. package/dist/chunk-PXTK5WE2-Dfi2FrE5.mjs +0 -22
  582. package/dist/chunk-PYSFUGCK-BHwvxY2Q.mjs +0 -11
  583. package/dist/chunk-Q4XR5HBZ-4H-m7p0G.mjs +0 -71
  584. package/dist/chunk-QBLGF6JB-B_tvtCRO.mjs +0 -2
  585. package/dist/chunk-QCDB2VPH-DHsQu4h6.mjs +0 -7
  586. package/dist/chunk-QJ7O6ZN3-CTKdWbns.mjs +0 -6
  587. package/dist/chunk-R6QSAL5T-DA60heK6.mjs +0 -2
  588. package/dist/chunk-R7FJI6CG-BVR1ae7y.mjs +0 -2
  589. package/dist/chunk-RPNGRAAP-df7FdhI4.mjs +0 -8
  590. package/dist/chunk-RYQCIY6F-C8F82Uai.mjs +0 -2
  591. package/dist/chunk-SDNKECQQ-BuTL-ot2.mjs +0 -6
  592. package/dist/chunk-SNN4IESC-DVqEOGsL.mjs +0 -2
  593. package/dist/chunk-T56QNPHK-COZC2A_r.mjs +0 -15
  594. package/dist/chunk-TLSUDHID-DAREQN9J.mjs +0 -7
  595. package/dist/chunk-TOMNU26N-C3JZDC96.mjs +0 -5
  596. package/dist/chunk-TP4BZANS-C2Z-CHHA.mjs +0 -21
  597. package/dist/chunk-TXBZCHCQ-DOaoE5TV.mjs +0 -6
  598. package/dist/chunk-U6XO7XAA-BpjdcG5R.mjs +0 -3
  599. package/dist/chunk-V5MWI2OL-D8SKWVO_.mjs +0 -5
  600. package/dist/chunk-V7JOEXUC-CdEIYYNc.mjs +0 -207
  601. package/dist/chunk-V7TAPXDL-CQbB1mLa.mjs +0 -28
  602. package/dist/chunk-VAUOI2AC-Ds6ZNp2p.mjs +0 -2
  603. package/dist/chunk-VJFXDYWH-C7Lg-Yts.mjs +0 -11
  604. package/dist/chunk-VOBGTVA6-CKl2LR-K.mjs +0 -7
  605. package/dist/chunk-VR4S4FIN-mH-q10Uq.mjs +0 -2
  606. package/dist/chunk-VYOJP4TV-DFxaC5Uc.mjs +0 -14
  607. package/dist/chunk-WKFATFPP-R7B51gCW.mjs +0 -5
  608. package/dist/chunk-WYO6CB5R-Cg1RXhAT.mjs +0 -130
  609. package/dist/chunk-X2AJGDEF-D97qevlv.mjs +0 -2
  610. package/dist/chunk-XKQRETAK-BTmmMuta.mjs +0 -2
  611. package/dist/chunk-XKWWSDBF-BGzAOrO3.mjs +0 -37
  612. package/dist/chunk-XVDPCNWR-3ajbQWzU.mjs +0 -12
  613. package/dist/chunk-XXDRQBXY-BvbdToKZ.mjs +0 -2
  614. package/dist/chunk-Y2CYZVJY-C7FmC3Cl.mjs +0 -2
  615. package/dist/chunk-YMMW5UAP-DbBgrudQ.mjs +0 -33
  616. package/dist/chunk-YOTPTUD7-BSOqhRr-.mjs +0 -2
  617. package/dist/chunk-YTNYSM6T-CoxqCaLl.mjs +0 -12
  618. package/dist/chunk-YULBWSET-CuKhTv4j.mjs +0 -14
  619. package/dist/chunk-Z6LRHWXI-CujGXDs8.mjs +0 -14
  620. package/dist/chunk-Z7JVV2SM-CiJwkxuY.mjs +0 -12
  621. package/dist/chunk-ZGVPDNZ5-BE_qYP6z.mjs +0 -63
  622. package/dist/chunk-ZIRB5QZD-mhYZnDzb.mjs +0 -39
  623. package/dist/chunk-ZZO3UDB3-DCkJjNN2.mjs +0 -100
  624. package/dist/classDiagram-OUVF2IWQ-rKP7gcsT.mjs +0 -2
  625. package/dist/classDiagram-v2-EOCWNBFH-BoWf4tYI.mjs +0 -2
  626. package/dist/clear-5CZ5X4YR-BNXs_KRD.mjs +0 -1
  627. package/dist/column-WLPMMSTS-BrY1gQI1.mjs +0 -1
  628. package/dist/comm-5SLSESQG-aGB098lH.mjs +0 -1
  629. package/dist/constants-J4-mibQ1.mjs +0 -2
  630. package/dist/cose-bilkent-JH36ORCC-CMfIp4st.mjs +0 -2
  631. package/dist/cp-XOYR4ABJ-D0LUaMQT.mjs +0 -1
  632. package/dist/curl-47BFPSFW-d1TMPUJw.mjs +0 -26
  633. package/dist/cut-OPC3VAGB-FXZX1WQM.mjs +0 -1
  634. package/dist/cynefin-VYW2F7L2-DtazLHUs.mjs +0 -1
  635. package/dist/cynefinDiagram-TSTJHNR4-CFbt5v4d.mjs +0 -63
  636. package/dist/cytoscape.esm-Dq6ZD9GH.mjs +0 -332
  637. package/dist/dagre-CbI1Ylqw.mjs +0 -2
  638. package/dist/dagre-VKFMJZFB-BWP36rMX.mjs +0 -5
  639. package/dist/date-DD7FVA2V-7hk1aW9g.mjs +0 -1
  640. package/dist/defaultLocale-9SlCuWEL.mjs +0 -2
  641. package/dist/diagram-FQU43EPY-D2pf7IBH.mjs +0 -4
  642. package/dist/diagram-G47NLZAW-BlOXaBe6.mjs +0 -25
  643. package/dist/diagram-NH7WQ7WH-DOwRNWDI.mjs +0 -25
  644. package/dist/diagram-OA4YK3LP-uyGYHUoX.mjs +0 -31
  645. package/dist/diagram-WEI45ONY-CmW1X9Kx.mjs +0 -42
  646. package/dist/diff-HJF2MPDN-bcOaHvDo.mjs +0 -1
  647. package/dist/dirname-LEMTZZFS-RRQ5Ar_Z.mjs +0 -1
  648. package/dist/dist-BmYngy7b.mjs +0 -2
  649. package/dist/du-WO2ENHXQ-Cg71FvLi.mjs +0 -1
  650. package/dist/ebnfDiagram-CCIWWBDH-BpBYlrRH.mjs +0 -2
  651. package/dist/echo-O45JWWI2-BacOdfFs.mjs +0 -1
  652. package/dist/env-5EPCWSXR-T8XCKOX_.mjs +0 -1
  653. package/dist/erDiagram-Q63AITRT-ChoKKmxG.mjs +0 -86
  654. package/dist/eventmodeling-45OFAUF4-BIXp-P6z.mjs +0 -1
  655. package/dist/execAsync-BKp2jujj.mjs +0 -2
  656. package/dist/execAsync-BuUKdKlz.mjs +0 -2
  657. package/dist/expand-DTNXU4LQ-BD32VJaK.mjs +0 -1
  658. package/dist/expr-YYCVMXE3-CgQib9F9.mjs +0 -1
  659. package/dist/file-IGDTDPLG-BAlm5q29.mjs +0 -1
  660. package/dist/find-DH2ALKQS-z-G7VPmU.mjs +0 -1
  661. package/dist/flag-coverage-6JEX67RU-Cj_NycUm.mjs +0 -2
  662. package/dist/flowDiagram-23GEKE2U-B4VrCGdr.mjs +0 -1
  663. package/dist/fold-LDSORVYE-CDU-6eOS.mjs +0 -1
  664. package/dist/fs-traced-By5aY-RE.mjs +0 -12
  665. package/dist/fs-traced-CkLhqsEn.mjs +0 -1
  666. package/dist/ganttDiagram-NO4QXBWP-Cv7sGb-R.mjs +0 -293
  667. package/dist/getMachineId-bsd-DtFrm1Uy.mjs +0 -2
  668. package/dist/getMachineId-bsd-GFl1-Bje.mjs +0 -2
  669. package/dist/getMachineId-darwin--IR8MP8d.mjs +0 -3
  670. package/dist/getMachineId-darwin-28jQHa_N.mjs +0 -3
  671. package/dist/getMachineId-linux-BZgyplQ5.mjs +0 -2
  672. package/dist/getMachineId-linux-Bzx3S652.mjs +0 -2
  673. package/dist/getMachineId-unsupported-CyTjujlI.mjs +0 -2
  674. package/dist/getMachineId-unsupported-DuB0leRF.mjs +0 -2
  675. package/dist/getMachineId-win-BmvAZEMa.mjs +0 -2
  676. package/dist/getMachineId-win-CuOFQQ73.mjs +0 -2
  677. package/dist/git-handle-BDmbIWwd.mjs +0 -1
  678. package/dist/git-handle-BHe1p04S.mjs +0 -10
  679. package/dist/gitGraph-TEB2WS4Q-BaTdqV7-.mjs +0 -1
  680. package/dist/gitGraphDiagram-IHSO6WYX-DxsFHicP.mjs +0 -107
  681. package/dist/graphlib-DKEQBDTz.mjs +0 -2
  682. package/dist/grep-2HUTXO5U-CsEE08ya.mjs +0 -1
  683. package/dist/gzip-AQXSGOVS-CmMf6H0r.mjs +0 -1
  684. package/dist/head-HT2B6D2J-DSBJixLD.mjs +0 -1
  685. package/dist/help-VVWX7SA5-BncYWg0B.mjs +0 -1
  686. package/dist/history-J4QRNGRO-CULSDkzp.mjs +0 -1
  687. package/dist/hostname-BK6HG2DE-CaZb-T_R.mjs +0 -1
  688. package/dist/html-to-markdown-TFCECAGV-CF0t8_d3.mjs +0 -1
  689. package/dist/index-1MIt1xrM.d.mts +0 -6628
  690. package/dist/info-DKCQHKI2-BxlpeeVn.mjs +0 -1
  691. package/dist/infoDiagram-FWYZ7A6U-CbPpTq2x.mjs +0 -3
  692. package/dist/init-Buw5jj4Q.mjs +0 -2
  693. package/dist/init-DDwncQha.mjs +0 -1
  694. package/dist/init-ZOWQ1Th4.mjs +0 -643
  695. package/dist/ishikawaDiagram-FXEZZL3T-Dd5BEpOv.mjs +0 -71
  696. package/dist/join-GG2LDHE5-kABASDPB.mjs +0 -1
  697. package/dist/journeyDiagram-5HDEW3XC-W6Nbr96_.mjs +0 -140
  698. package/dist/jq-LYZFFBZB-CIwp4u6h.mjs +0 -1
  699. package/dist/js-exec-VXN6TZ7U-1yyCDQqM.mjs +0 -97
  700. package/dist/kanban-definition-HUTT4EX6-xcwe5vNg.mjs +0 -90
  701. package/dist/launch-json-removal-CcFuFFS1.mjs +0 -2
  702. package/dist/lib-BCIeHFfP.mjs +0 -2
  703. package/dist/lib-TLTWf9qr.mjs +0 -195
  704. package/dist/line-Cq-NoiNn.mjs +0 -2
  705. package/dist/linear-DPbvcrPk.mjs +0 -2
  706. package/dist/ln-4TRFBYAT-Dhr3hBr6.mjs +0 -1
  707. package/dist/loader-BcwbnY_K.mjs +0 -1
  708. package/dist/loader-ji3pPcXi.mjs +0 -2
  709. package/dist/logger-BZPV1wv8.mjs +0 -39
  710. package/dist/ls-KSXFZCWH-BEv3e7-2.mjs +0 -1
  711. package/dist/lzma-Dh_aFpqW.mjs +0 -2
  712. package/dist/map-CFzSl60r.mjs +0 -2
  713. package/dist/md-manager-B4-M0hXs.mjs +0 -2
  714. package/dist/md5sum-INMIK4DX-CJ1G9gTe.mjs +0 -1
  715. package/dist/mermaid-parser.core-DejmtVwC.mjs +0 -4
  716. package/dist/mermaid.core-CB8v9A8r.mjs +0 -16
  717. package/dist/mindmap-definition-LN4V7U3C-BiYp6fzL.mjs +0 -97
  718. package/dist/mkdir-TDEMSB6C-BY7IIkok.mjs +0 -1
  719. package/dist/mv-Z6MORUFL-C4m2WG8E.mjs +0 -1
  720. package/dist/nl-U5YJDM32-CrNZhLtI.mjs +0 -1
  721. package/dist/od-VJEF2UR5-5RFpmlxK.mjs +0 -1
  722. package/dist/open-browser-CxnOIVsL.mjs +0 -2
  723. package/dist/ordinal-D5S_JXYv.mjs +0 -2
  724. package/dist/packet-7NZHBO7P-DJoR1MQJ.mjs +0 -1
  725. package/dist/paste-7N6AFSDS-DQNANxpk.mjs +0 -1
  726. package/dist/path-D4ahAhVD.mjs +0 -2
  727. package/dist/pegDiagram-2B236MQR-DMP1ng8V.mjs +0 -2
  728. package/dist/pie-RZYD4A2V-Ba8iL0H-.mjs +0 -1
  729. package/dist/pieDiagram-ENE6RG2P-CSKXRjGQ.mjs +0 -40
  730. package/dist/preview-2rQXoRuM.mjs +0 -3
  731. package/dist/preview-MV-qHfzy.mjs +0 -1
  732. package/dist/printf-CX64KX2P-CKuJk-Cs.mjs +0 -1
  733. package/dist/public/assets/ActivityModeContent-C08FYohG.js +0 -1
  734. package/dist/public/assets/AgentDiffPane-T499-ugv.js +0 -2
  735. package/dist/public/assets/ChangedOutsideBadge-GeQfL_b-.js +0 -1
  736. package/dist/public/assets/DocumentContext-C-Lo65-_.js +0 -38
  737. package/dist/public/assets/FeedbackForm-CmdTz11F.js +0 -1
  738. package/dist/public/assets/ImportSkillDialog-ChsGV6eb.js +0 -1
  739. package/dist/public/assets/ManagedArtifactProperties-B1ZA0ofn.js +0 -2
  740. package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +0 -1
  741. package/dist/public/assets/SessionsHost-BobZkNwc.js +0 -2
  742. package/dist/public/assets/SettingsDialogBody-COTbFRqi.js +0 -12
  743. package/dist/public/assets/SkillToolbarControls-PvRY_LHn.js +0 -1
  744. package/dist/public/assets/SourceEditor-Duqpede9.js +0 -1
  745. package/dist/public/assets/TerminalWindowApp-CgWp2eC-.js +0 -1
  746. package/dist/public/assets/ThreadView-VqdgemBS.js +0 -10
  747. package/dist/public/assets/TimelineDiffPane-DnaRcvCk.js +0 -2
  748. package/dist/public/assets/agent-diff-store-B7oQn7l7.js +0 -1
  749. package/dist/public/assets/auth-state-cache-BUYyIMUZ.js +0 -11
  750. package/dist/public/assets/comment-chips-BhvfCPCk.js +0 -5
  751. package/dist/public/assets/follow-file-CWSsUd-S.js +0 -1
  752. package/dist/public/assets/index-Dmlpu4P1.js +0 -2097
  753. package/dist/public/assets/selection-context-CSP8zK1H.js +0 -4
  754. package/dist/public/assets/skill-actions-98H3SnCL.js +0 -2
  755. package/dist/public/assets/typing-burst-detector-BOmjXV-P.js +0 -8
  756. package/dist/public/assets/use-activity-panel-BwANCYjg.js +0 -1
  757. package/dist/public/assets/use-open-skill-DCSEJ3jJ.js +0 -1
  758. package/dist/public/assets/use-skill-directory-D9S5f8By.js +0 -1
  759. package/dist/public/assets/use-timeline-entry-diff-CB_cI1yy.js +0 -6
  760. package/dist/pwd-D4OZ7N27-CSTLotxZ.mjs +0 -1
  761. package/dist/python3-DNGS4G3E-BZ5fPY5e.mjs +0 -12
  762. package/dist/quadrantDiagram-ABIIQ3AL-Do93EPf_.mjs +0 -8
  763. package/dist/radar-I7S5WNFK-HP72Fmhl.mjs +0 -1
  764. package/dist/railroad-3IZDKUUU-DC3PWo_6.mjs +0 -1
  765. package/dist/railroad-abnf-AHOZXSZD-Vgpa9_KI.mjs +0 -1
  766. package/dist/railroad-ebnf-EBAXGLYW-B4SmMMsT.mjs +0 -1
  767. package/dist/railroad-peg-LSFZ7HO6-DLlDiUuB.mjs +0 -1
  768. package/dist/railroadDiagram-RFXS5EU6-BBHONGQu.mjs +0 -2
  769. package/dist/readlink-MI4GCHJF-V9fwXBrg.mjs +0 -1
  770. package/dist/repair-launch-json-Cq9ghST3.mjs +0 -2
  771. package/dist/repair-mcp-configs-DY0FS2-y.mjs +0 -2
  772. package/dist/repair-skills-CkZZbtNk.mjs +0 -4
  773. package/dist/repair-skills-l9Id0gzv.mjs +0 -1
  774. package/dist/requirementDiagram-TGXJPOKE-CAGy_wFo.mjs +0 -85
  775. package/dist/rev-XOSYPP45-G2PvMYC2.mjs +0 -1
  776. package/dist/rg-XNF3R3II-CuFYIwNn.mjs +0 -1
  777. package/dist/rm-RTZG23RL-BOvMrhon.mjs +0 -1
  778. package/dist/rmdir-XTQXT7RK-Dk19R-p8.mjs +0 -1
  779. package/dist/rough.cjs-LxmwwhvT.mjs +0 -2
  780. package/dist/sankeyDiagram-HTMAVEWB-B59ayZ_U.mjs +0 -41
  781. package/dist/sed-JAPPVBEU-BUaK4riL.mjs +0 -1
  782. package/dist/seq-RN5ZUASB-D5aLn_so.mjs +0 -1
  783. package/dist/sequenceDiagram-DBY2YBRQ-BqY5gm2k.mjs +0 -163
  784. package/dist/server-lock-BleUv9m0.mjs +0 -2
  785. package/dist/server-lock-uucDARDL.mjs +0 -1
  786. package/dist/sha1sum-VJPNLNU6-DnTKth9v.mjs +0 -1
  787. package/dist/sha256sum-PI32XWXY-Z-xtGDHc.mjs +0 -1
  788. package/dist/sizeCapture-X5ZJPWSS-D7Nqbe-W.mjs +0 -2
  789. package/dist/skill-teardown-CZnemDLF.mjs +0 -2
  790. package/dist/sleep-VZFPZFWA-DcISab6N.mjs +0 -1
  791. package/dist/sort-DCNRDA7U-C1gRzOOY.mjs +0 -1
  792. package/dist/split-SITCSYCZ-D4U2N_sH.mjs +0 -1
  793. package/dist/sqlite3-TE5AIOTF-DcjYN7WW.mjs +0 -1
  794. package/dist/src-9BFQh559.mjs +0 -348
  795. package/dist/src-9I3GiOoK.mjs +0 -2032
  796. package/dist/src-BuBt_xnY.mjs +0 -2
  797. package/dist/src-Dl8P6sfz.mjs +0 -20
  798. package/dist/src-h5dDPK2z.mjs +0 -1
  799. package/dist/start-BYY0acPS.mjs +0 -1
  800. package/dist/start-C4KuZHu5.mjs +0 -4
  801. package/dist/stat-BT5A227F-B4qwqNn_.mjs +0 -1
  802. package/dist/stateDiagram-2N3HPSRC-BD1FBZi9.mjs +0 -2
  803. package/dist/stateDiagram-v2-6OUMAXLB-CqmBRdZY.mjs +0 -2
  804. package/dist/strings-7PLOGTPD-BJ6vWsQi.mjs +0 -1
  805. package/dist/swimlanes-5IMT3BWC-D2eO0gTx.mjs +0 -2
  806. package/dist/swimlanesDiagram-G3AALYLV-BiRCZWbo.mjs +0 -9
  807. package/dist/tac-SJGXQ4T2-D-bfDFKg.mjs +0 -1
  808. package/dist/tail-S5ULNTJU-CWnyTuXg.mjs +0 -1
  809. package/dist/tar-MZQD7NO4-Cx5bpVMY.mjs +0 -1
  810. package/dist/tee-O7VXZDCO-B_duU1hV.mjs +0 -1
  811. package/dist/time-DEUO3QV2-CekCKA2I.mjs +0 -1
  812. package/dist/timeline-definition-FHXFAJF6-DZHpuaV_.mjs +0 -121
  813. package/dist/timeout-VRKMCG72-DaJVXXR3.mjs +0 -1
  814. package/dist/touch-DX2IJOQ4-CZteiICw.mjs +0 -1
  815. package/dist/tr-2HXZRDSW-D4XuTGWg.mjs +0 -1
  816. package/dist/tree-LYXBS7DC-CUIzQKTG.mjs +0 -1
  817. package/dist/treeView-QDETBFTQ-C9yOsbGY.mjs +0 -1
  818. package/dist/treemap-6X3UGDF4-iowse2nY.mjs +0 -1
  819. package/dist/true-WHJNXCHG-BzxCUQFd.mjs +0 -1
  820. package/dist/unexpand-RGTMIGZM-x3XCmR3I.mjs +0 -1
  821. package/dist/uniq-SUNANL47-DpupkNiO.mjs +0 -1
  822. package/dist/vennDiagram-L72KCM5P-CGoW4QcS.mjs +0 -35
  823. package/dist/wardley-OPB4EBWU-BL1Dan_S.mjs +0 -1
  824. package/dist/wardleyDiagram-EHGQE667-DHS8jBWZ.mjs +0 -79
  825. package/dist/wc-TQB3VNOX-D8llmcL9.mjs +0 -1
  826. package/dist/which-XZHEH76L-imZgNd5x.mjs +0 -1
  827. package/dist/whoami-DGKU3D2X-CzLNG51j.mjs +0 -1
  828. package/dist/write-project-skill-WXZSbQlg.mjs +0 -56
  829. package/dist/xan-UD7JYIL2-_38Iv1cI.mjs +0 -1
  830. package/dist/xan-view-OW2TB7Z3-RT-IKMgr.mjs +0 -1
  831. package/dist/xargs-I6EZUCYF-Bu8VhXV_.mjs +0 -1
  832. package/dist/xychartDiagram-FW5EYKEG-CG0DSvm_.mjs +0 -8
  833. package/dist/yq-OAKYHSXH-BcCBaLJN.mjs +0 -1
  834. /package/dist/{expansion-VBDYWVZR-CeY6vkty.mjs → expansion-VBDYWVZR-CpX0YZMb.mjs} +0 -0
@@ -1,643 +0,0 @@
1
- import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Y as r}from"./sleep-DVOInM4H.mjs";import{K as i,Ko as a,U as o,ss as s,wo as c}from"./src-9BFQh559.mjs";import{$t as l,Ca as u,En as d,Fr as f,Jr as p,Lr as m,Nr as h,Pr as g,_n as _,br as v,c as y,en as b,fr as x,hn as S,l as C,mn as ee,nr as te,rr as ne,tr as re,u as ie,ur as ae,xr as oe}from"./src-9I3GiOoK.mjs";import{M as w,P as T}from"./fs-traced-By5aY-RE.mjs";import{C as se,a as ce,b as le,d as E,f as ue,i as de,l as fe,o as pe,s as D,t as me,u as he,x as ge}from"./write-project-skill-WXZSbQlg.mjs";import{i as O,n as k,o as A,r as _e,s as j,t as M}from"./colors-BsmVIwfM.mjs";import{t as ve}from"./constants-J4-mibQ1.mjs";import{t as N}from"./is-object-ByG7RnjH.mjs";import{t as ye}from"./preview-2rQXoRuM.mjs";import{createRequire as be}from"node:module";import{execFileSync as xe}from"node:child_process";import Se,{dirname as P,isAbsolute as F,join as I,relative as L,resolve as Ce,sep as we}from"node:path";import R from"node:process";import{fileURLToPath as Te}from"node:url";import{existsSync as z,lstatSync as Ee,mkdirSync as De,readFileSync as B,readlinkSync as Oe,realpathSync as ke,statSync as Ae,writeFileSync as je}from"node:fs";import{homedir as Me}from"node:os";import*as Ne from"node:readline";import{inspect as Pe,stripVTControlCharacters as Fe,styleText as V}from"node:util";import{AsyncLocalStorage as Ie,AsyncResource as Le}from"node:async_hooks";const Re=new Set([`emacs`,`vim`]);function ze(e){return Re.has(e)}function Be(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(ze))):[]}const H=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Ve=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,He=e=>e.name===`space`,Ue=e=>e.name===`backspace`,We=e=>`1234567890`.includes(e.name),Ge=e=>e.name===`enter`||e.name===`return`;var Ke=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},qe=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Je=class extends Error{name=`ExitPromptError`},Ye=class extends Error{name=`HookError`},Xe=class extends Error{name=`ValidationError`};const Ze=new Ie;function Qe(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function $e(e,t){let n=Qe(e);return Ze.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function U(){let e=Ze.getStore();if(!e)throw new Ye(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function et(){return U().rl}function tt(e){return Le.bind((...t)=>{let n=U(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function nt(e){let t=U(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function rt(){U().handleChange()}const it={queue(e){let t=U(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(et());if(r!=null&&typeof r!=`function`)throw new Xe(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=U();tt(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=U();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function at(e){return typeof e==`function`}function W(e){return nt(t=>{let n=Le.bind(function(e){t.get()!==e&&(t.set(e),rt())});if(t.initialized)return[t.get(),n];let r=at(e)?e():e;return t.set(r),[r,n]})}function ot(e,t){nt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&it.queue(e),n.set(t)})}function st(){return R.platform.startsWith(`win`)?!!R.env.CI||!!R.env.WT_SESSION||!!R.env.TERMINUS_SUBLIME||R.env.ConEmuTask===`{cmd::Cmder}`||R.env.TERM_PROGRAM===`Terminus-Sublime`||R.env.TERM_PROGRAM===`vscode`||R.env.TERM===`xterm-256color`||R.env.TERM===`alacritty`||R.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:R.env.TERM!==`linux`}const ct={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},lt={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},ut={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},dt={...ct,...lt},ft={...ct,...ut},G=st()?dt:ft;Object.entries(lt);const pt={prefix:{idle:V(`blue`,`?`),done:V(`green`,G.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>V(`yellow`,e))},keybindings:[],style:{answer:e=>V(`cyan`,e),message:e=>V(`bold`,e),error:e=>V(`red`,`> ${e}`),defaultAnswer:e=>V(`dim`,`(${e})`),help:e=>V(`dim`,e),highlight:e=>V(`cyan`,e),key:e=>V(`cyan`,V(`bold`,`<${e}>`))}};function mt(){return{...pt,keybindings:Be()}}function ht(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gt(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=ht(n)&&ht(r)?gt(n,r):r}return t}function _t(...e){return gt(mt(),...e.filter(e=>e!=null))}function vt({status:e=`idle`,theme:t}){let[n,r]=W(!1),[i,a]=W(0),{prefix:o,spinner:s}=_t(t);return ot(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function yt(e,t){return nt(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function bt(e){return W({current:e})[0]}function xt(e){let t=bt(e);t.current=e,ot(e=>{let n=!1,r=tt((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var St=t(n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}))(),1);const Ct=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),wt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Tt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Dt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ot=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,kt=/\t{1,1000}/y,At=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,jt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Mt=/\p{M}+/gu,Nt={limit:1/0,ellipsis:``},Pt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Pt(i,Nt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[jt,l],[Et,0],[Dt,o],[kt,s],[At,c],[Ot,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Mt,``)){let t=e.codePointAt(0)||0;if(S=wt(t)?2:Tt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Ot?Ct(e.slice(p,n.lastIndex)):n===At?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},Ft={limit:1/0,ellipsis:``,ellipsisWidth:0},K=(e,t={})=>Pt(e,Ft,t).width,It=`]8;;`,Lt=RegExp(`(?:\\[(?<code>\\d+)m|\\${It}(?<uri>.*))`,`y`),Rt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},zt=e=>`[${e}m`,Bt=e=>`${It}${e}`,Vt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:K(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=K(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(It,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ht=e=>{let t=e.split(` `),n=t.length;for(;n&&!K(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ut=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=K(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=K(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Vt(s,r,t),c=K(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Vt(s,r,t),c=K(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Vt(s,r,t),c=K(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ht(e)));let l=s.join(`
2
- `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===`›`){Lt.lastIndex=e+1;let t=Lt.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
3
- `){a&&(r+=Bt(``));let e=i?Rt(i):void 0;i&&e&&(r+=zt(e))}else t===`
4
- `&&(i&&Rt(i)&&(r+=zt(i)),a&&(r+=Bt(a)))}return r},Wt=/\r?\n/;function Gt(e,t,n){return String(e).normalize().split(Wt).map(e=>Ut(e,t,n)).join(`
5
- `)}function Kt(e,t){return e.split(`
6
- `).flatMap(e=>Gt(e,t,{trim:!1,wordWrap:!1}).split(`
7
- `).map(e=>e.trimEnd())).join(`
8
- `)}function qt(){return(0,St.default)({defaultWidth:80,output:et().output})}function Jt({active:e,renderedItems:t,pageSize:n,loop:r}){let i=bt({lastPointer:e,lastActive:void 0}),{lastPointer:a,lastActive:o}=i.current,s=Math.floor(n/2),c=t.reduce((e,t)=>e+t.length,0),l=t.slice(0,e).reduce((e,t)=>e+t.length,0),u=l;if(c>n)if(r)u=a,o!=null&&o<e&&e-o<n&&(u=Math.min(s,Math.abs(e-o)===1?Math.min(a+(t[o]?.length??0),Math.max(l,a)):a+e-o));else{let r=t.slice(e).reduce((e,t)=>e+t.length,0);u=r<n-s?n-r:Math.min(l,s)}return i.current.lastPointer=u,i.current.lastActive=e,u}function Yt({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=qt(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:Kt(n({item:e,index:r,isActive:r===t}),a).split(`
9
- `)),c=s.reduce((e,t)=>e+t.length,0),l=e=>s[e]??[],u=Jt({active:t,renderedItems:s,pageSize:r,loop:i}),d=l(t).slice(0,r),f=u+d.length<=r?u:r-d.length,p=Array.from({length:r});p.splice(f,d.length,...d);let m=new Set([t]),h=f+d.length,g=o(t+1);for(;h<r&&!m.has(g)&&(i&&c>r?g!==t:g>t);){let e=l(g).slice(0,r-h);p.splice(h,e.length,...e),m.add(g),h+=e.length,g=o(g+1)}for(h=f-1,g=o(t-1);h>=0&&!m.has(g)&&(i&&c>r?g!==t:g<t);){let e=l(g),t=e.slice(Math.max(0,e.length-h-1));p.splice(h-t.length+1,t.length,...t),m.add(g),h-=t.length,g=o(g-1)}return p.filter(e=>typeof e==`string`).join(`
10
- `)}var Xt=t(n(((t,n)=>{let r=e(`stream`);n.exports=class extends r{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on(`pipe`,this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#n(e,...t){typeof this._dest?.[e]==`function`&&this._dest[e](...t),typeof this._src?.[e]==`function`&&this._src[e](...t)}get isTTY(){return this.#e===null?this.#t(`isTTY`,!1):this.#e}set isTTY(e){this.#e=e}get rows(){return this.#t(`rows`)}get columns(){return this.#t(`columns`)}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit(`data`,e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit(`data`,this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit(`data`,e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit(`data`,e),this.emit(`end`)}destroy(...e){return this.#n(`destroy`,...e)}destroySoon(...e){return this.#n(`destroySoon`,...e)}close(...e){return this.#n(`close`,...e)}}}))(),1);const q=[];q.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&q.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&q.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Zt=e=>!!e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`,Qt=Symbol.for(`signal-exit emitter`),$t=globalThis,en=Object.defineProperty.bind(Object);var tn=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if($t[Qt])return $t[Qt];en($t,Qt,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},nn=class{};const rn=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var an=class extends nn{onExit(){return()=>{}}load(){}unload(){}},on=class extends nn{#e=sn.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new tn;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of q)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Zt(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of q)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,q.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return Zt(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&Zt(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const sn=globalThis.process,{onExit:cn,load:ln,unload:un}=rn(Zt(sn)?new on(sn):new an),dn=`\x1B[?25l`,fn=(e=1)=>e>0?`[${e}A`:``,pn=(e=1)=>e>0?`[${e}B`:``,mn=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,hn=`\x1B[2K`,gn=e=>e>0?(hn+fn(1)).repeat(e-1)+hn+`\x1B[G`:``,_n=e=>e.split(`
11
- `).length,vn=e=>e.split(`
12
- `).pop()??``;var yn=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=``){let n=Fe(vn(e)),r=n;this.rl.line.length>0&&(r=r.slice(0,-this.rl.line.length)),this.rl.setPrompt(r),this.cursorPos=this.rl.getCursorPos();let i=qt();e=Kt(e,i),t=Kt(t,i),n.length%i===0&&(e+=`
13
- `);let a=e+(t?`
14
- `+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?_n(t):0);o>0&&(a+=fn(o)),a+=mn(this.cursorPos.cols),this.write(pn(this.extraLinesUnderPrompt)+gn(this.height)+a),this.extraLinesUnderPrompt=o,this.height=_n(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(mn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=pn(this.extraLinesUnderPrompt);t+=e?gn(this.height):`
15
- `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},bn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const xn=globalThis.setImmediate;function Sn(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function Cn(e){let t=Sn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Xt.default;s.pipe(r.output??process.stdout);let c=Ne.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new yn(c),{promise:u,resolve:d,reject:f}=bn.withResolver(),p=()=>f(new qe);if(a){let e=()=>f(new Ke({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(cn((e,t)=>{f(new Je(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new Je(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),$e(c,a=>{let m=Le.bind(()=>it.clearAll());c.on(`close`,m),o.add(()=>c.removeListener(`close`,m));let h=()=>{let r=()=>l.checkCursorPos();c.input.on(`keypress`,r),o.add(()=>c.input.removeListener(`keypress`,r));let i=null;a(()=>{let r=!1;try{let a=e(n,e=>{r?d(e):i={value:e}});if(a===void 0){let e=t[1]?.getFileName();throw e&&!e.startsWith(`file://`)&&(e=Se.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),it.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?xn(h):h(),Object.assign(u.then(e=>(it.clearAll(),e),e=>{throw it.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var J=class{separator=V(`dim`,Array.from({length:15}).join(G.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},wn=r();const Tn=`.ok/`,En=`**/.ok/*`,Dn=`!**/${s}/`;function On(e){let t=[`.ok/`,`.okignore`];for(let n of ce){let r=D[n];r.projectConfigPath&&t.push(Bn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=I(e,...o);if(z(n))try{let e=i(B(n,`utf-8`));if(e){for(let[n,r]of Object.entries(e.skills))if(n!==`open-knowledge`)for(let e of r.hosts){let r=a[e];r&&t.push(`${r}/${n}/`)}}}catch{}return Array.from(new Set(t))}function kn(e,t){let n=Fn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:In(n)};let r=Y(e);if(r.kind!==`ok`)return r.result;let i=z(r.path)?B(r.path,`utf-8`):``,a=zn(i),o=[],s=[];for(let e of t)Rn(a,e)?s.push(e):o.push(e);if(o.length===0)return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]};let c=i.length===0||i.endsWith(`
16
- `)?``:`
17
- `,l=`${o.join(`
18
- `)}\n`;try{je(r.path,`${i}${c}${l}`,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]}}function An(e,t){let n=Y(e);if(n.kind!==`ok`)return n.result;if(!z(n.path))return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let r=t.map(e=>Ln(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(En),i.add(Dn);let a;try{a=B(n.path,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}let o=a.split(`
19
- `),s=new Set,c=[];for(let e of o){let t=e.trim();if(i.has(t)){s.add(t);continue}c.push(e)}let l=t.filter(e=>{for(let t of Ln(e))if(s.has(t))return!0;return!1});if(s.size===0)return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let u=c.join(`
20
- `);if(u!==a)try{je(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function jn(e){let t=Y(e);if(t.kind!==`ok`)return t.result.reason===`no-git`||t.result.reason===`malformed-pointer`||t.result.reason===`inaccessible`?`no-git`:`shared`;if(!z(t.path))return`shared`;let n;try{n=B(t.path,`utf-8`)}catch{return`shared`}let r=zn(n),i=On(e);for(let e of i)if(Rn(r,e))return`local-only`;return r.has(En)?`local-only`:`shared`}function Mn(e){let t=Y(e);if(t.kind!==`ok`||!z(t.path))return[];let n;try{n=B(t.path,`utf-8`)}catch{return[]}let r=zn(n);return On(e).filter(e=>Rn(r,e))}function Nn(e){let t=Y(e);if(t.kind!==`ok`||!z(t.path))return!1;let n;try{n=B(t.path,`utf-8`)}catch{return!1}let r=zn(n);return r.has(En)&&r.has(Dn)}function Pn(e,t){let n=Y(e);if(n.kind!==`ok`)return n.result;let r=``;if(z(n.path))try{r=B(n.path,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}let i=new Set([...Ln(Tn),En,Dn]),a=r.split(`
21
- `).filter(e=>!i.has(e.trim())),o=t?[En,Dn]:[Tn],s=a.join(`
22
- `),c=`${s}${s.length===0||s.endsWith(`
23
- `)?``:`
24
- `}${o.join(`
25
- `)}\n`;try{je(n.path,c,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:[],removed:[]}}function Fn(e,t){let n=[];for(let r of t)if(z(Ce(e,r)))try{xe(`git`,[`ls-files`,`--error-unmatch`,`--`,r],p({cwd:e,stdio:[`ignore`,`ignore`,`ignore`]})),n.push(r)}catch{}return{tracked:n}}function In(e){let t=[];t.push(`Cannot switch OpenKnowledge to local-only — these OK files are tracked upstream:`),t.push(``);for(let n of e)t.push(` ${n}`);t.push(``),t.push(`.git/info/exclude only hides files that git isn't already tracking. To proceed, untrack them first:`),t.push(``);for(let n of e){let e=n.replace(/\/$/,``),r=n.endsWith(`/`)?`-r `:``;t.push(` git rm --cached ${r}${e}`)}return t.push(``),t.push("Then re-run the command. Note: `git rm --cached` removes the files from the index — your teammates will see a deletion on their next pull. If you don't want that, leave sharing mode set to 'shared'."),t.join(`
26
- `)}function Y(e){let t=u(e);switch(t.kind){case`repository`:{let e=t.repository.readCommonDir();if(e.kind===`unreadable`)return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}};let n=I(e.path,`info`);return z(n)?{kind:`ok`,path:I(n,`exclude`)}:{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-info-dir`}}}case`absent`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-git`}};case`malformed-pointer`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`malformed-pointer`}};case`inaccessible`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}}}}function Ln(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function Rn(e,t){for(let n of Ln(t))if(e.has(n))return!0;return!1}function zn(e){let t=new Set;for(let n of e.split(`
27
- `)){let e=n.trim();e.length!==0&&t.add(e)}return t}function Bn(e,t){return Vn(L(t,e))}function Vn(e){return we===`/`?e:e.split(we).join(`/`)}function Hn(e){for(let t of e.split(`
28
- `)){let e=t.trimStart();if(!(e.length===0||e.length===t.length))return t.charCodeAt(0)===9?{insertSpaces:!1,tabSize:1}:{insertSpaces:!0,tabSize:t.length-e.length}}return{insertSpaces:!0,tabSize:2}}function Un(e){let t=(e.match(/\r\n/g)??[]).length;return t===0?!1:t>=(e.match(/\n/g)??[]).length-t}function Wn(e){try{return Ae(e).mode&511}catch{return}}function Gn(e,t){let n=e.charCodeAt(0)===65279,r=n?e.slice(1):e,i=r.includes(`\r
29
- `)?`\r
30
- `:`
31
- `,a=f(r,t,void 0,{formattingOptions:{...Hn(r),eol:i}});if(a.length===0)return{text:e,changed:!1};let o=`${n?``:``}${h(r,a)}`;return{text:o,changed:o!==e}}const Kn={icon:{checked:V(`green`,G.circleFilled),unchecked:G.circle,cursor:G.pointer,disabledChecked:V(`green`,G.circleDouble),disabledUnchecked:`-`},style:{disabled:e=>V(`dim`,e),renderSelectedChoices:e=>e.map(e=>e.short).join(`, `),description:e=>V(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${V(`bold`,e)} ${V(`dim`,t)}`).join(V(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be toggled.`}};function qn(e){return!J.isSeparator(e)&&!e.disabled}function Jn(e){return!J.isSeparator(e)}function Yn(e){return!J.isSeparator(e)&&e.checked}function Xn(e){return qn(e)?{...e,checked:!e.checked}:e}function Zn(e){return function(t){return qn(t)?{...t,checked:e}:t}}function Qn(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,checkedName:t,disabled:!1,checked:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,checkedName:e.checkedName??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})}var $n=Cn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=_t(Kn,e.theme),{keybindings:c}=s,[l,u]=W(`idle`),d=vt({status:l,theme:s}),[f,p]=W(Qn(e.choices)),m=yt(()=>{let e=f.findIndex(Jn),t=f.findLastIndex(Jn);if(e===-1)throw new Xe(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=W(m.first),[_,v]=W();xt(async e=>{if(Ge(e)){let e=f.filter(Yn),n=await a([...e]);i&&!e.length?v(`At least one choice must be selected`):n===!0?(u(`done`),t(e.map(e=>e.value))):v(n||`You must select a valid value`)}else if(H(e,c)||Ve(e,c)){if(_&&v(void 0),r||H(e,c)&&h!==m.first||Ve(e,c)&&h!==m.last){let t=H(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!Jn(f[n]));g(n)}}else if(He(e)){let e=f[h];e&&!J.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?Xn(e):e))))}else if(e.name===o.all){let e=f.some(e=>qn(e)&&!e.checked);p(f.map(Zn(e)))}else if(e.name===o.invert)p(f.map(Xn));else if(We(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>J.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&qn(i)&&(g(r),p(f.map((e,t)=>t===r?Xn(e):e)))}});let y=s.style.message(e.message,l),b,x=Yt({items:f,active:h,renderItem({item:e,isActive:t}){if(J.isSeparator(e))return` ${e.separator}`;let n=t?s.icon.cursor:` `;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=e.checked?s.icon.disabledChecked:s.icon.disabledUnchecked;return s.style.disabled(`${n}${r} ${e.name} ${t}`)}t&&(b=e.description);let r=e.checked?s.icon.checked:s.icon.unchecked,i=e.checked?e.checkedName:e.name;return(t?s.style.highlight:e=>e)(`${n}${r} ${i}`)},pageSize:n,loop:r});if(l===`done`){let e=f.filter(Yn);return[d,y,s.style.answer(s.style.renderSelectedChoices(e,f))].filter(Boolean).join(` `)}let S=[[`↑↓`,`navigate`],[`space`,`select`]];o.all&&S.push([o.all,`all`]),o.invert&&S.push([o.invert,`invert`]),S.push([`⏎`,`submit`]);let C=s.style.keysHelpTip(S);return`${[[d,y].filter(Boolean).join(` `),x,` `,b?s.style.description(b):``,_?s.style.error(_):``,C].filter(Boolean).join(`
32
- `).trimEnd()}${dn}`});const er={icon:{cursor:G.pointer},style:{disabled:e=>V(`dim`,e),description:e=>V(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${V(`bold`,e)} ${V(`dim`,t)}`).join(V(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be selected.`},indexMode:`hidden`};function tr(e){return!J.isSeparator(e)&&!e.disabled}function nr(e){return!J.isSeparator(e)}function rr(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}var ir=Cn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=_t(er,e.theme),{keybindings:a}=i,[o,s]=W(`idle`),c=vt({status:o,theme:i}),l=bt(),u=!a.includes(`vim`),d=yt(()=>rr(e.choices),[e.choices]),f=yt(()=>{let e=d.findIndex(nr),t=d.findLastIndex(nr);if(e===-1)throw new Xe(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=yt(()=>`default`in e?d.findIndex(t=>tr(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=W(p===-1?f.first:p),g=d[m];if(g==null||J.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=W();xt((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),Ge(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(H(e,a)||Ve(e,a)){if(r.clearLine(0),n||H(e,a)&&m!==f.first||Ve(e,a)&&m!==f.last){let t=H(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!nr(d[n]));h(n)}}else if(We(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>J.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&tr(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(Ue(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>J.isSeparator(t)||!tr(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),ot(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Yt({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(J.isSeparator(e))return x++,` ${e.separator}`;let r=t?i.icon.cursor:` `,a=i.indexMode===`number`?`${n+1-x}. `:``;if(e.disabled){let n=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=t?i.icon.cursor:`-`;return i.style.disabled(`${r} ${a}${e.name} ${n}`)}return(t?i.style.highlight:e=>e)(`${r} ${a}${e.name}`)},pageSize:r,loop:n});if(o===`done`)return[c,y,i.style.answer(g.short)].filter(Boolean).join(` `);let{description:C}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,C?i.style.description(C):``,_?i.style.error(_):``,b].filter(Boolean).join(`
33
- `).trimEnd()}${dn}`});
34
- /*!
35
- * Copyright (c) Squirrel Chat et al., All rights reserved.
36
- * SPDX-License-Identifier: BSD-3-Clause
37
- *
38
- * Redistribution and use in source and binary forms, with or without
39
- * modification, are permitted provided that the following conditions are met:
40
- *
41
- * 1. Redistributions of source code must retain the above copyright notice, this
42
- * list of conditions and the following disclaimer.
43
- * 2. Redistributions in binary form must reproduce the above copyright notice,
44
- * this list of conditions and the following disclaimer in the
45
- * documentation and/or other materials provided with the distribution.
46
- * 3. Neither the name of the copyright holder nor the names of its contributors
47
- * may be used to endorse or promote products derived from this software without
48
- * specific prior written permission.
49
- *
50
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
51
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
52
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
53
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
55
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
56
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
57
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
58
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60
- */
61
- let ar=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var or=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(ar);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}};
62
- /*!
63
- * Copyright (c) Squirrel Chat et al., All rights reserved.
64
- * SPDX-License-Identifier: BSD-3-Clause
65
- *
66
- * Redistribution and use in source and binary forms, with or without
67
- * modification, are permitted provided that the following conditions are met:
68
- *
69
- * 1. Redistributions of source code must retain the above copyright notice, this
70
- * list of conditions and the following disclaimer.
71
- * 2. Redistributions in binary form must reproduce the above copyright notice,
72
- * this list of conditions and the following disclaimer in the
73
- * documentation and/or other materials provided with the distribution.
74
- * 3. Neither the name of the copyright holder nor the names of its contributors
75
- * may be used to endorse or promote products derived from this software without
76
- * specific prior written permission.
77
- *
78
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
79
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
80
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
81
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
82
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
83
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
84
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
85
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
86
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
87
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88
- */
89
- function sr(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function cr(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+=`
90
- `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
91
- `))}return i}var X=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=sr(t.toml,t.ptr),i=cr(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
92
- /*!
93
- * Copyright (c) Squirrel Chat et al., All rights reserved.
94
- * SPDX-License-Identifier: BSD-3-Clause
95
- *
96
- * Redistribution and use in source and binary forms, with or without
97
- * modification, are permitted provided that the following conditions are met:
98
- *
99
- * 1. Redistributions of source code must retain the above copyright notice, this
100
- * list of conditions and the following disclaimer.
101
- * 2. Redistributions in binary form must reproduce the above copyright notice,
102
- * this list of conditions and the following disclaimer in the
103
- * documentation and/or other materials provided with the distribution.
104
- * 3. Neither the name of the copyright holder nor the names of its contributors
105
- * may be used to endorse or promote products derived from this software without
106
- * specific prior written permission.
107
- *
108
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
109
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
110
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
111
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
112
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
113
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
114
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
115
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
116
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
117
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118
- */
119
- let lr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ur=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,dr=/^[+-]?0[0-9_]/;function fr(e,t){let n=e[t++],r=n,i=n===`'`,a=n===e[t]&&n===e[t+1];a&&(e[t+=2]===`
120
- `?t++:e[t]===`\r`&&e[t+1]===`
121
- `&&(t+=2));let o=``,s=t,c=0;for(let l=t;l<e.length;l++)if(n=e[l],a&&(n===`
122
- `||n===`\r`&&e[l+1]===`
123
- `))c&&=3;else if(n<` `&&n!==` `||n===``)throw new X(`control characters are not allowed in strings`,{toml:e,ptr:l});else if((!c||c===3)&&n===r&&(!a||e[l+1]===r&&e[l+2]===r))return a&&(e[l+3]===r&&l++,e[l+3]===r&&l++),[c?o:o+e.slice(s,l),l+(a?3:1)];else if(!c)!i&&n===`\\`&&(o+=e.slice(s,s=l),c=1);else if(c===1)if(n===`x`||n===`u`||n===`U`){let t=0,r=n===`x`?2:n===`u`?4:8;for(let n=0;n<r;n++,l++){let n=e.charCodeAt(l+1),r=n>=48&&n<=57?n-48:n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:-1;if(r<0)throw new X(`invalid non-hex character in unicode escape`,{toml:e,ptr:l+1});t=t<<4|r}if(t<0||t>1114111||t>=55296&&t<=57343)throw new X(`invalid unicode escape`,{toml:e,ptr:l});o+=String.fromCodePoint(t),s=l+1,c=0}else if(n===` `||n===` `)c=2;else{if(n===`b`)o+=`\b`;else if(n===`t`)o+=` `;else if(n===`n`)o+=`
124
- `;else if(n===`f`)o+=`\f`;else if(n===`r`)o+=`\r`;else if(n===`e`)o+=`\x1B`;else if(n===`"`)o+=`"`;else if(n===`\\`)o+=`\\`;else throw new X(`unrecognized escape sequence`,{toml:e,ptr:l});s=l+1,c=0}else if(n!==` `&&n!==` `){if(c===2)throw new X(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});c=+(!i&&n===`\\`),s=l}throw new X(`unfinished string`,{toml:e,ptr:t})}function pr(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=lr.test(e);if(i||ur.test(e)){if(dr.test(e))throw new X(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new X(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new X(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new or(e);if(!a.isValid())throw new X(`invalid value`,{toml:t,ptr:n});return a}
125
- /*!
126
- * Copyright (c) Squirrel Chat et al., All rights reserved.
127
- * SPDX-License-Identifier: BSD-3-Clause
128
- *
129
- * Redistribution and use in source and binary forms, with or without
130
- * modification, are permitted provided that the following conditions are met:
131
- *
132
- * 1. Redistributions of source code must retain the above copyright notice, this
133
- * list of conditions and the following disclaimer.
134
- * 2. Redistributions in binary form must reproduce the above copyright notice,
135
- * this list of conditions and the following disclaimer in the
136
- * documentation and/or other materials provided with the distribution.
137
- * 3. Neither the name of the copyright holder nor the names of its contributors
138
- * may be used to endorse or promote products derived from this software without
139
- * specific prior written permission.
140
- *
141
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
142
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
143
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
144
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
145
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
146
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
147
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
148
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
149
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
150
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
151
- */
152
- function mr(e,t=0,n=e.length){let r=e.indexOf(`
153
- `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function hr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
154
- `)return n;if(r===`\r`&&e[n+1]===`
155
- `)return n+1;if(r<` `&&r!==` `||r===``)throw new X(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function Z(e,t,n,r){let i;for(;;){for(;(i=e[t])===` `||i===` `||!n&&(i===`
156
- `||i===`\r`&&e[t+1]===`
157
- `);)t++;if(r||i!==`#`)break;t=hr(e,t)}return t}function gr(e,t,n,r,i=!1){if(!r)return t=mr(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=mr(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
158
- `||t===`\r`&&e[a+1]===`
159
- `))return a}throw new X(`cannot find end of structure`,{toml:e,ptr:t})}
160
- /*!
161
- * Copyright (c) Squirrel Chat et al., All rights reserved.
162
- * SPDX-License-Identifier: BSD-3-Clause
163
- *
164
- * Redistribution and use in source and binary forms, with or without
165
- * modification, are permitted provided that the following conditions are met:
166
- *
167
- * 1. Redistributions of source code must retain the above copyright notice, this
168
- * list of conditions and the following disclaimer.
169
- * 2. Redistributions in binary form must reproduce the above copyright notice,
170
- * this list of conditions and the following disclaimer in the
171
- * documentation and/or other materials provided with the distribution.
172
- * 3. Neither the name of the copyright holder nor the names of its contributors
173
- * may be used to endorse or promote products derived from this software without
174
- * specific prior written permission.
175
- *
176
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
177
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
178
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
179
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
180
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
181
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
182
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
183
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
184
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
185
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
186
- */
187
- function _r(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(hr(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function vr(e,t,n,r,i){if(r===0)throw new X(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?Sr(e,t,r,i):xr(e,t,r,i);if(n){if(s=Z(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new X(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}if(a===`"`||a===`'`){let[r,i]=fr(e,t);if(n){if(i=Z(e,i),e[i]&&e[i]!==`,`&&e[i]!==n&&e[i]!==`
188
- `&&e[i]!==`\r`)throw new X(`unexpected character encountered`,{toml:e,ptr:i});e[i]===`,`&&i++}return[r,i]}let o=gr(e,t,`,`,n),s=_r(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new X(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=Z(e,t+s[1]),e[o]===`,`&&o++),[pr(s[0],e,t,i),o]}
189
- /*!
190
- * Copyright (c) Squirrel Chat et al., All rights reserved.
191
- * SPDX-License-Identifier: BSD-3-Clause
192
- *
193
- * Redistribution and use in source and binary forms, with or without
194
- * modification, are permitted provided that the following conditions are met:
195
- *
196
- * 1. Redistributions of source code must retain the above copyright notice, this
197
- * list of conditions and the following disclaimer.
198
- * 2. Redistributions in binary form must reproduce the above copyright notice,
199
- * this list of conditions and the following disclaimer in the
200
- * documentation and/or other materials provided with the distribution.
201
- * 3. Neither the name of the copyright holder nor the names of its contributors
202
- * may be used to endorse or promote products derived from this software without
203
- * specific prior written permission.
204
- *
205
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
206
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
207
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
208
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
209
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
210
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
211
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
212
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
213
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
214
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
215
- */
216
- let yr=/^[a-zA-Z0-9-_]+[ \t]*$/;function br(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new X(`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 X(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let[s,c]=fr(e,t);r=e.indexOf(`.`,c);let l=e.slice(c,r<0||r>a?a:r),u=mr(l);if(u>-1)throw new X(`newlines are not allowed in keys`,{toml:e,ptr:t+r+u});if(l.trimStart())throw new X(`found extra tokens after the string part`,{toml:e,ptr:c});if(a<c&&(a=e.indexOf(n,c),a<0))throw new X(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(s)}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!yr.test(n))throw new X(`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,Z(e,a+1,!0,!0)]}function xr(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new X(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=hr(e,t);else if(o!==` `&&o!==` `&&o!==`
217
- `&&o!==`\r`){let o,s=i,c=!1,[l,u]=br(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 X(`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 X(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=vr(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new X(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function Sr(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new X(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=hr(e,t);else if(a!==` `&&a!==` `&&a!==`
218
- `&&a!==`\r`){let a=vr(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new X(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}
219
- /*!
220
- * Copyright (c) Squirrel Chat et al., All rights reserved.
221
- * SPDX-License-Identifier: BSD-3-Clause
222
- *
223
- * Redistribution and use in source and binary forms, with or without
224
- * modification, are permitted provided that the following conditions are met:
225
- *
226
- * 1. Redistributions of source code must retain the above copyright notice, this
227
- * list of conditions and the following disclaimer.
228
- * 2. Redistributions in binary form must reproduce the above copyright notice,
229
- * this list of conditions and the following disclaimer in the
230
- * documentation and/or other materials provided with the distribution.
231
- * 3. Neither the name of the copyright holder nor the names of its contributors
232
- * may be used to endorse or promote products derived from this software without
233
- * specific prior written permission.
234
- *
235
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
236
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
237
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
238
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
239
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
240
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
241
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
242
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
243
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
244
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
245
- */
246
- function Cr(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 wr(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=Z(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=br(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new X(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=Cr(n[0],r,i,t?2:1);if(!c)throw new X(`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=br(e,s),i=Cr(r[0],a,o,0);if(!i)throw new X(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=vr(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=Z(e,s,!0),e[s]&&e[s]!==`
247
- `&&e[s]!==`\r`)throw new X(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=Z(e,s)}return r}
248
- /*!
249
- * Copyright (c) Squirrel Chat et al., All rights reserved.
250
- * SPDX-License-Identifier: BSD-3-Clause
251
- *
252
- * Redistribution and use in source and binary forms, with or without
253
- * modification, are permitted provided that the following conditions are met:
254
- *
255
- * 1. Redistributions of source code must retain the above copyright notice, this
256
- * list of conditions and the following disclaimer.
257
- * 2. Redistributions in binary form must reproduce the above copyright notice,
258
- * this list of conditions and the following disclaimer in the
259
- * documentation and/or other materials provided with the distribution.
260
- * 3. Neither the name of the copyright holder nor the names of its contributors
261
- * may be used to endorse or promote products derived from this software without
262
- * specific prior written permission.
263
- *
264
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
265
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
266
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
267
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
268
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
269
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
270
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
271
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
272
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
273
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
274
- */
275
- let Tr=/^[a-z0-9-_]+$/i;function Er(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function Dr(e){for(let t=0;t<e.length;t++)if(Er(e[t])!==`object`)return!1;return e.length!=0}function Or(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function kr(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`:Number.isInteger(e)&&(r||!Number.isSafeInteger(e))?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return Or(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Ar(e,n,r);if(t===`array`)return jr(e,n,r)}function Ar(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+=Tr.test(o)?o:Or(o),i+=` = `,i+=kr(e[o],Er(e[o]),t-1,n)}return i+` }`}function jr(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+=kr(e[i],Er(e[i]),t-1,n)}return r+` ]`}function Mr(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&&`
276
- `}[[${t}]]\n`,i+=Nr(0,e[a],t,n,r);return i}function Nr(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=Er(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Tr.test(c)?c:Or(c);if(e===`array`&&Dr(t[c]))o+=(o&&`
277
- `)+Mr(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
278
- `)+Nr(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=kr(t[c],e,r,i),a+=`
279
- `}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Pr(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(Er(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=Nr(0,e,``,t,n);return r[r.length-1]===`
280
- `?r:r+`
281
- `}const Fr=`${fe}-dev`;function Ir(e){return e.startsWith(fe)}function Lr(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command!==`ok-pi-managed-extension`||!Array.isArray(t.args))return!1;let n=t.args[0];return typeof n==`string`&&Ir(n)}function Rr(e){return{command:E,args:[e]}}function zr(e={}){let t=e.mode===`dev`?Fr:he,n={unix:ue({...e,platformName:`darwin`}),win32:ue({...e,platformName:`win32`})};return`${t}
282
- /**
283
- * Open Knowledge bridge for Pi — MANAGED FILE, written by \`ok init\`.
284
- * Hand edits are overwritten whenever OK re-syncs this project; remove it
285
- * with \`ok deinit\` (or delete the file) to disconnect Pi from OK.
286
- *
287
- * On session start it spawns Open Knowledge's MCP stdio server via OK's
288
- * resilient launcher (bundle, then npx, then version-manager probes), performs
289
- * the MCP handshake, and registers each MCP tool as a Pi tool under an
290
- * \`ok_\` prefix (Pi has no MCP namespacing; the prefix keeps OK's \`edit\` /
291
- * \`write\` from shadowing Pi's built-in tools).
292
- */
293
- import { spawn } from "node:child_process";
294
- import type { ChildProcessWithoutNullStreams } from "node:child_process";
295
-
296
- const LAUNCHERS = ${JSON.stringify(n,null,2)} as const;
297
-
298
- const TOOL_PREFIX = "ok_";
299
- // First contact may cold-install the CLI through npx — allow a generous window.
300
- const INIT_TIMEOUT_MS = 120000;
301
- const STDERR_TAIL_LIMIT = 2000;
302
-
303
- interface McpContentItem {
304
- type: string;
305
- text?: string;
306
- }
307
-
308
- interface McpToolInfo {
309
- name: string;
310
- description?: string;
311
- inputSchema?: Record<string, unknown>;
312
- }
313
-
314
- interface PendingRequest {
315
- resolve: (value: Record<string, unknown>) => void;
316
- reject: (err: Error) => void;
317
- }
318
-
319
- class OkMcpClient {
320
- private child: ChildProcessWithoutNullStreams;
321
- private pending = new Map<number, PendingRequest>();
322
- private nextId = 1;
323
- private buffer = "";
324
- private stderrTail = "";
325
- alive = true;
326
-
327
- constructor(cwd: string, onExit: () => void) {
328
- const launcher = process.platform === "win32" ? LAUNCHERS.win32 : LAUNCHERS.unix;
329
- const env: Record<string, string | undefined> = { ...process.env };
330
- const launcherEnv = (launcher as { env?: Record<string, string> }).env;
331
- if (launcherEnv) Object.assign(env, launcherEnv);
332
- this.child = spawn(launcher.command, [...launcher.args], {
333
- cwd,
334
- env,
335
- stdio: ["pipe", "pipe", "pipe"],
336
- // Inline (not the withHiddenWindowsConsole helper): this spawn lives in the
337
- // GENERATED Pi extension source, which must stay dependency-free (Pi loads
338
- // it with jiti; no npm packages resolve). Hide the console on Windows anyway.
339
- windowsHide: true,
340
- });
341
- this.child.stdout.setEncoding("utf8");
342
- this.child.stdout.on("data", (chunk: string) => this.onStdout(chunk));
343
- this.child.stderr.setEncoding("utf8");
344
- this.child.stderr.on("data", (chunk: string) => {
345
- this.stderrTail = (this.stderrTail + chunk).slice(-STDERR_TAIL_LIMIT);
346
- });
347
- // A write buffered before the pipe breaks surfaces as an 'error' on stdin
348
- // (not on the child); unhandled it would crash Pi's extension host.
349
- // Swallow it — the exit handler owns teardown.
350
- this.child.stdin.on("error", () => {});
351
- const fail = () => {
352
- if (!this.alive) return;
353
- this.alive = false;
354
- const err = new Error(
355
- "Open Knowledge MCP server exited" +
356
- (this.stderrTail ? ": " + this.stderrTail.trim() : ""),
357
- );
358
- for (const p of this.pending.values()) p.reject(err);
359
- this.pending.clear();
360
- onExit();
361
- };
362
- this.child.on("exit", fail);
363
- this.child.on("error", fail);
364
- }
365
-
366
- private onStdout(chunk: string): void {
367
- this.buffer += chunk;
368
- let newline = this.buffer.indexOf("\\n");
369
- while (newline !== -1) {
370
- const line = this.buffer.slice(0, newline).trim();
371
- this.buffer = this.buffer.slice(newline + 1);
372
- if (line.startsWith("{")) {
373
- try {
374
- this.onMessage(JSON.parse(line) as Record<string, unknown>);
375
- } catch {
376
- // Non-JSON noise on stdout is ignored; framing recovers on the next line.
377
- }
378
- }
379
- newline = this.buffer.indexOf("\\n");
380
- }
381
- }
382
-
383
- private onMessage(msg: Record<string, unknown>): void {
384
- const id = msg.id;
385
- if (typeof msg.method === "string") {
386
- // Server-initiated request (e.g. roots/list). This bridge declares no
387
- // client capabilities, so decline rather than leave the server hanging.
388
- if (id !== undefined && id !== null) {
389
- this.send({
390
- jsonrpc: "2.0",
391
- id,
392
- error: { code: -32601, message: "Method not supported by the OK Pi bridge" },
393
- });
394
- }
395
- return;
396
- }
397
- if (typeof id !== "number") return;
398
- const pending = this.pending.get(id);
399
- if (!pending) return;
400
- this.pending.delete(id);
401
- const error = msg.error as { message?: string } | undefined;
402
- if (error) {
403
- pending.reject(new Error(error.message || "Open Knowledge MCP error"));
404
- return;
405
- }
406
- pending.resolve((msg.result ?? {}) as Record<string, unknown>);
407
- }
408
-
409
- private send(msg: Record<string, unknown>): void {
410
- // Buffered stdout can still dispatch onMessage replies after close() ends
411
- // stdin; writing then would raise ERR_STREAM_WRITE_AFTER_END unhandled.
412
- if (!this.alive) return;
413
- this.child.stdin.write(JSON.stringify(msg) + "\\n");
414
- }
415
-
416
- request(
417
- method: string,
418
- params: Record<string, unknown>,
419
- opts: { timeoutMs?: number; signal?: AbortSignal } = {},
420
- ): Promise<Record<string, unknown>> {
421
- if (!this.alive) return Promise.reject(new Error("Open Knowledge MCP server is not running"));
422
- const id = this.nextId++;
423
- return new Promise<Record<string, unknown>>((resolve, reject) => {
424
- let timer: ReturnType<typeof setTimeout> | undefined;
425
- let onAbort: (() => void) | undefined;
426
- const cleanup = () => {
427
- if (timer !== undefined) clearTimeout(timer);
428
- if (onAbort && opts.signal) opts.signal.removeEventListener("abort", onAbort);
429
- this.pending.delete(id);
430
- };
431
- const done: PendingRequest = {
432
- resolve: (value) => {
433
- cleanup();
434
- resolve(value);
435
- },
436
- reject: (err) => {
437
- cleanup();
438
- reject(err);
439
- },
440
- };
441
- this.pending.set(id, done);
442
- if (opts.timeoutMs) {
443
- timer = setTimeout(() => {
444
- done.reject(new Error(method + " timed out after " + opts.timeoutMs + "ms"));
445
- }, opts.timeoutMs);
446
- }
447
- if (opts.signal) {
448
- onAbort = () => {
449
- this.notify("notifications/cancelled", { requestId: id, reason: "aborted" });
450
- done.reject(new Error("Cancelled"));
451
- };
452
- if (opts.signal.aborted) {
453
- onAbort();
454
- return;
455
- }
456
- opts.signal.addEventListener("abort", onAbort, { once: true });
457
- }
458
- this.send({ jsonrpc: "2.0", id, method, params });
459
- });
460
- }
461
-
462
- notify(method: string, params: Record<string, unknown>): void {
463
- if (!this.alive) return;
464
- this.send({ jsonrpc: "2.0", method, params });
465
- }
466
-
467
- close(): void {
468
- this.alive = false;
469
- for (const p of this.pending.values()) {
470
- p.reject(new Error("Open Knowledge MCP client closed"));
471
- }
472
- this.pending.clear();
473
- // ok mcp exits on stdin EOF; the delayed kill is a backstop.
474
- try {
475
- this.child.stdin.end();
476
- } catch {
477
- // Already gone.
478
- }
479
- const child = this.child;
480
- setTimeout(() => {
481
- try {
482
- child.kill();
483
- } catch {
484
- // Already gone.
485
- }
486
- }, 2000).unref();
487
- }
488
- }
489
-
490
- /** JSON Schema pass-through: Pi validates plain JSON Schema parameters. */
491
- function toParameters(inputSchema: Record<string, unknown> | undefined): Record<string, unknown> {
492
- if (!inputSchema || typeof inputSchema !== "object") {
493
- return { type: "object", properties: {} };
494
- }
495
- const schema = { ...inputSchema };
496
- delete schema.$schema;
497
- return schema;
498
- }
499
-
500
- function contentText(content: unknown): string {
501
- if (!Array.isArray(content)) return "";
502
- return (content as McpContentItem[])
503
- .filter((item) => item && item.type === "text" && typeof item.text === "string")
504
- .map((item) => item.text as string)
505
- .join("\\n");
506
- }
507
-
508
- export default function okBridge(pi: {
509
- on(event: string, handler: (event: unknown, ctx: unknown) => unknown): void;
510
- registerTool(definition: Record<string, unknown>): void;
511
- }) {
512
- let client: OkMcpClient | null = null;
513
- let starting: Promise<OkMcpClient> | null = null;
514
- let sessionCwd = process.cwd();
515
- const registeredTools = new Set<string>();
516
-
517
- async function ensureClient(): Promise<OkMcpClient> {
518
- if (client && client.alive) return client;
519
- if (starting) return starting;
520
- starting = (async () => {
521
- const next = new OkMcpClient(sessionCwd, () => {
522
- if (client === next) client = null;
523
- });
524
- try {
525
- await next.request(
526
- "initialize",
527
- {
528
- protocolVersion: "2025-06-18",
529
- capabilities: {},
530
- clientInfo: { name: "pi", version: "1.0.0" },
531
- },
532
- { timeoutMs: INIT_TIMEOUT_MS },
533
- );
534
- } catch (err) {
535
- // A timed-out initialize rejects the request while the child may
536
- // still be running; tear it down so retries don't stack orphans.
537
- next.close();
538
- throw err;
539
- }
540
- next.notify("notifications/initialized", {});
541
- client = next;
542
- return next;
543
- })();
544
- try {
545
- return await starting;
546
- } finally {
547
- starting = null;
548
- }
549
- }
550
-
551
- async function registerOkTools(): Promise<number> {
552
- const mcp = await ensureClient();
553
- const listed = await mcp.request("tools/list", {}, { timeoutMs: INIT_TIMEOUT_MS });
554
- const tools = Array.isArray(listed.tools) ? (listed.tools as McpToolInfo[]) : [];
555
- for (const tool of tools) {
556
- const name = TOOL_PREFIX + tool.name;
557
- if (registeredTools.has(name)) continue;
558
- registeredTools.add(name);
559
- pi.registerTool({
560
- name,
561
- label: "OK " + tool.name,
562
- description: tool.description || "Open Knowledge " + tool.name + " tool.",
563
- parameters: toParameters(tool.inputSchema),
564
- execute: async (
565
- _toolCallId: string,
566
- params: Record<string, unknown>,
567
- signal: AbortSignal | undefined,
568
- ) => {
569
- const live = await ensureClient();
570
- const result = await live.request(
571
- "tools/call",
572
- { name: tool.name, arguments: params ?? {} },
573
- { signal },
574
- );
575
- const text = contentText(result.content);
576
- if (result.isError) {
577
- throw new Error(text || "Open Knowledge tool " + tool.name + " failed");
578
- }
579
- return {
580
- content: [{ type: "text", text }],
581
- details: result.structuredContent,
582
- };
583
- },
584
- });
585
- }
586
- return tools.length;
587
- }
588
-
589
- pi.on("session_start", async (_event, ctx) => {
590
- const cwd = (ctx as { cwd?: string } | undefined)?.cwd;
591
- if (typeof cwd === "string" && cwd.length > 0) sessionCwd = cwd;
592
- try {
593
- await registerOkTools();
594
- } catch (err) {
595
- const ui = (ctx as { ui?: { notify?: (m: string, level: string) => void } } | undefined)?.ui;
596
- try {
597
- ui?.notify?.(
598
- "Open Knowledge tools unavailable: " + (err instanceof Error ? err.message : String(err)),
599
- "warning",
600
- );
601
- } catch {
602
- // Non-interactive mode; the failure will resurface on first tool use.
603
- }
604
- }
605
- });
606
-
607
- pi.on("session_shutdown", async () => {
608
- const pending = starting;
609
- starting = null;
610
- const current = client;
611
- client = null;
612
- current?.close();
613
- // An in-flight ensureClient would otherwise assign a live client after
614
- // shutdown; await it and tear that one down too.
615
- if (pending) {
616
- try {
617
- (await pending).close();
618
- } catch {
619
- // Initialization failed — its catch path already closed the client.
620
- }
621
- }
622
- });
623
- }
624
- `}function Br(e){try{return ke.native(e)}catch{return e}}function Vr(e,t){let n=L(Br(t),Br(e));return n.length>0&&!n.startsWith(`..`)&&!F(n)}const Hr=e=>{try{let t=xe(`git`,[`rev-parse`,`--show-toplevel`],p({cwd:e,encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]})).trim();return t.length>0?t:null}catch{return null}};function Ur(e,t={}){let n=t.homeDir??Me(),r=t.gitTopLevel??Hr,i=Ce(e),a;try{a=ke(i)}catch{a=i}let o=a,s=0;for(;s<30&&!(o===n||o===`/`||o===``);){if(d(o))return{projectRoot:o,defaultContentDir:`.`,ancestorPromoted:o!==a,gitRootPromoted:!1};let e=P(o);if(e===o)break;o=e,s+=1}let c=r(a);return c!==null&&Vr(c,n)?c===a?{projectRoot:i,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!1}:{projectRoot:c,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!0}:{projectRoot:i,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!1}}function Wr(e){let t=e&&typeof e==`object`&&`code`in e?e.code:void 0;return t===`MODULE_NOT_FOUND`||t===`ERR_MODULE_NOT_FOUND`}function Q(e,t){if(!process.env.OK_DEBUG_NATIVE)return;let n=t instanceof Error?t.message:String(t);process.stderr.write(`[ok] native-config ${e}: ${n}\n`)}const Gr=[`native`,`index.js`];function Kr(e={}){let t=e.moduleUrl??import.meta.url,n=e.requireModule??be(t);try{return n(I(P(Te(t)),...Gr))}catch(e){Wr(e)||Q(`bundled loader failed to load`,e)}try{return n(`@inkeep/open-knowledge-native-config`)}catch(e){return Wr(e)||Q(`workspace addon failed to load`,e),null}}function qr(){let e=Kr();return e&&typeof e.resolveSymlinkWritePath==`function`?e:null}function Jr(e){let t=e,n=new Set;for(;;){let r;try{r=Ee(t).isSymbolicLink()}catch(n){return n.code===`ENOENT`?{readPath:t,writePath:t}:{readPath:null,writePath:e}}if(!r)return{readPath:t,writePath:t};if(n.has(t))return{readPath:null,writePath:e};n.add(t);let i;try{i=Oe(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=F(i)?i:I(P(t),i)}}let Yr;function Xr(){return Yr===void 0&&(Yr=qr()),Yr}function Zr(e,t=Xr){let n=t();if(n)try{let t=n.resolveSymlinkWritePath(e);return{readPath:t.readPath??null,writePath:t.writePath}}catch(e){Q(`resolveSymlinkWritePath threw`,e)}return Jr(e)}function Qr(){let e=Kr();return e&&typeof e.parseTomlToJson==`function`?e:null}function $r(e){try{let t=e.parseTomlToJson(`probe = 1`);return typeof t==`string`&&t.includes(`probe`)}catch(e){return Q(`addon loaded but probe failed`,e),!1}}function ei(e){if(!N(e))throw Error(`TOML root is not a table`);return e}function ti(e){return{backend:`native`,parseToObject(t){return ei(JSON.parse(e.parseTomlToJson(t)))},upsertEntry(t,n,r){let i=e.upsertMcpServer(t,n,JSON.stringify(r));return{text:i.text,existed:i.existed}},removeEntry(t,n){let r=e.removeMcpServer(t,n);return{text:r.text,existed:r.existed}}}}function ni(){return{backend:`fallback`,parseToObject(e){return ei(wr(e))}}}function ri(e=Qr){let t=e();return t&&$r(t)?ti(t):ni()}let ii=null;function ai(){return ii===null&&(ii=ri()),ii}const oi={allowTrailingComma:!0,disallowComments:!1};function si(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function ci(e){let t=[],n=m(e,t,oi);return t.some(t=>!si(t,e))||!n||n.type!==`object`?null:n}function li(e,t){let n=0;for(let r of e.children??[]){let e=r.children?.[0];e!==void 0&&g(e)===t&&(n+=1)}return n}function ui(e,t){T(e,`${JSON.stringify(t,null,2)}\n`)}function di(e,t){let n=Pr(t);T(e,n.endsWith(`
625
- `)?n:`${n}\n`)}function fi(e,t){let n=(0,wn.stringify)(t);T(e,n.endsWith(`
626
- `)?n:`${n}\n`)}const pi=10*1024*1024;function mi(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>mi(e,t[n]));if(N(e)&&N(t)){let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>Object.hasOwn(t,n)&&mi(e[n],t[n])):!1}return!1}function hi(e){for(let t of e.split(`
627
- `)){let e=t.trimStart();if(!(e.length===0||e.length===t.length))return t.charCodeAt(0)===9?{insertSpaces:!1,tabSize:1}:{insertSpaces:!0,tabSize:t.length-e.length}}return{insertSpaces:!0,tabSize:2}}function gi(e,t,n){return t===void 0?[e,n]:[e,t,n]}function _i(e,t,n,r){let i={[n]:r};return{[e]:t===void 0?i:{[t]:i}}}function vi(e,t,n){let r=e[t];return n===void 0?r:N(r)?r[n]:void 0}function yi(e,t,n,r,i){if(!z(e))return ui(e,_i(t,i,n,r)),{kind:`written`};let a;try{a=B(e,`utf-8`)}catch(e){return Q(`json config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(a.trim()===``)return ui(e,_i(t,i,n,r)),{kind:`written`};if(Buffer.byteLength(a,`utf-8`)>pi)return{kind:`declined`,reason:`oversize`};let o=ci(a);if(!o)return{kind:`declined`,reason:`unparseable`};if(li(o,t)>1)return{kind:`declined`,reason:`duplicate-container`};let s=vi(g(o),t,i),c=N(s)?s[n]:void 0,l=c!==void 0;if(l&&mi(c,r))return{kind:`overwritten`};let u=a.charCodeAt(0)===65279,d=u?a.slice(1):a,p=d.includes(`\r
628
- `)?`\r
629
- `:`
630
- `,m=f(d,gi(t,i,n),r,{formattingOptions:{...hi(d),eol:p}}),_=`${u?``:``}${h(d,m)}`;return _!==a&&T(e,_,{mode:Wn(e)}),{kind:l?`overwritten`:`written`}}function bi(e,t,n,r,i){let a=``;if(z(t))try{a=B(t,`utf-8`)}catch(e){return Q(`toml config read failed`,e),{kind:`declined`,reason:`unparseable`}}let o=a.trim()===``;if(e.backend===`fallback`)return o?(di(t,{[n]:{[r]:i}}),{kind:`written`}):{kind:`declined`,reason:`no-native-writer`};let s=a.charCodeAt(0)===65279,c=s?a.slice(1):a,l=Un(c),u=o||c.endsWith(`
631
- `),d;try{d=e.upsertEntry(c,r,i)}catch(e){return Q(`upsertEntry failed`,e),{kind:`declined`,reason:`unparseable`}}let f=d.text;u?f.endsWith(`
632
- `)||(f=`${f}\n`):f=f.replace(/\n+$/,``),l&&(f=f.replace(/\r\n/g,`
633
- `).replace(/\n/g,`\r
634
- `));let p=`${s?``:``}${f}`;return p!==a&&T(t,p,{mode:Wn(t)}),{kind:d.existed?`overwritten`:`written`}}function xi(e,t,n,r){let i=``;if(z(e))try{i=B(e,`utf-8`)}catch(e){return Q(`yaml config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(i.trim()===``)return fi(e,{[t]:{[n]:r}}),{kind:`written`};if(Buffer.byteLength(i,`utf-8`)>pi)return{kind:`declined`,reason:`oversize`};let a=i.charCodeAt(0)===65279,o=a?i.slice(1):i,s=(0,wn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,wn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Un(o);o.endsWith(`
635
- `)?u.endsWith(`
636
- `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),d&&(u=u.replace(/\r\n/g,`
637
- `).replace(/\n/g,`\r
638
- `));let f=`${a?``:``}${u}`;return f!==i&&T(e,f,{mode:Wn(e)}),{kind:l?`overwritten`:`written`}}const Si=e=>e!==`project`,Ci=e=>e!==`user`;async function wi(){let e=await $n({message:`Where should the MCP server be configured?
639
- `,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function Ti(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??wi)():`both`}async function Ei(e){return ir({message:`How do you want to handle OpenKnowledge config files (.ok/, .mcp.json, project skills)?`,default:e,choices:[{name:`Share with my team (commit alongside content)`,value:`shared`,description:`OK config gets committed alongside your project content.`},{name:`Local only (keep out of git via .git/info/exclude)`,value:`local-only`,description:"OK config stays on this machine only; teammates do not see it. Safe escape hatch via `ok config-sharing share`."}]})}async function Di(e){if(e.sharing!==void 0)return e.sharing;let t=jn(e.projectRoot)===`local-only`?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??Ei)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Oi(e){if(e===void 0||e===!0)return new Set(oe);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(oe.filter(e=>t.includes(e)))}function ki(e,t,n){let r=Ce(n,e),i;try{i=Ae(r)}catch(e){let t=e.code;throw t===`ENOENT`?new $(`--content-dir path does not exist: ${r}`):new $(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new $(`--content-dir must be a directory: ${r}`);let a=L(Ai(t),Ai(r));if(a.startsWith(`..`)||F(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Ai(e){try{return ke(e)}catch{return e}}const ji=`open-knowledge-ui`;function Mi(e,t,n){try{return z(e.detectPath?.(t,n)??P(e.configPath(t,n)))}catch{return!1}}function Ni(e,t,n,r,i){let a=e.serverName(t),o;try{o=i??e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:a,error:t instanceof Error?t.message:String(t)}}let s=!n.skipAvailabilityCheck||e.offerOnlyWhenDetected===!0;if(!i&&s&&!Mi(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{me(o,t)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),configScope:`project`}}if(e.format===`file`)return Fi(e,o,a,n,{isProjectScope:i!==void 0});let c;try{c=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}try{De(P(o),{recursive:!0})}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}let l={action:`written`},u;try{w(`${o}.lock`,()=>{let t=Zr(o).writePath;if(De(P(t),{recursive:!0}),e.format===`toml`){let n=bi(ai(),t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}if(e.format===`yaml`){let n=xi(t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}let n=yi(t,e.topLevelKey,a,c,e.serverMapSubKey);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason)},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){u=e instanceof Error?e:Error(String(e))}return u?{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:u.message,...i===void 0?{}:{configScope:`project`}}:l.action===`declined`?{editorId:e.id,label:e.label,action:`declined`,configPath:o,serverName:a,declineReason:l.declineReason,...i===void 0?{}:{configScope:`project`}}:{editorId:e.id,label:e.label,action:l.action,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}const Pi={pi:zr};function Fi(e,t,n,r,i){let a=i.isProjectScope?{configScope:`project`}:{},o=r=>({editorId:e.id,label:e.label,action:`failed`,configPath:t,serverName:n,error:r instanceof Error?r.message:String(r),...a}),s=Pi[e.id];if(!s)return o(Error(`No managed-file builder registered for editor "${e.id}" (format: 'file' targets need a MANAGED_FILE_BUILDERS entry).`));let c;try{c=s(r)}catch(e){return o(e)}try{De(P(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{w(`${t}.lock`,()=>{let e=null;try{e=B(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}T(t,c,e===null?void 0:{mode:Wn(t)}),l.action=e===null?`written`:`overwritten`},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){return o(e)}return{editorId:e.id,label:e.label,action:l.action,configPath:t,serverName:n,...a}}function Ii(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!z(n)))return{editorId:e.id,label:e.label,path:n}}async function Li(e){let t=le(e.editors).filter(e=>e.scope===`global`),n={mode:`published`,skipAvailabilityCheck:!0};return t.map(t=>Ni(t,``,n,e.home))}function Ri(e,t,n,r){let i=Bi(e,t,n,r);return i.kind===`present`?i.entry:null}function zi(e,t,n,r){let i=vi(e,t,r);if(!N(i))return{kind:`no-entry`};let a=i[n];return N(a)?{kind:`present`,entry:a}:{kind:`no-entry`}}function Bi(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!z(i))return{kind:`absent`};try{if(Ae(i).size>pi)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=B(i,`utf-8`)}catch{return{kind:`decline`,reason:`unparseable`}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:Rr(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ai().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return zi(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,wn.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:zi(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=ci(a);return s?li(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:zi(g(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Vi(e={}){let t=Ce(e.cwd??process.cwd()),n=Ur(t,{homeDir:e.home}),r=n.projectRoot,i=!z(I(r,`.ok`)),a=n.gitRootPromoted?L(r,t):void 0,o=e.contentDir===void 0?n.defaultContentDir:ki(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${j(`[ok] Content scope promoted to the git repo root: ${r}`)}\n Ran in ${a}/, but .ok/ lives at the git root (one .ok/ per git repo),\n so the whole repo is now the content scope. To narrow it, re-run with\n \`ok init --content-dir .\`, or set content.dir: ${a} in .ok/config.yml.\n`);let s={mode:e.devMcp?`dev`:`published`},l=await ie(r),u;try{u=S(r,{contentDir:o})}catch(t){let i=D.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:l.didInit,rootGitignoreCreated:!1,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDirRequested:e.contentDir,contentScaffoldFailed:!0,mcpAction:`failed`,mcpPath:i,mcpError:`Content scaffolding failed: ${t instanceof Error?t.message:String(t)}`,sharing:{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:!1}}}let d=u.created.includes(ve),f=!1;if(l.didInit)try{f=_(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{ee(r)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore entry at ${r}: ${e instanceof Error?e.message:String(e)}`)}let p=await y(r);p.kind===`untracked`&&console.warn(`[ok] Untracked the OpenKnowledge project skill (${p.dirs.join(`, `)}) — it is now local-only. Teammates will see this as a deletion on their next pull.`);let m=await Ti({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),h=e.editors??qi(r,e.home),g=e.editors??ce.filter(e=>D[e].projectConfigPath!==void 0||D[e].projectSkillPath!==void 0),b=le(h),C=le(g),w=e.mcp===!1||m===null,T=Array.from(new Map([...b,...w?[]:C].map(e=>[e.id,e])).values()),se=b.filter(t=>Mi(t,r,e.home)),E=[],ue=[],fe=new Set;for(let t of T){if(w){let n=``;try{n=t.configPath(r,e.home)}catch{}E.push({editorId:t.id,label:t.label,action:`skipped-flag`,configPath:n,serverName:t.serverName(r)});continue}if(Si(m)&&b.includes(t)&&t.scope===`global`&&E.push(Ni(t,r,s,e.home)),Ci(m)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=Ni(t,r,s,e.home,n);E.push(i),(i.action===`written`||i.action===`overwritten`)&&fe.add(n)}}let pe=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||pe.has(n)||(pe.add(n),ue.push(de(t,r,{home:e.home})))}let me=ue.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(me.length>0){let t=e.home??Me();ne({source:c,skills:[v.project],agents:me,scope:r},{home:t,enabled:x(t).enabled})}let he=!w&&m!==null&&Ci(m)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,ge=w?[]:se.map(e=>Ii(e,r)).filter(e=>e!==void 0).filter(e=>!fe.has(e.path)),O=e.installUserSkill??te,k=e.home??Me(),A=Oi(e.skills),_e=!1,M=!1,N=!1,ye=!1,be=!1;for(let t of oe){if(!A.has(t))continue;await ae(k,v[t],!0).catch(()=>{}),_e=!0;let n=await O({home:e.home,bundleId:t,force:!0});n===`installed`?M=!0:n===`failed`?N=!0:n===`no-hosts`?be=!0:ye=!0}let xe=N?`failed`:M?`installed`:_e&&ye?`skip-current`:_e&&be?`no-hosts`:`declined`,Se=M?re(k).map(e=>e.editorId):[],P=w?`skipped-flag`:`skipped-missing`,F=E.find(e=>e.editorId===`claude`)??E[0]??{action:P,configPath:D.claude.configPath(r,e.home)},we=await Hi({projectRoot:r,desiredMode:await Di({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:u.created,contentUpdated:u.updated,contentSkipped:u.skipped,editors:E,projectSkills:ue,legacyProjectConfigs:ge,skillInstall:xe,skillHosts:Se,didGitInit:l.didInit,rootGitignoreCreated:f,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:d?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:F.action,mcpPath:F.configPath,mcpError:`error`in F?F.error:void 0,projectScopeUnsupportedLabels:he,sharing:we}}async function Hi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=jn(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=On(t);if(n===`local-only`){let e=kn(t,a);if(e.kind===`refused-tracked`){let t=e;return{kind:`refused-tracked`,tracked:t.tracked,remediation:t.remediation}}return e.kind===`no-exclude`?{kind:`no-exclude`,reason:e.reason,localOnlyRequested:r===`local-only`}:Ui(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=An(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:Ui(t,o,`remove`)}function Ui(e,t,n){let r=jn(e);return n===`add`?{kind:`applied`,mode:r,action:t.appended.length>0?`added`:`noop`,appended:t.appended,alreadyPresent:t.alreadyPresent,removed:[]}:{kind:`applied`,mode:r,action:`removed`,appended:[],alreadyPresent:[],removed:t.removed}}function Wi(e){switch(e){case`oversize`:return`config too large to edit safely`;case`duplicate-container`:return`duplicate server block`;case`no-native-writer`:return`no format-preserving writer available`;default:return`config not readable`}}function Gi(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`);e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`),e.rootGitignoreCreated&&n.push(`Seeded .gitignore at ${t}/.gitignore (.DS_Store)`);let s=I(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(M(`Content scaffolded at ${s}/`)),e.contentCreated.length>0&&n.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&n.push(` Updated: ${e.contentUpdated.join(`, `)}`)):n.push(M(`Content already present at ${s}/`)),e.contentSkipped.length>0&&n.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),n.push(``),e.mcpError&&e.editors.length===0)n.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)if(n.push(M(`MCP server configuration:`)),e.mcpAction===`skipped-flag`)n.push(` MCP config not written — use without --no-mcp to configure editors`);else if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}else n.push(` No supported editor config directories detected; skipped MCP registration`);else if(a)n.push(`MCP config not written — use without --no-mcp to configure editors`);else if(o)n.push(M(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(M(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?L(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===`open-knowledge`?``:` (${r.serverName})`,a=r.configScope===`project`?` (project)`:``,o=`${r.label}${a}`,s=` `.repeat(Math.max(1,20-o.length)),c=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${o}${s}${e} ${A(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${A(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${_e(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${Wi(r.declineReason)})`);break;case`skipped-flag`:break;default:r.action}}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}}if(e.projectSkills.length>0){n.push(``),n.push(M(`Project-local skills:`));for(let r of e.projectSkills){let e=`${r.label} (project)`,i=` `.repeat(Math.max(1,20-e.length)),a=r.path?L(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${A(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${A(`updated`)}`);break;case`skipped-unsupported`:n.push(` ${e}${i}no known project skill surface; skipped`);break;case`skipped-prerequisite`:n.push(` ${e}${i}OpenKnowledge MCP is not configured; skipped`);break;case`failed`:n.push(` ${e}${i}${a} ${_e(`FAILED`)}: ${r.error}`);break}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${L(t,r.path)}`);n.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(n.push(``),n.push(M(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>pe[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${A(`installed for ${r}`)}`),n.push(` ${k(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${k(`Opt out: DO_NOT_TRACK=1, or Settings → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${A(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${k(`skipped for this run (--no-skills)`)}`),n.push(` ${k(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${k(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${k(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${k(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${j(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${j(` ok repair-skills`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(j(`⚠ --content-dir ${e.contentDirRequested} ignored — .ok/config.yml already exists`)),n.push(` Edit .ok/config.yml → content.dir directly to change the content scope.`)):e.contentDir!==void 0&&e.contentDir!==`.`?(n.push(``),n.push(`Content scope set to ${e.contentDir}/ (content.dir in .ok/config.yml).`)):e.gitRootPromoted&&e.contentDir===`.`&&e.contentDirRequested===void 0&&(n.push(``),n.push(j(`⚠ Content scope promoted to the git repo root`)),n.push(` .ok/ was initialized at ${t} because it contains a .git folder (one .ok/ per git repo),`),n.push(` not the sub-folder you ran \`ok init\` in${e.promotedFromDir?` (${e.promotedFromDir})`:``}. The whole repo is now the content scope.`),e.promotedFromDir&&(n.push(" To scope to just that sub-folder, re-run `ok init --content-dir .` from there, or set"),n.push(` content.dir: ${e.promotedFromDir} in .ok/config.yml.`))),e.preview?(n.push(``),n.push(ye(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...Xi(e.sharing,t)),r){let t=new Set,r=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);n.push(``),n.push(`${A(`✓`)} ${M(`Next steps:`)}`),n.push(` 1. Open your editor (${O(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${O(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${O(`ok seed`)} — scaffold an empty repo`),n.push(` 4. Ask your agent to capture a source, research a topic, or build a wiki —`),n.push(` the procedures ship as skills alongside the MCP tools.`)}return n.join(`
640
- `)}function Ki(e,t){return{projectRoot:e.projectRoot,gitRootPromoted:e.gitRootPromoted,promotedFromDir:e.promotedFromDir??null,contentDir:t.contentDir,contentDirRequested:e.contentDirRequested??null,contentDirApplied:e.contentDir!==void 0,contentFileCount:t.contentFileCount,previewError:e.previewWarning??null,didGitInit:e.didGitInit,mcpAction:e.mcpAction,editors:e.editors.map(e=>({editorId:e.editorId,label:e.label,action:e.action,configPath:e.configPath,scope:e.configScope===`project`?`project`:`user`}))}}function qi(e,t){let n=[];for(let r of ce)Mi(D[r],e,t)&&n.push(r);return n}function Ji(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Pe(e)).join(` `)}\n`)};return console.log=t,console.info=t,console.debug=t,()=>{console.log=e.log,console.info=e.info,console.debug=e.debug}}function Yi(){return new ge(`init`).description(`Scaffold .ok/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the .ok/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).option(`--content-dir <dir>`,`Limit content to <dir> instead of the whole project. <dir> is interpreted relative to your current directory (e.g. "." = the folder you run the command in), then saved to .ok/config.yml as content.dir.`).option(`--json`,`Emit a structured JSON summary to stdout (diagnostics stay on stderr)`).option(`--skills <ids>`,`Install only the named user-global skill bundles (comma list: discovery,write-skill)`).option(`--no-skills`,`Do not install any user-global skill bundles`).addOption(new se(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new se(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new se(`--local-only`,`Keep OK config out of git via .git/info/exclude (per-clone, not committed)`).conflicts(`shared`)).action(async e=>{let t=process.cwd(),n=e.shared?`shared`:e.localOnly?`local-only`:void 0,r=e.json?Ji():null;try{let r;try{r=await Vi({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,sharing:n,contentDir:e.contentDir,skills:e.skills})}catch(e){if(e instanceof $){process.stderr.write(`${e.message}\n`),process.exitCode=64;return}if(e instanceof l||e instanceof b){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof C){process.stderr.write(`open-knowledge could not initialize a git repo for this project. Re-run, or run 'git init' yourself in the project folder.
641
- `),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-BcwbnY_K.mjs`),{resolveContentDir:s}=await import(`./src-h5dDPK2z.mjs`),c;try{c=o(r.projectRoot).config,i=c.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(c)try{let{previewContent:e}=await import(`./preview-MV-qHfzy.mjs`),t=s(c,r.projectRoot);r.preview=e({projectDir:r.projectRoot,contentDir:t}),a=r.preview.totalCount}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}e.json?process.stdout.write(`${JSON.stringify(Ki(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Gi(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function Xi(e,t){let n=[];switch(e.kind){case`applied`:return n.push(M(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${A(`local-only`)} — appended ${e.appended.length} path(s) to ${M(`${t}/.git/info/exclude`)} (per-clone, not committed).`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${A(`local-only`)} — already excluded; nothing to do.`):n.push(` ${A(`local-only`)}`):e.action===`removed`?n.push(` ${A(`shared`)} — removed OK paths from ${M(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${A(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(j(`Sharing mode: switch to local-only deferred`));for(let t of e.remediation.split(`
642
- `))n.push(t.length>0?` ${t}`:``);return n.push(` Re-run ${O(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(j(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${O(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${O(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(j(`Sharing mode unavailable: ${e.reason}.`));return n}}export{Mn as A,vt as B,ir as C,Gn as D,Un as E,An as F,W as H,Pn as I,Cn as L,Fn as M,jn as N,kn as O,Nn as P,dn as R,Lr as S,Wn as T,Ge as U,_t as V,gi as _,Ki as a,ai as b,Gi as c,Ri as d,Oi as f,Vi as g,Di as h,Hi as i,On as j,In as k,Xi as l,ki as m,ji as n,Bi as o,Ti as p,Pi as r,qi as s,$ as t,Yi as u,Ni as v,$n as w,Ur as x,Li as y,xt as z};
643
- //# sourceMappingURL=init-ZOWQ1Th4.mjs.map