@inkeep/open-knowledge 0.5.0-beta.3 → 0.5.0-beta.30

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 (366) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +1 -0
  2. package/dist/alias-JE7RI5QX-Bia4gLMF.mjs +1 -0
  3. package/dist/assets/skills/open-knowledge/SKILL.md +75 -16
  4. package/dist/awk2-POPGKRAI-DDrFV-7v.mjs +1 -0
  5. package/dist/{banner-8cQrR88n.mjs → banner-KC_FjiUK.mjs} +2 -2
  6. package/dist/base64-4YMZCVJ5-DDKKOjMm.mjs +1 -0
  7. package/dist/basename-AA2KJYZQ-BK5zVs3W.mjs +1 -0
  8. package/dist/bash-IJWYRKFO-B9r1a0X9.mjs +1 -0
  9. package/dist/build-B4ZT2GMK.mjs +1 -0
  10. package/dist/{build-fAc55Z_L.mjs → build-BZeImWox.mjs} +1 -1
  11. package/dist/cat-RDUMLXKC-CeNrSElK.mjs +1 -0
  12. package/dist/chmod-SYMGL4JA-DFJ4ylQU.mjs +1 -0
  13. package/dist/{chokidar-DnkSPA-1.mjs → chokidar-CxU7f6JW.mjs} +1 -1
  14. package/dist/{chunk-24IMIIXA-_PX4ITYZ.mjs → chunk-24IMIIXA-B6yIPkk2.mjs} +2 -2
  15. package/dist/{chunk-3THT3N7L-DrzOuTpA.mjs → chunk-3THT3N7L-DztAF386.mjs} +1 -1
  16. package/dist/{chunk-3ZUFRYJ4-BUqSdAvt.mjs → chunk-3ZUFRYJ4-qsYuZX7b.mjs} +1 -1
  17. package/dist/{chunk-44UOCSGV-BbZqjKvt.mjs → chunk-44UOCSGV-CaFxJDHm.mjs} +1 -1
  18. package/dist/{chunk-4GTNDTRF-C7Bk89yc.mjs → chunk-4GTNDTRF-PuLVuVJW.mjs} +2 -2
  19. package/dist/{chunk-4HHKTUW3-DaxBqSRO.mjs → chunk-4HHKTUW3-CQ53AiA_.mjs} +1 -1
  20. package/dist/{chunk-4Q4SM6WR-CQ3yG3KJ.mjs → chunk-4Q4SM6WR-BlQvqCag.mjs} +2 -2
  21. package/dist/{chunk-55VFSPNA-o6aQtPTI.mjs → chunk-55VFSPNA-DLwfww5b.mjs} +2 -2
  22. package/dist/{chunk-5QMZ5MUS-SLhNX8t9.mjs → chunk-5QMZ5MUS-CAp625aG.mjs} +2 -2
  23. package/dist/{chunk-5QVNJEHU-Besgjasu.mjs → chunk-5QVNJEHU-dbrKfPGl.mjs} +2 -2
  24. package/dist/{chunk-5V6VZH6T-1WdUUj8r.mjs → chunk-5V6VZH6T-DMPvCPbn.mjs} +2 -2
  25. package/dist/{chunk-62RKD26F-BbNaH0fp.mjs → chunk-62RKD26F-B9la0pfD.mjs} +2 -2
  26. package/dist/{chunk-64BAICW3-CQTRuYnm.mjs → chunk-64BAICW3-D92CLSK-.mjs} +2 -2
  27. package/dist/{chunk-74CEPOFO-CLQh_oXv.mjs → chunk-74CEPOFO-BcZUJMO1.mjs} +1 -1
  28. package/dist/{chunk-7L36YK2X-VJvKq7OX.mjs → chunk-7L36YK2X-D7Z_Qw_C.mjs} +1 -1
  29. package/dist/{chunk-7TSDKFEO-D7K8a1nI.mjs → chunk-7TSDKFEO-DUQhJkDy.mjs} +1 -1
  30. package/dist/{chunk-A4HU7SVR-SqitiwTc.mjs → chunk-A4HU7SVR-DKLaJeys.mjs} +1 -1
  31. package/dist/{chunk-A4JSPFCI-BzZWBgeR.mjs → chunk-A4JSPFCI-CEm2r8SB.mjs} +2 -2
  32. package/dist/{chunk-A5O5YHGN-DQP-O5US.mjs → chunk-A5O5YHGN-DvJz5Cpw.mjs} +2 -2
  33. package/dist/{chunk-A65PWWJC-C9G7KuCV.mjs → chunk-A65PWWJC-DV6RO_es.mjs} +2 -2
  34. package/dist/{chunk-A7A2DBEE-CWXz1JTo.mjs → chunk-A7A2DBEE-dTNL-45u.mjs} +1 -1
  35. package/dist/{chunk-A7ICOL4V-k5RTBWOL.mjs → chunk-A7ICOL4V-BvXPAaHu.mjs} +2 -2
  36. package/dist/{chunk-ALLTKNUZ-SyOkRvXW.mjs → chunk-ALLTKNUZ-Cu6JFoC4.mjs} +2 -2
  37. package/dist/{chunk-APT7OOP2-CriAmyUL.mjs → chunk-APT7OOP2-DmUrFuRy.mjs} +2 -2
  38. package/dist/{chunk-BBXLRYSX-dCISWeRn.mjs → chunk-BBXLRYSX-K758HlCs.mjs} +2 -2
  39. package/dist/{chunk-BRGMQKJV-Dnv0H02a.mjs → chunk-BRGMQKJV-BXc-9Cgj.mjs} +3 -3
  40. package/dist/{chunk-CR5AFCPT-BS9vrR_k.mjs → chunk-CR5AFCPT-DxNsgM0M.mjs} +2 -2
  41. package/dist/{chunk-CWQS3NFK-BQ5SUtd7.mjs → chunk-CWQS3NFK-Co4ALolT.mjs} +1 -1
  42. package/dist/{chunk-D4J545R4-T2J_By_d.mjs → chunk-D4J545R4-DkHLjHX6.mjs} +2 -2
  43. package/dist/{chunk-D6CWQ5DW-0uvJGnRG.mjs → chunk-D6CWQ5DW-7lvT8dGP.mjs} +2 -2
  44. package/dist/{chunk-D7MEQ3VN-CSN8BGNX.mjs → chunk-D7MEQ3VN-D8jJZr4A.mjs} +2 -2
  45. package/dist/{chunk-DCAAORBQ-BgX2K5fq.mjs → chunk-DCAAORBQ-C3s1D8OY.mjs} +2 -2
  46. package/dist/{chunk-DXB73IDG-DfmyzFzL.mjs → chunk-DXB73IDG-DIKSLkPq.mjs} +1 -1
  47. package/dist/{chunk-EEXR5ZDP-DUXT2_T-.mjs → chunk-EEXR5ZDP-CETL3_Uw.mjs} +1 -1
  48. package/dist/{chunk-EIZGF4BS-BMblx_pb.mjs → chunk-EIZGF4BS-DOoQW9jQ.mjs} +2 -2
  49. package/dist/{chunk-F23WWYKW-B0xoXfw7.mjs → chunk-F23WWYKW-BK2tpXPf.mjs} +2 -2
  50. package/dist/{chunk-F55TLFGB-CekdCv-K.mjs → chunk-F55TLFGB-Vy5RU2P3.mjs} +2 -2
  51. package/dist/{chunk-FEIOJCZD-Vm1q1kLH.mjs → chunk-FEIOJCZD-C25Und0M.mjs} +2 -2
  52. package/dist/{chunk-GCTKCWKD-ByezaQ15.mjs → chunk-GCTKCWKD-Di-RB9Qt.mjs} +1 -1
  53. package/dist/{chunk-GFQRA5P5-CkMj9l7f.mjs → chunk-GFQRA5P5-DnjwTqP3.mjs} +1 -1
  54. package/dist/{chunk-GOV5EKKI-B4qGAgcI.mjs → chunk-GOV5EKKI-CKV9jOGv.mjs} +2 -2
  55. package/dist/{chunk-GXVXFKBA-CQs4HBko.mjs → chunk-GXVXFKBA-CUKDClxt.mjs} +2 -2
  56. package/dist/{chunk-HDQ56CKY-DnAJDKCm.mjs → chunk-HDQ56CKY-MTQ75a8z.mjs} +2 -2
  57. package/dist/{chunk-HJQJAYMS-lEGf1x1q.mjs → chunk-HJQJAYMS-D-8Vc6Zb.mjs} +1 -1
  58. package/dist/{chunk-HJWBQKYG-lmVh-ZXn.mjs → chunk-HJWBQKYG-XrOcsn2f.mjs} +2 -2
  59. package/dist/{chunk-HWBSOZZR-CdcHflPt.mjs → chunk-HWBSOZZR-BZF8XsyZ.mjs} +2 -2
  60. package/dist/{chunk-HWKDQ44K-cV6V5ZgY.mjs → chunk-HWKDQ44K-wgmyck2O.mjs} +2 -2
  61. package/dist/{chunk-I57KEIP3-Cr5Okw7t.mjs → chunk-I57KEIP3-DipCOPKf.mjs} +2 -2
  62. package/dist/{chunk-IPJHKYVM-orb6vjJ1.mjs → chunk-IPJHKYVM-C3IodQq7.mjs} +1 -1
  63. package/dist/{chunk-J642UCRS-DfKEFKiV.mjs → chunk-J642UCRS-YiNealfn.mjs} +2 -2
  64. package/dist/{chunk-JVPRLUMK-Bf9V_Gv7.mjs → chunk-JVPRLUMK-VMFWXimu.mjs} +2 -2
  65. package/dist/{chunk-KMEYNNUA-Caoc9sHa.mjs → chunk-KMEYNNUA-pRogdye4.mjs} +2 -2
  66. package/dist/{chunk-LL3S3NLB-GadY6GUd.mjs → chunk-LL3S3NLB-ByBS5IDP.mjs} +2 -2
  67. package/dist/{chunk-LPQPILI2-DDrAB1na.mjs → chunk-LPQPILI2-FRQB9gt5.mjs} +2 -2
  68. package/dist/{chunk-LTZRCH7N-DsWqztAp.mjs → chunk-LTZRCH7N-46S7WKw8.mjs} +2 -2
  69. package/dist/{chunk-LWEGUNWT-DQ_TsrhS.mjs → chunk-LWEGUNWT-DdGmM3wr.mjs} +2 -2
  70. package/dist/{chunk-MDDMCKUK-Cnfznbkf.mjs → chunk-MDDMCKUK-CuRdI1Uv.mjs} +2 -2
  71. package/dist/{chunk-MDLLFABN-C_2lIHFT.mjs → chunk-MDLLFABN-Wd1iVjXi.mjs} +2 -2
  72. package/dist/{chunk-MHTUABJP-7AQ2Pv6q.mjs → chunk-MHTUABJP-BWrqic3t.mjs} +1 -1
  73. package/dist/{chunk-MIZPJHVH-BB7Is338.mjs → chunk-MIZPJHVH-DWdPvcYR.mjs} +2 -2
  74. package/dist/{chunk-MLXIYONF-BI0CC1Dm.mjs → chunk-MLXIYONF-CiCzoeGt.mjs} +2 -2
  75. package/dist/{chunk-MYE6AGBJ-DWNp4Fd-.mjs → chunk-MYE6AGBJ-DJo74dVC.mjs} +2 -2
  76. package/dist/{chunk-NAERJDUW-D3VeMMYB.mjs → chunk-NAERJDUW-CIHrNgJB.mjs} +2 -2
  77. package/dist/{chunk-NCNPKYJZ-BBZ5fJNa.mjs → chunk-NCNPKYJZ-BVljycUZ.mjs} +2 -2
  78. package/dist/{chunk-NUYSJFDK-5tRwRhY2.mjs → chunk-NUYSJFDK-BTseBdxv.mjs} +2 -2
  79. package/dist/{chunk-NYQYO467-Blr3IMkQ.mjs → chunk-NYQYO467-BgXuDHUQ.mjs} +2 -2
  80. package/dist/{chunk-OARHFVLG-Irp_vfLa.mjs → chunk-OARHFVLG-Cr0x3Si_.mjs} +2 -2
  81. package/dist/{chunk-OCLXQMOG-DKBkjIbk.mjs → chunk-OCLXQMOG-BW6rwyzS.mjs} +2 -2
  82. package/dist/{chunk-OCS6LSEM-C2EAQI0w.mjs → chunk-OCS6LSEM-D7VAOziZ.mjs} +2 -2
  83. package/dist/{chunk-OJDRYQWQ-D4lSWh0K.mjs → chunk-OJDRYQWQ-ikvLWpfV.mjs} +1 -1
  84. package/dist/{chunk-OL3S66CO-BSC-nhbc.mjs → chunk-OL3S66CO-CQnF8cPH.mjs} +2 -2
  85. package/dist/{chunk-PBXLG62G-9wkRpzkO.mjs → chunk-PBXLG62G-CgbPJTiw.mjs} +2 -2
  86. package/dist/{chunk-PP6PSHAB-BkN6oaqq.mjs → chunk-PP6PSHAB-CO4MYU__.mjs} +1 -1
  87. package/dist/{chunk-PYSFUGCK-C-zBGrN0.mjs → chunk-PYSFUGCK-DsRn64Ef.mjs} +2 -2
  88. package/dist/{chunk-QCDB2VPH-BUg_3i-W.mjs → chunk-QCDB2VPH-BUMOhlW7.mjs} +2 -2
  89. package/dist/{chunk-QJ7O6ZN3-h8P6Rj5g.mjs → chunk-QJ7O6ZN3-F0_rcDPM.mjs} +2 -2
  90. package/dist/{chunk-R6QSAL5T-CBXSpChE.mjs → chunk-R6QSAL5T-CeW6f7-x.mjs} +1 -1
  91. package/dist/{chunk-R6VWJ2ZL-DSqbA7Rj.mjs → chunk-R6VWJ2ZL-FwG_Za20.mjs} +1 -1
  92. package/dist/{chunk-RPNGRAAP-BVzuWIcl.mjs → chunk-RPNGRAAP-BmkapBPD.mjs} +2 -2
  93. package/dist/{chunk-SDNKECQQ-CQaGD8tt.mjs → chunk-SDNKECQQ-DkebEzkd.mjs} +2 -2
  94. package/dist/{chunk-SYMJJMQ4-C3GxJv_z.mjs → chunk-SYMJJMQ4-DOZMaECk.mjs} +2 -2
  95. package/dist/{chunk-T56QNPHK-DLf9xkTG.mjs → chunk-T56QNPHK-DPXaSSfC.mjs} +2 -2
  96. package/dist/{chunk-TLSUDHID-BHtR3boD.mjs → chunk-TLSUDHID-Ckw-B5Ug.mjs} +2 -2
  97. package/dist/{chunk-TOMNU26N-DerX6zSM.mjs → chunk-TOMNU26N-AAglMy4J.mjs} +2 -2
  98. package/dist/{chunk-TXBZCHCQ-CAbfX7on.mjs → chunk-TXBZCHCQ-WeVWfqYv.mjs} +2 -2
  99. package/dist/{chunk-UNYNJIFU-Bd2svF5l.mjs → chunk-UNYNJIFU-CqGlXAg7.mjs} +3 -3
  100. package/dist/{chunk-V7TAPXDL-BUbPC-Wn.mjs → chunk-V7TAPXDL-DQgGPvBY.mjs} +2 -2
  101. package/dist/{chunk-VJFXDYWH-B5EkAwKK.mjs → chunk-VJFXDYWH-DIo0Ia0_.mjs} +2 -2
  102. package/dist/{chunk-VLGZJRPG-C9UlHcZa.mjs → chunk-VLGZJRPG-DymOu90-.mjs} +2 -2
  103. package/dist/{chunk-VOBGTVA6-BbJdoZlr.mjs → chunk-VOBGTVA6-Bfa1NTzt.mjs} +2 -2
  104. package/dist/{chunk-VYOJP4TV-B4Ua-c0F.mjs → chunk-VYOJP4TV-PBsHe2md.mjs} +2 -2
  105. package/dist/{chunk-WKFATFPP-DWw-N9hi.mjs → chunk-WKFATFPP-KO2zkfs2.mjs} +2 -2
  106. package/dist/{chunk-X2AJGDEF-BosVr67X.mjs → chunk-X2AJGDEF-D5w6wtaX.mjs} +1 -1
  107. package/dist/{chunk-XHM67O4N-Cd7Fiqsb.mjs → chunk-XHM67O4N-akBjDPaR.mjs} +1 -1
  108. package/dist/{chunk-XKQRETAK-ud_FNcYV.mjs → chunk-XKQRETAK-RHzVmuiF.mjs} +2 -2
  109. package/dist/{chunk-XORM457F-B_0Xbzib.mjs → chunk-XORM457F-wr_DBBnV.mjs} +2 -2
  110. package/dist/{chunk-XVDPCNWR-DNk_0jVb.mjs → chunk-XVDPCNWR-DxaG1FfA.mjs} +2 -2
  111. package/dist/{chunk-YCFVLTST-0XsXjpJU.mjs → chunk-YCFVLTST-Dzwevuc3.mjs} +2 -2
  112. package/dist/{chunk-YFG2CMIF-BwW9XX2A.mjs → chunk-YFG2CMIF-BoZQym0L.mjs} +2 -2
  113. package/dist/{chunk-YNYSPYQ5-Dq-BWW-f.mjs → chunk-YNYSPYQ5-DesxOVHh.mjs} +1 -1
  114. package/dist/{chunk-YS3AZT3J-CLwj1P0Z.mjs → chunk-YS3AZT3J-CBc9LHIy.mjs} +2 -2
  115. package/dist/{chunk-YTNYSM6T-TIb8x1lA.mjs → chunk-YTNYSM6T-WMIf3AF8.mjs} +2 -2
  116. package/dist/{chunk-Z6LRHWXI-VE8VWpH9.mjs → chunk-Z6LRHWXI-DGTVoTuf.mjs} +2 -2
  117. package/dist/{chunk-Z7JVV2SM-BAsPuUWb.mjs → chunk-Z7JVV2SM-Cb4YKOCM.mjs} +2 -2
  118. package/dist/clear-5CZ5X4YR-CadVxKrq.mjs +1 -0
  119. package/dist/cli.mjs +43 -42
  120. package/dist/{colors-BtKMHmBX.mjs → colors-BNufdynn.mjs} +1 -1
  121. package/dist/colors-T3xmlXQT.mjs +1 -0
  122. package/dist/column-WLPMMSTS-6o4DDsDk.mjs +1 -0
  123. package/dist/comm-5SLSESQG-C2GatHU6.mjs +1 -0
  124. package/dist/constants-DfOtnL8q.mjs +2 -0
  125. package/dist/cp-XOYR4ABJ-DmS6dER-.mjs +1 -0
  126. package/dist/{curl-47BFPSFW-BzVtpc-O.mjs → curl-47BFPSFW-C2kRcGkX.mjs} +2 -2
  127. package/dist/cut-OPC3VAGB-s4tQWhL5.mjs +1 -0
  128. package/dist/date-DD7FVA2V-Dubgjr6a.mjs +1 -0
  129. package/dist/diff-HJF2MPDN-wUotW5Vg.mjs +1 -0
  130. package/dist/dirname-LEMTZZFS-B477CImE.mjs +1 -0
  131. package/dist/dist-BNxDPtVp.mjs +1 -0
  132. package/dist/dist-Bfgu576g.mjs +3265 -0
  133. package/dist/du-WO2ENHXQ-C4c5wweW.mjs +1 -0
  134. package/dist/echo-O45JWWI2-TudodhHR.mjs +1 -0
  135. package/dist/env-5EPCWSXR-CTcNEMpy.mjs +1 -0
  136. package/dist/{execAsync-Bpfn4nfY.mjs → execAsync-CulVJBMN.mjs} +1 -1
  137. package/dist/{execAsync-D93HRpVy.mjs → execAsync-CzW9fUYQ.mjs} +1 -1
  138. package/dist/{execAsync-DMx5TUjh.mjs → execAsync-DuQoqWaW.mjs} +1 -1
  139. package/dist/expand-DTNXU4LQ-BT6M2Tdc.mjs +1 -0
  140. package/dist/expansion-ENLSRCXJ-Cy7j--Iy.mjs +1 -0
  141. package/dist/expr-5T3UU5KE-D2Kr5nuJ.mjs +1 -0
  142. package/dist/file-ZIGAJ4YS-BH3jYcuM.mjs +1 -0
  143. package/dist/find-TPUOAIUQ-RFxkUcGN.mjs +1 -0
  144. package/dist/flag-coverage-QT4N2Z44-D6C8h97H.mjs +2 -0
  145. package/dist/fold-LDSORVYE-CfKQmrJ1.mjs +1 -0
  146. package/dist/{getMachineId-bsd-B3nMvpKd.mjs → getMachineId-bsd-DAmB-Ym0.mjs} +2 -2
  147. package/dist/{getMachineId-bsd-CbGsKq4x.mjs → getMachineId-bsd-FYDP9w5Q.mjs} +2 -2
  148. package/dist/{getMachineId-bsd-Cbosky3N.mjs → getMachineId-bsd-mPrX3ckm.mjs} +2 -2
  149. package/dist/{getMachineId-darwin-BNex6tJ8.mjs → getMachineId-darwin-B0Qw-MTj.mjs} +2 -2
  150. package/dist/{getMachineId-darwin-BnJVzhVS.mjs → getMachineId-darwin-C79HtyON.mjs} +2 -2
  151. package/dist/{getMachineId-darwin-UUooObuL.mjs → getMachineId-darwin-Co8Jnu5v.mjs} +2 -2
  152. package/dist/{getMachineId-linux-Bo4OhbSY.mjs → getMachineId-linux-BBORs2cS.mjs} +1 -1
  153. package/dist/{getMachineId-linux-D4ybKI-D.mjs → getMachineId-linux-BizmCjYq.mjs} +1 -1
  154. package/dist/{getMachineId-linux-BCV7VFT0.mjs → getMachineId-linux-BvLCCmKQ.mjs} +1 -1
  155. package/dist/{getMachineId-unsupported-DKWpTC9E.mjs → getMachineId-unsupported-Bgp-Es9j.mjs} +1 -1
  156. package/dist/{getMachineId-unsupported-DYYMUAWj.mjs → getMachineId-unsupported-CbR45h2D.mjs} +1 -1
  157. package/dist/{getMachineId-unsupported-4i2apDO3.mjs → getMachineId-unsupported-DbGFOAw1.mjs} +1 -1
  158. package/dist/{getMachineId-win-E9RqBHbs.mjs → getMachineId-win-CT_Y5i_4.mjs} +2 -2
  159. package/dist/{getMachineId-win-W9lSyLKl.mjs → getMachineId-win-Cy0XHq4X.mjs} +2 -2
  160. package/dist/{getMachineId-win-CHxnm_JZ.mjs → getMachineId-win-D5gDnBHa.mjs} +2 -2
  161. package/dist/grep-3AIAIJVR-DgQJLmW0.mjs +1 -0
  162. package/dist/gzip-AQXSGOVS-yXjpnIVd.mjs +1 -0
  163. package/dist/head-HT2B6D2J-BR4RHRTk.mjs +1 -0
  164. package/dist/help-VVWX7SA5-M6C6klSC.mjs +1 -0
  165. package/dist/history-J4QRNGRO-C1r7-kvT.mjs +1 -0
  166. package/dist/hostname-BK6HG2DE-BBBcRrtV.mjs +1 -0
  167. package/dist/html-to-markdown-TFCECAGV-B9oYuMVf.mjs +1 -0
  168. package/dist/index.d.mts +1 -1
  169. package/dist/index.mjs +1 -1
  170. package/dist/init-BGcP3NLX.mjs +408 -0
  171. package/dist/init-BrAA3Lqd.mjs +1 -0
  172. package/dist/{is-object-C-4FJ0rP.mjs → is-object-DF0ZeuvD.mjs} +1 -1
  173. package/dist/join-GG2LDHE5-xeTE0Mi4.mjs +1 -0
  174. package/dist/jq-ODXZBPLY-C5v6qNu_.mjs +1 -0
  175. package/dist/{js-exec-M6UR76J5-2jDKLOtz.mjs → js-exec-M6UR76J5-IyD-lpzv.mjs} +2 -2
  176. package/dist/{lib-CxZz7HCo.mjs → lib-BOCdCkg7.mjs} +1 -1
  177. package/dist/{libesm-YL3Bqolr.mjs → libesm-Cfo1LhlX.mjs} +1 -1
  178. package/dist/ln-4TRFBYAT-4XMTO1OQ.mjs +1 -0
  179. package/dist/loader-Cm8UXQWb.mjs +1 -0
  180. package/dist/loader-DDq-7829.mjs +4 -0
  181. package/dist/ls-KSXFZCWH-Bw_Cf-VY.mjs +1 -0
  182. package/dist/{lzma-noRZ7I73.mjs → lzma-vr8hBkhz.mjs} +1 -1
  183. package/dist/md5sum-INMIK4DX-CAIH4ZVI.mjs +1 -0
  184. package/dist/mkdir-TDEMSB6C-D1oUG8Jf.mjs +1 -0
  185. package/dist/mv-Z6MORUFL-CN471qcL.mjs +1 -0
  186. package/dist/nl-U5YJDM32-CFzXKze3.mjs +1 -0
  187. package/dist/od-VJEF2UR5-C2R4Accu.mjs +1 -0
  188. package/dist/{open-browser-BOeCxs2W.mjs → open-browser-Be-7qaQ9.mjs} +1 -1
  189. package/dist/paste-7N6AFSDS-bUl2Dwz3.mjs +1 -0
  190. package/dist/preview-CAvBVoC_.mjs +1 -0
  191. package/dist/{preview-D4TVVGvQ.mjs → preview-DIgE6AIn.mjs} +2 -2
  192. package/dist/printf-CX64KX2P-Ce--gWAq.mjs +1 -0
  193. package/dist/public/assets/ActivityModeContent-BJDdu4Nn.js +2 -0
  194. package/dist/public/assets/{ConsentDialogBody-zb1TKG9i.js → ConsentDialogBody-vyrObxKh.js} +1 -1
  195. package/dist/public/assets/DocumentContext-DHsPuqhl.js +52 -0
  196. package/dist/public/assets/{GraphPanel-5-zTeMY1.js → GraphPanel-MJE4uTfy.js} +3 -3
  197. package/dist/public/assets/{McpConsentDialogBody-C8ewMYVI.js → McpConsentDialogBody-D6COAaWG.js} +1 -1
  198. package/dist/public/assets/SettingsDialog-D_hqsuN-.js +11 -0
  199. package/dist/public/assets/SourceEditor-CjxbBvjc.js +2 -0
  200. package/dist/public/assets/{agent-presence-BrTlNKmt.js → agent-presence-C9zIlaSm.js} +1 -1
  201. package/dist/public/assets/button-jHkzz0kg.js +1 -0
  202. package/dist/public/assets/config-validation-events-CKTxHLXG.js +10 -0
  203. package/dist/public/assets/dialog-aTGC_OHs.js +45 -0
  204. package/dist/public/assets/{dist-Bej94Urx.js → dist-BpKSkQFf.js} +1 -1
  205. package/dist/public/assets/{dist-Cg-Qaqw_.js → dist-CcCHwIMj.js} +1 -1
  206. package/dist/public/assets/doc-hash-8BtTwv21.js +423 -0
  207. package/dist/public/assets/index-Ch6NS9p9.js +1853 -0
  208. package/dist/public/assets/index-D4NdqT_p.css +1 -0
  209. package/dist/public/assets/{input-hZk8Tm0e.js → input-_NgekzP6.js} +1 -1
  210. package/dist/public/assets/{label-Dv_9VZWz.js → label-D3fsVWmW.js} +1 -1
  211. package/dist/public/assets/mcp-consent-store-Cf5AdDXf.js +1 -0
  212. package/dist/public/assets/{panel-8fydlQgn.js → panel-DfWmoeYO.js} +1 -1
  213. package/dist/public/assets/{target-navigation-intent-COKjYFzE.js → target-navigation-intent-Nd4Mwd33.js} +1 -1
  214. package/dist/public/assets/{telemetry-impl-C6x9yckj.js → telemetry-impl-IWNN1g1D.js} +1 -1
  215. package/dist/public/assets/{textarea-gXd-JXvQ.js → textarea-BSSBCXzx.js} +1 -1
  216. package/dist/public/assets/toggle-group-4JFWFjGS.js +1 -0
  217. package/dist/public/assets/tooltip-0G4OCxcX.js +1 -0
  218. package/dist/public/assets/{typing-burst-detector-wbnGbURk.js → typing-burst-detector-CAdcgWjh.js} +2 -2
  219. package/dist/public/index.html +19 -19
  220. package/dist/pwd-D4OZ7N27-C18XewhV.mjs +1 -0
  221. package/dist/{python3-AUFTPCU6-C74hXpFG.mjs → python3-AUFTPCU6-BaJugIdp.mjs} +2 -2
  222. package/dist/readlink-MI4GCHJF-CHvs7DDT.mjs +1 -0
  223. package/dist/repair-launch-json-C5RKloip.mjs +2 -0
  224. package/dist/repair-mcp-configs-C9YDrIQb.mjs +2 -0
  225. package/dist/rev-XOSYPP45-2mnFFZWW.mjs +1 -0
  226. package/dist/rg-FOQSCCX3-BJahNfSe.mjs +1 -0
  227. package/dist/rm-RTZG23RL-D9-0WGRY.mjs +1 -0
  228. package/dist/rmdir-XTQXT7RK-Br7eH9kL.mjs +1 -0
  229. package/dist/sed-VFTTATXJ-mYhAmixc.mjs +1 -0
  230. package/dist/seq-RN5ZUASB-CKf5MNNO.mjs +1 -0
  231. package/dist/sha1sum-VJPNLNU6-DuOHap1X.mjs +1 -0
  232. package/dist/sha256sum-PI32XWXY-D9fEipQ7.mjs +1 -0
  233. package/dist/sleep-VZFPZFWA-B1fSoYuO.mjs +1 -0
  234. package/dist/sort-DCNRDA7U-DDCY4JZu.mjs +1 -0
  235. package/dist/split-SITCSYCZ-b9hfEJw7.mjs +1 -0
  236. package/dist/sqlite3-56UMWEY3-BQEx5i3P.mjs +1 -0
  237. package/dist/src-CCs_EWzw.mjs +2 -0
  238. package/dist/start-C0yxsib-.mjs +3 -0
  239. package/dist/start-CTwIpcq1.mjs +1 -0
  240. package/dist/stat-BT5A227F-Dzp4sgau.mjs +1 -0
  241. package/dist/strings-7PLOGTPD-DT41jX9d.mjs +1 -0
  242. package/dist/tac-SJGXQ4T2-BpdVoP8b.mjs +1 -0
  243. package/dist/tail-S5ULNTJU-0-sYrYik.mjs +1 -0
  244. package/dist/tar-ANUBEFJY-Wh3na_NU.mjs +1 -0
  245. package/dist/tee-O7VXZDCO-CwnGG0go.mjs +1 -0
  246. package/dist/time-DEUO3QV2-DzkqaQ1k.mjs +1 -0
  247. package/dist/timeout-VRKMCG72-BtPBpIRq.mjs +1 -0
  248. package/dist/touch-DX2IJOQ4-KW0Ui-lB.mjs +1 -0
  249. package/dist/tr-2HXZRDSW-C6Kf0M8T.mjs +1 -0
  250. package/dist/tree-LYXBS7DC-BN1FBqvM.mjs +1 -0
  251. package/dist/true-WHJNXCHG-DxCMVdqj.mjs +1 -0
  252. package/dist/unexpand-RGTMIGZM-DZ4Kf6Xq.mjs +1 -0
  253. package/dist/uniq-SUNANL47-Ceg51JdA.mjs +1 -0
  254. package/dist/wc-TQB3VNOX-BzWNq0MY.mjs +1 -0
  255. package/dist/which-XZHEH76L-DH_U2-Cj.mjs +1 -0
  256. package/dist/whoami-DGKU3D2X-BholYNPM.mjs +1 -0
  257. package/dist/xan-BXDXYEIB-b1eAtgch.mjs +1 -0
  258. package/dist/xan-view-ECQUO7AJ-DWDC57b_.mjs +1 -0
  259. package/dist/xargs-I6EZUCYF-Cov-i7kW.mjs +1 -0
  260. package/dist/yq-MJMAR36V-1r29nH4p.mjs +1 -0
  261. package/package.json +3 -3
  262. package/dist/alias-JE7RI5QX-BCGl9_yw.mjs +0 -1
  263. package/dist/awk2-POPGKRAI-CGGIG9fD.mjs +0 -1
  264. package/dist/base64-4YMZCVJ5-DQZX3-n8.mjs +0 -1
  265. package/dist/basename-AA2KJYZQ-BxQSdX4k.mjs +0 -1
  266. package/dist/bash-IJWYRKFO-BitzNsGT.mjs +0 -1
  267. package/dist/build-GAD37AZK.mjs +0 -1
  268. package/dist/cat-RDUMLXKC-DT-A9snL.mjs +0 -1
  269. package/dist/chmod-SYMGL4JA-DjEw7qQb.mjs +0 -1
  270. package/dist/clear-5CZ5X4YR-ph4db-bT.mjs +0 -1
  271. package/dist/colors-BCE2jNgl.mjs +0 -1
  272. package/dist/column-WLPMMSTS-BCX6Q17n.mjs +0 -1
  273. package/dist/comm-5SLSESQG-C7AhH0K0.mjs +0 -1
  274. package/dist/constants-CdfqNseZ.mjs +0 -2
  275. package/dist/cp-XOYR4ABJ-CQdiaiBl.mjs +0 -1
  276. package/dist/cut-OPC3VAGB-oTKBumd9.mjs +0 -1
  277. package/dist/date-DD7FVA2V-BrmKZaC_.mjs +0 -1
  278. package/dist/diff-HJF2MPDN-BNIGqrz6.mjs +0 -1
  279. package/dist/dirname-LEMTZZFS-BwH_Sy4c.mjs +0 -1
  280. package/dist/dist-B57jcfo9.mjs +0 -2584
  281. package/dist/dist-BGL0ZAep.mjs +0 -360
  282. package/dist/dist-CitXaW0V.mjs +0 -1
  283. package/dist/du-WO2ENHXQ-CaFJHtt9.mjs +0 -1
  284. package/dist/echo-O45JWWI2-BVUJjhWK.mjs +0 -1
  285. package/dist/env-5EPCWSXR-DH5CCl6V.mjs +0 -1
  286. package/dist/expand-DTNXU4LQ-eK5V8PVi.mjs +0 -1
  287. package/dist/expansion-ENLSRCXJ-DJReNXZq.mjs +0 -1
  288. package/dist/expr-5T3UU5KE-DTdq14FE.mjs +0 -1
  289. package/dist/file-ZIGAJ4YS-WHJtEeVR.mjs +0 -1
  290. package/dist/find-TPUOAIUQ-Dk362bwv.mjs +0 -1
  291. package/dist/flag-coverage-QT4N2Z44-C5s46vwi.mjs +0 -2
  292. package/dist/fold-LDSORVYE-CkRa6rpW.mjs +0 -1
  293. package/dist/grep-3AIAIJVR-9FFpNxXg.mjs +0 -1
  294. package/dist/gzip-AQXSGOVS-B69jDA3r.mjs +0 -1
  295. package/dist/head-HT2B6D2J-LVz3MZgn.mjs +0 -1
  296. package/dist/help-VVWX7SA5-NiesqNE9.mjs +0 -1
  297. package/dist/history-J4QRNGRO-CJ6sdqLF.mjs +0 -1
  298. package/dist/hostname-BK6HG2DE-BTiQGLXj.mjs +0 -1
  299. package/dist/html-to-markdown-TFCECAGV-gA9lIhli.mjs +0 -1
  300. package/dist/init-CYRb_5EB.mjs +0 -1
  301. package/dist/init-WxyC-q6H.mjs +0 -408
  302. package/dist/join-GG2LDHE5-DP2t9Lzd.mjs +0 -1
  303. package/dist/jq-ODXZBPLY-DIh5TTSi.mjs +0 -1
  304. package/dist/ln-4TRFBYAT-CcfWdebC.mjs +0 -1
  305. package/dist/loader-49cQC73v.mjs +0 -4
  306. package/dist/loader-CcNPgKn1.mjs +0 -1
  307. package/dist/ls-KSXFZCWH-Ck3u5K5M.mjs +0 -1
  308. package/dist/md5sum-INMIK4DX-B5BLDgGd.mjs +0 -1
  309. package/dist/mkdir-TDEMSB6C-BHFCS7vA.mjs +0 -1
  310. package/dist/mv-Z6MORUFL-CmLWSH1J.mjs +0 -1
  311. package/dist/nl-U5YJDM32-Cn7q_PFe.mjs +0 -1
  312. package/dist/od-VJEF2UR5-BMxC8c-2.mjs +0 -1
  313. package/dist/paste-7N6AFSDS-C9XyEur2.mjs +0 -1
  314. package/dist/preview-gwaAyRK2.mjs +0 -1
  315. package/dist/printf-CX64KX2P-Hzp-xme8.mjs +0 -1
  316. package/dist/public/assets/ActivityModeContent-CDvwQiJl.js +0 -2
  317. package/dist/public/assets/DocumentContext-DsG0dRJh.js +0 -41
  318. package/dist/public/assets/SettingsDialog-CzUxAbsW.js +0 -11
  319. package/dist/public/assets/SourceEditor-Bc46I85k.js +0 -2
  320. package/dist/public/assets/button-C1nwPVFQ.js +0 -1
  321. package/dist/public/assets/config-validation-events-kuYsS9Uy.js +0 -10
  322. package/dist/public/assets/dialog-CY2eQd6O.js +0 -45
  323. package/dist/public/assets/doc-hash-CaKfwYBW.js +0 -422
  324. package/dist/public/assets/index-DThsdx9L.js +0 -1853
  325. package/dist/public/assets/index-wYiupFbR.css +0 -1
  326. package/dist/public/assets/mcp-consent-store-DZ1pCmhN.js +0 -1
  327. package/dist/public/assets/toggle-group-zxAmL7AG.js +0 -1
  328. package/dist/public/assets/tooltip-DfmK7iDN.js +0 -1
  329. package/dist/pwd-D4OZ7N27-CxX1ETVW.mjs +0 -1
  330. package/dist/readlink-MI4GCHJF-DeD4E7nz.mjs +0 -1
  331. package/dist/rev-XOSYPP45-BnymxcnA.mjs +0 -1
  332. package/dist/rg-FOQSCCX3-BiJSKli9.mjs +0 -1
  333. package/dist/rm-RTZG23RL-Djvo3nEY.mjs +0 -1
  334. package/dist/rmdir-XTQXT7RK-OI_3n90A.mjs +0 -1
  335. package/dist/sed-VFTTATXJ-Tyu5G4I6.mjs +0 -1
  336. package/dist/seq-RN5ZUASB-CG-hfPIu.mjs +0 -1
  337. package/dist/sha1sum-VJPNLNU6-CEXqRxvP.mjs +0 -1
  338. package/dist/sha256sum-PI32XWXY-Bxzw_ykX.mjs +0 -1
  339. package/dist/sleep-VZFPZFWA-WRTGZhTn.mjs +0 -1
  340. package/dist/sort-DCNRDA7U-CuSJrCSQ.mjs +0 -1
  341. package/dist/split-SITCSYCZ-DqKN3r-A.mjs +0 -1
  342. package/dist/sqlite3-56UMWEY3-C6G8A9IC.mjs +0 -1
  343. package/dist/src-D8dkz5py.mjs +0 -2
  344. package/dist/start-C2EAqlEk.mjs +0 -1
  345. package/dist/start-GpGsUB8n.mjs +0 -3
  346. package/dist/stat-BT5A227F-D3-4IZjb.mjs +0 -1
  347. package/dist/strings-7PLOGTPD-DoJhZcXP.mjs +0 -1
  348. package/dist/tac-SJGXQ4T2-CGNEtOiG.mjs +0 -1
  349. package/dist/tail-S5ULNTJU-17nfIM0G.mjs +0 -1
  350. package/dist/tar-ANUBEFJY-C-eZUMPO.mjs +0 -1
  351. package/dist/tee-O7VXZDCO-D4C0E2s8.mjs +0 -1
  352. package/dist/time-DEUO3QV2-Wc9ZVUVu.mjs +0 -1
  353. package/dist/timeout-VRKMCG72-2MptSPRD.mjs +0 -1
  354. package/dist/touch-DX2IJOQ4-DOTz2-NU.mjs +0 -1
  355. package/dist/tr-2HXZRDSW-5aOBfN_I.mjs +0 -1
  356. package/dist/tree-LYXBS7DC-BVyeg_3R.mjs +0 -1
  357. package/dist/true-WHJNXCHG-QiTH9f1Z.mjs +0 -1
  358. package/dist/unexpand-RGTMIGZM-m3YwxdOg.mjs +0 -1
  359. package/dist/uniq-SUNANL47-CuhWyTTO.mjs +0 -1
  360. package/dist/wc-TQB3VNOX-CaEqXvYd.mjs +0 -1
  361. package/dist/which-XZHEH76L-DA_Bm_KM.mjs +0 -1
  362. package/dist/whoami-DGKU3D2X-Bdt58SNY.mjs +0 -1
  363. package/dist/xan-BXDXYEIB-CWBZ1rgf.mjs +0 -1
  364. package/dist/xan-view-ECQUO7AJ-eo_owVyX.mjs +0 -1
  365. package/dist/xargs-I6EZUCYF-VBH5v0oN.mjs +0 -1
  366. package/dist/yq-MJMAR36V-eZBfA9vJ.mjs +0 -1
