@inkeep/open-knowledge 0.47.0-beta.26 → 0.47.0-beta.28

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 (423) hide show
  1. package/dist/{abnfDiagram-VRR7QNED-C01LwnLj.mjs → abnfDiagram-VRR7QNED-DQjgDcgA.mjs} +2 -2
  2. package/dist/{acp-harness-probe-BTT3QZDW.mjs → acp-harness-probe-nIQK1iGt.mjs} +3 -3
  3. package/dist/alias-JE7RI5QX-BfILuEvo.mjs +1 -0
  4. package/dist/{arc-CYbidMQb.mjs → arc-CO8jsQkL.mjs} +2 -2
  5. package/dist/architecture-TIHT7OUA-CScIhnar.mjs +1 -0
  6. package/dist/{architectureDiagram-ZJ3FMSHR-54tD72To.mjs → architectureDiagram-ZJ3FMSHR-CkUIG8wd.mjs} +2 -2
  7. package/dist/{array-BqQze_vE.mjs → array-Cerc_8W3.mjs} +1 -1
  8. package/dist/{awk2-BBAGSFUB-C0jQbtG6.mjs → awk2-BBAGSFUB-BH8WxyhW.mjs} +1 -1
  9. package/dist/{banner--DGfdMN8.mjs → banner-CIK2GwPx.mjs} +1 -1
  10. package/dist/{base64-4YMZCVJ5-E_RwmVUf.mjs → base64-4YMZCVJ5-CDuRvFBG.mjs} +1 -1
  11. package/dist/{basename-AA2KJYZQ-Dq2O0Dr6.mjs → basename-AA2KJYZQ-sv8gJZXS.mjs} +1 -1
  12. package/dist/bash-IJWYRKFO-DKUaUgF9.mjs +1 -0
  13. package/dist/{blockDiagram-677ZJIJ3-BFWl-x5e.mjs → blockDiagram-677ZJIJ3-sLhYyPCr.mjs} +2 -2
  14. package/dist/{c4Diagram-LMCZKHZV-BkY5gq8X.mjs → c4Diagram-LMCZKHZV-Cg6dfUXU.mjs} +2 -2
  15. package/dist/{cat-RDUMLXKC-C3vpYzfr.mjs → cat-RDUMLXKC-BtNo16C3.mjs} +1 -1
  16. package/dist/channel-DRk0OEK0.mjs +2 -0
  17. package/dist/{chmod-SYMGL4JA-BzT6KWst.mjs → chmod-SYMGL4JA-B15Xlp42.mjs} +1 -1
  18. package/dist/{chokidar-BCS--vwu.mjs → chokidar-CVNrjmRM.mjs} +1 -1
  19. package/dist/{chunk-2Q5K7J3B-BBA6_zq_.mjs → chunk-2Q5K7J3B-2Es1K_NO.mjs} +2 -2
  20. package/dist/{chunk-2TRDZQLB-C_2g1dOd.mjs → chunk-2TRDZQLB-G1LvPXqq.mjs} +1 -1
  21. package/dist/{chunk-32BRIVSS-Bsc-9o_O.mjs → chunk-32BRIVSS-ok2xg0Je.mjs} +2 -2
  22. package/dist/{chunk-3BS5SKQH-nmqNxSIe.mjs → chunk-3BS5SKQH-CFcrGLDG.mjs} +3 -3
  23. package/dist/{chunk-3H6UQG3A-DLwP7IGN.mjs → chunk-3H6UQG3A-Dx5ykWR0.mjs} +2 -2
  24. package/dist/{chunk-3ZUFRYJ4-DX32azSC.mjs → chunk-3ZUFRYJ4-DzbWfyzV.mjs} +1 -1
  25. package/dist/{chunk-4GTNDTRF-BT6SNd8s.mjs → chunk-4GTNDTRF-COTPYeV6.mjs} +2 -2
  26. package/dist/{chunk-4HHKTUW3-CL0rAYDo.mjs → chunk-4HHKTUW3-BkuKGebe.mjs} +1 -1
  27. package/dist/{chunk-4Q4SM6WR-Cf1guB-L.mjs → chunk-4Q4SM6WR-i8tiQRv3.mjs} +2 -2
  28. package/dist/{chunk-52WLFC77-D0ICJuoG.mjs → chunk-52WLFC77-BaT5_S-q.mjs} +2 -2
  29. package/dist/{chunk-55VFSPNA-B2P94_nY.mjs → chunk-55VFSPNA-Ct9maI6O.mjs} +2 -2
  30. package/dist/{chunk-5FCAYU7R-DamFELXo.mjs → chunk-5FCAYU7R-of7BBDNL.mjs} +2 -2
  31. package/dist/{chunk-5HE753X5-CK-MLDEN.mjs → chunk-5HE753X5-9kILZ5Nr.mjs} +2 -2
  32. package/dist/{chunk-5JV3BV7I-XXAgMX9r.mjs → chunk-5JV3BV7I-BKVVlFxh.mjs} +2 -2
  33. package/dist/{chunk-5QVNJEHU-0Om-Hby0.mjs → chunk-5QVNJEHU-CvZ-NmqQ.mjs} +2 -2
  34. package/dist/{chunk-5TONJI2A-Du5dq0Ys.mjs → chunk-5TONJI2A-CGHpmUrS.mjs} +2 -2
  35. package/dist/{chunk-5V6VZH6T-D9prksm6.mjs → chunk-5V6VZH6T-DdeqP2TW.mjs} +2 -2
  36. package/dist/{chunk-5VM5RSS4-B9nF5Lzd.mjs → chunk-5VM5RSS4-COK1ErrI.mjs} +2 -2
  37. package/dist/{chunk-62RKD26F-pjncC7By.mjs → chunk-62RKD26F-RtrcFE7S.mjs} +2 -2
  38. package/dist/{chunk-64BAICW3-2hCf5wU5.mjs → chunk-64BAICW3-0h-yIc1e.mjs} +2 -2
  39. package/dist/{chunk-6Z5SFZXK-eDS7YpbK.mjs → chunk-6Z5SFZXK-C5owNg1o.mjs} +2 -2
  40. package/dist/{chunk-74CEPOFO-D5a5lNJR.mjs → chunk-74CEPOFO--xsxhUFC.mjs} +1 -1
  41. package/dist/{chunk-7BUUIJ7U-CKtuqKC6.mjs → chunk-7BUUIJ7U-_1oXd84C.mjs} +2 -2
  42. package/dist/{chunk-7L36YK2X-L3jD5RT-.mjs → chunk-7L36YK2X-VlH7dlrD.mjs} +1 -1
  43. package/dist/{chunk-7TSDKFEO-Csacasvr.mjs → chunk-7TSDKFEO-BjOrsK6M.mjs} +1 -1
  44. package/dist/{chunk-A4HU7SVR-B6M8dLIA.mjs → chunk-A4HU7SVR-oMNSpej4.mjs} +1 -1
  45. package/dist/{chunk-A4JSPFCI-CcbmCyG6.mjs → chunk-A4JSPFCI-DtnWqT5O.mjs} +2 -2
  46. package/dist/{chunk-A65PWWJC-D_GAtJYb.mjs → chunk-A65PWWJC-LctFeUxK.mjs} +2 -2
  47. package/dist/{chunk-A7A2DBEE-D1HWRTG-.mjs → chunk-A7A2DBEE-DuuhuGG1.mjs} +1 -1
  48. package/dist/{chunk-A7ICOL4V-C8N1DqNa.mjs → chunk-A7ICOL4V-CzYDHdxM.mjs} +2 -2
  49. package/dist/{chunk-ALLTKNUZ-AOz3zDg8.mjs → chunk-ALLTKNUZ-BnLIZXEI.mjs} +2 -2
  50. package/dist/{chunk-APT7OOP2-e8HVVYt4.mjs → chunk-APT7OOP2-DESh647P.mjs} +2 -2
  51. package/dist/{chunk-BIQX33UG-CLYGAgEl.mjs → chunk-BIQX33UG-BVtPexox.mjs} +2 -2
  52. package/dist/{chunk-C7G6YPKG-6PzAyV0E.mjs → chunk-C7G6YPKG-DpNJWc2e.mjs} +2 -2
  53. package/dist/{chunk-CQNSW5MT-C4GcKMFe.mjs → chunk-CQNSW5MT-B6mAd0WS.mjs} +2 -2
  54. package/dist/{chunk-CYSBUYHQ-Bg8p94kN.mjs → chunk-CYSBUYHQ-CTWbbsmm.mjs} +2 -2
  55. package/dist/{chunk-D4J545R4-DstPCHY3.mjs → chunk-D4J545R4-Dy3lcp_X.mjs} +2 -2
  56. package/dist/{chunk-D6CWQ5DW-B-mbMqx1.mjs → chunk-D6CWQ5DW-Dl4tJcwX.mjs} +2 -2
  57. package/dist/{chunk-D7MEQ3VN-L5KTglFl.mjs → chunk-D7MEQ3VN-B-Qyxyo5.mjs} +2 -2
  58. package/dist/{chunk-DBKNVD4L-TDavYUFP.mjs → chunk-DBKNVD4L-Y2Mnp5lC.mjs} +2 -2
  59. package/dist/{chunk-DCAAORBQ-CVYtUSXu.mjs → chunk-DCAAORBQ-BxtVrSMT.mjs} +2 -2
  60. package/dist/{chunk-EEXR5ZDP-DKmcp163.mjs → chunk-EEXR5ZDP-BcjEP2wd.mjs} +1 -1
  61. package/dist/{chunk-EIZGF4BS-CF3xXFmY.mjs → chunk-EIZGF4BS-DYiqM1Ss.mjs} +2 -2
  62. package/dist/{chunk-EMLP6XTP-DOWW1yTB.mjs → chunk-EMLP6XTP-AFimKO17.mjs} +2 -2
  63. package/dist/{chunk-EX3LRPZG-Bk8s0J-D.mjs → chunk-EX3LRPZG-BYcqQlY8.mjs} +2 -2
  64. package/dist/{chunk-F23WWYKW-B1-WhWYU.mjs → chunk-F23WWYKW-BuCITNd6.mjs} +2 -2
  65. package/dist/{chunk-FWX5IMBZ-BKxaTzwN.mjs → chunk-FWX5IMBZ-BFNo8SGu.mjs} +2 -2
  66. package/dist/{chunk-GCTKCWKD-C-I4uPLP.mjs → chunk-GCTKCWKD-jz3yOk3f.mjs} +1 -1
  67. package/dist/{chunk-GOV5EKKI-DMNNr1LX.mjs → chunk-GOV5EKKI-IRzA9ik3.mjs} +2 -2
  68. package/dist/{chunk-GXVXFKBA-CHoBbpeP.mjs → chunk-GXVXFKBA-CGc4vqMu.mjs} +2 -2
  69. package/dist/{chunk-HDQ56CKY-D4gBGBPX.mjs → chunk-HDQ56CKY-Svz-iz8m.mjs} +2 -2
  70. package/dist/{chunk-HJQJAYMS-DfJokS61.mjs → chunk-HJQJAYMS-SgZmT_QE.mjs} +1 -1
  71. package/dist/{chunk-HJWBQKYG-C34BatAz.mjs → chunk-HJWBQKYG-BqFDM0xp.mjs} +2 -2
  72. package/dist/{chunk-HKLCLINH-DkU4By68.mjs → chunk-HKLCLINH-DKx243zB.mjs} +3 -3
  73. package/dist/{chunk-HL6NGDO2-CX48H9NQ.mjs → chunk-HL6NGDO2-B9GCn41X.mjs} +2 -2
  74. package/dist/{chunk-HOUHSVGY-CM96kWHC.mjs → chunk-HOUHSVGY-Cg_2_CUd.mjs} +2 -2
  75. package/dist/{chunk-HWKDQ44K-DvFquSuN.mjs → chunk-HWKDQ44K-CVxg-h0V.mjs} +2 -2
  76. package/dist/{chunk-I57KEIP3-C-GWJFeH.mjs → chunk-I57KEIP3-FVl4IVXz.mjs} +1 -1
  77. package/dist/{chunk-ICXQ74PX-a_OoZV-J.mjs → chunk-ICXQ74PX-CewdqzeE.mjs} +2 -2
  78. package/dist/{chunk-JG7HCLWE-BL-hOXz_.mjs → chunk-JG7HCLWE-BgiWVzAI.mjs} +2 -2
  79. package/dist/{chunk-JVPRLUMK-KIcPtJsL.mjs → chunk-JVPRLUMK-CH7w4zyh.mjs} +2 -2
  80. package/dist/{chunk-JWPE2WC7-B4cjhMJa.mjs → chunk-JWPE2WC7-cMhWwV9I.mjs} +2 -2
  81. package/dist/{chunk-K6LIBGJA-DifITl-A.mjs → chunk-K6LIBGJA-DI9ZkJey.mjs} +2 -2
  82. package/dist/{chunk-KEIR6QF5-D5fHRjH_.mjs → chunk-KEIR6QF5-BhaMJNB5.mjs} +1 -1
  83. package/dist/{chunk-KMEYNNUA-BulSmamX.mjs → chunk-KMEYNNUA-CabTsa7P.mjs} +2 -2
  84. package/dist/{chunk-KRBPSX3W-DrDWj6yq.mjs → chunk-KRBPSX3W-ciCGjpAL.mjs} +2 -2
  85. package/dist/{chunk-LL3S3NLB-rdnne998.mjs → chunk-LL3S3NLB-r8mDpVuz.mjs} +2 -2
  86. package/dist/{chunk-LTZRCH7N-CcW89saL.mjs → chunk-LTZRCH7N-Cj1hz7m7.mjs} +2 -2
  87. package/dist/{chunk-LWEGUNWT-56p2g4nb.mjs → chunk-LWEGUNWT-C3ON4AHi.mjs} +2 -2
  88. package/dist/{chunk-MDDMCKUK-CL40B1CC.mjs → chunk-MDDMCKUK-D3MZs3FF.mjs} +2 -2
  89. package/dist/{chunk-MDLLFABN-CDjkVtAO.mjs → chunk-MDLLFABN-DgTeOfIY.mjs} +2 -2
  90. package/dist/{chunk-MHTUABJP-D8V0hAkM.mjs → chunk-MHTUABJP-BbSobv_U.mjs} +1 -1
  91. package/dist/{chunk-MIZPJHVH-q38ahMm1.mjs → chunk-MIZPJHVH-CzqfuBdK.mjs} +2 -2
  92. package/dist/{chunk-MLXIYONF-BwLP8wJ5.mjs → chunk-MLXIYONF-BcM04nM_.mjs} +1 -1
  93. package/dist/{chunk-MOJQB5TN-a3t5NDdo.mjs → chunk-MOJQB5TN-CidbQQ7m.mjs} +2 -2
  94. package/dist/{chunk-MOZMSUNE-CxsrZHOL.mjs → chunk-MOZMSUNE-DTiZcqZ1.mjs} +2 -2
  95. package/dist/{chunk-MYE6AGBJ-Dh-4DgDD.mjs → chunk-MYE6AGBJ-B3ukegXT.mjs} +2 -2
  96. package/dist/{chunk-NAERJDUW-BKjqzg55.mjs → chunk-NAERJDUW-CoAYVGR3.mjs} +2 -2
  97. package/dist/{chunk-NCNPKYJZ-D7DW6h8D.mjs → chunk-NCNPKYJZ-C1KcgrGe.mjs} +2 -2
  98. package/dist/{chunk-NUYSJFDK-KW8uL1OU.mjs → chunk-NUYSJFDK-sPbPxu4W.mjs} +2 -2
  99. package/dist/{chunk-OCLXQMOG-DyesF30h.mjs → chunk-OCLXQMOG-BdLZfp3D.mjs} +2 -2
  100. package/dist/{chunk-OCS6LSEM-BuHq4vgI.mjs → chunk-OCS6LSEM-7beNWT9m.mjs} +2 -2
  101. package/dist/{chunk-OGEWGWER-BE748IwJ.mjs → chunk-OGEWGWER-B-Vr80Fa.mjs} +2 -2
  102. package/dist/{chunk-OSBZ3O6U-xu2H_t-I.mjs → chunk-OSBZ3O6U-DwDyo3Ly.mjs} +2 -2
  103. package/dist/{chunk-PBXLG62G-Dt3seCXC.mjs → chunk-PBXLG62G-ww-bn-Tp.mjs} +2 -2
  104. package/dist/{chunk-PP6PSHAB-BoToLAyG.mjs → chunk-PP6PSHAB-xKRHmmOd.mjs} +1 -1
  105. package/dist/{chunk-PUDLZKDR-CgH8fCPb.mjs → chunk-PUDLZKDR-CI0pacGF.mjs} +2 -2
  106. package/dist/{chunk-PXTK5WE2-6yLfmmSs.mjs → chunk-PXTK5WE2-Dfi2FrE5.mjs} +1 -1
  107. package/dist/{chunk-PYSFUGCK-DRdz7MOj.mjs → chunk-PYSFUGCK-BHwvxY2Q.mjs} +2 -2
  108. package/dist/{chunk-Q4XR5HBZ-Dj_gUljr.mjs → chunk-Q4XR5HBZ-4H-m7p0G.mjs} +2 -2
  109. package/dist/{chunk-QBLGF6JB-CZlF3VMT.mjs → chunk-QBLGF6JB-B_tvtCRO.mjs} +2 -2
  110. package/dist/{chunk-QCDB2VPH-BnCQYX4A.mjs → chunk-QCDB2VPH-DHsQu4h6.mjs} +2 -2
  111. package/dist/{chunk-QJ7O6ZN3-IyfDNhDN.mjs → chunk-QJ7O6ZN3-CTKdWbns.mjs} +2 -2
  112. package/dist/{chunk-R6QSAL5T-CK5T9nTq.mjs → chunk-R6QSAL5T-DA60heK6.mjs} +1 -1
  113. package/dist/{chunk-R7FJI6CG-CxRbRaPW.mjs → chunk-R7FJI6CG-BVR1ae7y.mjs} +2 -2
  114. package/dist/{chunk-RPNGRAAP-Dm3Foy2a.mjs → chunk-RPNGRAAP-df7FdhI4.mjs} +2 -2
  115. package/dist/{chunk-RYQCIY6F-DsJ8x3au.mjs → chunk-RYQCIY6F-C8F82Uai.mjs} +2 -2
  116. package/dist/{chunk-SDNKECQQ-eDjS077u.mjs → chunk-SDNKECQQ-BuTL-ot2.mjs} +2 -2
  117. package/dist/{chunk-SNN4IESC-dc9Emx2i.mjs → chunk-SNN4IESC-DVqEOGsL.mjs} +1 -1
  118. package/dist/{chunk-T56QNPHK-DcLcXLAt.mjs → chunk-T56QNPHK-COZC2A_r.mjs} +2 -2
  119. package/dist/{chunk-TLSUDHID-B0bd8ZfM.mjs → chunk-TLSUDHID-DAREQN9J.mjs} +2 -2
  120. package/dist/{chunk-TOMNU26N-CfKJYNUm.mjs → chunk-TOMNU26N-C3JZDC96.mjs} +2 -2
  121. package/dist/{chunk-TP4BZANS-EASixEFX.mjs → chunk-TP4BZANS-C2Z-CHHA.mjs} +2 -2
  122. package/dist/{chunk-TXBZCHCQ-CK2DQwjP.mjs → chunk-TXBZCHCQ-DOaoE5TV.mjs} +2 -2
  123. package/dist/{chunk-U6XO7XAA-ahVBPW6i.mjs → chunk-U6XO7XAA-BpjdcG5R.mjs} +2 -2
  124. package/dist/{chunk-V5MWI2OL-Cd1wUWKd.mjs → chunk-V5MWI2OL-D8SKWVO_.mjs} +1 -1
  125. package/dist/{chunk-V7JOEXUC-Ca3kqXAx.mjs → chunk-V7JOEXUC-CdEIYYNc.mjs} +2 -2
  126. package/dist/{chunk-V7TAPXDL-B4X-oI_G.mjs → chunk-V7TAPXDL-CQbB1mLa.mjs} +2 -2
  127. package/dist/chunk-VAUOI2AC-Ds6ZNp2p.mjs +2 -0
  128. package/dist/{chunk-VJFXDYWH-CYSruK3V.mjs → chunk-VJFXDYWH-C7Lg-Yts.mjs} +2 -2
  129. package/dist/{chunk-VOBGTVA6-D7PSswl5.mjs → chunk-VOBGTVA6-CKl2LR-K.mjs} +2 -2
  130. package/dist/{chunk-VR4S4FIN-DFCLUzSW.mjs → chunk-VR4S4FIN-mH-q10Uq.mjs} +2 -2
  131. package/dist/{chunk-VYOJP4TV-Dv2fFnVt.mjs → chunk-VYOJP4TV-DFxaC5Uc.mjs} +2 -2
  132. package/dist/{chunk-WKFATFPP-Dj6ID3dE.mjs → chunk-WKFATFPP-R7B51gCW.mjs} +2 -2
  133. package/dist/{chunk-WYO6CB5R-CkxB2qiV.mjs → chunk-WYO6CB5R-Cg1RXhAT.mjs} +2 -2
  134. package/dist/{chunk-X2AJGDEF-BAGBpB2e.mjs → chunk-X2AJGDEF-D97qevlv.mjs} +1 -1
  135. package/dist/{chunk-XKQRETAK-BFwrbyC7.mjs → chunk-XKQRETAK-BTmmMuta.mjs} +2 -2
  136. package/dist/{chunk-XKWWSDBF-BTq_A_8q.mjs → chunk-XKWWSDBF-BGzAOrO3.mjs} +2 -2
  137. package/dist/{chunk-XVDPCNWR-BeU4kyoN.mjs → chunk-XVDPCNWR-3ajbQWzU.mjs} +2 -2
  138. package/dist/chunk-XXDRQBXY-BvbdToKZ.mjs +2 -0
  139. package/dist/{chunk-Y2CYZVJY-D-AxePDr.mjs → chunk-Y2CYZVJY-C7FmC3Cl.mjs} +1 -1
  140. package/dist/{chunk-YMMW5UAP-Dk_tcn_t.mjs → chunk-YMMW5UAP-DbBgrudQ.mjs} +2 -2
  141. package/dist/{chunk-YOTPTUD7-BtJLrOsu.mjs → chunk-YOTPTUD7-BSOqhRr-.mjs} +2 -2
  142. package/dist/{chunk-YTNYSM6T-D70kTYmT.mjs → chunk-YTNYSM6T-CoxqCaLl.mjs} +2 -2
  143. package/dist/{chunk-YULBWSET-aTxOIZGk.mjs → chunk-YULBWSET-CuKhTv4j.mjs} +2 -2
  144. package/dist/{chunk-Z6LRHWXI-BGPMNtJW.mjs → chunk-Z6LRHWXI-CujGXDs8.mjs} +1 -1
  145. package/dist/{chunk-Z7JVV2SM-Y0p3CYM_.mjs → chunk-Z7JVV2SM-CiJwkxuY.mjs} +2 -2
  146. package/dist/{chunk-ZGVPDNZ5-DExn7OfJ.mjs → chunk-ZGVPDNZ5-BE_qYP6z.mjs} +2 -2
  147. package/dist/{chunk-ZIRB5QZD-B2znOhor.mjs → chunk-ZIRB5QZD-mhYZnDzb.mjs} +2 -2
  148. package/dist/{chunk-ZZO3UDB3-R3zof8I8.mjs → chunk-ZZO3UDB3-DCkJjNN2.mjs} +2 -2
  149. package/dist/classDiagram-OUVF2IWQ-rKP7gcsT.mjs +2 -0
  150. package/dist/classDiagram-v2-EOCWNBFH-BoWf4tYI.mjs +2 -0
  151. package/dist/{clear-5CZ5X4YR-DiniSeCm.mjs → clear-5CZ5X4YR-BNXs_KRD.mjs} +1 -1
  152. package/dist/cli.mjs +24 -24
  153. package/dist/{column-WLPMMSTS-B1OOeDAs.mjs → column-WLPMMSTS-BrY1gQI1.mjs} +1 -1
  154. package/dist/{comm-5SLSESQG-C4Rjg6X-.mjs → comm-5SLSESQG-aGB098lH.mjs} +1 -1
  155. package/dist/constants-Bt-MUkST.mjs +2 -0
  156. package/dist/{cose-bilkent-JH36ORCC-DwAqPWSx.mjs → cose-bilkent-JH36ORCC-CMfIp4st.mjs} +2 -2
  157. package/dist/{du-WO2ENHXQ-D_erNUzD.mjs → cp-XOYR4ABJ-D0LUaMQT.mjs} +1 -1
  158. package/dist/{curl-47BFPSFW-DtUGPJbr.mjs → curl-47BFPSFW-d1TMPUJw.mjs} +2 -2
  159. package/dist/{cut-OPC3VAGB-Bh_filgx.mjs → cut-OPC3VAGB-FXZX1WQM.mjs} +1 -1
  160. package/dist/cynefin-VYW2F7L2-DtazLHUs.mjs +1 -0
  161. package/dist/{cynefinDiagram-TSTJHNR4-CT6-xML3.mjs → cynefinDiagram-TSTJHNR4-CFbt5v4d.mjs} +2 -2
  162. package/dist/{cytoscape.esm-B3Kjf-Bp.mjs → cytoscape.esm-Dq6ZD9GH.mjs} +1 -1
  163. package/dist/{dagre-CTeiWCGh.mjs → dagre-CbI1Ylqw.mjs} +2 -2
  164. package/dist/{dagre-VKFMJZFB-BGysx5vx.mjs → dagre-VKFMJZFB-BWP36rMX.mjs} +2 -2
  165. package/dist/{head-HT2B6D2J-BkVS3Xmr.mjs → date-DD7FVA2V-7hk1aW9g.mjs} +1 -1
  166. package/dist/{defaultLocale-DPK87u2Z.mjs → defaultLocale-9SlCuWEL.mjs} +1 -1
  167. package/dist/{diagram-FQU43EPY-ZqRG6Q5e.mjs → diagram-FQU43EPY-D2pf7IBH.mjs} +2 -2
  168. package/dist/{diagram-G47NLZAW-DI7dcuHy.mjs → diagram-G47NLZAW-BlOXaBe6.mjs} +2 -2
  169. package/dist/{diagram-NH7WQ7WH-D1oPk0UR.mjs → diagram-NH7WQ7WH-DOwRNWDI.mjs} +2 -2
  170. package/dist/{diagram-OA4YK3LP-Bm3vioHL.mjs → diagram-OA4YK3LP-uyGYHUoX.mjs} +2 -2
  171. package/dist/{diagram-WEI45ONY-Dn8oUVjW.mjs → diagram-WEI45ONY-CmW1X9Kx.mjs} +2 -2
  172. package/dist/diff-HJF2MPDN-bcOaHvDo.mjs +1 -0
  173. package/dist/{dirname-LEMTZZFS-DNEfkSJA.mjs → dirname-LEMTZZFS-RRQ5Ar_Z.mjs} +1 -1
  174. package/dist/{dist-DODzJ7LG.mjs → dist-BmYngy7b.mjs} +1 -1
  175. package/dist/{cp-XOYR4ABJ-sYSLIPgW.mjs → du-WO2ENHXQ-Cg71FvLi.mjs} +1 -1
  176. package/dist/{ebnfDiagram-CCIWWBDH-Cv_KK2i9.mjs → ebnfDiagram-CCIWWBDH-BpBYlrRH.mjs} +2 -2
  177. package/dist/echo-O45JWWI2-BacOdfFs.mjs +1 -0
  178. package/dist/env-5EPCWSXR-T8XCKOX_.mjs +1 -0
  179. package/dist/{erDiagram-Q63AITRT-Bt6lGD8v.mjs → erDiagram-Q63AITRT-ChoKKmxG.mjs} +2 -2
  180. package/dist/eventmodeling-45OFAUF4-BIXp-P6z.mjs +1 -0
  181. package/dist/{execAsync-BUKncp0P.mjs → execAsync-BKp2jujj.mjs} +1 -1
  182. package/dist/{execAsync-DEmazqCE.mjs → execAsync-BuUKdKlz.mjs} +1 -1
  183. package/dist/{expand-DTNXU4LQ-CMN49iyc.mjs → expand-DTNXU4LQ-BD32VJaK.mjs} +1 -1
  184. package/dist/expr-YYCVMXE3-CgQib9F9.mjs +1 -0
  185. package/dist/{date-DD7FVA2V-ByX6dFhf.mjs → file-IGDTDPLG-BAlm5q29.mjs} +1 -1
  186. package/dist/find-DH2ALKQS-z-G7VPmU.mjs +1 -0
  187. package/dist/flag-coverage-6JEX67RU-Cj_NycUm.mjs +2 -0
  188. package/dist/flowDiagram-23GEKE2U-B4VrCGdr.mjs +1 -0
  189. package/dist/{fold-LDSORVYE-CkAvzOUr.mjs → fold-LDSORVYE-CDU-6eOS.mjs} +1 -1
  190. package/dist/{fs-traced-ArlA_yTp.mjs → fs-traced-Cq61rC8q.mjs} +3 -3
  191. package/dist/fs-traced-WMTb98_i.mjs +1 -0
  192. package/dist/{ganttDiagram-NO4QXBWP-DbUuL83g.mjs → ganttDiagram-NO4QXBWP-Cv7sGb-R.mjs} +2 -2
  193. package/dist/{getMachineId-bsd-Ba_eiHKT.mjs → getMachineId-bsd-DtFrm1Uy.mjs} +2 -2
  194. package/dist/{getMachineId-bsd-MpjjBCnQ.mjs → getMachineId-bsd-GFl1-Bje.mjs} +2 -2
  195. package/dist/{getMachineId-darwin-CCowcQE1.mjs → getMachineId-darwin--IR8MP8d.mjs} +2 -2
  196. package/dist/{getMachineId-darwin-CCtDS2VI.mjs → getMachineId-darwin-28jQHa_N.mjs} +2 -2
  197. package/dist/{getMachineId-linux-DMjXicei.mjs → getMachineId-linux-BZgyplQ5.mjs} +1 -1
  198. package/dist/{getMachineId-linux-DdmiwElW.mjs → getMachineId-linux-Bzx3S652.mjs} +1 -1
  199. package/dist/{getMachineId-unsupported-x9lk4Rw9.mjs → getMachineId-unsupported-CyTjujlI.mjs} +1 -1
  200. package/dist/{getMachineId-unsupported-xN2oDqpO.mjs → getMachineId-unsupported-DuB0leRF.mjs} +1 -1
  201. package/dist/{getMachineId-win-DuQfpi_A.mjs → getMachineId-win-BmvAZEMa.mjs} +2 -2
  202. package/dist/{getMachineId-win-mbAJtBuz.mjs → getMachineId-win-CuOFQQ73.mjs} +2 -2
  203. package/dist/gitGraph-TEB2WS4Q-BaTdqV7-.mjs +1 -0
  204. package/dist/{gitGraphDiagram-IHSO6WYX-C-Kq9SCM.mjs → gitGraphDiagram-IHSO6WYX-DxsFHicP.mjs} +2 -2
  205. package/dist/{graphlib-BRVRb9Ce.mjs → graphlib-DKEQBDTz.mjs} +1 -1
  206. package/dist/grep-2HUTXO5U-CsEE08ya.mjs +1 -0
  207. package/dist/gzip-AQXSGOVS-CmMf6H0r.mjs +1 -0
  208. package/dist/{file-IGDTDPLG-CsAmedJu.mjs → head-HT2B6D2J-DSBJixLD.mjs} +1 -1
  209. package/dist/help-VVWX7SA5-BncYWg0B.mjs +1 -0
  210. package/dist/history-J4QRNGRO-CULSDkzp.mjs +1 -0
  211. package/dist/{hostname-BK6HG2DE-TD2KmZjb.mjs → hostname-BK6HG2DE-CaZb-T_R.mjs} +1 -1
  212. package/dist/html-to-markdown-TFCECAGV-CF0t8_d3.mjs +1 -0
  213. package/dist/{index-7O1fNicl.d.mts → index-1MIt1xrM.d.mts} +1 -1
  214. package/dist/index.d.mts +4 -3
  215. package/dist/index.mjs +1 -1
  216. package/dist/info-DKCQHKI2-BxlpeeVn.mjs +1 -0
  217. package/dist/{infoDiagram-FWYZ7A6U-BcXqPzyL.mjs → infoDiagram-FWYZ7A6U-CbPpTq2x.mjs} +2 -2
  218. package/dist/{init-DotcULIJ.mjs → init-Buw5jj4Q.mjs} +1 -1
  219. package/dist/{init-CUut5PRP.mjs → init-CU23LoCM.mjs} +56 -56
  220. package/dist/init-DS23lDrI.mjs +1 -0
  221. package/dist/{ishikawaDiagram-FXEZZL3T-tlTxPgv8.mjs → ishikawaDiagram-FXEZZL3T-Dd5BEpOv.mjs} +2 -2
  222. package/dist/{join-GG2LDHE5-O6S65p4r.mjs → join-GG2LDHE5-kABASDPB.mjs} +1 -1
  223. package/dist/{journeyDiagram-5HDEW3XC-NczxLuUX.mjs → journeyDiagram-5HDEW3XC-W6Nbr96_.mjs} +2 -2
  224. package/dist/jq-LYZFFBZB-CIwp4u6h.mjs +1 -0
  225. package/dist/{js-exec-VXN6TZ7U-BJsjY3Aj.mjs → js-exec-VXN6TZ7U-1yyCDQqM.mjs} +2 -2
  226. package/dist/{kanban-definition-HUTT4EX6-CJ2cty8a.mjs → kanban-definition-HUTT4EX6-xcwe5vNg.mjs} +2 -2
  227. package/dist/{launch-json-removal-Bwz73HwG.mjs → launch-json-removal-CY8nwmxx.mjs} +2 -2
  228. package/dist/{lib-BpZC9d5Z.mjs → lib-BCIeHFfP.mjs} +1 -1
  229. package/dist/{lib-BS_oZ9bm.mjs → lib-TLTWf9qr.mjs} +1 -1
  230. package/dist/{line-CyR2aPKZ.mjs → line-Cq-NoiNn.mjs} +2 -2
  231. package/dist/{linear-DHgeTTi3.mjs → linear-DPbvcrPk.mjs} +2 -2
  232. package/dist/{ln-4TRFBYAT-DErk_Yl0.mjs → ln-4TRFBYAT-Dhr3hBr6.mjs} +1 -1
  233. package/dist/{loader-DVsRTqac.mjs → loader-DVUrcKP7.mjs} +2 -2
  234. package/dist/loader-DmPDSLFl.mjs +1 -0
  235. package/dist/{logger-5LePyO3n.mjs → logger-BZPV1wv8.mjs} +2 -2
  236. package/dist/ls-KSXFZCWH-BEv3e7-2.mjs +1 -0
  237. package/dist/{lzma-yp9l_vMN.mjs → lzma-Dh_aFpqW.mjs} +1 -1
  238. package/dist/{map-DbF7r1vR.mjs → map-CFzSl60r.mjs} +2 -2
  239. package/dist/{mcp-migrate-event-CWx0WLdE.mjs → mcp-migrate-event-B1gJf6bG.mjs} +1 -1
  240. package/dist/md5sum-INMIK4DX-CJ1G9gTe.mjs +1 -0
  241. package/dist/{mermaid-parser.core-Dq0Vyvhg.mjs → mermaid-parser.core-DejmtVwC.mjs} +2 -2
  242. package/dist/{mermaid.core-CZm3qvuv.mjs → mermaid.core-CB8v9A8r.mjs} +3 -3
  243. package/dist/{mindmap-definition-LN4V7U3C-DYytxufy.mjs → mindmap-definition-LN4V7U3C-BiYp6fzL.mjs} +2 -2
  244. package/dist/mkdir-TDEMSB6C-BY7IIkok.mjs +1 -0
  245. package/dist/mv-Z6MORUFL-C4m2WG8E.mjs +1 -0
  246. package/dist/{nl-U5YJDM32-CgnuF_hC.mjs → nl-U5YJDM32-CrNZhLtI.mjs} +1 -1
  247. package/dist/{od-VJEF2UR5-BTJQNl6y.mjs → od-VJEF2UR5-5RFpmlxK.mjs} +1 -1
  248. package/dist/{open-browser-C5MzSCJR.mjs → open-browser-CwwQWCcr.mjs} +2 -2
  249. package/dist/{ordinal-CUIZW000.mjs → ordinal-D5S_JXYv.mjs} +2 -2
  250. package/dist/packet-7NZHBO7P-DJoR1MQJ.mjs +1 -0
  251. package/dist/paste-7N6AFSDS-DQNANxpk.mjs +1 -0
  252. package/dist/{path-BT3cGQxQ.mjs → path-D4ahAhVD.mjs} +1 -1
  253. package/dist/{pegDiagram-2B236MQR-tT5pVAwT.mjs → pegDiagram-2B236MQR-DMP1ng8V.mjs} +2 -2
  254. package/dist/pie-RZYD4A2V-Ba8iL0H-.mjs +1 -0
  255. package/dist/{pieDiagram-ENE6RG2P-kD_93j1i.mjs → pieDiagram-ENE6RG2P-CSKXRjGQ.mjs} +2 -2
  256. package/dist/preview-BrzvwX4B.mjs +1 -0
  257. package/dist/{preview-MxO7wX5P.mjs → preview-Dqj-uWHU.mjs} +2 -2
  258. package/dist/printf-CX64KX2P-CKuJk-Cs.mjs +1 -0
  259. package/dist/public/assets/FeedbackForm-C_uo17S3.js +1 -0
  260. package/dist/public/assets/globals-rA-7Xs6l.css +1 -0
  261. package/dist/public/assets/{index-7byMgx9L.js → index-5F97h9QB.js} +2 -2
  262. package/dist/public/assets/{uninstall-DpiS8BLi.js → uninstall-38Y5JJ_e.js} +1 -1
  263. package/dist/public/index.html +3 -3
  264. package/dist/public/uninstall.html +3 -3
  265. package/dist/pwd-D4OZ7N27-CSTLotxZ.mjs +1 -0
  266. package/dist/{python3-DNGS4G3E-BPxhh_Jp.mjs → python3-DNGS4G3E-BZ5fPY5e.mjs} +2 -2
  267. package/dist/{quadrantDiagram-ABIIQ3AL-CyuIUsL6.mjs → quadrantDiagram-ABIIQ3AL-Do93EPf_.mjs} +2 -2
  268. package/dist/radar-I7S5WNFK-HP72Fmhl.mjs +1 -0
  269. package/dist/railroad-3IZDKUUU-DC3PWo_6.mjs +1 -0
  270. package/dist/railroad-abnf-AHOZXSZD-Vgpa9_KI.mjs +1 -0
  271. package/dist/railroad-ebnf-EBAXGLYW-B4SmMMsT.mjs +1 -0
  272. package/dist/railroad-peg-LSFZ7HO6-DLlDiUuB.mjs +1 -0
  273. package/dist/{railroadDiagram-RFXS5EU6-CHD_Jape.mjs → railroadDiagram-RFXS5EU6-BBHONGQu.mjs} +2 -2
  274. package/dist/readlink-MI4GCHJF-V9fwXBrg.mjs +1 -0
  275. package/dist/{repair-launch-json-56bz582u.mjs → repair-launch-json-DuJJhAjz.mjs} +2 -2
  276. package/dist/repair-mcp-configs-DN8th9x-.mjs +2 -0
  277. package/dist/repair-skills-CVT6M7om.mjs +4 -0
  278. package/dist/repair-skills-He_WQsPp.mjs +1 -0
  279. package/dist/{requirementDiagram-TGXJPOKE-CGQTVdQl.mjs → requirementDiagram-TGXJPOKE-CAGy_wFo.mjs} +2 -2
  280. package/dist/{rev-XOSYPP45-BGL4FR9H.mjs → rev-XOSYPP45-G2PvMYC2.mjs} +1 -1
  281. package/dist/rg-XNF3R3II-CuFYIwNn.mjs +1 -0
  282. package/dist/rm-RTZG23RL-BOvMrhon.mjs +1 -0
  283. package/dist/rmdir-XTQXT7RK-Dk19R-p8.mjs +1 -0
  284. package/dist/{rough.cjs-s8-IvpYn.mjs → rough.cjs-LxmwwhvT.mjs} +1 -1
  285. package/dist/{sankeyDiagram-HTMAVEWB-B1AFQN8q.mjs → sankeyDiagram-HTMAVEWB-B59ayZ_U.mjs} +2 -2
  286. package/dist/{sed-JAPPVBEU-YSD3Wwpz.mjs → sed-JAPPVBEU-BUaK4riL.mjs} +1 -1
  287. package/dist/seq-RN5ZUASB-D5aLn_so.mjs +1 -0
  288. package/dist/{sequenceDiagram-DBY2YBRQ-JQ2Wynkh.mjs → sequenceDiagram-DBY2YBRQ-BqY5gm2k.mjs} +2 -2
  289. package/dist/{server-lock-Cg66XiR-.mjs → server-lock--0V-ESY4.mjs} +2 -2
  290. package/dist/server-lock-owrYVjgw.mjs +1 -0
  291. package/dist/sha1sum-VJPNLNU6-DnTKth9v.mjs +1 -0
  292. package/dist/sha256sum-PI32XWXY-Z-xtGDHc.mjs +1 -0
  293. package/dist/{sizeCapture-X5ZJPWSS-Btionz6c.mjs → sizeCapture-X5ZJPWSS-D7Nqbe-W.mjs} +2 -2
  294. package/dist/skill-teardown-POqnRqru.mjs +2 -0
  295. package/dist/{sleep-VZFPZFWA-DNxq1g-4.mjs → sleep-VZFPZFWA-DcISab6N.mjs} +1 -1
  296. package/dist/sort-DCNRDA7U-C1gRzOOY.mjs +1 -0
  297. package/dist/{split-SITCSYCZ-Dl-r5t6o.mjs → split-SITCSYCZ-D4U2N_sH.mjs} +1 -1
  298. package/dist/{sqlite3-TE5AIOTF-DV5JBdcO.mjs → sqlite3-TE5AIOTF-DcjYN7WW.mjs} +1 -1
  299. package/dist/{src-nvx4LAFk.mjs → src-BuBt_xnY.mjs} +2 -2
  300. package/dist/{src-BVOdbrbz.mjs → src-C9LMhuL4.mjs} +12 -12
  301. package/dist/src-NzJXVevh.mjs +20 -0
  302. package/dist/{src-BLAyDRF9.mjs → src-n6rcQokc.mjs} +1 -1
  303. package/dist/start-YIarrDd3.mjs +1 -0
  304. package/dist/{start-BVMhwbcE.mjs → start-fVSyvtMn.mjs} +3 -3
  305. package/dist/stat-BT5A227F-B4qwqNn_.mjs +1 -0
  306. package/dist/{stateDiagram-2N3HPSRC-BzNiMGRR.mjs → stateDiagram-2N3HPSRC-BD1FBZi9.mjs} +2 -2
  307. package/dist/stateDiagram-v2-6OUMAXLB-CqmBRdZY.mjs +2 -0
  308. package/dist/strings-7PLOGTPD-BJ6vWsQi.mjs +1 -0
  309. package/dist/{swimlanes-5IMT3BWC-BrdJ_D0k.mjs → swimlanes-5IMT3BWC-D2eO0gTx.mjs} +2 -2
  310. package/dist/swimlanesDiagram-G3AALYLV-BiRCZWbo.mjs +9 -0
  311. package/dist/{tac-SJGXQ4T2-ByjKkvjF.mjs → tac-SJGXQ4T2-D-bfDFKg.mjs} +1 -1
  312. package/dist/tail-S5ULNTJU-CWnyTuXg.mjs +1 -0
  313. package/dist/{tar-MZQD7NO4-B2cyr2d4.mjs → tar-MZQD7NO4-Cx5bpVMY.mjs} +1 -1
  314. package/dist/tee-O7VXZDCO-B_duU1hV.mjs +1 -0
  315. package/dist/time-DEUO3QV2-CekCKA2I.mjs +1 -0
  316. package/dist/{timeline-definition-FHXFAJF6-ByhSkc7M.mjs → timeline-definition-FHXFAJF6-DZHpuaV_.mjs} +2 -2
  317. package/dist/{timeout-VRKMCG72-BJzTDNVp.mjs → timeout-VRKMCG72-DaJVXXR3.mjs} +1 -1
  318. package/dist/touch-DX2IJOQ4-CZteiICw.mjs +1 -0
  319. package/dist/tr-2HXZRDSW-D4XuTGWg.mjs +1 -0
  320. package/dist/tree-LYXBS7DC-CUIzQKTG.mjs +1 -0
  321. package/dist/treeView-QDETBFTQ-C9yOsbGY.mjs +1 -0
  322. package/dist/treemap-6X3UGDF4-iowse2nY.mjs +1 -0
  323. package/dist/true-WHJNXCHG-BzxCUQFd.mjs +1 -0
  324. package/dist/unexpand-RGTMIGZM-x3XCmR3I.mjs +1 -0
  325. package/dist/uniq-SUNANL47-DpupkNiO.mjs +1 -0
  326. package/dist/{vennDiagram-L72KCM5P-CosAdslh.mjs → vennDiagram-L72KCM5P-CGoW4QcS.mjs} +2 -2
  327. package/dist/wardley-OPB4EBWU-BL1Dan_S.mjs +1 -0
  328. package/dist/{wardleyDiagram-EHGQE667-Bdo1uN9O.mjs → wardleyDiagram-EHGQE667-DHS8jBWZ.mjs} +2 -2
  329. package/dist/wc-TQB3VNOX-D8llmcL9.mjs +1 -0
  330. package/dist/which-XZHEH76L-imZgNd5x.mjs +1 -0
  331. package/dist/whoami-DGKU3D2X-CzLNG51j.mjs +1 -0
  332. package/dist/{write-project-skill-BT53Ejz2.mjs → write-project-skill-DvqoihuV.mjs} +7 -7
  333. package/dist/xan-UD7JYIL2-_38Iv1cI.mjs +1 -0
  334. package/dist/xan-view-OW2TB7Z3-RT-IKMgr.mjs +1 -0
  335. package/dist/xargs-I6EZUCYF-Bu8VhXV_.mjs +1 -0
  336. package/dist/{xychartDiagram-FW5EYKEG-CBeluzNN.mjs → xychartDiagram-FW5EYKEG-CG0DSvm_.mjs} +2 -2
  337. package/dist/yq-OAKYHSXH-BcCBaLJN.mjs +1 -0
  338. package/package.json +5 -5
  339. package/dist/alias-JE7RI5QX-BvhaFG9J.mjs +0 -1
  340. package/dist/architecture-TIHT7OUA-BVYsZR9r.mjs +0 -1
  341. package/dist/bash-IJWYRKFO-BWspyNyq.mjs +0 -1
  342. package/dist/channel-DppMxZyL.mjs +0 -2
  343. package/dist/chunk-VAUOI2AC-CLylHljB.mjs +0 -2
  344. package/dist/chunk-XXDRQBXY-ClPfCVft.mjs +0 -2
  345. package/dist/classDiagram-OUVF2IWQ-c5qgwZAE.mjs +0 -2
  346. package/dist/classDiagram-v2-EOCWNBFH-D9ilZPqi.mjs +0 -2
  347. package/dist/constants-Bp8I4KQS.mjs +0 -2
  348. package/dist/cynefin-VYW2F7L2-CEVi_iCC.mjs +0 -1
  349. package/dist/diff-HJF2MPDN-DhZaF2MX.mjs +0 -1
  350. package/dist/echo-O45JWWI2-B8YWvx1Q.mjs +0 -1
  351. package/dist/env-5EPCWSXR-Cor7cJ6o.mjs +0 -1
  352. package/dist/eventmodeling-45OFAUF4-BENS2g0X.mjs +0 -1
  353. package/dist/expr-YYCVMXE3-VEQOsPiP.mjs +0 -1
  354. package/dist/find-DH2ALKQS-D4DqPp7j.mjs +0 -1
  355. package/dist/flag-coverage-6JEX67RU-C21BAvUp.mjs +0 -2
  356. package/dist/flowDiagram-23GEKE2U-BHZRRZtz.mjs +0 -1
  357. package/dist/fs-traced-C9U9YUGm.mjs +0 -1
  358. package/dist/gitGraph-TEB2WS4Q-C-obuzNL.mjs +0 -1
  359. package/dist/grep-2HUTXO5U-BHpyAWOj.mjs +0 -1
  360. package/dist/gzip-AQXSGOVS-kgzROhmg.mjs +0 -1
  361. package/dist/help-VVWX7SA5-Cnq4Pk95.mjs +0 -1
  362. package/dist/history-J4QRNGRO-ChaCzoJD.mjs +0 -1
  363. package/dist/html-to-markdown-TFCECAGV-DRmuleyA.mjs +0 -1
  364. package/dist/info-DKCQHKI2-_AQUrTgC.mjs +0 -1
  365. package/dist/init-BC0u4teF.mjs +0 -1
  366. package/dist/jq-LYZFFBZB-DTUwGGgl.mjs +0 -1
  367. package/dist/loader-DwZ-kNkG.mjs +0 -1
  368. package/dist/ls-KSXFZCWH-DQIF-HgH.mjs +0 -1
  369. package/dist/md5sum-INMIK4DX-BElHH82h.mjs +0 -1
  370. package/dist/mkdir-TDEMSB6C-BnpJKc8r.mjs +0 -1
  371. package/dist/mv-Z6MORUFL-CFyBiApv.mjs +0 -1
  372. package/dist/packet-7NZHBO7P-CHMfNci8.mjs +0 -1
  373. package/dist/paste-7N6AFSDS-CnLMuz8G.mjs +0 -1
  374. package/dist/pie-RZYD4A2V-02sGjUcO.mjs +0 -1
  375. package/dist/preview-B9XDskoX.mjs +0 -1
  376. package/dist/printf-CX64KX2P-DyVBy6Mg.mjs +0 -1
  377. package/dist/public/assets/FeedbackForm-yYdOpLff.js +0 -1
  378. package/dist/public/assets/globals-9XRqGE59.css +0 -1
  379. package/dist/pwd-D4OZ7N27-Pga3crue.mjs +0 -1
  380. package/dist/radar-I7S5WNFK-gNSWd2rG.mjs +0 -1
  381. package/dist/railroad-3IZDKUUU-tTi02nbm.mjs +0 -1
  382. package/dist/railroad-abnf-AHOZXSZD-DD6KwCgt.mjs +0 -1
  383. package/dist/railroad-ebnf-EBAXGLYW-zJw8iMTp.mjs +0 -1
  384. package/dist/railroad-peg-LSFZ7HO6-8PbAUZs1.mjs +0 -1
  385. package/dist/readlink-MI4GCHJF-D9QYkCU0.mjs +0 -1
  386. package/dist/repair-mcp-configs-DPiYn_Ou.mjs +0 -2
  387. package/dist/repair-skills-qZNnVHuG.mjs +0 -1
  388. package/dist/repair-skills-wKMPJS9U.mjs +0 -4
  389. package/dist/rg-XNF3R3II-BMfKONjk.mjs +0 -1
  390. package/dist/rm-RTZG23RL-vsz0Vtsc.mjs +0 -1
  391. package/dist/rmdir-XTQXT7RK-C9jARGFn.mjs +0 -1
  392. package/dist/seq-RN5ZUASB-hcgHczjD.mjs +0 -1
  393. package/dist/server-lock-DyY9o-h3.mjs +0 -1
  394. package/dist/sha1sum-VJPNLNU6-KpqF3VUr.mjs +0 -1
  395. package/dist/sha256sum-PI32XWXY-BI7zTPJ3.mjs +0 -1
  396. package/dist/sort-DCNRDA7U-urKKiOkB.mjs +0 -1
  397. package/dist/src-DBN0I6LD.mjs +0 -20
  398. package/dist/start-ecRmiiD7.mjs +0 -1
  399. package/dist/stat-BT5A227F-BzZhqUU7.mjs +0 -1
  400. package/dist/stateDiagram-v2-6OUMAXLB-8Ywz0Hzd.mjs +0 -2
  401. package/dist/strings-7PLOGTPD-BYF-zQB5.mjs +0 -1
  402. package/dist/swimlanesDiagram-G3AALYLV-Df_BjTMR.mjs +0 -9
  403. package/dist/tail-S5ULNTJU-Bu45hbfn.mjs +0 -1
  404. package/dist/tee-O7VXZDCO-D5VPiyFZ.mjs +0 -1
  405. package/dist/time-DEUO3QV2-DTXF6o9u.mjs +0 -1
  406. package/dist/touch-DX2IJOQ4-CJL2LWzm.mjs +0 -1
  407. package/dist/tr-2HXZRDSW-BMEHkLkI.mjs +0 -1
  408. package/dist/tree-LYXBS7DC-B9nDoMUt.mjs +0 -1
  409. package/dist/treeView-QDETBFTQ-b0kDTk8s.mjs +0 -1
  410. package/dist/treemap-6X3UGDF4-CbmqvOp3.mjs +0 -1
  411. package/dist/true-WHJNXCHG-BrTi18ZN.mjs +0 -1
  412. package/dist/unexpand-RGTMIGZM-Cz9o379Y.mjs +0 -1
  413. package/dist/uniq-SUNANL47-Jq_1JF4a.mjs +0 -1
  414. package/dist/wardley-OPB4EBWU-58Nq0iPk.mjs +0 -1
  415. package/dist/wc-TQB3VNOX-8TWuJ_OV.mjs +0 -1
  416. package/dist/which-XZHEH76L-C0nS7069.mjs +0 -1
  417. package/dist/whoami-DGKU3D2X-BRFeF7SV.mjs +0 -1
  418. package/dist/xan-UD7JYIL2-CsuyuKIz.mjs +0 -1
  419. package/dist/xan-view-OW2TB7Z3-BQPByClA.mjs +0 -1
  420. package/dist/xargs-I6EZUCYF-CfQ6WD0x.mjs +0 -1
  421. package/dist/yq-OAKYHSXH-q34fmnbQ.mjs +0 -1
  422. /package/dist/{expansion-VBDYWVZR-e2HuIG0U.mjs → expansion-VBDYWVZR-CeY6vkty.mjs} +0 -0
  423. /package/dist/public/assets/{globals-C8FRwDSr.js → globals-isQ8TLSF.js} +0 -0
