@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
@@ -0,0 +1,638 @@
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{Go as i,K as a,U as o,os as s,wo as c}from"./src-TKCctdpc.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-Dt5dAyFQ.mjs";import{M as w,P as T}from"./fs-traced-DVpoNaQJ.mjs";import{_ as se,a as ce,b as E,c as le,d as ue,i as de,l as fe,o as D,r as pe,t as me,u as he,v as ge}from"./write-project-skill-DOogyZge.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-C3InsrBS.mjs";import{t as N}from"./is-object-ByG7RnjH.mjs";import{t as ye}from"./preview-Dnob-x-p.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 W={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 it(e){return typeof e==`function`}function G(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=it(e)?e():e;return t.set(r),[r,n]})}function at(e,t){nt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&W.queue(e),n.set(t)})}function ot(){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 st={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:`╱`},ct={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:`⅒`},lt={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`},ut={...st,...ct},dt={...st,...lt},K=ot()?ut:dt;Object.entries(ct);const ft={prefix:{idle:V(`blue`,`?`),done:V(`green`,K.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 pt(){return{...ft,keybindings:Be()}}function mt(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 ht(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=mt(n)&&mt(r)?ht(n,r):r}return t}function gt(...e){return ht(pt(),...e.filter(e=>e!=null))}function _t({status:e=`idle`,theme:t}){let[n,r]=G(!1),[i,a]=G(0),{prefix:o,spinner:s}=gt(t);return at(()=>{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 vt(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 yt(e){return G({current:e})[0]}function bt(e){let t=yt(e);t.current=e,at(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 xt=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 St=(()=>{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}})(),Ct=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,wt=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,Tt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Et=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Dt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Ot=/\t{1,1000}/y,kt=/[\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,At=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,jt=/\p{M}+/gu,Mt={limit:1/0,ellipsis:``},Nt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Nt(i,Mt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[At,l],[Tt,0],[Et,o],[Ot,s],[kt,c],[Dt,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(jt,``)){let t=e.codePointAt(0)||0;if(S=Ct(t)?2:wt(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===Dt?St(e.slice(p,n.lastIndex)):n===kt?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}},Pt={limit:1/0,ellipsis:``,ellipsisWidth:0},q=(e,t={})=>Nt(e,Pt,t).width,Ft=`]8;;`,It=RegExp(`(?:\\[(?<code>\\d+)m|\\${Ft}(?<uri>.*))`,`y`),Lt=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},Rt=e=>`[${e}m`,zt=e=>`${Ft}${e}`,Bt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:q(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=q(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(Ft,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())},Vt=e=>{let t=e.split(` `),n=t.length;for(;n&&!q(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ht=(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=q(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=q(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(``),Bt(s,r,t),c=q(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Bt(s,r,t),c=q(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Bt(s,r,t),c=q(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Vt(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===`›`){It.lastIndex=e+1;let t=It.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+=zt(``));let e=i?Lt(i):void 0;i&&e&&(r+=Rt(e))}else t===`
4
+ `&&(i&&Lt(i)&&(r+=Rt(i)),a&&(r+=zt(a)))}return r},Ut=/\r?\n/;function Wt(e,t,n){return String(e).normalize().split(Ut).map(e=>Ht(e,t,n)).join(`
5
+ `)}function Gt(e,t){return e.split(`
6
+ `).flatMap(e=>Wt(e,t,{trim:!1,wordWrap:!1}).split(`
7
+ `).map(e=>e.trimEnd())).join(`
8
+ `)}function Kt(){return(0,xt.default)({defaultWidth:80,output:et().output})}function qt({active:e,renderedItems:t,pageSize:n,loop:r}){let i=yt({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 Jt({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=Kt(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:Gt(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=qt({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 Yt=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 J=[];J.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&J.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&J.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Xt=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`,Zt=Symbol.for(`signal-exit emitter`),Qt=globalThis,$t=Object.defineProperty.bind(Object);var en=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Qt[Zt])return Qt[Zt];$t(Qt,Zt,{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}},tn=class{};const nn=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var rn=class extends tn{onExit(){return()=>{}}load(){}unload(){}},an=class extends tn{#e=on.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new en;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of J)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(!Xt(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 J)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,J.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 Xt(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`&&Xt(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 on=globalThis.process,{onExit:sn,load:cn,unload:ln}=nn(Xt(on)?new an(on):new rn),un=`\x1B[?25l`,dn=(e=1)=>e>0?`[${e}A`:``,fn=(e=1)=>e>0?`[${e}B`:``,pn=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,mn=`\x1B[2K`,hn=e=>e>0?(mn+dn(1)).repeat(e-1)+mn+`\x1B[G`:``,gn=e=>e.split(`
11
+ `).length,_n=e=>e.split(`
12
+ `).pop()??``;var vn=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(_n(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=Kt();e=Gt(e,i),t=Gt(t,i),n.length%i===0&&(e+=`
13
+ `);let a=e+(t?`
14
+ `+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?gn(t):0);o>0&&(a+=dn(o)),a+=pn(this.cursorPos.cols),this.write(fn(this.extraLinesUnderPrompt)+hn(this.height)+a),this.extraLinesUnderPrompt=o,this.height=gn(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(pn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=fn(this.extraLinesUnderPrompt);t+=e?hn(this.height):`
15
+ `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},yn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const bn=globalThis.setImmediate;function xn(){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 Sn(e){let t=xn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Yt.default;s.pipe(r.output??process.stdout);let c=Ne.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new vn(c),{promise:u,resolve:d,reject:f}=yn.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(sn((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(()=>W.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),W.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?bn(h):h(),Object.assign(u.then(e=>(W.clearAll(),e),e=>{throw W.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var Y=class{separator=V(`dim`,Array.from({length:15}).join(K.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},Cn=r();const wn=`**/.ok/*`,Tn=`!**/${s}/`;function En(e){let t=[`.ok/`,`.okignore`];for(let n of de){let r=D[n];r.projectConfigPath&&t.push(Rn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=I(e,...o);if(z(n))try{let e=a(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=i[e];r&&t.push(`${r}/${n}/`)}}}catch{}return Array.from(new Set(t))}function Dn(e,t){let n=Mn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Nn(n)};let r=Pn(e);if(r.kind!==`ok`)return r.result;let i=z(r.path)?B(r.path,`utf-8`):``,a=Ln(i),o=[],s=[];for(let e of t)In(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 On(e,t){let n=Pn(e);if(n.kind!==`ok`)return n.result;if(!z(n.path))return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let r=t.map(e=>Fn(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(wn),i.add(Tn);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 Fn(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 kn(e){let t=Pn(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=Ln(n),i=En(e);for(let e of i)if(In(r,e))return`local-only`;return r.has(wn)?`local-only`:`shared`}function An(e){let t=Pn(e);if(t.kind!==`ok`||!z(t.path))return[];let n;try{n=B(t.path,`utf-8`)}catch{return[]}let r=Ln(n);return En(e).filter(e=>In(r,e))}function jn(e){let t=Pn(e);if(t.kind!==`ok`||!z(t.path))return!1;let n;try{n=B(t.path,`utf-8`)}catch{return!1}let r=Ln(n);return r.has(wn)&&r.has(Tn)}function Mn(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 Nn(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(`
21
+ `)}function Pn(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 Fn(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function In(e,t){for(let n of Fn(t))if(e.has(n))return!0;return!1}function Ln(e){let t=new Set;for(let n of e.split(`
22
+ `)){let e=n.trim();e.length!==0&&t.add(e)}return t}function Rn(e,t){return zn(L(t,e))}function zn(e){return we===`/`?e:e.split(we).join(`/`)}function Bn(e){for(let t of e.split(`
23
+ `)){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 Vn(e){let t=(e.match(/\r\n/g)??[]).length;return t===0?!1:t>=(e.match(/\n/g)??[]).length-t}function Hn(e){try{return Ae(e).mode&511}catch{return}}function Un(e,t){let n=e.charCodeAt(0)===65279,r=n?e.slice(1):e,i=r.includes(`\r
24
+ `)?`\r
25
+ `:`
26
+ `,a=f(r,t,void 0,{formattingOptions:{...Bn(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 Wn={icon:{checked:V(`green`,K.circleFilled),unchecked:K.circle,cursor:K.pointer,disabledChecked:V(`green`,K.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 Gn(e){return!Y.isSeparator(e)&&!e.disabled}function Kn(e){return!Y.isSeparator(e)}function qn(e){return!Y.isSeparator(e)&&e.checked}function Jn(e){return Gn(e)?{...e,checked:!e.checked}:e}function Yn(e){return function(t){return Gn(t)?{...t,checked:e}:t}}function Xn(e){return e.map(e=>{if(Y.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 Zn=Sn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=gt(Wn,e.theme),{keybindings:c}=s,[l,u]=G(`idle`),d=_t({status:l,theme:s}),[f,p]=G(Xn(e.choices)),m=vt(()=>{let e=f.findIndex(Kn),t=f.findLastIndex(Kn);if(e===-1)throw new Xe(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=G(m.first),[_,v]=G();bt(async e=>{if(Ge(e)){let e=f.filter(qn),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(!Kn(f[n]));g(n)}}else if(He(e)){let e=f[h];e&&!Y.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?Jn(e):e))))}else if(e.name===o.all){let e=f.some(e=>Gn(e)&&!e.checked);p(f.map(Yn(e)))}else if(e.name===o.invert)p(f.map(Jn));else if(We(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>Y.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&Gn(i)&&(g(r),p(f.map((e,t)=>t===r?Jn(e):e)))}});let y=s.style.message(e.message,l),b,x=Jt({items:f,active:h,renderItem({item:e,isActive:t}){if(Y.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(qn);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(`
27
+ `).trimEnd()}${un}`});const Qn={icon:{cursor:K.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 $n(e){return!Y.isSeparator(e)&&!e.disabled}function er(e){return!Y.isSeparator(e)}function tr(e){return e.map(e=>{if(Y.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 nr=Sn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=gt(Qn,e.theme),{keybindings:a}=i,[o,s]=G(`idle`),c=_t({status:o,theme:i}),l=yt(),u=!a.includes(`vim`),d=vt(()=>tr(e.choices),[e.choices]),f=vt(()=>{let e=d.findIndex(er),t=d.findLastIndex(er);if(e===-1)throw new Xe(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=vt(()=>`default`in e?d.findIndex(t=>$n(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=G(p===-1?f.first:p),g=d[m];if(g==null||Y.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=G();bt((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(!er(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=>Y.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&$n(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=>Y.isSeparator(t)||!$n(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),at(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Jt({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(Y.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(`
28
+ `).trimEnd()}${un}`});
29
+ /*!
30
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
31
+ * SPDX-License-Identifier: BSD-3-Clause
32
+ *
33
+ * Redistribution and use in source and binary forms, with or without
34
+ * modification, are permitted provided that the following conditions are met:
35
+ *
36
+ * 1. Redistributions of source code must retain the above copyright notice, this
37
+ * list of conditions and the following disclaimer.
38
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
39
+ * this list of conditions and the following disclaimer in the
40
+ * documentation and/or other materials provided with the distribution.
41
+ * 3. Neither the name of the copyright holder nor the names of its contributors
42
+ * may be used to endorse or promote products derived from this software without
43
+ * specific prior written permission.
44
+ *
45
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
46
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
48
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
49
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
51
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
52
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55
+ */
56
+ let rr=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var ir=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(rr);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}};
57
+ /*!
58
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
59
+ * SPDX-License-Identifier: BSD-3-Clause
60
+ *
61
+ * Redistribution and use in source and binary forms, with or without
62
+ * modification, are permitted provided that the following conditions are met:
63
+ *
64
+ * 1. Redistributions of source code must retain the above copyright notice, this
65
+ * list of conditions and the following disclaimer.
66
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
67
+ * this list of conditions and the following disclaimer in the
68
+ * documentation and/or other materials provided with the distribution.
69
+ * 3. Neither the name of the copyright holder nor the names of its contributors
70
+ * may be used to endorse or promote products derived from this software without
71
+ * specific prior written permission.
72
+ *
73
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
74
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
75
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
76
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
77
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
78
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
79
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
80
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
81
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
82
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
+ */
84
+ function ar(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function or(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+=`
85
+ `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
86
+ `))}return i}var X=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=ar(t.toml,t.ptr),i=or(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
87
+ /*!
88
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
89
+ * SPDX-License-Identifier: BSD-3-Clause
90
+ *
91
+ * Redistribution and use in source and binary forms, with or without
92
+ * modification, are permitted provided that the following conditions are met:
93
+ *
94
+ * 1. Redistributions of source code must retain the above copyright notice, this
95
+ * list of conditions and the following disclaimer.
96
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
97
+ * this list of conditions and the following disclaimer in the
98
+ * documentation and/or other materials provided with the distribution.
99
+ * 3. Neither the name of the copyright holder nor the names of its contributors
100
+ * may be used to endorse or promote products derived from this software without
101
+ * specific prior written permission.
102
+ *
103
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
104
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
105
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
106
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
107
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
108
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
109
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
110
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
111
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
112
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
113
+ */
114
+ let sr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,cr=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,lr=/^[+-]?0[0-9_]/;function ur(e,t){let n=e[t++],r=n,i=n===`'`,a=n===e[t]&&n===e[t+1];a&&(e[t+=2]===`
115
+ `?t++:e[t]===`\r`&&e[t+1]===`
116
+ `&&(t+=2));let o=``,s=t,c=0;for(let l=t;l<e.length;l++)if(n=e[l],a&&(n===`
117
+ `||n===`\r`&&e[l+1]===`
118
+ `))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+=`
119
+ `;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 dr(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=sr.test(e);if(i||cr.test(e)){if(lr.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 ir(e);if(!a.isValid())throw new X(`invalid value`,{toml:t,ptr:n});return a}
120
+ /*!
121
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
122
+ * SPDX-License-Identifier: BSD-3-Clause
123
+ *
124
+ * Redistribution and use in source and binary forms, with or without
125
+ * modification, are permitted provided that the following conditions are met:
126
+ *
127
+ * 1. Redistributions of source code must retain the above copyright notice, this
128
+ * list of conditions and the following disclaimer.
129
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
130
+ * this list of conditions and the following disclaimer in the
131
+ * documentation and/or other materials provided with the distribution.
132
+ * 3. Neither the name of the copyright holder nor the names of its contributors
133
+ * may be used to endorse or promote products derived from this software without
134
+ * specific prior written permission.
135
+ *
136
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
137
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
138
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
139
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
140
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
141
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
142
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
143
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
144
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
145
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
+ */
147
+ function fr(e,t=0,n=e.length){let r=e.indexOf(`
148
+ `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function pr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
149
+ `)return n;if(r===`\r`&&e[n+1]===`
150
+ `)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===`
151
+ `||i===`\r`&&e[t+1]===`
152
+ `);)t++;if(r||i!==`#`)break;t=pr(e,t)}return t}function mr(e,t,n,r,i=!1){if(!r)return t=fr(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=fr(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
153
+ `||t===`\r`&&e[a+1]===`
154
+ `))return a}throw new X(`cannot find end of structure`,{toml:e,ptr:t})}
155
+ /*!
156
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
157
+ * SPDX-License-Identifier: BSD-3-Clause
158
+ *
159
+ * Redistribution and use in source and binary forms, with or without
160
+ * modification, are permitted provided that the following conditions are met:
161
+ *
162
+ * 1. Redistributions of source code must retain the above copyright notice, this
163
+ * list of conditions and the following disclaimer.
164
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
165
+ * this list of conditions and the following disclaimer in the
166
+ * documentation and/or other materials provided with the distribution.
167
+ * 3. Neither the name of the copyright holder nor the names of its contributors
168
+ * may be used to endorse or promote products derived from this software without
169
+ * specific prior written permission.
170
+ *
171
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
172
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
173
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
174
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
175
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
176
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
177
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
178
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
179
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
180
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
181
+ */
182
+ function hr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(pr(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function gr(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===`[`?br(e,t,r,i):yr(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]=ur(e,t);if(n){if(i=Z(e,i),e[i]&&e[i]!==`,`&&e[i]!==n&&e[i]!==`
183
+ `&&e[i]!==`\r`)throw new X(`unexpected character encountered`,{toml:e,ptr:i});e[i]===`,`&&i++}return[r,i]}let o=mr(e,t,`,`,n),s=hr(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++),[dr(s[0],e,t,i),o]}
184
+ /*!
185
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
186
+ * SPDX-License-Identifier: BSD-3-Clause
187
+ *
188
+ * Redistribution and use in source and binary forms, with or without
189
+ * modification, are permitted provided that the following conditions are met:
190
+ *
191
+ * 1. Redistributions of source code must retain the above copyright notice, this
192
+ * list of conditions and the following disclaimer.
193
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
194
+ * this list of conditions and the following disclaimer in the
195
+ * documentation and/or other materials provided with the distribution.
196
+ * 3. Neither the name of the copyright holder nor the names of its contributors
197
+ * may be used to endorse or promote products derived from this software without
198
+ * specific prior written permission.
199
+ *
200
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
201
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
202
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
203
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
204
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
205
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
206
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
207
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
208
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
209
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
210
+ */
211
+ let _r=/^[a-zA-Z0-9-_]+[ \t]*$/;function vr(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]=ur(e,t);r=e.indexOf(`.`,c);let l=e.slice(c,r<0||r>a?a:r),u=fr(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(!_r.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 yr(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=pr(e,t);else if(o!==` `&&o!==` `&&o!==`
212
+ `&&o!==`\r`){let o,s=i,c=!1,[l,u]=vr(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]=gr(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 br(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=pr(e,t);else if(a!==` `&&a!==` `&&a!==`
213
+ `&&a!==`\r`){let a=gr(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]}
214
+ /*!
215
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
216
+ * SPDX-License-Identifier: BSD-3-Clause
217
+ *
218
+ * Redistribution and use in source and binary forms, with or without
219
+ * modification, are permitted provided that the following conditions are met:
220
+ *
221
+ * 1. Redistributions of source code must retain the above copyright notice, this
222
+ * list of conditions and the following disclaimer.
223
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
224
+ * this list of conditions and the following disclaimer in the
225
+ * documentation and/or other materials provided with the distribution.
226
+ * 3. Neither the name of the copyright holder nor the names of its contributors
227
+ * may be used to endorse or promote products derived from this software without
228
+ * specific prior written permission.
229
+ *
230
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
231
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
232
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
233
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
234
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
235
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
236
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
237
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
238
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
239
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
240
+ */
241
+ function xr(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 Sr(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=vr(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=xr(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=vr(e,s),i=xr(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=gr(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]!==`
242
+ `&&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}
243
+ /*!
244
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
245
+ * SPDX-License-Identifier: BSD-3-Clause
246
+ *
247
+ * Redistribution and use in source and binary forms, with or without
248
+ * modification, are permitted provided that the following conditions are met:
249
+ *
250
+ * 1. Redistributions of source code must retain the above copyright notice, this
251
+ * list of conditions and the following disclaimer.
252
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
253
+ * this list of conditions and the following disclaimer in the
254
+ * documentation and/or other materials provided with the distribution.
255
+ * 3. Neither the name of the copyright holder nor the names of its contributors
256
+ * may be used to endorse or promote products derived from this software without
257
+ * specific prior written permission.
258
+ *
259
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
260
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
261
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
262
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
263
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
264
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
265
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
266
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
267
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
268
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
269
+ */
270
+ let Cr=/^[a-z0-9-_]+$/i;function wr(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function Tr(e){for(let t=0;t<e.length;t++)if(wr(e[t])!==`object`)return!1;return e.length!=0}function Er(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function Dr(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 Er(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Or(e,n,r);if(t===`array`)return kr(e,n,r)}function Or(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+=Cr.test(o)?o:Er(o),i+=` = `,i+=Dr(e[o],wr(e[o]),t-1,n)}return i+` }`}function kr(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+=Dr(e[i],wr(e[i]),t-1,n)}return r+` ]`}function Ar(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&&`
271
+ `}[[${t}]]\n`,i+=jr(0,e[a],t,n,r);return i}function jr(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=wr(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Cr.test(c)?c:Er(c);if(e===`array`&&Tr(t[c]))o+=(o&&`
272
+ `)+Ar(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
273
+ `)+jr(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Dr(t[c],e,r,i),a+=`
274
+ `}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Mr(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(wr(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=jr(0,e,``,t,n);return r[r.length-1]===`
275
+ `?r:r+`
276
+ `}const Nr=`${le}-dev`;function Pr(e){return e.startsWith(le)}function Fr(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`&&Pr(n)}function Ir(e){return{command:he,args:[e]}}function Lr(e={}){let t=e.mode===`dev`?Nr:fe,n={unix:ue({...e,platformName:`darwin`}),win32:ue({...e,platformName:`win32`})};return`${t}
277
+ /**
278
+ * Open Knowledge bridge for Pi — MANAGED FILE, written by \`ok init\`.
279
+ * Hand edits are overwritten whenever OK re-syncs this project; remove it
280
+ * with \`ok deinit\` (or delete the file) to disconnect Pi from OK.
281
+ *
282
+ * On session start it spawns Open Knowledge's MCP stdio server via OK's
283
+ * resilient launcher (bundle, then npx, then version-manager probes), performs
284
+ * the MCP handshake, and registers each MCP tool as a Pi tool under an
285
+ * \`ok_\` prefix (Pi has no MCP namespacing; the prefix keeps OK's \`edit\` /
286
+ * \`write\` from shadowing Pi's built-in tools).
287
+ */
288
+ import { spawn } from "node:child_process";
289
+ import type { ChildProcessWithoutNullStreams } from "node:child_process";
290
+
291
+ const LAUNCHERS = ${JSON.stringify(n,null,2)} as const;
292
+
293
+ const TOOL_PREFIX = "ok_";
294
+ // First contact may cold-install the CLI through npx — allow a generous window.
295
+ const INIT_TIMEOUT_MS = 120000;
296
+ const STDERR_TAIL_LIMIT = 2000;
297
+
298
+ interface McpContentItem {
299
+ type: string;
300
+ text?: string;
301
+ }
302
+
303
+ interface McpToolInfo {
304
+ name: string;
305
+ description?: string;
306
+ inputSchema?: Record<string, unknown>;
307
+ }
308
+
309
+ interface PendingRequest {
310
+ resolve: (value: Record<string, unknown>) => void;
311
+ reject: (err: Error) => void;
312
+ }
313
+
314
+ class OkMcpClient {
315
+ private child: ChildProcessWithoutNullStreams;
316
+ private pending = new Map<number, PendingRequest>();
317
+ private nextId = 1;
318
+ private buffer = "";
319
+ private stderrTail = "";
320
+ alive = true;
321
+
322
+ constructor(cwd: string, onExit: () => void) {
323
+ const launcher = process.platform === "win32" ? LAUNCHERS.win32 : LAUNCHERS.unix;
324
+ const env: Record<string, string | undefined> = { ...process.env };
325
+ const launcherEnv = (launcher as { env?: Record<string, string> }).env;
326
+ if (launcherEnv) Object.assign(env, launcherEnv);
327
+ this.child = spawn(launcher.command, [...launcher.args], {
328
+ cwd,
329
+ env,
330
+ stdio: ["pipe", "pipe", "pipe"],
331
+ // Inline (not the withHiddenWindowsConsole helper): this spawn lives in the
332
+ // GENERATED Pi extension source, which must stay dependency-free (Pi loads
333
+ // it with jiti; no npm packages resolve). Hide the console on Windows anyway.
334
+ windowsHide: true,
335
+ });
336
+ this.child.stdout.setEncoding("utf8");
337
+ this.child.stdout.on("data", (chunk: string) => this.onStdout(chunk));
338
+ this.child.stderr.setEncoding("utf8");
339
+ this.child.stderr.on("data", (chunk: string) => {
340
+ this.stderrTail = (this.stderrTail + chunk).slice(-STDERR_TAIL_LIMIT);
341
+ });
342
+ // A write buffered before the pipe breaks surfaces as an 'error' on stdin
343
+ // (not on the child); unhandled it would crash Pi's extension host.
344
+ // Swallow it — the exit handler owns teardown.
345
+ this.child.stdin.on("error", () => {});
346
+ const fail = () => {
347
+ if (!this.alive) return;
348
+ this.alive = false;
349
+ const err = new Error(
350
+ "Open Knowledge MCP server exited" +
351
+ (this.stderrTail ? ": " + this.stderrTail.trim() : ""),
352
+ );
353
+ for (const p of this.pending.values()) p.reject(err);
354
+ this.pending.clear();
355
+ onExit();
356
+ };
357
+ this.child.on("exit", fail);
358
+ this.child.on("error", fail);
359
+ }
360
+
361
+ private onStdout(chunk: string): void {
362
+ this.buffer += chunk;
363
+ let newline = this.buffer.indexOf("\\n");
364
+ while (newline !== -1) {
365
+ const line = this.buffer.slice(0, newline).trim();
366
+ this.buffer = this.buffer.slice(newline + 1);
367
+ if (line.startsWith("{")) {
368
+ try {
369
+ this.onMessage(JSON.parse(line) as Record<string, unknown>);
370
+ } catch {
371
+ // Non-JSON noise on stdout is ignored; framing recovers on the next line.
372
+ }
373
+ }
374
+ newline = this.buffer.indexOf("\\n");
375
+ }
376
+ }
377
+
378
+ private onMessage(msg: Record<string, unknown>): void {
379
+ const id = msg.id;
380
+ if (typeof msg.method === "string") {
381
+ // Server-initiated request (e.g. roots/list). This bridge declares no
382
+ // client capabilities, so decline rather than leave the server hanging.
383
+ if (id !== undefined && id !== null) {
384
+ this.send({
385
+ jsonrpc: "2.0",
386
+ id,
387
+ error: { code: -32601, message: "Method not supported by the OK Pi bridge" },
388
+ });
389
+ }
390
+ return;
391
+ }
392
+ if (typeof id !== "number") return;
393
+ const pending = this.pending.get(id);
394
+ if (!pending) return;
395
+ this.pending.delete(id);
396
+ const error = msg.error as { message?: string } | undefined;
397
+ if (error) {
398
+ pending.reject(new Error(error.message || "Open Knowledge MCP error"));
399
+ return;
400
+ }
401
+ pending.resolve((msg.result ?? {}) as Record<string, unknown>);
402
+ }
403
+
404
+ private send(msg: Record<string, unknown>): void {
405
+ // Buffered stdout can still dispatch onMessage replies after close() ends
406
+ // stdin; writing then would raise ERR_STREAM_WRITE_AFTER_END unhandled.
407
+ if (!this.alive) return;
408
+ this.child.stdin.write(JSON.stringify(msg) + "\\n");
409
+ }
410
+
411
+ request(
412
+ method: string,
413
+ params: Record<string, unknown>,
414
+ opts: { timeoutMs?: number; signal?: AbortSignal } = {},
415
+ ): Promise<Record<string, unknown>> {
416
+ if (!this.alive) return Promise.reject(new Error("Open Knowledge MCP server is not running"));
417
+ const id = this.nextId++;
418
+ return new Promise<Record<string, unknown>>((resolve, reject) => {
419
+ let timer: ReturnType<typeof setTimeout> | undefined;
420
+ let onAbort: (() => void) | undefined;
421
+ const cleanup = () => {
422
+ if (timer !== undefined) clearTimeout(timer);
423
+ if (onAbort && opts.signal) opts.signal.removeEventListener("abort", onAbort);
424
+ this.pending.delete(id);
425
+ };
426
+ const done: PendingRequest = {
427
+ resolve: (value) => {
428
+ cleanup();
429
+ resolve(value);
430
+ },
431
+ reject: (err) => {
432
+ cleanup();
433
+ reject(err);
434
+ },
435
+ };
436
+ this.pending.set(id, done);
437
+ if (opts.timeoutMs) {
438
+ timer = setTimeout(() => {
439
+ done.reject(new Error(method + " timed out after " + opts.timeoutMs + "ms"));
440
+ }, opts.timeoutMs);
441
+ }
442
+ if (opts.signal) {
443
+ onAbort = () => {
444
+ this.notify("notifications/cancelled", { requestId: id, reason: "aborted" });
445
+ done.reject(new Error("Cancelled"));
446
+ };
447
+ if (opts.signal.aborted) {
448
+ onAbort();
449
+ return;
450
+ }
451
+ opts.signal.addEventListener("abort", onAbort, { once: true });
452
+ }
453
+ this.send({ jsonrpc: "2.0", id, method, params });
454
+ });
455
+ }
456
+
457
+ notify(method: string, params: Record<string, unknown>): void {
458
+ if (!this.alive) return;
459
+ this.send({ jsonrpc: "2.0", method, params });
460
+ }
461
+
462
+ close(): void {
463
+ this.alive = false;
464
+ for (const p of this.pending.values()) {
465
+ p.reject(new Error("Open Knowledge MCP client closed"));
466
+ }
467
+ this.pending.clear();
468
+ // ok mcp exits on stdin EOF; the delayed kill is a backstop.
469
+ try {
470
+ this.child.stdin.end();
471
+ } catch {
472
+ // Already gone.
473
+ }
474
+ const child = this.child;
475
+ setTimeout(() => {
476
+ try {
477
+ child.kill();
478
+ } catch {
479
+ // Already gone.
480
+ }
481
+ }, 2000).unref();
482
+ }
483
+ }
484
+
485
+ /** JSON Schema pass-through: Pi validates plain JSON Schema parameters. */
486
+ function toParameters(inputSchema: Record<string, unknown> | undefined): Record<string, unknown> {
487
+ if (!inputSchema || typeof inputSchema !== "object") {
488
+ return { type: "object", properties: {} };
489
+ }
490
+ const schema = { ...inputSchema };
491
+ delete schema.$schema;
492
+ return schema;
493
+ }
494
+
495
+ function contentText(content: unknown): string {
496
+ if (!Array.isArray(content)) return "";
497
+ return (content as McpContentItem[])
498
+ .filter((item) => item && item.type === "text" && typeof item.text === "string")
499
+ .map((item) => item.text as string)
500
+ .join("\\n");
501
+ }
502
+
503
+ export default function okBridge(pi: {
504
+ on(event: string, handler: (event: unknown, ctx: unknown) => unknown): void;
505
+ registerTool(definition: Record<string, unknown>): void;
506
+ }) {
507
+ let client: OkMcpClient | null = null;
508
+ let starting: Promise<OkMcpClient> | null = null;
509
+ let sessionCwd = process.cwd();
510
+ const registeredTools = new Set<string>();
511
+
512
+ async function ensureClient(): Promise<OkMcpClient> {
513
+ if (client && client.alive) return client;
514
+ if (starting) return starting;
515
+ starting = (async () => {
516
+ const next = new OkMcpClient(sessionCwd, () => {
517
+ if (client === next) client = null;
518
+ });
519
+ try {
520
+ await next.request(
521
+ "initialize",
522
+ {
523
+ protocolVersion: "2025-06-18",
524
+ capabilities: {},
525
+ clientInfo: { name: "pi", version: "1.0.0" },
526
+ },
527
+ { timeoutMs: INIT_TIMEOUT_MS },
528
+ );
529
+ } catch (err) {
530
+ // A timed-out initialize rejects the request while the child may
531
+ // still be running; tear it down so retries don't stack orphans.
532
+ next.close();
533
+ throw err;
534
+ }
535
+ next.notify("notifications/initialized", {});
536
+ client = next;
537
+ return next;
538
+ })();
539
+ try {
540
+ return await starting;
541
+ } finally {
542
+ starting = null;
543
+ }
544
+ }
545
+
546
+ async function registerOkTools(): Promise<number> {
547
+ const mcp = await ensureClient();
548
+ const listed = await mcp.request("tools/list", {}, { timeoutMs: INIT_TIMEOUT_MS });
549
+ const tools = Array.isArray(listed.tools) ? (listed.tools as McpToolInfo[]) : [];
550
+ for (const tool of tools) {
551
+ const name = TOOL_PREFIX + tool.name;
552
+ if (registeredTools.has(name)) continue;
553
+ registeredTools.add(name);
554
+ pi.registerTool({
555
+ name,
556
+ label: "OK " + tool.name,
557
+ description: tool.description || "Open Knowledge " + tool.name + " tool.",
558
+ parameters: toParameters(tool.inputSchema),
559
+ execute: async (
560
+ _toolCallId: string,
561
+ params: Record<string, unknown>,
562
+ signal: AbortSignal | undefined,
563
+ ) => {
564
+ const live = await ensureClient();
565
+ const result = await live.request(
566
+ "tools/call",
567
+ { name: tool.name, arguments: params ?? {} },
568
+ { signal },
569
+ );
570
+ const text = contentText(result.content);
571
+ if (result.isError) {
572
+ throw new Error(text || "Open Knowledge tool " + tool.name + " failed");
573
+ }
574
+ return {
575
+ content: [{ type: "text", text }],
576
+ details: result.structuredContent,
577
+ };
578
+ },
579
+ });
580
+ }
581
+ return tools.length;
582
+ }
583
+
584
+ pi.on("session_start", async (_event, ctx) => {
585
+ const cwd = (ctx as { cwd?: string } | undefined)?.cwd;
586
+ if (typeof cwd === "string" && cwd.length > 0) sessionCwd = cwd;
587
+ try {
588
+ await registerOkTools();
589
+ } catch (err) {
590
+ const ui = (ctx as { ui?: { notify?: (m: string, level: string) => void } } | undefined)?.ui;
591
+ try {
592
+ ui?.notify?.(
593
+ "Open Knowledge tools unavailable: " + (err instanceof Error ? err.message : String(err)),
594
+ "warning",
595
+ );
596
+ } catch {
597
+ // Non-interactive mode; the failure will resurface on first tool use.
598
+ }
599
+ }
600
+ });
601
+
602
+ pi.on("session_shutdown", async () => {
603
+ const pending = starting;
604
+ starting = null;
605
+ const current = client;
606
+ client = null;
607
+ current?.close();
608
+ // An in-flight ensureClient would otherwise assign a live client after
609
+ // shutdown; await it and tear that one down too.
610
+ if (pending) {
611
+ try {
612
+ (await pending).close();
613
+ } catch {
614
+ // Initialization failed — its catch path already closed the client.
615
+ }
616
+ }
617
+ });
618
+ }
619
+ `}function Rr(e){try{return ke.native(e)}catch{return e}}function zr(e,t){let n=L(Rr(t),Rr(e));return n.length>0&&!n.startsWith(`..`)&&!F(n)}const Br=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 Vr(e,t={}){let n=t.homeDir??Me(),r=t.gitTopLevel??Br,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&&zr(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 Hr(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 Ur=[`native`,`index.js`];function Wr(e={}){let t=e.moduleUrl??import.meta.url,n=e.requireModule??be(t);try{return n(I(P(Te(t)),...Ur))}catch(e){Hr(e)||Q(`bundled loader failed to load`,e)}try{return n(`@inkeep/open-knowledge-native-config`)}catch(e){return Hr(e)||Q(`workspace addon failed to load`,e),null}}function Gr(){let e=Wr();return e&&typeof e.resolveSymlinkWritePath==`function`?e:null}function Kr(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 qr;function Jr(){return qr===void 0&&(qr=Gr()),qr}function Yr(e,t=Jr){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 Kr(e)}function Xr(){let e=Wr();return e&&typeof e.parseTomlToJson==`function`?e:null}function Zr(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 Qr(e){if(!N(e))throw Error(`TOML root is not a table`);return e}function $r(e){return{backend:`native`,parseToObject(t){return Qr(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 ei(){return{backend:`fallback`,parseToObject(e){return Qr(Sr(e))}}}function ti(e=Xr){let t=e();return t&&Zr(t)?$r(t):ei()}let ni=null;function ri(){return ni===null&&(ni=ti()),ni}const ii={allowTrailingComma:!0,disallowComments:!1};function ai(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function oi(e){let t=[],n=m(e,t,ii);return t.some(t=>!ai(t,e))||!n||n.type!==`object`?null:n}function si(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 ci(e,t){T(e,`${JSON.stringify(t,null,2)}\n`)}function li(e,t){let n=Mr(t);T(e,n.endsWith(`
620
+ `)?n:`${n}\n`)}function ui(e,t){let n=(0,Cn.stringify)(t);T(e,n.endsWith(`
621
+ `)?n:`${n}\n`)}const di=10*1024*1024;function fi(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)=>fi(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)&&fi(e[n],t[n])):!1}return!1}function pi(e){for(let t of e.split(`
622
+ `)){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 mi(e,t,n){return t===void 0?[e,n]:[e,t,n]}function hi(e,t,n,r){let i={[n]:r};return{[e]:t===void 0?i:{[t]:i}}}function gi(e,t,n){let r=e[t];return n===void 0?r:N(r)?r[n]:void 0}function _i(e,t,n,r,i){if(!z(e))return ci(e,hi(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 ci(e,hi(t,i,n,r)),{kind:`written`};if(Buffer.byteLength(a,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let o=oi(a);if(!o)return{kind:`declined`,reason:`unparseable`};if(si(o,t)>1)return{kind:`declined`,reason:`duplicate-container`};let s=gi(g(o),t,i),c=N(s)?s[n]:void 0,l=c!==void 0;if(l&&fi(c,r))return{kind:`overwritten`};let u=a.charCodeAt(0)===65279,d=u?a.slice(1):a,p=d.includes(`\r
623
+ `)?`\r
624
+ `:`
625
+ `,m=f(d,mi(t,i,n),r,{formattingOptions:{...pi(d),eol:p}}),_=`${u?``:``}${h(d,m)}`;return _!==a&&T(e,_,{mode:Hn(e)}),{kind:l?`overwritten`:`written`}}function vi(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?(li(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=Vn(c),u=o||c.endsWith(`
626
+ `),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(`
627
+ `)||(f=`${f}\n`):f=f.replace(/\n+$/,``),l&&(f=f.replace(/\r\n/g,`
628
+ `).replace(/\n/g,`\r
629
+ `));let p=`${s?``:``}${f}`;return p!==a&&T(t,p,{mode:Hn(t)}),{kind:d.existed?`overwritten`:`written`}}function yi(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 ui(e,{[t]:{[n]:r}}),{kind:`written`};if(Buffer.byteLength(i,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let a=i.charCodeAt(0)===65279,o=a?i.slice(1):i,s=(0,Cn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,Cn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Vn(o);o.endsWith(`
630
+ `)?u.endsWith(`
631
+ `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),d&&(u=u.replace(/\r\n/g,`
632
+ `).replace(/\n/g,`\r
633
+ `));let f=`${a?``:``}${u}`;return f!==i&&T(e,f,{mode:Hn(e)}),{kind:l?`overwritten`:`written`}}const bi=e=>e!==`project`,xi=e=>e!==`user`;async function Si(){let e=await Zn({message:`Where should the MCP server be configured?
634
+ `,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 Ci(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??Si)():`both`}async function wi(e){return nr({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 Ti(e){if(e.sharing!==void 0)return e.sharing;let t=kn(e.projectRoot)===`local-only`?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??wi)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Ei(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 Di(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(Oi(t),Oi(r));if(a.startsWith(`..`)||F(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Oi(e){try{return ke(e)}catch{return e}}const ki=`open-knowledge-ui`;function Ai(e,t,n){try{return z(e.detectPath?.(t,n)??P(e.configPath(t,n)))}catch{return!1}}function ji(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&&!Ai(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 Ni(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=Yr(o).writePath;if(De(P(t),{recursive:!0}),e.format===`toml`){let n=vi(ri(),t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}if(e.format===`yaml`){let n=yi(t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}let n=_i(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 Mi={pi:Lr};function Ni(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=Mi[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:Hn(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 Pi(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!z(n)))return{editorId:e.id,label:e.label,path:n}}function Fi(e,t,n,r){let i=Li(e,t,n,r);return i.kind===`present`?i.entry:null}function Ii(e,t,n,r){let i=gi(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 Li(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>di)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:Ir(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ri().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Ii(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,Cn.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Ii(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=oi(a);return s?si(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Ii(g(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Ri(e={}){let t=Ce(e.cwd??process.cwd()),n=Vr(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:Di(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 Ci({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),h=e.editors??Wi(r,e.home),g=e.editors??de.filter(e=>D[e].projectConfigPath!==void 0||D[e].projectSkillPath!==void 0),b=se(h),C=se(g),w=e.mcp===!1||m===null,T=Array.from(new Map([...b,...w?[]:C].map(e=>[e.id,e])).values()),ce=b.filter(t=>Ai(t,r,e.home)),E=[],le=[],ue=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(bi(m)&&b.includes(t)&&t.scope===`global`&&E.push(ji(t,r,s,e.home)),xi(m)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ji(t,r,s,e.home,n);E.push(i),(i.action===`written`||i.action===`overwritten`)&&ue.add(n)}}let fe=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||fe.has(n)||(fe.add(n),le.push(pe(t,r,{home:e.home})))}let me=le.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&&xi(m)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,ge=w?[]:ce.map(e=>Pi(e,r)).filter(e=>e!==void 0).filter(e=>!ue.has(e.path)),O=e.installUserSkill??te,k=e.home??Me(),A=Ei(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 zi({projectRoot:r,desiredMode:await Ti({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:le,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 zi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=kn(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=En(t);if(n===`local-only`){let e=Dn(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`}:Bi(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=On(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:Bi(t,o,`remove`)}function Bi(e,t,n){let r=kn(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 Vi(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 Hi(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 (${Vi(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=>ce[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(...qi(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(`
635
+ `)}function Ui(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 Wi(e,t){let n=[];for(let r of de)Ai(D[r],e,t)&&n.push(r);return n}function Gi(){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 Ki(){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 E(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new E(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new E(`--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?Gi():null;try{let r;try{r=await Ri({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.
636
+ `),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-4hXM3EID.mjs`),{resolveContentDir:s}=await import(`./src-cRpQSbXB.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-BnqROnAm.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(Ui(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Hi(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function qi(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(`
637
+ `))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{En as A,G as B,Zn as C,Dn as D,Un as E,Sn as F,un as I,bt as L,kn as M,jn as N,Nn as O,On as P,_t as R,nr as S,Vn as T,Ge as V,mi as _,Ui as a,Vr as b,Hi as c,Fi as d,Ei as f,Ri as g,Ti as h,zi as i,Mn as j,An as k,qi as l,Di as m,ki as n,Li as o,Ci as p,Mi as r,Wi as s,$ as t,Ki as u,ji as v,Hn as w,Fr as x,ri as y,gt as z};
638
+ //# sourceMappingURL=init-Cg1MczGq.mjs.map