@@ -6102,6 +6102,7 @@ The following MIT-licensed packages are patched in this repository via Bun's `pa
6102
6102
  | Package | Patch file |
6103
6103
  | --- | --- |
6104
6104
  | `@handlewithcare/remark-prosemirror@0.1.5` | `patches/@handlewithcare%2Fremark-prosemirror@0.1.5.patch` |
6105
+ | `@tiptap/extension-drag-handle@3.22.3` | `patches/@tiptap%2Fextension-drag-handle@3.22.3.patch` |
6105
6106
  | `@tiptap/y-tiptap@3.0.3` | `patches/@tiptap%2Fy-tiptap@3.0.3.patch` |
6106
6107
  | `react-medium-image-zoom@5.4.3` | `patches/react-medium-image-zoom@5.4.3.patch` |
6107
6108
  | `y-indexeddb@9.0.12` | `patches/y-indexeddb@9.0.12.patch` |
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{r as e,t}from"./chunk-VOBGTVA6-Bfa1NTzt.mjs";export{e as aliasCommand,t as unaliasCommand};
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: open-knowledge
3
- description: "MUST invoke when the project contains a .ok/ directory — before any read or edit of .md / .mdx files, any mcp__open-knowledge__ tool call, and any write_document / edit_document. Skip if no .ok/ — not an Open Knowledge project. Carries preview-attach (open preview browser at session start; one-shot on `action: attach-preview-once`), STOP rules for native Read/Grep/Edit on in-scope markdown, grounding rules (every factual claim needs a source), standard markdown linking with get_dead_links verification, image sourcing + alt-text + source-citation rules, folder-first organization with opt-in nested .ok/ frontmatter + templates, and the anti-pattern table. Authoritative — MCP server instructions and AGENTS.md overlap but do not substitute for the full attach rule, grounding rule, media rules, dead-link verification, and failure-mode guidance carried only here."
3
+ description: "MUST invoke when the project contains a .ok/ directory — before any read or edit of .md / .mdx files, any mcp__open-knowledge__ tool call, and any write_document / edit_document. Skip if no .ok/ — not an Open Knowledge project. Carries preview-attach (open preview browser at session start; one-shot on `action: attach-preview-once`), STOP rules for native Read/Grep/Edit on in-scope markdown, grounding rules (every factual claim needs a source), standard markdown linking with get_dead_links verification, image sourcing + alt-text + source-citation rules, folder-first organization with opt-in nested .ok/ frontmatter + templates, and the anti-pattern table."
4
4
  compatibility: "Claude Code, Claude Desktop, Claude Cowork, Claude.ai web. Requires Open Knowledge MCP server + code execution."
