@inkeep/open-knowledge 0.50.0-beta.11 → 0.50.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (420) hide show
  1. package/dist/{abnfDiagram-VRR7QNED-DWDzSKGM.mjs → abnfDiagram-VRR7QNED-CifY53Cb.mjs} +2 -2
  2. package/dist/{acp-harness-probe-DRAaVrjf.mjs → acp-harness-probe-BRzTGQPW.mjs} +3 -3
  3. package/dist/alias-JE7RI5QX-D4n6ct-s.mjs +1 -0
  4. package/dist/{arc-DXUbbcxK.mjs → arc-CXI7xUjm.mjs} +2 -2
  5. package/dist/architecture-TIHT7OUA-BE8plkIy.mjs +1 -0
  6. package/dist/{architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs → architectureDiagram-ZJ3FMSHR-bIjZfWqc.mjs} +2 -2
  7. package/dist/{array-BbgQa93P.mjs → array-BxvVYvCD.mjs} +1 -1
  8. package/dist/{awk2-BBAGSFUB-Dq-YdAGA.mjs → awk2-BBAGSFUB-mmQuqryx.mjs} +1 -1
  9. package/dist/{banner-Be20aAVc.mjs → banner-B6HYYw6k.mjs} +1 -1
  10. package/dist/{base64-4YMZCVJ5-dXz6vbV-.mjs → base64-4YMZCVJ5-CMwa-nV5.mjs} +1 -1
  11. package/dist/{basename-AA2KJYZQ-BhoOTAHi.mjs → basename-AA2KJYZQ-qOuF7yJE.mjs} +1 -1
  12. package/dist/bash-IJWYRKFO-Dv3tavm3.mjs +1 -0
  13. package/dist/{blockDiagram-677ZJIJ3-yJugV29e.mjs → blockDiagram-677ZJIJ3-CpbM3epf.mjs} +2 -2
  14. package/dist/{c4Diagram-LMCZKHZV-BFQQLctA.mjs → c4Diagram-LMCZKHZV-BD6yUjvB.mjs} +2 -2
  15. package/dist/{cat-RDUMLXKC-DFuXWxVq.mjs → cat-RDUMLXKC-CDX9zihc.mjs} +1 -1
  16. package/dist/channel-C1EZ3Cv_.mjs +2 -0
  17. package/dist/{chmod-SYMGL4JA-ByMUk130.mjs → chmod-SYMGL4JA-D0kGSLaV.mjs} +1 -1
  18. package/dist/{chokidar-dh8zokRd.mjs → chokidar-CMbOXikG.mjs} +1 -1
  19. package/dist/{chunk-2Q5K7J3B-Ck8oGqYt.mjs → chunk-2Q5K7J3B-DqdLeGRA.mjs} +2 -2
  20. package/dist/{chunk-2TRDZQLB-AH-I_6yN.mjs → chunk-2TRDZQLB-gp_t9c4Y.mjs} +1 -1
  21. package/dist/{chunk-32BRIVSS-Dwq69mnI.mjs → chunk-32BRIVSS-XYZfTStz.mjs} +2 -2
  22. package/dist/{chunk-3BS5SKQH-DpdUzS0R.mjs → chunk-3BS5SKQH-HZ6z6wVG.mjs} +3 -3
  23. package/dist/{chunk-3H6UQG3A-BWCaN15a.mjs → chunk-3H6UQG3A-BMHA6cy_.mjs} +2 -2
  24. package/dist/{chunk-3ZUFRYJ4-H1A1hWy1.mjs → chunk-3ZUFRYJ4-dXTnHXJv.mjs} +1 -1
  25. package/dist/{chunk-4GTNDTRF-Cx89i2Y1.mjs → chunk-4GTNDTRF-C_jTvQe4.mjs} +2 -2
  26. package/dist/{chunk-4HHKTUW3-Dk2l1S8J.mjs → chunk-4HHKTUW3-C0THzwCu.mjs} +1 -1
  27. package/dist/{chunk-4Q4SM6WR-CGuvvBWe.mjs → chunk-4Q4SM6WR-PC7l8Nw6.mjs} +2 -2
  28. package/dist/{chunk-52WLFC77-Cn-qt8h-.mjs → chunk-52WLFC77-Dx0kOaIq.mjs} +2 -2
  29. package/dist/{chunk-55VFSPNA-D2U7n2ka.mjs → chunk-55VFSPNA-C6Zy4paq.mjs} +2 -2
  30. package/dist/{chunk-5FCAYU7R-DszODYLe.mjs → chunk-5FCAYU7R-DtUYK8N7.mjs} +2 -2
  31. package/dist/{chunk-5HE753X5-DDnyF29o.mjs → chunk-5HE753X5-BOOWBZ0m.mjs} +2 -2
  32. package/dist/{chunk-5JV3BV7I-BkeVAZnj.mjs → chunk-5JV3BV7I-CkhohPJD.mjs} +2 -2
  33. package/dist/{chunk-5QVNJEHU-DS9zA_YV.mjs → chunk-5QVNJEHU-Y4vDIIOv.mjs} +2 -2
  34. package/dist/{chunk-5TONJI2A-CzUNHQPX.mjs → chunk-5TONJI2A-CH5pkTrL.mjs} +2 -2
  35. package/dist/{chunk-5V6VZH6T-DBFenjXz.mjs → chunk-5V6VZH6T-DOa3BRZD.mjs} +2 -2
  36. package/dist/{chunk-5VM5RSS4-C8vNNqW0.mjs → chunk-5VM5RSS4-D8VF3oKI.mjs} +2 -2
  37. package/dist/{chunk-62RKD26F-C4qK_fA-.mjs → chunk-62RKD26F-8hloI0L5.mjs} +2 -2
  38. package/dist/{chunk-64BAICW3-BupSxcu5.mjs → chunk-64BAICW3-DBXBwSOH.mjs} +2 -2
  39. package/dist/{chunk-6Z5SFZXK-Cz0C4bhB.mjs → chunk-6Z5SFZXK-C075dOUN.mjs} +2 -2
  40. package/dist/{chunk-74CEPOFO-BUVWiXkJ.mjs → chunk-74CEPOFO-CukBzgc1.mjs} +1 -1
  41. package/dist/{chunk-7BUUIJ7U-D7hE25H9.mjs → chunk-7BUUIJ7U-f1elfo77.mjs} +2 -2
  42. package/dist/{chunk-7L36YK2X-CGwYuotX.mjs → chunk-7L36YK2X-BGJaUmS5.mjs} +1 -1
  43. package/dist/{chunk-7TSDKFEO-DBB10vPw.mjs → chunk-7TSDKFEO-CNjAbA1P.mjs} +1 -1
  44. package/dist/{chunk-A4HU7SVR-BZJ8xDMo.mjs → chunk-A4HU7SVR-CCTrKdQB.mjs} +1 -1
  45. package/dist/{chunk-A4JSPFCI-Dej71yGP.mjs → chunk-A4JSPFCI-DajVdKHH.mjs} +2 -2
  46. package/dist/{chunk-A65PWWJC-C-0S-s_f.mjs → chunk-A65PWWJC-C-hcxfZo.mjs} +2 -2
  47. package/dist/{chunk-A7A2DBEE-DCXJ1xmx.mjs → chunk-A7A2DBEE-qSQcWS6a.mjs} +1 -1
  48. package/dist/{chunk-A7ICOL4V-BQZ9JZ1A.mjs → chunk-A7ICOL4V-BnS48daC.mjs} +2 -2
  49. package/dist/{chunk-ALLTKNUZ-D2ZOfcEz.mjs → chunk-ALLTKNUZ-h3DkPQr7.mjs} +2 -2
  50. package/dist/{chunk-APT7OOP2-D-DaFB7K.mjs → chunk-APT7OOP2-D4fQkI0I.mjs} +2 -2
  51. package/dist/{chunk-BIQX33UG-Bmho6v3L.mjs → chunk-BIQX33UG-COfXMiTJ.mjs} +2 -2
  52. package/dist/{chunk-C7G6YPKG-BAX_SClW.mjs → chunk-C7G6YPKG-OX__HWxf.mjs} +2 -2
  53. package/dist/{chunk-CQNSW5MT-FekKjn0i.mjs → chunk-CQNSW5MT-Cb1cqQRt.mjs} +2 -2
  54. package/dist/{chunk-CYSBUYHQ-BftsYwRW.mjs → chunk-CYSBUYHQ-B4-ppab8.mjs} +2 -2
  55. package/dist/{chunk-D4J545R4-Br_5qOnE.mjs → chunk-D4J545R4-BSSyYhq_.mjs} +2 -2
  56. package/dist/{chunk-D6CWQ5DW-3AWPydfx.mjs → chunk-D6CWQ5DW-CfOJMdG6.mjs} +2 -2
  57. package/dist/{chunk-D7MEQ3VN-Df6An2jd.mjs → chunk-D7MEQ3VN-t7WGQTJn.mjs} +2 -2
  58. package/dist/{chunk-DBKNVD4L-DNQP2COw.mjs → chunk-DBKNVD4L-n6jYSppo.mjs} +2 -2
  59. package/dist/{chunk-DCAAORBQ-BDLVpBG2.mjs → chunk-DCAAORBQ-Csr_bach.mjs} +2 -2
  60. package/dist/{chunk-EEXR5ZDP-CE452hsE.mjs → chunk-EEXR5ZDP-DHDSM8Cg.mjs} +1 -1
  61. package/dist/{chunk-EIZGF4BS-CSFp0aUh.mjs → chunk-EIZGF4BS-CQom3CXw.mjs} +2 -2
  62. package/dist/{chunk-EMLP6XTP-C2yfLzVC.mjs → chunk-EMLP6XTP-B9HJTcgK.mjs} +2 -2
  63. package/dist/{chunk-EX3LRPZG-Chp9b-Lc.mjs → chunk-EX3LRPZG-CJXUIqRR.mjs} +2 -2
  64. package/dist/{chunk-F23WWYKW-qKke1WqP.mjs → chunk-F23WWYKW-CqmJHfs_.mjs} +2 -2
  65. package/dist/{chunk-FWX5IMBZ-Cn1xNcn5.mjs → chunk-FWX5IMBZ-BZ5TJEkl.mjs} +2 -2
  66. package/dist/{chunk-GCTKCWKD-D0obXRun.mjs → chunk-GCTKCWKD-DaM9S1AG.mjs} +1 -1
  67. package/dist/{chunk-GOV5EKKI-CDovwI7Z.mjs → chunk-GOV5EKKI-C-RQSVxu.mjs} +2 -2
  68. package/dist/{chunk-GXVXFKBA-D-BGCybM.mjs → chunk-GXVXFKBA-RIRyJGvt.mjs} +2 -2
  69. package/dist/{chunk-HDQ56CKY-CI8IkhlS.mjs → chunk-HDQ56CKY-CREcvui6.mjs} +2 -2
  70. package/dist/{chunk-HJQJAYMS-BHzb4Ncl.mjs → chunk-HJQJAYMS-B-JtedZb.mjs} +1 -1
  71. package/dist/{chunk-HJWBQKYG-B-KESSoV.mjs → chunk-HJWBQKYG-LHJ71_Q6.mjs} +2 -2
  72. package/dist/{chunk-HKLCLINH-Bgw53oZd.mjs → chunk-HKLCLINH-BpO-uXL1.mjs} +3 -3
  73. package/dist/{chunk-HL6NGDO2-CftrHAlX.mjs → chunk-HL6NGDO2-BrwBzY5D.mjs} +2 -2
  74. package/dist/{chunk-HOUHSVGY-C3h3PdhC.mjs → chunk-HOUHSVGY-q17cYlbE.mjs} +2 -2
  75. package/dist/{chunk-HWKDQ44K-CGcvROg-.mjs → chunk-HWKDQ44K-Ca2TjRi7.mjs} +2 -2
  76. package/dist/{chunk-I57KEIP3-iiTO2OC-.mjs → chunk-I57KEIP3-D7P1gGRR.mjs} +1 -1
  77. package/dist/{chunk-ICXQ74PX-DbJy3VdO.mjs → chunk-ICXQ74PX-DL0eOUe3.mjs} +2 -2
  78. package/dist/{chunk-JG7HCLWE-lUInQ_44.mjs → chunk-JG7HCLWE-OAdm-dOX.mjs} +2 -2
  79. package/dist/{chunk-JVPRLUMK-FzUEFQw9.mjs → chunk-JVPRLUMK-D4dgC-kP.mjs} +2 -2
  80. package/dist/{chunk-JWPE2WC7-iDbhfJR-.mjs → chunk-JWPE2WC7-DdfpL_yU.mjs} +2 -2
  81. package/dist/{chunk-K6LIBGJA-BXxOXTjI.mjs → chunk-K6LIBGJA-BjeUsobh.mjs} +2 -2
  82. package/dist/{chunk-KEIR6QF5-BLwvtFl6.mjs → chunk-KEIR6QF5-CSQn6Mqu.mjs} +1 -1
  83. package/dist/{chunk-KMEYNNUA-1KiUKBQV.mjs → chunk-KMEYNNUA-C8NOqwuc.mjs} +2 -2
  84. package/dist/{chunk-KRBPSX3W-YDdgrCmf.mjs → chunk-KRBPSX3W-CA3be-GR.mjs} +2 -2
  85. package/dist/{chunk-LL3S3NLB-D0lLKwVi.mjs → chunk-LL3S3NLB-CVMnLnle.mjs} +2 -2
  86. package/dist/{chunk-LTZRCH7N-DpPs5vSq.mjs → chunk-LTZRCH7N-BVgQX7ys.mjs} +2 -2
  87. package/dist/{chunk-LWEGUNWT-DOK-XWMd.mjs → chunk-LWEGUNWT-BHyAIqRk.mjs} +2 -2
  88. package/dist/{chunk-MDDMCKUK-CTA6qEdN.mjs → chunk-MDDMCKUK-VSIrKrD6.mjs} +2 -2
  89. package/dist/{chunk-MDLLFABN-B2tA3LLA.mjs → chunk-MDLLFABN-DQ3dWAHi.mjs} +2 -2
  90. package/dist/{chunk-MHTUABJP-CrR3MfDw.mjs → chunk-MHTUABJP-CHc_qsDr.mjs} +1 -1
  91. package/dist/{chunk-MIZPJHVH-d3bhRfh4.mjs → chunk-MIZPJHVH-C_BrXHPW.mjs} +2 -2
  92. package/dist/{chunk-MLXIYONF-C0S_CKb1.mjs → chunk-MLXIYONF-B-vm9fnI.mjs} +1 -1
  93. package/dist/{chunk-MOJQB5TN-CUt4IiNv.mjs → chunk-MOJQB5TN-Da31nYdf.mjs} +2 -2
  94. package/dist/{chunk-MOZMSUNE-DCxwDKn7.mjs → chunk-MOZMSUNE-B5kgHl3e.mjs} +2 -2
  95. package/dist/{chunk-MYE6AGBJ-CMoRJzYM.mjs → chunk-MYE6AGBJ-B1nnJTrG.mjs} +2 -2
  96. package/dist/{chunk-NAERJDUW-Ck-SZ2Ps.mjs → chunk-NAERJDUW-Br68-Rrx.mjs} +2 -2
  97. package/dist/{chunk-NCNPKYJZ-BxqfYu6d.mjs → chunk-NCNPKYJZ-BoPSvcFt.mjs} +2 -2
  98. package/dist/{chunk-NUYSJFDK-DfaBzW-k.mjs → chunk-NUYSJFDK-D3fW0z8Y.mjs} +2 -2
  99. package/dist/{chunk-OCLXQMOG-DC3689MV.mjs → chunk-OCLXQMOG-jjXsGHS6.mjs} +2 -2
  100. package/dist/{chunk-OCS6LSEM-BY3_3dNt.mjs → chunk-OCS6LSEM-O_xWB45H.mjs} +2 -2
  101. package/dist/{chunk-OGEWGWER-DgPAesMA.mjs → chunk-OGEWGWER-DogLxEmQ.mjs} +2 -2
  102. package/dist/{chunk-OSBZ3O6U-BVpvamr7.mjs → chunk-OSBZ3O6U-BL69ZkWc.mjs} +2 -2
  103. package/dist/{chunk-PBXLG62G-C12xrBbG.mjs → chunk-PBXLG62G-DHYP3zNq.mjs} +2 -2
  104. package/dist/{chunk-PP6PSHAB-tlM6YKyg.mjs → chunk-PP6PSHAB-DJdfqM0M.mjs} +1 -1
  105. package/dist/{chunk-PUDLZKDR-CIWYIjrF.mjs → chunk-PUDLZKDR-C6_GL-hZ.mjs} +2 -2
  106. package/dist/{chunk-PXTK5WE2-DNbfUrIy.mjs → chunk-PXTK5WE2-BjypHZuZ.mjs} +1 -1
  107. package/dist/{chunk-PYSFUGCK-DqdcBhD4.mjs → chunk-PYSFUGCK-1wyQjjIa.mjs} +2 -2
  108. package/dist/{chunk-Q4XR5HBZ-jWirJQsj.mjs → chunk-Q4XR5HBZ-CmIyTunu.mjs} +2 -2
  109. package/dist/{chunk-QBLGF6JB-hMrl9lGc.mjs → chunk-QBLGF6JB-Chmqe3JT.mjs} +2 -2
  110. package/dist/{chunk-QCDB2VPH-Cv7mIZWG.mjs → chunk-QCDB2VPH-DeT7iDe9.mjs} +2 -2
  111. package/dist/{chunk-QJ7O6ZN3-BRN048sn.mjs → chunk-QJ7O6ZN3-pLJnBWb_.mjs} +2 -2
  112. package/dist/{chunk-R6QSAL5T-CxzbKF59.mjs → chunk-R6QSAL5T-FbTgG420.mjs} +1 -1
  113. package/dist/{chunk-R7FJI6CG-bmCS8vOS.mjs → chunk-R7FJI6CG-DtnOBvxJ.mjs} +2 -2
  114. package/dist/{chunk-RPNGRAAP-BTpXCNpb.mjs → chunk-RPNGRAAP-zk52I-x5.mjs} +2 -2
  115. package/dist/{chunk-RYQCIY6F-Dt7I2-Oy.mjs → chunk-RYQCIY6F-BhxDRSmm.mjs} +2 -2
  116. package/dist/{chunk-SDNKECQQ-BNRfy-15.mjs → chunk-SDNKECQQ-Ba_9RHGh.mjs} +2 -2
  117. package/dist/{chunk-SNN4IESC-oXVGT9qo.mjs → chunk-SNN4IESC-WFycXHLb.mjs} +1 -1
  118. package/dist/{chunk-T56QNPHK-lY6QjpkL.mjs → chunk-T56QNPHK-ziWY7afD.mjs} +2 -2
  119. package/dist/{chunk-TLSUDHID-BP7dARSe.mjs → chunk-TLSUDHID-KzcTune6.mjs} +2 -2
  120. package/dist/{chunk-TOMNU26N-BFsBBT9j.mjs → chunk-TOMNU26N-GYFcPoRs.mjs} +2 -2
  121. package/dist/{chunk-TP4BZANS-C6KGxaUf.mjs → chunk-TP4BZANS-DGEEtypx.mjs} +2 -2
  122. package/dist/{chunk-TXBZCHCQ-DxPX5PCF.mjs → chunk-TXBZCHCQ-DnLUMlQb.mjs} +2 -2
  123. package/dist/{chunk-U6XO7XAA-BHty90wb.mjs → chunk-U6XO7XAA-CAV8Xz4u.mjs} +2 -2
  124. package/dist/{chunk-V5MWI2OL-DApVl_z4.mjs → chunk-V5MWI2OL-CVoVr5km.mjs} +1 -1
  125. package/dist/{chunk-V7JOEXUC-DNM56rwe.mjs → chunk-V7JOEXUC-CY4XfSMA.mjs} +2 -2
  126. package/dist/{chunk-V7TAPXDL-CrGsULIH.mjs → chunk-V7TAPXDL-C2FVL1Cc.mjs} +2 -2
  127. package/dist/chunk-VAUOI2AC-jixxcqz-.mjs +2 -0
  128. package/dist/{chunk-VJFXDYWH-DXnppZsu.mjs → chunk-VJFXDYWH-CsNcAcBk.mjs} +2 -2
  129. package/dist/{chunk-VOBGTVA6-_4QbVbSJ.mjs → chunk-VOBGTVA6-C9eHBVbd.mjs} +2 -2
  130. package/dist/{chunk-VR4S4FIN-RUJ5PgRH.mjs → chunk-VR4S4FIN-C_LXRmnl.mjs} +2 -2
  131. package/dist/{chunk-VYOJP4TV-DG_cm0JM.mjs → chunk-VYOJP4TV-BUWMbzbv.mjs} +2 -2
  132. package/dist/{chunk-WKFATFPP-DygaP6No.mjs → chunk-WKFATFPP-BENmMUsK.mjs} +2 -2
  133. package/dist/{chunk-WYO6CB5R-DN1R0VLx.mjs → chunk-WYO6CB5R-Brxa0zhE.mjs} +2 -2
  134. package/dist/{chunk-X2AJGDEF-BXjUENXL.mjs → chunk-X2AJGDEF-Bub3T_lz.mjs} +1 -1
  135. package/dist/{chunk-XKQRETAK-CYJSOFLN.mjs → chunk-XKQRETAK-DHeM48F0.mjs} +2 -2
  136. package/dist/{chunk-XKWWSDBF-BTj39eCO.mjs → chunk-XKWWSDBF-ni5TCqSh.mjs} +2 -2
  137. package/dist/{chunk-XVDPCNWR-BSVT7Ttz.mjs → chunk-XVDPCNWR-DoK2rHj9.mjs} +2 -2
  138. package/dist/chunk-XXDRQBXY-CQXT_9AZ.mjs +2 -0
  139. package/dist/{chunk-Y2CYZVJY-acXC9Sbb.mjs → chunk-Y2CYZVJY-BW8wJnWV.mjs} +1 -1
  140. package/dist/{chunk-YMMW5UAP-CE-EQ2Is.mjs → chunk-YMMW5UAP-BQm_v5Kl.mjs} +2 -2
  141. package/dist/{chunk-YOTPTUD7-63S9b4Z2.mjs → chunk-YOTPTUD7-DNauVPQF.mjs} +2 -2
  142. package/dist/{chunk-YTNYSM6T-DFPh_641.mjs → chunk-YTNYSM6T-C3I3Zko5.mjs} +2 -2
  143. package/dist/{chunk-YULBWSET-B6FKJjk9.mjs → chunk-YULBWSET-CkTpBwtE.mjs} +2 -2
  144. package/dist/{chunk-Z6LRHWXI-BCgawaNX.mjs → chunk-Z6LRHWXI-BACRBvOV.mjs} +1 -1
  145. package/dist/{chunk-Z7JVV2SM-CTUpikzI.mjs → chunk-Z7JVV2SM-BtK-_LmQ.mjs} +2 -2
  146. package/dist/{chunk-ZGVPDNZ5-CyyHBEs2.mjs → chunk-ZGVPDNZ5-UmSUWBQJ.mjs} +2 -2
  147. package/dist/{chunk-ZIRB5QZD-K23GvNu-.mjs → chunk-ZIRB5QZD-CmUycQw3.mjs} +2 -2
  148. package/dist/{chunk-ZZO3UDB3-MiEiJy8J.mjs → chunk-ZZO3UDB3-Cz8Gdrsy.mjs} +2 -2
  149. package/dist/classDiagram-OUVF2IWQ-DkvHcHg8.mjs +2 -0
  150. package/dist/classDiagram-v2-EOCWNBFH-C9xEWxX3.mjs +2 -0
  151. package/dist/{clear-5CZ5X4YR-BICGLF_r.mjs → clear-5CZ5X4YR-BiAnnKkP.mjs} +1 -1
  152. package/dist/cli.mjs +61 -62
  153. package/dist/{column-WLPMMSTS-D0I9TpQ2.mjs → column-WLPMMSTS-B-DDJ8BB.mjs} +1 -1
  154. package/dist/{comm-5SLSESQG-D2Rs9Jmo.mjs → comm-5SLSESQG-Bra_WoCJ.mjs} +1 -1
  155. package/dist/constants-COPfVWti.mjs +2 -0
  156. package/dist/{cose-bilkent-JH36ORCC-B1gjUwU3.mjs → cose-bilkent-JH36ORCC-BfqwRENl.mjs} +2 -2
  157. package/dist/{du-WO2ENHXQ-oQRVbsEF.mjs → cp-XOYR4ABJ-DngaDNNP.mjs} +1 -1
  158. package/dist/{curl-47BFPSFW-Ko1BcK_R.mjs → curl-47BFPSFW-eHCZdiPu.mjs} +2 -2
  159. package/dist/{cut-OPC3VAGB-BAhJz0Qh.mjs → cut-OPC3VAGB-CivcnWkF.mjs} +1 -1
  160. package/dist/cynefin-VYW2F7L2-DPwh86oV.mjs +1 -0
  161. package/dist/{cynefinDiagram-TSTJHNR4-CoESbhp4.mjs → cynefinDiagram-TSTJHNR4-CpOWwyYe.mjs} +2 -2
  162. package/dist/{cytoscape.esm-D6l9Lhue.mjs → cytoscape.esm-S8jaq1C7.mjs} +1 -1
  163. package/dist/{dagre-BkPA5x_w.mjs → dagre-BaMkyuee.mjs} +2 -2
  164. package/dist/{dagre-VKFMJZFB-BhCtWAkc.mjs → dagre-VKFMJZFB-DwCCM0Xp.mjs} +2 -2
  165. package/dist/{head-HT2B6D2J-CHIR76LI.mjs → date-DD7FVA2V-jnHsShFZ.mjs} +1 -1
  166. package/dist/{defaultLocale-DN4qDyCE.mjs → defaultLocale-BWtuB8BB.mjs} +1 -1
  167. package/dist/{diagram-FQU43EPY-BdshpOzp.mjs → diagram-FQU43EPY-BQAC9zdy.mjs} +2 -2
  168. package/dist/{diagram-G47NLZAW-Lw1fB9_w.mjs → diagram-G47NLZAW-CuvDx6FS.mjs} +2 -2
  169. package/dist/{diagram-NH7WQ7WH-DnzwFaQq.mjs → diagram-NH7WQ7WH-C_jC8qIM.mjs} +2 -2
  170. package/dist/{diagram-OA4YK3LP-BXU-URV1.mjs → diagram-OA4YK3LP-Bn50iqJR.mjs} +2 -2
  171. package/dist/{diagram-WEI45ONY-CD_Zpcvk.mjs → diagram-WEI45ONY-BDhDmqvX.mjs} +2 -2
  172. package/dist/diff-HJF2MPDN-4GoCoHUK.mjs +1 -0
  173. package/dist/{dirname-LEMTZZFS-BG01-R4_.mjs → dirname-LEMTZZFS-BOmi4y1i.mjs} +1 -1
  174. package/dist/{dist-CMZz8-Ge.mjs → dist-C-LC4jV0.mjs} +1 -1
  175. package/dist/{cp-XOYR4ABJ-OfwEEWhR.mjs → du-WO2ENHXQ-B55Wl_Sp.mjs} +1 -1
  176. package/dist/{ebnfDiagram-CCIWWBDH-D-647A1u.mjs → ebnfDiagram-CCIWWBDH-BrF0vS_c.mjs} +2 -2
  177. package/dist/echo-O45JWWI2-BQH9Rbvo.mjs +1 -0
  178. package/dist/env-5EPCWSXR-Dw_d1C_s.mjs +1 -0
  179. package/dist/{erDiagram-Q63AITRT-DviwoNdm.mjs → erDiagram-Q63AITRT-ke2iIs_t.mjs} +2 -2
  180. package/dist/esm-DmX1RzAi.mjs +20 -0
  181. package/dist/eventmodeling-45OFAUF4-DGzNexs8.mjs +1 -0
  182. package/dist/{execAsync-BLKHjfg7.mjs → execAsync-BA_C-_A9.mjs} +1 -1
  183. package/dist/{execAsync-C5ympCkf.mjs → execAsync-BqpCoDXT.mjs} +1 -1
  184. package/dist/{expand-DTNXU4LQ-XU44HrWp.mjs → expand-DTNXU4LQ-HW95aAXH.mjs} +1 -1
  185. package/dist/expr-YYCVMXE3-S1QPzhwP.mjs +1 -0
  186. package/dist/{date-DD7FVA2V-BGJ9-l0O.mjs → file-IGDTDPLG-Bs0TzVWz.mjs} +1 -1
  187. package/dist/find-DH2ALKQS-Ds4UmE23.mjs +1 -0
  188. package/dist/flag-coverage-6JEX67RU-BwjLnPN2.mjs +2 -0
  189. package/dist/flowDiagram-23GEKE2U-CP46dUl2.mjs +1 -0
  190. package/dist/{fold-LDSORVYE-DumfsCQO.mjs → fold-LDSORVYE-D3m5AEML.mjs} +1 -1
  191. package/dist/{fs-traced-DJHV_QPy.mjs → fs-traced-BUirY9_X.mjs} +3 -3
  192. package/dist/fs-traced-CDdByB1Z.mjs +1 -0
  193. package/dist/{ganttDiagram-NO4QXBWP-DnN5cTGV.mjs → ganttDiagram-NO4QXBWP-COgIprWR.mjs} +2 -2
  194. package/dist/{getMachineId-bsd-B_NuwbXS.mjs → getMachineId-bsd-CIJruWed.mjs} +2 -2
  195. package/dist/{getMachineId-bsd-neTWr-l3.mjs → getMachineId-bsd-CR6ADOtk.mjs} +2 -2
  196. package/dist/{getMachineId-darwin-BP4aVKkL.mjs → getMachineId-darwin-CsjV7rRA.mjs} +2 -2
  197. package/dist/{getMachineId-darwin-DKDl-xYO.mjs → getMachineId-darwin-DfwRihra.mjs} +2 -2
  198. package/dist/{getMachineId-linux-Bexb2iRT.mjs → getMachineId-linux-BFZntue3.mjs} +1 -1
  199. package/dist/{getMachineId-linux-YTb5epZX.mjs → getMachineId-linux-Db26oBf8.mjs} +1 -1
  200. package/dist/{getMachineId-unsupported-Ddv20ynQ.mjs → getMachineId-unsupported-D0viNi1R.mjs} +1 -1
  201. package/dist/{getMachineId-unsupported-DdwXS_Q3.mjs → getMachineId-unsupported-DprC99Fl.mjs} +1 -1
  202. package/dist/{getMachineId-win-BNx0EbPq.mjs → getMachineId-win-51ZBNzaO.mjs} +2 -2
  203. package/dist/{getMachineId-win-D8cNuBNk.mjs → getMachineId-win-BK2WTxBT.mjs} +2 -2
  204. package/dist/gitGraph-TEB2WS4Q-BmT0y88b.mjs +1 -0
  205. package/dist/{gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs → gitGraphDiagram-IHSO6WYX-Dii-ToNc.mjs} +2 -2
  206. package/dist/{graphlib-DXQPHTiH.mjs → graphlib-BDAowsct.mjs} +1 -1
  207. package/dist/grep-2HUTXO5U-xFL26YrS.mjs +1 -0
  208. package/dist/gzip-AQXSGOVS-CSmJK8Rj.mjs +1 -0
  209. package/dist/{file-IGDTDPLG-sPfWVy9T.mjs → head-HT2B6D2J-CfgVUXjv.mjs} +1 -1
  210. package/dist/help-VVWX7SA5-DOWLYy0x.mjs +1 -0
  211. package/dist/history-J4QRNGRO-Dche7T8E.mjs +1 -0
  212. package/dist/{hostname-BK6HG2DE-Clwz043m.mjs → hostname-BK6HG2DE-DQrUsDdl.mjs} +1 -1
  213. package/dist/html-to-markdown-TFCECAGV-CS2kaY1h.mjs +1 -0
  214. package/dist/index.mjs +1 -1
  215. package/dist/info-DKCQHKI2-svktUZ6l.mjs +1 -0
  216. package/dist/{infoDiagram-FWYZ7A6U-CD5T72Pd.mjs → infoDiagram-FWYZ7A6U-DPvNkkYe.mjs} +2 -2
  217. package/dist/init-BvRbf5jC.mjs +1 -0
  218. package/dist/{init-D8OKme52.mjs → init-DRQyOUkz.mjs} +1 -1
  219. package/dist/{init-Bi1d2uLD.mjs → init-pIJddeyG.mjs} +43 -43
  220. package/dist/{ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs → ishikawaDiagram-FXEZZL3T-B1d77HdO.mjs} +2 -2
  221. package/dist/{join-GG2LDHE5-BIH_-8vD.mjs → join-GG2LDHE5-D3-YSo2O.mjs} +1 -1
  222. package/dist/{journeyDiagram-5HDEW3XC-BywkQV2b.mjs → journeyDiagram-5HDEW3XC-DE8I99vn.mjs} +2 -2
  223. package/dist/jq-LYZFFBZB-BPcTXH--.mjs +1 -0
  224. package/dist/{js-exec-VXN6TZ7U-BrugyKqi.mjs → js-exec-VXN6TZ7U-14kXJVQY.mjs} +2 -2
  225. package/dist/{kanban-definition-HUTT4EX6-DIgH0tMg.mjs → kanban-definition-HUTT4EX6-Cw3CuKcg.mjs} +2 -2
  226. package/dist/{launch-json-removal-BUYuUwT_.mjs → launch-json-removal-CnIk3WE-.mjs} +2 -2
  227. package/dist/{lib-DuDqLKFD.mjs → lib-DD6URxCv.mjs} +1 -1
  228. package/dist/{lib-ozx_WsjS.mjs → lib-GfyUqUMQ.mjs} +1 -1
  229. package/dist/{line-eTDW_zUy.mjs → line-CJOWyLcQ.mjs} +2 -2
  230. package/dist/{linear-Cn1royVQ.mjs → linear-B98AeboV.mjs} +2 -2
  231. package/dist/{ln-4TRFBYAT-B0hi-FAf.mjs → ln-4TRFBYAT-DDI4VC8k.mjs} +1 -1
  232. package/dist/loader-B2V-uVIv.mjs +1 -0
  233. package/dist/{loader-DXsqPNjF.mjs → loader-BeDgboJk.mjs} +2 -2
  234. package/dist/{logger-DFxEUjvj.mjs → logger-CnfEoHs1.mjs} +2 -2
  235. package/dist/ls-KSXFZCWH-DtBVxnlG.mjs +1 -0
  236. package/dist/{lzma-CD6C2vYw.mjs → lzma-BHUlFqhy.mjs} +1 -1
  237. package/dist/{map-bDB3k8vA.mjs → map--Gi5y9ID.mjs} +2 -2
  238. package/dist/{mcp-migrate-event-B1gJf6bG.mjs → mcp-migrate-event-BsswfOLm.mjs} +1 -1
  239. package/dist/md5sum-INMIK4DX-6QMuVHyp.mjs +1 -0
  240. package/dist/{mermaid-parser.core-uwQfwzUX.mjs → mermaid-parser.core-l2oLJb5a.mjs} +2 -2
  241. package/dist/{mermaid.core-BgpKViY0.mjs → mermaid.core-BW-ojLzZ.mjs} +3 -3
  242. package/dist/{mindmap-definition-LN4V7U3C-H3p7uT-G.mjs → mindmap-definition-LN4V7U3C-DszaH9jw.mjs} +2 -2
  243. package/dist/mkdir-TDEMSB6C-B7FUPgJT.mjs +1 -0
  244. package/dist/mv-Z6MORUFL-CiC5IjMZ.mjs +1 -0
  245. package/dist/{nl-U5YJDM32-BO1kUpkn.mjs → nl-U5YJDM32-D0P18t46.mjs} +1 -1
  246. package/dist/{od-VJEF2UR5-DxUGtlve.mjs → od-VJEF2UR5-CVvpPv2t.mjs} +1 -1
  247. package/dist/{open-browser-CHq05YCN.mjs → open-browser-OsCLGa-m.mjs} +2 -2
  248. package/dist/{ordinal-BFK2XMXf.mjs → ordinal-BAodviWw.mjs} +2 -2
  249. package/dist/packet-7NZHBO7P-Bwz73sSr.mjs +1 -0
  250. package/dist/paste-7N6AFSDS-wGVGynNz.mjs +1 -0
  251. package/dist/{path-CIoCsClp.mjs → path-BHIKZp6_.mjs} +1 -1
  252. package/dist/{pegDiagram-2B236MQR-PBU61CXk.mjs → pegDiagram-2B236MQR-BWcVFngN.mjs} +2 -2
  253. package/dist/pie-RZYD4A2V-CE38luFp.mjs +1 -0
  254. package/dist/{pieDiagram-ENE6RG2P-ClZWrO6e.mjs → pieDiagram-ENE6RG2P-C3vtfksj.mjs} +2 -2
  255. package/dist/preview-B9gSOFlh.mjs +1 -0
  256. package/dist/{preview-BENkmrSy.mjs → preview-hjy0gI0i.mjs} +2 -2
  257. package/dist/printf-CX64KX2P-CaJGJKBk.mjs +1 -0
  258. package/dist/pwd-D4OZ7N27-BSUHCKp6.mjs +1 -0
  259. package/dist/{python3-DNGS4G3E-OzxoFG34.mjs → python3-DNGS4G3E-B2EbGP6l.mjs} +2 -2
  260. package/dist/{quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs → quadrantDiagram-ABIIQ3AL-CiO_sFTm.mjs} +2 -2
  261. package/dist/radar-I7S5WNFK-pz955tjg.mjs +1 -0
  262. package/dist/railroad-3IZDKUUU-AFlm6w4m.mjs +1 -0
  263. package/dist/railroad-abnf-AHOZXSZD-BTUueThU.mjs +1 -0
  264. package/dist/railroad-ebnf-EBAXGLYW-BUaSAE_y.mjs +1 -0
  265. package/dist/railroad-peg-LSFZ7HO6-WqmNlxVP.mjs +1 -0
  266. package/dist/{railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs → railroadDiagram-RFXS5EU6-DkLolDmi.mjs} +2 -2
  267. package/dist/readlink-MI4GCHJF-jTt0vAz9.mjs +1 -0
  268. package/dist/{repair-launch-json-D_fCoitG.mjs → repair-launch-json-BocgwEI5.mjs} +2 -2
  269. package/dist/repair-mcp-configs-BrBkt_hT.mjs +2 -0
  270. package/dist/repair-skills-BMZ7VleT.mjs +1 -0
  271. package/dist/repair-skills-C-3CmI5S.mjs +4 -0
  272. package/dist/{requirementDiagram-TGXJPOKE-H6OWjjJE.mjs → requirementDiagram-TGXJPOKE-DIdD7wig.mjs} +2 -2
  273. package/dist/{rev-XOSYPP45-BYe7prl1.mjs → rev-XOSYPP45-BSIdnqPx.mjs} +1 -1
  274. package/dist/rg-XNF3R3II-C4OSm0Dp.mjs +1 -0
  275. package/dist/rm-RTZG23RL--LfClUwt.mjs +1 -0
  276. package/dist/rmdir-XTQXT7RK-Dfu2C4rD.mjs +1 -0
  277. package/dist/{rough.cjs-BGkc0Naf.mjs → rough.cjs-CV0Ml7Xq.mjs} +1 -1
  278. package/dist/{sankeyDiagram-HTMAVEWB-CtBVJJox.mjs → sankeyDiagram-HTMAVEWB-BCm3ffYX.mjs} +2 -2
  279. package/dist/{sed-JAPPVBEU-D9bYEx2I.mjs → sed-JAPPVBEU-CDtlHkuH.mjs} +1 -1
  280. package/dist/seq-RN5ZUASB-C9jABiAl.mjs +1 -0
  281. package/dist/{sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs → sequenceDiagram-DBY2YBRQ-ytgs0V7Z.mjs} +2 -2
  282. package/dist/server-lock-C_lebUd3.mjs +1 -0
  283. package/dist/{server-lock-qqJQphTS.mjs → server-lock-DbS4Uxaj.mjs} +2 -2
  284. package/dist/sha1sum-VJPNLNU6-DxVErSr_.mjs +1 -0
  285. package/dist/sha256sum-PI32XWXY-EG_naFg1.mjs +1 -0
  286. package/dist/{sizeCapture-X5ZJPWSS-Izaz24Pi.mjs → sizeCapture-X5ZJPWSS-ChxCz8k2.mjs} +2 -2
  287. package/dist/{skill-teardown-B4kT3Fxa.mjs → skill-teardown-CH2C4nmj.mjs} +2 -2
  288. package/dist/{sleep-VZFPZFWA-5fZFI3Vy.mjs → sleep-VZFPZFWA-B7Ffcstc.mjs} +1 -1
  289. package/dist/sort-DCNRDA7U-BysvX8_9.mjs +1 -0
  290. package/dist/{split-SITCSYCZ-BdATfTxU.mjs → split-SITCSYCZ-BplA1_68.mjs} +1 -1
  291. package/dist/{sqlite3-TE5AIOTF-BIRMe0xz.mjs → sqlite3-TE5AIOTF-BbzgGp0m.mjs} +1 -1
  292. package/dist/{src-BPVU4Y0o.mjs → src-BbZVR6qh.mjs} +2 -2
  293. package/dist/src-BxyYlbvx.mjs +1 -0
  294. package/dist/src-DFKvCzqo.mjs +20 -0
  295. package/dist/{src-n7camJHB.mjs → src-Dg0jHVcz.mjs} +1 -1
  296. package/dist/src-y0X27yQX.mjs +2032 -0
  297. package/dist/start-C9fu-159.mjs +1 -0
  298. package/dist/start-Dtt8oak3.mjs +10 -0
  299. package/dist/stat-BT5A227F-CXXodVC_.mjs +1 -0
  300. package/dist/{stateDiagram-2N3HPSRC-pAn2bDnn.mjs → stateDiagram-2N3HPSRC-BL08Hdlz.mjs} +2 -2
  301. package/dist/stateDiagram-v2-6OUMAXLB-DWhomgSq.mjs +2 -0
  302. package/dist/strings-7PLOGTPD-Nwy6Xrva.mjs +1 -0
  303. package/dist/{swimlanes-5IMT3BWC-nSsjdSnj.mjs → swimlanes-5IMT3BWC-BLoq7OFB.mjs} +2 -2
  304. package/dist/swimlanesDiagram-G3AALYLV-Cv2Skneu.mjs +9 -0
  305. package/dist/{tac-SJGXQ4T2-DphHfCAY.mjs → tac-SJGXQ4T2-CDjky8wm.mjs} +1 -1
  306. package/dist/tail-S5ULNTJU-BeMiY4Ip.mjs +1 -0
  307. package/dist/{tar-MZQD7NO4-oAQoyk28.mjs → tar-MZQD7NO4-CvmpRV6c.mjs} +1 -1
  308. package/dist/tee-O7VXZDCO-DvqoGhss.mjs +1 -0
  309. package/dist/time-DEUO3QV2-wD_Yk1Gc.mjs +1 -0
  310. package/dist/{timeline-definition-FHXFAJF6-CnTXJoEq.mjs → timeline-definition-FHXFAJF6-B04TQQaT.mjs} +2 -2
  311. package/dist/{timeout-VRKMCG72-jeMAkAMc.mjs → timeout-VRKMCG72-0jgK5Ox1.mjs} +1 -1
  312. package/dist/touch-DX2IJOQ4-DJPgV9CW.mjs +1 -0
  313. package/dist/tr-2HXZRDSW-sXW7fivD.mjs +1 -0
  314. package/dist/tree-LYXBS7DC-CvV2g1Ry.mjs +1 -0
  315. package/dist/treeView-QDETBFTQ-c4b9tG2O.mjs +1 -0
  316. package/dist/treemap-6X3UGDF4-DrpuzrWt.mjs +1 -0
  317. package/dist/true-WHJNXCHG-BZzpC6GD.mjs +1 -0
  318. package/dist/ui-B35mCBIN.mjs +3 -0
  319. package/dist/ui-D9Vnv2aH.mjs +1 -0
  320. package/dist/unexpand-RGTMIGZM-DNf7-ZPk.mjs +1 -0
  321. package/dist/uniq-SUNANL47-B-K7MChP.mjs +1 -0
  322. package/dist/{vennDiagram-L72KCM5P-CqTzYRfa.mjs → vennDiagram-L72KCM5P-Ceol1qSg.mjs} +2 -2
  323. package/dist/wardley-OPB4EBWU-B4h8UV8p.mjs +1 -0
  324. package/dist/{wardleyDiagram-EHGQE667-WhxG-nRT.mjs → wardleyDiagram-EHGQE667-DNEGm0iK.mjs} +2 -2
  325. package/dist/wc-TQB3VNOX-BSm-v72n.mjs +1 -0
  326. package/dist/which-XZHEH76L-BOgRrNLi.mjs +1 -0
  327. package/dist/whoami-DGKU3D2X-BsXYdCHU.mjs +1 -0
  328. package/dist/write-project-skill-BP9EVRr-.mjs +38 -0
  329. package/dist/xan-UD7JYIL2-BXWuwgCX.mjs +1 -0
  330. package/dist/xan-view-OW2TB7Z3-BGaBgg3C.mjs +1 -0
  331. package/dist/xargs-I6EZUCYF-DFS4BAln.mjs +1 -0
  332. package/dist/{xychartDiagram-FW5EYKEG-DDE7TRrw.mjs → xychartDiagram-FW5EYKEG-D7BmnN1n.mjs} +2 -2
  333. package/dist/yq-OAKYHSXH-T6sHAYIQ.mjs +1 -0
  334. package/package.json +4 -4
  335. package/dist/alias-JE7RI5QX-VxEqWoTW.mjs +0 -1
  336. package/dist/architecture-TIHT7OUA-Bl3hpxt3.mjs +0 -1
  337. package/dist/bash-IJWYRKFO-jaJEvAZe.mjs +0 -1
  338. package/dist/channel-Cjp51EO_.mjs +0 -2
  339. package/dist/chunk-VAUOI2AC-BdotBBDE.mjs +0 -2
  340. package/dist/chunk-XXDRQBXY-D1gFTzjI.mjs +0 -2
  341. package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +0 -2
  342. package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +0 -2
  343. package/dist/constants-DLJSo46_.mjs +0 -2
  344. package/dist/cynefin-VYW2F7L2-C-aICrN-.mjs +0 -1
  345. package/dist/diff-HJF2MPDN-CQAaA8lM.mjs +0 -1
  346. package/dist/echo-O45JWWI2-BPosfKdD.mjs +0 -1
  347. package/dist/env-5EPCWSXR-DygzVPiG.mjs +0 -1
  348. package/dist/eventmodeling-45OFAUF4-CJqJ2hnR.mjs +0 -1
  349. package/dist/expr-YYCVMXE3-DI2glLwn.mjs +0 -1
  350. package/dist/find-DH2ALKQS-CEKaRkgJ.mjs +0 -1
  351. package/dist/flag-coverage-6JEX67RU-QmoBigPs.mjs +0 -2
  352. package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +0 -1
  353. package/dist/fs-traced-GKhfy5ua.mjs +0 -1
  354. package/dist/gitGraph-TEB2WS4Q-_V7TMkJv.mjs +0 -1
  355. package/dist/grep-2HUTXO5U-DG5Ulinc.mjs +0 -1
  356. package/dist/gzip-AQXSGOVS-D6UYmM0C.mjs +0 -1
  357. package/dist/help-VVWX7SA5-BbK0QLPX.mjs +0 -1
  358. package/dist/history-J4QRNGRO-5XgHJL_Q.mjs +0 -1
  359. package/dist/html-to-markdown-TFCECAGV-BsVwcc4T.mjs +0 -1
  360. package/dist/info-DKCQHKI2-DIsEz1l_.mjs +0 -1
  361. package/dist/init-CqUUUDta.mjs +0 -1
  362. package/dist/jq-LYZFFBZB-Dlyx6Y7w.mjs +0 -1
  363. package/dist/loader-DAMg0xnL.mjs +0 -1
  364. package/dist/ls-KSXFZCWH-C_kbnNdU.mjs +0 -1
  365. package/dist/md5sum-INMIK4DX-DGvi_A-E.mjs +0 -1
  366. package/dist/mkdir-TDEMSB6C-CMOt1jIT.mjs +0 -1
  367. package/dist/mv-Z6MORUFL-CqyCV_Ze.mjs +0 -1
  368. package/dist/packet-7NZHBO7P-B64OS2eJ.mjs +0 -1
  369. package/dist/paste-7N6AFSDS-BJHZcYXH.mjs +0 -1
  370. package/dist/pie-RZYD4A2V-B313HDTA.mjs +0 -1
  371. package/dist/preview-aNluJ6KN.mjs +0 -1
  372. package/dist/printf-CX64KX2P-841sNxew.mjs +0 -1
  373. package/dist/pwd-D4OZ7N27-C41v1g3B.mjs +0 -1
  374. package/dist/radar-I7S5WNFK-BdiwGd2_.mjs +0 -1
  375. package/dist/railroad-3IZDKUUU-O4nBw7jb.mjs +0 -1
  376. package/dist/railroad-abnf-AHOZXSZD-CDaO5Dcu.mjs +0 -1
  377. package/dist/railroad-ebnf-EBAXGLYW-CS4l_gpR.mjs +0 -1
  378. package/dist/railroad-peg-LSFZ7HO6-bbLhALeS.mjs +0 -1
  379. package/dist/readlink-MI4GCHJF-CQlQ03aa.mjs +0 -1
  380. package/dist/repair-mcp-configs-C3cLZGEE.mjs +0 -2
  381. package/dist/repair-skills-BKjhKhUN.mjs +0 -4
  382. package/dist/repair-skills-DN4OicpR.mjs +0 -1
  383. package/dist/rg-XNF3R3II-CmxxmmUf.mjs +0 -1
  384. package/dist/rm-RTZG23RL-Bl5s9ltJ.mjs +0 -1
  385. package/dist/rmdir-XTQXT7RK-C1ccje2_.mjs +0 -1
  386. package/dist/seq-RN5ZUASB-CFySG-xk.mjs +0 -1
  387. package/dist/server-lock-rwNc7NVh.mjs +0 -1
  388. package/dist/sha1sum-VJPNLNU6-DgLJCjAg.mjs +0 -1
  389. package/dist/sha256sum-PI32XWXY-DZ42pgY3.mjs +0 -1
  390. package/dist/sort-DCNRDA7U-RFl0HYBr.mjs +0 -1
  391. package/dist/src-BB2_Ksle.mjs +0 -2032
  392. package/dist/src-DyAkipH8.mjs +0 -1
  393. package/dist/src-Joe5Ft2d.mjs +0 -20
  394. package/dist/start-BUeLlQd8.mjs +0 -1
  395. package/dist/start-CYM9hyHf.mjs +0 -4
  396. package/dist/stat-BT5A227F-Dd-OyLQQ.mjs +0 -1
  397. package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +0 -2
  398. package/dist/strings-7PLOGTPD-v3qEuUEm.mjs +0 -1
  399. package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +0 -9
  400. package/dist/tail-S5ULNTJU-D6qRQZwV.mjs +0 -1
  401. package/dist/tee-O7VXZDCO-odVO6Wjw.mjs +0 -1
  402. package/dist/time-DEUO3QV2-CviQF55F.mjs +0 -1
  403. package/dist/touch-DX2IJOQ4-CyiMRd7b.mjs +0 -1
  404. package/dist/tr-2HXZRDSW-CCce6lU_.mjs +0 -1
  405. package/dist/tree-LYXBS7DC-pAC77Hbt.mjs +0 -1
  406. package/dist/treeView-QDETBFTQ-BCAjffnq.mjs +0 -1
  407. package/dist/treemap-6X3UGDF4-Dv-54pyt.mjs +0 -1
  408. package/dist/true-WHJNXCHG-Dzdq7R5f.mjs +0 -1
  409. package/dist/unexpand-RGTMIGZM-B06mOUPB.mjs +0 -1
  410. package/dist/uniq-SUNANL47-BIgIOFSf.mjs +0 -1
  411. package/dist/wardley-OPB4EBWU-DSvo57UC.mjs +0 -1
  412. package/dist/wc-TQB3VNOX-9RyJlZXB.mjs +0 -1
  413. package/dist/which-XZHEH76L-SMFjHhz2.mjs +0 -1
  414. package/dist/whoami-DGKU3D2X-BIUooLXE.mjs +0 -1
  415. package/dist/write-project-skill-BD0rO6kN.mjs +0 -56
  416. package/dist/xan-UD7JYIL2-DAuAMQ0H.mjs +0 -1
  417. package/dist/xan-view-OW2TB7Z3-CwG0zS53.mjs +0 -1
  418. package/dist/xargs-I6EZUCYF-INAdKqnR.mjs +0 -1
  419. package/dist/yq-OAKYHSXH-C1fFFHD4.mjs +0 -1
  420. /package/dist/{expansion-VBDYWVZR-CpX0YZMb.mjs → expansion-VBDYWVZR-C0SApT6U.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ct as r}from"./sleep-DdJljU3h.mjs";import{$o as i,K as a,U as o,jo as s,ms as c}from"./src-c73kUNxd.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-BB2_Ksle.mjs";import{F as w,N as se}from"./fs-traced-DJHV_QPy.mjs";import{_ as ce,a as le,b as T,c as ue,d as de,i as fe,l as pe,o as E,r as me,t as he,u as ge,v as _e}from"./write-project-skill-BD0rO6kN.mjs";import{i as D,n as O,o as k,r as ve,s as A,t as j}from"./colors-BsmVIwfM.mjs";import{t as ye}from"./constants-DLJSo46_.mjs";import{t as M}from"./is-object-ByG7RnjH.mjs";import{t as be}from"./preview-BENkmrSy.mjs";import{createRequire as xe}from"node:module";import{execFileSync as Se}from"node:child_process";import Ce,{dirname as N,isAbsolute as P,join as F,relative as I,resolve as we,sep as Te}from"node:path";import L from"node:process";import{fileURLToPath as Ee}from"node:url";import{existsSync as R,lstatSync as De,mkdirSync as Oe,readFileSync as z,readlinkSync as ke,realpathSync as Ae,statSync as je,writeFileSync as Me}from"node:fs";import{homedir as Ne}from"node:os";import*as Pe from"node:readline";import{inspect as Fe,stripVTControlCharacters as Ie,styleText as B}from"node:util";import{AsyncLocalStorage as Le,AsyncResource as Re}from"node:async_hooks";const ze=new Set([`emacs`,`vim`]);function Be(e){return ze.has(e)}function Ve(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Be))):[]}const V=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,He=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Ue=e=>e.name===`space`,We=e=>e.name===`backspace`,Ge=e=>`1234567890`.includes(e.name),Ke=e=>e.name===`enter`||e.name===`return`;var qe=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},Je=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ye=class extends Error{name=`ExitPromptError`},Xe=class extends Error{name=`HookError`},Ze=class extends Error{name=`ValidationError`};const Qe=new Le;function $e(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function et(e,t){let n=$e(e);return Qe.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function H(){let e=Qe.getStore();if(!e)throw new Xe(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function tt(){return H().rl}function nt(e){return Re.bind((...t)=>{let n=H(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function rt(e){let t=H(),{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 it(){H().handleChange()}const U={queue(e){let t=H(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(tt());if(r!=null&&typeof r!=`function`)throw new Ze(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=H();nt(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=H();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function at(e){return typeof e==`function`}function W(e){return rt(t=>{let n=Re.bind(function(e){t.get()!==e&&(t.set(e),it())});if(t.initialized)return[t.get(),n];let r=at(e)?e():e;return t.set(r),[r,n]})}function ot(e,t){rt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&U.queue(e),n.set(t)})}function st(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const ct={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},lt={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},ut={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},dt={...ct,...lt},ft={...ct,...ut},G=st()?dt:ft;Object.entries(lt);const pt={prefix:{idle:B(`blue`,`?`),done:B(`green`,G.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>B(`yellow`,e))},keybindings:[],style:{answer:e=>B(`cyan`,e),message:e=>B(`bold`,e),error:e=>B(`red`,`> ${e}`),defaultAnswer:e=>B(`dim`,`(${e})`),help:e=>B(`dim`,e),highlight:e=>B(`cyan`,e),key:e=>B(`cyan`,B(`bold`,`<${e}>`))}};function mt(){return{...pt,keybindings:Ve()}}function ht(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gt(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=ht(n)&&ht(r)?gt(n,r):r}return t}function _t(...e){return gt(mt(),...e.filter(e=>e!=null))}function vt({status:e=`idle`,theme:t}){let[n,r]=W(!1),[i,a]=W(0),{prefix:o,spinner:s}=_t(t);return ot(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function yt(e,t){return rt(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function bt(e){return W({current:e})[0]}function xt(e){let t=bt(e);t.current=e,ot(e=>{let n=!1,r=nt((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var St=t(n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}))(),1);const Ct=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),wt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Tt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Dt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ot=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,kt=/\t{1,1000}/y,At=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,jt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Mt=/\p{M}+/gu,Nt={limit:1/0,ellipsis:``},Pt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Pt(i,Nt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[jt,l],[Et,0],[Dt,o],[kt,s],[At,c],[Ot,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Mt,``)){let t=e.codePointAt(0)||0;if(S=wt(t)?2:Tt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Ot?Ct(e.slice(p,n.lastIndex)):n===At?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},Ft={limit:1/0,ellipsis:``,ellipsisWidth:0},K=(e,t={})=>Pt(e,Ft,t).width,It=`]8;;`,Lt=RegExp(`(?:\\[(?<code>\\d+)m|\\${It}(?<uri>.*))`,`y`),Rt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},zt=e=>`[${e}m`,Bt=e=>`${It}${e}`,Vt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:K(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=K(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(It,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ht=e=>{let t=e.split(` `),n=t.length;for(;n&&!K(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ut=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=K(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=K(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Vt(s,r,t),c=K(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Vt(s,r,t),c=K(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Vt(s,r,t),c=K(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ht(e)));let l=s.join(`
1
+ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ct as r}from"./sleep-DdJljU3h.mjs";import{$o as i,K as a,U as o,jo as s,ms as c}from"./src-c73kUNxd.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-y0X27yQX.mjs";import{F as w,N as se}from"./fs-traced-BUirY9_X.mjs";import{r as ce,t as T}from"./esm-DmX1RzAi.mjs";import{i as E,n as D,o as O,r as le,s as k,t as A}from"./colors-BsmVIwfM.mjs";import{t as ue}from"./constants-COPfVWti.mjs";import{t as j}from"./is-object-ByG7RnjH.mjs";import{_ as de,a as fe,c as pe,d as me,i as he,l as ge,o as M,r as _e,t as ve,u as ye}from"./write-project-skill-BP9EVRr-.mjs";import{t as be}from"./preview-hjy0gI0i.mjs";import{createRequire as xe}from"node:module";import{execFileSync as Se}from"node:child_process";import Ce,{dirname as N,isAbsolute as P,join as F,relative as I,resolve as we,sep as Te}from"node:path";import L from"node:process";import{fileURLToPath as Ee}from"node:url";import{existsSync as R,lstatSync as De,mkdirSync as Oe,readFileSync as z,readlinkSync as ke,realpathSync as Ae,statSync as je,writeFileSync as Me}from"node:fs";import{homedir as Ne}from"node:os";import*as Pe from"node:readline";import{inspect as Fe,stripVTControlCharacters as Ie,styleText as B}from"node:util";import{AsyncLocalStorage as Le,AsyncResource as Re}from"node:async_hooks";const ze=new Set([`emacs`,`vim`]);function Be(e){return ze.has(e)}function Ve(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Be))):[]}const V=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,He=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Ue=e=>e.name===`space`,We=e=>e.name===`backspace`,Ge=e=>`1234567890`.includes(e.name),Ke=e=>e.name===`enter`||e.name===`return`;var qe=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},Je=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ye=class extends Error{name=`ExitPromptError`},Xe=class extends Error{name=`HookError`},Ze=class extends Error{name=`ValidationError`};const Qe=new Le;function $e(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function et(e,t){let n=$e(e);return Qe.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function H(){let e=Qe.getStore();if(!e)throw new Xe(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function tt(){return H().rl}function nt(e){return Re.bind((...t)=>{let n=H(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function rt(e){let t=H(),{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 it(){H().handleChange()}const U={queue(e){let t=H(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(tt());if(r!=null&&typeof r!=`function`)throw new Ze(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=H();nt(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=H();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function at(e){return typeof e==`function`}function W(e){return rt(t=>{let n=Re.bind(function(e){t.get()!==e&&(t.set(e),it())});if(t.initialized)return[t.get(),n];let r=at(e)?e():e;return t.set(r),[r,n]})}function ot(e,t){rt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&U.queue(e),n.set(t)})}function st(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const ct={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},lt={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},ut={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},dt={...ct,...lt},ft={...ct,...ut},G=st()?dt:ft;Object.entries(lt);const pt={prefix:{idle:B(`blue`,`?`),done:B(`green`,G.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>B(`yellow`,e))},keybindings:[],style:{answer:e=>B(`cyan`,e),message:e=>B(`bold`,e),error:e=>B(`red`,`> ${e}`),defaultAnswer:e=>B(`dim`,`(${e})`),help:e=>B(`dim`,e),highlight:e=>B(`cyan`,e),key:e=>B(`cyan`,B(`bold`,`<${e}>`))}};function mt(){return{...pt,keybindings:Ve()}}function ht(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function gt(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=ht(n)&&ht(r)?gt(n,r):r}return t}function _t(...e){return gt(mt(),...e.filter(e=>e!=null))}function vt({status:e=`idle`,theme:t}){let[n,r]=W(!1),[i,a]=W(0),{prefix:o,spinner:s}=_t(t);return ot(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function yt(e,t){return rt(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function bt(e){return W({current:e})[0]}function xt(e){let t=bt(e);t.current=e,ot(e=>{let n=!1,r=nt((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var St=t(n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}))(),1);const Ct=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),wt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Tt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Dt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ot=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,kt=/\t{1,1000}/y,At=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,jt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Mt=/\p{M}+/gu,Nt={limit:1/0,ellipsis:``},Pt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Pt(i,Nt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[jt,l],[Et,0],[Dt,o],[kt,s],[At,c],[Ot,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Mt,``)){let t=e.codePointAt(0)||0;if(S=wt(t)?2:Tt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===Ot?Ct(e.slice(p,n.lastIndex)):n===At?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},Ft={limit:1/0,ellipsis:``,ellipsisWidth:0},K=(e,t={})=>Pt(e,Ft,t).width,It=`]8;;`,Lt=RegExp(`(?:\\[(?<code>\\d+)m|\\${It}(?<uri>.*))`,`y`),Rt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},zt=e=>`[${e}m`,Bt=e=>`${It}${e}`,Vt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:K(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=K(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===`›`)&&(i=!0,a=t.startsWith(It,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ht=e=>{let t=e.split(` `),n=t.length;for(;n&&!K(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ut=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=K(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=K(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Vt(s,r,t),c=K(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Vt(s,r,t),c=K(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Vt(s,r,t),c=K(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ht(e)));let l=s.join(`
2
2
  `),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===`›`){Lt.lastIndex=e+1;let t=Lt.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
3
3
  `){a&&(r+=Bt(``));let e=i?Rt(i):void 0;i&&e&&(r+=zt(e))}else t===`
4
4
  `&&(i&&Rt(i)&&(r+=zt(i)),a&&(r+=Bt(a)))}return r},Wt=/\r?\n/;function Gt(e,t,n){return String(e).normalize().split(Wt).map(e=>Ut(e,t,n)).join(`
@@ -12,19 +12,19 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ct as r}from"./sle
12
12
  `).pop()??``;var yn=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=``){let n=Ie(vn(e)),r=n;this.rl.line.length>0&&(r=r.slice(0,-this.rl.line.length)),this.rl.setPrompt(r),this.cursorPos=this.rl.getCursorPos();let i=qt();e=Kt(e,i),t=Kt(t,i),n.length%i===0&&(e+=`
13
13
  `);let a=e+(t?`
14
14
  `+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?_n(t):0);o>0&&(a+=fn(o)),a+=mn(this.cursorPos.cols),this.write(pn(this.extraLinesUnderPrompt)+gn(this.height)+a),this.extraLinesUnderPrompt=o,this.height=_n(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(mn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=pn(this.extraLinesUnderPrompt);t+=e?gn(this.height):`
15
- `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},bn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const xn=globalThis.setImmediate;function Sn(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function Cn(e){let t=Sn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Xt.default;s.pipe(r.output??process.stdout);let c=Pe.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new yn(c),{promise:u,resolve:d,reject:f}=bn.withResolver(),p=()=>f(new Je);if(a){let e=()=>f(new qe({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(cn((e,t)=>{f(new Ye(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new Ye(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),et(c,a=>{let m=Re.bind(()=>U.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=Ce.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),U.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?xn(h):h(),Object.assign(u.then(e=>(U.clearAll(),e),e=>{throw U.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var J=class{separator=B(`dim`,Array.from({length:15}).join(G.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},wn=r();const Tn=`**/.ok/*`,En=`!**/${c}/`;function Dn(e){let t=[`.ok/`,`.okignore`];for(let n of fe){let r=E[n];r.projectConfigPath&&t.push(zn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=F(e,...o);if(R(n))try{let e=a(z(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 On(e,t){let n=Nn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Pn(n)};let r=Fn(e);if(r.kind!==`ok`)return r.result;let i=R(r.path)?z(r.path,`utf-8`):``,a=Rn(i),o=[],s=[];for(let e of t)Ln(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(`
15
+ `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},bn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const xn=globalThis.setImmediate;function Sn(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function Cn(e){let t=Sn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Xt.default;s.pipe(r.output??process.stdout);let c=Pe.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new yn(c),{promise:u,resolve:d,reject:f}=bn.withResolver(),p=()=>f(new Je);if(a){let e=()=>f(new qe({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(cn((e,t)=>{f(new Ye(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new Ye(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),et(c,a=>{let m=Re.bind(()=>U.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=Ce.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),U.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?xn(h):h(),Object.assign(u.then(e=>(U.clearAll(),e),e=>{throw U.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var J=class{separator=B(`dim`,Array.from({length:15}).join(G.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},wn=r();const Tn=`**/.ok/*`,En=`!**/${c}/`;function Dn(e){let t=[`.ok/`,`.okignore`];for(let n of he){let r=M[n];r.projectConfigPath&&t.push(Rn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=F(e,...o);if(R(n))try{let e=a(z(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 On(e,t){let n=Nn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Pn(n)};let r=Y(e);if(r.kind!==`ok`)return r.result;let i=R(r.path)?z(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
16
  `)?``:`
17
17
  `,l=`${o.join(`
18
- `)}\n`;try{Me(r.path,`${i}${c}${l}`,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]}}function kn(e,t){let n=Fn(e);if(n.kind!==`ok`)return n.result;if(!R(n.path))return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let r=t.map(e=>In(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(Tn),i.add(En);let a;try{a=z(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 In(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{Me(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function An(e){let t=Fn(e);if(t.kind!==`ok`)return t.result.reason===`no-git`||t.result.reason===`malformed-pointer`||t.result.reason===`inaccessible`?`no-git`:`shared`;if(!R(t.path))return`shared`;let n;try{n=z(t.path,`utf-8`)}catch{return`shared`}let r=Rn(n),i=Dn(e);for(let e of i)if(Ln(r,e))return`local-only`;return r.has(Tn)?`local-only`:`shared`}function jn(e){let t=Fn(e);if(t.kind!==`ok`||!R(t.path))return[];let n;try{n=z(t.path,`utf-8`)}catch{return[]}let r=Rn(n);return Dn(e).filter(e=>Ln(r,e))}function Mn(e){let t=Fn(e);if(t.kind!==`ok`||!R(t.path))return!1;let n;try{n=z(t.path,`utf-8`)}catch{return!1}let r=Rn(n);return r.has(Tn)&&r.has(En)}function Nn(e,t){let n=[];for(let r of t)if(R(we(e,r)))try{Se(`git`,[`ls-files`,`--error-unmatch`,`--`,r],p({cwd:e,stdio:[`ignore`,`ignore`,`ignore`]})),n.push(r)}catch{}return{tracked:n}}function Pn(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 Fn(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=F(e.path,`info`);return R(n)?{kind:`ok`,path:F(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 In(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function Ln(e,t){for(let n of In(t))if(e.has(n))return!0;return!1}function Rn(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 zn(e,t){return Bn(I(t,e))}function Bn(e){return Te===`/`?e:e.split(Te).join(`/`)}function Vn(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 Hn(e){let t=(e.match(/\r\n/g)??[]).length;return t===0?!1:t>=(e.match(/\n/g)??[]).length-t}function Un(e){try{return je(e).mode&511}catch{return}}function Wn(e,t){let n=e.charCodeAt(0)===65279,r=n?e.slice(1):e,i=r.includes(`\r
18
+ `)}\n`;try{Me(r.path,`${i}${c}${l}`,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]}}function kn(e,t){let n=Y(e);if(n.kind!==`ok`)return n.result;if(!R(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(Tn),i.add(En);let a;try{a=z(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{Me(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function An(e){let t=Y(e);if(t.kind!==`ok`)return t.result.reason===`no-git`||t.result.reason===`malformed-pointer`||t.result.reason===`inaccessible`?`no-git`:`shared`;if(!R(t.path))return`shared`;let n;try{n=z(t.path,`utf-8`)}catch{return`shared`}let r=Ln(n),i=Dn(e);for(let e of i)if(In(r,e))return`local-only`;return r.has(Tn)?`local-only`:`shared`}function jn(e){let t=Y(e);if(t.kind!==`ok`||!R(t.path))return[];let n;try{n=z(t.path,`utf-8`)}catch{return[]}let r=Ln(n);return Dn(e).filter(e=>In(r,e))}function Mn(e){let t=Y(e);if(t.kind!==`ok`||!R(t.path))return!1;let n;try{n=z(t.path,`utf-8`)}catch{return!1}let r=Ln(n);return r.has(Tn)&&r.has(En)}function Nn(e,t){let n=[];for(let r of t)if(R(we(e,r)))try{Se(`git`,[`ls-files`,`--error-unmatch`,`--`,r],p({cwd:e,stdio:[`ignore`,`ignore`,`ignore`]})),n.push(r)}catch{}return{tracked:n}}function Pn(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 Y(e){let t=u(e);switch(t.kind){case`repository`:{let e=t.repository.readCommonDir();if(e.kind===`unreadable`)return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}};let n=F(e.path,`info`);return R(n)?{kind:`ok`,path:F(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(I(t,e))}function zn(e){return Te===`/`?e:e.split(Te).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 je(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
24
  `)?`\r
25
25
  `:`
26
- `,a=f(r,t,void 0,{formattingOptions:{...Vn(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 Gn={icon:{checked:B(`green`,G.circleFilled),unchecked:G.circle,cursor:G.pointer,disabledChecked:B(`green`,G.circleDouble),disabledUnchecked:`-`},style:{disabled:e=>B(`dim`,e),renderSelectedChoices:e=>e.map(e=>e.short).join(`, `),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be toggled.`}};function Kn(e){return!J.isSeparator(e)&&!e.disabled}function qn(e){return!J.isSeparator(e)}function Jn(e){return!J.isSeparator(e)&&e.checked}function Yn(e){return Kn(e)?{...e,checked:!e.checked}:e}function Xn(e){return function(t){return Kn(t)?{...t,checked:e}:t}}function Zn(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,checkedName:t,disabled:!1,checked:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,checkedName:e.checkedName??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})}var Qn=Cn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=_t(Gn,e.theme),{keybindings:c}=s,[l,u]=W(`idle`),d=vt({status:l,theme:s}),[f,p]=W(Zn(e.choices)),m=yt(()=>{let e=f.findIndex(qn),t=f.findLastIndex(qn);if(e===-1)throw new Ze(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=W(m.first),[_,v]=W();xt(async e=>{if(Ke(e)){let e=f.filter(Jn),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(V(e,c)||He(e,c)){if(_&&v(void 0),r||V(e,c)&&h!==m.first||He(e,c)&&h!==m.last){let t=V(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!qn(f[n]));g(n)}}else if(Ue(e)){let e=f[h];e&&!J.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?Yn(e):e))))}else if(e.name===o.all){let e=f.some(e=>Kn(e)&&!e.checked);p(f.map(Xn(e)))}else if(e.name===o.invert)p(f.map(Yn));else if(Ge(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>J.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&Kn(i)&&(g(r),p(f.map((e,t)=>t===r?Yn(e):e)))}});let y=s.style.message(e.message,l),b,x=Yt({items:f,active:h,renderItem({item:e,isActive:t}){if(J.isSeparator(e))return` ${e.separator}`;let n=t?s.icon.cursor:` `;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=e.checked?s.icon.disabledChecked:s.icon.disabledUnchecked;return s.style.disabled(`${n}${r} ${e.name} ${t}`)}t&&(b=e.description);let r=e.checked?s.icon.checked:s.icon.unchecked,i=e.checked?e.checkedName:e.name;return(t?s.style.highlight:e=>e)(`${n}${r} ${i}`)},pageSize:n,loop:r});if(l===`done`){let e=f.filter(Jn);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()}${dn}`});const $n={icon:{cursor:G.pointer},style:{disabled:e=>B(`dim`,e),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be selected.`},indexMode:`hidden`};function er(e){return!J.isSeparator(e)&&!e.disabled}function tr(e){return!J.isSeparator(e)}function nr(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}var rr=Cn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=_t($n,e.theme),{keybindings:a}=i,[o,s]=W(`idle`),c=vt({status:o,theme:i}),l=bt(),u=!a.includes(`vim`),d=yt(()=>nr(e.choices),[e.choices]),f=yt(()=>{let e=d.findIndex(tr),t=d.findLastIndex(tr);if(e===-1)throw new Ze(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=yt(()=>`default`in e?d.findIndex(t=>er(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=W(p===-1?f.first:p),g=d[m];if(g==null||J.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=W();xt((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),Ke(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(V(e,a)||He(e,a)){if(r.clearLine(0),n||V(e,a)&&m!==f.first||He(e,a)&&m!==f.last){let t=V(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!tr(d[n]));h(n)}}else if(Ge(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>J.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&er(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(We(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>J.isSeparator(t)||!er(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),ot(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Yt({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(J.isSeparator(e))return x++,` ${e.separator}`;let r=t?i.icon.cursor:` `,a=i.indexMode===`number`?`${n+1-x}. `:``;if(e.disabled){let n=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=t?i.icon.cursor:`-`;return i.style.disabled(`${r} ${a}${e.name} ${n}`)}return(t?i.style.highlight:e=>e)(`${r} ${a}${e.name}`)},pageSize:r,loop:n});if(o===`done`)return[c,y,i.style.answer(g.short)].filter(Boolean).join(` `);let{description:C}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,C?i.style.description(C):``,_?i.style.error(_):``,b].filter(Boolean).join(`
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:B(`green`,G.circleFilled),unchecked:G.circle,cursor:G.pointer,disabledChecked:B(`green`,G.circleDouble),disabledUnchecked:`-`},style:{disabled:e=>B(`dim`,e),renderSelectedChoices:e=>e.map(e=>e.short).join(`, `),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be toggled.`}};function Gn(e){return!J.isSeparator(e)&&!e.disabled}function Kn(e){return!J.isSeparator(e)}function qn(e){return!J.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(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,checkedName:t,disabled:!1,checked:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,checkedName:e.checkedName??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})}var Zn=Cn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=_t(Wn,e.theme),{keybindings:c}=s,[l,u]=W(`idle`),d=vt({status:l,theme:s}),[f,p]=W(Xn(e.choices)),m=yt(()=>{let e=f.findIndex(Kn),t=f.findLastIndex(Kn);if(e===-1)throw new Ze(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=W(m.first),[_,v]=W();xt(async e=>{if(Ke(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(V(e,c)||He(e,c)){if(_&&v(void 0),r||V(e,c)&&h!==m.first||He(e,c)&&h!==m.last){let t=V(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!Kn(f[n]));g(n)}}else if(Ue(e)){let e=f[h];e&&!J.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?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(Ge(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>J.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=Yt({items:f,active:h,renderItem({item:e,isActive:t}){if(J.isSeparator(e))return` ${e.separator}`;let n=t?s.icon.cursor:` `;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=e.checked?s.icon.disabledChecked:s.icon.disabledUnchecked;return s.style.disabled(`${n}${r} ${e.name} ${t}`)}t&&(b=e.description);let r=e.checked?s.icon.checked:s.icon.unchecked,i=e.checked?e.checkedName:e.name;return(t?s.style.highlight:e=>e)(`${n}${r} ${i}`)},pageSize:n,loop:r});if(l===`done`){let e=f.filter(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()}${dn}`});const Qn={icon:{cursor:G.pointer},style:{disabled:e=>B(`dim`,e),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be selected.`},indexMode:`hidden`};function $n(e){return!J.isSeparator(e)&&!e.disabled}function er(e){return!J.isSeparator(e)}function tr(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}var nr=Cn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=_t(Qn,e.theme),{keybindings:a}=i,[o,s]=W(`idle`),c=vt({status:o,theme:i}),l=bt(),u=!a.includes(`vim`),d=yt(()=>tr(e.choices),[e.choices]),f=yt(()=>{let e=d.findIndex(er),t=d.findLastIndex(er);if(e===-1)throw new Ze(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=yt(()=>`default`in e?d.findIndex(t=>$n(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=W(p===-1?f.first:p),g=d[m];if(g==null||J.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=W();xt((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),Ke(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(V(e,a)||He(e,a)){if(r.clearLine(0),n||V(e,a)&&m!==f.first||He(e,a)&&m!==f.last){let t=V(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!er(d[n]));h(n)}}else if(Ge(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>J.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&$n(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(We(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>J.isSeparator(t)||!$n(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),ot(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Yt({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(J.isSeparator(e))return x++,` ${e.separator}`;let r=t?i.icon.cursor:` `,a=i.indexMode===`number`?`${n+1-x}. `:``;if(e.disabled){let n=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=t?i.icon.cursor:`-`;return i.style.disabled(`${r} ${a}${e.name} ${n}`)}return(t?i.style.highlight:e=>e)(`${r} ${a}${e.name}`)},pageSize:r,loop:n});if(o===`done`)return[c,y,i.style.answer(g.short)].filter(Boolean).join(` `);let{description:C}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,C?i.style.description(C):``,_?i.style.error(_):``,b].filter(Boolean).join(`
28
28
  `).trimEnd()}${dn}`});
29
29
  /*!
30
30
  * Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -53,7 +53,7 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ct as r}from"./sle
53
53
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54
54
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55
55
  */
56
- let ir=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var ar=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(ir);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}};
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
57
  /*!
58
58
  * Copyright (c) Squirrel Chat et al., All rights reserved.
59
59
  * SPDX-License-Identifier: BSD-3-Clause
@@ -81,9 +81,9 @@ let ir=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]
81
81
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
82
82
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83
83
  */
84
- function or(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function sr(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+=`
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
85
  `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
86
- `))}return i}var Y=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=or(t.toml,t.ptr),i=sr(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=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
87
  /*!
88
88
  * Copyright (c) Squirrel Chat et al., All rights reserved.
89
89
  * SPDX-License-Identifier: BSD-3-Clause
@@ -111,12 +111,12 @@ function or(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop()
111
111
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
112
112
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
113
113
  */
114
- let cr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,lr=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,ur=/^[+-]?0[0-9_]/;function dr(e,t){let n=e[t++],r=n,i=n===`'`,a=n===e[t]&&n===e[t+1];a&&(e[t+=2]===`
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
115
  `?t++:e[t]===`\r`&&e[t+1]===`
116
116
  `&&(t+=2));let o=``,s=t,c=0;for(let l=t;l<e.length;l++)if(n=e[l],a&&(n===`
117
117
  `||n===`\r`&&e[l+1]===`
118
- `))c&&=3;else if(n<` `&&n!==` `||n===``)throw new Y(`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 Y(`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 Y(`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 Y(`unrecognized escape sequence`,{toml:e,ptr:l});s=l+1,c=0}else if(n!==` `&&n!==` `){if(c===2)throw new Y(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});c=+(!i&&n===`\\`),s=l}throw new Y(`unfinished string`,{toml:e,ptr:t})}function fr(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=cr.test(e);if(i||lr.test(e)){if(ur.test(e))throw new Y(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new Y(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new Y(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new ar(e);if(!a.isValid())throw new Y(`invalid value`,{toml:t,ptr:n});return a}
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
120
  /*!
121
121
  * Copyright (c) Squirrel Chat et al., All rights reserved.
122
122
  * SPDX-License-Identifier: BSD-3-Clause
@@ -144,14 +144,14 @@ let cr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,lr=/^[+-]?
144
144
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
145
145
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146
146
  */
147
- function pr(e,t=0,n=e.length){let r=e.indexOf(`
148
- `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function mr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
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
149
  `)return n;if(r===`\r`&&e[n+1]===`
150
- `)return n+1;if(r<` `&&r!==` `||r===``)throw new Y(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function X(e,t,n,r){let i;for(;;){for(;(i=e[t])===` `||i===` `||!n&&(i===`
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
151
  `||i===`\r`&&e[t+1]===`
152
- `);)t++;if(r||i!==`#`)break;t=mr(e,t)}return t}function hr(e,t,n,r,i=!1){if(!r)return t=pr(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=pr(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
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
153
  `||t===`\r`&&e[a+1]===`
154
- `))return a}throw new Y(`cannot find end of structure`,{toml:e,ptr:t})}
154
+ `))return a}throw new X(`cannot find end of structure`,{toml:e,ptr:t})}
155
155
  /*!
156
156
  * Copyright (c) Squirrel Chat et al., All rights reserved.
157
157
  * SPDX-License-Identifier: BSD-3-Clause
@@ -179,8 +179,8 @@ function pr(e,t=0,n=e.length){let r=e.indexOf(`
179
179
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
180
180
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
181
181
  */
182
- function gr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(mr(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function _r(e,t,n,r,i){if(r===0)throw new Y(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?xr(e,t,r,i):br(e,t,r,i);if(n){if(s=X(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new Y(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}if(a===`"`||a===`'`){let[r,i]=dr(e,t);if(n){if(i=X(e,i),e[i]&&e[i]!==`,`&&e[i]!==n&&e[i]!==`
183
- `&&e[i]!==`\r`)throw new Y(`unexpected character encountered`,{toml:e,ptr:i});e[i]===`,`&&i++}return[r,i]}let o=hr(e,t,`,`,n),s=gr(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new Y(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=X(e,t+s[1]),e[o]===`,`&&o++),[fr(s[0],e,t,i),o]}
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
184
  /*!
185
185
  * Copyright (c) Squirrel Chat et al., All rights reserved.
186
186
  * SPDX-License-Identifier: BSD-3-Clause
@@ -208,9 +208,9 @@ function gr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(mr(e,i),r=r
208
208
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
209
209
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
210
210
  */
211
- let vr=/^[a-zA-Z0-9-_]+[ \t]*$/;function yr(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new Y(`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 Y(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let[s,c]=dr(e,t);r=e.indexOf(`.`,c);let l=e.slice(c,r<0||r>a?a:r),u=pr(l);if(u>-1)throw new Y(`newlines are not allowed in keys`,{toml:e,ptr:t+r+u});if(l.trimStart())throw new Y(`found extra tokens after the string part`,{toml:e,ptr:c});if(a<c&&(a=e.indexOf(n,c),a<0))throw new Y(`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(!vr.test(n))throw new Y(`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,X(e,a+1,!0,!0)]}function br(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new Y(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=mr(e,t);else if(o!==` `&&o!==` `&&o!==`
212
- `&&o!==`\r`){let o,s=i,c=!1,[l,u]=yr(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 Y(`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 Y(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=_r(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new Y(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function xr(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new Y(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=mr(e,t);else if(a!==` `&&a!==` `&&a!==`
213
- `&&a!==`\r`){let a=_r(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new Y(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}
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
214
  /*!
215
215
  * Copyright (c) Squirrel Chat et al., All rights reserved.
216
216
  * SPDX-License-Identifier: BSD-3-Clause
@@ -238,8 +238,8 @@ let vr=/^[a-zA-Z0-9-_]+[ \t]*$/;function yr(e,t,n=`=`){let r=t-1,i=[],a=e.indexO
238
238
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
239
239
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
240
240
  */
241
- function Sr(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 Cr(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=X(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=yr(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new Y(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=Sr(n[0],r,i,t?2:1);if(!c)throw new Y(`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=yr(e,s),i=Sr(r[0],a,o,0);if(!i)throw new Y(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=_r(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=X(e,s,!0),e[s]&&e[s]!==`
242
- `&&e[s]!==`\r`)throw new Y(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=X(e,s)}return r}
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
243
  /*!
244
244
  * Copyright (c) Squirrel Chat et al., All rights reserved.
245
245
  * SPDX-License-Identifier: BSD-3-Clause
@@ -267,13 +267,13 @@ function Sr(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
267
267
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
268
268
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
269
269
  */
270
- let wr=/^[a-z0-9-_]+$/i;function Z(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(Z(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+=wr.test(o)?o:Er(o),i+=` = `,i+=Dr(e[o],Z(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],Z(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=Z(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=wr.test(c)?c:Er(c);if(e===`array`&&Tr(t[c]))o+=(o&&`
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
272
  `)+Ar(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
273
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(Z(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=jr(0,e,``,t,n);return r[r.length-1]===`
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
275
  `?r:r+`
276
- `}const Nr=`${ue}-dev`;function Pr(e){return e.startsWith(ue)}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:ge,args:[e]}}function Lr(e={}){let t=e.mode===`dev`?Nr:pe,n={unix:de({...e,platformName:`darwin`}),win32:de({...e,platformName:`win32`})};return`${t}
276
+ `}const Nr=`${pe}-dev`;function Pr(e){return e.startsWith(pe)}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:ye,args:[e]}}function Lr(e={}){let t=e.mode===`dev`?Nr:ge,n={unix:me({...e,platformName:`darwin`}),win32:me({...e,platformName:`win32`})};return`${t}
277
277
  /**
278
278
  * Open Knowledge bridge for Pi — MANAGED FILE, written by \`ok init\`.
279
279
  * Hand edits are overwritten whenever OK re-syncs this project; remove it
@@ -616,23 +616,23 @@ export default function okBridge(pi: {
616
616
  }
617
617
  });
618
618
  }
619
- `}function Rr(e){try{return Ae.native(e)}catch{return e}}function zr(e,t){let n=I(Rr(t),Rr(e));return n.length>0&&!n.startsWith(`..`)&&!P(n)}const Br=e=>{try{let t=Se(`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??Ne(),r=t.gitTopLevel??Br,i=we(e),a;try{a=Ae(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=N(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??xe(t);try{return n(F(N(Ee(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=De(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=ke(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=P(i)?i:F(N(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(!M(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(Cr(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){w(e,`${JSON.stringify(t,null,2)}\n`)}function li(e,t){let n=Mr(t);w(e,n.endsWith(`
619
+ `}function Rr(e){try{return Ae.native(e)}catch{return e}}function zr(e,t){let n=I(Rr(t),Rr(e));return n.length>0&&!n.startsWith(`..`)&&!P(n)}const Br=e=>{try{let t=Se(`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??Ne(),r=t.gitTopLevel??Br,i=we(e),a;try{a=Ae(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=N(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??xe(t);try{return n(F(N(Ee(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=De(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=ke(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=P(i)?i:F(N(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(!j(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){w(e,`${JSON.stringify(t,null,2)}\n`)}function li(e,t){let n=Mr(t);w(e,n.endsWith(`
620
620
  `)?n:`${n}\n`)}function ui(e,t){let n=(0,wn.stringify)(t);w(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(M(e)&&M(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:M(r)?r[n]:void 0}function _i(e,t,n,r,i){if(!R(e))return ci(e,hi(t,i,n,r)),{kind:`written`};let a;try{a=z(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=M(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
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(j(e)&&j(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:j(r)?r[n]:void 0}function _i(e,t,n,r,i){if(!R(e))return ci(e,hi(t,i,n,r)),{kind:`written`};let a;try{a=z(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=j(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
623
  `)?`\r
624
624
  `:`
625
- `,m=f(d,mi(t,i,n),r,{formattingOptions:{...pi(d),eol:p}}),_=`${u?``:``}${h(d,m)}`;return _!==a&&w(e,_,{mode:Un(e)}),{kind:l?`overwritten`:`written`}}function vi(e,t,n,r,i){let a=``;if(R(t))try{a=z(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=Hn(c),u=o||c.endsWith(`
625
+ `,m=f(d,mi(t,i,n),r,{formattingOptions:{...pi(d),eol:p}}),_=`${u?``:``}${h(d,m)}`;return _!==a&&w(e,_,{mode:Hn(e)}),{kind:l?`overwritten`:`written`}}function vi(e,t,n,r,i){let a=``;if(R(t))try{a=z(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
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
627
  `)||(f=`${f}\n`):f=f.replace(/\n+$/,``),l&&(f=f.replace(/\r\n/g,`
628
628
  `).replace(/\n/g,`\r
629
- `));let p=`${s?``:``}${f}`;return p!==a&&w(t,p,{mode:Un(t)}),{kind:d.existed?`overwritten`:`written`}}function yi(e,t,n,r){let i=``;if(R(e))try{i=z(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,wn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,wn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Hn(o);o.endsWith(`
629
+ `));let p=`${s?``:``}${f}`;return p!==a&&w(t,p,{mode:Hn(t)}),{kind:d.existed?`overwritten`:`written`}}function yi(e,t,n,r){let i=``;if(R(e))try{i=z(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,wn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,wn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Vn(o);o.endsWith(`
630
630
  `)?u.endsWith(`
631
631
  `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),d&&(u=u.replace(/\r\n/g,`
632
632
  `).replace(/\n/g,`\r
633
- `));let f=`${a?``:``}${u}`;return f!==i&&w(e,f,{mode:Un(e)}),{kind:l?`overwritten`:`written`}}const bi=e=>e!==`project`,xi=e=>e!==`user`;async function Si(){let e=await Qn({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 rr({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=An(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=we(n,e),i;try{i=je(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=I(Oi(t),Oi(r));if(a.startsWith(`..`)||P(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Oi(e){try{return Ae(e)}catch{return e}}const ki=`open-knowledge-ui`;function Ai(e,t,n){try{return R(e.detectPath?.(t,n)??N(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{he(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{Oe(N(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{se(`${o}.lock`,()=>{let t=Yr(o).writePath;if(Oe(N(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{Oe(N(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{se(`${t}.lock`,()=>{let e=null;try{e=z(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}w(t,c,e===null?void 0:{mode:Un(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||!R(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(!M(i))return{kind:`no-entry`};let a=i[n];return M(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(!R(i))return{kind:`absent`};try{if(je(i).size>di)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=z(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,wn.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=we(e.cwd??process.cwd()),n=Vr(t,{homeDir:e.home}),r=n.projectRoot,i=!R(F(r,`.ok`)),a=n.gitRootPromoted?I(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(`${A(`[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 c={mode:e.devMcp?`dev`:`published`},l=await ie(r),u;try{u=S(r,{contentDir:o})}catch(t){let i=E.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(ye),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??fe.filter(e=>E[e].projectConfigPath!==void 0||E[e].projectSkillPath!==void 0),b=ce(h),C=ce(g),w=e.mcp===!1||m===null,se=Array.from(new Map([...b,...w?[]:C].map(e=>[e.id,e])).values()),le=b.filter(t=>Ai(t,r,e.home)),T=[],ue=[],de=new Set;for(let t of se){if(w){let n=``;try{n=t.configPath(r,e.home)}catch{}T.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`&&T.push(ji(t,r,c,e.home)),xi(m)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ji(t,r,c,e.home,n);T.push(i),(i.action===`written`||i.action===`overwritten`)&&de.add(n)}}let pe=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||pe.has(n)||(pe.add(n),ue.push(me(t,r,{home:e.home})))}let he=ue.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(he.length>0){let t=e.home??Ne();ne({source:s,skills:[v.project],agents:he,scope:r},{home:t,enabled:x(t).enabled})}let ge=!w&&m!==null&&xi(m)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,_e=w?[]:le.map(e=>Pi(e,r)).filter(e=>e!==void 0).filter(e=>!de.has(e.path)),D=e.installUserSkill??te,O=e.home??Ne(),k=Ei(e.skills),ve=!1,j=!1,M=!1,be=!1,xe=!1;for(let t of oe){if(!k.has(t))continue;await ae(O,v[t],!0).catch(()=>{}),ve=!0;let n=await D({home:e.home,bundleId:t,force:!0});n===`installed`?j=!0:n===`failed`?M=!0:n===`no-hosts`?xe=!0:be=!0}let Se=M?`failed`:j?`installed`:ve&&be?`skip-current`:ve&&xe?`no-hosts`:`declined`,Ce=j?re(O).map(e=>e.editorId):[],N=w?`skipped-flag`:`skipped-missing`,P=T.find(e=>e.editorId===`claude`)??T[0]??{action:N,configPath:E.claude.configPath(r,e.home)},Te=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:T,projectSkills:ue,legacyProjectConfigs:_e,skillInstall:Se,skillHosts:Ce,didGitInit:l.didInit,rootGitignoreCreated:f,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:d?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:P.action,mcpPath:P.configPath,mcpError:`error`in P?P.error:void 0,projectScopeUnsupportedLabels:ge,sharing:Te}}async function zi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=An(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Dn(t);if(n===`local-only`){let e=On(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=kn(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=An(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=F(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(j(`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(j(`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(j(`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(j(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(j(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?I(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} ${k(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${k(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${ve(`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(j(`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?I(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${k(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${k(`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} ${ve(`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} ${I(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(j(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>le[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${k(`installed for ${r}`)}`),n.push(` ${O(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${O(`Opt out: DO_NOT_TRACK=1, or Settings → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${k(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${O(`skipped for this run (--no-skills)`)}`),n.push(` ${O(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${O(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${O(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${O(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${A(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${A(` ok repair-skills`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(A(`⚠ --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(A(`⚠ 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(be(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(`${k(`✓`)} ${j(`Next steps:`)}`),n.push(` 1. Open your editor (${D(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${D(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${D(`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 fe)Ai(E[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:Fe(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 _e(`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 T(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new T(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new T(`--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-DAMg0xnL.mjs`),{resolveContentDir:s}=await import(`./src-n7camJHB.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-aNluJ6KN.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(j(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${k(`local-only`)} — appended ${e.appended.length} path(s) to ${j(`${t}/.git/info/exclude`)} (per-clone, not committed).`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${k(`local-only`)} — already excluded; nothing to do.`):n.push(` ${k(`local-only`)}`):e.action===`removed`?n.push(` ${k(`shared`)} — removed OK paths from ${j(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${k(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(A(`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 ${D(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(A(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${D(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${D(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(A(`Sharing mode unavailable: ${e.reason}.`));return n}}export{Dn as A,W as B,Qn as C,On as D,Wn as E,Cn as F,dn as I,xt as L,An as M,Mn as N,Pn as O,kn as P,vt as R,rr as S,Hn as T,Ke 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,Nn as j,jn 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,Un as w,Fr as x,ri as y,_t as z};
638
- //# sourceMappingURL=init-Bi1d2uLD.mjs.map
633
+ `));let f=`${a?``:``}${u}`;return f!==i&&w(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=An(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=we(n,e),i;try{i=je(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=I(Oi(t),Oi(r));if(a.startsWith(`..`)||P(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Oi(e){try{return Ae(e)}catch{return e}}const ki=`open-knowledge-ui`;function Ai(e,t,n){try{return R(e.detectPath?.(t,n)??N(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{ve(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{Oe(N(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{se(`${o}.lock`,()=>{let t=Yr(o).writePath;if(Oe(N(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{Oe(N(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{se(`${t}.lock`,()=>{let e=null;try{e=z(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}w(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||!R(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(!j(i))return{kind:`no-entry`};let a=i[n];return j(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(!R(i))return{kind:`absent`};try{if(je(i).size>di)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=z(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,wn.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=we(e.cwd??process.cwd()),n=Vr(t,{homeDir:e.home}),r=n.projectRoot,i=!R(F(r,`.ok`)),a=n.gitRootPromoted?I(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(`${k(`[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 c={mode:e.devMcp?`dev`:`published`},l=await ie(r),u;try{u=S(r,{contentDir:o})}catch(t){let i=M.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(ue),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??he.filter(e=>M[e].projectConfigPath!==void 0||M[e].projectSkillPath!==void 0),b=de(h),C=de(g),w=e.mcp===!1||m===null,se=Array.from(new Map([...b,...w?[]:C].map(e=>[e.id,e])).values()),ce=b.filter(t=>Ai(t,r,e.home)),T=[],E=[],D=new Set;for(let t of se){if(w){let n=``;try{n=t.configPath(r,e.home)}catch{}T.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`&&T.push(ji(t,r,c,e.home)),xi(m)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ji(t,r,c,e.home,n);T.push(i),(i.action===`written`||i.action===`overwritten`)&&D.add(n)}}let O=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||O.has(n)||(O.add(n),E.push(_e(t,r,{home:e.home})))}let le=E.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(le.length>0){let t=e.home??Ne();ne({source:s,skills:[v.project],agents:le,scope:r},{home:t,enabled:x(t).enabled})}let A=!w&&m!==null&&xi(m)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,j=w?[]:ce.map(e=>Pi(e,r)).filter(e=>e!==void 0).filter(e=>!D.has(e.path)),fe=e.installUserSkill??te,pe=e.home??Ne(),me=Ei(e.skills),ge=!1,ve=!1,ye=!1,be=!1,xe=!1;for(let t of oe){if(!me.has(t))continue;await ae(pe,v[t],!0).catch(()=>{}),ge=!0;let n=await fe({home:e.home,bundleId:t,force:!0});n===`installed`?ve=!0:n===`failed`?ye=!0:n===`no-hosts`?xe=!0:be=!0}let Se=ye?`failed`:ve?`installed`:ge&&be?`skip-current`:ge&&xe?`no-hosts`:`declined`,Ce=ve?re(pe).map(e=>e.editorId):[],N=w?`skipped-flag`:`skipped-missing`,P=T.find(e=>e.editorId===`claude`)??T[0]??{action:N,configPath:M.claude.configPath(r,e.home)},Te=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:T,projectSkills:E,legacyProjectConfigs:j,skillInstall:Se,skillHosts:Ce,didGitInit:l.didInit,rootGitignoreCreated:f,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:d?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:P.action,mcpPath:P.configPath,mcpError:`error`in P?P.error:void 0,projectScopeUnsupportedLabels:A,sharing:Te}}async function zi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=An(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Dn(t);if(n===`local-only`){let e=On(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=kn(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=An(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=F(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(A(`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(A(`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(A(`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(A(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(A(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?I(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} ${O(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${O(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${le(`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(A(`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?I(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${O(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${O(`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} ${le(`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} ${I(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(A(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>fe[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${O(`installed for ${r}`)}`),n.push(` ${D(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${D(`Opt out: DO_NOT_TRACK=1, or Settings → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${O(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${D(`skipped for this run (--no-skills)`)}`),n.push(` ${D(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${D(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${D(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${D(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${k(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${k(` ok repair-skills`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(k(`⚠ --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(k(`⚠ 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(be(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(`${O(`✓`)} ${A(`Next steps:`)}`),n.push(` 1. Open your editor (${E(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${E(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${E(`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 he)Ai(M[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:Fe(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 T(`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 ce(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new ce(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new ce(`--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-B2V-uVIv.mjs`),{resolveContentDir:s}=await import(`./src-Dg0jHVcz.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-B9gSOFlh.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(A(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${O(`local-only`)} — appended ${e.appended.length} path(s) to ${A(`${t}/.git/info/exclude`)} (per-clone, not committed).`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${O(`local-only`)} — already excluded; nothing to do.`):n.push(` ${O(`local-only`)}`):e.action===`removed`?n.push(` ${O(`shared`)} — removed OK paths from ${A(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${O(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(k(`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 ${E(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(k(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${E(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${E(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(k(`Sharing mode unavailable: ${e.reason}.`));return n}}export{Dn as A,W as B,Zn as C,On as D,Un as E,Cn as F,dn as I,xt as L,An as M,Mn as N,Pn as O,kn as P,vt as R,nr as S,Vn as T,Ke 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,Nn as j,jn 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,_t as z};
638
+ //# sourceMappingURL=init-pIJddeyG.mjs.map
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import{H as n,K as r,U as i,a,c as o,s,v as c,w as l,x as u,y as d}from"./chunk-WYO6CB5R-DN1R0VLx.mjs";import{p as f}from"./chunk-ICXQ74PX-DbJy3VdO.mjs";import{t as p}from"./chunk-VAUOI2AC-BdotBBDE.mjs";import{t as m}from"./rough.cjs-BGkc0Naf.mjs";var h=e(m(),1),g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},e(o,[2,3]),{1:[2,2]},e(o,[2,4]),e(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(u,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{o as e}from"./chunk-DTipWd-i.mjs";import{n as t}from"./chunk-Y2CYZVJY-BW8wJnWV.mjs";import"./src-BbZVR6qh.mjs";import{H as n,K as r,U as i,a,c as o,s,v as c,w as l,x as u,y as d}from"./chunk-WYO6CB5R-Brxa0zhE.mjs";import{p as f}from"./chunk-ICXQ74PX-DL0eOUe3.mjs";import{t as p}from"./chunk-VAUOI2AC-jixxcqz-.mjs";import{t as m}from"./rough.cjs-CV0Ml7Xq.mjs";var h=e(m(),1),g=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},e(o,[2,3]),{1:[2,2]},e(o,[2,4]),e(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(u,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -68,4 +68,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
68
68
  dominant-baseline: hanging;
69
69
  }
70
70
  `,`getStyles`)};export{B as diagram};
71
- //# sourceMappingURL=ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs.map
71
+ //# sourceMappingURL=ishikawaDiagram-FXEZZL3T-B1d77HdO.mjs.map
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-A7ICOL4V-BQZ9JZ1A.mjs";export{e as join};
1
+ import"./chunk-DXB73IDG-q-dGnwlc.mjs";import{n as e}from"./chunk-A7ICOL4V-BnS48daC.mjs";export{e as join};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import{p as t}from"./src-BPVU4Y0o.mjs";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-DN1R0VLx.mjs";import{t as d}from"./arc-DXUbbcxK.mjs";import{t as f}from"./chunk-5VM5RSS4-C8vNNqW0.mjs";import{a as p,n as m,o as h,s as g}from"./chunk-32BRIVSS-Dwq69mnI.mjs";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-BW8wJnWV.mjs";import{p as t}from"./src-BbZVR6qh.mjs";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-Brxa0zhE.mjs";import{t as d}from"./arc-CXI7xUjm.mjs";import{t as f}from"./chunk-5VM5RSS4-D8VF3oKI.mjs";import{a as p,n as m,o as h,s as g}from"./chunk-32BRIVSS-XYZfTStz.mjs";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -137,4 +137,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
137
137
  }
138
138
  ${f()}
139
139
  `,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color;F(a,{cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position}),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),U={drawRect:N,drawCircle:F,drawSection:R,drawText:I,drawLabel:L,drawTask:B,drawBackgroundRect:V,initGraphics:e(function(e,t){z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`)},W=e(function(e){Object.keys(e).forEach(function(t){J[t]=e[t]})},`setConf`),G={},K=0;function q(e){let t=l().journey,n=t.maxLabelWidth;K=0;let r=60;Object.keys(G).forEach(i=>{let a=G[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:G[i].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),r+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=l().journey,Y=0,ee=e(function(e,n,r,i){let a=l(),s=a.journey.titleColor,c=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;o(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=l().journey,o=this,s=0;function c(c){return e(function(e){s++;let l=o.sequenceItems.length-s+1;o.updateVal(e,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(e,`stopy`,i+l*a.boxMargin,Math.max),o.updateVal(X.data,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopx`,r+l*a.boxMargin,Math.max),c!==`activation`&&(o.updateVal(e,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(e,`stopx`,r+l*a.boxMargin,Math.max),o.updateVal(X.data,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopy`,i+l*a.boxMargin,Math.max))},`updateItemBounds`)}e(c,`updateFn`),this.sequenceItems.forEach(c())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=J.sectionFills,Q=J.sectionColours,te=e(function(e,t,n,r){let i=l().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,c=`#CCC`,u=`black`,d=0;for(let[n,l]of t.entries()){if(a!==l.section){c=Z[s%Z.length],d=s%Z.length,u=Q[s%Q.length];let r=0,o=l.section;for(let e=n;e<t.length&&t[e].section==o;e++)r+=1;let f={x:n*i.taskMargin+n*i.width+Y,y:50,text:l.section,fill:c,num:d,colour:u,taskCount:r};U.drawSection(e,f,i),a=l.section,s++}let f=l.people.reduce((e,t)=>(G[t]&&(e[t]=G[t]),e),{});l.x=n*i.taskMargin+n*i.width+Y,l.y=o,l.width=i.diagramMarginX,l.height=i.diagramMarginY,l.colour=u,l.fill=c,l.num=d,l.actors=f,U.drawTask(e,l,i,r),X.insert(l.x,l.y,l.x+l.width+i.taskMargin,450)}},`drawTasks`),$={setConf:W,draw:ee},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram};
140
- //# sourceMappingURL=journeyDiagram-5HDEW3XC-BywkQV2b.mjs.map
140
+ //# sourceMappingURL=journeyDiagram-5HDEW3XC-DE8I99vn.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-B74TABJS-BSazPoW8.mjs";import"./chunk-DXB73IDG-q-dGnwlc.mjs";import"./chunk-5QMZ5MUS-D8tv8KWc.mjs";import"./chunk-24IMIIXA-BQtWA2ag.mjs";import"./chunk-7TSDKFEO-CNjAbA1P.mjs";import"./chunk-KRBPSX3W-CA3be-GR.mjs";import{n as e}from"./chunk-YULBWSET-CkTpBwtE.mjs";export{e as jqCommand};