@@ -1,36 +1,36 @@
1
- import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Y as r}from"./sleep-ByqzSHar.mjs";import{Ho as i,K as a,U as o,rs as s}from"./src-Bnk118Ag.mjs";import{$t as c,Br as l,Cr as u,Dr as d,Jn as f,Qt as p,Tr as m,c as h,dr as g,gn as _,l as v,mn as y,pn as b,qn as x,tr as S,u as ee,ur as te,vn as ne,wr as C,xa as re}from"./src-BVOdbrbz.mjs";import{M as w,P as T}from"./fs-traced-ArlA_yTp.mjs";import{D as ie,T as E,d as D,g as ae,h as oe,i as se,l as ce,m as le,p as ue,s as de,t as fe,u as pe,w as me}from"./write-project-skill-BT53Ejz2.mjs";import{i as O,n as k,o as A,r as he,s as j,t as M}from"./colors-BsmVIwfM.mjs";import{t as ge}from"./constants-Bp8I4KQS.mjs";import{t as N}from"./is-object-ByG7RnjH.mjs";import{t as _e}from"./preview-MxO7wX5P.mjs";import{createRequire as ve}from"node:module";import{execFileSync as ye}from"node:child_process";import be,{dirname as P,isAbsolute as xe,join as F,relative as I,resolve as Se,sep as Ce}from"node:path";import L from"node:process";import{fileURLToPath as we}from"node:url";import{existsSync as R,lstatSync as Te,mkdirSync as Ee,readFileSync as z,readlinkSync as De,realpathSync as Oe,statSync as ke,writeFileSync as Ae}from"node:fs";import{homedir as je}from"node:os";import*as Me from"node:readline";import{inspect as Ne,stripVTControlCharacters as Pe,styleText as B}from"node:util";import{AsyncLocalStorage as Fe,AsyncResource as Ie}from"node:async_hooks";const Le=new Set([`emacs`,`vim`]);function Re(e){return Le.has(e)}function ze(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Re))):[]}const V=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Be=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Ve=e=>e.name===`space`,He=e=>e.name===`backspace`,Ue=e=>`1234567890`.includes(e.name),We=e=>e.name===`enter`||e.name===`return`;var Ge=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},Ke=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},qe=class extends Error{name=`ExitPromptError`},Je=class extends Error{name=`HookError`},Ye=class extends Error{name=`ValidationError`};const Xe=new Fe;function Ze(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Qe(e,t){let n=Ze(e);return Xe.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function H(){let e=Xe.getStore();if(!e)throw new Je(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function $e(){return H().rl}function et(e){return Ie.bind((...t)=>{let n=H(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function tt(e){let t=H(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function nt(){H().handleChange()}const U={queue(e){let t=H(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e($e());if(r!=null&&typeof r!=`function`)throw new Ye(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=H();et(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=H();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function rt(e){return typeof e==`function`}function W(e){return tt(t=>{let n=Ie.bind(function(e){t.get()!==e&&(t.set(e),nt())});if(t.initialized)return[t.get(),n];let r=rt(e)?e():e;return t.set(r),[r,n]})}function it(e,t){tt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&U.queue(e),n.set(t)})}function at(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const ot={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:`╱`},st={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:`⅒`},ct={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`},lt={...ot,...st},ut={...ot,...ct},G=at()?lt:ut;Object.entries(st);const dt={prefix:{idle:B(`blue`,`?`),done:B(`green`,G.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>B(`yellow`,e))},keybindings:[],style:{answer:e=>B(`cyan`,e),message:e=>B(`bold`,e),error:e=>B(`red`,`> ${e}`),defaultAnswer:e=>B(`dim`,`(${e})`),help:e=>B(`dim`,e),highlight:e=>B(`cyan`,e),key:e=>B(`cyan`,B(`bold`,`<${e}>`))}};function ft(){return{...dt,keybindings:ze()}}function pt(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 mt(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=pt(n)&&pt(r)?mt(n,r):r}return t}function ht(...e){return mt(ft(),...e.filter(e=>e!=null))}function gt({status:e=`idle`,theme:t}){let[n,r]=W(!1),[i,a]=W(0),{prefix:o,spinner:s}=ht(t);return it(()=>{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 _t(e,t){return tt(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 vt(e){return W({current:e})[0]}function yt(e){let t=vt(e);t.current=e,it(e=>{let n=!1,r=et((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var bt=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 xt=(()=>{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}})(),St=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Ct=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,wt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Tt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Et=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Dt=/\t{1,1000}/y,Ot=/[\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,kt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,At=/\p{M}+/gu,jt={limit:1/0,ellipsis:``},Mt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Mt(i,jt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[kt,l],[wt,0],[Tt,o],[Dt,s],[Ot,c],[Et,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(At,``)){let t=e.codePointAt(0)||0;if(S=St(t)?2:Ct(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===Et?xt(e.slice(p,n.lastIndex)):n===Ot?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}},Nt={limit:1/0,ellipsis:``,ellipsisWidth:0},K=(e,t={})=>Mt(e,Nt,t).width,Pt=`]8;;`,Ft=RegExp(`(?:\\[(?<code>\\d+)m|\\${Pt}(?<uri>.*))`,`y`),It=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},Lt=e=>`[${e}m`,Rt=e=>`${Pt}${e}`,zt=(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(Pt,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())},Bt=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(``)},Vt=(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(``),zt(s,r,t),c=K(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){zt(s,r,t),c=K(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){zt(s,r,t),c=K(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Bt(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===`›`){Ft.lastIndex=e+1;let t=Ft.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+=Rt(``));let e=i?It(i):void 0;i&&e&&(r+=Lt(e))}else t===`
4
- `&&(i&&It(i)&&(r+=Lt(i)),a&&(r+=Rt(a)))}return r},Ht=/\r?\n/;function Ut(e,t,n){return String(e).normalize().split(Ht).map(e=>Vt(e,t,n)).join(`
5
- `)}function Wt(e,t){return e.split(`
6
- `).flatMap(e=>Ut(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-ByqzSHar.mjs";import{Ho as i,K as a,U as o,rs as s}from"./src-Bnk118Ag.mjs";import{$t as c,Br as l,Cr as u,Dr as d,Jn as f,Qt as p,Tr as m,c as h,dr as g,gn as _,l as v,mn as y,pn as b,qn as x,tr as S,u as ee,ur as te,vn as ne,wr as C,xa as re}from"./src-C9LMhuL4.mjs";import{M as w,P as T}from"./fs-traced-Cq61rC8q.mjs";import{C as ie,a as ae,b as oe,d as E,f as se,i as ce,l as le,o as ue,s as D,t as de,u as fe,x as pe}from"./write-project-skill-DvqoihuV.mjs";import{i as O,n as k,o as A,r as j,s as M,t as N}from"./colors-BsmVIwfM.mjs";import{t as me}from"./constants-Bt-MUkST.mjs";import{t as P}from"./is-object-ByG7RnjH.mjs";import{t as he}from"./preview-Dqj-uWHU.mjs";import{createRequire as ge}from"node:module";import{execFileSync as _e}from"node:child_process";import ve,{dirname as F,isAbsolute as ye,join as I,relative as L,resolve as be,sep as xe}from"node:path";import R from"node:process";import{fileURLToPath as Se}from"node:url";import{existsSync as z,lstatSync as Ce,mkdirSync as we,readFileSync as B,readlinkSync as Te,realpathSync as Ee,statSync as De,writeFileSync as Oe}from"node:fs";import{homedir as ke}from"node:os";import*as Ae from"node:readline";import{inspect as je,stripVTControlCharacters as Me,styleText as V}from"node:util";import{AsyncLocalStorage as Ne,AsyncResource as Pe}from"node:async_hooks";const Fe=new Set([`emacs`,`vim`]);function Ie(e){return Fe.has(e)}function Le(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Ie))):[]}const H=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Re=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,ze=e=>e.name===`space`,Be=e=>e.name===`backspace`,Ve=e=>`1234567890`.includes(e.name),He=e=>e.name===`enter`||e.name===`return`;var Ue=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},We=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ge=class extends Error{name=`ExitPromptError`},Ke=class extends Error{name=`HookError`},qe=class extends Error{name=`ValidationError`};const Je=new Ne;function Ye(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Xe(e,t){let n=Ye(e);return Je.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function U(){let e=Je.getStore();if(!e)throw new Ke(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function Ze(){return U().rl}function Qe(e){return Pe.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 $e(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 et(){U().handleChange()}const tt={queue(e){let t=U(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(Ze());if(r!=null&&typeof r!=`function`)throw new qe(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=U();Qe(()=>{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 nt(e){return typeof e==`function`}function W(e){return $e(t=>{let n=Pe.bind(function(e){t.get()!==e&&(t.set(e),et())});if(t.initialized)return[t.get(),n];let r=nt(e)?e():e;return t.set(r),[r,n]})}function rt(e,t){$e(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&tt.queue(e),n.set(t)})}function it(){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 at={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:`╱`},ot={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:`⅒`},st={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`},ct={...at,...ot},lt={...at,...st},G=it()?ct:lt;Object.entries(ot);const ut={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 dt(){return{...ut,keybindings:Le()}}function ft(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 pt(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=ft(n)&&ft(r)?pt(n,r):r}return t}function mt(...e){return pt(dt(),...e.filter(e=>e!=null))}function ht({status:e=`idle`,theme:t}){let[n,r]=W(!1),[i,a]=W(0),{prefix:o,spinner:s}=mt(t);return rt(()=>{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 gt(e,t){return $e(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 _t(e){return W({current:e})[0]}function vt(e){let t=_t(e);t.current=e,rt(e=>{let n=!1,r=Qe((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var yt=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 bt=(()=>{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}})(),xt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,St=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,Ct=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,wt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Tt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Et=/\t{1,1000}/y,Dt=/[\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,Ot=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,kt=/\p{M}+/gu,At={limit:1/0,ellipsis:``},jt=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?jt(i,At,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Ot,l],[Ct,0],[wt,o],[Et,s],[Dt,c],[Tt,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(kt,``)){let t=e.codePointAt(0)||0;if(S=xt(t)?2:St(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===Tt?bt(e.slice(p,n.lastIndex)):n===Dt?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}},Mt={limit:1/0,ellipsis:``,ellipsisWidth:0},K=(e,t={})=>jt(e,Mt,t).width,Nt=`]8;;`,Pt=RegExp(`(?:\\[(?<code>\\d+)m|\\${Nt}(?<uri>.*))`,`y`),Ft=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},It=e=>`[${e}m`,Lt=e=>`${Nt}${e}`,Rt=(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(Nt,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())},zt=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(``)},Bt=(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(``),Rt(s,r,t),c=K(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Rt(s,r,t),c=K(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Rt(s,r,t),c=K(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>zt(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===`›`){Pt.lastIndex=e+1;let t=Pt.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+=Lt(``));let e=i?Ft(i):void 0;i&&e&&(r+=It(e))}else t===`
4
+ `&&(i&&Ft(i)&&(r+=It(i)),a&&(r+=Lt(a)))}return r},Vt=/\r?\n/;function Ht(e,t,n){return String(e).normalize().split(Vt).map(e=>Bt(e,t,n)).join(`
5
+ `)}function Ut(e,t){return e.split(`
6
+ `).flatMap(e=>Ht(e,t,{trim:!1,wordWrap:!1}).split(`
7
7
  `).map(e=>e.trimEnd())).join(`
8
- `)}function Gt(){return(0,bt.default)({defaultWidth:80,output:$e().output})}function Kt({active:e,renderedItems:t,pageSize:n,loop:r}){let i=vt({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 qt({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=Gt(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:Wt(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=Kt({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 Jt=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 Yt=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`,Xt=Symbol.for(`signal-exit emitter`),Zt=globalThis,Qt=Object.defineProperty.bind(Object);var $t=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Zt[Xt])return Zt[Xt];Qt(Zt,Xt,{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}},en=class{};const tn=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var nn=class extends en{onExit(){return()=>{}}load(){}unload(){}},rn=class extends en{#e=an.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new $t;#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(!Yt(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 Yt(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`&&Yt(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 an=globalThis.process,{onExit:on,load:sn,unload:cn}=tn(Yt(an)?new rn(an):new nn),ln=`\x1B[?25l`,un=(e=1)=>e>0?`[${e}A`:``,dn=(e=1)=>e>0?`[${e}B`:``,fn=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,pn=`\x1B[2K`,mn=e=>e>0?(pn+un(1)).repeat(e-1)+pn+`\x1B[G`:``,hn=e=>e.split(`
11
- `).length,gn=e=>e.split(`
12
- `).pop()??``;var _n=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=Pe(gn(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=Gt();e=Wt(e,i),t=Wt(t,i),n.length%i===0&&(e+=`
8
+ `)}function Wt(){return(0,yt.default)({defaultWidth:80,output:Ze().output})}function Gt({active:e,renderedItems:t,pageSize:n,loop:r}){let i=_t({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 Kt({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=Wt(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:Ut(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=Gt({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 qt=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 Jt=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`,Yt=Symbol.for(`signal-exit emitter`),Xt=globalThis,Zt=Object.defineProperty.bind(Object);var Qt=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Xt[Yt])return Xt[Yt];Zt(Xt,Yt,{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}},$t=class{};const en=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var tn=class extends $t{onExit(){return()=>{}}load(){}unload(){}},nn=class extends $t{#e=rn.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new Qt;#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(!Jt(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 Jt(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`&&Jt(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 rn=globalThis.process,{onExit:an,load:on,unload:sn}=en(Jt(rn)?new nn(rn):new tn),cn=`\x1B[?25l`,ln=(e=1)=>e>0?`[${e}A`:``,un=(e=1)=>e>0?`[${e}B`:``,dn=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,fn=`\x1B[2K`,pn=e=>e>0?(fn+ln(1)).repeat(e-1)+fn+`\x1B[G`:``,mn=e=>e.split(`
11
+ `).length,hn=e=>e.split(`
12
+ `).pop()??``;var gn=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=Me(hn(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=Wt();e=Ut(e,i),t=Ut(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?hn(t):0);o>0&&(a+=un(o)),a+=fn(this.cursorPos.cols),this.write(dn(this.extraLinesUnderPrompt)+mn(this.height)+a),this.extraLinesUnderPrompt=o,this.height=hn(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(fn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=dn(this.extraLinesUnderPrompt);t+=e?mn(this.height):`
15
- `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},vn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const yn=globalThis.setImmediate;function bn(){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 xn(e){let t=bn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Jt.default;s.pipe(r.output??process.stdout);let c=Me.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new _n(c),{promise:u,resolve:d,reject:f}=vn.withResolver(),p=()=>f(new Ke);if(a){let e=()=>f(new Ge({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(on((e,t)=>{f(new qe(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new qe(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),Qe(c,a=>{let m=Ie.bind(()=>U.clearAll());c.on(`close`,m),o.add(()=>c.removeListener(`close`,m));let h=()=>{let r=()=>l.checkCursorPos();c.input.on(`keypress`,r),o.add(()=>c.input.removeListener(`keypress`,r));let i=null;a(()=>{let r=!1;try{let a=e(n,e=>{r?d(e):i={value:e}});if(a===void 0){let e=t[1]?.getFileName();throw e&&!e.startsWith(`file://`)&&(e=be.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),U.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?yn(h):h(),Object.assign(u.then(e=>(U.clearAll(),e),e=>{throw U.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var J=class{separator=B(`dim`,Array.from({length:15}).join(G.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},Sn=r();const Cn=`.ok/`,wn=`**/.ok/*`,Tn=`!**/${s}/`;function En(e){let t=[`.ok/`,`.okignore`];for(let n of ce){let r=D[n];r.projectConfigPath&&t.push(Rn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=F(e,...o);if(R(n))try{let e=a(z(n,`utf-8`));if(e){for(let[n,r]of Object.entries(e.skills))if(n!==`open-knowledge`)for(let e of r.hosts){let r=i[e];r&&t.push(`${r}/${n}/`)}}}catch{}return Array.from(new Set(t))}function Dn(e,t){let n=Nn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Pn(n)};let r=Y(e);if(r.kind!==`ok`)return r.result;let i=R(r.path)?z(r.path,`utf-8`):``,a=Ln(i),o=[],s=[];for(let e of t)In(a,e)?s.push(e):o.push(e);if(o.length===0)return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]};let c=i.length===0||i.endsWith(`
14
+ `+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?mn(t):0);o>0&&(a+=ln(o)),a+=dn(this.cursorPos.cols),this.write(un(this.extraLinesUnderPrompt)+pn(this.height)+a),this.extraLinesUnderPrompt=o,this.height=mn(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(dn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=un(this.extraLinesUnderPrompt);t+=e?pn(this.height):`
15
+ `,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},_n=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const vn=globalThis.setImmediate;function yn(){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 bn(e){let t=yn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new qt.default;s.pipe(r.output??process.stdout);let c=Ae.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new gn(c),{promise:u,resolve:d,reject:f}=_n.withResolver(),p=()=>f(new We);if(a){let e=()=>f(new Ue({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(an((e,t)=>{f(new Ge(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new Ge(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),Xe(c,a=>{let m=Pe.bind(()=>tt.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=ve.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),tt.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?vn(h):h(),Object.assign(u.then(e=>(tt.clearAll(),e),e=>{throw tt.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`)}},xn=r();const Sn=`.ok/`,Cn=`**/.ok/*`,wn=`!**/${s}/`;function Tn(e){let t=[`.ok/`,`.okignore`];for(let n of ae){let r=D[n];r.projectConfigPath&&t.push(Ln(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 En(e,t){let n=Mn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Nn(n)};let r=Y(e);if(r.kind!==`ok`)return r.result;let i=z(r.path)?B(r.path,`utf-8`):``,a=In(i),o=[],s=[];for(let e of t)Fn(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{Ae(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=Y(e);if(n.kind!==`ok`)return n.result;if(!R(n.path))return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let r=t.map(e=>Fn(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(wn),i.add(Tn);let a;try{a=z(n.path,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}let o=a.split(`
19
- `),s=new Set,c=[];for(let e of o){let t=e.trim();if(i.has(t)){s.add(t);continue}c.push(e)}let l=t.filter(e=>{for(let t of Fn(e))if(s.has(t))return!0;return!1});if(s.size===0)return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let u=c.join(`
20
- `);if(u!==a)try{Ae(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function kn(e){let t=Y(e);if(t.kind!==`ok`)return t.result.reason===`no-git`||t.result.reason===`malformed-pointer`||t.result.reason===`inaccessible`?`no-git`:`shared`;if(!R(t.path))return`shared`;let n;try{n=z(t.path,`utf-8`)}catch{return`shared`}let r=Ln(n),i=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=Y(e);if(t.kind!==`ok`||!R(t.path))return[];let n;try{n=z(t.path,`utf-8`)}catch{return[]}let r=Ln(n);return En(e).filter(e=>In(r,e))}function jn(e){let t=Y(e);if(t.kind!==`ok`||!R(t.path))return!1;let n;try{n=z(t.path,`utf-8`)}catch{return!1}let r=Ln(n);return r.has(wn)&&r.has(Tn)}function Mn(e,t){let n=Y(e);if(n.kind!==`ok`)return n.result;let r=``;if(R(n.path))try{r=z(n.path,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}let i=new Set([...Fn(Cn),wn,Tn]),a=r.split(`
21
- `).filter(e=>!i.has(e.trim())),o=t?[wn,Tn]:[Cn],s=a.join(`
18
+ `)}\n`;try{Oe(r.path,`${i}${c}${l}`,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]}}function Dn(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=>Pn(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(Cn),i.add(wn);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 Pn(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{Oe(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function On(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=In(n),i=Tn(e);for(let e of i)if(Fn(r,e))return`local-only`;return r.has(Cn)?`local-only`:`shared`}function kn(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=In(n);return Tn(e).filter(e=>Fn(r,e))}function An(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=In(n);return r.has(Cn)&&r.has(wn)}function jn(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([...Pn(Sn),Cn,wn]),a=r.split(`
21
+ `).filter(e=>!i.has(e.trim())),o=t?[Cn,wn]:[Sn],s=a.join(`
22
22
  `),c=`${s}${s.length===0||s.endsWith(`
23
23
  `)?``:`
24
24
  `}${o.join(`
25
- `)}\n`;try{Ae(n.path,c,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:[],removed:[]}}function Nn(e,t){let n=[];for(let r of t)if(R(Se(e,r)))try{ye(`git`,[`ls-files`,`--error-unmatch`,`--`,r],l({cwd:e,stdio:[`ignore`,`ignore`,`ignore`]})),n.push(r)}catch{}return{tracked:n}}function Pn(e){let t=[];t.push(`Cannot switch OpenKnowledge to local-only — these OK files are tracked upstream:`),t.push(``);for(let n of e)t.push(` ${n}`);t.push(``),t.push(`.git/info/exclude only hides files that git isn't already tracking. To proceed, untrack them first:`),t.push(``);for(let n of e){let e=n.replace(/\/$/,``),r=n.endsWith(`/`)?`-r `:``;t.push(` git rm --cached ${r}${e}`)}return t.push(``),t.push("Then re-run the command. Note: `git rm --cached` removes the files from the index — your teammates will see a deletion on their next pull. If you don't want that, leave sharing mode set to 'shared'."),t.join(`
26
- `)}function Y(e){let t=re(e);switch(t.kind){case`repository`:{let e=t.repository.readCommonDir();if(e.kind===`unreadable`)return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}};let n=F(e.path,`info`);return R(n)?{kind:`ok`,path:F(n,`exclude`)}:{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-info-dir`}}}case`absent`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-git`}};case`malformed-pointer`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`malformed-pointer`}};case`inaccessible`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}}}}function Fn(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function In(e,t){for(let n of Fn(t))if(e.has(n))return!0;return!1}function Ln(e){let t=new Set;for(let n of e.split(`
27
- `)){let e=n.trim();e.length!==0&&t.add(e)}return t}function Rn(e,t){return zn(I(t,e))}function zn(e){return Ce===`/`?e:e.split(Ce).join(`/`)}function Bn(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 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 ke(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
25
+ `)}\n`;try{Oe(n.path,c,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:[],removed:[]}}function Mn(e,t){let n=[];for(let r of t)if(z(be(e,r)))try{_e(`git`,[`ls-files`,`--error-unmatch`,`--`,r],l({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(`
26
+ `)}function Y(e){let t=re(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 Pn(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function Fn(e,t){for(let n of Pn(t))if(e.has(n))return!0;return!1}function In(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 Ln(e,t){return Rn(L(t,e))}function Rn(e){return xe===`/`?e:e.split(xe).join(`/`)}function zn(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 Bn(e){let t=(e.match(/\r\n/g)??[]).length;return t===0?!1:t>=(e.match(/\n/g)??[]).length-t}function Vn(e){try{return De(e).mode&511}catch{return}}function Hn(e,t){let n=e.charCodeAt(0)===65279,r=n?e.slice(1):e,i=r.includes(`\r
29
29
  `)?`\r
30
30
  `:`
31
- `,a=m(r,t,void 0,{formattingOptions:{...Bn(r),eol:i}});if(a.length===0)return{text:e,changed:!1};let o=`${n?``:``}${u(r,a)}`;return{text:o,changed:o!==e}}const Wn={icon:{checked:B(`green`,G.circleFilled),unchecked:G.circle,cursor:G.pointer,disabledChecked:B(`green`,G.circleDouble),disabledUnchecked:`-`},style:{disabled:e=>B(`dim`,e),renderSelectedChoices:e=>e.map(e=>e.short).join(`, `),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be toggled.`}};function Gn(e){return!J.isSeparator(e)&&!e.disabled}function Kn(e){return!J.isSeparator(e)}function qn(e){return!J.isSeparator(e)&&e.checked}function Jn(e){return Gn(e)?{...e,checked:!e.checked}:e}function Yn(e){return function(t){return Gn(t)?{...t,checked:e}:t}}function Xn(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,checkedName:t,disabled:!1,checked:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,checkedName:e.checkedName??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})}var Zn=xn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=ht(Wn,e.theme),{keybindings:c}=s,[l,u]=W(`idle`),d=gt({status:l,theme:s}),[f,p]=W(Xn(e.choices)),m=_t(()=>{let e=f.findIndex(Kn),t=f.findLastIndex(Kn);if(e===-1)throw new Ye(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=W(m.first),[_,v]=W();yt(async e=>{if(We(e)){let e=f.filter(qn),n=await a([...e]);i&&!e.length?v(`At least one choice must be selected`):n===!0?(u(`done`),t(e.map(e=>e.value))):v(n||`You must select a valid value`)}else if(V(e,c)||Be(e,c)){if(_&&v(void 0),r||V(e,c)&&h!==m.first||Be(e,c)&&h!==m.last){let t=V(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!Kn(f[n]));g(n)}}else if(Ve(e)){let e=f[h];e&&!J.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?Jn(e):e))))}else if(e.name===o.all){let e=f.some(e=>Gn(e)&&!e.checked);p(f.map(Yn(e)))}else if(e.name===o.invert)p(f.map(Jn));else if(Ue(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>J.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&Gn(i)&&(g(r),p(f.map((e,t)=>t===r?Jn(e):e)))}});let y=s.style.message(e.message,l),b,x=qt({items:f,active:h,renderItem({item:e,isActive:t}){if(J.isSeparator(e))return` ${e.separator}`;let n=t?s.icon.cursor:` `;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=e.checked?s.icon.disabledChecked:s.icon.disabledUnchecked;return s.style.disabled(`${n}${r} ${e.name} ${t}`)}t&&(b=e.description);let r=e.checked?s.icon.checked:s.icon.unchecked,i=e.checked?e.checkedName:e.name;return(t?s.style.highlight:e=>e)(`${n}${r} ${i}`)},pageSize:n,loop:r});if(l===`done`){let e=f.filter(qn);return[d,y,s.style.answer(s.style.renderSelectedChoices(e,f))].filter(Boolean).join(` `)}let S=[[`↑↓`,`navigate`],[`space`,`select`]];o.all&&S.push([o.all,`all`]),o.invert&&S.push([o.invert,`invert`]),S.push([`⏎`,`submit`]);let ee=s.style.keysHelpTip(S);return`${[[d,y].filter(Boolean).join(` `),x,` `,b?s.style.description(b):``,_?s.style.error(_):``,ee].filter(Boolean).join(`
32
- `).trimEnd()}${ln}`});const Qn={icon:{cursor:G.pointer},style:{disabled:e=>B(`dim`,e),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be selected.`},indexMode:`hidden`};function $n(e){return!J.isSeparator(e)&&!e.disabled}function er(e){return!J.isSeparator(e)}function tr(e){return e.map(e=>{if(J.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}var nr=xn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=ht(Qn,e.theme),{keybindings:a}=i,[o,s]=W(`idle`),c=gt({status:o,theme:i}),l=vt(),u=!a.includes(`vim`),d=_t(()=>tr(e.choices),[e.choices]),f=_t(()=>{let e=d.findIndex(er),t=d.findLastIndex(er);if(e===-1)throw new Ye(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=_t(()=>`default`in e?d.findIndex(t=>$n(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=W(p===-1?f.first:p),g=d[m];if(g==null||J.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=W();yt((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),We(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(V(e,a)||Be(e,a)){if(r.clearLine(0),n||V(e,a)&&m!==f.first||Be(e,a)&&m!==f.last){let t=V(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!er(d[n]));h(n)}}else if(Ue(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>J.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&$n(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(He(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>J.isSeparator(t)||!$n(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),it(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=qt({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:ee}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,ee?i.style.description(ee):``,_?i.style.error(_):``,b].filter(Boolean).join(`
33
- `).trimEnd()}${ln}`});
31
+ `,a=m(r,t,void 0,{formattingOptions:{...zn(r),eol:i}});if(a.length===0)return{text:e,changed:!1};let o=`${n?``:``}${u(r,a)}`;return{text:o,changed:o!==e}}const Un={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 Wn(e){return!J.isSeparator(e)&&!e.disabled}function Gn(e){return!J.isSeparator(e)}function Kn(e){return!J.isSeparator(e)&&e.checked}function qn(e){return Wn(e)?{...e,checked:!e.checked}:e}function Jn(e){return function(t){return Wn(t)?{...t,checked:e}:t}}function Yn(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 Xn=bn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=mt(Un,e.theme),{keybindings:c}=s,[l,u]=W(`idle`),d=ht({status:l,theme:s}),[f,p]=W(Yn(e.choices)),m=gt(()=>{let e=f.findIndex(Gn),t=f.findLastIndex(Gn);if(e===-1)throw new qe(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=W(m.first),[_,v]=W();vt(async e=>{if(He(e)){let e=f.filter(Kn),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)||Re(e,c)){if(_&&v(void 0),r||H(e,c)&&h!==m.first||Re(e,c)&&h!==m.last){let t=H(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!Gn(f[n]));g(n)}}else if(ze(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?qn(e):e))))}else if(e.name===o.all){let e=f.some(e=>Wn(e)&&!e.checked);p(f.map(Jn(e)))}else if(e.name===o.invert)p(f.map(qn));else if(Ve(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>J.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&Wn(i)&&(g(r),p(f.map((e,t)=>t===r?qn(e):e)))}});let y=s.style.message(e.message,l),b,x=Kt({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(Kn);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 ee=s.style.keysHelpTip(S);return`${[[d,y].filter(Boolean).join(` `),x,` `,b?s.style.description(b):``,_?s.style.error(_):``,ee].filter(Boolean).join(`
32
+ `).trimEnd()}${cn}`});const Zn={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 Qn(e){return!J.isSeparator(e)&&!e.disabled}function $n(e){return!J.isSeparator(e)}function er(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 tr=bn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=mt(Zn,e.theme),{keybindings:a}=i,[o,s]=W(`idle`),c=ht({status:o,theme:i}),l=_t(),u=!a.includes(`vim`),d=gt(()=>er(e.choices),[e.choices]),f=gt(()=>{let e=d.findIndex($n),t=d.findLastIndex($n);if(e===-1)throw new qe(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=gt(()=>`default`in e?d.findIndex(t=>Qn(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();vt((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),He(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(H(e,a)||Re(e,a)){if(r.clearLine(0),n||H(e,a)&&m!==f.first||Re(e,a)&&m!==f.last){let t=H(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!$n(d[n]));h(n)}}else if(Ve(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&&Qn(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(Be(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>J.isSeparator(t)||!Qn(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),rt(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Kt({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:ee}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,ee?i.style.description(ee):``,_?i.style.error(_):``,b].filter(Boolean).join(`
33
+ `).trimEnd()}${cn}`});
34
34
  /*!
35
35
  * Copyright (c) Squirrel Chat et al., All rights reserved.
36
36
  * SPDX-License-Identifier: BSD-3-Clause
@@ -58,7 +58,7 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Y as r}from"./slee
58
58
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59
59
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60
60
  */
61
- 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}};
61
+ let nr=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var rr=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(nr);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
62
  /*!
63
63
  * Copyright (c) Squirrel Chat et al., All rights reserved.
64
64
  * SPDX-License-Identifier: BSD-3-Clause
@@ -86,9 +86,9 @@ let rr=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]
86
86
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
87
87
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88
88
  */
89
- 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+=`
89
+ function ir(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function ar(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
90
  `,e===t&&(i+=` `.repeat(a+n+2),i+=`^
91
- `))}return i}var X=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=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}};
91
+ `))}return i}var X=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=ir(t.toml,t.ptr),i=ar(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
92
92
  /*!
93
93
  * Copyright (c) Squirrel Chat et al., All rights reserved.
94
94
  * SPDX-License-Identifier: BSD-3-Clause
@@ -116,12 +116,12 @@ function ar(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop()
116
116
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
117
117
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
118
118
  */
119
- 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]===`
119
+ let or=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,sr=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,cr=/^[+-]?0[0-9_]/;function lr(e,t){let n=e[t++],r=n,i=n===`'`,a=n===e[t]&&n===e[t+1];a&&(e[t+=2]===`
120
120
  `?t++:e[t]===`\r`&&e[t+1]===`
121
121
  `&&(t+=2));let o=``,s=t,c=0;for(let l=t;l<e.length;l++)if(n=e[l],a&&(n===`
122
122
  `||n===`\r`&&e[l+1]===`
123
123
  `))c&&=3;else if(n<` `&&n!==` `||n===``)throw new X(`control characters are not allowed in strings`,{toml:e,ptr:l});else if((!c||c===3)&&n===r&&(!a||e[l+1]===r&&e[l+2]===r))return a&&(e[l+3]===r&&l++,e[l+3]===r&&l++),[c?o:o+e.slice(s,l),l+(a?3:1)];else if(!c)!i&&n===`\\`&&(o+=e.slice(s,s=l),c=1);else if(c===1)if(n===`x`||n===`u`||n===`U`){let t=0,r=n===`x`?2:n===`u`?4:8;for(let n=0;n<r;n++,l++){let n=e.charCodeAt(l+1),r=n>=48&&n<=57?n-48:n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:-1;if(r<0)throw new X(`invalid non-hex character in unicode escape`,{toml:e,ptr:l+1});t=t<<4|r}if(t<0||t>1114111||t>=55296&&t<=57343)throw new X(`invalid unicode escape`,{toml:e,ptr:l});o+=String.fromCodePoint(t),s=l+1,c=0}else if(n===` `||n===` `)c=2;else{if(n===`b`)o+=`\b`;else if(n===`t`)o+=` `;else if(n===`n`)o+=`
124
- `;else if(n===`f`)o+=`\f`;else if(n===`r`)o+=`\r`;else if(n===`e`)o+=`\x1B`;else if(n===`"`)o+=`"`;else if(n===`\\`)o+=`\\`;else throw new X(`unrecognized escape sequence`,{toml:e,ptr:l});s=l+1,c=0}else if(n!==` `&&n!==` `){if(c===2)throw new X(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});c=+(!i&&n===`\\`),s=l}throw new X(`unfinished string`,{toml:e,ptr:t})}function 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}
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 ur(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=or.test(e);if(i||sr.test(e)){if(cr.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 rr(e);if(!a.isValid())throw new X(`invalid value`,{toml:t,ptr:n});return a}
125
125
  /*!
126
126
  * Copyright (c) Squirrel Chat et al., All rights reserved.
127
127
  * SPDX-License-Identifier: BSD-3-Clause
@@ -149,12 +149,12 @@ let sr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,cr=/^[+-]?
149
149
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
150
150
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
151
151
  */
152
- function fr(e,t=0,n=e.length){let r=e.indexOf(`
153
- `,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===`
152
+ function dr(e,t=0,n=e.length){let r=e.indexOf(`
153
+ `,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function fr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
154
154
  `)return n;if(r===`\r`&&e[n+1]===`
155
155
  `)return n+1;if(r<` `&&r!==` `||r===``)throw new X(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function Z(e,t,n,r){let i;for(;;){for(;(i=e[t])===` `||i===` `||!n&&(i===`
156
156
  `||i===`\r`&&e[t+1]===`
157
- `);)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===`
157
+ `);)t++;if(r||i!==`#`)break;t=fr(e,t)}return t}function pr(e,t,n,r,i=!1){if(!r)return t=dr(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=dr(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
158
158
  `||t===`\r`&&e[a+1]===`
159
159
  `))return a}throw new X(`cannot find end of structure`,{toml:e,ptr:t})}
160
160
  /*!
@@ -184,8 +184,8 @@ function fr(e,t=0,n=e.length){let r=e.indexOf(`
184
184
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
185
185
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
186
186
  */
187
- 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]!==`
188
- `&&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]}
187
+ function mr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(fr(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function hr(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===`[`?yr(e,t,r,i):vr(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]=lr(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=pr(e,t,`,`,n),s=mr(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++),[ur(s[0],e,t,i),o]}
189
189
  /*!
190
190
  * Copyright (c) Squirrel Chat et al., All rights reserved.
191
191
  * SPDX-License-Identifier: BSD-3-Clause
@@ -213,9 +213,9 @@ function hr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(pr(e,i),r=r
213
213
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
214
214
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
215
215
  */
216
- 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!==`
217
- `&&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!==`
218
- `&&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]}
216
+ let gr=/^[a-zA-Z0-9-_]+[ \t]*$/;function _r(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]=lr(e,t);r=e.indexOf(`.`,c);let l=e.slice(c,r<0||r>a?a:r),u=dr(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(!gr.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 vr(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=fr(e,t);else if(o!==` `&&o!==` `&&o!==`
217
+ `&&o!==`\r`){let o,s=i,c=!1,[l,u]=_r(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]=hr(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 yr(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=fr(e,t);else if(a!==` `&&a!==` `&&a!==`
218
+ `&&a!==`\r`){let a=hr(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
219
  /*!
220
220
  * Copyright (c) Squirrel Chat et al., All rights reserved.
221
221
  * SPDX-License-Identifier: BSD-3-Clause
@@ -243,7 +243,7 @@ let _r=/^[a-zA-Z0-9-_]+[ \t]*$/;function vr(e,t,n=`=`){let r=t-1,i=[],a=e.indexO
243
243
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
244
244
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
245
245
  */
246
- 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]!==`
246
+ function br(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 xr(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=_r(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=br(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=_r(e,s),i=br(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=hr(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
247
  `&&e[s]!==`\r`)throw new X(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=Z(e,s)}return r}
248
248
  /*!
249
249
  * Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -272,13 +272,13 @@ 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
272
272
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
273
273
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
274
274
  */
275
- 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&&`
276
- `}[[${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&&`
277
- `)+Ar(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
278
- `)+jr(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Dr(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 Mr(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(wr(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=jr(0,e,``,t,n);return r[r.length-1]===`
275
+ let Sr=/^[a-z0-9-_]+$/i;function Cr(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function wr(e){for(let t=0;t<e.length;t++)if(Cr(e[t])!==`object`)return!1;return e.length!=0}function Tr(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function Er(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 Tr(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Dr(e,n,r);if(t===`array`)return Or(e,n,r)}function Dr(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+=Sr.test(o)?o:Tr(o),i+=` = `,i+=Er(e[o],Cr(e[o]),t-1,n)}return i+` }`}function Or(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+=Er(e[i],Cr(e[i]),t-1,n)}return r+` ]`}function kr(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+=Ar(0,e[a],t,n,r);return i}function Ar(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=Cr(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Sr.test(c)?c:Tr(c);if(e===`array`&&wr(t[c]))o+=(o&&`
277
+ `)+kr(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
278
+ `)+Ar(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Er(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 jr(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(Cr(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=Ar(0,e,``,t,n);return r[r.length-1]===`
280
280
  `?r:r+`
281
- `}const Nr=`${ue}-dev`;function Pr(e){return e.startsWith(ue)}function Fr(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command!==`ok-pi-managed-extension`||!Array.isArray(t.args))return!1;let n=t.args[0];return typeof n==`string`&&Pr(n)}function Ir(e){return{command:oe,args:[e]}}function Lr(e={}){let t=e.mode===`dev`?Nr:le,n={unix:ae({...e,platformName:`darwin`}),win32:ae({...e,platformName:`win32`})};return`${t}
281
+ `}const Mr=`${le}-dev`;function Nr(e){return e.startsWith(le)}function Pr(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`&&Nr(n)}function Fr(e){return{command:E,args:[e]}}function Ir(e={}){let t=e.mode===`dev`?Mr:fe,n={unix:se({...e,platformName:`darwin`}),win32:se({...e,platformName:`win32`})};return`${t}
282
282
  /**
283
283
  * Open Knowledge bridge for Pi — MANAGED FILE, written by \`ok init\`.
284
284
  * Hand edits are overwritten whenever OK re-syncs this project; remove it
@@ -621,23 +621,23 @@ export default function okBridge(pi: {
621
621
  }
622
622
  });
623
623
  }
624
- `}function Rr(e){try{return Oe.native(e)}catch{return e}}function zr(e,t){let n=I(Rr(t),Rr(e));return n.length>0&&!n.startsWith(`..`)&&!xe(n)}const Br=e=>{try{let t=ye(`git`,[`rev-parse`,`--show-toplevel`],l({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??je(),r=t.gitTopLevel??Br,i=Se(e),a;try{a=Oe(i)}catch{a=i}let o=a,s=0;for(;s<30&&!(o===n||o===`/`||o===``);){if(ne(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??ve(t);try{return n(F(P(we(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=Te(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=De(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=xe(i)?i:F(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=d(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&&C(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(`
625
- `)?n:`${n}\n`)}function ui(e,t){let n=(0,Sn.stringify)(t);T(e,n.endsWith(`
626
- `)?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(`
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 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(!R(e))return ci(e,hi(t,i,n,r)),{kind:`written`};let a;try{a=z(e,`utf-8`)}catch(e){return Q(`json config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(a.trim()===``)return ci(e,hi(t,i,n,r)),{kind:`written`};if(Buffer.byteLength(a,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let o=oi(a);if(!o)return{kind:`declined`,reason:`unparseable`};if(si(o,t)>1)return{kind:`declined`,reason:`duplicate-container`};let s=gi(C(o),t,i),c=N(s)?s[n]:void 0,l=c!==void 0;if(l&&fi(c,r))return{kind:`overwritten`};let d=a.charCodeAt(0)===65279,f=d?a.slice(1):a,p=f.includes(`\r
624
+ `}function Lr(e){try{return Ee.native(e)}catch{return e}}function Rr(e,t){let n=L(Lr(t),Lr(e));return n.length>0&&!n.startsWith(`..`)&&!ye(n)}const zr=e=>{try{let t=_e(`git`,[`rev-parse`,`--show-toplevel`],l({cwd:e,encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]})).trim();return t.length>0?t:null}catch{return null}};function Br(e,t={}){let n=t.homeDir??ke(),r=t.gitTopLevel??zr,i=be(e),a;try{a=Ee(i)}catch{a=i}let o=a,s=0;for(;s<30&&!(o===n||o===`/`||o===``);){if(ne(o))return{projectRoot:o,defaultContentDir:`.`,ancestorPromoted:o!==a,gitRootPromoted:!1};let e=F(o);if(e===o)break;o=e,s+=1}let c=r(a);return c!==null&&Rr(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 Vr(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 Hr=[`native`,`index.js`];function Ur(e={}){let t=e.moduleUrl??import.meta.url,n=e.requireModule??ge(t);try{return n(I(F(Se(t)),...Hr))}catch(e){Vr(e)||Q(`bundled loader failed to load`,e)}try{return n(`@inkeep/open-knowledge-native-config`)}catch(e){return Vr(e)||Q(`workspace addon failed to load`,e),null}}function Wr(){let e=Ur();return e&&typeof e.resolveSymlinkWritePath==`function`?e:null}function Gr(e){let t=e,n=new Set;for(;;){let r;try{r=Ce(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=Te(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=ye(i)?i:I(F(t),i)}}let Kr;function qr(){return Kr===void 0&&(Kr=Wr()),Kr}function Jr(e,t=qr){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 Gr(e)}function Yr(){let e=Ur();return e&&typeof e.parseTomlToJson==`function`?e:null}function Xr(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 Zr(e){if(!P(e))throw Error(`TOML root is not a table`);return e}function Qr(e){return{backend:`native`,parseToObject(t){return Zr(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 $r(){return{backend:`fallback`,parseToObject(e){return Zr(xr(e))}}}function ei(e=Yr){let t=e();return t&&Xr(t)?Qr(t):$r()}let ti=null;function ni(){return ti===null&&(ti=ei()),ti}const ri={allowTrailingComma:!0,disallowComments:!1};function ii(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function ai(e){let t=[],n=d(e,t,ri);return t.some(t=>!ii(t,e))||!n||n.type!==`object`?null:n}function oi(e,t){let n=0;for(let r of e.children??[]){let e=r.children?.[0];e!==void 0&&C(e)===t&&(n+=1)}return n}function si(e,t){T(e,`${JSON.stringify(t,null,2)}\n`)}function ci(e,t){let n=jr(t);T(e,n.endsWith(`
625
+ `)?n:`${n}\n`)}function li(e,t){let n=(0,xn.stringify)(t);T(e,n.endsWith(`
626
+ `)?n:`${n}\n`)}const ui=10*1024*1024;function di(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)=>di(e,t[n]));if(P(e)&&P(t)){let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>Object.hasOwn(t,n)&&di(e[n],t[n])):!1}return!1}function fi(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 pi(e,t,n){return t===void 0?[e,n]:[e,t,n]}function mi(e,t,n,r){let i={[n]:r};return{[e]:t===void 0?i:{[t]:i}}}function hi(e,t,n){let r=e[t];return n===void 0?r:P(r)?r[n]:void 0}function gi(e,t,n,r,i){if(!z(e))return si(e,mi(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 si(e,mi(t,i,n,r)),{kind:`written`};if(Buffer.byteLength(a,`utf-8`)>ui)return{kind:`declined`,reason:`oversize`};let o=ai(a);if(!o)return{kind:`declined`,reason:`unparseable`};if(oi(o,t)>1)return{kind:`declined`,reason:`duplicate-container`};let s=hi(C(o),t,i),c=P(s)?s[n]:void 0,l=c!==void 0;if(l&&di(c,r))return{kind:`overwritten`};let d=a.charCodeAt(0)===65279,f=d?a.slice(1):a,p=f.includes(`\r
628
628
  `)?`\r
629
629
  `:`
630
- `,h=m(f,mi(t,i,n),r,{formattingOptions:{...pi(f),eol:p}}),g=`${d?``:``}${u(f,h)}`;return g!==a&&T(e,g,{mode:Hn(e)}),{kind:l?`overwritten`:`written`}}function vi(e,t,n,r,i){let a=``;if(R(t))try{a=z(t,`utf-8`)}catch(e){return Q(`toml config read failed`,e),{kind:`declined`,reason:`unparseable`}}let o=a.trim()===``;if(e.backend===`fallback`)return o?(li(t,{[n]:{[r]:i}}),{kind:`written`}):{kind:`declined`,reason:`no-native-writer`};let s=a.charCodeAt(0)===65279,c=s?a.slice(1):a,l=Vn(c),u=o||c.endsWith(`
630
+ `,h=m(f,pi(t,i,n),r,{formattingOptions:{...fi(f),eol:p}}),g=`${d?``:``}${u(f,h)}`;return g!==a&&T(e,g,{mode:Vn(e)}),{kind:l?`overwritten`:`written`}}function _i(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?(ci(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=Bn(c),u=o||c.endsWith(`
631
631
  `),d;try{d=e.upsertEntry(c,r,i)}catch(e){return Q(`upsertEntry failed`,e),{kind:`declined`,reason:`unparseable`}}let f=d.text;u?f.endsWith(`
632
632
  `)||(f=`${f}\n`):f=f.replace(/\n+$/,``),l&&(f=f.replace(/\r\n/g,`
633
633
  `).replace(/\n/g,`\r
634
- `));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(R(e))try{i=z(e,`utf-8`)}catch(e){return Q(`yaml config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(i.trim()===``)return ui(e,{[t]:{[n]:r}}),{kind:`written`};if(Buffer.byteLength(i,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let a=i.charCodeAt(0)===65279,o=a?i.slice(1):i,s=(0,Sn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,Sn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Vn(o);o.endsWith(`
634
+ `));let p=`${s?``:``}${f}`;return p!==a&&T(t,p,{mode:Vn(t)}),{kind:d.existed?`overwritten`:`written`}}function vi(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 li(e,{[t]:{[n]:r}}),{kind:`written`};if(Buffer.byteLength(i,`utf-8`)>ui)return{kind:`declined`,reason:`oversize`};let a=i.charCodeAt(0)===65279,o=a?i.slice(1):i,s=(0,xn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,xn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Bn(o);o.endsWith(`
635
635
  `)?u.endsWith(`
636
636
  `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),d&&(u=u.replace(/\r\n/g,`
637
637
  `).replace(/\n/g,`\r
638
- `));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?
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 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(g);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(g.filter(e=>t.includes(e)))}function Di(e,t,n){let r=Se(n,e),i;try{i=ke(r)}catch(e){let t=e.code;throw t===`ENOENT`?new $(`--content-dir path does not exist: ${r}`):new $(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new $(`--content-dir must be a directory: ${r}`);let a=I(Oi(t),Oi(r));if(a.startsWith(`..`)||xe(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Oi(e){try{return Oe(e)}catch{return e}}const ki=`open-knowledge-ui`;function Ai(e,t,n){try{return R(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{fe(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{Ee(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(Ee(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{Ee(P(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{w(`${t}.lock`,()=>{let e=null;try{e=z(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||!R(n)))return{editorId:e.id,label:e.label,path:n}}async function Fi(e){let t=me(e.editors).filter(e=>e.scope===`global`),n={mode:`published`,skipAvailabilityCheck:!0};return t.map(t=>ji(t,``,n,e.home))}function Ii(e,t,n,r){let i=Ri(e,t,n,r);return i.kind===`present`?i.entry:null}function Li(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 Ri(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!R(i))return{kind:`absent`};try{if(ke(i).size>di)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=z(i,`utf-8`)}catch{return{kind:`decline`,reason:`unparseable`}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:Ir(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ri().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Li(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,Sn.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Li(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=oi(a);return s?si(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Li(C(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function zi(e={}){let t=Se(e.cwd??process.cwd()),n=Vr(t,{homeDir:e.home}),r=n.projectRoot,i=!R(F(r,`.ok`)),a=n.gitRootPromoted?I(r,t):void 0,o=e.contentDir===void 0?n.defaultContentDir:Di(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${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`},c=await ee(r),l;try{l=y(r,{contentDir:o})}catch(t){let i=D.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:c.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 u=l.created.includes(ge),d=!1;if(c.didInit)try{d=_(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{b(r)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore entry at ${r}: ${e instanceof Error?e.message:String(e)}`)}let p=await h(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}),v=e.editors??Gi(r,e.home),ne=e.editors??ce.filter(e=>D[e].projectConfigPath!==void 0||D[e].projectSkillPath!==void 0),C=me(v),re=me(ne),w=e.mcp===!1||m===null,T=Array.from(new Map([...C,...w?[]:re].map(e=>[e.id,e])).values()),ie=C.filter(t=>Ai(t,r,e.home)),E=[],ae=[],oe=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)&&C.includes(t)&&t.scope===`global`&&E.push(ji(t,r,s,e.home)),xi(m)&&re.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`)&&oe.add(n)}}let le=new Set;for(let t of re){let n=t.projectSkillPath?.(r);!n||le.has(n)||(le.add(n),ae.push(se(t,r,{home:e.home})))}let ue=!w&&m!==null&&xi(m)?re.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,fe=w?[]:ie.map(e=>Pi(e,r)).filter(e=>e!==void 0).filter(e=>!oe.has(e.path)),pe=e.installUserSkill??f,O=e.home??je(),k=Ei(e.skills),A=!1,he=!1,M=!1,N=!1,_e=!1;for(let t of g){let n=k.has(t);if(await S(O,te[t],n).catch(()=>{}),n){A=!0;let n=await pe({home:e.home,bundleId:t,force:!0});n===`installed`?he=!0:n===`failed`?M=!0:n===`no-hosts`?_e=!0:N=!0}else try{de(O,t)}catch{}}let ve=M?`failed`:he?`installed`:A&&N?`skip-current`:A&&_e?`no-hosts`:`declined`,ye=he?x(O).map(e=>e.editorId):[],be=w?`skipped-flag`:`skipped-missing`,P=E.find(e=>e.editorId===`claude`)??E[0]??{action:be,configPath:D.claude.configPath(r,e.home)},xe=await Bi({projectRoot:r,desiredMode:await Ti({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:l.created,contentUpdated:l.updated,contentSkipped:l.skipped,editors:E,projectSkills:ae,legacyProjectConfigs:fe,skillInstall:ve,skillHosts:ye,didGitInit:c.didInit,rootGitignoreCreated:d,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:u?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:P.action,mcpPath:P.configPath,mcpError:`error`in P?P.error:void 0,projectScopeUnsupportedLabels:ue,sharing:xe}}async function Bi(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`}:Vi(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}:Vi(t,o,`remove`)}function Vi(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 Hi(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 Ui(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`);e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`),e.rootGitignoreCreated&&n.push(`Seeded .gitignore at ${t}/.gitignore (.DS_Store)`);let s=F(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(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)?I(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===`open-knowledge`?``:` (${r.serverName})`,a=r.configScope===`project`?` (project)`:``,o=`${r.label}${a}`,s=` `.repeat(Math.max(1,20-o.length)),c=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${o}${s}${e} ${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} ${he(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${Hi(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?I(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} ${he(`FAILED`)}: ${r.error}`);break}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${I(t,r.path)}`);n.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(n.push(``),n.push(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(`opted out via --no-skills`)}`),n.push(` ${k(`This is a machine-wide choice: the built-in skills are removed from your`)}`),n.push(` ${k(`user-global skill directories and stay off for every project until you`)}`),n.push(` ${k(`re-enable them by running init again without the flag:`)}`),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(_e(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...Ji(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 Wi(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 Gi(e,t){let n=[];for(let r of ce)Ai(D[r],e,t)&&n.push(r);return n}function Ki(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Ne(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 qi(){return new E(`init`).description(`Scaffold .ok/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the .ok/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).option(`--content-dir <dir>`,`Limit content to <dir> instead of the whole project. <dir> is interpreted relative to your current directory (e.g. "." = the folder you run the command in), then saved to .ok/config.yml as content.dir.`).option(`--json`,`Emit a structured JSON summary to stdout (diagnostics stay on stderr)`).option(`--skills <ids>`,`Install only the named user-global skill bundles (comma list: discovery,write-skill)`).option(`--no-skills`,`Do not install any user-global skill bundles`).addOption(new ie(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new ie(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new ie(`--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?Ki():null;try{let r;try{r=await zi({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 p||e instanceof c){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof v){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-DwZ-kNkG.mjs`),{resolveContentDir:s}=await import(`./src-BLAyDRF9.mjs`),l;try{l=o(r.projectRoot).config,i=l.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(l)try{let{previewContent:e}=await import(`./preview-B9XDskoX.mjs`),t=s(l,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(Wi(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Ui(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function Ji(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{An as A,gt as B,nr as C,Un as D,Vn as E,On as F,W as H,Mn as I,xn as L,Nn as M,kn as N,Dn as O,jn as P,ln as R,Fr as S,Hn as T,We as U,ht as V,mi as _,Wi as a,ri as b,Ui as c,Ii as d,Ei as f,zi as g,Ti as h,Bi as i,En as j,Pn as k,Ji as l,Di as m,ki as n,Ri as o,Ci as p,Mi as r,Gi as s,$ as t,qi as u,ji as v,Zn as w,Vr as x,Fi as y,yt as z};
643
- //# sourceMappingURL=init-CUut5PRP.mjs.map
638
+ `));let f=`${a?``:``}${u}`;return f!==i&&T(e,f,{mode:Vn(e)}),{kind:l?`overwritten`:`written`}}const yi=e=>e!==`project`,bi=e=>e!==`user`;async function xi(){let e=await Xn({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 Si(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??xi)():`both`}async function Ci(e){return tr({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 wi(e){if(e.sharing!==void 0)return e.sharing;let t=On(e.projectRoot)===`local-only`?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??Ci)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Ti(e){if(e===void 0||e===!0)return new Set(g);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(g.filter(e=>t.includes(e)))}function Ei(e,t,n){let r=be(n,e),i;try{i=De(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(Di(t),Di(r));if(a.startsWith(`..`)||ye(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Di(e){try{return Ee(e)}catch{return e}}const Oi=`open-knowledge-ui`;function ki(e,t,n){try{return z(e.detectPath?.(t,n)??F(e.configPath(t,n)))}catch{return!1}}function Ai(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&&!ki(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{de(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 Mi(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{we(F(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=Jr(o).writePath;if(we(F(t),{recursive:!0}),e.format===`toml`){let n=_i(ni(),t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}if(e.format===`yaml`){let n=vi(t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}let n=gi(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 ji={pi:Ir};function Mi(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=ji[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{we(F(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:Vn(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 Ni(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!z(n)))return{editorId:e.id,label:e.label,path:n}}async function Pi(e){let t=oe(e.editors).filter(e=>e.scope===`global`),n={mode:`published`,skipAvailabilityCheck:!0};return t.map(t=>Ai(t,``,n,e.home))}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=hi(e,t,r);if(!P(i))return{kind:`no-entry`};let a=i[n];return P(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(De(i).size>ui)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:Fr(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ni().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Ii(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,xn.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=ai(a);return s?oi(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Ii(C(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Ri(e={}){let t=be(e.cwd??process.cwd()),n=Br(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:Ei(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${M(`[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`},c=await ee(r),l;try{l=y(r,{contentDir:o})}catch(t){let i=D.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:c.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 u=l.created.includes(me),d=!1;if(c.didInit)try{d=_(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{b(r)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore entry at ${r}: ${e instanceof Error?e.message:String(e)}`)}let p=await h(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 Si({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),v=e.editors??Wi(r,e.home),ne=e.editors??ae.filter(e=>D[e].projectConfigPath!==void 0||D[e].projectSkillPath!==void 0),C=oe(v),re=oe(ne),w=e.mcp===!1||m===null,T=Array.from(new Map([...C,...w?[]:re].map(e=>[e.id,e])).values()),ie=C.filter(t=>ki(t,r,e.home)),E=[],se=[],le=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(yi(m)&&C.includes(t)&&t.scope===`global`&&E.push(Ai(t,r,s,e.home)),bi(m)&&re.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=Ai(t,r,s,e.home,n);E.push(i),(i.action===`written`||i.action===`overwritten`)&&le.add(n)}}let ue=new Set;for(let t of re){let n=t.projectSkillPath?.(r);!n||ue.has(n)||(ue.add(n),se.push(ce(t,r,{home:e.home})))}let de=!w&&m!==null&&bi(m)?re.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,fe=w?[]:ie.map(e=>Ni(e,r)).filter(e=>e!==void 0).filter(e=>!le.has(e.path)),pe=e.installUserSkill??f,O=e.home??ke(),k=Ti(e.skills),A=!1,j=!1,N=!1,P=!1,he=!1;for(let t of g){if(!k.has(t))continue;await S(O,te[t],!0).catch(()=>{}),A=!0;let n=await pe({home:e.home,bundleId:t,force:!0});n===`installed`?j=!0:n===`failed`?N=!0:n===`no-hosts`?he=!0:P=!0}let ge=N?`failed`:j?`installed`:A&&P?`skip-current`:A&&he?`no-hosts`:`declined`,_e=j?x(O).map(e=>e.editorId):[],ve=w?`skipped-flag`:`skipped-missing`,F=E.find(e=>e.editorId===`claude`)??E[0]??{action:ve,configPath:D.claude.configPath(r,e.home)},ye=await zi({projectRoot:r,desiredMode:await wi({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:l.created,contentUpdated:l.updated,contentSkipped:l.skipped,editors:E,projectSkills:se,legacyProjectConfigs:fe,skillInstall:ge,skillHosts:_e,didGitInit:c.didInit,rootGitignoreCreated:d,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:u?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:F.action,mcpPath:F.configPath,mcpError:`error`in F?F.error:void 0,projectScopeUnsupportedLabels:de,sharing:ye}}async function zi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=On(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Tn(t);if(n===`local-only`){let e=En(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=Dn(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=On(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(N(`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(N(`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(N(`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(N(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(N(`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} ${j(`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(N(`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} ${j(`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(N(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>ue[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(` ${M(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${M(` ok repair-skills`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(M(`⚠ --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(M(`⚠ 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(he(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(`✓`)} ${N(`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 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 ae)ki(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:je(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 pe(`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 ie(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new ie(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new ie(`--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 p||e instanceof c){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof v){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-DmPDSLFl.mjs`),{resolveContentDir:s}=await import(`./src-n6rcQokc.mjs`),l;try{l=o(r.projectRoot).config,i=l.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(l)try{let{previewContent:e}=await import(`./preview-BrzvwX4B.mjs`),t=s(l,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(N(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${A(`local-only`)} — appended ${e.appended.length} path(s) to ${N(`${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 ${N(`${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(M(`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(M(`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(M(`Sharing mode unavailable: ${e.reason}.`));return n}}export{kn as A,ht as B,tr as C,Hn as D,Bn as E,Dn as F,W as H,jn as I,bn as L,Mn as M,On as N,En as O,An as P,cn as R,Pr as S,Vn as T,He as U,mt as V,pi as _,Ui as a,ni as b,Hi as c,Fi as d,Ti as f,Ri as g,wi as h,zi as i,Tn as j,Nn as k,qi as l,Ei as m,Oi as n,Li as o,Si as p,ji as r,Wi as s,$ as t,Ki as u,Ai as v,Xn as w,Br as x,Pi as y,vt as z};
643
+ //# sourceMappingURL=init-CU23LoCM.mjs.map
@@ -0,0 +1 @@
1
+ import{g as e}from"./init-CU23LoCM.mjs";export{e as runInit};