5
5
  metadata:
6
- version: "0.5.0-beta.3"
6
+ version: "0.5.0-beta.30"
7
7
  author: "Inkeep"
8
8
  repository: "https://github.com/inkeep/open-knowledge"
9
9
  ---
@@ -11,17 +11,28 @@ metadata:
11
11
 
12
12
  Open Knowledge (OK) is a markdown-CRDT collaboration platform exposed via MCP. This skill carries the behavioral rules agents need to use it fluently. Every section is a MUST unless marked otherwise.
13
13
 
14
- > Skill version: tracks `@inkeep/open-knowledge-server` package version. Check `cat ~/.ok/skill-state.yml` to see what's installed locally.
14
+ > **Authoritative source.** Where the MCP server's `instructions` echo overlaps with this skill, this skill wins — the full attach rule, grounding rule, media rules, dead-link verification, and failure-mode guidance live only here.
15
+
16
+ > Skill version: tracks `@inkeep/open-knowledge-server` package version. Check `cat ~/.ok/skill-state.yml` to see what's installed locally. **Version floor:** `ok seed` (referenced below) requires `@inkeep/open-knowledge` >= 0.4.0. If `ok seed` errors with `unknown command`, upgrade: `npm install -g @inkeep/open-knowledge`.
17
+
18
+ ## TL;DR — the 90% case
19
+
20
+ 1. **Reads:** `exec("cat …")` for a single doc, `exec("ls -A …")` for a directory, `search` for ranked, `grep` for literal. Native `Read` / `Grep` only on source code (`.ts` / `.py` / …), never on in-scope `.md` / `.mdx`.
21
+ 2. **Writes:** `write_document` for new or full-replace, `edit_document` for body-only patches. Frontmatter changes go through `write_document({ position: "replace" })` — `edit_document` rejects frontmatter edits with HTTP 400.
22
+ 3. **Preview:** open the browser at session start (or when a write response carries `warning: { action: "attach-preview-once" }`). Don't `preview_screenshot` after every edit.
23
+ 4. **Workflow tools** (`ingest` / `research` / `consolidate` / `discover`) return procedural guides, not data. Use them when the work fits the layer; follow their numbered steps.
24
+
25
+ Everything below is depth. Read on demand.
15
26
 
16
27
  ## STOP — native tools on in-scope `.md` / `.mdx`
17
28
 
18
29
  When this workspace has Open Knowledge MCP configured, do **not** use your host's native file tools on markdown paths inside the content directory. The ban covers every common rationalization:
19
30
 
20
31
  - **Native `Read` / `Grep` / `Glob` on in-scope `.md` / `.mdx`** — the original case.
21
- - **`Bash ls` / `Bash find` / `Bash cat` on dirs containing in-scope markdown** — use `exec("ls …")` / `exec("find … -name '*.md'")` / `exec("cat …")` instead. Native returns bare names; `exec` returns frontmatter, backlink counts, and recent activity per child.
32
+ - **`Bash ls` / `Bash find` / `Bash cat` on dirs containing in-scope markdown** — use `exec("ls -A …")` / `exec("find … -name '*.md'")` / `exec("cat …")` instead. Native returns bare names; `exec` returns frontmatter, backlink counts, and recent activity per child. `-A` shows hidden entries (`.ok/`, `.okignore`) which OK projects carry; omit `.` and `..` rows that `-a` would add.
22
33
  - **Glob patterns that target markdown** (`**/*.md`, any dir known to be markdown-heavy like `specs/**`, `reports/**`, `docs/**`) — use `exec` with `find`, or `list_documents({ dir })`.
23
34
  - **Dispatching the Explore / general-purpose subagent for markdown-heavy exploration** — subagents use native `Read` / `Grep` / `Glob` internally and bypass Open Knowledge entirely. Do markdown exploration yourself via `exec` / `search` / `grep`. Subagents remain appropriate for **source-code** exploration.
24
- - **Reading `.ok/AGENTS.md` via native `Read`** observed failure mode during M1 testing. The `.ok/` directory is in-scope; treat its contents the same as any other knowledge-base file.
35
+ - **Native `Read` / `Grep` on any in-scope markdown inside `.ok/`** the `.ok/` directory is in-scope; if it carries `.md` / `.mdx`, treat those the same as any other knowledge-base file.
25
36
 
26
37
  Why: native tools skip frontmatter, backlinks, shadow-repo activity, and project git history that OK's tools return for every matched knowledge-base file. `exec` is the primary read surface; it runs read-only bash (`cat`, `ls`, `grep`, `find`, `head`, `tail`, `wc`, `sort`, `uniq`, `cut` — pipes OK) and returns raw stdout plus enriched metadata per file.
27
38
 
@@ -34,7 +45,7 @@ Why: native tools skip frontmatter, backlinks, shadow-repo activity, and project
34
45
  ## Reads — examples
35
46
 
36
47
  - Read a file: `exec("cat <path>.md")` — contents + full rich enrichment
37
- - List a directory: `exec("ls <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir
48
+ - List a directory: `exec("ls -A <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir. Prefer `-A` over plain `ls`: OK projects carry dot-prefixed entries (`.ok/`, nested `.ok/`, `.okignore`) that plain `ls` omits. `-A` shows hidden entries without the noisy `.`/`..` rows that `-a` adds, and without the verbose long-format columns that `-la` adds (the per-child enrichment already carries the useful metadata `-l` would surface).
38
49
  - Search: `exec("grep -rn <term> <dir> | head -5")` — matches + enrichment on matched files
39
50
  - Typed tools (`read_document`, `search`, `grep`, `list_documents`) remain available — prefer them when a structured `structuredContent` shape is useful (e.g., passing results to another tool). For interactive reads, `exec` is lighter. **Pick the right search:** `search` for ranked retrieval (cmd-K parity — title boost + body BM25 + recency); `grep` for every literal-string occurrence grouped by file with frontmatter enrichment.
40
51
 
@@ -62,6 +73,38 @@ Call `write_document` / `edit_document` as soon as you have content. Native `Edi
62
73
 
63
74
  To delete a doc, call `delete_document` — never `rm` / `unlink` / native `Bash` removal on in-scope markdown. The MCP path closes open agent sessions and unloads the doc from Hocuspocus before unlinking; native `rm` desynchronizes those. Deletion is irreversible from this tool — call `save_version` first if you may need to roll back, and `get_backlinks` first if you want to fix the referrers that will become redlinks.
64
75
 
76
+ **If `edit_document` returns "Text not found" on text you can verify exists on disk** (via `exec("cat …")`), the MCP session is likely stale (e.g., after a folder rename or server restart). Treat this as the escape-hatch trigger from the STOP block: prefix your next user-visible sentence with `Open Knowledge MCP unavailable:` and report the inconsistency. Don't loop on retries — the symptom is structural, not transient.
77
+
78
+ ## Components — prefer canonicals when one fits
79
+
80
+ Some Open Knowledge projects ship a registry of custom JSX components (callouts, tabs, math, file attachments, …) that render with richer affordances than plain CommonMark / GFM. Discovery and authoring follow a three-step pattern — no separate listing call required:
81
+
82
+ 1. **Discover (point-of-authoring).** The JSON-schema `description` of `write_document` and `edit_document` carries an inline inventory of the canonical JSX components available for this project: a list of `{ id, displayName, description, kind }` entries. The agent's host renders that description in its tool-list view, so the catalog is visible at the moment of invoking either write tool. The `kind` is one of `jsx-block` (children-bearing JSX) or `jsx-void` (self-closing JSX).
83
+
84
+ 2. **Fetch full details.** Call `get_components({ ids: ["..."] })` with the ids you picked from the inventory. The response carries per-entry `example` (the literal source-form bytes to copy-paste) and a form-aware `params` schema (each prop's `type`, `values?` for enums, `required`, `defaultValue?`, `description`). Use whichever components are **semantically useful in any part of the doc** — a Callout for a warning, a Tabs/Tab pair for alternative content, etc.
85
+
86
+ 3. **Write.** Compose your markdown body inline using the `example` syntax + your chosen prop values, then call `write_document` or `edit_document` once. Generic placeholder shapes per `kind`:
87
+
88
+ ```mdx
89
+ <BlockComponent prop="value">
90
+ Body content here.
91
+ </BlockComponent>
92
+ ```
93
+
94
+ ```mdx
95
+ <VoidComponent prop="value" />
96
+ ```
97
+
98
+ **Fenced code blocks are a separate authoring path.** Open Knowledge renders certain fenced code blocks specially — author these the way you would in any markdown doc; they are NOT in the component inventory and don't need a `get_components` fetch:
99
+
100
+ - ` ```mermaid ` — renders the block as a Mermaid diagram (flowchart, sequence, class, state, ER, gantt, pie).
101
+ - ` ```html preview ` (also ` ```htm preview ` / ` ```xml preview `) — renders the block as a live iframe preview. Author a standalone HTML/JS/CSS page in the fence and it executes inside the editor. **Use this whenever you want anything interactive or JS-powered** (charts via Chart.js / D3, calculators, animations, demos of an idea, anything that needs live JavaScript). Optional fence-meta tokens: `h=<value>` and `w=<value>` set iframe size (e.g. ` ```html preview h=400px w=600px `).
102
+ - ` ```<lang> ` (any other language) — renders as a syntax-highlighted code block (no preview).
103
+
104
+ **No-canonical-fits fallback.** If none of the available canonical JSX components matches what you want to author, you can still write any `<TagName>...</TagName>` JSX — Open Knowledge renders unregistered components as raw MDX (the wildcard tolerance contract). Prefer canonicals when one matches; arbitrary JSX is the long-tail escape hatch.
105
+
106
+ **Don't enumerate first-party canonicals here.** Component names, counts, and instance-specific examples are project-specific — the source of truth is the inventory the write tools currently advertise. Reading SKILL.md never replaces calling `get_components` for current shape.
107
+
65
108
  ## Grounding — every factual claim needs a source (MUST)
66
109
 
67
110
  Knowledge-base docs are factual artifacts — whether the project is a wiki, an LLM brain, a spec collection, a research log, or anything else markdown-shaped. Every claim must be traceable, and **the source has to live inside the knowledge base**, not float on the public web.
@@ -88,7 +131,7 @@ Knowledge-base docs are factual artifacts — whether the project is a wiki, an
88
131
  - **Verify before walking away.** After writing a doc, call `get_dead_links({ sourceDocNames: ['your/doc'] })` to find broken references. Fix each redlink or explicitly accept it.
89
132
  - **The editor's red-underline visual lies.** Its dead-link detection tolerates slug-fallback (e.g., `foo` may appear resolved because `foo.md` exists at root). `get_dead_links` is strict-exact — trust the tool, not the visual.
90
133
 
91
- **Note on wiki-link syntax (`[[Page]]`):** the parser still handles it for legacy content, but it's NO LONGER the recommended default. Write new content with standard markdown links per above.
134
+ **Note on wiki-link syntax (`[[Page]]`):** the parser still handles it for legacy content, but it's NO LONGER the recommended default. Write new content with standard markdown links per above. Seed-pack templates (`ok seed --pack <name>`) may still emit `[[Page]]` placeholders inside template body text — those are legacy. When you instantiate a seed-pack template, replace the legacy placeholders with standard markdown links during the `{shape}`-fill pass.
92
135
 
93
136
  ## Media — images and attachments
94
137
 
@@ -105,7 +148,7 @@ Knowledge-base docs are factual artifacts — whether the project is a wiki, an
105
148
  1. Fetch it (`WebFetch` / `curl` / your host's equivalent) and save to a local path.
106
149
  2. Reference with a relative markdown image link.
107
150
  3. Cite the source in a caption (see §4 below).
108
- - **Conventional location:** `assets/images/<topic>/<filename>` under the content root. If the project already has a different convention, follow it — check via `exec("ls assets/")` or `exec("find . -type d -name images")` first.
151
+ - **Conventional location:** `assets/images/<topic>/<filename>` under the content root. If the project already has a different convention, follow it — check via `exec("ls -A assets/")` or `exec("find . -type d -name images")` first.
109
152
  - If you cannot fetch (no network, paywalled source, etc.): DON'T invent a local path. Either omit the image or mark inline `(TODO: image needs sourcing from <URL>)` for a human.
110
153
 
111
154
  ### 3. Alt-text discipline
@@ -143,12 +186,16 @@ tags:
143
186
 
144
187
  Folder-level defaults that any new doc here inherits live in opt-in nested `<folder>/.ok/frontmatter.yml` and merge at read time — see *Folder structure + metadata* below.
145
188
 
189
+ **Editing frontmatter.** `edit_document` does NOT change frontmatter — it's body-only by design; frontmatter-intersecting find/replace calls return HTTP 400. To change `title` / `description` / `tags`, call `write_document({ docName, position: "replace", markdown })` and include the new YAML block at the top of `markdown`. Folder defaults from the nested `.ok/frontmatter.yml` cascade still merge at read time, so you only need to declare keys that differ from the cascade. (Future server work may add a single-key frontmatter-patch tool with JSON Merge Patch semantics; until that lands, `write_document(replace)` is the canonical pathway.)
190
+
146
191
  ## Follow project conventions — read folder defaults before writing (MUST)
147
192
 
148
- Before creating or editing docs in a folder, **always** call `list_documents(<folder>)` (or `exec("ls <folder>")`) once and act on what it returns. Skipping this step is how agents land docs that violate the folder's discipline (wrong tags, no template, missing frontmatter shape) and force a follow-up cleanup pass.
193
+ Before creating or editing docs in a folder, **always** call `list_documents(<folder>)` (or `exec("ls -A <folder>")`) once and act on what it returns. Skipping this step is how agents land docs that violate the folder's discipline (wrong tags, no template, missing frontmatter shape) and force a follow-up cleanup pass.
149
194
 
150
195
  Pre-write checklist:
151
196
 
197
+ 0. **First-contact check.** If `list_documents(<folder>)` returns empty `frontmatter_defaults` AND empty `templates_available` AND `exec("ls -A")` shows substantial content elsewhere, the project hasn't been onboarded — STOP and invoke `discover` (see Workflow tools table) before writing. Skip this check on subsequent writes in the same session once you've confirmed the project is configured.
198
+
152
199
  1. **Read `frontmatter_defaults`** — the merged folder defaults (title shape, description, tags) that any new doc here will inherit. Surfaces nested `<folder>/.ok/frontmatter.yml` cascade walked root → leaf, leaf wins per-key. **Don't redeclare** keys the cascade already provides — let inheritance carry them. Override per-file only when the file truly differs.
153
200
  2. **Read `templates_available`** — the menu of starter shapes for `write_document({ template })`. Each entry has `name`, `title`, `description`, and `scope` (`local` / `inherited` / `user`). If an entry matches, prefer it over free-form markdown — see "When to use a template" and "When to create a template" below.
154
201
  3. **Read recent siblings** — `list_documents` enrichment shows recent edits and per-child frontmatter. New docs should match the shape of existing ones (filename pattern, frontmatter keys, body structure). Inconsistency is the enemy.
@@ -172,6 +219,7 @@ Skip the template only when (a) `templates_available` is empty, (b) no entry mat
172
219
 
173
220
  Templates are how a folder's structure becomes durable. Create them proactively, not just when asked:
174
221
 
222
+ - **You're onboarding an existing repo with 2+ siblings in a folder and no template yet.** Don't extract one folder at a time — invoke `discover` (Workflow tools table) for the multi-folder sweep. The bullets below apply during normal session work; `discover` is the bulk path.
175
223
  - **You're about to write a doc in a folder where no template fits, AND the shape you're about to use is reusable.** Save it as a template the same turn (`write_template` with the body you'd have hand-authored), then instantiate via `template:`. The first doc carries the same body either way; the difference is whether the next agent gets a menu entry or re-derives it from a sibling.
176
224
  - **You spot a sibling pattern in a folder that has no template.** Two or more docs sharing the same body skeleton (heading order, required sections, frontmatter shape) is enough — extract the skeleton via `write_template` so subsequent docs pick from `templates_available` instead of copying a sibling.
177
225
  - **You're scaffolding a new folder for a doc category.** Pair the folder rule (`set_folder_rule` for tags/title shape) with a template (`write_template` for body structure) in the same turn. Don't ship a folder-with-discipline-but-no-template — it leaves the next agent to invent the body each time.
@@ -185,6 +233,8 @@ If you find yourself writing the **same** frontmatter (tags, title prefix, descr
185
233
 
186
234
  Repetition is the smell; folder rules and templates are the fix. Don't accumulate ad-hoc per-file frontmatter when one folder rule would carry it.
187
235
 
236
+ **Bulk onboarding.** If most folders already have siblings but no frontmatter, invoke `discover` (Workflow tools table) for the multi-folder sweep instead of per-folder hand-application.
237
+
188
238
  ## Folder structure + metadata — nested `<folder>/.ok/`
189
239
 
190
240
  Folder defaults and templates live in opt-in nested `.ok/` directories — sparse, lazy-create, auto-clean. **Most folders have NO `.ok/`**. A folder gets one only when it declares its own frontmatter defaults or carries templates.
@@ -270,7 +320,7 @@ write_document({
270
320
  // calls — those are author-fill markers, not server-side substitutions.
271
321
  ```
272
322
 
