@inkeep/open-knowledge 0.8.0-beta.3 → 0.8.0-beta.4

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 (289) hide show
  1. package/dist/alias-JE7RI5QX-CAVgalv7.mjs +1 -0
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/{awk2-POPGKRAI-DDrFV-7v.mjs → awk2-POPGKRAI-DSmUTUD5.mjs} +1 -1
  5. package/dist/{banner-COfNQySC.mjs → banner-ewegHsSq.mjs} +1 -1
  6. package/dist/{base64-4YMZCVJ5-DDKKOjMm.mjs → base64-4YMZCVJ5-BwzgfP6J.mjs} +1 -1
  7. package/dist/{basename-AA2KJYZQ-BK5zVs3W.mjs → basename-AA2KJYZQ-CTXbUPI9.mjs} +1 -1
  8. package/dist/bash-IJWYRKFO-CSBfp75s.mjs +1 -0
  9. package/dist/{cat-RDUMLXKC-CeNrSElK.mjs → cat-RDUMLXKC-BA4E-6jM.mjs} +1 -1
  10. package/dist/{chmod-SYMGL4JA-DFJ4ylQU.mjs → chmod-SYMGL4JA-DqrztDS_.mjs} +1 -1
  11. package/dist/{chokidar-CxU7f6JW.mjs → chokidar-DkLjLiwY.mjs} +1 -1
  12. package/dist/{chunk-3ZUFRYJ4-qsYuZX7b.mjs → chunk-3ZUFRYJ4-DJGI-ol3.mjs} +1 -1
  13. package/dist/{chunk-4GTNDTRF-PuLVuVJW.mjs → chunk-4GTNDTRF-DLfmDsTz.mjs} +2 -2
  14. package/dist/{chunk-4HHKTUW3-CQ53AiA_.mjs → chunk-4HHKTUW3-Do18aeKJ.mjs} +1 -1
  15. package/dist/{chunk-4Q4SM6WR-BlQvqCag.mjs → chunk-4Q4SM6WR-BC5DMmtl.mjs} +2 -2
  16. package/dist/{chunk-55VFSPNA-DLwfww5b.mjs → chunk-55VFSPNA-BkiwXNts.mjs} +2 -2
  17. package/dist/{chunk-5QVNJEHU-dbrKfPGl.mjs → chunk-5QVNJEHU-DxXSmS6b.mjs} +2 -2
  18. package/dist/{chunk-5V6VZH6T-DMPvCPbn.mjs → chunk-5V6VZH6T-CxAvX_p_.mjs} +2 -2
  19. package/dist/{chunk-62RKD26F-B9la0pfD.mjs → chunk-62RKD26F-DFxm_wsk.mjs} +2 -2
  20. package/dist/{chunk-64BAICW3-D92CLSK-.mjs → chunk-64BAICW3-CbWqy6AU.mjs} +2 -2
  21. package/dist/{chunk-74CEPOFO-BcZUJMO1.mjs → chunk-74CEPOFO-Ce6zfZno.mjs} +1 -1
  22. package/dist/{chunk-7L36YK2X-D7Z_Qw_C.mjs → chunk-7L36YK2X-B9iPLZYF.mjs} +1 -1
  23. package/dist/{chunk-7TSDKFEO-DUQhJkDy.mjs → chunk-7TSDKFEO-Clyycgm6.mjs} +1 -1
  24. package/dist/{chunk-A4HU7SVR-DKLaJeys.mjs → chunk-A4HU7SVR-KpVaWQZk.mjs} +1 -1
  25. package/dist/{chunk-A4JSPFCI-CEm2r8SB.mjs → chunk-A4JSPFCI-DZdE_RBM.mjs} +2 -2
  26. package/dist/{chunk-A65PWWJC-DV6RO_es.mjs → chunk-A65PWWJC-BSl75Gzh.mjs} +2 -2
  27. package/dist/{chunk-A7A2DBEE-dTNL-45u.mjs → chunk-A7A2DBEE-CI4JCXh0.mjs} +1 -1
  28. package/dist/{chunk-A7ICOL4V-BvXPAaHu.mjs → chunk-A7ICOL4V-BzesEh8O.mjs} +2 -2
  29. package/dist/{chunk-ALLTKNUZ-Cu6JFoC4.mjs → chunk-ALLTKNUZ-DryLwDJN.mjs} +2 -2
  30. package/dist/{chunk-APT7OOP2-DmUrFuRy.mjs → chunk-APT7OOP2-ghqP5RjQ.mjs} +2 -2
  31. package/dist/{chunk-BBXLRYSX-K758HlCs.mjs → chunk-BBXLRYSX-CBa2upXR.mjs} +2 -2
  32. package/dist/{chunk-BRGMQKJV-BXc-9Cgj.mjs → chunk-BRGMQKJV-BFUsD38L.mjs} +3 -3
  33. package/dist/{chunk-CR5AFCPT-DxNsgM0M.mjs → chunk-CR5AFCPT-CaGcSJNH.mjs} +2 -2
  34. package/dist/{chunk-D4J545R4-DkHLjHX6.mjs → chunk-D4J545R4-39tfGEas.mjs} +2 -2
  35. package/dist/{chunk-D6CWQ5DW-7lvT8dGP.mjs → chunk-D6CWQ5DW-B0H0ZE0g.mjs} +2 -2
  36. package/dist/{chunk-D7MEQ3VN-D8jJZr4A.mjs → chunk-D7MEQ3VN-DjGAq771.mjs} +2 -2
  37. package/dist/{chunk-DCAAORBQ-C3s1D8OY.mjs → chunk-DCAAORBQ-2hAkTSsi.mjs} +2 -2
  38. package/dist/{chunk-EEXR5ZDP-CETL3_Uw.mjs → chunk-EEXR5ZDP-CqRIzSRf.mjs} +1 -1
  39. package/dist/{chunk-EIZGF4BS-DOoQW9jQ.mjs → chunk-EIZGF4BS-BNKZIY4Y.mjs} +2 -2
  40. package/dist/{chunk-F23WWYKW-BK2tpXPf.mjs → chunk-F23WWYKW-C6mQ92-8.mjs} +2 -2
  41. package/dist/{chunk-F55TLFGB-Vy5RU2P3.mjs → chunk-F55TLFGB-Ch4EQu4J.mjs} +2 -2
  42. package/dist/{chunk-GCTKCWKD-Di-RB9Qt.mjs → chunk-GCTKCWKD-BrH2kwP5.mjs} +1 -1
  43. package/dist/{chunk-GOV5EKKI-CKV9jOGv.mjs → chunk-GOV5EKKI-Cjp7e-4Y.mjs} +2 -2
  44. package/dist/{chunk-GXVXFKBA-CUKDClxt.mjs → chunk-GXVXFKBA-DfpAAE3t.mjs} +2 -2
  45. package/dist/{chunk-HDQ56CKY-MTQ75a8z.mjs → chunk-HDQ56CKY-oo03cv9O.mjs} +2 -2
  46. package/dist/{chunk-HJQJAYMS-D-8Vc6Zb.mjs → chunk-HJQJAYMS-BX2ngisD.mjs} +1 -1
  47. package/dist/{chunk-HJWBQKYG-XrOcsn2f.mjs → chunk-HJWBQKYG-B2veqSYo.mjs} +2 -2
  48. package/dist/{chunk-HWBSOZZR-BZF8XsyZ.mjs → chunk-HWBSOZZR-BK04cmy7.mjs} +2 -2
  49. package/dist/{chunk-HWKDQ44K-wgmyck2O.mjs → chunk-HWKDQ44K-D-Y0sZAA.mjs} +2 -2
  50. package/dist/{chunk-I57KEIP3-DipCOPKf.mjs → chunk-I57KEIP3-BPQZMhwo.mjs} +1 -1
  51. package/dist/{chunk-J642UCRS-YiNealfn.mjs → chunk-J642UCRS-DXUFHVvX.mjs} +1 -1
  52. package/dist/{chunk-JVPRLUMK-VMFWXimu.mjs → chunk-JVPRLUMK-CLwH0uCX.mjs} +2 -2
  53. package/dist/{chunk-KMEYNNUA-pRogdye4.mjs → chunk-KMEYNNUA-DGQRus36.mjs} +2 -2
  54. package/dist/{chunk-LL3S3NLB-ByBS5IDP.mjs → chunk-LL3S3NLB-DQF3ekov.mjs} +2 -2
  55. package/dist/{chunk-LPQPILI2-FRQB9gt5.mjs → chunk-LPQPILI2-unxmYj-H.mjs} +2 -2
  56. package/dist/{chunk-LTZRCH7N-46S7WKw8.mjs → chunk-LTZRCH7N-Bj3GMNey.mjs} +2 -2
  57. package/dist/{chunk-LWEGUNWT-DdGmM3wr.mjs → chunk-LWEGUNWT-DmdrV1En.mjs} +2 -2
  58. package/dist/{chunk-MDDMCKUK-CuRdI1Uv.mjs → chunk-MDDMCKUK-DM-9Iq67.mjs} +2 -2
  59. package/dist/{chunk-MDLLFABN-Wd1iVjXi.mjs → chunk-MDLLFABN-iT7NLOSj.mjs} +2 -2
  60. package/dist/{chunk-MHTUABJP-BWrqic3t.mjs → chunk-MHTUABJP-CoXvnzFl.mjs} +1 -1
  61. package/dist/{chunk-MIZPJHVH-DWdPvcYR.mjs → chunk-MIZPJHVH-C_Ew6iFJ.mjs} +2 -2
  62. package/dist/{chunk-MLXIYONF-CiCzoeGt.mjs → chunk-MLXIYONF-D0cew-4g.mjs} +1 -1
  63. package/dist/{chunk-MYE6AGBJ-DJo74dVC.mjs → chunk-MYE6AGBJ-Ba0ek4dq.mjs} +2 -2
  64. package/dist/{chunk-NAERJDUW-CIHrNgJB.mjs → chunk-NAERJDUW-BjY7nf_U.mjs} +2 -2
  65. package/dist/{chunk-NCNPKYJZ-BVljycUZ.mjs → chunk-NCNPKYJZ-BfpDmYta.mjs} +2 -2
  66. package/dist/{chunk-NUYSJFDK-BTseBdxv.mjs → chunk-NUYSJFDK-CTmaNmMV.mjs} +2 -2
  67. package/dist/{chunk-NYQYO467-BgXuDHUQ.mjs → chunk-NYQYO467-De27bHHh.mjs} +2 -2
  68. package/dist/{chunk-OARHFVLG-Cr0x3Si_.mjs → chunk-OARHFVLG-B7qGh_d9.mjs} +2 -2
  69. package/dist/{chunk-OCLXQMOG-BW6rwyzS.mjs → chunk-OCLXQMOG-JsUybhKc.mjs} +2 -2
  70. package/dist/{chunk-OCS6LSEM-D7VAOziZ.mjs → chunk-OCS6LSEM-DxqjLuBg.mjs} +2 -2
  71. package/dist/{chunk-OL3S66CO-CQnF8cPH.mjs → chunk-OL3S66CO-5k30myjg.mjs} +2 -2
  72. package/dist/{chunk-PBXLG62G-CgbPJTiw.mjs → chunk-PBXLG62G-DjO83anU.mjs} +2 -2
  73. package/dist/{chunk-PP6PSHAB-CO4MYU__.mjs → chunk-PP6PSHAB-BT5CrRx8.mjs} +1 -1
  74. package/dist/{chunk-PYSFUGCK-DsRn64Ef.mjs → chunk-PYSFUGCK-Sp2cHHMB.mjs} +2 -2
  75. package/dist/{chunk-QCDB2VPH-BUMOhlW7.mjs → chunk-QCDB2VPH-CKprjJi1.mjs} +2 -2
  76. package/dist/{chunk-QJ7O6ZN3-F0_rcDPM.mjs → chunk-QJ7O6ZN3-DAJDwVLZ.mjs} +2 -2
  77. package/dist/{chunk-R6QSAL5T-CeW6f7-x.mjs → chunk-R6QSAL5T-BhmoPD7w.mjs} +1 -1
  78. package/dist/{chunk-RPNGRAAP-BmkapBPD.mjs → chunk-RPNGRAAP-C2BHhnew.mjs} +2 -2
  79. package/dist/{chunk-SDNKECQQ-DkebEzkd.mjs → chunk-SDNKECQQ-B0K39uOy.mjs} +2 -2
  80. package/dist/{chunk-SYMJJMQ4-DOZMaECk.mjs → chunk-SYMJJMQ4-BHTQ9-zw.mjs} +1 -1
  81. package/dist/{chunk-T56QNPHK-DPXaSSfC.mjs → chunk-T56QNPHK-Cm6aWFiU.mjs} +2 -2
  82. package/dist/{chunk-TLSUDHID-Ckw-B5Ug.mjs → chunk-TLSUDHID-BQSN0_NC.mjs} +2 -2
  83. package/dist/{chunk-TOMNU26N-AAglMy4J.mjs → chunk-TOMNU26N-CyB5ygtc.mjs} +2 -2
  84. package/dist/{chunk-TXBZCHCQ-WeVWfqYv.mjs → chunk-TXBZCHCQ-hJoWF3in.mjs} +2 -2
  85. package/dist/{chunk-UNYNJIFU-CqGlXAg7.mjs → chunk-UNYNJIFU-C1ZMf296.mjs} +3 -3
  86. package/dist/{chunk-V7TAPXDL-DQgGPvBY.mjs → chunk-V7TAPXDL-CbyQ432v.mjs} +2 -2
  87. package/dist/{chunk-VJFXDYWH-DIo0Ia0_.mjs → chunk-VJFXDYWH-Ju3YsoA8.mjs} +2 -2
  88. package/dist/{chunk-VLGZJRPG-DymOu90-.mjs → chunk-VLGZJRPG-dvgMu0oq.mjs} +1 -1
  89. package/dist/{chunk-VOBGTVA6-Bfa1NTzt.mjs → chunk-VOBGTVA6-CpbDs1cF.mjs} +2 -2
  90. package/dist/{chunk-VYOJP4TV-PBsHe2md.mjs → chunk-VYOJP4TV-COBa4MtL.mjs} +2 -2
  91. package/dist/{chunk-WKFATFPP-KO2zkfs2.mjs → chunk-WKFATFPP-9cXM_L_4.mjs} +2 -2
  92. package/dist/{chunk-X2AJGDEF-D5w6wtaX.mjs → chunk-X2AJGDEF-CvfqmCuM.mjs} +1 -1
  93. package/dist/{chunk-XKQRETAK-RHzVmuiF.mjs → chunk-XKQRETAK-Bbdvongf.mjs} +2 -2
  94. package/dist/{chunk-XORM457F-wr_DBBnV.mjs → chunk-XORM457F-BzpdJr6h.mjs} +2 -2
  95. package/dist/{chunk-XVDPCNWR-DxaG1FfA.mjs → chunk-XVDPCNWR-C2xS3KJO.mjs} +2 -2
  96. package/dist/{chunk-YCFVLTST-Dzwevuc3.mjs → chunk-YCFVLTST-B0tITlai.mjs} +2 -2
  97. package/dist/{chunk-YFG2CMIF-BoZQym0L.mjs → chunk-YFG2CMIF-Cz08u2O6.mjs} +1 -1
  98. package/dist/{chunk-YS3AZT3J-CBc9LHIy.mjs → chunk-YS3AZT3J-WmJwXHQO.mjs} +2 -2
  99. package/dist/{chunk-YTNYSM6T-WMIf3AF8.mjs → chunk-YTNYSM6T-CUlXw32O.mjs} +2 -2
  100. package/dist/{chunk-Z6LRHWXI-DGTVoTuf.mjs → chunk-Z6LRHWXI-4l180K8r.mjs} +1 -1
  101. package/dist/{chunk-Z7JVV2SM-Cb4YKOCM.mjs → chunk-Z7JVV2SM-BUdEAZMZ.mjs} +2 -2
  102. package/dist/{clear-5CZ5X4YR-CadVxKrq.mjs → clear-5CZ5X4YR-BEwl4_C9.mjs} +1 -1
  103. package/dist/cli.mjs +43 -43
  104. package/dist/{column-WLPMMSTS-6o4DDsDk.mjs → column-WLPMMSTS-D0xWkTwB.mjs} +1 -1
  105. package/dist/{comm-5SLSESQG-C2GatHU6.mjs → comm-5SLSESQG-xUt6OU03.mjs} +1 -1
  106. package/dist/constants-CVFDZVjX.mjs +2 -0
  107. package/dist/{cp-XOYR4ABJ-DmS6dER-.mjs → cp-XOYR4ABJ-X7H6YMBY.mjs} +1 -1
  108. package/dist/{curl-47BFPSFW-C2kRcGkX.mjs → curl-47BFPSFW-Di93oHWG.mjs} +2 -2
  109. package/dist/{cut-OPC3VAGB-s4tQWhL5.mjs → cut-OPC3VAGB-CwS5RcsW.mjs} +1 -1
  110. package/dist/{date-DD7FVA2V-Dubgjr6a.mjs → date-DD7FVA2V-Dbk2XkK5.mjs} +1 -1
  111. package/dist/diff-HJF2MPDN-fNt2f91n.mjs +1 -0
  112. package/dist/{dirname-LEMTZZFS-B477CImE.mjs → dirname-LEMTZZFS-BT_ZAIuL.mjs} +1 -1
  113. package/dist/{dist-2MBFtu5K.mjs → dist-CoDJf10s.mjs} +1 -1
  114. package/dist/{dist-BPLmZd1q.mjs → dist-D9vKsNHQ.mjs} +9 -9
  115. package/dist/{du-WO2ENHXQ-C4c5wweW.mjs → du-WO2ENHXQ-VqOjFaSA.mjs} +1 -1
  116. package/dist/echo-O45JWWI2-C-3bei5r.mjs +1 -0
  117. package/dist/env-5EPCWSXR-DoYioOMQ.mjs +1 -0
  118. package/dist/{execAsync-CulVJBMN.mjs → execAsync-BvlEgtAU.mjs} +1 -1
  119. package/dist/{execAsync-CzW9fUYQ.mjs → execAsync-CXON0DWd.mjs} +1 -1
  120. package/dist/{execAsync-DuQoqWaW.mjs → execAsync-JPnR_wx1.mjs} +1 -1
  121. package/dist/{expand-DTNXU4LQ-BT6M2Tdc.mjs → expand-DTNXU4LQ-DBWQTk0V.mjs} +1 -1
  122. package/dist/expr-5T3UU5KE-BhfN9y59.mjs +1 -0
  123. package/dist/file-ZIGAJ4YS-DJbeP4p1.mjs +1 -0
  124. package/dist/find-TPUOAIUQ-CczmrVYd.mjs +1 -0
  125. package/dist/flag-coverage-QT4N2Z44-CRPgxYXl.mjs +2 -0
  126. package/dist/{fold-LDSORVYE-CfKQmrJ1.mjs → fold-LDSORVYE-DA4LkSBA.mjs} +1 -1
  127. package/dist/{getMachineId-bsd-DAmB-Ym0.mjs → getMachineId-bsd-Bv-VsEyc.mjs} +2 -2
  128. package/dist/{getMachineId-bsd-FYDP9w5Q.mjs → getMachineId-bsd-CWLhAjUn.mjs} +2 -2
  129. package/dist/{getMachineId-bsd-mPrX3ckm.mjs → getMachineId-bsd-VWU2b38Z.mjs} +2 -2
  130. package/dist/{getMachineId-darwin-B0Qw-MTj.mjs → getMachineId-darwin-BhzfDfjK.mjs} +2 -2
  131. package/dist/{getMachineId-darwin-C79HtyON.mjs → getMachineId-darwin-DGlWH8bP.mjs} +2 -2
  132. package/dist/{getMachineId-darwin-Co8Jnu5v.mjs → getMachineId-darwin-DvOo46Q9.mjs} +2 -2
  133. package/dist/{getMachineId-linux-BizmCjYq.mjs → getMachineId-linux-CCJsqLNI.mjs} +1 -1
  134. package/dist/{getMachineId-linux-BvLCCmKQ.mjs → getMachineId-linux-CDvTv3pB.mjs} +1 -1
  135. package/dist/{getMachineId-linux-BBORs2cS.mjs → getMachineId-linux-ROmYpdDb.mjs} +1 -1
  136. package/dist/{getMachineId-unsupported-CbR45h2D.mjs → getMachineId-unsupported-BkIyKQdM.mjs} +1 -1
  137. package/dist/{getMachineId-unsupported-DbGFOAw1.mjs → getMachineId-unsupported-DPtt_3fd.mjs} +1 -1
  138. package/dist/{getMachineId-unsupported-Bgp-Es9j.mjs → getMachineId-unsupported-ejON9VjP.mjs} +1 -1
  139. package/dist/{getMachineId-win-Cy0XHq4X.mjs → getMachineId-win-D3tcWjnb.mjs} +2 -2
  140. package/dist/{getMachineId-win-D5gDnBHa.mjs → getMachineId-win-DmRv23KP.mjs} +2 -2
  141. package/dist/{getMachineId-win-CT_Y5i_4.mjs → getMachineId-win-WiGlM2s-.mjs} +2 -2
  142. package/dist/grep-3AIAIJVR-BNFrRnPp.mjs +1 -0
  143. package/dist/gzip-AQXSGOVS-Ch_VPnFG.mjs +1 -0
  144. package/dist/{head-HT2B6D2J-BR4RHRTk.mjs → head-HT2B6D2J-SGgQuBJe.mjs} +1 -1
  145. package/dist/help-VVWX7SA5-9Ykrc3HE.mjs +1 -0
  146. package/dist/history-J4QRNGRO-CaZeA5kN.mjs +1 -0
  147. package/dist/{hostname-BK6HG2DE-BBBcRrtV.mjs → hostname-BK6HG2DE-JGVS1ppF.mjs} +1 -1
  148. package/dist/html-to-markdown-TFCECAGV-BG8DWXFH.mjs +1 -0
  149. package/dist/index.mjs +1 -1
  150. package/dist/init-AR7AREsa.mjs +1 -0
  151. package/dist/init-Cr82dHei.mjs +409 -0
  152. package/dist/{join-GG2LDHE5-xeTE0Mi4.mjs → join-GG2LDHE5-JRj0ouRV.mjs} +1 -1
  153. package/dist/jq-ODXZBPLY-DHB9kbWU.mjs +1 -0
  154. package/dist/{js-exec-M6UR76J5-IyD-lpzv.mjs → js-exec-M6UR76J5-DXM3rg6y.mjs} +2 -2
  155. package/dist/{lib-BOCdCkg7.mjs → lib-Bp6oCBmn.mjs} +1 -1
  156. package/dist/{ln-4TRFBYAT-4XMTO1OQ.mjs → ln-4TRFBYAT-oOs-iS2Z.mjs} +1 -1
  157. package/dist/{loader-Dw5FfKPU.mjs → loader-B8kBdoRs.mjs} +2 -2
  158. package/dist/loader-DyJg8_HE.mjs +1 -0
  159. package/dist/ls-KSXFZCWH-CQHD37jl.mjs +1 -0
  160. package/dist/{lzma-vr8hBkhz.mjs → lzma-BhiA9VHg.mjs} +1 -1
  161. package/dist/md5sum-INMIK4DX-BDAIIDt4.mjs +1 -0
  162. package/dist/mkdir-TDEMSB6C-Lwjy9N0j.mjs +1 -0
  163. package/dist/mv-Z6MORUFL-DgTIQxj0.mjs +1 -0
  164. package/dist/{nl-U5YJDM32-CFzXKze3.mjs → nl-U5YJDM32-DeUWi7jL.mjs} +1 -1
  165. package/dist/{od-VJEF2UR5-C2R4Accu.mjs → od-VJEF2UR5-5IUCoJ8z.mjs} +1 -1
  166. package/dist/{open-browser-Be-7qaQ9.mjs → open-browser-DKQcpNx8.mjs} +1 -1
  167. package/dist/paste-7N6AFSDS-BnArAq5a.mjs +1 -0
  168. package/dist/preview-C8hv7s4P.mjs +1 -0
  169. package/dist/{preview-Bi1tKilT.mjs → preview-D31Km8cw.mjs} +2 -2
  170. package/dist/printf-CX64KX2P-BByztiUk.mjs +1 -0
  171. package/dist/public/assets/{ActivityModeContent-BW7QsRiP.js → ActivityModeContent-COMby2bb.js} +1 -1
  172. package/dist/public/assets/{DocumentContext-CmeanKIC.js → DocumentContext-jaB-0mpf.js} +1 -1
  173. package/dist/public/assets/{GraphPanel-BFaqVg_B.js → GraphPanel-DHKTLxYo.js} +1 -1
  174. package/dist/public/assets/{SettingsDialogBody-CQ2K5eu4.js → SettingsDialogBody-DhlNSn4k.js} +1 -1
  175. package/dist/public/assets/{SourceEditor-CX33VkOP.js → SourceEditor-BCoJ7gbJ.js} +1 -1
  176. package/dist/public/assets/{config-validation-events-DYqTE3X_.js → config-validation-events-yK7q2FT-.js} +1 -1
  177. package/dist/public/assets/{dist-DBy4lTCM.js → dist-BipKiigV.js} +1 -1
  178. package/dist/public/assets/{dropdown-menu-CXLGX1-h.js → dropdown-menu-1moW3IXY.js} +1 -1
  179. package/dist/public/assets/{index-DDgC3bxb.js → index-Bi8Je0HI.js} +4 -4
  180. package/dist/public/assets/{prop-types-B9tF15NO.js → prop-types-C6q58bUG.js} +1 -1
  181. package/dist/public/assets/{target-navigation-intent-BJncQo3K.js → target-navigation-intent-BlfY_l5e.js} +1 -1
  182. package/dist/public/assets/{toggle-group-Bn1EVq3y.js → toggle-group-UCxih1rJ.js} +1 -1
  183. package/dist/public/assets/{typing-burst-detector-CJo4jOvj.js → typing-burst-detector-4tFlN0aO.js} +1 -1
  184. package/dist/public/index.html +9 -9
  185. package/dist/pwd-D4OZ7N27-CEyHiqxC.mjs +1 -0
  186. package/dist/{python3-AUFTPCU6-BaJugIdp.mjs → python3-AUFTPCU6-Dq9xUUBq.mjs} +2 -2
  187. package/dist/readlink-MI4GCHJF-DrjzDETr.mjs +1 -0
  188. package/dist/repair-launch-json-DjAVYY2n.mjs +2 -0
  189. package/dist/repair-mcp-configs-ektHJIH4.mjs +2 -0
  190. package/dist/repair-skills-COfLs1Vb.mjs +3 -0
  191. package/dist/repair-skills-DqsrmPG9.mjs +1 -0
  192. package/dist/{rev-XOSYPP45-2mnFFZWW.mjs → rev-XOSYPP45-BrX3RY1o.mjs} +1 -1
  193. package/dist/rg-FOQSCCX3-COS6uwJc.mjs +1 -0
  194. package/dist/rm-RTZG23RL-CVB8AHY5.mjs +1 -0
  195. package/dist/rmdir-XTQXT7RK-BPMg1E7n.mjs +1 -0
  196. package/dist/{sed-VFTTATXJ-mYhAmixc.mjs → sed-VFTTATXJ-DbqskjHs.mjs} +1 -1
  197. package/dist/seq-RN5ZUASB-xObuoCwd.mjs +1 -0
  198. package/dist/sha1sum-VJPNLNU6-CtzyEkCD.mjs +1 -0
  199. package/dist/sha256sum-PI32XWXY-CXUzEmYp.mjs +1 -0
  200. package/dist/{sleep-VZFPZFWA-B1fSoYuO.mjs → sleep-VZFPZFWA-By_skETk.mjs} +1 -1
  201. package/dist/sort-DCNRDA7U-DEjrctZD.mjs +1 -0
  202. package/dist/{split-SITCSYCZ-b9hfEJw7.mjs → split-SITCSYCZ-C3JRw7ww.mjs} +1 -1
  203. package/dist/{sqlite3-56UMWEY3-BQEx5i3P.mjs → sqlite3-56UMWEY3-DaCjOzpq.mjs} +1 -1
  204. package/dist/src-D7LWu59h.mjs +2 -0
  205. package/dist/start-Cco1m24E.mjs +1 -0
  206. package/dist/start-DZz5IFuR.mjs +3 -0
  207. package/dist/stat-BT5A227F-DTrBFTFt.mjs +1 -0
  208. package/dist/strings-7PLOGTPD-jFq6v5Kd.mjs +1 -0
  209. package/dist/{tac-SJGXQ4T2-BpdVoP8b.mjs → tac-SJGXQ4T2-CSwW7a_8.mjs} +1 -1
  210. package/dist/tail-S5ULNTJU-EJIXiVsh.mjs +1 -0
  211. package/dist/{tar-ANUBEFJY-Wh3na_NU.mjs → tar-ANUBEFJY-BIVb0c7i.mjs} +1 -1
  212. package/dist/tee-O7VXZDCO-7YBB40m-.mjs +1 -0
  213. package/dist/time-DEUO3QV2-DL-cn0eZ.mjs +1 -0
  214. package/dist/{timeout-VRKMCG72-BtPBpIRq.mjs → timeout-VRKMCG72-Vpzd_EzJ.mjs} +1 -1
  215. package/dist/touch-DX2IJOQ4-BsGLHPhC.mjs +1 -0
  216. package/dist/tr-2HXZRDSW-CQc1dvVn.mjs +1 -0
  217. package/dist/tree-LYXBS7DC-BKP2eqPA.mjs +1 -0
  218. package/dist/true-WHJNXCHG-DuLihQOR.mjs +1 -0
  219. package/dist/unexpand-RGTMIGZM-8kSHk86g.mjs +1 -0
  220. package/dist/uniq-SUNANL47--vTI7SnC.mjs +1 -0
  221. package/dist/wc-TQB3VNOX-DiOuiJK4.mjs +1 -0
  222. package/dist/which-XZHEH76L-Di_vxpS1.mjs +1 -0
  223. package/dist/whoami-DGKU3D2X-BDh4nuof.mjs +1 -0
  224. package/dist/write-project-skill-BTQxaubH.mjs +2 -0
  225. package/dist/xan-BXDXYEIB-xeeBU-41.mjs +1 -0
  226. package/dist/xan-view-ECQUO7AJ-Bp_uMGUB.mjs +1 -0
  227. package/dist/xargs-I6EZUCYF-Xyb7Erje.mjs +1 -0
  228. package/dist/yq-MJMAR36V-BM8HTxRY.mjs +1 -0
  229. package/package.json +1 -1
  230. package/dist/alias-JE7RI5QX-Bia4gLMF.mjs +0 -1
  231. package/dist/bash-IJWYRKFO-B9r1a0X9.mjs +0 -1
  232. package/dist/constants-VKoRHLJA.mjs +0 -2
  233. package/dist/diff-HJF2MPDN-wUotW5Vg.mjs +0 -1
  234. package/dist/echo-O45JWWI2-TudodhHR.mjs +0 -1
  235. package/dist/env-5EPCWSXR-CTcNEMpy.mjs +0 -1
  236. package/dist/expr-5T3UU5KE-D2Kr5nuJ.mjs +0 -1
  237. package/dist/file-ZIGAJ4YS-BH3jYcuM.mjs +0 -1
  238. package/dist/find-TPUOAIUQ-RFxkUcGN.mjs +0 -1
  239. package/dist/flag-coverage-QT4N2Z44-D6C8h97H.mjs +0 -2
  240. package/dist/grep-3AIAIJVR-DgQJLmW0.mjs +0 -1
  241. package/dist/gzip-AQXSGOVS-yXjpnIVd.mjs +0 -1
  242. package/dist/help-VVWX7SA5-M6C6klSC.mjs +0 -1
  243. package/dist/history-J4QRNGRO-C1r7-kvT.mjs +0 -1
  244. package/dist/html-to-markdown-TFCECAGV-B9oYuMVf.mjs +0 -1
  245. package/dist/init-CRoSG2y6.mjs +0 -409
  246. package/dist/init-Tv8mSRun.mjs +0 -1
  247. package/dist/jq-ODXZBPLY-C5v6qNu_.mjs +0 -1
  248. package/dist/loader-D-TleArK.mjs +0 -1
  249. package/dist/ls-KSXFZCWH-Bw_Cf-VY.mjs +0 -1
  250. package/dist/md5sum-INMIK4DX-CAIH4ZVI.mjs +0 -1
  251. package/dist/mkdir-TDEMSB6C-D1oUG8Jf.mjs +0 -1
  252. package/dist/mv-Z6MORUFL-CN471qcL.mjs +0 -1
  253. package/dist/paste-7N6AFSDS-bUl2Dwz3.mjs +0 -1
  254. package/dist/preview-BQyNv--I.mjs +0 -1
  255. package/dist/printf-CX64KX2P-Ce--gWAq.mjs +0 -1
  256. package/dist/pwd-D4OZ7N27-C18XewhV.mjs +0 -1
  257. package/dist/readlink-MI4GCHJF-CHvs7DDT.mjs +0 -1
  258. package/dist/repair-launch-json-D5DbaOCD.mjs +0 -2
  259. package/dist/repair-mcp-configs-DSFRe6WN.mjs +0 -2
  260. package/dist/rg-FOQSCCX3-BJahNfSe.mjs +0 -1
  261. package/dist/rm-RTZG23RL-D9-0WGRY.mjs +0 -1
  262. package/dist/rmdir-XTQXT7RK-Br7eH9kL.mjs +0 -1
  263. package/dist/seq-RN5ZUASB-CKf5MNNO.mjs +0 -1
  264. package/dist/sha1sum-VJPNLNU6-DuOHap1X.mjs +0 -1
  265. package/dist/sha256sum-PI32XWXY-D9fEipQ7.mjs +0 -1
  266. package/dist/sort-DCNRDA7U-DDCY4JZu.mjs +0 -1
  267. package/dist/src-DmVkpI35.mjs +0 -2
  268. package/dist/start-BoVa175r.mjs +0 -3
  269. package/dist/start-D1xZddCO.mjs +0 -1
  270. package/dist/stat-BT5A227F-Dzp4sgau.mjs +0 -1
  271. package/dist/strings-7PLOGTPD-DT41jX9d.mjs +0 -1
  272. package/dist/tail-S5ULNTJU-0-sYrYik.mjs +0 -1
  273. package/dist/tee-O7VXZDCO-CwnGG0go.mjs +0 -1
  274. package/dist/time-DEUO3QV2-DzkqaQ1k.mjs +0 -1
  275. package/dist/touch-DX2IJOQ4-KW0Ui-lB.mjs +0 -1
  276. package/dist/tr-2HXZRDSW-C6Kf0M8T.mjs +0 -1
  277. package/dist/tree-LYXBS7DC-BN1FBqvM.mjs +0 -1
  278. package/dist/true-WHJNXCHG-DxCMVdqj.mjs +0 -1
  279. package/dist/unexpand-RGTMIGZM-DZ4Kf6Xq.mjs +0 -1
  280. package/dist/uniq-SUNANL47-Ceg51JdA.mjs +0 -1
  281. package/dist/wc-TQB3VNOX-BzWNq0MY.mjs +0 -1
  282. package/dist/which-XZHEH76L-DH_U2-Cj.mjs +0 -1
  283. package/dist/whoami-DGKU3D2X-BholYNPM.mjs +0 -1
  284. package/dist/xan-BXDXYEIB-b1eAtgch.mjs +0 -1
  285. package/dist/xan-view-ECQUO7AJ-DWDC57b_.mjs +0 -1
  286. package/dist/xargs-I6EZUCYF-Cov-i7kW.mjs +0 -1
  287. package/dist/yq-MJMAR36V-1r29nH4p.mjs +0 -1
  288. /package/dist/{colors-BCE2jNgl.mjs → colors-t2HkW8lF.mjs} +0 -0
  289. /package/dist/{expansion-ENLSRCXJ-Cy7j--Iy.mjs → expansion-ENLSRCXJ-DRm2UiGT.mjs} +0 -0
