@inkeep/open-knowledge 0.49.0 → 0.49.1

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