273
- Templates resolve via leaf → root walk-up at the target's parent folder, with closest-wins on filename collision (D7). The `scope` field has three values: `"local"` (template lives in this folder's `.ok/templates/`), `"inherited"` (template lives in an ancestor's), and `"user"` (template lives in `~/.ok/templates/`, surfaced when the request was served from the user-global cascade) all three are first-class menu entries. Descendant templates do NOT appear in the parent's array — they surface only inside `subfolders[].templates_available` when `list_documents` is called with `depth > 1`.
323
+ Templates resolve via leaf → root walk-up at the target's parent folder, with closest-wins on filename collision (D7). The `scope` field has three values: `"local"` (template lives in this folder's `.ok/templates/`), `"inherited"` (template lives in an ancestor's), and `"user"` (template lives in `~/.ok/templates/`, surfaced when the request was served from the user-global cascade). Treat `local` and `inherited` as first-class for the current folder; **skip `user`-scope entries whose `title` / `description` clearly don't match the folder's purpose** (e.g. a `daily-journal` user template won't help in `wiki/`). User-global templates surface in every folder by design — there's no per-folder opt-out today. Descendant templates do NOT appear in the parent's array — they surface only inside `subfolders[].templates_available` when `list_documents` is called with `depth > 1`.
274
324
 
275
325
  **`template` and `markdown` are mutually exclusive** (D21). Passing both errors with `TEMPLATE_AND_MARKDOWN_BOTH_SET`. The template body becomes the new doc's body verbatim (after `{{date}}`/`{{user}}` substitution); fill `{shape}`-style placeholders via subsequent `edit_document` calls.
276
326
 
@@ -280,7 +330,7 @@ When you make a multi-step change (batch of new docs, folder restructure), pause
280
330
 
281
331
  This is primarily a human-watchability concern — the user watches edits land in the preview; interleaved cadence makes the narrative legible.
282
332
 
283
- **Hub docs.** Don't *create* `INDEX.md` / `README.md` hub files solely to catalog children — `exec("ls <folder>")` returns the same view live, with per-file frontmatter + backlink counts. But if a hub doc *already exists* from prior work, keep it updated as children change — interleave: write child → update hub → write next child, rather than batching five child edits and a single trailing hub update.
333
+ **Hub docs.** Don't *create* `INDEX.md` / `README.md` hub files solely to catalog children — `exec("ls -A <folder>")` returns the same view live, with per-file frontmatter + backlink counts. But if a hub doc *already exists* from prior work, keep it updated as children change — interleave: write child → update hub → write next child, rather than batching five child edits and a single trailing hub update.
284
334
 
285
335
  ## Log discipline — check for a project log when KB content changes
286
336
 
@@ -292,7 +342,7 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
292
342
 
293
343
  | Task | Don't | Do |
294
344
  | ----------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
295
- | List a markdown-heavy dir | `Bash: ls specs/` | `exec("ls specs/")` |
345
+ | List a markdown-heavy dir | `Bash: ls specs/` | `exec("ls -A specs/")` |
296
346
  | Find all SPEC.md files | `Glob: **/SPEC.md` | `exec("find specs -name SPEC.md")` |
297
347
  | Find the most relevant page for a query | `Grep: "pattern" *.md` then read three files | `search({ query: "pattern" })` (ranked: title + body BM25 + recency) |
298
348
  | Find every literal occurrence of a phrase | `Grep: "pattern" *.md` | `grep({ query: "pattern" })` (literal, grouped by file, with frontmatter) |
@@ -308,7 +358,9 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
308
358
  | Add an image | empty alt `![](./x.png)` or generic alt `![image](./x)` | meaningful alt + source caption below |
309
359
  | Catalog folder contents | create `INDEX.md` hub file | `set_folder_rule({ rules: [{ match, frontmatter }] })` writes `<folder>/.ok/frontmatter.yml` |
310
360
  | Write a doc in an unfamiliar folder | go straight to `write_document` with hand-authored markdown | `list_documents(<folder>)` first — read `frontmatter_defaults` + `templates_available` before writing |
361
+ | Land in an existing repo without orienting | go straight to `write_document` or run the per-folder pre-write checklist ad-hoc when no folder frontmatter / templates exist | invoke `discover` once for the project — it extracts conventions from siblings, sets folder frontmatter, writes templates, and activates the link graph |
311
362
  | Author a doc when a matching template exists | `write_document({ markdown: "..." })` from scratch | `write_document({ template, position: "replace" })` — templates carry the folder's frontmatter + body discipline |
363
+ | Change a doc's title / tags | `edit_document` to swap the YAML (rejected — HTTP 400 frontmatter-intersect) | `write_document({ position: "replace", markdown })` with the new frontmatter block at the top of `markdown` |
312
364
  | Repeat the same frontmatter on sibling docs | hand-set identical `tags` / `title` prefix on every new file | `set_folder_rule(...)` once — the cascade carries it to every child |
313
365
  | Re-derive the same body skeleton repeatedly | copy-paste the structure from a sibling each time | `write_template(...)` once, then pick from `templates_available` thereafter |
314
366
  | Scaffold a new folder for a doc category | `set_folder_rule` for frontmatter and stop there | pair `set_folder_rule` with `write_template` in the same turn — discipline + body shape |
@@ -318,23 +370,28 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
318
370
 
319
371
  ## Workflow tools — when to invoke them
320
372
 