@@ -1,2 +1,2 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,i as n,o as r,r as i,t as a}from"./compiler-runtime-Cs91PcD2.js";import{A as o,Dn as s,O as c,On as l,Sn as u,Tn as d,X as f,k as p,lt as m,n as h,rt as g}from"./DocumentContext-CmeanKIC.js";import{a as _,c as v,i as y,n as b,o as x,r as S,s as C,t as w,u as ee}from"./panel-BNBODYwB.js";import{$ as T,A as E,An as D,Di as O,Mi as k,On as A,Sn as j,Xt as te,bn as M,et as ne,jn as N,kn as re,qt as P,u as ie,xn as ae,yn as oe}from"./prop-types-B9tF15NO.js";import{S as se,t as ce}from"./button-DenIdY-r.js";import{x as F}from"./dialog-C1dBa8-m.js";import{i as le}from"./collapsible-BhpeB6tu.js";import{i as I,n as L,t as R}from"./cursor-f-dht0b0.js";import{a as z,c as ue,d as de,i as fe,l as pe,u as me}from"./dropdown-menu-CXLGX1-h.js";import{$ as he,At as ge,Bt as _e,Dt as ve,E as ye,Et as B,Ft as be,Ht as xe,J as V,Mt as Se,N as Ce,Ot as we,Pt as H,Q as Te,Rt as Ee,Ut as De,X as U,_ as Oe,_t as ke,ct as Ae,dt as je,et as Me,f as Ne,gt as Pe,ht as Fe,l as Ie,lt as Le,mt as Re,nt as ze,ot as Be,rt as Ve,st as He,tt as Ue,ut as We,wt as W,y as Ge,yt as G,zt as Ke}from"./dist-DDdDbjlC.js";import{i as qe,n as Je,o as Ye,r as Xe}from"./dist-C7UlNfyl.js";var K=r(),q=e(t(),1),J=a(),Ze=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`}],Qe=Ze.filter(e=>e.id!==`claude-cowork`);function $e(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function et(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=E(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function tt(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?$e(e):et()}var nt=`ok:skill:cowork:installed`,rt=`1`,it=250,at=`/api/skill/install-state`;function ot(e){return`${nt}:v${e}`}var st=new Map;async function ct(e={},t={}){let n=t.force?`__force__`:`__default__`,r=st.get(n);if(r)return r;let i=lt(e,t);return st.set(n,i),i.finally(()=>{st.get(n)===i&&st.delete(n)}),i}async function lt(e,t){let n=e.installer===void 0?tt():e.installer,r=ut(e.storage),i=e.fetchSnapshot??ft,a=e.serverTimeoutMs??it,o=null;if(!t.force){try{o=await pt(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=ot(o?.currentVersion??e.fallbackSkillVersion??dt());if(!t.force&&r?.getItem(s)===rt)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,rt)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function ut(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function dt(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function ft(){let e;try{e=await fetch(at,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function pt(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function mt(e){return ct({},e)}function ht(){return ct({},{force:!0})}async function gt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function _t(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return gt({target:`claude-cowork`,url:M({mode:`cowork`},e)},n);case`claude-code`:return gt({target:`claude-code`,url:M({mode:`code`},e)},n);case`codex`:return gt({target:`codex`,url:ae(e)},n);case`cursor`:return gt({target:`cursor`,url:j(e),workspacePath:e.projectDir},n);default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function vt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:yt(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:yt(e)}}}function yt(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function bt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function xt(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function St(e){return`${e}.md`}function Ct(e){if(!e.docName||!e.workspace)return null;let t=St(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:xt(n,t,r)}}function wt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Tt(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Et(e){if(!e.docName||!e.workspace||!e.selectionMarkdown)return null;let t=St(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:null,selection:{relativePath:t,instruction:e.instruction,selectionMarkdown:e.selectionMarkdown},projectDir:n,docPath:xt(n,t,r)}}function Dt(e){return vt(e.installUrl).then(()=>void 0)}function Ot(e){return`Opened in ${e}.`}function kt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function At(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function jt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function Mt(e,t){return e.selection?N({...e.selection,target:t}):e.docContext===null?e.folderRelativePath?D(e.folderRelativePath):A():re(e.docContext.relativePath)}async function Nt(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`Open Knowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:Mt(t,e)},a=await n.dispatchHandoff(i),o=jt(e,a,n.isElectronHost()?`electron`:`web`,n.now().toISOString(),t.selection?`selection`:void 0);await n.recordHandoff(o);let s=n.getDisplayName(e);if(a.ok)n.toast.success(Ot(s));else{let i=At(r),a=kt(s,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{Nt(e,t,n,r+1)}}})}return a}function Pt(e){return Ze.find(t=>t.id===e)?.displayName??e}function Ft(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function It(){return{dispatchHandoff:_t,recordHandoff:bt,toast:{success:e=>{F.success(e)},error:(e,t)=>{F.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Ft(),getDisplayName:Pt,ensureCoworkSkillInstalled:mt}}function Lt(){return{dispatch:(e,t)=>Nt(e,t,It()),reinstallCoworkSkill:ht}}var Rt=[...new Set(Ze.flatMap(e=>e.schemes))];function zt(e,t){let n=t.now?.()??Date.now(),r={};for(let t of Ze){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Bt(e){return zt({},e)}async function Vt(e){let t=e.schemes??Rt,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var Ht=Object.fromEntries(Rt.map(e=>[e,{installed:!1}]));async function Ut(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return Ht}if(!t.ok)return Ht;let n;try{n=await t.json()}catch{return Ht}if(typeof n!=`object`||!n||Array.isArray(n))return Ht;let r=n,i={};for(let e of Rt)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function Wt(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Gt(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Bt({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=zt(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!Wt(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function Kt(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function qt(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>Vt({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>Ut({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Jt(){let e=(0,J.c)(5),[t,n]=(0,q.useState)(Yt),r=(0,q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Gt(qt());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function Yt(){return Bt({isElectronHost:Kt(),now:Date.now})}var Xt=new Map;function Zt(e,t){Xt.set(e,t)}function Qt(e){let t=Xt.get(e)??null;return Xt.delete(e),t}function $t(e){Xt.delete(e)}function en(e,t){let n=(0,J.c)(4),r=t===void 0?!1:t,[i,a]=(0,q.useState)(void 0),o=(0,q.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,q.useEffect)(s,c),i}var tn=300;async function nn(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new m(O._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=te.safeParse(n);throw e.success?Error(e.data.title):new m(O._({id:`zlErBl`}),{status:t.status})}let r=P.safeParse(n);if(!r.success)throw new m(O._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var rn=32,an=12,on=6,sn=`open-knowledge:outline-nav`;function cn(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=(0,K.jsx)(u,{name:`outline-panel`,children:(0,K.jsx)(ln,{...e})}),t[0]=e,t[1]=n),n}function ln(e){let t=(0,J.c)(50),{docName:r,isSourceMode:a,className:o}=e,s=o===void 0?``:o,{_:c}=n(),{pages:l,loading:u}=ie(),d=ee(),{activeProvider:f,activeDocName:p}=h(),m,g;t[0]===r?(m=t[1],g=t[2]):(m=[`page-headings`,r],g=()=>nn(r),t[0]=r,t[1]=m,t[2]=g);let T;t[3]!==r||t[4]!==u||t[5]!==l?(T=!u&&l.has(r),t[3]=r,t[4]=u,t[5]=l,t[6]=T):T=t[6];let E;t[7]!==m||t[8]!==g||t[9]!==T?(E={queryKey:m,queryFn:g,enabled:T,staleTime:1/0},t[7]=m,t[8]=g,t[9]=T,t[10]=E):E=t[10];let{data:D,isLoading:O,error:k}=v(E),A;t[11]===D?A=t[12]:(A=D===void 0?[]:D,t[11]=D,t[12]=A);let j=A,te,M;t[13]!==p||t[14]!==f||t[15]!==r||t[16]!==d?(te=()=>{if(!f||p!==r)return;let e=f.document,t=null,n=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,d.invalidateQueries({queryKey:[`page-headings`,r]})},tn)};return e.on(`update`,n),()=>{e.off(`update`,n),t!==null&&clearTimeout(t)}},M=[f,p,r,d],t[13]=p,t[14]=f,t[15]=r,t[16]=d,t[17]=te,t[18]=M):(te=t[17],M=t[18]),(0,q.useEffect)(te,M);let ne;t[19]===j?ne=t[20]:(ne=j.map(un),t[19]=j,t[20]=ne);let N=en(ne,a),re;t[21]!==N||t[22]!==j?(re=N?j.findIndex(e=>e.slug===N):-1,t[21]=N,t[22]=j,t[23]=re):re=t[23];let P=re,ae;t[24]!==r||t[25]!==a?(ae=function(e,t){let n={index:e,slug:t,mode:a?`source`:`wysiwyg`};n.mode===`source`&&Zt(r,{kind:`outline`,detail:n}),window.dispatchEvent(new CustomEvent(sn,{detail:n}))},t[24]=r,t[25]=a,t[26]=ae):ae=t[26];let oe=ae,ce=((P>=0?j[P].level:1)-1)*an+(an-on)/2,F=P*rn+(rn-on)/2,le;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,K.jsx)(C,{children:(0,K.jsx)(i,{id:`dD7NPy`})}),t[27]=le):le=t[27];let I;t[28]!==j.length||t[29]!==O?(I=!O&&(0,K.jsx)(S,{children:j.length}),t[28]=j.length,t[29]=O,t[30]=I):I=t[30];let L;t[31]===I?L=t[32]:(L=(0,K.jsxs)(x,{children:[le,I]}),t[31]=I,t[32]=L);let R;t[33]!==c||t[34]!==P||t[35]!==N||t[36]!==k||t[37]!==oe||t[38]!==j||t[39]!==O||t[40]!==ce||t[41]!==F?(R=k?(0,K.jsx)(_,{className:`px-2`,children:k instanceof Error?k.message:c({id:`GuqOb1`})}):j.length===0&&!O?(0,K.jsx)(y,{className:`px-2`,children:(0,K.jsx)(i,{id:`0BB9ID`})}):(0,K.jsxs)(`nav`,{"aria-label":c({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:on,height:on,transform:`translate(${ce}px, ${F}px)`}}),j.map((e,t)=>{let n=e.slug===N;return(0,K.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>oe(t,e.slug),className:se(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*an+20}px`},title:e.text,children:e.text},t)})]}),t[33]=c,t[34]=P,t[35]=N,t[36]=k,t[37]=oe,t[38]=j,t[39]=O,t[40]=ce,t[41]=F,t[42]=R):R=t[42];let z;t[43]!==O||t[44]!==R?(z=(0,K.jsx)(b,{className:`px-3 py-2`,"aria-busy":O,children:R}),t[43]=O,t[44]=R,t[45]=z):z=t[45];let ue;return t[46]!==s||t[47]!==L||t[48]!==z?(ue=(0,K.jsxs)(w,{className:s,children:[L,z]}),t[46]=s,t[47]=L,t[48]=z,t[49]=ue):ue=t[49],ue}function un(e){return e.slug}var dn=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Y=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(dn(e)):dn,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ee(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=De(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Ke(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(Y.prototype[Symbol.iterator]=function(){return this});var fn={from:-1,to:-1,match:/.*/.exec(``)},pn=`gm`+(/x/.unicode==null?``:`u`),mn=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=fn,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new _n(e,t,n,r,i);this.re=new RegExp(t,pn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=yn(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=yn(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},hn=new WeakMap,gn=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=hn.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return hn.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),hn.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},_n=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=fn,this.matchPos=yn(e,r),this.re=new RegExp(t,pn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=gn.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=yn(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=gn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(mn.prototype[Symbol.iterator]=_n.prototype[Symbol.iterator]=function(){return this});function vn(e){try{return new RegExp(e,pn),!0}catch{return!1}}function yn(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var bn=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=Pe(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),p=B.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,U.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},xn={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Sn=we.define({combine(e){return _e(e,xn,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Cn(e){let t=[kn,On];return e&&t.push(Sn.of(e)),t}var wn=V.mark({class:`cm-selectionMatch`}),Tn=V.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function En(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=W.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=W.Word)}function Dn(e,t,n,r){return e(t.sliceDoc(n,n+1))==W.Word&&e(t.sliceDoc(r-1,r))==W.Word}var On=Te.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Sn),{state:n}=e,r=n.selection;if(r.ranges.length>1)return V.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return V.none;let e=n.wordAt(i.head);if(!e)return V.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return V.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(En(o,n,i.from,i.to)&&Dn(o,n,i.from,i.to)))return V.none}else if(a=n.sliceDoc(i.from,i.to),!a)return V.none}let s=[];for(let r of e.visibleRanges){let e=new Y(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||En(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Tn.range(r,a)):(r>=i.to||a<=i.from)&&s.push(wn.range(r,a)),s.length>t.maxMatches))return V.none}}return V.set(s)}},{decorations:e=>e.decorations}),kn=U.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),An=({state:e,dispatch:t})=>{let{selection:n}=e,r=B.create(n.ranges.map(t=>e.wordAt(t.head)||B.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function jn(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Y(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Y(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Mn=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return An({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=jn(e,r);return i?(t(e.update({selection:e.selection.addRange(B.range(i.from,i.to),!1),effects:U.scrollIntoView(i.to)})),!0):!1},Nn=we.define({combine(e){return _e(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new fr(e),scrollToMatch:e=>U.scrollIntoView(e)})}}),Pn=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||vn(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{a as t,i as n,o as r,r as i,t as a}from"./compiler-runtime-Cs91PcD2.js";import{A as o,Dn as s,O as c,On as l,Sn as u,Tn as d,X as f,k as p,lt as m,n as h,rt as g}from"./DocumentContext-jaB-0mpf.js";import{a as _,c as v,i as y,n as b,o as x,r as S,s as C,t as w,u as ee}from"./panel-BNBODYwB.js";import{$ as T,A as E,An as D,Di as O,Mi as k,On as A,Sn as j,Xt as te,bn as M,et as ne,jn as N,kn as re,qt as P,u as ie,xn as ae,yn as oe}from"./prop-types-C6q58bUG.js";import{S as se,t as ce}from"./button-DenIdY-r.js";import{x as F}from"./dialog-C1dBa8-m.js";import{i as le}from"./collapsible-BhpeB6tu.js";import{i as I,n as L,t as R}from"./cursor-f-dht0b0.js";import{a as z,c as ue,d as de,i as fe,l as pe,u as me}from"./dropdown-menu-1moW3IXY.js";import{$ as he,At as ge,Bt as _e,Dt as ve,E as ye,Et as B,Ft as be,Ht as xe,J as V,Mt as Se,N as Ce,Ot as we,Pt as H,Q as Te,Rt as Ee,Ut as De,X as U,_ as Oe,_t as ke,ct as Ae,dt as je,et as Me,f as Ne,gt as Pe,ht as Fe,l as Ie,lt as Le,mt as Re,nt as ze,ot as Be,rt as Ve,st as He,tt as Ue,ut as We,wt as W,y as Ge,yt as G,zt as Ke}from"./dist-DDdDbjlC.js";import{i as qe,n as Je,o as Ye,r as Xe}from"./dist-C7UlNfyl.js";var K=r(),q=e(t(),1),J=a(),Ze=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,hasWebFallback:!0,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`}],Qe=Ze.filter(e=>e.id!==`claude-cowork`);function $e(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function et(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=E(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function tt(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?$e(e):et()}var nt=`ok:skill:cowork:installed`,rt=`1`,it=250,at=`/api/skill/install-state`;function ot(e){return`${nt}:v${e}`}var st=new Map;async function ct(e={},t={}){let n=t.force?`__force__`:`__default__`,r=st.get(n);if(r)return r;let i=lt(e,t);return st.set(n,i),i.finally(()=>{st.get(n)===i&&st.delete(n)}),i}async function lt(e,t){let n=e.installer===void 0?tt():e.installer,r=ut(e.storage),i=e.fetchSnapshot??ft,a=e.serverTimeoutMs??it,o=null;if(!t.force){try{o=await pt(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=ot(o?.currentVersion??e.fallbackSkillVersion??dt());if(!t.force&&r?.getItem(s)===rt)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,rt)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function ut(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function dt(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function ft(){let e;try{e=await fetch(at,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function pt(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function mt(e){return ct({},e)}function ht(){return ct({},{force:!0})}async function gt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function _t(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return gt({target:`claude-cowork`,url:M({mode:`cowork`},e)},n);case`claude-code`:return gt({target:`claude-code`,url:M({mode:`code`},e)},n);case`codex`:return gt({target:`codex`,url:ae(e)},n);case`cursor`:return gt({target:`cursor`,url:j(e),workspacePath:e.projectDir},n);default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function vt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:yt(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:yt(e)}}}function yt(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function bt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function xt(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function St(e){return`${e}.md`}function Ct(e){if(!e.docName||!e.workspace)return null;let t=St(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:xt(n,t,r)}}function wt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Tt(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Et(e){if(!e.docName||!e.workspace||!e.selectionMarkdown)return null;let t=St(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:null,selection:{relativePath:t,instruction:e.instruction,selectionMarkdown:e.selectionMarkdown},projectDir:n,docPath:xt(n,t,r)}}function Dt(e){return vt(e.installUrl).then(()=>void 0)}function Ot(e){return`Opened in ${e}.`}function kt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function At(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function jt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function Mt(e,t){return e.selection?N({...e.selection,target:t}):e.docContext===null?e.folderRelativePath?D(e.folderRelativePath):A():re(e.docContext.relativePath)}async function Nt(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`Open Knowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install Open Knowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:Mt(t,e)},a=await n.dispatchHandoff(i),o=jt(e,a,n.isElectronHost()?`electron`:`web`,n.now().toISOString(),t.selection?`selection`:void 0);await n.recordHandoff(o);let s=n.getDisplayName(e);if(a.ok)n.toast.success(Ot(s));else{let i=At(r),a=kt(s,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{Nt(e,t,n,r+1)}}})}return a}function Pt(e){return Ze.find(t=>t.id===e)?.displayName??e}function Ft(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function It(){return{dispatchHandoff:_t,recordHandoff:bt,toast:{success:e=>{F.success(e)},error:(e,t)=>{F.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>Ft(),getDisplayName:Pt,ensureCoworkSkillInstalled:mt}}function Lt(){return{dispatch:(e,t)=>Nt(e,t,It()),reinstallCoworkSkill:ht}}var Rt=[...new Set(Ze.flatMap(e=>e.schemes))];function zt(e,t){let n=t.now?.()??Date.now(),r={};for(let t of Ze){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Bt(e){return zt({},e)}async function Vt(e){let t=e.schemes??Rt,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var Ht=Object.fromEntries(Rt.map(e=>[e,{installed:!1}]));async function Ut(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return Ht}if(!t.ok)return Ht;let n;try{n=await t.json()}catch{return Ht}if(typeof n!=`object`||!n||Array.isArray(n))return Ht;let r=n,i={};for(let e of Rt)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function Wt(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Gt(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Bt({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=zt(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!Wt(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function Kt(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function qt(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>Vt({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>Ut({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Jt(){let e=(0,J.c)(5),[t,n]=(0,q.useState)(Yt),r=(0,q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Gt(qt());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function Yt(){return Bt({isElectronHost:Kt(),now:Date.now})}var Xt=new Map;function Zt(e,t){Xt.set(e,t)}function Qt(e){let t=Xt.get(e)??null;return Xt.delete(e),t}function $t(e){Xt.delete(e)}function en(e,t){let n=(0,J.c)(4),r=t===void 0?!1:t,[i,a]=(0,q.useState)(void 0),o=(0,q.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,q.useEffect)(s,c),i}var tn=300;async function nn(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new m(O._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=te.safeParse(n);throw e.success?Error(e.data.title):new m(O._({id:`zlErBl`}),{status:t.status})}let r=P.safeParse(n);if(!r.success)throw new m(O._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var rn=32,an=12,on=6,sn=`open-knowledge:outline-nav`;function cn(e){let t=(0,J.c)(2),n;return t[0]===e?n=t[1]:(n=(0,K.jsx)(u,{name:`outline-panel`,children:(0,K.jsx)(ln,{...e})}),t[0]=e,t[1]=n),n}function ln(e){let t=(0,J.c)(50),{docName:r,isSourceMode:a,className:o}=e,s=o===void 0?``:o,{_:c}=n(),{pages:l,loading:u}=ie(),d=ee(),{activeProvider:f,activeDocName:p}=h(),m,g;t[0]===r?(m=t[1],g=t[2]):(m=[`page-headings`,r],g=()=>nn(r),t[0]=r,t[1]=m,t[2]=g);let T;t[3]!==r||t[4]!==u||t[5]!==l?(T=!u&&l.has(r),t[3]=r,t[4]=u,t[5]=l,t[6]=T):T=t[6];let E;t[7]!==m||t[8]!==g||t[9]!==T?(E={queryKey:m,queryFn:g,enabled:T,staleTime:1/0},t[7]=m,t[8]=g,t[9]=T,t[10]=E):E=t[10];let{data:D,isLoading:O,error:k}=v(E),A;t[11]===D?A=t[12]:(A=D===void 0?[]:D,t[11]=D,t[12]=A);let j=A,te,M;t[13]!==p||t[14]!==f||t[15]!==r||t[16]!==d?(te=()=>{if(!f||p!==r)return;let e=f.document,t=null,n=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,d.invalidateQueries({queryKey:[`page-headings`,r]})},tn)};return e.on(`update`,n),()=>{e.off(`update`,n),t!==null&&clearTimeout(t)}},M=[f,p,r,d],t[13]=p,t[14]=f,t[15]=r,t[16]=d,t[17]=te,t[18]=M):(te=t[17],M=t[18]),(0,q.useEffect)(te,M);let ne;t[19]===j?ne=t[20]:(ne=j.map(un),t[19]=j,t[20]=ne);let N=en(ne,a),re;t[21]!==N||t[22]!==j?(re=N?j.findIndex(e=>e.slug===N):-1,t[21]=N,t[22]=j,t[23]=re):re=t[23];let P=re,ae;t[24]!==r||t[25]!==a?(ae=function(e,t){let n={index:e,slug:t,mode:a?`source`:`wysiwyg`};n.mode===`source`&&Zt(r,{kind:`outline`,detail:n}),window.dispatchEvent(new CustomEvent(sn,{detail:n}))},t[24]=r,t[25]=a,t[26]=ae):ae=t[26];let oe=ae,ce=((P>=0?j[P].level:1)-1)*an+(an-on)/2,F=P*rn+(rn-on)/2,le;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,K.jsx)(C,{children:(0,K.jsx)(i,{id:`dD7NPy`})}),t[27]=le):le=t[27];let I;t[28]!==j.length||t[29]!==O?(I=!O&&(0,K.jsx)(S,{children:j.length}),t[28]=j.length,t[29]=O,t[30]=I):I=t[30];let L;t[31]===I?L=t[32]:(L=(0,K.jsxs)(x,{children:[le,I]}),t[31]=I,t[32]=L);let R;t[33]!==c||t[34]!==P||t[35]!==N||t[36]!==k||t[37]!==oe||t[38]!==j||t[39]!==O||t[40]!==ce||t[41]!==F?(R=k?(0,K.jsx)(_,{className:`px-2`,children:k instanceof Error?k.message:c({id:`GuqOb1`})}):j.length===0&&!O?(0,K.jsx)(y,{className:`px-2`,children:(0,K.jsx)(i,{id:`0BB9ID`})}):(0,K.jsxs)(`nav`,{"aria-label":c({id:`BymzO4`}),className:`relative`,children:[P>=0&&(0,K.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:on,height:on,transform:`translate(${ce}px, ${F}px)`}}),j.map((e,t)=>{let n=e.slug===N;return(0,K.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>oe(t,e.slug),className:se(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*an+20}px`},title:e.text,children:e.text},t)})]}),t[33]=c,t[34]=P,t[35]=N,t[36]=k,t[37]=oe,t[38]=j,t[39]=O,t[40]=ce,t[41]=F,t[42]=R):R=t[42];let z;t[43]!==O||t[44]!==R?(z=(0,K.jsx)(b,{className:`px-3 py-2`,"aria-busy":O,children:R}),t[43]=O,t[44]=R,t[45]=z):z=t[45];let ue;return t[46]!==s||t[47]!==L||t[48]!==z?(ue=(0,K.jsxs)(w,{className:s,children:[L,z]}),t[46]=s,t[47]=L,t[48]=z,t[49]=ue):ue=t[49],ue}function un(e){return e.slug}var dn=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Y=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(dn(e)):dn,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ee(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=De(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Ke(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(Y.prototype[Symbol.iterator]=function(){return this});var fn={from:-1,to:-1,match:/.*/.exec(``)},pn=`gm`+(/x/.unicode==null?``:`u`),mn=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=fn,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new _n(e,t,n,r,i);this.re=new RegExp(t,pn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=yn(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=yn(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},hn=new WeakMap,gn=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=hn.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return hn.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),hn.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},_n=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=fn,this.matchPos=yn(e,r),this.re=new RegExp(t,pn+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=gn.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=yn(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=gn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(mn.prototype[Symbol.iterator]=_n.prototype[Symbol.iterator]=function(){return this});function vn(e){try{return new RegExp(e,pn),!0}catch{return!1}}function yn(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var bn=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=Pe(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),p=B.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,U.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},xn={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Sn=we.define({combine(e){return _e(e,xn,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Cn(e){let t=[kn,On];return e&&t.push(Sn.of(e)),t}var wn=V.mark({class:`cm-selectionMatch`}),Tn=V.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function En(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=W.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=W.Word)}function Dn(e,t,n,r){return e(t.sliceDoc(n,n+1))==W.Word&&e(t.sliceDoc(r-1,r))==W.Word}var On=Te.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Sn),{state:n}=e,r=n.selection;if(r.ranges.length>1)return V.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return V.none;let e=n.wordAt(i.head);if(!e)return V.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return V.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(En(o,n,i.from,i.to)&&Dn(o,n,i.from,i.to)))return V.none}else if(a=n.sliceDoc(i.from,i.to),!a)return V.none}let s=[];for(let r of e.visibleRanges){let e=new Y(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||En(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Tn.range(r,a)):(r>=i.to||a<=i.from)&&s.push(wn.range(r,a)),s.length>t.maxMatches))return V.none}}return V.set(s)}},{decorations:e=>e.decorations}),kn=U.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),An=({state:e,dispatch:t})=>{let{selection:n}=e,r=B.create(n.ranges.map(t=>e.wordAt(t.head)||B.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function jn(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Y(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Y(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Mn=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return An({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=jn(e,r);return i?(t(e.update({selection:e.selection.addRange(B.range(i.from,i.to),!1),effects:U.scrollIntoView(i.to)})),!0):!1},Nn=we.define({combine(e){return _e(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new fr(e),scrollToMatch:e=>U.scrollIntoView(e)})}}),Pn=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||vn(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
2
2
  `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Gn(this):new zn(this)}getCursor(e,t=0,n){let r=e.doc?e:ve.create({doc:e});return n??=r.doc.length,this.regexp?Vn(this,r,t,n):Ln(this,r,t,n)}},Fn=class{constructor(e){this.spec=e}};function In(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Ln(e,t,n,r){let i;return e.wholeWord&&(i=Rn(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=In(e.test,t,i)),new Y(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Rn(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(Hn(i,n-a))!=W.Word||t(Un(i,n-a))!=W.Word)&&(t(Un(i,r-a))!=W.Word||t(Hn(i,r-a))!=W.Word))}var zn=class extends Fn{constructor(e){super(e)}nextMatch(e,t,n){let r=Ln(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Ln(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Ln(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Ln(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Ln(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function Bn(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function Vn(e,t,n,r){let i;return e.wholeWord&&(i=Wn(t.charCategorizer(t.selection.main.head))),e.test&&(i=Bn(e.test,t,i)),new mn(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function Hn(e,t){return e.slice(xe(e,t,!1),t)}function Un(e,t){return e.slice(t,xe(e,t))}function Wn(e){return(t,n,r)=>!r[0].length||(e(Hn(r.input,r.index))!=W.Word||e(Un(r.input,r.index))!=W.Word)&&(e(Un(r.input,r.index+r[0].length))!=W.Word||e(Hn(r.input,r.index+r[0].length))!=W.Word)}var Gn=class extends Fn{nextMatch(e,t,n){let r=Vn(this.spec,e,n,e.doc.length).next();return r.done&&(r=Vn(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=Vn(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=Vn(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Vn(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},Kn=H.define(),qn=H.define(),X=be.define({create(e){return new Jn(or(e).create(),null)},update(e,t){for(let n of t.effects)n.is(Kn)?e=new Jn(n.value.create(),e.panel):n.is(qn)&&(e=new Jn(e.query,n.value?ar:null));return e},provide:e=>ke.from(e,e=>e.panel)}),Jn=class{constructor(e,t){this.query=e,this.panel=t}},Yn=V.mark({class:`cm-searchMatch`}),Xn=V.mark({class:`cm-searchMatch cm-searchMatch-selected`}),Zn=Te.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(X))}update(e){let t=e.state.field(X);(t!=e.startState.field(X)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return V.none;let{view:n}=this,r=new Se;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Xn:Yn)})}return r.finish()}},{decorations:e=>e.decorations});function Qn(e){return t=>{let n=t.state.field(X,!1);return n&&n.query.spec.valid?e(t,n):lr(t)}}var $n=Qn((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=B.single(r.from,r.to),a=e.state.facet(Nn);return e.dispatch({selection:i,effects:[hr(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),cr(e),!0}),er=Qn((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=B.single(i.from,i.to),o=e.state.facet(Nn);return e.dispatch({selection:a,effects:[hr(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),cr(e),!0}),tr=Qn((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:B.create(n.map(e=>B.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),nr=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Y(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(B.range(t.value.from,t.value.to))}return t(e.update({selection:B.create(a,o),userEvent:`select.search.matches`})),!0},rr=Qn((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(U.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=B.single(o.from,o.to).map(d),u.push(hr(e,o)),u.push(n.facet(Nn).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),ir=Qn((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:U.announce.of(r),userEvent:`input.replace.all`}),!0});function ar(e){return e.state.facet(Nn).createPanel(e)}function or(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(Nn);return new Pn({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function sr(e){let t=Ve(e,ar);return t&&t.dom.querySelector(`[main-field]`)}function cr(e){let t=sr(e);t&&t==e.root.activeElement&&t.select()}var lr=e=>{let t=e.state.field(X,!1);if(t&&t.panel){let n=sr(e);if(n&&n!=e.root.activeElement){let r=or(e.state,t.query.spec);r.valid&&e.dispatch({effects:Kn.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[qn.of(!0),t?Kn.of(or(e.state,t.query.spec)):H.appendConfig.of(_r)]});return!0},ur=e=>{let t=e.state.field(X,!1);if(!t||!t.panel)return!1;let n=Ve(e,ar);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:qn.of(!1)}),!0},dr=[{key:`Mod-f`,run:lr,scope:`editor search-panel`},{key:`F3`,run:$n,shift:er,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:$n,shift:er,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:ur,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:nr},{key:`Mod-Alt-g`,run:bn},{key:`Mod-d`,run:Mn,preventDefault:!0}],fr=class{constructor(e){this.view=e;let t=this.query=e.state.field(X).query.spec;this.commit=this.commit.bind(this),this.searchField=G(`input`,{value:t.search,placeholder:Z(e,`Find`),"aria-label":Z(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=G(`input`,{value:t.replace,placeholder:Z(e,`Replace`),"aria-label":Z(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=G(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=G(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=G(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return G(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=G(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>$n(e),[Z(e,`next`)]),n(`prev`,()=>er(e),[Z(e,`previous`)]),n(`select`,()=>tr(e),[Z(e,`all`)]),G(`label`,null,[this.caseField,Z(e,`match case`)]),G(`label`,null,[this.reField,Z(e,`regexp`)]),G(`label`,null,[this.wordField,Z(e,`by word`)]),...e.state.readOnly?[]:[G(`br`),this.replaceField,n(`replace`,()=>rr(e),[Z(e,`replace`)]),n(`replaceAll`,()=>ir(e),[Z(e,`replace all`)])],G(`button`,{name:`close`,onclick:()=>ur(e),"aria-label":Z(e,`close`),type:`button`},[`×`])])}commit(){let e=new Pn({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Kn.of(e)}))}keydown(e){Fe(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?er:$n)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),rr(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Kn)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Nn).top}};function Z(e,t){return e.state.phrase(t)}var pr=30,mr=/[\s\.,:;?!]/;function hr(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-pr),o=Math.min(i,n+pr),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<pr;e++)if(!mr.test(s[e+1])&&mr.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-pr;e--)if(!mr.test(s[e-1])&&mr.test(s[e])){s=s.slice(0,e);break}}return U.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var gr=U.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),_r=[X,ge.low(Zn),gr],vr=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},yr=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(jr).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new Se,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=Hr(s);if(i)o.add(n,n,V.widget({widget:new Fr(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,V.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,Q(f))}};function Q(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new vr(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new vr(r.from,n,r.diagnostic)}),r}function br(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(jr).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(Sr))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function xr(e,t){return e.field($,!1)?t:t.concat(H.appendConfig.of(Ur))}var Sr=H.define(),Cr=H.define(),wr=H.define(),$=be.define({create(){return new yr(V.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=Q(n,e.selected.diagnostic,i)||Q(n,null,i)}!n.size&&i&&t.state.facet(jr).autoPanel&&(i=null),e=new yr(n,i,r)}for(let n of t.effects)if(n.is(Sr)){let r=t.state.facet(jr).autoPanel?n.value.length?Lr.open:null:e.panel;e=yr.init(n.value,r,t.state)}else n.is(Cr)?e=new yr(e.diagnostics,n.value?Lr.open:null,e.selected):n.is(wr)&&(e=new yr(e.diagnostics,e.panel,n.value));return e},provide:e=>[ke.from(e,e=>e.panel),U.decorations.from(e,e=>e.diagnostics)]}),Tr=V.mark({class:`cm-lintRange cm-lintRange-active`});function Er(e,t,n){let{diagnostics:r}=e.state.field($),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(jr).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:Dr(e,i)}}}:null}function Dr(e,t){return G(`ul`,{class:`cm-tooltip-lint`},t.map(t=>Pr(e,t,!1)))}var Or=e=>{let t=e.state.field($,!1);(!t||!t.panel)&&e.dispatch({effects:xr(e.state,[Cr.of(!0)])});let n=Ve(e,Lr.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},kr=e=>{let t=e.state.field($,!1);return!t||!t.panel?!1:(e.dispatch({effects:Cr.of(!1)}),!0)},Ar=[{key:`Mod-Shift-m`,run:Or,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field($,!1);if(!t)return!1;let n=e.state.selection.main,r=Q(t.diagnostics,null,n.to+1);return!r&&(r=Q(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],jr=we.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),..._e(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Mr,tooltipFilter:Mr,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function Mr(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function Nr(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function Pr(e,t,n){let r=n?Nr(t.actions):[];return G(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},G(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=Q(e.state.field($).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),G(`u`,s.slice(c,c+1)),s.slice(c+1)];return G(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&G(`div`,{class:`cm-diagnosticSource`},t.source))}var Fr=class extends he{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return G(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},Ir=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=Pr(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},Lr=class e{constructor(e){this.view=e,this.items=[],this.list=G(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)kr(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=Nr(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=Q(this.view.state.field($).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=G(`div`,{class:`cm-panel-lint`},this.list,G(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>kr(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field($).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field($),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new Ir(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new Ir(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=Q(this.view.state.field($).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:wr.of(t)})}static open(t){return new e(t)}};function Rr(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function zr(e){return Rr(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var Br=U.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:zr(`#d11`)},".cm-lintRange-warning":{backgroundImage:zr(`orange`)},".cm-lintRange-info":{backgroundImage:zr(`#999`)},".cm-lintRange-hint":{backgroundImage:zr(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function Vr(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function Hr(e){let t=`hint`,n=1;for(let r of e){let e=Vr(r.severity);e>n&&(n=e,t=r.severity)}return t}var Ur=[$,U.decorations.compute([$],e=>{let{selected:t,panel:n}=e.field($);return!t||!n||t.from==t.to?V.none:V.set([Tr.range(t.from,t.to)])}),Le(Er,{hideOn:br}),Br],Wr=[je(),He(),Ae(),p(),Oe(),Ue(),ze(),ve.allowMultipleSelections.of(!0),ye(),Ce(Ne,{fallback:!0}),Ie(),Xe(),Je(),Re(),Me(),Be(),Cn(),We.of([...qe,...c,...dr,...o,...Ge,...Ye,...Ar])];Ae(),p(),Ue(),Ce(Ne,{fallback:!0}),We.of([...c,...o]);var Gr={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`};function Kr(e){let t=(0,J.c)(23),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,style:a,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{resolvedTheme:o}=k(),s=Gr[r],c=s?(o===`dark`?ne[s]:void 0)??T[s]:void 0,l;t[5]!==c||t[6]!==a?(l=c?{...a,"--ok-brand-color":c}:a,t[5]=c,t[6]=a,t[7]=l):l=t[7];let u=l,d=c&&`[&_*]:![color:var(--ok-brand-color)]`,f;t[8]!==n||t[9]!==d?(f=se(d,n),t[8]=n,t[9]=d,t[10]=f):f=t[10];let p=f;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==p||t[12]!==u||t[13]!==i?(e=(0,K.jsx)(I,{style:u,className:p,...i}),t[11]=p,t[12]=u,t[13]=i,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==p||t[16]!==u||t[17]!==i?(e=(0,K.jsx)(L,{style:u,className:p,...i}),t[15]=p,t[16]=u,t[17]=i,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==p||t[20]!==u||t[21]!==i?(e=(0,K.jsx)(R,{style:u,className:p,...i}),t[19]=p,t[20]=u,t[21]=i,t[22]=e):e=t[22],e}return null}function qr(e){let{installState:t}=e;return t.installed===null?O._({id:`IA6JW2`}):t.installed===!1?O._({id:`5SwVv1`}):null}function Jr(e){let{target:t,installState:n}=e;if(n.installed===null)return{enabled:!1,tooltip:null};if(n.installed===!1){let e=t.appBrandName??t.displayName;return{enabled:!1,tooltip:{message:O._({id:`OJTOUj`,values:{brand:e}}),installAction:{label:O._({id:`fG0X0e`,values:{brand:e}}),url:t.installUrl},...t.hasWebFallback?{webFallback:{label:O._({id:`0S9PW_`}),url:``}}:{}}}}return{enabled:!0,tooltip:null}}function Yr(e){return oe(e)}function Xr(e){return O._({id:`h_HYHD`,values:{displayName:e}})}var Zr=`claude.ai`;async function Qr(e,t=vt){(await t(oe(e))).ok?F.success(Xr(Zr)):F.error(O._({id:`9NC_MT`,values:{CLAUDE_WEB_FALLBACK_LABEL:Zr}}))}function $r(e){let t=(0,J.c)(68),{_:r}=n(),{target:i,installState:a,isElectronHost:o,prompt:s,onSelect:c}=e,l=e.openExternal??vt,u=e.onWebFallbackSuccess??ti,d=e.onWebFallbackError??ei,{displayName:f}=i,p,m,h,g,_,v,y,b,x,S;if(t[0]!==r||t[1]!==a||t[2]!==o||t[3]!==c||t[4]!==d||t[5]!==u||t[6]!==l||t[7]!==s||t[8]!==i||t[9]!==f){S=Symbol.for(`react.early_return_sentinel`);bb0:{let e=Jr({target:i,installState:a,isElectronHost:o}),n=qr({target:i,installState:a,isElectronHost:o}),C=()=>{e.tooltip&&l(e.tooltip.installAction.url)},w;t[20]!==d||t[21]!==u||t[22]!==l||t[23]!==s||t[24]!==i?(w=()=>{(async()=>{let e=await l(Yr(s));e.ok?u(i):d(i,e.detail??e.reason)})()},t[20]=d,t[21]=u,t[22]=l,t[23]=s,t[24]=i,t[25]=w):w=t[25];let ee=w;if(e.enabled){let e=`open-in-agent-item-${i.id}`,n;t[26]!==r||t[27]!==f?(n=r({id:`NnQapF`,values:{targetDisplayName:f}}),t[26]=r,t[27]=f,t[28]=n):n=t[28];let a;t[29]===i.id?a=t[30]:(a=(0,K.jsx)(Kr,{id:i.id,"aria-hidden":`true`}),t[29]=i.id,t[30]=a);let o;t[31]===i.displayName?o=t[32]:(o=(0,K.jsx)(`span`,{children:i.displayName}),t[31]=i.displayName,t[32]=o);let s;t[33]!==c||t[34]!==n||t[35]!==a||t[36]!==o||t[37]!==e?(s=(0,K.jsxs)(fe,{onSelect:c,"data-testid":e,"aria-label":n,children:[a,o]}),t[33]=c,t[34]=n,t[35]=a,t[36]=o,t[37]=e,t[38]=s):s=t[38],S=s;break bb0}if(!e.tooltip){let e=r(n?{id:`If0crP`,values:{targetDisplayName:f,hint:n}}:{id:`NnQapF`,values:{targetDisplayName:f}}),a;t[39]===i.id?a=t[40]:(a=(0,K.jsx)(Kr,{id:i.id,"aria-hidden":`true`}),t[39]=i.id,t[40]=a);let o;t[41]===i.displayName?o=t[42]:(o=(0,K.jsx)(`span`,{className:`flex-1`,children:i.displayName}),t[41]=i.displayName,t[42]=o),S=(0,K.jsxs)(fe,{disabled:!0,"data-testid":`open-in-agent-item-${i.id}`,"aria-label":e,children:[a,o,n?(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:n}):null]});break bb0}let T=r(n?{id:`If0crP`,values:{targetDisplayName:f,hint:n}}:{id:`NnQapF`,values:{targetDisplayName:f}}),E=e.tooltip.webFallback?.label??``;m=pe;let D=`open-in-agent-item-${i.id}`,O;t[43]===i.id?O=t[44]:(O=(0,K.jsx)(Kr,{id:i.id,"aria-hidden":`true`,className:`mr-2`}),t[43]=i.id,t[44]=O);let k;t[45]===i.displayName?k=t[46]:(k=(0,K.jsx)(`span`,{className:`flex-1`,children:i.displayName}),t[45]=i.displayName,t[46]=k);let A;t[47]===n?A=t[48]:(A=n?(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:n}):null,t[47]=n,t[48]=A),t[49]!==T||t[50]!==O||t[51]!==k||t[52]!==A||t[53]!==D?(x=(0,K.jsxs)(de,{"data-testid":D,"data-row-disabled":``,"aria-label":T,children:[O,k,A]}),t[49]=T,t[50]=O,t[51]=k,t[52]=A,t[53]=D,t[54]=x):x=t[54],p=me,h=`min-w-[260px]`,g=`open-in-agent-submenu-${i.id}`,_=(0,K.jsx)(z,{className:`font-normal text-muted-foreground text-xs`,"data-testid":`open-in-agent-message-${i.id}`,children:e.tooltip.message}),t[55]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,K.jsx)(ue,{}),t[55]=v):v=t[55],y=(0,K.jsx)(fe,{onSelect:C,"data-testid":`open-in-agent-install-${i.id}`,children:(0,K.jsx)(`span`,{children:e.tooltip.installAction.label})}),b=e.tooltip.webFallback?(0,K.jsxs)(fe,{onSelect:ee,"data-testid":`open-in-agent-web-fallback-${i.id}`,"aria-label":r({id:`lsOFZR`,values:{webFallbackLabel:E}}),children:[(0,K.jsx)(`span`,{className:`flex-1`,children:e.tooltip.webFallback.label}),(0,K.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:r({id:`Z9BoIy`})})]}):null}t[0]=r,t[1]=a,t[2]=o,t[3]=c,t[4]=d,t[5]=u,t[6]=l,t[7]=s,t[8]=i,t[9]=f,t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_,t[15]=v,t[16]=y,t[17]=b,t[18]=x,t[19]=S}else p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=t[16],b=t[17],x=t[18],S=t[19];if(S!==Symbol.for(`react.early_return_sentinel`))return S;let C;t[56]!==p||t[57]!==h||t[58]!==g||t[59]!==_||t[60]!==v||t[61]!==y||t[62]!==b?(C=(0,K.jsxs)(p,{className:h,"data-testid":g,children:[_,v,y,b]}),t[56]=p,t[57]=h,t[58]=g,t[59]=_,t[60]=v,t[61]=y,t[62]=b,t[63]=C):C=t[63];let w;return t[64]!==m||t[65]!==x||t[66]!==C?(w=(0,K.jsxs)(m,{children:[x,C]}),t[64]=m,t[65]=x,t[66]=C,t[67]=w):w=t[67],w}function ei(){}function ti(){}function ni(e){let t=(0,J.c)(17),{installStates:r,onPick:a}=e,{_:o}=n(),[s,c]=(0,q.useState)(``),l;if(t[0]!==o||t[1]!==r||t[2]!==s||t[3]!==a){let e;t[5]===r?e=t[6]:(e=e=>r[e.id]?.installed===!0,t[5]=r,t[6]=e);let n=Qe.filter(e),u=Qe.some(e=>r[e.id]?.installed==null),d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(`div`,{className:`font-mono text-xs uppercase tracking-wide text-muted-foreground`,children:(0,K.jsx)(i,{id:`EVnzPs`})}),t[7]=d):d=t[7];let f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>c(e.target.value),t[8]=f):f=t[8];let p;t[9]===o?p=t[10]:(p=o({id:`Rah7yq`}),t[9]=o,t[10]=p);let m;t[11]===o?m=t[12]:(m=o({id:`ZBt4rI`}),t[11]=o,t[12]=m);let h;t[13]!==s||t[14]!==p||t[15]!==m?(h=(0,K.jsx)(le,{value:s,onChange:f,placeholder:p,"aria-label":m,"data-testid":`edit-with-ai-instruction`}),t[13]=s,t[14]=p,t[15]=m,t[16]=h):h=t[16],l=(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[d,h,n.length>0?(0,K.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:n.map(e=>(0,K.jsxs)(ce,{type:`button`,variant:`ghost`,className:`w-full justify-start gap-2`,"data-testid":`edit-with-ai-target-${e.id}`,onClick:()=>a(e,s),children:[(0,K.jsx)(Kr,{id:e.id,"aria-hidden":`true`}),(0,K.jsx)(`span`,{children:e.displayName})]},e.id))}):(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`edit-with-ai-empty`,"aria-live":`polite`,children:u?(0,K.jsx)(i,{id:`EcR0fl`}):(0,K.jsx)(i,{id:`l6OXqI`})})]}),t[0]=o,t[1]=r,t[2]=s,t[3]=a,t[4]=l}else l=t[4];return l}function ri(e){let t=(0,J.c)(23),{resolveSelection:r,children:i}=e,{_:a}=n(),{states:o,refresh:c}=Jt(),{dispatch:u}=Lt(),[f,p]=(0,q.useState)(!1),[m,h]=(0,q.useState)(null),g;t[0]!==a||t[1]!==c||t[2]!==r?(g=e=>{if(e){let e;try{e=r()}catch(e){console.error(`Edit with AI: could not read the selection`,e),F.error(a({id:`-RXIMO`}));return}h(e),c()}p(e)},t[0]=a,t[1]=c,t[2]=r,t[3]=g):g=t[3];let _=g,v;t[4]!==a||t[5]!==u||t[6]!==m?(v=(e,t)=>{if(m!==null){let n=Et({docName:m.docName,workspace:m.workspace,instruction:t,selectionMarkdown:m.selectionMarkdown});n===null?F.error(a({id:`_VRtd7`})):u(e.id,n)}p(!1)},t[4]=a,t[5]=u,t[6]=m,t[7]=v):v=t[7];let y=v,b;t[8]===i?b=t[9]:(b=(0,K.jsx)(l,{asChild:!0,children:i}),t[8]=i,t[9]=b);let x;t[10]===a?x=t[11]:(x=a({id:`EVnzPs`}),t[10]=a,t[11]=x);let S;t[12]!==y||t[13]!==o?(S=(0,K.jsx)(ni,{installStates:o,onPick:y}),t[12]=y,t[13]=o,t[14]=S):S=t[14];let C;t[15]!==x||t[16]!==S?(C=(0,K.jsx)(s,{align:`start`,"aria-label":x,"data-testid":`edit-with-ai-popover`,children:S}),t[15]=x,t[16]=S,t[17]=C):C=t[17];let w;return t[18]!==_||t[19]!==f||t[20]!==b||t[21]!==C?(w=(0,K.jsxs)(d,{open:f,onOpenChange:_,children:[b,C]}),t[18]=_,t[19]=f,t[20]=b,t[21]=C,t[22]=w):w=t[22],w}function ii(e){let t=f(e.state.selection.content(),e.state.schema);return g().serialize(t).trim()}function ai(e){let{from:t,to:n}=e.selection.main;return e.sliceDoc(t,n)}export{Dt as _,Kr as a,xt as b,sn as c,Qt as d,Zt as f,wt as g,Ct as h,$r as i,cn as l,Tt as m,ii as n,Qr as o,Jt as p,ri as r,Wr as s,ai as t,$t as u,Lt as v,Qe as x,St as y};
@@ -48,7 +48,7 @@
48
48
  -->
49
49
  <script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } if (dark) document.documentElement.classList.add('dark'); if (window.okDesktop) document.documentElement.classList.add('electron-mode'); })();</script>
50
50
  <style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
51
- <script type="module" crossorigin src="./assets/index-DDgC3bxb.js"></script>
51
+ <script type="module" crossorigin src="./assets/index-Bi8Je0HI.js"></script>
52
52
  <link rel="modulepreload" crossorigin href="./assets/chunk-CFjPhJqf.js">
53
53
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-2ej06EnG.js">
54
54
  <link rel="modulepreload" crossorigin href="./assets/w3c-keyname-BSTW6KzM.js">
@@ -61,23 +61,23 @@
61
61
  <link rel="modulepreload" crossorigin href="./assets/compiler-runtime-Cs91PcD2.js">
62
62
  <link rel="modulepreload" crossorigin href="./assets/trace-api-3dczfLSc.js">
63
63
  <link rel="modulepreload" crossorigin href="./assets/button-DenIdY-r.js">
64
- <link rel="modulepreload" crossorigin href="./assets/prop-types-B9tF15NO.js">
64
+ <link rel="modulepreload" crossorigin href="./assets/prop-types-C6q58bUG.js">
65
65
  <link rel="modulepreload" crossorigin href="./assets/propagation-api-CobBjsTC.js">
66
66
  <link rel="modulepreload" crossorigin href="./assets/collapsible-BhpeB6tu.js">
67
67
  <link rel="modulepreload" crossorigin href="./assets/dialog-C1dBa8-m.js">
68
- <link rel="modulepreload" crossorigin href="./assets/DocumentContext-CmeanKIC.js">
69
- <link rel="modulepreload" crossorigin href="./assets/dist-DBy4lTCM.js">
70
- <link rel="modulepreload" crossorigin href="./assets/dropdown-menu-CXLGX1-h.js">
68
+ <link rel="modulepreload" crossorigin href="./assets/DocumentContext-jaB-0mpf.js">
69
+ <link rel="modulepreload" crossorigin href="./assets/dist-BipKiigV.js">
70
+ <link rel="modulepreload" crossorigin href="./assets/dropdown-menu-1moW3IXY.js">
71
71
  <link rel="modulepreload" crossorigin href="./assets/panel-BNBODYwB.js">
72
72
  <link rel="modulepreload" crossorigin href="./assets/cursor-f-dht0b0.js">
73
- <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-CJo4jOvj.js">
73
+ <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-4tFlN0aO.js">
74
74
  <link rel="modulepreload" crossorigin href="./assets/checkbox-BPCXBJai.js">
75
75
  <link rel="modulepreload" crossorigin href="./assets/label-XH11jREQ.js">
76
- <link rel="modulepreload" crossorigin href="./assets/toggle-group-Bn1EVq3y.js">
76
+ <link rel="modulepreload" crossorigin href="./assets/toggle-group-UCxih1rJ.js">
77
77
  <link rel="modulepreload" crossorigin href="./assets/textarea-Bt3y5Hxz.js">
78
- <link rel="modulepreload" crossorigin href="./assets/config-validation-events-DYqTE3X_.js">
78
+ <link rel="modulepreload" crossorigin href="./assets/config-validation-events-yK7q2FT-.js">
79
79
  <link rel="modulepreload" crossorigin href="./assets/agent-presence-4UV17fwS.js">
80
- <link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-BJncQo3K.js">
80
+ <link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-BlfY_l5e.js">
81
81
  <link rel="modulepreload" crossorigin href="./assets/project-paths-CsGHlmFh.js">
82
82
  <link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-CijO54Jd.js">
83
83
  <link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-A4HU7SVR-KpVaWQZk.mjs";export{e as pwdCommand};
@@ -1,4 +1,4 @@
1
- import"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as i}from"./chunk-24IMIIXA-B6yIPkk2.mjs";import{n as a,t as o}from"./chunk-3THT3N7L-DztAF386.mjs";import{t as s}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{r as c,t as l}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{n as u,t as d}from"./chunk-I57KEIP3-DipCOPKf.mjs";import{fileURLToPath as f}from"node:url";import{Worker as p}from"node:worker_threads";import{randomBytes as m}from"node:crypto";var h=1e4,g=6e4,_={name:`python3`,summary:`Execute Python code via CPython Emscripten`,usage:`python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]`,description:[`Execute Python code using CPython compiled to WebAssembly via Emscripten.`,``,`This command runs Python in an isolated environment with access to`,`the virtual filesystem. Standard library modules are available.`],options:[`-c CODE Execute CODE as Python script`,`-m MODULE Run library module as a script`,`--version Show Python version`,`--help Show this help`],examples:[`python3 -c "print(1 + 2)"`,`python3 -c "import sys; print(sys.version)"`,`python3 script.py`,`python3 script.py arg1 arg2`,`echo 'print("hello")' | python3`],notes:[`CPython runs in WebAssembly, so execution may be slower than native Python.`,`Standard library modules are available (no pip install).`,`Maximum execution time is 30 seconds by default.`]};function v(e){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(e.length===0)return t;let n=e.findIndex(e=>!e.startsWith(`-`)||e===`-`||e===`--`);for(let r=0;r<(n===-1?e.length:n);r++){let n=e[r];if(n===`-c`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'c'
1
+ import"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{r}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{n as i}from"./chunk-24IMIIXA-B6yIPkk2.mjs";import{n as a,t as o}from"./chunk-3THT3N7L-DztAF386.mjs";import{t as s}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{r as c,t as l}from"./chunk-74CEPOFO-Ce6zfZno.mjs";import{n as u,t as d}from"./chunk-I57KEIP3-BPQZMhwo.mjs";import{fileURLToPath as f}from"node:url";import{Worker as p}from"node:worker_threads";import{randomBytes as m}from"node:crypto";var h=1e4,g=6e4,_={name:`python3`,summary:`Execute Python code via CPython Emscripten`,usage:`python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]`,description:[`Execute Python code using CPython compiled to WebAssembly via Emscripten.`,``,`This command runs Python in an isolated environment with access to`,`the virtual filesystem. Standard library modules are available.`],options:[`-c CODE Execute CODE as Python script`,`-m MODULE Run library module as a script`,`--version Show Python version`,`--help Show this help`],examples:[`python3 -c "print(1 + 2)"`,`python3 -c "import sys; print(sys.version)"`,`python3 script.py`,`python3 script.py arg1 arg2`,`echo 'print("hello")' | python3`],notes:[`CPython runs in WebAssembly, so execution may be slower than native Python.`,`Standard library modules are available (no pip install).`,`Maximum execution time is 30 seconds by default.`]};function v(e){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(e.length===0)return t;let n=e.findIndex(e=>!e.startsWith(`-`)||e===`-`||e===`--`);for(let r=0;r<(n===-1?e.length:n);r++){let n=e[r];if(n===`-c`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'c'
2
2
  `,exitCode:2}:(t.code=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`-m`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'm'
3
3
  `,exitCode:2}:(t.module=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`--version`||n===`-V`)return t.showVersion=!0,t;if(n.startsWith(`-`)&&n!==`-`)return{stdout:``,stderr:`python3: unrecognized option '${n}'
4
4
  `,exitCode:2}}if(n!==-1){let r=e[n];r===`--`?n+1<e.length&&(t.scriptFile=e[n+1],t.scriptArgs=e.slice(n+2)):(t.scriptFile=r,t.scriptArgs=e.slice(n+1))}return t}var y=new WeakMap;function b(e){let t=y.get(e);return t||(t={executionQueue:[],isExecuting:!1},y.set(e,t)),t}var x=f(new URL(`./worker.js`,import.meta.url));function S(){return m(16).toString(`hex`)}function C(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?{success:!0}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}function w(t){if(t.isExecuting||t.executionQueue.length===0)return;for(;t.executionQueue.length>0&&t.executionQueue[0].canceled;)t.executionQueue.shift();if(t.executionQueue.length===0)return;let n=t.executionQueue.shift();if(!n)return;t.isExecuting=!0;let r;try{r=e.runTrusted(()=>new p(x,{workerData:n.input}))}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t);return}n.workerRef&&(n.workerRef.current=r);let a=i(n.requireDefenseContext,`python3`,`worker message callback`,e=>{n.resolve(C(e,n.input.protocolToken)),t.isExecuting=!1,r.terminate(),w(t)}),c=i(n.requireDefenseContext,`python3`,`worker error callback`,e=>{let r=o(s(e));n.resolve({success:!1,error:r}),t.isExecuting=!1,w(t)}),l=i(n.requireDefenseContext,`python3`,`worker exit callback`,()=>{t.isExecuting&&(n.resolve({success:!1,error:`Worker exited unexpectedly`}),t.isExecuting=!1,w(t))});r.on(`message`,e=>{try{a(e)}catch(e){let i=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(i)}),t.isExecuting=!1,r.terminate(),w(t)}}),r.on(`error`,e=>{try{c(e)}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}}),r.on(`exit`,()=>{try{l()}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}})}async function T(e,a,c,l=[]){let f=u(),p=new d(f,a.fs,a.cwd,`python3`,a.fetch,a.limits?.maxOutputSize??0),m=a.limits?.maxPythonTimeoutMs??h,_=a.fetch?Math.max(m,g):m,v=b(a.fs),y={protocolToken:S(),sharedBuffer:f,pythonCode:e,cwd:a.cwd,env:r(a.env),args:l,scriptPath:c,timeoutMs:_},x={current:null},C=new Promise(e=>{let r={input:y,resolve:()=>{},workerRef:x,requireDefenseContext:a.requireDefenseContext},s=i(a.requireDefenseContext,`python3`,`worker timeout callback`,()=>{x.current?x.current.terminate():r.canceled=!0,e({success:!1,error:`Execution timeout: exceeded ${_}ms limit`})}),c=n(()=>{try{s()}catch(t){e({success:!1,error:o(t instanceof Error?t.message:String(t))})}},_);r.resolve=n=>{t(c),e(n)},v.executionQueue.push(r),w(v)}),[T,E]=await Promise.all([p.run(_).catch(e=>({stdout:``,stderr:`python3: bridge error: ${o(s(e))}
@@ -9,4 +9,4 @@ import"./chunk-R6VWJ2ZL-FwG_Za20.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";impo
9
9
  `,exitCode:2};try{r=await t.fs.readFile(e),i=n.scriptFile}catch(e){let t=a(e.message);return{stdout:``,stderr:`python3: can't open file '${n.scriptFile}': ${t}
10
10
  `,exitCode:2}}}else if(t.stdin.trim())r=t.stdin,i=`<stdin>`;else return{stdout:``,stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
11
11
  `,exitCode:2};return T(r,t,i,n.scriptArgs)}},D={name:`python`,async execute(e,t){return E.execute(e,t)}};export{E as python3Command,D as pythonCommand};
12
- //# sourceMappingURL=python3-AUFTPCU6-BaJugIdp.mjs.map
12
+ //# sourceMappingURL=python3-AUFTPCU6-Dq9xUUBq.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-HJWBQKYG-B2veqSYo.mjs";export{e as readlinkCommand};
@@ -0,0 +1,2 @@
1
+ import{n as e,u as t}from"./init-Cr82dHei.mjs";import{t as n}from"./is-object-C-4FJ0rP.mjs";import{join as r}from"node:path";import{existsSync as i,readFileSync as a}from"node:fs";const o=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`]];function s(t){if(t.runtimeExecutable!==`npx`||!Array.isArray(t.runtimeArgs))return`preserved`;if(c(t.runtimeArgs,e))return`canonical`;for(let e of o)if(c(t.runtimeArgs,e))return`legacy-bare`;return`preserved`}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function l(e){let o=e.logger??u,c=r(e.projectDir,`.claude`,`launch.json`);if(e.reclaimDisableEnv===`1`)return o({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:c,outcome:`skipped-reclaim-disabled`},repairedCount:0};if(!i(c))return{outcome:{configPath:c,outcome:`no-file`},repairedCount:0};let l;try{let e=a(c,`utf-8`).trim();l=e?JSON.parse(e):{}}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`launch-json-repair-read-failed`,configPath:c,error:t}),{outcome:{configPath:c,outcome:`read-failed`,error:t},repairedCount:0}}if(!n(l)){let e=`launch.json root is not an object`;return o({event:`launch-json-repair-read-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`read-failed`,error:e},repairedCount:0}}let d=l.configurations;if(!Array.isArray(d))return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let f=d.find(e=>n(e)&&e.name===`open-knowledge-ui`);if(!f)return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let p=s(f);if(p===`canonical`)return{outcome:{configPath:c,outcome:`canonical`},repairedCount:0};if(p===`preserved`)return{outcome:{configPath:c,outcome:`preserved`},repairedCount:0};let m=t(e.projectDir,{mode:`published`});if(m.action===`failed`){let e=m.error??`unknown write failure`;return o({event:`launch-json-repair-write-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`write-failed`,error:e},repairedCount:0}}return o({event:`launch-json-repair-applied`,configPath:c}),{outcome:{configPath:c,outcome:`repaired`},repairedCount:1}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as repairLaunchJson};
2
+ //# sourceMappingURL=repair-launch-json-DjAVYY2n.mjs.map
@@ -0,0 +1,2 @@
1
+ import{_ as e,d as t,g as n,m as r,s as i}from"./init-Cr82dHei.mjs";import{homedir as a}from"node:os";function o(t){return t.command===`npx`&&Array.isArray(t.args)&&s(t.args,e)?`canonical`:`needs-rewrite`}function s(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function c(e){let t=e.logger??f,i=e.home??a(),o=[];if(e.reclaimDisableEnv===`1`)return t({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:o,repairedCount:0};for(let a of r){let r=n[a],s=l(()=>r.configPath(``,i));if(s!==null&&o.push(u({scope:`user`,editorId:a,target:r,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:t})),r.projectConfigPath){let n=r.projectConfigPath,i=l(()=>n(e.projectDir));i!==null&&o.push(u({scope:`project`,editorId:a,target:r,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:t}))}}return{outcomes:o,repairedCount:o.filter(e=>e.outcome===`repaired`).length}}function l(e){try{return e()}catch{return null}}function u(e){let n={scope:e.scope,editorId:e.editorId,configPath:e.configPath},r=i(e.target,e.cwd,e.home,e.configPathOverride);if(r===null)return{...n,outcome:`no-entry`};if(o(r)===`canonical`)return{...n,outcome:`canonical`};let a=d(r),s=t(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let t=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:t}),{...n,outcome:`write-failed`,error:t}}return e.logger({event:`mcp-config-reclaim`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,priorCommand:a.priorCommand,priorArgs:a.priorArgs}),{...n,outcome:`repaired`}}function d(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function f(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{c as repairMcpConfigs};
2
+ //# sourceMappingURL=repair-mcp-configs-ektHJIH4.mjs.map
@@ -0,0 +1,3 @@
1
+ import{t as e}from"./esm-CEs3LWY3.mjs";import{Br as t,Ln as n,Nn as r,Un as i,kn as a}from"./dist-D9vKsNHQ.mjs";import{t as o}from"./write-project-skill-BTQxaubH.mjs";import{dirname as s,join as c,resolve as l}from"node:path";import{existsSync as u,mkdirSync as d,readFileSync as f,readdirSync as p,rmSync as m,statSync as h,writeFileSync as g}from"node:fs";import{homedir as _}from"node:os";const v=[{hostDir:`.claude`,editorId:`claude`},{hostDir:`.cursor`,editorId:`cursor`},{hostDir:`.agents`,editorId:`codex`}],y=`open-knowledge-discovery`,b=[`.agents`,`skills`,y],x={existsSync:e=>u(e),isDirectory:e=>{try{return h(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>p(e),readFileSync:e=>f(e),writeFileSync:(e,t)=>{g(e,t)},mkdirSync:(e,t)=>{d(e,t)},rmSync:(e,t)=>{m(e,t)}},S={resolveProjectBundledSkillDir:()=>i(`project`,{checkDesktop:!1}),resolveDiscoveryBundledSkillDir:()=>i(`discovery`,{checkDesktop:!1}),readBundledVersion:()=>a(),readRecordedVersion:e=>r(e,`cli-hosts`),writeRecordedVersion:(e,n)=>t(e,`cli-hosts`,n,`cli-start`),recordEvent:e=>n(e)};function C(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function w(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(s(t),{recursive:!0}),T(e,t,n)}function T(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=c(e,r),a=c(t,r);n.isDirectory(i)?T(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function E(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of v){let s=c(e,t.hostDir,`skills`,`open-knowledge`),l=c(s,`SKILL.md`);if(!n.existsSync(l)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:s});continue}try{o(s,e),w(i,s,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`reclaimed`}),r({event:`project-skill-reclaim-reclaimed`,scope:`project`,editorId:t.editorId,path:s})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:s,error:n})}}return{outcome:`done`,entries:a}}async function D(e,t,n,r){let i=e=>{t.recordEvent(e).catch(()=>{})},a=()=>new Date().toISOString(),o;try{o=await t.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let s;try{s=await t.readRecordedVersion(e)}catch(e){r({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),s=null}if(s!==null&&s===o)return r({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:o}),{outcome:`skipped`,reason:`version-current`};let l;try{l=t.resolveDiscoveryBundledSkillDir()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`bundle-missing:${t}`}),{outcome:`skipped`,reason:`bundle-missing`}}let u=[],d=c(e,...b),f=n.existsSync(d);try{w(l,d,n),u.push({kind:`central`,path:d,outcome:f?`overwritten`:`written`}),r({event:`user-skill-reclaim-central-written`,scope:`user`,path:d,preexisting:f,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);u.push({kind:`central`,path:d,outcome:`failed`,error:t}),r({event:`user-skill-reclaim-central-failed`,scope:`user`,path:d,error:t})}for(let t of v){let i=c(e,t.hostDir),a=c(i,`skills`,y);if(a===d){u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-collapsed-with-central`});continue}if(!n.existsSync(i)){u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-host-absent`});continue}let s=n.existsSync(a);try{w(l,a,n),u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:s?`overwritten`:`written`}),r({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,preexisting:s,version:o})}catch(e){let n=e instanceof Error?e.message:String(e);u.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`failed`,error:n}),r({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,error:n})}}let p=u.find(e=>e.kind===`central`);if(p?.outcome===`written`||p?.outcome===`overwritten`){let n=null;try{await t.writeRecordedVersion(e,o),r({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:o})}catch(e){n=e instanceof Error?e.message:String(e),r({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:o,error:n})}i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:n===null?`installed`:`failed`,version:o,...n===null?{}:{reason:`state-write-failed:${n}`}})}else{let e=u.some(e=>e.kind===`host`&&e.outcome===`failed`);i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,version:o,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:o,entries:u}}async function O(e){let t=e.logger??C,n=e.fs??x,r=e.home??_(),i={...S,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:E(e.projectDir,i,n,t),user:await D(r,i,n,t)}}function k(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function A(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`reclaimed`).length,r=e.project.entries.filter(e=>e.outcome===`no-token`).length,i=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} reclaimed, ${r} no-token, ${i} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
2
+ `)}function j(){return new e(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").action(async()=>{let e=await O({projectDir:l(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${A(e)}\n`),process.exitCode=k(e)})}export{j as n,O as t};
3
+ //# sourceMappingURL=repair-skills-COfLs1Vb.mjs.map
@@ -0,0 +1 @@
1
+ import{t as e}from"./repair-skills-COfLs1Vb.mjs";export{e as repairSkills};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-QCDB2VPH-BUMOhlW7.mjs";export{e as rev};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-QCDB2VPH-CKprjJi1.mjs";export{e as rev};
@@ -0,0 +1 @@
1
+ import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-7TSDKFEO-Clyycgm6.mjs";import"./chunk-VLGZJRPG-dvgMu0oq.mjs";import{t as e}from"./chunk-NYQYO467-De27bHHh.mjs";export{e as rgCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MIZPJHVH-C_Ew6iFJ.mjs";export{e as rmCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-OCS6LSEM-DxqjLuBg.mjs";export{e as rmdirCommand};
@@ -1 +1 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-OL3S66CO-CQnF8cPH.mjs";export{e as sedCommand};
1
+ import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-OL3S66CO-5k30myjg.mjs";export{e as sedCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-A7A2DBEE-CI4JCXh0.mjs";export{e as seqCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-XKQRETAK-Bbdvongf.mjs";export{e as sha1sumCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5V6VZH6T-CxAvX_p_.mjs";export{e as sha256sumCommand};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as e}from"./chunk-GOV5EKKI-CKV9jOGv.mjs";export{e as sleepCommand};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as e}from"./chunk-GOV5EKKI-Cjp7e-4Y.mjs";export{e as sleepCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-KMEYNNUA-DGQRus36.mjs";export{e as sortCommand};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MYE6AGBJ-DJo74dVC.mjs";export{e as split};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MYE6AGBJ-Ba0ek4dq.mjs";export{e as split};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-HWBSOZZR-BZF8XsyZ.mjs";export{e as sqlite3Command};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{t as e}from"./chunk-HWBSOZZR-BK04cmy7.mjs";export{e as sqlite3Command};
@@ -0,0 +1,2 @@
1
+ import{d as e,g as t,u as n}from"./init-Cr82dHei.mjs";import"./loader-B8kBdoRs.mjs";import"./preview-D31Km8cw.mjs";import{n as r}from"./write-project-skill-BTQxaubH.mjs";import{dirname as i,isAbsolute as a,join as o,relative as s,resolve as c}from"node:path";import{statSync as l}from"node:fs";import{readFile as u,realpath as d}from"node:fs/promises";function f(e){return e.replace(/:\d+$/,``)}function p(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:f(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:f(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:f(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function m(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}async function h(e,t){let n,r;try{n=await d(c(e)),r=await d(c(i(e)))}catch{return{kind:`not-git`}}if(!g(n,r))return{kind:`symlink-escape`};let s=o(n,`.git`),f;try{f=l(s)}catch{return{kind:`not-git`}}let m;if(f.isDirectory()){let e;try{e=await d(s)}catch{return{kind:`not-git`}}if(!g(e,n))return{kind:`symlink-escape`};m=e}else if(f.isFile()){let e;try{e=await u(s,`utf-8`)}catch{return{kind:`not-git`}}let t=/^gitdir:\s*(.+)$/m.exec(e.trim());if(!t)return{kind:`not-git`};let r=t[1].trim(),i=a(r)?r:c(n,r);try{m=await d(i)}catch{return{kind:`not-git`}}}else return{kind:`not-git`};let h=o(m,`config`),_;try{_=await u(h,`utf-8`)}catch{return{kind:`not-git`}}let y=v(_);if(y===null)return{kind:`no-origin`};let b=p(y);if(b===null||b.hostname!==`github.com`)return{kind:`non-github`};let x=b.owner.toLowerCase()===t.owner.toLowerCase(),S=b.name.toLowerCase()===t.repo.toLowerCase();return!x||!S?{kind:`wrong-repo`,actualOwner:b.owner,actualRepo:b.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${b.owner}/${b.name}.git`}}function g(e,t){if(e===t)return!0;let n=s(t,e);return n.length>0&&!n.startsWith(`..`)&&!a(n)}function _(e){let t=e.indexOf(`#`),n=e.indexOf(`;`),r=-1;return t>=0&&n>=0?r=Math.min(t,n):t>=0?r=t:n>=0&&(r=n),(r===-1?e:e.slice(0,r)).trim()}function v(e){let t=!1;for(let n of e.split(/\r?\n/)){let e=_(n);if(e.length===0)continue;if(e.startsWith(`[`)){t=/^\[\s*remote\s+["']origin["']\s*\]$/.test(e);continue}if(!t)continue;let r=/^url\s*=\s*(.+)$/.exec(e);if(r)return y(r[1])}return null}function y(e){let t=e.trim();return t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`)?t.slice(1,-1):t}const b=[{id:`mcp-config`,write(t,n,r){let i=t.projectConfigPath?.(n);if(!i)return{integration:`mcp-config`,editorId:t.id,action:`skipped-unsupported`};try{let a=e(t,n,r,void 0,i);return a.action===`written`||a.action===`overwritten`?{integration:`mcp-config`,editorId:t.id,action:a.action,path:a.configPath}:a.action===`failed`?{integration:`mcp-config`,editorId:t.id,action:`failed`,path:a.configPath,error:a.error??`unknown failure`}:{integration:`mcp-config`,editorId:t.id,action:`failed`,path:a.configPath,error:`unexpected project-scope action: ${a.action}`}}catch(e){return{integration:`mcp-config`,editorId:t.id,action:`failed`,path:i,error:e instanceof Error?e.message:String(e)}}}},{id:`project-skill`,write(e,t,n){try{let n=r(e,t);return{integration:`project-skill`,editorId:e.id,action:n.action,...n.path?{path:n.path}:{},...n.error?{error:n.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function x(e,n,r={},i=b){let a=[];for(let o of n){let n=t[o];for(let t of i)a.push(t.write(n,e,r))}return a}function S(e,t,r={}){return{integrations:x(e,t,r),claudeLaunchJson:t.includes(`claude`)?n(e,r):void 0}}export{p as i,h as n,m as r,S as t};
2
+ //# sourceMappingURL=src-D7LWu59h.mjs.map
@@ -0,0 +1 @@
1
+ import{u as e}from"./start-DZz5IFuR.mjs";export{e as startCommand};
@@ -0,0 +1,3 @@
1
+ import{n as e,t}from"./esm-CEs3LWY3.mjs";import{fn as n,oi as r,pi as i}from"./dist-D9vKsNHQ.mjs";import{n as a}from"./constants-CVFDZVjX.mjs";import{spawn as o}from"node:child_process";import{basename as s,join as c}from"node:path";import{closeSync as l,existsSync as u,mkdirSync as d,openSync as f,statSync as p}from"node:fs";import{homedir as m}from"node:os";import{setTimeout as h}from"node:timers/promises";const g=`Open Knowledge.app`,_=`/Applications/${g}`;function v(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return p(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function y(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(b(e,_))return _;let t=c(e.homeDir??m(),`Applications`,g);return b(e,t)?t:null}function b(e,t){try{let n=c(t,`Contents`,`MacOS`,`Open Knowledge`),r=e.statSync(n);return r&&typeof r.isFile==`function`?r.isFile():!1}catch{return!1}}function x(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`)return{available:!1,reason:`darwin-only`};let t;try{t=y(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:e.isTTY!==!0||e.env.SSH_CONNECTION||e.env.SSH_TTY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function S(e){(e.log??(e=>console.error(e)))("Launching Open Knowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let t={...process.env};delete t.ELECTRON_RUN_AS_NODE,e.spawn(`open`,[`-b`,`com.inkeep.open-knowledge`],{detached:!0,stdio:`ignore`,env:t}).unref()}function C(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found at ${_}. Install via DMG, or omit --mode for browser mode.`;case`darwin-only`:return`Desktop app is macOS-only on this release. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect desktop bundle at ${_} (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available at ${_} but launch dispatch did not fire (caller bug).`}}function w(){let e=process.execPath,t=process.argv[1];return t?{command:e,prefixArgs:[t]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx -y @inkeep/open-knowledge@latest\`. This re-introduces the registry-fetch surface that re-exec was fixing. Observed argv: ${JSON.stringify(process.argv)}`),{command:`npx`,prefixArgs:[`-y`,`@inkeep/open-knowledge@latest`]})}function T(e,t){return e.host??t.HOST??`localhost`}function E(e){let t=s(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var D=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}};function O(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function k(e){u(e.lockDir)||d(e.lockDir,{recursive:!0});let t=f(c(e.lockDir,i),`w`),n=e.spawn??o,{PORT:r,...a}=process.env,s=w();try{let r=n(s.command,[...s.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:a});return r.unref(),r}finally{try{l(t)}catch{}}}async function A(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}const j=r;function M(e){let t=e.sigtermGraceMs??j,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>h(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function N(e){let{config:t,cwd:r,host:i}=e,a=e.skipAutoInit??!1,o=e.skipUiAutoSpawn??!1,s=e.idleThresholdMs??18e5,{existsSync:c,mkdirSync:l}=await import(`node:fs`),{bootServer:u,getLogger:d,isProcessAlive:f,readUiLock:p,resolveContentDir:m}=await import(`./dist-CoDJf10s.mjs`),g=e.log??d(`start`);if(!a&&!n(r))throw new D(r);let _=process.env.OK_RECLAIM_DISABLE??null;try{(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-ektHJIH4.mjs`)).repairMcpConfigs)({projectDir:r,reclaimDisableEnv:_})}catch(e){g.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-DjAVYY2n.mjs`)).repairLaunchJson)({projectDir:r,reclaimDisableEnv:_})}catch(e){g.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}try{await(e.repairSkillsFn??(await import(`./repair-skills-DqsrmPG9.mjs`)).repairSkills)({projectDir:r,reclaimDisableEnv:_})}catch(e){g.warn({err:e},`[start] skill repair sweep failed; continuing`)}let v=m(t,r);c(v)||(l(v,{recursive:!0}),g.info({contentDir:v},`Created content directory`));let y=null,b=async({lockDir:t})=>{if(y=O({uiLock:p(t),isAlive:f}),y.action===`spawn`&&!o)try{k({lockDir:t,cwd:r,spawn:e.spawn}),g.info({reason:y.reason},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else y.action===`skip`&&g.info({port:y.port,pid:y.pid},`UI already running at port ${y.port}`)},x=e.reactShellDistDir===void 0,S=await u({config:t,contentDir:v,projectDir:r,contentRoot:t.content.dir,port:e.port,host:i,quiet:!1,localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:x,idleShutdownMs:s,skipAutoInit:!0,...x?{spawnUiSiblingFn:b}:{},idleShutdownHandler:e=>M({readUiLock:()=>p(S.lockDir),isAlive:f,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:g}),log:g,...e.serveContentAssets?{serveContentAssets:!0}:{},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{}});y||={action:`skip`,reason:`alive`,pid:0,port:0};let C=y,w=null;if(C.action===`skip`)w=C.port>0?C.port:null;else if(!o){let t=e.uiBindTimeoutMs??3e3;w=await A({readUiLock:()=>p(S.lockDir),now:Date.now,sleep:e=>h(e),timeoutMs:t,pollIntervalMs:50}),w===null&&g.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:S.httpServer,destroy:S.destroy,lockDir:S.lockDir,contentDir:v,port:S.port,ready:S.ready,degraded:S.degraded,uiSpawnDecision:y,resolvedUiPort:w}}function P(t){if(t===`browser`||t===`app`)return t;throw new e(`--mode must be 'browser' or 'app'`)}async function F(e,t){let{renderBanner:n}=await import(`./banner-ewegHsSq.mjs`),{dim:r,error:i,warning:o}=await import(`./colors-t2HkW8lF.mjs`),s=process.cwd(),c=e;process.title=E(s);let l=T(t,process.env),u=t.port===void 0?void 0:Number(t.port),d=process.env.PORT?Number(process.env.PORT):void 0,f=u??d,p;try{p=await N({config:c,cwd:s,host:l,port:f,...t.serveContentAssets?{serveContentAssets:!0}:{},...t.reactShellDistDir?{reactShellDistDir:t.reactShellDistDir}:{}})}catch(e){e instanceof D&&(console.error(i(e.message)),process.exit(1));let t=I(e,s,await import(`./dist-CoDJf10s.mjs`));t!==null&&(console.error(i(t)),process.exit(1)),console.error(`${i(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let m=!1,h=async e=>{if(!m){m=!0,console.log(r(`\nShutting down (${e})`));try{await p.destroy()}catch(e){console.error(`${i(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)}};process.once(`SIGINT`,()=>{h(`SIGINT`)}),process.once(`SIGTERM`,()=>{h(`SIGTERM`)});let g=`http://${l}:${p.port}`,_=l===`0.0.0.0`||l===`::`?`http://0.0.0.0:${p.port}`:void 0,v=p.resolvedUiPort,y=v!==null&&v>0?`http://${l}:${v}`:g;console.log(n({name:`open-knowledge`,version:a,localUrl:y,apiUrl:y===g?void 0:g,networkUrl:_}));let b={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};p.ready.then(async()=>{if(p.degraded.length>0){console.log();for(let e of p.degraded){let t=b[e]??`${e} (check server logs for details)`;console.warn(` ${o(`⚠`)} ${o(e)}: ${r(t)}`)}console.log()}if(t.open){let{openBrowser:e}=await import(`./open-browser-DKQcpNx8.mjs`);e(y)}}).catch(e=>{console.error(` ${i(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}function I(e,t,n){let r=n.ServerLockCollisionError;if(r===void 0||!(e instanceof r))return null;try{let e=c(t,`.ok`),r=n.readServerLock(e);return r?r.kind===`interactive`?`Open Knowledge desktop is currently running on this project. Quit it or use --cwd to point elsewhere.`:r.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`.":"Open Knowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function L(e){return new t(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,P).option(`--serve-content-assets`,`Serve content assets from this server`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path> (suppresses ok ui sibling)`).action(async t=>{let n=e();if(t.mode===`app`){t.open&&(process.stderr.write(`error: option '--mode=app' cannot be combined with '--open' (--open opens a browser tab against the local server, which app mode does not boot)
2
+ `),process.exit(2));let e=[];if(t.port!==void 0&&e.push(`--port`),t.host!==void 0&&e.push(`--host`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=x(v());if(n.available){S({spawn:o});return}console.error(C(n.reason)),process.exit(1)}await F(n,t)})}export{O as a,F as c,I as d,w as f,S as h,M as i,k as l,x as m,A as n,E as o,v as p,N as r,T as s,D as t,L as u};
3
+ //# sourceMappingURL=start-DZz5IFuR.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-5QVNJEHU-DxXSmS6b.mjs";export{e as statCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-VYOJP4TV-COBa4MtL.mjs";export{e as strings};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MHTUABJP-BWrqic3t.mjs";export{e as tac};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-MHTUABJP-CoXvnzFl.mjs";export{e as tac};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-DCAAORBQ-2hAkTSsi.mjs";export{e as tailCommand};
@@ -1 +1 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as e}from"./chunk-BRGMQKJV-BXc-9Cgj.mjs";export{e as tarCommand};
1
+ import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import{n as e}from"./chunk-BRGMQKJV-BFUsD38L.mjs";export{e as tarCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-55VFSPNA-BkiwXNts.mjs";export{e as teeCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-Z6LRHWXI-4l180K8r.mjs";export{e as timeCommand};
@@ -1 +1 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as e}from"./chunk-YTNYSM6T-WMIf3AF8.mjs";export{e as timeoutCommand};
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import{n as e}from"./chunk-YTNYSM6T-CUlXw32O.mjs";export{e as timeoutCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-OCLXQMOG-JsUybhKc.mjs";export{e as touchCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-62RKD26F-DFxm_wsk.mjs";export{e as trCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-XVDPCNWR-C2xS3KJO.mjs";export{e as treeCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{i as e,t}from"./chunk-R6QSAL5T-BhmoPD7w.mjs";export{e as falseCommand,t as trueCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-PYSFUGCK-Sp2cHHMB.mjs";export{e as unexpand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-WKFATFPP-9cXM_L_4.mjs";export{e as uniqCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-GXVXFKBA-DfpAAE3t.mjs";export{e as wcCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-A65PWWJC-BSl75Gzh.mjs";export{e as whichCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-HJQJAYMS-BX2ngisD.mjs";export{e as whoami};
@@ -0,0 +1,2 @@
1
+ import{Un as e}from"./dist-D9vKsNHQ.mjs";import{dirname as t,isAbsolute as n,relative as r,resolve as i,sep as a}from"node:path";import{cpSync as o,existsSync as s,lstatSync as c,mkdirSync as l,realpathSync as u,rmSync as d}from"node:fs";function f(e,o){let s;try{s=u(o)}catch{s=i(o)}let l;try{l=c(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(l?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);let d=t(e);for(;d.length>1&&d!==a;){let i;try{i=u(d)}catch(e){if(e.code===`ENOENT`){d=t(d);continue}throw e}let a=r(s,i);if(a===``||!a.startsWith(`..`)&&!n(a))return;throw Error(`Refusing to write at ${e}: ancestor ${d} resolves to ${i}, which is outside the project directory ${s}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function p(n,r){let i=n.projectSkillPath?.(r);if(!i)return{editorId:n.id,label:n.label,action:`skipped-unsupported`,path:``};try{let a=e(`project`,{checkDesktop:!0}),c=t(i);f(c,r);let u=s(i)?`overwritten`:`written`;return d(c,{recursive:!0,force:!0}),l(t(c),{recursive:!0}),o(a,c,{recursive:!0}),{editorId:n.id,label:n.label,action:u,path:i}}catch(e){return{editorId:n.id,label:n.label,action:`failed`,path:i,error:e instanceof Error?e.message:String(e)}}}export{p as n,f as t};
2
+ //# sourceMappingURL=write-project-skill-BTQxaubH.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import"./chunk-SYMJJMQ4-BHTQ9-zw.mjs";import"./chunk-7TSDKFEO-Clyycgm6.mjs";import"./chunk-BBXLRYSX-CBa2upXR.mjs";import"./chunk-F55TLFGB-Ch4EQu4J.mjs";import{n as e}from"./chunk-UNYNJIFU-C1ZMf296.mjs";export{e as xanCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-SYMJJMQ4-BHTQ9-zw.mjs";import{c as e}from"./chunk-F55TLFGB-Ch4EQu4J.mjs";export{e as cmdView};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-TOMNU26N-CyB5ygtc.mjs";export{e as xargsCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import"./chunk-SYMJJMQ4-BHTQ9-zw.mjs";import"./chunk-7TSDKFEO-Clyycgm6.mjs";import"./chunk-BBXLRYSX-CBa2upXR.mjs";import{t as e}from"./chunk-XORM457F-BzpdJr6h.mjs";export{e as yqCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/open-knowledge",
3
- "version": "0.8.0-beta.3",
3
+ "version": "0.8.0-beta.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{r as e,t}from"./chunk-VOBGTVA6-Bfa1NTzt.mjs";export{e as aliasCommand,t as unaliasCommand};
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{i as e,t}from"./chunk-D6CWQ5DW-7lvT8dGP.mjs";export{e as bashCommand,t as shCommand};
@@ -1,2 +0,0 @@
1
- import"./dist-BPLmZd1q.mjs";var e=`0.8.0-beta.3`;const t=`config.yml`,n=e;export{n,t};
2
- //# sourceMappingURL=constants-VKoRHLJA.mjs.map
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-TLSUDHID-Ckw-B5Ug.mjs";export{e as diffCommand};
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-GCTKCWKD-Di-RB9Qt.mjs";export{e as echoCommand};
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{i as e,t}from"./chunk-NAERJDUW-CIHrNgJB.mjs";export{e as envCommand,t as printenvCommand};
@@ -1 +0,0 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{n as e}from"./chunk-YFG2CMIF-BoZQym0L.mjs";export{e as exprCommand};
@@ -1 +0,0 @@
1
- import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-CR5AFCPT-DxNsgM0M.mjs";export{e as fileCommand};
@@ -1 +0,0 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-J642UCRS-YiNealfn.mjs";import{n as e}from"./chunk-LPQPILI2-FRQB9gt5.mjs";export{e as findCommand};
@@ -1,2 +0,0 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-CWQS3NFK-Co4ALolT.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-5QMZ5MUS-CAp625aG.mjs";import"./chunk-A5O5YHGN-DvJz5Cpw.mjs";import"./chunk-24IMIIXA-B6yIPkk2.mjs";import{i as e,n as t}from"./chunk-VOBGTVA6-Bfa1NTzt.mjs";import{t as n}from"./chunk-OARHFVLG-Cr0x3Si_.mjs";import{n as r}from"./chunk-QJ7O6ZN3-F0_rcDPM.mjs";import{n as i}from"./chunk-ALLTKNUZ-Cu6JFoC4.mjs";import{n as ee,r as te}from"./chunk-D6CWQ5DW-7lvT8dGP.mjs";import{n as a}from"./chunk-TXBZCHCQ-WeVWfqYv.mjs";import{n as o}from"./chunk-4GTNDTRF-PuLVuVJW.mjs";import{t as s}from"./chunk-LL3S3NLB-ByBS5IDP.mjs";import{n as c}from"./chunk-LWEGUNWT-DdGmM3wr.mjs";import{n as l}from"./chunk-Z7JVV2SM-Cb4YKOCM.mjs";import{n as u}from"./chunk-NUYSJFDK-BTseBdxv.mjs";import{t as d}from"./chunk-SDNKECQQ-DkebEzkd.mjs";import{t as f}from"./chunk-D7MEQ3VN-D8jJZr4A.mjs";import{n as p}from"./chunk-TLSUDHID-Ckw-B5Ug.mjs";import{t as m}from"./chunk-4Q4SM6WR-BlQvqCag.mjs";import{n as h}from"./chunk-RPNGRAAP-BmkapBPD.mjs";import{n as g}from"./chunk-GCTKCWKD-Di-RB9Qt.mjs";import{n as _,r as v}from"./chunk-NAERJDUW-CIHrNgJB.mjs";import{n as y}from"./chunk-VJFXDYWH-DIo0Ia0_.mjs";import{t as b}from"./chunk-YFG2CMIF-BoZQym0L.mjs";import{n as x}from"./chunk-CR5AFCPT-DxNsgM0M.mjs";import"./chunk-J642UCRS-YiNealfn.mjs";import{t as S}from"./chunk-LPQPILI2-FRQB9gt5.mjs";import{t as C}from"./chunk-BRGMQKJV-BXc-9Cgj.mjs";import"./chunk-SYMJJMQ4-DOZMaECk.mjs";import"./chunk-7TSDKFEO-DUQhJkDy.mjs";import"./chunk-BBXLRYSX-K758HlCs.mjs";import{n as w}from"./chunk-XORM457F-wr_DBBnV.mjs";import"./chunk-F55TLFGB-Vy5RU2P3.mjs";import{t as T}from"./chunk-UNYNJIFU-CqGlXAg7.mjs";import{r as E}from"./chunk-HWBSOZZR-BZF8XsyZ.mjs";import{n as D}from"./chunk-MDLLFABN-Wd1iVjXi.mjs";import{n as O}from"./chunk-MLXIYONF-CiCzoeGt.mjs";import{n as k}from"./chunk-A65PWWJC-DV6RO_es.mjs";import{t as A}from"./chunk-MHTUABJP-BWrqic3t.mjs";import{n as j}from"./chunk-4HHKTUW3-CQ53AiA_.mjs";import{n as M}from"./chunk-HJQJAYMS-D-8Vc6Zb.mjs";import{n as N}from"./chunk-PP6PSHAB-CO4MYU__.mjs";import{i as P,n as F,o as I}from"./chunk-LTZRCH7N-46S7WKw8.mjs";import{t as L}from"./chunk-YTNYSM6T-WMIf3AF8.mjs";import{t as R}from"./chunk-Z6LRHWXI-DGTVoTuf.mjs";import{n as z}from"./chunk-A7A2DBEE-dTNL-45u.mjs";import{t as B}from"./chunk-APT7OOP2-DmUrFuRy.mjs";import{n as V}from"./chunk-XKQRETAK-RHzVmuiF.mjs";import{n as H}from"./chunk-5V6VZH6T-DMPvCPbn.mjs";import{n as U,r as W}from"./chunk-R6QSAL5T-CeW6f7-x.mjs";import{n as G}from"./chunk-YCFVLTST-Dzwevuc3.mjs";import{t as K}from"./chunk-GOV5EKKI-CKV9jOGv.mjs";import{t as q}from"./chunk-XVDPCNWR-DxaG1FfA.mjs";import{n as J}from"./chunk-NCNPKYJZ-BVljycUZ.mjs";import{t as ne}from"./chunk-TOMNU26N-AAglMy4J.mjs";import{t as Y}from"./chunk-PYSFUGCK-DsRn64Ef.mjs";import{t as X}from"./chunk-VYOJP4TV-PBsHe2md.mjs";import{t as Z}from"./chunk-MYE6AGBJ-DJo74dVC.mjs";import{t as re}from"./chunk-A7ICOL4V-BvXPAaHu.mjs";import{t as ie}from"./chunk-55VFSPNA-DLwfww5b.mjs";import{n as ae}from"./chunk-WKFATFPP-KO2zkfs2.mjs";import{n as oe}from"./chunk-JVPRLUMK-VMFWXimu.mjs";import{t as se}from"./chunk-62RKD26F-B9la0pfD.mjs";import{t as ce}from"./chunk-QCDB2VPH-BUMOhlW7.mjs";import{t as le}from"./chunk-F23WWYKW-BK2tpXPf.mjs";import{n as ue}from"./chunk-D4J545R4-DkHLjHX6.mjs";import{t as de}from"./chunk-DCAAORBQ-C3s1D8OY.mjs";import{n as fe}from"./chunk-GXVXFKBA-CUKDClxt.mjs";import{n as pe}from"./chunk-5QVNJEHU-dbrKfPGl.mjs";import"./chunk-VLGZJRPG-DymOu90-.mjs";import{a as me,n as he,o as ge}from"./chunk-YS3AZT3J-CBc9LHIy.mjs";import{n as _e}from"./chunk-NYQYO467-BgXuDHUQ.mjs";import{n as ve}from"./chunk-OL3S66CO-CQnF8cPH.mjs";import{t as ye}from"./chunk-KMEYNNUA-pRogdye4.mjs";import{t as be}from"./chunk-MIZPJHVH-DWdPvcYR.mjs";import{n as xe}from"./chunk-A4JSPFCI-CEm2r8SB.mjs";import{t as Q}from"./chunk-PBXLG62G-CgbPJTiw.mjs";import{t as Se}from"./chunk-A4HU7SVR-DKLaJeys.mjs";import{t as Ce}from"./chunk-HJWBQKYG-XrOcsn2f.mjs";import{t as we}from"./chunk-64BAICW3-D92CLSK-.mjs";import{n as Te}from"./chunk-T56QNPHK-DPXaSSfC.mjs";import{n as Ee}from"./chunk-V7TAPXDL-DQgGPvBY.mjs";import{n as De}from"./chunk-MDDMCKUK-CuRdI1Uv.mjs";import{t as Oe}from"./chunk-OCS6LSEM-D7VAOziZ.mjs";import{n as ke}from"./chunk-OCLXQMOG-BW6rwyzS.mjs";var Ae=[g,a,Te,Ee,De,Oe,ke,be,u,xe,Q,o,Se,Ce,we,de,fe,pe,ge,he,me,_e,ve,n,ye,ae,l,d,oe,se,ce,le,ue,y,Y,X,Z,c,re,ie,S,i,m,q,h,_,v,e,t,J,ne,W,U,s,te,ee,G,r,p,f,K,L,R,z,b,B,V,H,x,D,O,k,A,j,M,N,P,F,I,C,w,T,E];function je(){return Ae}var $=new Map;for(let e of je())$.set(e.name,new Set(e.flags.map(e=>e.flag)));function Me(e,t,n){let r=$.get(t);if(!(!r||r.size===0))for(let i of n)r.has(i)&&e.hit(`cmd:flag:${t}:${i}`)}export{Me as emitFlagCoverage};
2
- //# sourceMappingURL=flag-coverage-QT4N2Z44-D6C8h97H.mjs.map
@@ -1 +0,0 @@
1
- import"./chunk-YNYSPYQ5-DesxOVHh.mjs";import"./chunk-DXB73IDG-DIKSLkPq.mjs";import"./chunk-J642UCRS-YiNealfn.mjs";import"./chunk-VLGZJRPG-DymOu90-.mjs";import{i as e,r as t,t as n}from"./chunk-YS3AZT3J-CBc9LHIy.mjs";export{t as egrepCommand,n as fgrepCommand,e as grepCommand};