321
- Three MCP tools build on the primitives above and correspond to [Karpathy's three-layer knowledge-base pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f):
373
+ Four MCP tools build on the primitives above. **They return *procedural guidance* (a multi-step instructional body), not fetched data.** Calling `ingest("https://…")` does not download and write a doc for you — it returns a multi-step plan you then execute. Same for `research` / `consolidate` / `discover`. Plan to follow the numbered steps in order; don't skip the STOP gates.
374
+
375
+ Three correspond to [Karpathy's three-layer knowledge-base pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) (`ingest` / `research` / `consolidate`); the fourth (`discover`) operates at the project-metadata layer and is the brownfield counterpart to the greenfield `ok seed` CLI:
322
376
 
323
377
  | Tool | Layer | When to invoke |
324
378
  | ------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
325
379
  | `ingest` | Raw sources (immutable) | User shares a URL/PDF/file to preserve verbatim, **OR you fetched a URL** (`WebFetch` / `WebSearch` / equivalent) to ground a claim that's about to land in the knowledge base. The KB is closed-loop — agent-initiated fetches are not exempt. No analysis in the file itself — takeaways go back to the user in chat. |
326
380
  | `research` | KB, provisional | User asks you to investigate, compare alternatives, or synthesize multiple sources. Produces a `status: provisional` article with a `sources:` list. Follows scan-first routing, a STOP scoping gate, 3P-external framing, and a validate checklist — the tool body enforces each step. |
327
381
  | `consolidate` | KB, canonical | Team has actually decided after research and wants the outcome committed as source-of-truth. Starts with a STOP gate confirming the decision exists; writes a `status: canonical` article with a `supersedes:` chain. |
328
-
329
- Each tool returns a multi-step instructional body when invoked. The bodies enforce their own gates — follow the numbered steps in order, don't skip the STOP gates.
382
+ | `discover` | Project metadata | First arrival at a repo with existing content AND no folder frontmatter / templates set. Extracts conventions from siblings; activates the link graph (orphans, hubs, untextualized mentions); proposes folder frontmatter + templates + `.okignore`; per-phase user confirmation. Requires `open-knowledge start` running (Phase 1 step 0 gates). Skip on empty repos (use `ok seed`). One-shot; idempotent on re-run. |
330
383
 
331
384
  **These tools are your default move, not `write_document`.** When the work fits one of the three layers — preserving an external source, investigating/synthesizing, committing a decided outcome — invoke the corresponding tool instead of going straight to `write_document` / `edit_document`. The tool bodies enforce framing (sources, status, supersedes chains) that hand-written articles routinely miss. `write_document` is correct for everything that does **not** fit the three layers (specs, runbooks, scratch notes, project pages); for the three that do, lead with the tool. This is doubly true in projects that ran `ok seed` — a doc landing in `external-sources/` / `research/` / `articles/` should have come out of `ingest` / `research` / `consolidate`.
332
385
 
333
386
  Typical day-2 flow: user shares a URL → `ingest` (preserve) → user asks "now research this" → `research` (provisional article + `ingest`s more sources as needed) → decision lands → `consolidate` (canonical article, supersedes the research).
334
387
 
388
+ **Autonomy gates vs session-level autonomy.** Per-tool STOP gates (e.g. `research`'s scoping gate, `consolidate`'s decision-confirmation gate) are not overridden by session-level "work without stopping for clarifying questions" hints. The session-level hint covers trivial back-and-forth ("which file did you mean?"); per-tool gates exist for 1-way-door decisions where the tool deliberately wants confirmation before continuing. When in doubt, treat the per-tool gate as authoritative and the session-level autonomy hint as a default for the in-between turns.
389
+
335
390
  **Do not chain silently.** After `ingest`, ask the user whether to proceed to `research`. After `research`, let the user decide whether the findings are ready to `consolidate`. Each tool completes on its own terms — the user drives the transitions.
336
391
 
337
- **Project scaffolding is a CLI operation (optional).** Users who want the Karpathy three-layer layout as their folder structure can run `ok seed` once from a terminal. That command scaffolds `external-sources/` + `research/` + `articles/`, seeds an append-only `log.md` at the project root, and registers per-layer folder defaults so agents see layer descriptions at every `list_documents(<folder>)` / `exec("ls <folder>")` call. It is **not required**: the three workflow tools above work against any folder structure the project already uses (`specs/`, `docs/`, `reports/`, or anything else). Only mention `ok seed` if the user explicitly asks for a starter layout or wants the Karpathy pattern specifically.
392
+ **Repeat invocations.** Workflow tools return their full instructional body on every call, including 2nd / 3rd / Nth invocation in the same session. If you've already received a tool's body earlier this session, you can skim the repeat for changes (the body can evolve across server versions) but you don't need to re-internalize it proceed to the next step with the new arguments.
393
+
394
+ **Project scaffolding — two paths.** **Empty repo:** run `ok seed` once from a terminal (scaffolds Karpathy three-layer + seeds `log.md` + registers folder defaults). **Existing content:** invoke `discover` (MCP tool, table above — extracts conventions from siblings, sets folder frontmatter + templates, curates `.okignore`, activates link graph; per-phase confirmation gates). Neither is required; the four workflow tools work against any folder structure. Only mention each when explicitly relevant.
338
395
 
339
396
  ## Server lifecycle
340
397
 
@@ -345,3 +402,5 @@ If `write_document` or `edit_document` returns a "Hocuspocus server is not runni
345
402
  When MCP is connected, the server's `instructions` echo the **resolved** `content.dir` for this session — that's where Open Knowledge looks for documents. `.gitignore` and `.okignore` (at the project root and at any folder depth) define exclusions. Folder defaults + templates live in nested `<folder>/.ok/frontmatter.yml` + `<folder>/.ok/templates/` files — NOT in `.ok/config.yml`.
346
403
 
347
404
  Default mental model (no jargon): **every `.md` and `.mdx` under `content.dir`** not excluded by `.gitignore` or `.okignore` is an Open Knowledge document — including under `specs/`, `reports/`, `docs/`, etc. Read `.okignore` (and any nested `.okignore` files) once per turn to know what's excluded.
405
+
406
+ **First session in this project?** If `frontmatter_defaults` and `templates_available` are empty for substantial folders, the project hasn't been onboarded yet — invoke `discover` (Workflow tools table) before writing. Once onboarded, the cascade carries the discipline.
@@ -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{n as e}from"./chunk-OARHFVLG-Cr0x3Si_.mjs";export{e as awkCommand2};
@@ -1,3 +1,3 @@
1
- import{a as e,i as t,n,t as r}from"./colors-BtKMHmBX.mjs";const i={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}.round;function a(a){let o=[],s=`${a.name} v${a.version}`;o.push({plain:s,colored:r(s)}),o.push({plain:``,colored:``});let c=a.apiUrl?`Editor: `:`Local: `;if(o.push({plain:`${c}${a.localUrl}`,colored:`${c}${e(t(a.localUrl),a.localUrl)}`}),a.apiUrl){let t=`API: `;o.push({plain:`${t}${a.apiUrl}`,colored:`${t}${n(e(a.apiUrl,a.apiUrl))}`})}if(a.networkUrl){let n=`Network: `;o.push({plain:`${n}${a.networkUrl}`,colored:`${n}${e(t(a.networkUrl),a.networkUrl)}`})}o.push({plain:``,colored:``});let l=`Press Ctrl+C to stop`;o.push({plain:l,colored:n(l)});let u=Math.max(...o.map(e=>e.plain.length)),d=u+4,f=` ${i.topLeft}${i.top.repeat(d)}${i.topRight}`,p=` ${i.bottomLeft}${i.bottom.repeat(d)}${i.bottomRight}`;return[``,f,...o.map(e=>{let t=u-e.plain.length;return` ${i.left}${` `.repeat(2)}${e.colored}${` `.repeat(t+2)}${i.right}`}),p,``].join(`
1
+ import{a as e,i as t,n,t as r}from"./colors-BNufdynn.mjs";const i={single:{topLeft:`┌`,top:`─`,topRight:`┐`,right:`│`,bottomRight:`┘`,bottom:`─`,bottomLeft:`└`,left:`│`},double:{topLeft:`╔`,top:`═`,topRight:`╗`,right:`║`,bottomRight:`╝`,bottom:`═`,bottomLeft:`╚`,left:`║`},round:{topLeft:`╭`,top:`─`,topRight:`╮`,right:`│`,bottomRight:`╯`,bottom:`─`,bottomLeft:`╰`,left:`│`},bold:{topLeft:`┏`,top:`━`,topRight:`┓`,right:`┃`,bottomRight:`┛`,bottom:`━`,bottomLeft:`┗`,left:`┃`},singleDouble:{topLeft:`╓`,top:`─`,topRight:`╖`,right:`║`,bottomRight:`╜`,bottom:`─`,bottomLeft:`╙`,left:`║`},doubleSingle:{topLeft:`╒`,top:`═`,topRight:`╕`,right:`│`,bottomRight:`╛`,bottom:`═`,bottomLeft:`╘`,left:`│`},classic:{topLeft:`+`,top:`-`,topRight:`+`,right:`|`,bottomRight:`+`,bottom:`-`,bottomLeft:`+`,left:`|`},arrow:{topLeft:`↘`,top:`↓`,topRight:`↙`,right:`←`,bottomRight:`↖`,bottom:`↑`,bottomLeft:`↗`,left:`→`}}.round;function a(a){let o=[],s=`${a.name} v${a.version}`;o.push({plain:s,colored:r(s)}),o.push({plain:``,colored:``});let c=a.apiUrl?`Editor: `:`Local: `;if(o.push({plain:`${c}${a.localUrl}`,colored:`${c}${e(t(a.localUrl),a.localUrl)}`}),a.apiUrl){let t=`API: `;o.push({plain:`${t}${a.apiUrl}`,colored:`${t}${n(e(a.apiUrl,a.apiUrl))}`})}if(a.networkUrl){let n=`Network: `;o.push({plain:`${n}${a.networkUrl}`,colored:`${n}${e(t(a.networkUrl),a.networkUrl)}`})}o.push({plain:``,colored:``});let l=`Press Ctrl+C to stop`;o.push({plain:l,colored:n(l)});let u=Math.max(...o.map(e=>e.plain.length)),d=u+4,f=` ${i.topLeft}${i.top.repeat(d)}${i.topRight}`,p=` ${i.bottomLeft}${i.bottom.repeat(d)}${i.bottomRight}`;return[``,f,...o.map(e=>{let t=u-e.plain.length;return` ${i.left}${` `.repeat(2)}${e.colored}${` `.repeat(t+2)}${i.right}`}),p,``].join(`
2
2
  `)}export{a as renderBanner};
3
- //# sourceMappingURL=banner-8cQrR88n.mjs.map
3
+ //# sourceMappingURL=banner-KC_FjiUK.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-QJ7O6ZN3-F0_rcDPM.mjs";export{e as base64Command};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-ALLTKNUZ-Cu6JFoC4.mjs";export{e as basenameCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{i as e,t}from"./chunk-D6CWQ5DW-7lvT8dGP.mjs";export{e as bashCommand,t as shCommand};
@@ -0,0 +1 @@
1
+ import{t as e}from"./build-BZeImWox.mjs";export{e as default};
@@ -1,2 +1,2 @@
1
1
  import{join as e,normalize as t,resolve as n,sep as r}from"node:path";import*as i from"node:fs";import{readdirSync as a,statSync as o}from"fs";import{join as s,resolve as c}from"path";import*as l from"node:querystring";const u={"3g2":`video/3gpp2`,"3gp":`video/3gpp`,"3gpp":`video/3gpp`,"3mf":`model/3mf`,aac:`audio/aac`,ac:`application/pkix-attr-cert`,adp:`audio/adpcm`,adts:`audio/aac`,ai:`application/postscript`,aml:`application/automationml-aml+xml`,amlx:`application/automationml-amlx+zip`,amr:`audio/amr`,apng:`image/apng`,appcache:`text/cache-manifest`,appinstaller:`application/appinstaller`,appx:`application/appx`,appxbundle:`application/appxbundle`,asc:`application/pgp-keys`,atom:`application/atom+xml`,atomcat:`application/atomcat+xml`,atomdeleted:`application/atomdeleted+xml`,atomsvc:`application/atomsvc+xml`,au:`audio/basic`,avci:`image/avci`,avcs:`image/avcs`,avif:`image/avif`,aw:`application/applixware`,bdoc:`application/bdoc`,bin:`application/octet-stream`,bmp:`image/bmp`,bpk:`application/octet-stream`,btf:`image/prs.btif`,btif:`image/prs.btif`,buffer:`application/octet-stream`,ccxml:`application/ccxml+xml`,cdfx:`application/cdfx+xml`,cdmia:`application/cdmi-capability`,cdmic:`application/cdmi-container`,cdmid:`application/cdmi-domain`,cdmio:`application/cdmi-object`,cdmiq:`application/cdmi-queue`,cer:`application/pkix-cert`,cgm:`image/cgm`,cjs:`application/node`,class:`application/java-vm`,coffee:`text/coffeescript`,conf:`text/plain`,cpl:`application/cpl+xml`,cpt:`application/mac-compactpro`,crl:`application/pkix-crl`,css:`text/css`,csv:`text/csv`,cu:`application/cu-seeme`,cwl:`application/cwl`,cww:`application/prs.cww`,davmount:`application/davmount+xml`,dbk:`application/docbook+xml`,deb:`application/octet-stream`,def:`text/plain`,deploy:`application/octet-stream`,dib:`image/bmp`,"disposition-notification":`message/disposition-notification`,dist:`application/octet-stream`,distz:`application/octet-stream`,dll:`application/octet-stream`,dmg:`application/octet-stream`,dms:`application/octet-stream`,doc:`application/msword`,dot:`application/msword`,dpx:`image/dpx`,drle:`image/dicom-rle`,dsc:`text/prs.lines.tag`,dssc:`application/dssc+der`,dtd:`application/xml-dtd`,dump:`application/octet-stream`,dwd:`application/atsc-dwd+xml`,ear:`application/java-archive`,ecma:`application/ecmascript`,elc:`application/octet-stream`,emf:`image/emf`,eml:`message/rfc822`,emma:`application/emma+xml`,emotionml:`application/emotionml+xml`,eps:`application/postscript`,epub:`application/epub+zip`,exe:`application/octet-stream`,exi:`application/exi`,exp:`application/express`,exr:`image/aces`,ez:`application/andrew-inset`,fdf:`application/fdf`,fdt:`application/fdt+xml`,fits:`image/fits`,g3:`image/g3fax`,gbr:`application/rpki-ghostbusters`,geojson:`application/geo+json`,gif:`image/gif`,glb:`model/gltf-binary`,gltf:`model/gltf+json`,gml:`application/gml+xml`,gpx:`application/gpx+xml`,gram:`application/srgs`,grxml:`application/srgs+xml`,gxf:`application/gxf`,gz:`application/gzip`,h261:`video/h261`,h263:`video/h263`,h264:`video/h264`,heic:`image/heic`,heics:`image/heic-sequence`,heif:`image/heif`,heifs:`image/heif-sequence`,hej2:`image/hej2k`,held:`application/atsc-held+xml`,hjson:`application/hjson`,hlp:`application/winhlp`,hqx:`application/mac-binhex40`,hsj2:`image/hsj2`,htm:`text/html`,html:`text/html`,ics:`text/calendar`,ief:`image/ief`,ifb:`text/calendar`,iges:`model/iges`,igs:`model/iges`,img:`application/octet-stream`,in:`text/plain`,ini:`text/plain`,ink:`application/inkml+xml`,inkml:`application/inkml+xml`,ipfix:`application/ipfix`,iso:`application/octet-stream`,its:`application/its+xml`,jade:`text/jade`,jar:`application/java-archive`,jhc:`image/jphc`,jls:`image/jls`,jp2:`image/jp2`,jpe:`image/jpeg`,jpeg:`image/jpeg`,jpf:`image/jpx`,jpg:`image/jpeg`,jpg2:`image/jp2`,jpgm:`image/jpm`,jpgv:`video/jpeg`,jph:`image/jph`,jpm:`image/jpm`,jpx:`image/jpx`,js:`text/javascript`,json:`application/json`,json5:`application/json5`,jsonld:`application/ld+json`,jsonml:`application/jsonml+json`,jsx:`text/jsx`,jt:`model/jt`,jxl:`image/jxl`,jxr:`image/jxr`,jxra:`image/jxra`,jxrs:`image/jxrs`,jxs:`image/jxs`,jxsc:`image/jxsc`,jxsi:`image/jxsi`,jxss:`image/jxss`,kar:`audio/midi`,ktx:`image/ktx`,ktx2:`image/ktx2`,less:`text/less`,lgr:`application/lgr+xml`,list:`text/plain`,litcoffee:`text/coffeescript`,log:`text/plain`,lostxml:`application/lost+xml`,lrf:`application/octet-stream`,m1v:`video/mpeg`,m21:`application/mp21`,m2a:`audio/mpeg`,m2t:`video/mp2t`,m2ts:`video/mp2t`,m2v:`video/mpeg`,m3a:`audio/mpeg`,m4a:`audio/mp4`,m4p:`application/mp4`,m4s:`video/iso.segment`,ma:`application/mathematica`,mads:`application/mads+xml`,maei:`application/mmt-aei+xml`,man:`text/troff`,manifest:`text/cache-manifest`,map:`application/json`,mar:`application/octet-stream`,markdown:`text/markdown`,mathml:`application/mathml+xml`,mb:`application/mathematica`,mbox:`application/mbox`,md:`text/markdown`,mdx:`text/mdx`,me:`text/troff`,mesh:`model/mesh`,meta4:`application/metalink4+xml`,metalink:`application/metalink+xml`,mets:`application/mets+xml`,mft:`application/rpki-manifest`,mid:`audio/midi`,midi:`audio/midi`,mime:`message/rfc822`,mj2:`video/mj2`,mjp2:`video/mj2`,mjs:`text/javascript`,mml:`text/mathml`,mods:`application/mods+xml`,mov:`video/quicktime`,mp2:`audio/mpeg`,mp21:`application/mp21`,mp2a:`audio/mpeg`,mp3:`audio/mpeg`,mp4:`video/mp4`,mp4a:`audio/mp4`,mp4s:`application/mp4`,mp4v:`video/mp4`,mpd:`application/dash+xml`,mpe:`video/mpeg`,mpeg:`video/mpeg`,mpf:`application/media-policy-dataset+xml`,mpg:`video/mpeg`,mpg4:`video/mp4`,mpga:`audio/mpeg`,mpp:`application/dash-patch+xml`,mrc:`application/marc`,mrcx:`application/marcxml+xml`,ms:`text/troff`,mscml:`application/mediaservercontrol+xml`,msh:`model/mesh`,msi:`application/octet-stream`,msix:`application/msix`,msixbundle:`application/msixbundle`,msm:`application/octet-stream`,msp:`application/octet-stream`,mtl:`model/mtl`,mts:`video/mp2t`,musd:`application/mmt-usd+xml`,mxf:`application/mxf`,mxmf:`audio/mobile-xmf`,mxml:`application/xv+xml`,n3:`text/n3`,nb:`application/mathematica`,nq:`application/n-quads`,nt:`application/n-triples`,obj:`model/obj`,oda:`application/oda`,oga:`audio/ogg`,ogg:`audio/ogg`,ogv:`video/ogg`,ogx:`application/ogg`,omdoc:`application/omdoc+xml`,onepkg:`application/onenote`,onetmp:`application/onenote`,onetoc:`application/onenote`,onetoc2:`application/onenote`,opf:`application/oebps-package+xml`,opus:`audio/ogg`,otf:`font/otf`,owl:`application/rdf+xml`,oxps:`application/oxps`,p10:`application/pkcs10`,p7c:`application/pkcs7-mime`,p7m:`application/pkcs7-mime`,p7s:`application/pkcs7-signature`,p8:`application/pkcs8`,pdf:`application/pdf`,pfr:`application/font-tdpfr`,pgp:`application/pgp-encrypted`,pkg:`application/octet-stream`,pki:`application/pkixcmp`,pkipath:`application/pkix-pkipath`,pls:`application/pls+xml`,png:`image/png`,prc:`model/prc`,prf:`application/pics-rules`,provx:`application/provenance+xml`,ps:`application/postscript`,pskcxml:`application/pskc+xml`,pti:`image/prs.pti`,qt:`video/quicktime`,raml:`application/raml+yaml`,rapd:`application/route-apd+xml`,rdf:`application/rdf+xml`,relo:`application/p2p-overlay+xml`,rif:`application/reginfo+xml`,rl:`application/resource-lists+xml`,rld:`application/resource-lists-diff+xml`,rmi:`audio/midi`,rnc:`application/relax-ng-compact-syntax`,rng:`application/xml`,roa:`application/rpki-roa`,roff:`text/troff`,rq:`application/sparql-query`,rs:`application/rls-services+xml`,rsat:`application/atsc-rsat+xml`,rsd:`application/rsd+xml`,rsheet:`application/urc-ressheet+xml`,rss:`application/rss+xml`,rtf:`text/rtf`,rtx:`text/richtext`,rusd:`application/route-usd+xml`,s3m:`audio/s3m`,sbml:`application/sbml+xml`,scq:`application/scvp-cv-request`,scs:`application/scvp-cv-response`,sdp:`application/sdp`,senmlx:`application/senml+xml`,sensmlx:`application/sensml+xml`,ser:`application/java-serialized-object`,setpay:`application/set-payment-initiation`,setreg:`application/set-registration-initiation`,sgi:`image/sgi`,sgm:`text/sgml`,sgml:`text/sgml`,shex:`text/shex`,shf:`application/shf+xml`,shtml:`text/html`,sieve:`application/sieve`,sig:`application/pgp-signature`,sil:`audio/silk`,silo:`model/mesh`,siv:`application/sieve`,slim:`text/slim`,slm:`text/slim`,sls:`application/route-s-tsid+xml`,smi:`application/smil+xml`,smil:`application/smil+xml`,snd:`audio/basic`,so:`application/octet-stream`,spdx:`text/spdx`,spp:`application/scvp-vp-response`,spq:`application/scvp-vp-request`,spx:`audio/ogg`,sql:`application/sql`,sru:`application/sru+xml`,srx:`application/sparql-results+xml`,ssdl:`application/ssdl+xml`,ssml:`application/ssml+xml`,stk:`application/hyperstudio`,stl:`model/stl`,stpx:`model/step+xml`,stpxz:`model/step-xml+zip`,stpz:`model/step+zip`,styl:`text/stylus`,stylus:`text/stylus`,svg:`image/svg+xml`,svgz:`image/svg+xml`,swidtag:`application/swid+xml`,t:`text/troff`,t38:`image/t38`,td:`application/urc-targetdesc+xml`,tei:`application/tei+xml`,teicorpus:`application/tei+xml`,text:`text/plain`,tfi:`application/thraud+xml`,tfx:`image/tiff-fx`,tif:`image/tiff`,tiff:`image/tiff`,toml:`application/toml`,tr:`text/troff`,trig:`application/trig`,ts:`video/mp2t`,tsd:`application/timestamped-data`,tsv:`text/tab-separated-values`,ttc:`font/collection`,ttf:`font/ttf`,ttl:`text/turtle`,ttml:`application/ttml+xml`,txt:`text/plain`,u3d:`model/u3d`,u8dsn:`message/global-delivery-status`,u8hdr:`message/global-headers`,u8mdn:`message/global-disposition-notification`,u8msg:`message/global`,ubj:`application/ubjson`,uri:`text/uri-list`,uris:`text/uri-list`,urls:`text/uri-list`,vcard:`text/vcard`,vrml:`model/vrml`,vtt:`text/vtt`,vxml:`application/voicexml+xml`,war:`application/java-archive`,wasm:`application/wasm`,wav:`audio/wav`,weba:`audio/webm`,webm:`video/webm`,webmanifest:`application/manifest+json`,webp:`image/webp`,wgsl:`text/wgsl`,wgt:`application/widget`,wif:`application/watcherinfo+xml`,wmf:`image/wmf`,woff:`font/woff`,woff2:`font/woff2`,wrl:`model/vrml`,wsdl:`application/wsdl+xml`,wspolicy:`application/wspolicy+xml`,x3d:`model/x3d+xml`,x3db:`model/x3d+fastinfoset`,x3dbz:`model/x3d+binary`,x3dv:`model/x3d-vrml`,x3dvz:`model/x3d+vrml`,x3dz:`model/x3d+xml`,xaml:`application/xaml+xml`,xav:`application/xcap-att+xml`,xca:`application/xcap-caps+xml`,xcs:`application/calendar+xml`,xdf:`application/xcap-diff+xml`,xdssc:`application/dssc+xml`,xel:`application/xcap-el+xml`,xenc:`application/xenc+xml`,xer:`application/patch-ops-error+xml`,xfdf:`application/xfdf`,xht:`application/xhtml+xml`,xhtml:`application/xhtml+xml`,xhvml:`application/xv+xml`,xlf:`application/xliff+xml`,xm:`audio/xm`,xml:`text/xml`,xns:`application/xcap-ns+xml`,xop:`application/xop+xml`,xpl:`application/xproc+xml`,xsd:`application/xml`,xsf:`application/prs.xsf+xml`,xsl:`application/xml`,xslt:`application/xml`,xspf:`application/xspf+xml`,xvm:`application/xv+xml`,xvml:`application/xv+xml`,yaml:`text/yaml`,yang:`application/yang`,yin:`application/yin+xml`,yml:`text/yaml`,zip:`application/zip`};function d(e){let t=(``+e).trim().toLowerCase(),n=t.lastIndexOf(`.`);return u[~n?t.substring(++n):t]}function f(e,t,n=``){e=c(`.`,e);let r=a(e),i=0,l,u;for(;i<r.length;i++)l=s(e,r[i]),u=o(l),u.isDirectory()?f(l,t,s(n,r[i])):t(s(n,r[i]),l,u)}function p(e){let t=e.url;if(t==null)return;let n=e._parsedUrl;if(n&&n.raw===t)return n;let r=t,i=``,a,o;if(t.length>1){let e=t.indexOf(`#`,1);e!==-1&&(o=t.substring(e),r=t.substring(0,e)),e=r.indexOf(`?`,1),e!==-1&&(i=r.substring(e),r=r.substring(0,e),i.length>1&&(a=l.parse(i.substring(1))))}return e._parsedUrl={pathname:r,search:i,query:a,hash:o,raw:t}}const m=()=>{};function h(e,t){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0}function g(e,t){let n=0,r,i=e.length-1;e.charCodeAt(i)===47&&(e=e.substring(0,i));let a=[],o=`${e}/index`;for(;n<t.length;n++)r=t[n]?`.${t[n]}`:``,e&&a.push(e+r),a.push(o+r);return a}function _(e,t,n){let r=0,i,a=g(t,n);for(;r<a.length;r++)if(i=e[a[r]])return i}function v(n,r,a,o){let s=0,c=g(a,o),l,u,d,f;for(;s<c.length;s++)if(l=t(e(n,d=c[s])),l.startsWith(n)&&i.existsSync(l)){if(u=i.statSync(l),u.isDirectory())continue;return f=S(d,u,r),f[`Cache-Control`]=r?`no-cache`:`no-store`,{abs:l,stats:u,headers:f}}}function y(e,t){return t.statusCode=404,t.end()}function b(e,t,n,r,a){let o=200,s,c={};a={...a};for(let e in a)s=t.getHeader(e),s&&(a[e]=s);if((s=t.getHeader(`content-type`))&&(a[`Content-Type`]=s),e.headers.range){o=206;let[n,i]=e.headers.range.replace(`bytes=`,``).split(`-`),s=c.end=parseInt(i,10)||r.size-1,l=c.start=parseInt(n,10)||0;if(s>=r.size&&(s=r.size-1),l>=r.size)return t.setHeader(`Content-Range`,`bytes */${r.size}`),t.statusCode=416,t.end();a[`Content-Range`]=`bytes ${l}-${s}/${r.size}`,a[`Content-Length`]=s-l+1,a[`Accept-Ranges`]=`bytes`}t.writeHead(o,a),i.createReadStream(n,c).pipe(t)}const x={".br":`br`,".gz":`gzip`};function S(e,t,n){let r=x[e.slice(-3)],i=d(e.slice(0,r&&-3))||``;i===`text/html`&&(i+=`;charset=utf-8`);let a={"Content-Length":t.size,"Content-Type":i,"Last-Modified":t.mtime.toUTCString()};return r&&(a[`Content-Encoding`]=r),n&&(a.ETag=`W/"${t.size}-${t.mtime.getTime()}"`),a}function C(e,t={}){e=n(e||`.`);let i=t.onNoMatch||y,a=t.setHeaders||m,o=t.extensions||[`html`,`htm`],s=t.gzip&&o.map(e=>`${e}.gz`).concat(`gz`),c=t.brotli&&o.map(e=>`${e}.br`).concat(`br`),l={},u=`/`,d=!!t.etag,g=!!t.single;if(typeof t.single==`string`){let e=t.single.lastIndexOf(`.`);u+=~e?t.single.substring(0,e):t.single}let x=[];t.ignores!==!1&&(x.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/),t.dotfiles?x.push(/\/\.\w/):x.push(/\/\.well-known/),[].concat(t.ignores||[]).forEach(e=>{x.push(new RegExp(e,`i`))}));let C=t.maxAge!=null&&`public,max-age=${t.maxAge}`;C&&t.immutable?C+=`,immutable`:C&&t.maxAge===0&&(C+=`,must-revalidate`),t.dev||f(e,(e,n,r)=>{if(!/\.well-known[\\+\/]/.test(e)&&!t.dotfiles&&/(^\.|[\\+|\/+]\.)/.test(e))return;let i=S(e,r,d);C&&(i[`Cache-Control`]=C),l[`/`+e.normalize().replace(/\\+/g,`/`)]={abs:n,stats:r,headers:i}});let w=t.dev?v.bind(0,e+r,d):_.bind(0,l);return function(e,t,n){let r=[``],l=p(e).pathname,f=e.headers[`accept-encoding`]||``;if(s&&f.includes(`gzip`)&&r.unshift(...s),c&&/(br|brotli)/i.test(f)&&r.unshift(...c),r.push(...o),l.indexOf(`%`)!==-1)try{l=decodeURI(l)}catch{}let m=w(l,r)||g&&!h(l,x)&&w(u,r);if(!m)return n?n():i(e,t);if(d&&e.headers[`if-none-match`]===m.headers.ETag)return t.writeHead(304),t.end();(s||c)&&t.setHeader(`Vary`,`Accept-Encoding`),a(t,l,m.stats),b(e,t,m.abs,m.stats,m.headers)}}export{u as n,C as t};
2
- //# sourceMappingURL=build-fAc55Z_L.mjs.map
2
+ //# sourceMappingURL=build-BZeImWox.mjs.map
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-TXBZCHCQ-WeVWfqYv.mjs";export{e as catCommand};
@@ -0,0 +1 @@
1
+ import"./chunk-DXB73IDG-DIKSLkPq.mjs";import{t as e}from"./chunk-4GTNDTRF-PuLVuVJW.mjs";export{e as chmodCommand};
@@ -1,4 +1,4 @@
1
1
  import{EventEmitter as e}from"node:events";import*as t from"node:path";import{join as n,relative as r,resolve as i,sep as a}from"node:path";import{stat as o,unwatchFile as s,watch as c,watchFile as l}from"node:fs";import{type as u}from"node:os";import{Readable as d}from"node:stream";import{lstat as f,open as ee,readdir as p,realpath as m,stat as h}from"node:fs/promises";const g={FILE_TYPE:`files`,DIR_TYPE:`directories`,FILE_DIR_TYPE:`files_directories`,EVERYTHING_TYPE:`all`},_={root:`.`,fileFilter:e=>!0,directoryFilter:e=>!0,type:g.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(_);const v=`READDIRP_RECURSIVE_ERROR`,y=new Set([`ENOENT`,`EPERM`,`EACCES`,`ELOOP`,v]),b=[g.DIR_TYPE,g.EVERYTHING_TYPE,g.FILE_DIR_TYPE,g.FILE_TYPE],te=new Set([g.DIR_TYPE,g.EVERYTHING_TYPE,g.FILE_DIR_TYPE]),ne=new Set([g.EVERYTHING_TYPE,g.FILE_DIR_TYPE,g.FILE_TYPE]),re=e=>y.has(e.code),ie=process.platform===`win32`,x=e=>!0,S=e=>{if(e===void 0)return x;if(typeof e==`function`)return e;if(typeof e==`string`){let t=e.trim();return e=>e.basename===t}if(Array.isArray(e)){let t=e.map(e=>e.trim());return e=>t.some(t=>e.basename===t)}return x};var C=class extends d{parents;reading;parent;_stat;_maxDepth;_wantsDir;_wantsFile;_wantsEverything;_root;_isDirent;_statsProp;_rdOptions;_fileFilter;_directoryFilter;constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let t={..._,...e},{root:n,type:r}=t;this._fileFilter=S(t.fileFilter),this._directoryFilter=S(t.directoryFilter);let a=t.lstat?f:h;ie?this._stat=e=>a(e,{bigint:!0}):this._stat=a,this._maxDepth=t.depth!=null&&Number.isSafeInteger(t.depth)?t.depth:_.depth,this._wantsDir=r?te.has(r):!1,this._wantsFile=r?ne.has(r):!1,this._wantsEverything=r===g.EVERYTHING_TYPE,this._root=i(n),this._isDirent=!t.alwaysStat,this._statsProp=this._isDirent?`dirent`:`stats`,this._rdOptions={encoding:`utf8`,withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let t=this.parent,n=t&&t.files;if(n&&n.length>0){let{path:r,depth:i}=t,a=n.splice(0,e).map(e=>this._formatEntry(e,r)),o=await Promise.all(a);for(let t of o){if(!t)continue;if(this.destroyed)return;let n=await this._getEntryType(t);n===`directory`&&this._directoryFilter(t)?(i<=this._maxDepth&&this.parents.push(this._exploreDir(t.fullPath,i+1)),this._wantsDir&&(this.push(t),e--)):(n===`file`||this._includeAsFile(t))&&this._fileFilter(t)&&this._wantsFile&&(this.push(t),e--)}}else{let e=this.parents.pop();if(!e){this.push(null);break}if(this.parent=await e,this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=!1}}}async _exploreDir(e,t){let n;try{n=await p(e,this._rdOptions)}catch(e){this._onError(e)}return{files:n,depth:t,path:e}}async _formatEntry(e,t){let a,o=this._isDirent?e.name:e;try{let s=i(n(t,o));a={path:r(this._root,s),fullPath:s,basename:o},a[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(e){this._onError(e);return}return a}_onError(e){re(e)&&!this.destroyed?this.emit(`warn`,e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return``;let t=e[this._statsProp];if(t.isFile())return`file`;if(t.isDirectory())return`directory`;if(t&&t.isSymbolicLink()){let t=e.fullPath;try{let e=await m(t),n=await f(e);if(n.isFile())return`file`;if(n.isDirectory()){let n=e.length;if(t.startsWith(e)&&t.substr(n,1)===a){let n=Error(`Circular symlink detected: "${t}" points to "${e}"`);return n.code=v,this._onError(n)}return`directory`}}catch(e){return this._onError(e),``}}}_includeAsFile(e){let t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}};function ae(e,t={}){let n=t.entryType||t.type;if(n===`both`&&(n=g.FILE_DIR_TYPE),n&&(t.type=n),!e)throw Error(`readdirp: root argument is required. Usage: readdirp(root, options)`);if(typeof e!=`string`)throw TypeError(`readdirp: root argument must be a string. Usage: readdirp(root, options)`);if(n&&!b.includes(n))throw Error(`readdirp: Invalid type passed. Use one of ${b.join(`, `)}`);return t.root=e,new C(t)}const w=()=>{},T=process.platform,E=T===`win32`,D=T===`darwin`,O=T===`linux`,k=T===`freebsd`,A=u()===`OS400`,j={ALL:`all`,READY:`ready`,ADD:`add`,CHANGE:`change`,ADD_DIR:`addDir`,UNLINK:`unlink`,UNLINK_DIR:`unlinkDir`,RAW:`raw`,ERROR:`error`},M=j,N={lstat:f,stat:h},P=`listeners`,F=`errHandlers`,I=`rawEmitters`,oe=[P,F,I],se=new Set(`3dm.3ds.3g2.3gp.7z.a.aac.adp.afdesign.afphoto.afpub.ai.aif.aiff.alz.ape.apk.appimage.ar.arj.asf.au.avi.bak.baml.bh.bin.bk.bmp.btif.bz2.bzip2.cab.caf.cgm.class.cmx.cpio.cr2.cur.dat.dcm.deb.dex.djvu.dll.dmg.dng.doc.docm.docx.dot.dotm.dra.DS_Store.dsk.dts.dtshd.dvb.dwg.dxf.ecelp4800.ecelp7470.ecelp9600.egg.eol.eot.epub.exe.f4v.fbs.fh.fla.flac.flatpak.fli.flv.fpx.fst.fvt.g3.gh.gif.graffle.gz.gzip.h261.h263.h264.icns.ico.ief.img.ipa.iso.jar.jpeg.jpg.jpgv.jpm.jxr.key.ktx.lha.lib.lvp.lz.lzh.lzma.lzo.m3u.m4a.m4v.mar.mdi.mht.mid.midi.mj2.mka.mkv.mmr.mng.mobi.mov.movie.mp3.mp4.mp4a.mpeg.mpg.mpga.mxu.nef.npx.numbers.nupkg.o.odp.ods.odt.oga.ogg.ogv.otf.ott.pages.pbm.pcx.pdb.pdf.pea.pgm.pic.png.pnm.pot.potm.potx.ppa.ppam.ppm.pps.ppsm.ppsx.ppt.pptm.pptx.psd.pya.pyc.pyo.pyv.qt.rar.ras.raw.resources.rgb.rip.rlc.rmf.rmvb.rpm.rtf.rz.s3m.s7z.scpt.sgi.shar.snap.sil.sketch.slk.smv.snk.so.stl.suo.sub.swf.tar.tbz.tbz2.tga.tgz.thmx.tif.tiff.tlz.ttc.ttf.txz.udf.uvh.uvi.uvm.uvp.uvs.uvu.viv.vob.war.wav.wax.wbmp.wdp.weba.webm.webp.whl.wim.wm.wma.wmv.wmx.woff.woff2.wrm.wvx.xbm.xif.xla.xlam.xls.xlsb.xlsm.xlsx.xlt.xltm.xltx.xm.xmind.xpi.xpm.xwd.xz.z.zip.zipx`.split(`.`)),ce=e=>se.has(t.extname(e).slice(1).toLowerCase()),L=(e,t)=>{e instanceof Set?e.forEach(t):t(e)},R=(e,t,n)=>{let r=e[t];r instanceof Set||(e[t]=r=new Set([r])),r.add(n)},z=e=>t=>{let n=e[t];n instanceof Set?n.clear():delete e[t]},B=(e,t,n)=>{let r=e[t];r instanceof Set?r.delete(n):r===n&&delete e[t]},V=e=>e instanceof Set?e.size===0:!e,H=new Map;function U(e,n,r,i,a){let o=(n,i)=>{r(e),a(n,i,{watchedPath:e}),i&&e!==i&&W(t.resolve(e,i),P,t.join(e,i))};try{return c(e,{persistent:n.persistent},o)}catch(e){i(e);return}}const W=(e,t,n,r,i)=>{let a=H.get(e);a&&L(a[t],e=>{e(n,r,i)})},le=(e,t,n,r)=>{let{listener:i,errHandler:a,rawEmitter:o}=r,s=H.get(t),c;if(!n.persistent)return c=U(e,n,i,a,o),c?c.close.bind(c):void 0;if(s)R(s,P,i),R(s,F,a),R(s,I,o);else{if(c=U(e,n,W.bind(null,t,P),a,W.bind(null,t,I)),!c)return;c.on(M.ERROR,async n=>{let r=W.bind(null,t,F);if(s&&(s.watcherUnusable=!0),E&&n.code===`EPERM`)try{await(await ee(e,`r`)).close(),r(n)}catch{}else r(n)}),s={listeners:i,errHandlers:a,rawEmitters:o,watcher:c},H.set(t,s)}return()=>{B(s,P,i),B(s,F,a),B(s,I,o),V(s.listeners)&&(s.watcher.close(),H.delete(t),oe.forEach(z(s)),s.watcher=void 0,Object.freeze(s))}},G=new Map,ue=(e,t,n,r)=>{let{listener:i,rawEmitter:a}=r,o=G.get(t),c=o&&o.options;return c&&(c.persistent<n.persistent||c.interval>n.interval)&&(s(t),o=void 0),o?(R(o,P,i),R(o,I,a)):(o={listeners:i,rawEmitters:a,options:n,watcher:l(t,n,(n,r)=>{L(o.rawEmitters,e=>{e(M.CHANGE,t,{curr:n,prev:r})});let i=n.mtimeMs;(n.size!==r.size||i>r.mtimeMs||i===0)&&L(o.listeners,t=>t(e,n))})},G.set(t,o)),()=>{B(o,P,i),B(o,I,a),V(o.listeners)&&(G.delete(t),s(t),o.options=o.watcher=void 0,Object.freeze(o))}};var de=class{fsw;_boundHandleError;constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,n){let r=this.fsw.options,i=t.dirname(e),a=t.basename(e);this.fsw._getWatchedDir(i).add(a);let o=t.resolve(e),s={persistent:r.persistent};n||=w;let c;return r.usePolling?(s.interval=r.interval!==r.binaryInterval&&ce(a)?r.binaryInterval:r.interval,c=ue(e,o,s,{listener:n,rawEmitter:this.fsw._emitRaw})):c=le(e,o,s,{listener:n,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),c}_handleFile(e,n,r){if(this.fsw.closed)return;let i=t.dirname(e),a=t.basename(e),o=this.fsw._getWatchedDir(i),s=n;if(o.has(a))return;let c=async(t,n)=>{if(this.fsw._throttle(`watch`,e,5)){if(!n||n.mtimeMs===0)try{let n=await h(e);if(this.fsw.closed)return;let r=n.atimeMs,i=n.mtimeMs;if((!r||r<=i||i!==s.mtimeMs)&&this.fsw._emit(M.CHANGE,e,n),(D||O||k)&&s.ino!==n.ino){this.fsw._closeFile(t),s=n;let r=this._watchWithNodeFs(e,c);r&&this.fsw._addPathCloser(t,r)}else s=n}catch{this.fsw._remove(i,a)}else if(o.has(a)){let t=n.atimeMs,r=n.mtimeMs;(!t||t<=r||r!==s.mtimeMs)&&this.fsw._emit(M.CHANGE,e,n),s=n}}},l=this._watchWithNodeFs(e,c);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(M.ADD,e,0))return;this.fsw._emit(M.ADD,e,n)}return l}async _handleSymlink(e,t,n,r){if(this.fsw.closed)return;let i=e.fullPath,a=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await m(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(a.has(r)?this.fsw._symlinkPaths.get(i)!==t&&(this.fsw._symlinkPaths.set(i,t),this.fsw._emit(M.CHANGE,n,e.stats)):(a.add(r),this.fsw._symlinkPaths.set(i,t),this.fsw._emit(M.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(i))return!0;this.fsw._symlinkPaths.set(i,!0)}_handleRead(e,n,r,i,a,o,s){e=t.join(e,``);let c=i?`${e}:${i}`:e;if(s=this.fsw._throttle(`readdir`,c,1e3),!s)return;let l=this.fsw._getWatchedDir(r.path),u=new Set,d=this.fsw._readdirp(e,{fileFilter:e=>r.filterPath(e),directoryFilter:e=>r.filterDir(e)});if(d)return d.on(`data`,async s=>{if(this.fsw.closed){d=void 0;return}let c=s.path,f=t.join(e,c);if(u.add(c),!(s.stats.isSymbolicLink()&&await this._handleSymlink(s,e,f,c))){if(this.fsw.closed){d=void 0;return}(c===i||!i&&!l.has(c))&&(this.fsw._incrReadyCount(),f=t.join(a,t.relative(a,f)),this._addToNodeFs(f,n,r,o+1))}}).on(M.ERROR,this._boundHandleError),new Promise((t,n)=>{if(!d)return n();d.once(`end`,()=>{if(this.fsw.closed){d=void 0;return}let n=s?s.clear():!1;t(void 0),l.getChildren().filter(t=>t!==e&&!u.has(t)).forEach(t=>{this.fsw._remove(e,t)}),d=void 0,n&&this._handleRead(e,!1,r,i,a,o,s)})})}async _handleDir(e,n,r,i,a,o,s){let c=this.fsw._getWatchedDir(t.dirname(e)),l=c.has(t.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!a&&!l&&this.fsw._emit(M.ADD_DIR,e,n),c.add(t.basename(e)),this.fsw._getWatchedDir(e);let u,d=this.fsw.options.depth;if((d==null||i<=d)&&!this.fsw._symlinkPaths.has(s)){if(!a&&(await this._handleRead(e,r,o,a,e,i,void 0),this.fsw.closed))return;u=this._watchWithNodeFs(e,(t,n)=>{n&&n.mtimeMs===0||this._handleRead(t,!1,o,a,e,i,void 0)})}return u}async _addToNodeFs(e,n,r,i,a){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let s=this.fsw._getWatchHelpers(e);r&&(s.filterPath=e=>r.filterPath(e),s.filterDir=e=>r.filterDir(e));try{let r=await N[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,r))return o(),!1;let c=this.fsw.options.followSymlinks,l;if(r.isDirectory()){let o=t.resolve(e),u=c?await m(e):e;if(this.fsw.closed||(l=await this._handleDir(s.watchPath,r,n,i,a,s,u),this.fsw.closed))return;o!==u&&u!==void 0&&this.fsw._symlinkPaths.set(o,u)}else if(r.isSymbolicLink()){let a=c?await m(e):e;if(this.fsw.closed)return;let o=t.dirname(s.watchPath);if(this.fsw._getWatchedDir(o).add(s.watchPath),this.fsw._emit(M.ADD,s.watchPath,r),l=await this._handleDir(o,r,n,i,e,s,a),this.fsw.closed)return;a!==void 0&&this.fsw._symlinkPaths.set(t.resolve(e),a)}else l=this._handleFile(s.watchPath,r,n);return o(),l&&this.fsw._addPathCloser(e,l),!1}catch(t){if(this.fsw._handleError(t))return o(),e}}};
2
2
  /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
3
3
  const fe=/\\/g,K=/\/\//g,pe=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,me=/^\.[/\\]/;function q(e){return Array.isArray(e)?e:[e]}const J=e=>typeof e==`object`&&!!e&&!(e instanceof RegExp);function he(e){return typeof e==`function`?e:typeof e==`string`?t=>e===t:e instanceof RegExp?t=>e.test(t):typeof e==`object`&&e?n=>{if(e.path===n)return!0;if(e.recursive){let r=t.relative(e.path,n);return r?!r.startsWith(`..`)&&!t.isAbsolute(r):!1}return!1}:()=>!1}function ge(e){if(typeof e!=`string`)throw Error(`string expected`);e=t.normalize(e),e=e.replace(/\\/g,`/`);let n=!1;return e.startsWith(`//`)&&(n=!0),e=e.replace(K,`/`),n&&(e=`/`+e),e}function Y(e,t,n){let r=ge(t);for(let t=0;t<e.length;t++){let i=e[t];if(i(r,n))return!0}return!1}function _e(e,t){if(e==null)throw TypeError(`anymatch: specify first argument`);let n=q(e).map(e=>he(e));return t==null?(e,t)=>Y(n,e,t):Y(n,t)}const X=e=>{let t=q(e).flat();if(!t.every(e=>typeof e==`string`))throw TypeError(`Non-string provided as watch path: ${t}`);return t.map(Q)},Z=e=>{let t=e.replace(fe,`/`),n=!1;return t.startsWith(`//`)&&(n=!0),t=t.replace(K,`/`),n&&(t=`/`+t),t},Q=e=>Z(t.normalize(Z(e))),$=(e=``)=>n=>typeof n==`string`?Q(t.isAbsolute(n)?n:t.join(e,n)):n,ve=(e,n)=>t.isAbsolute(e)?e:t.join(n,e),ye=Object.freeze(new Set);var be=class{path;_removeWatcher;items;constructor(e,t){this.path=e,this._removeWatcher=t,this.items=new Set}add(e){let{items:t}=this;t&&e!==`.`&&e!==`..`&&t.add(e)}async remove(e){let{items:n}=this;if(!n||(n.delete(e),n.size>0))return;let r=this.path;try{await p(r)}catch{this._removeWatcher&&this._removeWatcher(t.dirname(r),t.basename(r))}}has(e){let{items:t}=this;if(t)return t.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path=``,this._removeWatcher=w,this.items=ye,Object.freeze(this)}},xe=class{fsw;path;watchPath;fullWatchPath;dirParts;followSymlinks;statMethod;constructor(e,n,r){this.fsw=r;let i=e;this.path=e=e.replace(me,``),this.watchPath=i,this.fullWatchPath=t.resolve(i),this.dirParts=[],this.dirParts.forEach(e=>{e.length>1&&e.pop()}),this.followSymlinks=n,this.statMethod=n?`stat`:`lstat`}entryPath(e){return t.join(this.watchPath,t.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,t)&&this.fsw._hasReadPermissions(t)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},Se=class extends e{closed;options;_closers;_ignoredPaths;_throttled;_streams;_symlinkPaths;_watched;_pendingWrites;_pendingUnlinks;_readyCount;_emitReady;_closePromise;_userIgnored;_readyEmitted;_emitRaw;_boundRemove;_nodeFsHandler;constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let t=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},r={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?q(e.ignored):q([]),awaitWriteFinish:t===!0?n:typeof t==`object`?{...n,...t}:!1};A&&(r.usePolling=!0),r.atomic===void 0&&(r.atomic=!r.usePolling);let i=process.env.CHOKIDAR_USEPOLLING;if(i!==void 0){let e=i.toLowerCase();e===`false`||e===`0`?r.usePolling=!1:e===`true`||e===`1`?r.usePolling=!0:r.usePolling=!!e}let a=process.env.CHOKIDAR_INTERVAL;a&&(r.interval=Number.parseInt(a,10));let o=0;this._emitReady=()=>{o++,o>=this._readyCount&&(this._emitReady=w,this._readyEmitted=!0,process.nextTick(()=>this.emit(j.READY)))},this._emitRaw=(...e)=>this.emit(j.RAW,...e),this._boundRemove=this._remove.bind(this),this.options=r,this._nodeFsHandler=new de(this),Object.freeze(r)}_addIgnoredPath(e){if(J(e)){for(let t of this._ignoredPaths)if(J(t)&&t.path===e.path&&t.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e==`string`)for(let t of this._ignoredPaths)J(t)&&t.path===e&&this._ignoredPaths.delete(t)}add(e,n,r){let{cwd:i}=this.options;this.closed=!1,this._closePromise=void 0;let a=X(e);return i&&(a=a.map(e=>ve(e,i))),a.forEach(e=>{this._removeIgnoredPath(e)}),this._userIgnored=void 0,this._readyCount||=0,this._readyCount+=a.length,Promise.all(a.map(async e=>{let t=await this._nodeFsHandler._addToNodeFs(e,!r,void 0,0,n);return t&&this._emitReady(),t})).then(e=>{this.closed||e.forEach(e=>{e&&this.add(t.dirname(e),t.basename(n||e))})}),this}unwatch(e){if(this.closed)return this;let n=X(e),{cwd:r}=this.options;return n.forEach(e=>{!t.isAbsolute(e)&&!this._closers.has(e)&&(r&&(e=t.join(r,e)),e=t.resolve(e)),this._closePath(e),this._addIgnoredPath(e),this._watched.has(e)&&this._addIgnoredPath({path:e,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(t=>t.forEach(t=>{let n=t();n instanceof Promise&&e.push(n)})),this._streams.forEach(e=>e.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(e=>e.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>void 0):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((n,r)=>{let i=(this.options.cwd?t.relative(this.options.cwd,r):r)||`.`;e[i]=n.getChildren().sort()}),e}emitWithAll(e,t){this.emit(e,...t),e!==j.ERROR&&this.emit(j.ALL,e,...t)}async _emit(e,n,r){if(this.closed)return;let i=this.options;E&&(n=t.normalize(n)),i.cwd&&(n=t.relative(i.cwd,n));let a=[n];r!=null&&a.push(r);let o=i.awaitWriteFinish,s;if(o&&(s=this._pendingWrites.get(n)))return s.lastChange=new Date,this;if(i.atomic){if(e===j.UNLINK)return this._pendingUnlinks.set(n,[e,...a]),setTimeout(()=>{this._pendingUnlinks.forEach((e,t)=>{this.emit(...e),this.emit(j.ALL,...e),this._pendingUnlinks.delete(t)})},typeof i.atomic==`number`?i.atomic:100),this;e===j.ADD&&this._pendingUnlinks.has(n)&&(e=j.CHANGE,this._pendingUnlinks.delete(n))}if(o&&(e===j.ADD||e===j.CHANGE)&&this._readyEmitted)return this._awaitWriteFinish(n,o.stabilityThreshold,e,(t,n)=>{t?(e=j.ERROR,a[0]=t,this.emitWithAll(e,a)):n&&(a.length>1?a[1]=n:a.push(n),this.emitWithAll(e,a))}),this;if(e===j.CHANGE&&!this._throttle(j.CHANGE,n,50))return this;if(i.alwaysStat&&r===void 0&&(e===j.ADD||e===j.ADD_DIR||e===j.CHANGE)){let e=i.cwd?t.join(i.cwd,n):n,r;try{r=await h(e)}catch{}if(!r||this.closed)return;a.push(r)}return this.emitWithAll(e,a),this}_handleError(e){let t=e&&e.code;return e&&t!==`ENOENT`&&t!==`ENOTDIR`&&(!this.options.ignorePermissionErrors||t!==`EPERM`&&t!==`EACCES`)&&this.emit(j.ERROR,e),e||this.closed}_throttle(e,t,n){this._throttled.has(e)||this._throttled.set(e,new Map);let r=this._throttled.get(e);if(!r)throw Error(`invalid throttle`);let i=r.get(t);if(i)return i.count++,!1;let a,o=()=>{let e=r.get(t),n=e?e.count:0;return r.delete(t),clearTimeout(a),e&&clearTimeout(e.timeoutObject),n};a=setTimeout(o,n);let s={timeoutObject:a,clear:o,count:0};return r.set(t,s),s}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,n,r,i){let a=this.options.awaitWriteFinish;if(typeof a!=`object`)return;let s=a.pollInterval,c,l=e;this.options.cwd&&!t.isAbsolute(e)&&(l=t.join(this.options.cwd,e));let u=new Date,d=this._pendingWrites;function f(t){o(l,(r,a)=>{if(r||!d.has(e)){r&&r.code!==`ENOENT`&&i(r);return}let o=Number(new Date);t&&a.size!==t.size&&(d.get(e).lastChange=o),o-d.get(e).lastChange>=n?(d.delete(e),i(void 0,a)):c=setTimeout(f,s,a)})}d.has(e)||(d.set(e,{lastChange:u,cancelWait:()=>(d.delete(e),clearTimeout(c),r)}),c=setTimeout(f,s))}_isIgnored(e,t){if(this.options.atomic&&pe.test(e))return!0;if(!this._userIgnored){let{cwd:e}=this.options,t=(this.options.ignored||[]).map($(e));this._userIgnored=_e([...[...this._ignoredPaths].map($(e)),...t],void 0)}return this._userIgnored(e,t)}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e){return new xe(e,this.options.followSymlinks,this)}_getWatchedDir(e){let n=t.resolve(e);return this._watched.has(n)||this._watched.set(n,new be(n,this._boundRemove)),this._watched.get(n)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,n,r){let i=t.join(e,n),a=t.resolve(i);if(r??=this._watched.has(i)||this._watched.has(a),!this._throttle(`remove`,i,100))return;!r&&this._watched.size===1&&this.add(e,n,!0),this._getWatchedDir(i).getChildren().forEach(e=>this._remove(i,e));let o=this._getWatchedDir(e),s=o.has(n);o.remove(n),this._symlinkPaths.has(a)&&this._symlinkPaths.delete(a);let c=i;if(this.options.cwd&&(c=t.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===j.ADD)return;this._watched.delete(i),this._watched.delete(a);let l=r?j.UNLINK_DIR:j.UNLINK;s&&!this._isIgnored(i)&&this._emit(l,i),this._closePath(i)}_closePath(e){this._closeFile(e);let n=t.dirname(e);this._getWatchedDir(n).remove(t.basename(e))}_closeFile(e){let t=this._closers.get(e);t&&(t.forEach(e=>e()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(t)}_readdirp(e,t){if(this.closed)return;let n=ae(e,{type:j.ALL,alwaysStat:!0,lstat:!0,...t,depth:0});return this._streams.add(n),n.once(`close`,()=>{n=void 0}),n.once(`end`,()=>{n&&=(this._streams.delete(n),void 0)}),n}};function Ce(e,t={}){let n=new Se(t);return n.add(e),n}export{Ce as watch};
4
- //# sourceMappingURL=chokidar-DnkSPA-1.mjs.map
4
+ //# sourceMappingURL=chokidar-CxU7f6JW.mjs.map
@@ -1,2 +1,2 @@
1
- import{n as e,t}from"./chunk-5QMZ5MUS-SLhNX8t9.mjs";function n(n,r,i){if(!n||t.isInSandboxedContext())return;let a=`${r} ${i} attempted outside defense context`;throw new e(a,{timestamp:Date.now(),type:`missing_defense_context`,message:a,path:`DefenseInDepthBox.context`,stack:Error().stack,executionId:t.getCurrentExecutionId()})}async function r(e,t,r,i){n(e,t,`${r} (pre-await)`);let a=await i();return n(e,t,`${r} (post-await)`),a}function i(e,r,i,a){let o=((...t)=>(n(e,r,i),a(...t)));return e?t.bindCurrentContext(o):o}export{i as n,r,n as t};
2
- //# sourceMappingURL=chunk-24IMIIXA-_PX4ITYZ.mjs.map
1
+ import{n as e,t}from"./chunk-5QMZ5MUS-CAp625aG.mjs";function n(n,r,i){if(!n||t.isInSandboxedContext())return;let a=`${r} ${i} attempted outside defense context`;throw new e(a,{timestamp:Date.now(),type:`missing_defense_context`,message:a,path:`DefenseInDepthBox.context`,stack:Error().stack,executionId:t.getCurrentExecutionId()})}async function r(e,t,r,i){n(e,t,`${r} (pre-await)`);let a=await i();return n(e,t,`${r} (post-await)`),a}function i(e,r,i,a){let o=((...t)=>(n(e,r,i),a(...t)));return e?t.bindCurrentContext(o):o}export{i as n,r,n as t};
2
+ //# sourceMappingURL=chunk-24IMIIXA-B6yIPkk2.mjs.map
@@ -1,2 +1,2 @@
1
1
  function e(e,t,n){if(!e)return e;let r=e.replace(/\n\s+at\s.*/g,``);return n&&(r=r.replace(/\bfile:\/\/\/?[^\s'",)}\]:]+/g,`<path>`)),r=r.replace(t?/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap|workspace|root|srv|mnt|app))\b[^\s'",)}\]:]*/g:/(?:\/(?:Users|home|private|var|opt|Library|System|usr|etc|tmp|nix|snap))\b[^\s'",)}\]:]*/g,`<path>`),r=r.replace(/node:internal\/[^\s'",)}\]:]+/g,`<internal>`),r=r.replace(/[A-Z]:\\[^\s'",)}\]:]+/g,`<path>`),n&&(r=r.replace(/\\\\[^\s\\]+\\[^\s'",)}\]:]+/g,`<path>`)),r}function t(t){return e(t,!1,!1)}function n(t){return e(t,!0,!0)}export{t as n,n as t};
2
- //# sourceMappingURL=chunk-3THT3N7L-DrzOuTpA.mjs.map
2
+ //# sourceMappingURL=chunk-3THT3N7L-DztAF386.mjs.map
@@ -1,2 +1,2 @@
1
1
  function e(e){let t=e.match(/^(\d+\.?\d*)(s|m|h|d)?$/);if(!t)return null;let n=parseFloat(t[1]);switch(t[2]||`s`){case`s`:return n*1e3;case`m`:return n*60*1e3;case`h`:return n*60*60*1e3;case`d`:return n*24*60*60*1e3;default:return null}}export{e as t};
2
- //# sourceMappingURL=chunk-3ZUFRYJ4-BUqSdAvt.mjs.map
2
+ //# sourceMappingURL=chunk-3ZUFRYJ4-qsYuZX7b.mjs.map
@@ -1,2 +1,2 @@
1
1
  function e(e){return e instanceof Error?e.message:String(e)}export{e as t};
2
- //# sourceMappingURL=chunk-44UOCSGV-BbZqjKvt.mjs.map
2
+ //# sourceMappingURL=chunk-44UOCSGV-CaFxJDHm.mjs.map
@@ -1,8 +1,8 @@
1
- import{n as e,r as t,t as n}from"./chunk-74CEPOFO-CLQh_oXv.mjs";var r={name:`chmod`,summary:`change file mode bits`,usage:`chmod [OPTIONS] MODE FILE...`,options:[`-R change files recursively`,`-v output a diagnostic for every file processed`,` --help display this help and exit`]},i={name:`chmod`,async execute(i,s){if(n(i))return t(r);if(i.length<2)return{stdout:``,stderr:`chmod: missing operand
1
+ import{n as e,r as t,t as n}from"./chunk-74CEPOFO-BcZUJMO1.mjs";var r={name:`chmod`,summary:`change file mode bits`,usage:`chmod [OPTIONS] MODE FILE...`,options:[`-R change files recursively`,`-v output a diagnostic for every file processed`,` --help display this help and exit`]},i={name:`chmod`,async execute(i,s){if(n(i))return t(r);if(i.length<2)return{stdout:``,stderr:`chmod: missing operand
2
2
  `,exitCode:1};let c=!1,l=!1,u=0;for(;u<i.length&&i[u].startsWith(`-`);){let t=i[u];if(t===`-R`||t===`--recursive`)c=!0,u++;else if(t===`-v`||t===`--verbose`)l=!0,u++;else if(t===`--`){u++;break}else{if(/^[+-]?[rwxugo]+/.test(t)||/^\d+$/.test(t))break;if(/^-[Rv]+$/.test(t)){t.includes(`R`)&&(c=!0),t.includes(`v`)&&(l=!0),u++;continue}return e(`chmod`,t)}}if(i.length-u<2)return{stdout:``,stderr:`chmod: missing operand
3
3
  `,exitCode:1};let d=i[u],f=i.slice(u+1),p=/^[0-7]+$/.test(d),m;if(p)m=parseInt(d,8);else try{o(d,420)}catch{return{stdout:``,stderr:`chmod: invalid mode: '${d}'
4
4
  `,exitCode:1}}let h=``,g=``,_=!1;for(let e of f){let t=s.fs.resolvePath(s.cwd,e);try{let n;if(n=p&&m!==void 0?m:o(d,(await s.fs.stat(t)).mode),await s.fs.chmod(t,n),l&&(h+=`mode of '${e}' changed to ${n.toString(8).padStart(4,`0`)}
5
5
  `),c&&(await s.fs.stat(t)).isDirectory){let e=await a(s,t,p?m:void 0,p?void 0:d,l);h+=e}}catch{g+=`chmod: cannot access '${e}': No such file or directory
6
6
  `,_=!0}}return{stdout:h,stderr:g,exitCode:_?1:0}}};async function a(e,t,n,r,i){let s=``,c=await e.fs.readdir(t);for(let l of c){let c=t===`/`?`/${l}`:`${t}/${l}`,u;u=n===void 0?r===void 0?420:o(r,(await e.fs.stat(c)).mode):n,await e.fs.chmod(c,u),i&&(s+=`mode of '${c}' changed to ${u.toString(8).padStart(4,`0`)}
7
7
  `),(await e.fs.stat(c)).isDirectory&&(s+=await a(e,c,n,r,i))}return s}function o(e,t=420){if(/^[0-7]+$/.test(e))return parseInt(e,8);let n=t&4095,r=e.split(`,`);for(let t of r){let r=t.match(/^([ugoa]*)([+\-=])([rwxXst]*)$/);if(!r)throw Error(`Invalid mode: ${e}`);let i=r[1]||`a`,a=r[2],o=r[3];(i===`a`||i===``)&&(i=`ugo`);let s=0;o.includes(`r`)&&(s|=4),o.includes(`w`)&&(s|=2),(o.includes(`x`)||o.includes(`X`))&&(s|=1);let c=0;o.includes(`s`)&&(i.includes(`u`)&&(c|=2048),i.includes(`g`)&&(c|=1024)),o.includes(`t`)&&(c|=512);for(let e of i){let t=0;e===`u`?t=6:e===`g`?t=3:e===`o`&&(t=0);let r=s<<t;a===`+`?n|=r:a===`-`?n&=~r:a===`=`&&(n&=~(7<<t),n|=r)}a===`+`?n|=c:a===`-`?n&=~c:a===`=`&&(o.includes(`s`)&&(i.includes(`u`)&&(n&=-2049,n|=c&2048),i.includes(`g`)&&(n&=-1025,n|=c&1024)),o.includes(`t`)&&(n&=-513,n|=c&512))}return n}var s={name:`chmod`,flags:[{flag:`-R`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0,minArgs:2};export{s as n,i as t};
8
- //# sourceMappingURL=chunk-4GTNDTRF-C7Bk89yc.mjs.map
8
+ //# sourceMappingURL=chunk-4GTNDTRF-PuLVuVJW.mjs.map
@@ -1,3 +1,3 @@
1
1
  async function e(e,t){return{stdout:`localhost
2
2
  `,stderr:``,exitCode:0}}var t={name:`hostname`,execute:e},n={name:`hostname`,flags:[]};export{n,t};
3
- //# sourceMappingURL=chunk-4HHKTUW3-DaxBqSRO.mjs.map
3
+ //# sourceMappingURL=chunk-4HHKTUW3-CQ53AiA_.mjs.map
@@ -1,5 +1,5 @@
1
- import{r as e,t}from"./chunk-74CEPOFO-CLQh_oXv.mjs";var n={name:`dirname`,summary:`strip last component from file name`,usage:`dirname [OPTION] NAME...`,options:[` --help display this help and exit`]},r={name:`dirname`,async execute(r,i){if(t(r))return e(n);let a=r.filter(e=>!e.startsWith(`-`));if(a.length===0)return{stdout:``,stderr:`dirname: missing operand
1
+ import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";var n={name:`dirname`,summary:`strip last component from file name`,usage:`dirname [OPTION] NAME...`,options:[` --help display this help and exit`]},r={name:`dirname`,async execute(r,i){if(t(r))return e(n);let a=r.filter(e=>!e.startsWith(`-`));if(a.length===0)return{stdout:``,stderr:`dirname: missing operand
2
2
  `,exitCode:1};let o=[];for(let e of a){let t=e.replace(/\/+$/,``),n=t.lastIndexOf(`/`);n===-1?o.push(`.`):n===0?o.push(`/`):o.push(t.slice(0,n))}return{stdout:`${o.join(`
3
3
  `)}
4
4
  `,stderr:``,exitCode:0}}},i={name:`dirname`,flags:[],needsArgs:!0};export{r as n,i as t};
5
- //# sourceMappingURL=chunk-4Q4SM6WR-CQ3yG3KJ.mjs.map
5
+ //# sourceMappingURL=chunk-4Q4SM6WR-BlQvqCag.mjs.map
@@ -1,3 +1,3 @@
1
- import{r as e,t}from"./chunk-74CEPOFO-CLQh_oXv.mjs";import{t as n}from"./chunk-HWKDQ44K-cV6V5ZgY.mjs";var r={name:`tee`,summary:`read from stdin and write to stdout and files`,usage:`tee [OPTION]... [FILE]...`,options:[`-a, --append append to the given FILEs, do not overwrite`,` --help display this help and exit`]},i={append:{short:`a`,long:`append`,type:`boolean`}},a={name:`tee`,async execute(a,o){if(t(a))return e(r);let s=n(`tee`,a,i);if(!s.ok)return s.error;let{append:c}=s.result.flags,l=s.result.positional,u=o.stdin,d=``,f=0;for(let e of l)try{let t=o.fs.resolvePath(o.cwd,e);c?await o.fs.appendFile(t,u):await o.fs.writeFile(t,u)}catch{d+=`tee: ${e}: No such file or directory
1
+ import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{t as n}from"./chunk-HWKDQ44K-wgmyck2O.mjs";var r={name:`tee`,summary:`read from stdin and write to stdout and files`,usage:`tee [OPTION]... [FILE]...`,options:[`-a, --append append to the given FILEs, do not overwrite`,` --help display this help and exit`]},i={append:{short:`a`,long:`append`,type:`boolean`}},a={name:`tee`,async execute(a,o){if(t(a))return e(r);let s=n(`tee`,a,i);if(!s.ok)return s.error;let{append:c}=s.result.flags,l=s.result.positional,u=o.stdin,d=``,f=0;for(let e of l)try{let t=o.fs.resolvePath(o.cwd,e);c?await o.fs.appendFile(t,u):await o.fs.writeFile(t,u)}catch{d+=`tee: ${e}: No such file or directory
2
2
  `,f=1}return{stdout:u,stderr:d,exitCode:f}}},o={name:`tee`,flags:[{flag:`-a`,type:`boolean`}],stdinType:`text`,needsArgs:!0};export{a as n,o as t};
3
- //# sourceMappingURL=chunk-55VFSPNA-o6aQtPTI.mjs.map
3
+ //# sourceMappingURL=chunk-55VFSPNA-DLwfww5b.mjs.map
@@ -1,5 +1,5 @@
1
- import{t as e}from"./chunk-DXB73IDG-DfmyzFzL.mjs";function t(){let e=[{prop:`Function`,target:globalThis,violationType:`function_constructor`,strategy:`throw`,reason:`Function constructor allows arbitrary code execution`},{prop:`eval`,target:globalThis,violationType:`eval`,strategy:`throw`,reason:`eval() allows arbitrary code execution`},{prop:`setTimeout`,target:globalThis,violationType:`setTimeout`,strategy:`throw`,reason:`setTimeout with string argument allows code execution`},{prop:`setInterval`,target:globalThis,violationType:`setInterval`,strategy:`throw`,reason:`setInterval with string argument allows code execution`},{prop:`setImmediate`,target:globalThis,violationType:`setImmediate`,strategy:`throw`,reason:`setImmediate could be used to escape sandbox context`},{prop:`env`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.env could leak sensitive environment variables`,allowedKeys:new Set([`NODE_V8_COVERAGE`,`NODE_DEBUG`,`NODE_DEBUG_NATIVE`,`NODE_COMPILE_CACHE`,`WATCH_REPORT_DEPENDENCIES`,`FORCE_COLOR`,`DEBUG`,`UNDICI_NO_FG`,`JEST_WORKER_ID`,`__MINIMATCH_TESTING_PLATFORM__`,`LOG_TOKENS`,`LOG_STREAM`])},{prop:`binding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process.binding provides access to native Node.js modules`},{prop:`_linkedBinding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process._linkedBinding provides access to native Node.js modules`},{prop:`dlopen`,target:process,violationType:`process_dlopen`,strategy:`throw`,reason:`process.dlopen allows loading native addons`},{prop:`getBuiltinModule`,target:process,violationType:`process_get_builtin_module`,strategy:`throw`,reason:`process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)`},{prop:`exit`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.exit could terminate the interpreter`},{prop:`abort`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.abort could crash the interpreter`},{prop:`kill`,target:process,violationType:`process_kill`,strategy:`throw`,reason:`process.kill could signal other processes`},{prop:`setuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setuid could escalate privileges`},{prop:`setgid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgid could escalate privileges`},{prop:`seteuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.seteuid could escalate effective user privileges`},{prop:`setegid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setegid could escalate effective group privileges`},{prop:`initgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.initgroups could modify supplementary group IDs`},{prop:`setgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgroups could modify supplementary group IDs`},{prop:`umask`,target:process,violationType:`process_umask`,strategy:`throw`,reason:`process.umask could modify file creation permissions`},{prop:`argv`,target:process,violationType:`process_argv`,strategy:`throw`,reason:`process.argv may contain secrets in CLI arguments`},{prop:`cwd`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.cwd could disclose real host working directory path`},{prop:`chdir`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.chdir could confuse the interpreter's CWD tracking`},{prop:`report`,target:process,violationType:`process_report`,strategy:`throw`,reason:`process.report could disclose full environment, host paths, and system info`},{prop:`loadEnvFile`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.loadEnvFile could load env files bypassing env proxy`},{prop:`setUncaughtExceptionCaptureCallback`,target:process,violationType:`process_exception_handler`,strategy:`throw`,reason:`setUncaughtExceptionCaptureCallback could intercept security errors`},{prop:`send`,target:process,violationType:`process_send`,strategy:`throw`,reason:`process.send could communicate with parent process in IPC contexts`},{prop:`channel`,target:process,violationType:`process_channel`,strategy:`throw`,reason:`process.channel could access IPC channel to parent process`},{prop:`cpuUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.cpuUsage could enable timing side-channel attacks`},{prop:`memoryUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.memoryUsage could enable timing side-channel attacks`},{prop:`hrtime`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.hrtime could enable timing side-channel attacks`},{prop:`WeakRef`,target:globalThis,violationType:`weak_ref`,strategy:`throw`,reason:`WeakRef could be used to leak references outside sandbox`},{prop:`FinalizationRegistry`,target:globalThis,violationType:`finalization_registry`,strategy:`throw`,reason:`FinalizationRegistry could be used to leak references outside sandbox`},{prop:`Reflect`,target:globalThis,violationType:`reflect`,strategy:`freeze`,reason:`Reflect provides introspection capabilities`},{prop:`Proxy`,target:globalThis,violationType:`proxy`,strategy:`throw`,reason:`Proxy allows intercepting and modifying object behavior`},{prop:`WebAssembly`,target:globalThis,violationType:`webassembly`,strategy:`throw`,reason:`WebAssembly allows executing arbitrary compiled code`},{prop:`SharedArrayBuffer`,target:globalThis,violationType:`shared_array_buffer`,strategy:`throw`,reason:`SharedArrayBuffer could enable side-channel communication or timing attacks`},{prop:`Atomics`,target:globalThis,violationType:`atomics`,strategy:`throw`,reason:`Atomics could enable side-channel communication or timing attacks`},{prop:`performance`,target:globalThis,violationType:`performance_timing`,strategy:`throw`,reason:`performance.now() provides sub-millisecond timing for side-channel attacks`},{prop:`stdout`,target:process,violationType:`process_stdout`,strategy:`throw`,reason:`process.stdout could bypass interpreter output to write to host stdout`},{prop:`stderr`,target:process,violationType:`process_stderr`,strategy:`throw`,reason:`process.stderr could bypass interpreter output to write to host stderr`},{prop:`__defineGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineGetter__ allows prototype pollution via getter injection`},{prop:`__defineSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineSetter__ allows prototype pollution via setter injection`},{prop:`__lookupGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupGetter__ enables introspection for prototype pollution attacks`},{prop:`__lookupSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupSetter__ enables introspection for prototype pollution attacks`},{prop:`JSON`,target:globalThis,violationType:`json_mutation`,strategy:`freeze`,reason:`Freeze JSON to prevent mutation of parsing/serialization`},{prop:`Math`,target:globalThis,violationType:`math_mutation`,strategy:`freeze`,reason:`Freeze Math to prevent mutation of math utilities`}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async()=>{}),violationType:`async_function_constructor`,strategy:`throw`,reason:`AsyncFunction constructor allows arbitrary async code execution`})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(function*(){}),violationType:`generator_function_constructor`,strategy:`throw`,reason:`GeneratorFunction constructor allows arbitrary generator code execution`})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async function*(){}),violationType:`async_generator_function_constructor`,strategy:`throw`,reason:`AsyncGeneratorFunction constructor allows arbitrary async generator code execution`})}catch{}return e.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var n=typeof __BROWSER__<`u`&&__BROWSER__;function r(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var i=null;if(!n)try{let{AsyncLocalStorage:t}=e(`node:async_hooks`);i=t}catch{}var a=`
1
+ import{t as e}from"./chunk-DXB73IDG-DIKSLkPq.mjs";function t(){let e=[{prop:`Function`,target:globalThis,violationType:`function_constructor`,strategy:`throw`,reason:`Function constructor allows arbitrary code execution`},{prop:`eval`,target:globalThis,violationType:`eval`,strategy:`throw`,reason:`eval() allows arbitrary code execution`},{prop:`setTimeout`,target:globalThis,violationType:`setTimeout`,strategy:`throw`,reason:`setTimeout with string argument allows code execution`},{prop:`setInterval`,target:globalThis,violationType:`setInterval`,strategy:`throw`,reason:`setInterval with string argument allows code execution`},{prop:`setImmediate`,target:globalThis,violationType:`setImmediate`,strategy:`throw`,reason:`setImmediate could be used to escape sandbox context`},{prop:`env`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.env could leak sensitive environment variables`,allowedKeys:new Set([`NODE_V8_COVERAGE`,`NODE_DEBUG`,`NODE_DEBUG_NATIVE`,`NODE_COMPILE_CACHE`,`WATCH_REPORT_DEPENDENCIES`,`FORCE_COLOR`,`DEBUG`,`UNDICI_NO_FG`,`JEST_WORKER_ID`,`__MINIMATCH_TESTING_PLATFORM__`,`LOG_TOKENS`,`LOG_STREAM`])},{prop:`binding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process.binding provides access to native Node.js modules`},{prop:`_linkedBinding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process._linkedBinding provides access to native Node.js modules`},{prop:`dlopen`,target:process,violationType:`process_dlopen`,strategy:`throw`,reason:`process.dlopen allows loading native addons`},{prop:`getBuiltinModule`,target:process,violationType:`process_get_builtin_module`,strategy:`throw`,reason:`process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)`},{prop:`exit`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.exit could terminate the interpreter`},{prop:`abort`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.abort could crash the interpreter`},{prop:`kill`,target:process,violationType:`process_kill`,strategy:`throw`,reason:`process.kill could signal other processes`},{prop:`setuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setuid could escalate privileges`},{prop:`setgid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgid could escalate privileges`},{prop:`seteuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.seteuid could escalate effective user privileges`},{prop:`setegid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setegid could escalate effective group privileges`},{prop:`initgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.initgroups could modify supplementary group IDs`},{prop:`setgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgroups could modify supplementary group IDs`},{prop:`umask`,target:process,violationType:`process_umask`,strategy:`throw`,reason:`process.umask could modify file creation permissions`},{prop:`argv`,target:process,violationType:`process_argv`,strategy:`throw`,reason:`process.argv may contain secrets in CLI arguments`},{prop:`cwd`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.cwd could disclose real host working directory path`},{prop:`chdir`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.chdir could confuse the interpreter's CWD tracking`},{prop:`report`,target:process,violationType:`process_report`,strategy:`throw`,reason:`process.report could disclose full environment, host paths, and system info`},{prop:`loadEnvFile`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.loadEnvFile could load env files bypassing env proxy`},{prop:`setUncaughtExceptionCaptureCallback`,target:process,violationType:`process_exception_handler`,strategy:`throw`,reason:`setUncaughtExceptionCaptureCallback could intercept security errors`},{prop:`send`,target:process,violationType:`process_send`,strategy:`throw`,reason:`process.send could communicate with parent process in IPC contexts`},{prop:`channel`,target:process,violationType:`process_channel`,strategy:`throw`,reason:`process.channel could access IPC channel to parent process`},{prop:`cpuUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.cpuUsage could enable timing side-channel attacks`},{prop:`memoryUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.memoryUsage could enable timing side-channel attacks`},{prop:`hrtime`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.hrtime could enable timing side-channel attacks`},{prop:`WeakRef`,target:globalThis,violationType:`weak_ref`,strategy:`throw`,reason:`WeakRef could be used to leak references outside sandbox`},{prop:`FinalizationRegistry`,target:globalThis,violationType:`finalization_registry`,strategy:`throw`,reason:`FinalizationRegistry could be used to leak references outside sandbox`},{prop:`Reflect`,target:globalThis,violationType:`reflect`,strategy:`freeze`,reason:`Reflect provides introspection capabilities`},{prop:`Proxy`,target:globalThis,violationType:`proxy`,strategy:`throw`,reason:`Proxy allows intercepting and modifying object behavior`},{prop:`WebAssembly`,target:globalThis,violationType:`webassembly`,strategy:`throw`,reason:`WebAssembly allows executing arbitrary compiled code`},{prop:`SharedArrayBuffer`,target:globalThis,violationType:`shared_array_buffer`,strategy:`throw`,reason:`SharedArrayBuffer could enable side-channel communication or timing attacks`},{prop:`Atomics`,target:globalThis,violationType:`atomics`,strategy:`throw`,reason:`Atomics could enable side-channel communication or timing attacks`},{prop:`performance`,target:globalThis,violationType:`performance_timing`,strategy:`throw`,reason:`performance.now() provides sub-millisecond timing for side-channel attacks`},{prop:`stdout`,target:process,violationType:`process_stdout`,strategy:`throw`,reason:`process.stdout could bypass interpreter output to write to host stdout`},{prop:`stderr`,target:process,violationType:`process_stderr`,strategy:`throw`,reason:`process.stderr could bypass interpreter output to write to host stderr`},{prop:`__defineGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineGetter__ allows prototype pollution via getter injection`},{prop:`__defineSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineSetter__ allows prototype pollution via setter injection`},{prop:`__lookupGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupGetter__ enables introspection for prototype pollution attacks`},{prop:`__lookupSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupSetter__ enables introspection for prototype pollution attacks`},{prop:`JSON`,target:globalThis,violationType:`json_mutation`,strategy:`freeze`,reason:`Freeze JSON to prevent mutation of parsing/serialization`},{prop:`Math`,target:globalThis,violationType:`math_mutation`,strategy:`freeze`,reason:`Freeze Math to prevent mutation of math utilities`}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async()=>{}),violationType:`async_function_constructor`,strategy:`throw`,reason:`AsyncFunction constructor allows arbitrary async code execution`})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(function*(){}),violationType:`generator_function_constructor`,strategy:`throw`,reason:`GeneratorFunction constructor allows arbitrary generator code execution`})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async function*(){}),violationType:`async_generator_function_constructor`,strategy:`throw`,reason:`AsyncGeneratorFunction constructor allows arbitrary async generator code execution`})}catch{}return e.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var n=typeof __BROWSER__<`u`&&__BROWSER__;function r(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var i=null;if(!n)try{let{AsyncLocalStorage:t}=e(`node:async_hooks`);i=t}catch{}var a=`
2
2
 
3
3
  This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`,o=class extends Error{violation;constructor(e,t){super(e+a),this.violation=t,this.name=`SecurityViolationError`}},s=!n&&i?new i:null,c=1e3;function l(e,t,...n){return s.run(e,()=>t(...n))}var u={enabled:!0,auditMode:!1};function d(e){return e===void 0?{...u,enabled:!1}:typeof e==`boolean`?{...u,enabled:e}:{...u,...e}}var f=class i{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=d(e);if(!i.instance)i.instance=new i(t);else{let e=i.instance.config;if(t.enabled!==e.enabled||t.auditMode!==e.auditMode)throw Error(`DefenseInDepthBox config conflict: requested {enabled: ${t.enabled}, auditMode: ${t.auditMode}} but singleton already has {enabled: ${e.enabled}, auditMode: ${e.auditMode}}. All Bash instances must use the same defense-in-depth security settings, or call DefenseInDepthBox.resetInstance() between incompatible configurations.`)}return i.instance}static resetInstance(){i.instance&&=(i.instance.forceDeactivate(),null),i.trustedExecutionDepth.clear()}static isInSandboxedContext(){return s?s?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(s)return s?.getStore()?.executionId}static enterTrustedScope(e){let t=i.trustedExecutionDepth.get(e)??0;i.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=i.trustedExecutionDepth.get(e);if(t){if(t===1){i.trustedExecutionDepth.delete(e);return}i.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(i.trustedExecutionDepth.get(e)??0)>0:!1}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}getPreferredActiveExecutionId(){if(this.activeExecutionIds.size!==0)for(let e of this.activeExecutionIds)return e}static bindCurrentContext(e){if(!s)return e;let t=i.instance,n=s.getStore(),r=n?.sandboxActive===!0?n.executionId:t?.getPreferredActiveExecutionId();if(!r)return e;let a=t?.getCachedContext(r)??{sandboxActive:!0,executionId:r};return((...t)=>{let n=i.instance;if(!(n&&!n.isExecutionIdActive(r)&&(n.recordViolation(`bound_callback_after_deactivate`,`bound callback`,`Bound callback blocked after originating execution was deactivated`),!n.config.auditMode)))return l(a,e,...t)})}isEnabled(){return this.config.enabled===!0&&s!==null&&!n}updateConfig(e){this.config={...this.config,...e}}activate(){if(n||!this.config.enabled||!s){let e=r(),t=!1;return{run:e=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):e(),deactivate:()=>{t=!0},executionId:e}}this.refCount++,this.refCount===1&&(this.applyPatches(),this.activationTime=Date.now());let e=r(),t=!1;return{run:n=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):(this.activeExecutionIds.add(e),s.run({sandboxActive:!0,executionId:e},n)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},()=>{i.enterTrustedScope(n);try{let t=e();return typeof t==`object`&&t&&`finally`in t&&typeof t.finally==`function`?t.finally(()=>{i.leaveTrustedScope(n)}):(i.leaveTrustedScope(n),t)}catch(e){throw i.leaveTrustedScope(n),e}})}static async runTrustedAsync(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},async()=>{i.enterTrustedScope(n);try{return await e()}finally{i.leaveTrustedScope(n)}})}shouldBlock(){if(n||this.config.auditMode||!s)return!1;let e=s?.getStore();return!(e?.sandboxActive!==!0||e.trusted||i.isTrustedScopeActive(e.executionId))}recordViolation(e,t,n){let r={timestamp:Date.now(),type:e,message:n,path:t,stack:Error().stack,executionId:s?.getStore()?.executionId};if(this.violations.length<c&&this.violations.push(r),this.config.onViolation)try{this.config.onViolation(r)}catch(e){console.debug(`[DefenseInDepthBox] onViolation callback threw:`,e instanceof Error?e.message:e)}return r}createBlockingProxy(e,t,n){let r=this;return new Proxy(e,{apply(e,i,a){if(r.shouldBlock()){let e=`${t} is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} called (audit mode)`),Reflect.apply(e,i,a)},construct(e,i,a){if(r.shouldBlock()){let e=`${t} constructor is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} constructor called (audit mode)`),Reflect.construct(e,i,a)}})}createBlockingObjectProxy(e,t,n,r){let i=this;return new Proxy(e,{get(e,a,c){if(i.shouldBlock()){if(r&&typeof a==`string`&&r.has(a))return Reflect.get(e,a,c);let s=`${t}.${String(a)}`,l=`${s} is blocked during script execution`;throw new o(l,i.recordViolation(n,s,l))}if(i.config.auditMode&&s?.getStore()?.sandboxActive===!0){let e=`${t}.${String(a)}`;i.recordViolation(n,e,`${e} accessed (audit mode)`)}return Reflect.get(e,a,c)},set(e,r,a,s){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} modification is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.set(e,r,a,s)},ownKeys(e){if(i.shouldBlock()){let e=`${t} enumeration is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} descriptor access is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.getOwnPropertyDescriptor(e,r)},has(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} existence check is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.has(e,r)},deleteProperty(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} deletion is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.deleteProperty(e,r)},setPrototypeOf(e,r){if(i.shouldBlock()){let e=`${t} setPrototypeOf is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.setPrototypeOf(e,r)},defineProperty(e,r,a){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} defineProperty is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.defineProperty(e,r,a)}})}applyPatches(){this.patchFailures=[];let e=t(),n=new Set([`process_send`,`process_channel`,`process_stdout`,`process_stderr`]);for(let t of e)n.has(t.violationType)||this.applyPatch(t);this.protectConstructorChain(),this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.lockWellKnownSymbols(),this.protectProxyRevocable();let r=[`Function.prototype.constructor`,`Module._load`],i=this.patchFailures.filter(e=>r.includes(e));if(i.length>0)throw this.restorePatches(),Error(`DefenseInDepthBox: critical patches failed: ${i.join(`, `)}`)}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,`Function.prototype.constructor`,`function_constructor`);try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`AsyncFunction.prototype.constructor`,`async_function_constructor`)}catch(e){this.patchFailures.push(`AsyncFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`GeneratorFunction.prototype.constructor`,`generator_function_constructor`)}catch(e){this.patchFailures.push(`GeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,`AsyncGeneratorFunction.prototype.constructor`,`async_generator_function_constructor`)}catch(e){this.patchFailures.push(`AsyncGeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,`prepareStackTrace`);this.originalDescriptors.push({target:Error,prop:`prepareStackTrace`,descriptor:t});let n=t?.value;Object.defineProperty(Error,`prepareStackTrace`,{get(){return n},set(t){if(e.shouldBlock()){let t=`Error.prepareStackTrace modification is blocked during script execution`;throw new o(t,e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,t))}e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,`Error.prepareStackTrace set (audit mode)`),n=t},configurable:!0})}catch(e){this.patchFailures.push(`Error.prepareStackTrace`),console.debug(`[DefenseInDepthBox] Could not protect Error.prepareStackTrace:`,e instanceof Error?e.message:e)}}protectPromiseThen(){let e=this;try{let t=function(...e){return s.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation(`promise_then_after_deactivate`,`Promise.then`,`Promise.then callback is blocked after defense deactivation`),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,e);if(this.kind===`fulfilled`)return e[0];throw e[0]}return Reflect.apply(this.cb,void 0,e)})},n=Object.getOwnPropertyDescriptor(Promise.prototype,`then`);this.originalDescriptors.push({target:Promise.prototype,prop:`then`,descriptor:n});let r=n?.value;if(typeof r!=`function`)return;Object.defineProperty(Promise.prototype,`then`,{value:function(n,i){if(!s)return Reflect.apply(r,this,[n,i]);let a=s.getStore(),o=a?.sandboxActive===!0&&a.trusted!==!0?a.executionId:void 0;if(!o)return Reflect.apply(r,this,[n,i]);let c=e.getCachedContext(o),l=(n,r)=>typeof n==`function`?t.bind({box:e,executionId:o,captured:c,cb:n,kind:r}):n;return Reflect.apply(r,this,[l(n,`fulfilled`),l(i,`rejected`)])},writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Promise.prototype.then`),console.debug(`[DefenseInDepthBox] Could not protect Promise.prototype.then:`,e instanceof Error?e.message:e)}}patchPrototypeConstructor(e,t,n){let r=this;try{let i=Object.getOwnPropertyDescriptor(e,`constructor`);this.originalDescriptors.push({target:e,prop:`constructor`,descriptor:i});let a=i?.value;Object.defineProperty(e,`constructor`,{get(){if(r.shouldBlock()){let e=`${t} access is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} accessed (audit mode)`),a},set(e){if(r.shouldBlock()){let e=`${t} modification is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}Object.defineProperty(this,`constructor`,{value:e,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,e instanceof Error?e.message:e)}}protectProcessMainModule(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`mainModule`);this.originalDescriptors.push({target:process,prop:`mainModule`,descriptor:t});let n=t?.value;n!==void 0&&Object.defineProperty(process,`mainModule`,{get(){if(e.shouldBlock()){let t=`process.mainModule access is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_main_module`,`process.mainModule`,`process.mainModule accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.mainModule modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}Object.defineProperty(process,`mainModule`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.mainModule`),console.debug(`[DefenseInDepthBox] Could not protect process.mainModule:`,e instanceof Error?e.message:e)}}protectProcessExecPath(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`execPath`);this.originalDescriptors.push({target:process,prop:`execPath`,descriptor:t});let n=t?.value??process.execPath;Object.defineProperty(process,`execPath`,{get(){if(e.shouldBlock()){let t=`process.execPath access is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_exec_path`,`process.execPath`,`process.execPath accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.execPath modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}Object.defineProperty(process,`execPath`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.execPath`),console.debug(`[DefenseInDepthBox] Could not protect process.execPath:`,e instanceof Error?e.message:e)}}lockWellKnownSymbols(){let e=(e,t)=>{try{let n=Object.getOwnPropertyDescriptor(e,t);if(n?.configurable){if(`value`in n){Object.defineProperty(e,t,{...n,configurable:!1,writable:!1});return}Object.defineProperty(e,t,{...n,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag);try{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);this.originalDescriptors.push({target:Error,prop:`stackTraceLimit`,descriptor:e}),Object.defineProperty(Error,`stackTraceLimit`,{value:Error.stackTraceLimit,writable:!1,configurable:!0})}catch{}}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!=`function`)return;let n=Object.getOwnPropertyDescriptor(Proxy,`revocable`);this.originalDescriptors.push({target:Proxy,prop:`revocable`,descriptor:n}),Object.defineProperty(Proxy,`revocable`,{value:function(n,r){if(e.shouldBlock()){let t=`Proxy.revocable is blocked during script execution`;throw new o(t,e.recordViolation(`proxy`,`Proxy.revocable`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`proxy`,`Proxy.revocable`,`Proxy.revocable called (audit mode)`),t(n,r)},writable:!1,configurable:!0})}catch(e){this.patchFailures.push(`Proxy.revocable`),console.debug(`[DefenseInDepthBox] Could not protect Proxy.revocable:`,e instanceof Error?e.message:e)}}protectDynamicImport(){if(!(n||i.importHooksRegistered))try{let t=this,n=e(`node:module`),r=new Set;for(let e of n.builtinModules??[]){let t=e.startsWith(`node:`)?e.slice(5):e;r.add(t);let n=t.indexOf(`/`);n>0&&r.add(t.slice(0,n))}let a=e=>{if(e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`file:`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`http:`)||e.startsWith(`https:`))return!1;let t=e.startsWith(`node:`)?e.slice(5):e;if(!t)return!1;if(typeof n.isBuiltin==`function`&&n.isBuiltin(t)||r.has(t))return!0;let i=t.indexOf(`/`);return i>0&&r.has(t.slice(0,i))},c=()=>{let e=s?.getStore();return t.config.auditMode===!0&&e?.sandboxActive===!0&&e.trusted!==!0&&!i.isTrustedScopeActive(e.executionId)};if(typeof n.registerHooks==`function`){n.registerHooks({resolve(e,n,r){if(e.startsWith(`data:`)||e.startsWith(`blob:`))throw Error(`dynamic import of ${e.startsWith(`data:`)?`data:`:`blob:`} URLs is blocked by defense-in-depth`);if(a(e)){let n=`import(${e})`,r=`dynamic import of Node.js builtin '${e}' is blocked during script execution`;if(t.shouldBlock())throw new o(r,t.recordViolation(`dynamic_import_builtin`,n,r));c()&&t.recordViolation(`dynamic_import_builtin`,n,`dynamic import of Node.js builtin '${e}' called (audit mode)`)}return r(e,n)}}),i.importHooksRegistered=!0;return}if(typeof n.register==`function`){let e=[`export async function resolve(specifier, context, nextResolve) {`,` if (specifier.startsWith("data:") || specifier.startsWith("blob:")) {`,` throw new Error("dynamic import of " + (specifier.startsWith("data:") ? "data:" : "blob:") + " URLs is blocked by defense-in-depth");`,` }`,` return nextResolve(specifier, context);`,`}`].join(`
4
4
  `);n.register(`data:text/javascript,${encodeURIComponent(e)}`),i.importHooksRegistered=!0}}catch(e){console.debug(`[DefenseInDepthBox] Could not register import() hooks:`,e instanceof Error?e.message:e)}}protectModuleLoad(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._load!=`function`)return;let n=t._load,r=Object.getOwnPropertyDescriptor(t,`_load`);this.originalDescriptors.push({target:t,prop:`_load`,descriptor:r});let i=this.createBlockingProxy(n,`Module._load`,`module_load`);Object.defineProperty(t,`_load`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._load`),console.debug(`[DefenseInDepthBox] Could not protect Module._load:`,e instanceof Error?e.message:e)}}protectModuleResolveFilename(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._resolveFilename!=`function`)return;let n=t._resolveFilename,r=Object.getOwnPropertyDescriptor(t,`_resolveFilename`);this.originalDescriptors.push({target:t,prop:`_resolveFilename`,descriptor:r});let i=this.createBlockingProxy(n,`Module._resolveFilename`,`module_resolve_filename`);Object.defineProperty(t,`_resolveFilename`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._resolveFilename`),console.debug(`[DefenseInDepthBox] Could not protect Module._resolveFilename:`,e instanceof Error?e.message:e)}}applyPatch(e){let{target:t,prop:n,violationType:r,strategy:i}=e;try{let a=t[n];if(a===void 0)return;let o=Object.getOwnPropertyDescriptor(t,n);if(this.originalDescriptors.push({target:t,prop:n,descriptor:o}),i===`freeze`)typeof a==`object`&&a&&Object.freeze(a);else{let i=this.getPathForTarget(t,n),o=typeof a==`function`?this.createBlockingProxy(a,i,r):this.createBlockingObjectProxy(a,i,r,e.allowedKeys);Object.defineProperty(t,n,{value:o,writable:!0,configurable:!0})}}catch(e){let r=this.getPathForTarget(t,n);this.patchFailures.push(r),console.debug(`[DefenseInDepthBox] Could not patch ${r}:`,e instanceof Error?e.message:e)}}restorePatches(){for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:n,descriptor:r}=this.originalDescriptors[e];try{r?Object.defineProperty(t,n,r):delete t[n]}catch(e){let r=this.getPathForTarget(t,n);console.debug(`[DefenseInDepthBox] Could not restore ${r}:`,e instanceof Error?e.message:e)}}this.originalDescriptors=[]}};export{o as n,f as t};
5
- //# sourceMappingURL=chunk-5QMZ5MUS-SLhNX8t9.mjs.map
5
+ //# sourceMappingURL=chunk-5QMZ5MUS-CAp625aG.mjs.map