better-dsh 0.2.5 → 0.3.0-c

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 (1002) hide show
  1. package/README.md +27 -3
  2. package/THIRD_PARTY_NOTICES.md +52 -0
  3. package/cordis.patch.yml +44 -0
  4. package/docs/20_specs/ast/spec.md +26 -3
  5. package/docs/20_specs/dvc/spec.md +20 -1
  6. package/docs/50_test-reports/2026-10-02-better-dsh-schemastery/344/276/235/350/265/226/345/243/260/346/230/216/344/277/256/345/244/215/345/256/236/346/265/213/346/212/245/345/221/212.md +62 -0
  7. package/docs/50_test-reports/2026-10-03-ast-engine-deomp-4999/345/256/236/346/265/213/346/212/245/345/221/212.md +325 -0
  8. package/docs/50_test-reports/2026-10-03-better-dsh-tool-surface-repl-dvc-browser-ast-lsp-4999/345/256/236/346/265/213/346/212/245/345/221/212.md +185 -0
  9. package/docs/50_test-reports/2026-10-03-docs-packaging-trim/345/256/236/346/265/213/346/212/245/345/221/212.md +82 -0
  10. package/docs/50_test-reports/2026-10-03-physical-import/344/270/216llm-completion-ast/347/233/270/345/257/271/350/267/257/345/276/204/344/277/256/345/244/215/345/256/236/346/265/213/346/212/245/345/221/212.md +101 -0
  11. package/docs/50_test-reports/2026-10-03-pnpm11/345/271/264/351/276/204/351/227/250/351/224/201/346/226/207/344/273/266/347/233/270/344/275/215/345/256/236/350/257/201.md +54 -0
  12. package/docs/50_test-reports/2026-10-03-remote-BYO-PTY-label/351/207/215/346/236/204/347/254/254/344/270/200/344/272/272/347/247/260/345/256/236/346/265/213/346/212/245/345/221/212.md +447 -0
  13. package/docs/50_test-reports/2026-10-03-schemastery-cosmokit/346/272/220/347/240/201/345/206/205/350/201/224/345/256/236/346/265/213/346/212/245/345/221/212.md +63 -0
  14. package/docs/50_test-reports/2026-10-03-zero-npm-runtime-deps/345/256/236/346/265/213/346/212/245/345/221/212.md +82 -0
  15. package/docs/50_test-reports/2026-10-04-ast-engine-deomp-0.2.5-d/345/217/221/345/270/203/351/252/214/346/224/266/346/212/245/345/221/212.md +220 -0
  16. package/docs/50_test-reports/2026-10-04-ast_grep/344/270/216ast_edit/345/245/221/347/272/246/344/270/216/350/276/271/347/225/214/345/256/236/346/265/213/346/212/245/345/221/212.md +151 -0
  17. package/docs/50_test-reports/2026-10-06-authentication-only-web-admission-4999.md +63 -0
  18. package/docs/50_test-reports/2026-10-07-better-dsh-welcome-self-contained-4999.md +52 -0
  19. package/docs/dev-test-environment-notes.md +137 -0
  20. package/docs/specs/ast/spec.md +26 -3
  21. package/docs/specs/ast-engine-deomp/spec.md +170 -0
  22. package/docs/specs/authentication-only-web-admission/spec.md +51 -0
  23. package/docs/specs/docs-packaging-trim/spec.md +110 -0
  24. package/docs/specs/dvc/spec.md +20 -1
  25. package/docs/specs/remote-pty-label/spec.md +126 -0
  26. package/docs/specs/welcome-self-contained/spec.md +13 -0
  27. package/docs/specs/zero-npm-runtime-deps/spec.md +85 -0
  28. package/docs/superpowers/plans/2026-10-03-ast-engine-deomp.md +1214 -0
  29. package/docs/superpowers/plans/2026-10-03-docs-packaging-trim.md +181 -0
  30. package/dsh-docs/baseline.md +13 -0
  31. package/dsh-docs/subsystems/invariants.md +3 -0
  32. package/dsh-docs/subsystems/invariants.zh.md +3 -0
  33. package/lib/BrowserWebSocketTransport-D1aFReu_.js +4 -0
  34. package/lib/BrowserWebSocketTransport-wm99h94r.js +39 -0
  35. package/lib/LaunchOptions-B874eBu2.js +4 -0
  36. package/lib/LaunchOptions-kGXcZOe0.js +17 -0
  37. package/lib/NodeWebSocketTransport-BRLjmu2R.js +4 -0
  38. package/lib/NodeWebSocketTransport-D9ysYGLM.js +3634 -0
  39. package/lib/ast-assets/ast-grep.wasm +0 -0
  40. package/lib/ast-assets/tree-sitter-bash.wasm +0 -0
  41. package/lib/ast-assets/tree-sitter-c.wasm +0 -0
  42. package/lib/ast-assets/tree-sitter-cpp.wasm +0 -0
  43. package/lib/ast-assets/tree-sitter-css.wasm +0 -0
  44. package/lib/ast-assets/tree-sitter-go.wasm +0 -0
  45. package/lib/ast-assets/tree-sitter-html.wasm +0 -0
  46. package/lib/ast-assets/tree-sitter-javascript.wasm +0 -0
  47. package/lib/ast-assets/tree-sitter-json.wasm +0 -0
  48. package/lib/ast-assets/tree-sitter-python.wasm +0 -0
  49. package/lib/ast-assets/tree-sitter-ruby.wasm +0 -0
  50. package/lib/ast-assets/tree-sitter-rust.wasm +0 -0
  51. package/lib/ast-assets/tree-sitter-tsx.wasm +0 -0
  52. package/lib/ast-assets/tree-sitter-typescript.wasm +0 -0
  53. package/lib/ast-assets/tree-sitter-yaml.wasm +0 -0
  54. package/lib/ast-assets/tree-sitter.wasm +0 -0
  55. package/lib/bidi-BalpKaJc.js +16106 -0
  56. package/lib/bundle-delivery.d.ts +20 -0
  57. package/lib/bundle-delivery.js +212 -0
  58. package/lib/chunk-DQxbwPpZ.js +30 -0
  59. package/lib/client/index.js +2 -2
  60. package/lib/compaction/index.d.ts +3 -3
  61. package/lib/compaction/index.js +4 -4
  62. package/lib/failover/index.d.ts +3 -3
  63. package/lib/failover/index.js +5 -5
  64. package/lib/fs-aware/sandbox-plugin.js +22 -22
  65. package/lib/hmr.d.ts +32 -0
  66. package/lib/hmr.js +49 -0
  67. package/lib/index-DTDXUe6m.d.ts +208 -0
  68. package/lib/index-browser-CysrjMyM.js +21061 -0
  69. package/lib/index.d.ts +4 -4
  70. package/lib/index.js +399 -151
  71. package/lib/kernel-bridge.py +172 -0
  72. package/lib/{kernel-env-hxaihi9C.js → kernel-env-D8UOWeji.js} +2 -2
  73. package/lib/kernel-env.js +1 -1
  74. package/lib/lib-C8_jXvwA.js +894 -0
  75. package/lib/{lsp-server-registry-XU6aHSqZ.js → lsp-server-registry-BXvUTBY7.js} +1 -1
  76. package/lib/{lsp-server-registry-946ysdqg.js → lsp-server-registry-CH9WNFFt.js} +13 -13
  77. package/lib/main-BQeFrBM1.js +3 -0
  78. package/lib/main-CupOhMp5.js +1432 -0
  79. package/lib/mobile/plugin.d.ts +4 -4
  80. package/lib/mobile/plugin.js +10 -10
  81. package/lib/puppeteer-core-CSk2PtSm.js +1136 -0
  82. package/lib/py-sdk.js +1 -1
  83. package/lib/remote/plugin.d.ts +3 -3
  84. package/lib/remote/plugin.js +151 -56
  85. package/lib/url-schemes/index.d.ts +11 -11
  86. package/lib/url-schemes/index.js +5269 -501
  87. package/lib/util-BHL_dfV_.js +2953 -0
  88. package/lib/wasm_bg-CNXhHjVg.js +1291 -0
  89. package/lib/web-password.d.ts +7 -7
  90. package/lib/web-password.js +2 -2
  91. package/lib/web-tree-sitter-CPrPD4J2.js +3440 -0
  92. package/lib/{web-trust-BO66y72w.js → web-trust-D6gJpUMf.js} +41 -9
  93. package/lib/{web-trust-BihHCelF.d.ts → web-trust-Dej_RI2B.d.ts} +19 -12
  94. package/lib/web-trust.d.ts +2 -1
  95. package/lib/web-trust.js +2 -1
  96. package/lib/webserver.d.ts +10 -0
  97. package/lib/webserver.js +19 -0
  98. package/lib/welcome-notice.d.ts +18 -0
  99. package/lib/welcome-notice.js +59 -0
  100. package/lib/{wrap-Bzdimp4p.js → wrap-T4I0nfPM.js} +55 -52
  101. package/package.json +93 -46
  102. package/scripts/register-bundle.mjs +80 -0
  103. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/MdxPage-CTY7atqe.js +0 -11
  104. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/extract_omp.mjs +0 -42
  105. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/fetch_pi.py +0 -52
  106. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/jsx-runtime-BHwPObl3.js +0 -13
  107. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/omp_extracted.json +0 -1
  108. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/omp_pages.txt +0 -35
  109. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/package.json +0 -1
  110. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/pi_convert.py +0 -49
  111. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/pi_pages.txt +0 -30
  112. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/.tools/serialize_omp.py +0 -250
  113. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/README.md +0 -80
  114. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/Overview.md +0 -88
  115. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/acp.md +0 -151
  116. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/advisor.md +0 -185
  117. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/agents-and-roles.md +0 -168
  118. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/approvals.md +0 -200
  119. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/cli.md +0 -381
  120. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/code-intelligence.md +0 -225
  121. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/collab.md +0 -207
  122. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/commit.md +0 -169
  123. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/compaction.md +0 -195
  124. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/computer.md +0 -224
  125. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/context-files.md +0 -184
  126. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/custom-models.md +0 -284
  127. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/custom-tools.md +0 -248
  128. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/debugging.md +0 -254
  129. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/editing.md +0 -157
  130. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/env.md +0 -552
  131. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/extension-authoring.md +0 -378
  132. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/files.md +0 -144
  133. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/github.md +0 -175
  134. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/goal.md +0 -156
  135. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/handoff.md +0 -139
  136. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/hooks.md +0 -257
  137. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/keybindings.md +0 -204
  138. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/magic-keywords.md +0 -135
  139. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/marketplace.md +0 -269
  140. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/mcp-authoring.md +0 -243
  141. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/mcp.md +0 -260
  142. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/memory.md +0 -306
  143. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/modes.md +0 -214
  144. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/pages.txt +0 -56
  145. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/plan.md +0 -126
  146. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/plugins.md +0 -287
  147. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/prewalk.md +0 -122
  148. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/prompt-templates.md +0 -149
  149. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/providers.md +0 -229
  150. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/quickstart.md +0 -117
  151. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/review.md +0 -248
  152. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/roles.md +0 -247
  153. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/rpc.md +0 -523
  154. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/sdk.md +0 -260
  155. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/secrets.md +0 -199
  156. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/security.md +0 -260
  157. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/session-format.md +0 -254
  158. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/session-tree.md +0 -135
  159. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/sessions.md +0 -223
  160. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/settings.md +0 -290
  161. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/skills.md +0 -187
  162. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/slash.md +0 -328
  163. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/subagent-authoring.md +0 -165
  164. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/subagents.md +0 -149
  165. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/themes.md +0 -230
  166. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/tools.md +0 -120
  167. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/ttsr.md +0 -242
  168. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/using.md +0 -214
  169. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/vibe.md +0 -187
  170. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/omp/web.md +0 -233
  171. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/compaction.md +0 -427
  172. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/containerization.md +0 -162
  173. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/custom-provider.md +0 -782
  174. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/development.md +0 -96
  175. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/environment-variables.md +0 -104
  176. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/extensions.md +0 -3058
  177. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/index.md +0 -89
  178. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/json.md +0 -105
  179. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/keybindings.md +0 -244
  180. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/llama-cpp.md +0 -106
  181. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/models.md +0 -587
  182. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/packages.md +0 -234
  183. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/pages.txt +0 -30
  184. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/prompt-templates.md +0 -101
  185. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/providers.md +0 -327
  186. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/quickstart.md +0 -172
  187. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/rpc.md +0 -1679
  188. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/sdk.md +0 -1239
  189. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/security.md +0 -64
  190. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/session-format.md +0 -454
  191. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/sessions.md +0 -150
  192. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/settings.md +0 -374
  193. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/shell-aliases.md +0 -18
  194. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/skills.md +0 -241
  195. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/terminal-setup.md +0 -199
  196. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/termux.md +0 -135
  197. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/themes.md +0 -328
  198. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/tmux.md +0 -68
  199. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/tui.md +0 -965
  200. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/usage.md +0 -315
  201. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/pi-and-omp/pi/windows.md +0 -44
  202. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/src-scripts/crawl.py +0 -103
  203. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/src-scripts/docs-tree.json +0 -82965
  204. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/src-scripts/download.py +0 -56
  205. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/src-scripts/gen_mapping.py +0 -125
  206. package/docs/80_upstream-docs-and-skills/dsh-dev-skill/src-scripts/pages.json +0 -232
  207. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/api-plugins.json +0 -1
  208. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/api-skills.json +0 -4
  209. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/_category_.json +0 -8
  210. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/acp-internals.md +0 -181
  211. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/adding-platform-adapters.md +0 -788
  212. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/adding-providers.md +0 -464
  213. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/adding-tools.md +0 -211
  214. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/agent-loop.md +0 -242
  215. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/architecture.md +0 -279
  216. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/billing-lifecycle.md +0 -184
  217. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/browser-provider-plugin.md +0 -153
  218. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/browser-supervisor.md +0 -198
  219. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/chronos-managed-cron-contract.md +0 -227
  220. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/cli-internals.md +0 -85
  221. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/codebase-ownership.md +0 -34
  222. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/completion-backlog-delivery.md +0 -52
  223. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/context-compression-and-caching.md +0 -642
  224. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/context-engine-plugin.md +0 -272
  225. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/contributing.md +0 -303
  226. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/creating-skills.md +0 -438
  227. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/cron-internals.md +0 -380
  228. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/desktop-plugin-sdk.md +0 -952
  229. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/egress-internals.md +0 -319
  230. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/extending-the-cli.md +0 -192
  231. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/gateway-internals.md +0 -297
  232. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/gateway-monitoring.md +0 -309
  233. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/gateway-session-lifecycle.md +0 -621
  234. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/image-gen-provider-plugin.md +0 -316
  235. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/memory-provider-plugin.md +0 -452
  236. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/micro-compaction.md +0 -406
  237. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/middleware.md +0 -266
  238. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/model-provider-plugin.md +0 -327
  239. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/multiplexing-gateway.md +0 -228
  240. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/observer-hooks.md +0 -331
  241. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/plugin-llm-access.md +0 -506
  242. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/plugins/index.md +0 -1775
  243. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/programmatic-integration.md +0 -212
  244. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/prompt-assembly.md +0 -328
  245. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/provider-runtime.md +0 -222
  246. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/relay-connector-contract.md +0 -790
  247. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/relay-shared-metrics.md +0 -487
  248. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/secret-source-plugin.md +0 -192
  249. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/session-storage.md +0 -523
  250. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/state-db-recovery.md +0 -107
  251. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/streaming-tts.md +0 -98
  252. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/subagent-lifecycle-api.md +0 -61
  253. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/terminal-environment-plugin.md +0 -140
  254. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/tools-runtime.md +0 -250
  255. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/trajectory-format.md +0 -232
  256. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/video-gen-provider-plugin.md +0 -231
  257. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/web-search-provider-plugin.md +0 -260
  258. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/developer-guide/worktree-ui-dev.md +0 -168
  259. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/_category_.json +0 -8
  260. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/installation.md +0 -200
  261. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/learning-path.md +0 -169
  262. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/nix-setup.md +0 -1234
  263. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/platform-support.md +0 -50
  264. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/quickstart.md +0 -399
  265. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/termux.md +0 -301
  266. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/getting-started/updating.md +0 -374
  267. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/_category_.json +0 -6
  268. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/agent-email-address.md +0 -93
  269. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/automate-with-cron.md +0 -292
  270. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/automation-blueprints.md +0 -595
  271. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/aws-bedrock.md +0 -196
  272. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/azure-foundry.md +0 -334
  273. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/cron-script-only.md +0 -247
  274. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/cron-troubleshooting.md +0 -235
  275. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/daily-briefing-bot.md +0 -272
  276. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/delegation-patterns.md +0 -242
  277. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/desktop-native-signin.md +0 -125
  278. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/github-pr-review-agent.md +0 -303
  279. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/google-gemini.md +0 -270
  280. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/google-vertex.md +0 -148
  281. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/local-llm-on-mac.md +0 -252
  282. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/local-ollama-setup.md +0 -338
  283. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/manage-hermes-cloud-with-mcp.md +0 -176
  284. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/microsoft-graph-app-registration.md +0 -180
  285. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/migrate-from-openclaw.md +0 -252
  286. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/minimax-oauth.md +0 -226
  287. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/oauth-over-ssh.md +0 -172
  288. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/operate-teams-meeting-pipeline.md +0 -295
  289. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/pipe-script-output.md +0 -249
  290. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/python-library.md +0 -333
  291. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/run-hermes-with-nous-portal.md +0 -276
  292. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/run-nemotron-3-ultra-free.md +0 -123
  293. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/secure-hermes-on-a-work-machine.md +0 -182
  294. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/team-telegram-assistant.md +0 -441
  295. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/tips.md +0 -238
  296. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/troubleshooting-agent-quality.md +0 -145
  297. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/use-mcp-with-hermes.md +0 -541
  298. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/use-soul-with-hermes.md +0 -264
  299. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/use-voice-mode-with-hermes.md +0 -473
  300. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/webhook-github-pr-review.md +0 -336
  301. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/work-with-skills.md +0 -290
  302. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/guides/xai-grok-oauth.md +0 -243
  303. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/index.mdx +0 -155
  304. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/integrations/buzz.md +0 -57
  305. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/integrations/index.md +0 -126
  306. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/integrations/nous-portal.md +0 -286
  307. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/integrations/providers.md +0 -1681
  308. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/_category_.json +0 -8
  309. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/automation-blueprints-catalog.mdx +0 -36
  310. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/cli-commands.md +0 -1900
  311. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/cli-symbols.md +0 -126
  312. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/environment-variables.md +0 -952
  313. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/faq.md +0 -874
  314. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/mcp-config-reference.md +0 -439
  315. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/model-catalog.md +0 -121
  316. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/optional-skills-catalog.md +0 -303
  317. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/profile-commands.md +0 -544
  318. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/skills-catalog.md +0 -132
  319. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/slash-commands.md +0 -336
  320. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/tools-reference.md +0 -399
  321. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/reference/toolsets-reference.md +0 -171
  322. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/_category_.json +0 -8
  323. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/bot-mode.md +0 -309
  324. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/checkpoints-and-rollback.md +0 -283
  325. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/cli.md +0 -591
  326. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/configuration.md +0 -2901
  327. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/configuring-models.md +0 -414
  328. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/desktop.md +0 -728
  329. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/docker.md +0 -896
  330. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/egress/index.md +0 -10
  331. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/egress/iron-proxy.md +0 -570
  332. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/egress/network-isolation.md +0 -201
  333. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/_category_.json +0 -8
  334. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/acp.md +0 -407
  335. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/api-server.md +0 -810
  336. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/batch-processing.md +0 -230
  337. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/browser.md +0 -901
  338. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/built-in-plugins.md +0 -366
  339. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/code-execution.md +0 -319
  340. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/codex-app-server-runtime.md +0 -460
  341. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/computer-use.md +0 -636
  342. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/context-files.md +0 -237
  343. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/context-references.md +0 -142
  344. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/credential-pools.md +0 -308
  345. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/credential-vault.md +0 -122
  346. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/cron.md +0 -1262
  347. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/curator.md +0 -409
  348. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/delegation.md +0 -664
  349. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/deliverable-mode.md +0 -134
  350. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/document-extraction.md +0 -58
  351. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/extending-the-dashboard.md +0 -927
  352. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/fallback-providers.md +0 -444
  353. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/goals.md +0 -293
  354. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/heartbeat.md +0 -68
  355. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/honcho.md +0 -276
  356. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/hooks.md +0 -2007
  357. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/image-generation.md +0 -347
  358. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/kanban-multi-gateway.md +0 -52
  359. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/kanban-tutorial.md +0 -310
  360. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/kanban-worker-lanes.md +0 -142
  361. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/kanban.md +0 -1327
  362. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/loops.md +0 -122
  363. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/lsp.md +0 -307
  364. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/mcp.md +0 -957
  365. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/memory-providers.md +0 -699
  366. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/memory.md +0 -466
  367. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/mixture-of-agents.md +0 -246
  368. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/overview.md +0 -57
  369. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/personality.md +0 -289
  370. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/pets.md +0 -236
  371. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/plugin-catalog.md +0 -212
  372. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/plugins.md +0 -847
  373. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/provider-routing.md +0 -229
  374. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/skills.md +0 -1112
  375. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/skins.md +0 -271
  376. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/spotify.md +0 -279
  377. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/subscription-proxy.md +0 -203
  378. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/tool-gateway.md +0 -223
  379. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/tool-search.md +0 -277
  380. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/tools.md +0 -261
  381. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/tts.md +0 -744
  382. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/vision.md +0 -214
  383. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/voice-mode.md +0 -608
  384. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/wake-word.md +0 -343
  385. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/web-dashboard.md +0 -1206
  386. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/web-search.md +0 -506
  387. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/features/x-search.md +0 -167
  388. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/git-worktrees.md +0 -196
  389. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/import-from-other-agents.md +0 -74
  390. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/local-models.md +0 -140
  391. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/managed-scope.md +0 -157
  392. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/_category_.json +0 -8
  393. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/a2a.md +0 -130
  394. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/bluebubbles.md +0 -171
  395. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/buzz.md +0 -162
  396. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/dingtalk.md +0 -283
  397. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/discord.md +0 -936
  398. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/email.md +0 -223
  399. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/feishu.md +0 -599
  400. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/google_chat.md +0 -430
  401. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/homeassistant.md +0 -269
  402. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/index.md +0 -859
  403. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/irc.md +0 -78
  404. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/line.md +0 -201
  405. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/matrix.md +0 -910
  406. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/mattermost.md +0 -340
  407. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/msgraph-webhook.md +0 -142
  408. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/ntfy.md +0 -157
  409. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/open-webui.md +0 -296
  410. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/photon.md +0 -255
  411. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/qqbot.md +0 -123
  412. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/raft.md +0 -70
  413. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/relay.md +0 -212
  414. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/signal.md +0 -262
  415. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/simplex.md +0 -151
  416. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/slack.md +0 -1093
  417. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/sms.md +0 -203
  418. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/teams-meetings.md +0 -242
  419. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/teams.md +0 -288
  420. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/telegram.md +0 -1373
  421. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/webhooks.md +0 -694
  422. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/wecom-callback.md +0 -179
  423. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/wecom.md +0 -306
  424. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/weixin.md +0 -333
  425. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/whatsapp-cloud.md +0 -417
  426. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/whatsapp.md +0 -283
  427. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/messaging/yuanbao.md +0 -342
  428. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/multi-connection-desktop.md +0 -361
  429. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/multi-profile-gateways.md +0 -1062
  430. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/profile-distributions.md +0 -757
  431. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/profiles.md +0 -418
  432. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/secrets/bitwarden.md +0 -155
  433. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/secrets/command.md +0 -50
  434. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/secrets/index.md +0 -50
  435. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/secrets/onepassword.md +0 -169
  436. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/security.md +0 -892
  437. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/sessions.md +0 -990
  438. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/apple/apple-apple-notes.md +0 -110
  439. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/apple/apple-apple-reminders.md +0 -146
  440. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/apple/apple-findmy.md +0 -149
  441. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/apple/apple-imessage.md +0 -118
  442. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md +0 -763
  443. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md +0 -169
  444. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-computer-use.md +0 -355
  445. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md +0 -230
  446. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-merge-reconciler.md +0 -176
  447. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md +0 -237
  448. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-architecture-diagram.md +0 -165
  449. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-ascii-art.md +0 -338
  450. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-ascii-video.md +0 -265
  451. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-baoyu-infographic.md +0 -256
  452. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-claude-design.md +0 -668
  453. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-comfyui.md +0 -616
  454. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-design-md.md +0 -238
  455. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-excalidraw.md +0 -212
  456. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-humanizer.md +0 -663
  457. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-manim-video.md +0 -292
  458. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-p5js.md +0 -576
  459. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-popular-web-designs.md +0 -223
  460. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-pretext.md +0 -238
  461. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-sketch.md +0 -240
  462. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/creative/creative-songwriting-and-ai-music.md +0 -319
  463. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/devops/devops-sdlc-review.md +0 -195
  464. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/email/email-email-inbox-triage.md +0 -115
  465. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/email/email-himalaya.md +0 -319
  466. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-codebase-inspection.md +0 -132
  467. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-auth.md +0 -265
  468. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-code-review.md +0 -499
  469. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-issue-to-pr.md +0 -95
  470. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-issues.md +0 -388
  471. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-pr-workflow.md +0 -385
  472. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/github/github-github-repo-management.md +0 -534
  473. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/media/media-gif-search.md +0 -106
  474. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/media/media-songsee.md +0 -98
  475. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/media/media-youtube-content.md +0 -100
  476. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/mlops/mlops-evaluation-evaluating-llms-harness.md +0 -512
  477. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/mlops/mlops-evaluation-weights-and-biases.md +0 -613
  478. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/mlops/mlops-huggingface-hub.md +0 -100
  479. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/mlops/mlops-inference-llama-cpp.md +0 -267
  480. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/mlops/mlops-inference-serving-llms-vllm.md +0 -387
  481. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/note-taking/note-taking-obsidian.md +0 -85
  482. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-airtable.md +0 -243
  483. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-box.md +0 -132
  484. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-document-to-action-items.md +0 -99
  485. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-docx.md +0 -213
  486. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-google-workspace.md +0 -348
  487. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-maps.md +0 -210
  488. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-meeting-action-items.md +0 -105
  489. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-nano-pdf.md +0 -70
  490. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-notion.md +0 -463
  491. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md +0 -193
  492. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-pdf.md +0 -142
  493. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-powerpoint.md +0 -237
  494. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-product-price-monitor.md +0 -97
  495. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-session-librarian.md +0 -122
  496. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-teams-meeting-pipeline.md +0 -129
  497. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-weekly-review-planning.md +0 -99
  498. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/productivity/productivity-xlsx.md +0 -213
  499. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-arxiv.md +0 -300
  500. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-blocked-page-recovery.md +0 -155
  501. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-blogwatcher.md +0 -152
  502. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-competitor-news-monitor.md +0 -106
  503. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-grounded-citations.md +0 -274
  504. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-llm-wiki.md +0 -526
  505. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/research/research-research-paper-writing.md +0 -1645
  506. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/smart-home/smart-home-openhue.md +0 -127
  507. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/social-media/social-media-xurl.md +0 -450
  508. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-codebase-inspection.md +0 -132
  509. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-dogfood.md +0 -183
  510. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-github.md +0 -73
  511. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md +0 -230
  512. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-inspecting-hermes-desktop-dom.md +0 -177
  513. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md +0 -337
  514. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-python-debugpy.md +0 -391
  515. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-requesting-code-review.md +0 -298
  516. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-simplify-code.md +0 -288
  517. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-spike.md +0 -217
  518. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-systematic-debugging.md +0 -429
  519. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/software-development/software-development-test-driven-development.md +0 -380
  520. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/bundled/web/web-blocked-page-recovery.md +0 -155
  521. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/google-workspace.md +0 -191
  522. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-antigravity-cli.md +0 -259
  523. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md +0 -161
  524. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-dynamic-workflow.md +0 -198
  525. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-grok.md +0 -326
  526. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-honcho.md +0 -446
  527. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-openhands.md +0 -167
  528. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/blockchain/blockchain-evm.md +0 -227
  529. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/blockchain/blockchain-hyperliquid.md +0 -228
  530. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/blockchain/blockchain-solana.md +0 -225
  531. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/communication/communication-one-three-one-rule.md +0 -114
  532. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-ai-presenter-video.md +0 -211
  533. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-archify.md +0 -66
  534. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-ascii-art.md +0 -338
  535. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-audiocraft-audio-generation.md +0 -588
  536. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-auteur.md +0 -195
  537. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-baoyu-article-illustrator.md +0 -225
  538. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-baoyu-comic.md +0 -264
  539. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-comfyui.md +0 -616
  540. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-concept-diagrams.md +0 -379
  541. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-creative-ideation.md +0 -192
  542. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-draw-your-font.md +0 -169
  543. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-dream-loop.md +0 -297
  544. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-excalidraw.md +0 -212
  545. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-heartmula.md +0 -191
  546. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-hyperframes.md +0 -222
  547. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-impeccable.md +0 -56
  548. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-ip-as-logo.md +0 -171
  549. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-kanban-video-orchestrator.md +0 -220
  550. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-meme-generation.md +0 -147
  551. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-mono-color.md +0 -158
  552. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-pixel-art.md +0 -234
  553. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-pretext.md +0 -238
  554. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-simple-english.md +0 -362
  555. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-sketch.md +0 -240
  556. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-social-media-content-calendar.md +0 -88
  557. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-system-atlas.md +0 -105
  558. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-tldraw-offline.md +0 -294
  559. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/creative/creative-unreal-mcp.md +0 -269
  560. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md +0 -195
  561. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-actual-setup.md +0 -164
  562. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-docker-management.md +0 -298
  563. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-hermes-s6-container-supervision.md +0 -198
  564. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-inference-sh-cli.md +0 -173
  565. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-pinggy-tunnel.md +0 -326
  566. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-setup-wizard-generator.md +0 -133
  567. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/devops/devops-watchers.md +0 -126
  568. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/dogfood/dogfood-adversarial-ux-test.md +0 -209
  569. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/email/email-agentmail.md +0 -104
  570. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-3-statement-model.md +0 -451
  571. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-comps-analysis.md +0 -682
  572. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-dcf-model.md +0 -1288
  573. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-excel-author.md +0 -262
  574. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-lbo-model.md +0 -309
  575. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-merger-model.md +0 -162
  576. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-polymarket.md +0 -97
  577. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-pptx-author.md +0 -191
  578. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/finance/finance-stocks.md +0 -112
  579. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/gaming/gaming-minecraft-modpack-server.md +0 -209
  580. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/gaming/gaming-pokemon-player.md +0 -240
  581. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/health/health-fitness-nutrition.md +0 -259
  582. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/health/health-neuroskill-bci.md +0 -470
  583. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mcp/mcp-fastmcp.md +0 -315
  584. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mcp/mcp-mcp-oauth-remote-gateway.md +0 -389
  585. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mcp/mcp-mcporter.md +0 -138
  586. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/migration/migration-openclaw-migration.md +0 -316
  587. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-accelerate.md +0 -366
  588. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-chroma.md +0 -425
  589. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-clip.md +0 -272
  590. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-evaluation-evaluating-llms-harness.md +0 -512
  591. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-evaluation-weights-and-biases.md +0 -613
  592. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-faiss.md +0 -240
  593. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-flash-attention.md +0 -388
  594. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-guidance.md +0 -595
  595. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-huggingface-tokenizers.md +0 -535
  596. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-inference-llama-cpp.md +0 -267
  597. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-inference-outlines.md +0 -679
  598. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-inference-serving-llms-vllm.md +0 -387
  599. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-instructor.md +0 -759
  600. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-lambda-labs.md +0 -568
  601. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-llava.md +0 -323
  602. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-modal.md +0 -368
  603. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-models-huggingface-hub.md +0 -100
  604. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-models-segment-anything-model.md +0 -525
  605. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-nemo-curator.md +0 -415
  606. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-obliteratus.md +0 -360
  607. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-peft.md +0 -452
  608. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-pinecone.md +0 -396
  609. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-pytorch-fsdp.md +0 -97
  610. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-pytorch-lightning.md +0 -365
  611. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-qdrant.md +0 -522
  612. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-research-dspy.md +0 -609
  613. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-saelens.md +0 -439
  614. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-simpo.md +0 -237
  615. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-slime.md +0 -486
  616. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-stable-diffusion.md +0 -542
  617. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-tensorrt-llm.md +0 -208
  618. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-torchtitan.md +0 -404
  619. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-training-axolotl.md +0 -181
  620. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-training-trl-fine-tuning.md +0 -512
  621. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-training-unsloth.md +0 -98
  622. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/mlops/mlops-whisper.md +0 -336
  623. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/payments/payments-mpp-agent.md +0 -142
  624. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/payments/payments-stripe-link-cli.md +0 -202
  625. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/payments/payments-stripe-projects.md +0 -138
  626. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-canvas.md +0 -114
  627. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-decision-questionnaire.md +0 -133
  628. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-here-now.md +0 -231
  629. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-live-dashboard.md +0 -126
  630. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-memento-flashcards.md +0 -336
  631. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-property-listings.md +0 -121
  632. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-shop.md +0 -238
  633. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-shopify.md +0 -377
  634. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-siyuan.md +0 -305
  635. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/productivity/productivity-telephony.md +0 -435
  636. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-bioinformatics.md +0 -254
  637. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-blogwatcher.md +0 -162
  638. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-darwinian-evolver.md +0 -217
  639. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-domain-intel.md +0 -121
  640. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-drug-discovery.md +0 -237
  641. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-duckduckgo-search.md +0 -255
  642. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-gitnexus-explorer.md +0 -232
  643. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-osint-investigation.md +0 -295
  644. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-parallel-cli.md +0 -411
  645. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-pinecone-research.md +0 -125
  646. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-qmd.md +0 -459
  647. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-research-paper-writing.md +0 -1645
  648. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-rss-feeds.md +0 -114
  649. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-scrapling.md +0 -351
  650. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/research/research-searxng-search.md +0 -212
  651. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-1password.md +0 -173
  652. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-godmode.md +0 -421
  653. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-oss-forensics.md +0 -426
  654. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-sherlock.md +0 -208
  655. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-unbroker.md +0 -331
  656. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/security/security-web-pentest.md +0 -337
  657. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/smart-home/smart-home-openhue.md +0 -127
  658. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/social-media/social-media-reddit-reading.md +0 -146
  659. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-ast-grep.md +0 -307
  660. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-code-wiki.md +0 -463
  661. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-grill-me.md +0 -135
  662. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-pr-lens.md +0 -160
  663. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-rest-graphql-debug.md +0 -532
  664. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/software-development/software-development-subagent-driven-development.md +0 -370
  665. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/web-development/web-development-cloudflare-temporary-deploy.md +0 -144
  666. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/web-development/web-development-har-derived-api-client.md +0 -180
  667. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/web-development/web-development-page-agent.md +0 -207
  668. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/web-development/web-development-publish-site.md +0 -174
  669. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/web-development/web-development-scrollcraft.md +0 -257
  670. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md +0 -127
  671. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/tui.md +0 -313
  672. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/which-file-does-what.md +0 -57
  673. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/windows-native.md +0 -326
  674. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-guide/windows-wsl-quickstart.md +0 -358
  675. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docs/user-stories.mdx +0 -10
  676. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/docusaurus.config.ts +0 -210
  677. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/acp-internals.md +0 -181
  678. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/adding-platform-adapters.md +0 -686
  679. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/adding-providers.md +0 -459
  680. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/adding-tools.md +0 -209
  681. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/agent-loop.md +0 -239
  682. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/architecture.md +0 -277
  683. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/browser-supervisor.md +0 -160
  684. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/context-compression-and-caching.md +0 -328
  685. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/context-engine-plugin.md +0 -193
  686. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/contributing.md +0 -253
  687. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/creating-skills.md +0 -375
  688. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/cron-internals.md +0 -236
  689. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/extending-the-cli.md +0 -192
  690. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/gateway-internals.md +0 -267
  691. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/image-gen-provider-plugin.md +0 -288
  692. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/memory-provider-plugin.md +0 -258
  693. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/model-provider-plugin.md +0 -267
  694. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/plugin-llm-access.md +0 -401
  695. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/plugins/index.md +0 -1156
  696. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/programmatic-integration.md +0 -126
  697. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/prompt-assembly.md +0 -273
  698. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/provider-runtime.md +0 -208
  699. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/session-storage.md +0 -420
  700. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/tools-runtime.md +0 -236
  701. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/trajectory-format.md +0 -222
  702. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/video-gen-provider-plugin.md +0 -231
  703. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/developer-guide/web-search-provider-plugin.md +0 -260
  704. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/installation.md +0 -204
  705. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/learning-path.md +0 -154
  706. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/nix-setup.md +0 -975
  707. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/quickstart.md +0 -352
  708. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/termux.md +0 -236
  709. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/getting-started/updating.md +0 -231
  710. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/automate-with-cron.md +0 -266
  711. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/automation-blueprints.md +0 -595
  712. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/aws-bedrock.md +0 -170
  713. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/azure-foundry.md +0 -334
  714. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/cron-script-only.md +0 -247
  715. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/cron-troubleshooting.md +0 -227
  716. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/daily-briefing-bot.md +0 -268
  717. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/delegation-patterns.md +0 -239
  718. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/github-pr-review-agent.md +0 -303
  719. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/google-gemini.md +0 -254
  720. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/local-llm-on-mac.md +0 -240
  721. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/local-ollama-setup.md +0 -317
  722. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/microsoft-graph-app-registration.md +0 -180
  723. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/migrate-from-openclaw.md +0 -244
  724. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/minimax-oauth.md +0 -228
  725. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/oauth-over-ssh.md +0 -96
  726. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/operate-teams-meeting-pipeline.md +0 -288
  727. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/pipe-script-output.md +0 -217
  728. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/python-library.md +0 -333
  729. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/run-hermes-with-nous-portal.md +0 -273
  730. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/team-telegram-assistant.md +0 -441
  731. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/tips.md +0 -234
  732. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/use-mcp-with-hermes.md +0 -490
  733. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/use-soul-with-hermes.md +0 -264
  734. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/use-voice-mode-with-hermes.md +0 -469
  735. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/webhook-github-pr-review.md +0 -329
  736. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/work-with-skills.md +0 -290
  737. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/guides/xai-grok-oauth.md +0 -243
  738. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/index.mdx +0 -117
  739. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/integrations/buzz.md +0 -57
  740. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/integrations/index.md +0 -100
  741. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/integrations/nous-portal.md +0 -272
  742. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/integrations/providers.md +0 -1433
  743. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/cli-commands.md +0 -1259
  744. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/environment-variables.md +0 -678
  745. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/faq.md +0 -859
  746. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/mcp-config-reference.md +0 -250
  747. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/model-catalog.md +0 -103
  748. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/optional-skills-catalog.md +0 -220
  749. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/profile-commands.md +0 -467
  750. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/skills-catalog.md +0 -156
  751. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/slash-commands.md +0 -272
  752. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/tools-reference.md +0 -261
  753. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/reference/toolsets-reference.md +0 -162
  754. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/checkpoints-and-rollback.md +0 -251
  755. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/cli.md +0 -445
  756. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/configuration.md +0 -1746
  757. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/configuring-models.md +0 -239
  758. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/docker.md +0 -595
  759. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/acp.md +0 -341
  760. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/api-server.md +0 -456
  761. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/batch-processing.md +0 -229
  762. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/browser.md +0 -629
  763. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/built-in-plugins.md +0 -269
  764. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/code-execution.md +0 -240
  765. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/codex-app-server-runtime.md +0 -441
  766. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/computer-use.md +0 -144
  767. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/context-files.md +0 -218
  768. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/context-references.md +0 -142
  769. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/credential-pools.md +0 -240
  770. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/cron.md +0 -761
  771. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/curator.md +0 -248
  772. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/delegation.md +0 -355
  773. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/deliverable-mode.md +0 -91
  774. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/extending-the-dashboard.md +0 -907
  775. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/fallback-providers.md +0 -408
  776. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/goals.md +0 -180
  777. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/honcho.md +0 -233
  778. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/hooks.md +0 -1388
  779. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/image-generation.md +0 -150
  780. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/kanban-tutorial.md +0 -308
  781. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/kanban-worker-lanes.md +0 -117
  782. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/kanban.md +0 -863
  783. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/lsp.md +0 -217
  784. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/mcp.md +0 -591
  785. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/memory-providers.md +0 -570
  786. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/memory.md +0 -233
  787. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/overview.md +0 -52
  788. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/personality.md +0 -271
  789. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/plugins.md +0 -346
  790. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/provider-routing.md +0 -200
  791. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/skills.md +0 -760
  792. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/skins.md +0 -271
  793. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/spotify.md +0 -279
  794. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/subscription-proxy.md +0 -163
  795. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/tool-gateway.md +0 -187
  796. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/tools.md +0 -223
  797. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/tts.md +0 -456
  798. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/vision.md +0 -210
  799. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/voice-mode.md +0 -521
  800. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/web-dashboard.md +0 -351
  801. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/web-search.md +0 -422
  802. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/features/x-search.md +0 -147
  803. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/git-worktrees.md +0 -173
  804. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/bluebubbles.md +0 -143
  805. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/dingtalk.md +0 -283
  806. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/discord.md +0 -843
  807. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/email.md +0 -190
  808. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/feishu.md +0 -538
  809. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/google_chat.md +0 -283
  810. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/homeassistant.md +0 -252
  811. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/index.md +0 -569
  812. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/line.md +0 -199
  813. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/matrix.md +0 -677
  814. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/mattermost.md +0 -340
  815. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/msgraph-webhook.md +0 -137
  816. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/ntfy.md +0 -155
  817. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/open-webui.md +0 -296
  818. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/qqbot.md +0 -123
  819. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/signal.md +0 -257
  820. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/simplex.md +0 -98
  821. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/slack.md +0 -614
  822. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/sms.md +0 -203
  823. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/teams-meetings.md +0 -233
  824. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/teams.md +0 -255
  825. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/telegram.md +0 -1241
  826. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/webhooks.md +0 -601
  827. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/wecom-callback.md +0 -149
  828. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/wecom.md +0 -292
  829. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/weixin.md +0 -312
  830. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/whatsapp.md +0 -236
  831. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/messaging/yuanbao.md +0 -341
  832. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/profile-distributions.md +0 -573
  833. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/profiles.md +0 -272
  834. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/secrets/bitwarden.md +0 -143
  835. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/secrets/index.md +0 -9
  836. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/security.md +0 -664
  837. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/sessions.md +0 -609
  838. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/apple/apple-apple-notes.md +0 -106
  839. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/apple/apple-apple-reminders.md +0 -114
  840. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/apple/apple-findmy.md +0 -147
  841. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/apple/apple-imessage.md +0 -118
  842. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/apple/apple-macos-computer-use.md +0 -175
  843. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code.md +0 -763
  844. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md +0 -143
  845. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md +0 -947
  846. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode.md +0 -237
  847. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-architecture-diagram.md +0 -165
  848. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-ascii-art.md +0 -338
  849. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-ascii-video.md +0 -261
  850. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-baoyu-infographic.md +0 -256
  851. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-claude-design.md +0 -609
  852. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-comfyui.md +0 -547
  853. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-design-md.md +0 -189
  854. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-excalidraw.md +0 -210
  855. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-humanizer.md +0 -594
  856. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-manim-video.md +0 -289
  857. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-p5js.md +0 -574
  858. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-popular-web-designs.md +0 -211
  859. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-pretext.md +0 -238
  860. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-sketch.md +0 -238
  861. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/creative/creative-songwriting-and-ai-music.md +0 -305
  862. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/email/email-himalaya.md +0 -305
  863. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-codebase-inspection.md +0 -132
  864. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-github-auth.md +0 -265
  865. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-github-code-review.md +0 -499
  866. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-github-issues.md +0 -388
  867. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-github-pr-workflow.md +0 -385
  868. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/github/github-github-repo-management.md +0 -534
  869. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/media/media-gif-search.md +0 -106
  870. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/media/media-songsee.md +0 -98
  871. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/media/media-youtube-content.md +0 -93
  872. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/mlops/mlops-evaluation-evaluating-llms-harness.md +0 -512
  873. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/mlops/mlops-evaluation-weights-and-biases.md +0 -609
  874. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/mlops/mlops-huggingface-hub.md +0 -100
  875. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/mlops/mlops-inference-llama-cpp.md +0 -267
  876. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/mlops/mlops-inference-serving-llms-vllm.md +0 -386
  877. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/note-taking/note-taking-obsidian.md +0 -81
  878. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-airtable.md +0 -243
  879. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-google-workspace.md +0 -325
  880. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-maps.md +0 -196
  881. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-nano-pdf.md +0 -69
  882. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-notion.md +0 -463
  883. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-ocr-and-documents.md +0 -190
  884. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-powerpoint.md +0 -257
  885. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/productivity/productivity-teams-meeting-pipeline.md +0 -127
  886. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/research/research-arxiv.md +0 -300
  887. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/research/research-blogwatcher.md +0 -152
  888. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/research/research-llm-wiki.md +0 -469
  889. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/research/research-research-paper-writing.md +0 -2395
  890. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/smart-home/smart-home-openhue.md +0 -124
  891. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/social-media/social-media-xurl.md +0 -428
  892. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-dogfood.md +0 -181
  893. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-hermes-agent-skill-authoring.md +0 -183
  894. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-node-inspect-debugger.md +0 -337
  895. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-python-debugpy.md +0 -391
  896. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-requesting-code-review.md +0 -287
  897. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-spike.md +0 -217
  898. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-systematic-debugging.md +0 -385
  899. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/bundled/software-development/software-development-test-driven-development.md +0 -361
  900. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/google-workspace.md +0 -191
  901. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-blackbox.md +0 -162
  902. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/autonomous-ai-agents/autonomous-ai-agents-honcho.md +0 -446
  903. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/blockchain/blockchain-evm.md +0 -227
  904. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/blockchain/blockchain-hyperliquid.md +0 -210
  905. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/blockchain/blockchain-solana.md +0 -206
  906. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/communication/communication-one-three-one-rule.md +0 -114
  907. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-audiocraft-audio-generation.md +0 -588
  908. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-concept-diagrams.md +0 -379
  909. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-heartmula.md +0 -189
  910. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-hyperframes.md +0 -205
  911. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-kanban-video-orchestrator.md +0 -173
  912. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/creative/creative-meme-generation.md +0 -147
  913. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/data-science/data-science-jupyter-notebook.md +0 -180
  914. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/devops/devops-docker-management.md +0 -297
  915. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/devops/devops-inference-sh-cli.md +0 -173
  916. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/devops/devops-pinggy-tunnel.md +0 -327
  917. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/devops/devops-watchers.md +0 -126
  918. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/dogfood/dogfood-adversarial-ux-test.md +0 -209
  919. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/email/email-agentmail.md +0 -143
  920. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-3-statement-model.md +0 -451
  921. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-comps-analysis.md +0 -682
  922. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-dcf-model.md +0 -1288
  923. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-excel-author.md +0 -262
  924. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-lbo-model.md +0 -309
  925. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-merger-model.md +0 -162
  926. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-polymarket.md +0 -94
  927. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-pptx-author.md +0 -191
  928. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/finance/finance-stocks.md +0 -108
  929. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/health/health-fitness-nutrition.md +0 -255
  930. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/health/health-neuroskill-bci.md +0 -431
  931. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mcp/mcp-fastmcp.md +0 -315
  932. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mcp/mcp-mcporter.md +0 -138
  933. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/migration/migration-openclaw-migration.md +0 -316
  934. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-accelerate.md +0 -350
  935. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-chroma.md +0 -425
  936. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-clip.md +0 -272
  937. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-faiss.md +0 -240
  938. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-flash-attention.md +0 -381
  939. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-guidance.md +0 -591
  940. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-huggingface-tokenizers.md +0 -535
  941. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-inference-outlines.md +0 -671
  942. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-instructor.md +0 -759
  943. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-lambda-labs.md +0 -568
  944. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-llava.md +0 -323
  945. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-modal.md +0 -362
  946. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-models-segment-anything-model.md +0 -525
  947. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-nemo-curator.md +0 -401
  948. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-peft.md +0 -452
  949. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-pinecone.md +0 -377
  950. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-pytorch-fsdp.md +0 -145
  951. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-pytorch-lightning.md +0 -365
  952. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-qdrant.md +0 -514
  953. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-saelens.md +0 -407
  954. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-simpo.md +0 -237
  955. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-slime.md +0 -486
  956. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-stable-diffusion.md +0 -542
  957. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-tensorrt-llm.md +0 -206
  958. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-torchtitan.md +0 -378
  959. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-training-axolotl.md +0 -181
  960. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-training-trl-fine-tuning.md +0 -477
  961. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-training-unsloth.md +0 -98
  962. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/mlops/mlops-whisper.md +0 -336
  963. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-canvas.md +0 -114
  964. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-here-now.md +0 -231
  965. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-memento-flashcards.md +0 -336
  966. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-shop.md +0 -354
  967. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-shopify.md +0 -377
  968. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-siyuan.md +0 -305
  969. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/productivity/productivity-telephony.md +0 -435
  970. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-bioinformatics.md +0 -252
  971. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-darwinian-evolver.md +0 -188
  972. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-domain-intel.md +0 -117
  973. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-drug-discovery.md +0 -237
  974. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-duckduckgo-search.md +0 -255
  975. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-gitnexus-explorer.md +0 -213
  976. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-osint-investigation.md +0 -243
  977. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-parallel-cli.md +0 -411
  978. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-qmd.md +0 -435
  979. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-scrapling.md +0 -351
  980. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/research/research-searxng-search.md +0 -229
  981. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/security/security-1password.md +0 -173
  982. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/security/security-oss-forensics.md +0 -421
  983. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/security/security-sherlock.md +0 -208
  984. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/software-development/software-development-rest-graphql-debug.md +0 -531
  985. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/web-development/web-development-page-agent.md +0 -207
  986. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/skills/optional/yuanbao/yuanbao-yuanbao.md +0 -125
  987. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/tui.md +0 -256
  988. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/windows-native.md +0 -325
  989. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-guide/windows-wsl-quickstart.md +0 -332
  990. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/i18n/zh-Hans/user-stories.mdx +0 -10
  991. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/llms-full.txt +0 -88833
  992. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/llms.txt +0 -267
  993. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/site-pages-map.txt +0 -928
  994. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src/site-pages.json +0 -4218
  995. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-README.md +0 -101
  996. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-scripts/clone_repo.sh +0 -17
  997. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-scripts/crawl.py +0 -82
  998. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-scripts/gen_mapping.py +0 -112
  999. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-scripts/retry-none.json +0 -305
  1000. package/docs/80_upstream-docs-and-skills/hermes-dev-skill/src-scripts/verify_orphans.py +0 -53
  1001. /package/lib/{native-capture-x_Hos2e8.js → native-capture-BEByDXYM.js} +0 -0
  1002. /package/lib/{py-sdk-Chvy92MB.js → py-sdk-D7klhpWb.js} +0 -0
@@ -0,0 +1,3634 @@
1
+ import { n as __require, r as __toESM, t as __commonJS } from "./chunk-DQxbwPpZ.js";
2
+ import { D as packageVersion, o as debugCatchError } from "./util-BHL_dfV_.js";
3
+
4
+ //#region node_modules/ws/lib/constants.js
5
+ var require_constants = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/constants.js": ((exports, module) => {
6
+ const BINARY_TYPES$2 = [
7
+ "nodebuffer",
8
+ "arraybuffer",
9
+ "fragments"
10
+ ];
11
+ const hasBlob$1 = typeof Blob !== "undefined";
12
+ if (hasBlob$1) BINARY_TYPES$2.push("blob");
13
+ module.exports = {
14
+ BINARY_TYPES: BINARY_TYPES$2,
15
+ CLOSE_TIMEOUT: 3e4,
16
+ EMPTY_BUFFER: Buffer.alloc(0),
17
+ GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
18
+ hasBlob: hasBlob$1,
19
+ kForOnEventAttribute: Symbol("kIsForOnEventAttribute"),
20
+ kListener: Symbol("kListener"),
21
+ kStatusCode: Symbol("status-code"),
22
+ kWebSocket: Symbol("websocket"),
23
+ NOOP: () => {}
24
+ };
25
+ }) });
26
+
27
+ //#endregion
28
+ //#region node_modules/ws/lib/buffer-util.js
29
+ var require_buffer_util = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/buffer-util.js": ((exports, module) => {
30
+ const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = require_constants();
31
+ const FastBuffer$2 = Buffer[Symbol.species];
32
+ /**
33
+ * Merges an array of buffers into a new buffer.
34
+ *
35
+ * @param {Buffer[]} list The array of buffers to concat
36
+ * @param {Number} totalLength The total length of buffers in the list
37
+ * @return {Buffer} The resulting buffer
38
+ * @public
39
+ */
40
+ function concat$1(list, totalLength) {
41
+ if (list.length === 0) return EMPTY_BUFFER$3;
42
+ if (list.length === 1) return list[0];
43
+ const target = Buffer.allocUnsafe(totalLength);
44
+ let offset = 0;
45
+ for (let i = 0; i < list.length; i++) {
46
+ const buf = list[i];
47
+ target.set(buf, offset);
48
+ offset += buf.length;
49
+ }
50
+ if (offset < totalLength) return new FastBuffer$2(target.buffer, target.byteOffset, offset);
51
+ return target;
52
+ }
53
+ /**
54
+ * Masks a buffer using the given mask.
55
+ *
56
+ * @param {Buffer} source The buffer to mask
57
+ * @param {Buffer} mask The mask to use
58
+ * @param {Buffer} output The buffer where to store the result
59
+ * @param {Number} offset The offset at which to start writing
60
+ * @param {Number} length The number of bytes to mask.
61
+ * @public
62
+ */
63
+ function _mask(source, mask, output, offset, length) {
64
+ for (let i = 0; i < length; i++) output[offset + i] = source[i] ^ mask[i & 3];
65
+ }
66
+ /**
67
+ * Unmasks a buffer using the given mask.
68
+ *
69
+ * @param {Buffer} buffer The buffer to unmask
70
+ * @param {Buffer} mask The mask to use
71
+ * @public
72
+ */
73
+ function _unmask(buffer, mask) {
74
+ for (let i = 0; i < buffer.length; i++) buffer[i] ^= mask[i & 3];
75
+ }
76
+ /**
77
+ * Converts a buffer to an `ArrayBuffer`.
78
+ *
79
+ * @param {Buffer} buf The buffer to convert
80
+ * @return {ArrayBuffer} Converted buffer
81
+ * @public
82
+ */
83
+ function toArrayBuffer$1(buf) {
84
+ if (buf.length === buf.buffer.byteLength) return buf.buffer;
85
+ return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
86
+ }
87
+ /**
88
+ * Converts `data` to a `Buffer`.
89
+ *
90
+ * @param {*} data The data to convert
91
+ * @return {Buffer} The buffer
92
+ * @throws {TypeError}
93
+ * @public
94
+ */
95
+ function toBuffer$2(data) {
96
+ toBuffer$2.readOnly = true;
97
+ if (Buffer.isBuffer(data)) return data;
98
+ let buf;
99
+ if (data instanceof ArrayBuffer) buf = new FastBuffer$2(data);
100
+ else if (ArrayBuffer.isView(data)) buf = new FastBuffer$2(data.buffer, data.byteOffset, data.byteLength);
101
+ else {
102
+ buf = Buffer.from(data);
103
+ toBuffer$2.readOnly = false;
104
+ }
105
+ return buf;
106
+ }
107
+ module.exports = {
108
+ concat: concat$1,
109
+ mask: _mask,
110
+ toArrayBuffer: toArrayBuffer$1,
111
+ toBuffer: toBuffer$2,
112
+ unmask: _unmask
113
+ };
114
+ /* istanbul ignore else */
115
+ if (!process.env.WS_NO_BUFFER_UTIL) try {
116
+ const bufferUtil$1 = __require("bufferutil");
117
+ module.exports.mask = function(source, mask, output, offset, length) {
118
+ if (length < 48) _mask(source, mask, output, offset, length);
119
+ else bufferUtil$1.mask(source, mask, output, offset, length);
120
+ };
121
+ module.exports.unmask = function(buffer, mask) {
122
+ if (buffer.length < 32) _unmask(buffer, mask);
123
+ else bufferUtil$1.unmask(buffer, mask);
124
+ };
125
+ } catch (e) {}
126
+ }) });
127
+
128
+ //#endregion
129
+ //#region node_modules/ws/lib/limiter.js
130
+ var require_limiter = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/limiter.js": ((exports, module) => {
131
+ const kDone = Symbol("kDone");
132
+ const kRun = Symbol("kRun");
133
+ /**
134
+ * A very simple job queue with adjustable concurrency. Adapted from
135
+ * https://github.com/STRML/async-limiter
136
+ */
137
+ var Limiter$1 = class {
138
+ /**
139
+ * Creates a new `Limiter`.
140
+ *
141
+ * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
142
+ * to run concurrently
143
+ */
144
+ constructor(concurrency) {
145
+ this[kDone] = () => {
146
+ this.pending--;
147
+ this[kRun]();
148
+ };
149
+ this.concurrency = concurrency || Infinity;
150
+ this.jobs = [];
151
+ this.pending = 0;
152
+ }
153
+ /**
154
+ * Adds a job to the queue.
155
+ *
156
+ * @param {Function} job The job to run
157
+ * @public
158
+ */
159
+ add(job) {
160
+ this.jobs.push(job);
161
+ this[kRun]();
162
+ }
163
+ /**
164
+ * Removes a job from the queue and runs it if possible.
165
+ *
166
+ * @private
167
+ */
168
+ [kRun]() {
169
+ if (this.pending === this.concurrency) return;
170
+ if (this.jobs.length) {
171
+ const job = this.jobs.shift();
172
+ this.pending++;
173
+ job(this[kDone]);
174
+ }
175
+ }
176
+ };
177
+ module.exports = Limiter$1;
178
+ }) });
179
+
180
+ //#endregion
181
+ //#region node_modules/ws/lib/permessage-deflate.js
182
+ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/permessage-deflate.js": ((exports, module) => {
183
+ const zlib = __require("zlib");
184
+ const bufferUtil = require_buffer_util();
185
+ const Limiter = require_limiter();
186
+ const { kStatusCode: kStatusCode$2 } = require_constants();
187
+ const FastBuffer$1 = Buffer[Symbol.species];
188
+ const TRAILER = Buffer.from([
189
+ 0,
190
+ 0,
191
+ 255,
192
+ 255
193
+ ]);
194
+ const kPerMessageDeflate = Symbol("permessage-deflate");
195
+ const kTotalLength = Symbol("total-length");
196
+ const kCallback = Symbol("callback");
197
+ const kBuffers = Symbol("buffers");
198
+ const kError$1 = Symbol("error");
199
+ let zlibLimiter;
200
+ /**
201
+ * permessage-deflate implementation.
202
+ */
203
+ var PerMessageDeflate$5 = class {
204
+ /**
205
+ * Creates a PerMessageDeflate instance.
206
+ *
207
+ * @param {Object} [options] Configuration options
208
+ * @param {(Boolean|Number)} [options.clientMaxWindowBits] Advertise support
209
+ * for, or request, a custom client window size
210
+ * @param {Boolean} [options.clientNoContextTakeover=false] Advertise/
211
+ * acknowledge disabling of client context takeover
212
+ * @param {Number} [options.concurrencyLimit=10] The number of concurrent
213
+ * calls to zlib
214
+ * @param {Boolean} [options.isServer=false] Create the instance in either
215
+ * server or client mode
216
+ * @param {Number} [options.maxPayload=0] The maximum allowed message length
217
+ * @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
218
+ * use of a custom server window size
219
+ * @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
220
+ * disabling of server context takeover
221
+ * @param {Number} [options.threshold=1024] Size (in bytes) below which
222
+ * messages should not be compressed if context takeover is disabled
223
+ * @param {Object} [options.zlibDeflateOptions] Options to pass to zlib on
224
+ * deflate
225
+ * @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
226
+ * inflate
227
+ */
228
+ constructor(options) {
229
+ this._options = options || {};
230
+ this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
231
+ this._maxPayload = this._options.maxPayload | 0;
232
+ this._isServer = !!this._options.isServer;
233
+ this._deflate = null;
234
+ this._inflate = null;
235
+ this.params = null;
236
+ if (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10);
237
+ }
238
+ /**
239
+ * @type {String}
240
+ */
241
+ static get extensionName() {
242
+ return "permessage-deflate";
243
+ }
244
+ /**
245
+ * Create an extension negotiation offer.
246
+ *
247
+ * @return {Object} Extension parameters
248
+ * @public
249
+ */
250
+ offer() {
251
+ const params = {};
252
+ if (this._options.serverNoContextTakeover) params.server_no_context_takeover = true;
253
+ if (this._options.clientNoContextTakeover) params.client_no_context_takeover = true;
254
+ if (this._options.serverMaxWindowBits) params.server_max_window_bits = this._options.serverMaxWindowBits;
255
+ if (this._options.clientMaxWindowBits) params.client_max_window_bits = this._options.clientMaxWindowBits;
256
+ else if (this._options.clientMaxWindowBits == null) params.client_max_window_bits = true;
257
+ return params;
258
+ }
259
+ /**
260
+ * Accept an extension negotiation offer/response.
261
+ *
262
+ * @param {Array} configurations The extension negotiation offers/reponse
263
+ * @return {Object} Accepted configuration
264
+ * @public
265
+ */
266
+ accept(configurations) {
267
+ configurations = this.normalizeParams(configurations);
268
+ this.params = this._isServer ? this.acceptAsServer(configurations) : this.acceptAsClient(configurations);
269
+ return this.params;
270
+ }
271
+ /**
272
+ * Releases all resources used by the extension.
273
+ *
274
+ * @public
275
+ */
276
+ cleanup() {
277
+ if (this._inflate) {
278
+ this._inflate.close();
279
+ this._inflate = null;
280
+ }
281
+ if (this._deflate) {
282
+ const callback = this._deflate[kCallback];
283
+ this._deflate.close();
284
+ this._deflate = null;
285
+ if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
286
+ }
287
+ }
288
+ /**
289
+ * Accept an extension negotiation offer.
290
+ *
291
+ * @param {Array} offers The extension negotiation offers
292
+ * @return {Object} Accepted configuration
293
+ * @private
294
+ */
295
+ acceptAsServer(offers) {
296
+ const opts = this._options;
297
+ const accepted = offers.find((params) => {
298
+ if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && (typeof params.client_max_window_bits === "number" ? opts.clientMaxWindowBits > params.client_max_window_bits : !params.client_max_window_bits)) return false;
299
+ return true;
300
+ });
301
+ if (!accepted) throw new Error("None of the extension offers can be accepted");
302
+ if (opts.serverNoContextTakeover) accepted.server_no_context_takeover = true;
303
+ if (opts.clientNoContextTakeover) accepted.client_no_context_takeover = true;
304
+ if (typeof opts.serverMaxWindowBits === "number") accepted.server_max_window_bits = opts.serverMaxWindowBits;
305
+ if (typeof opts.clientMaxWindowBits === "number") accepted.client_max_window_bits = opts.clientMaxWindowBits;
306
+ else if (accepted.client_max_window_bits === true || opts.clientMaxWindowBits === false) delete accepted.client_max_window_bits;
307
+ return accepted;
308
+ }
309
+ /**
310
+ * Accept the extension negotiation response.
311
+ *
312
+ * @param {Array} response The extension negotiation response
313
+ * @return {Object} Accepted configuration
314
+ * @private
315
+ */
316
+ acceptAsClient(response) {
317
+ const params = response[0];
318
+ if (this._options.clientNoContextTakeover === false && params.client_no_context_takeover) throw new Error("Unexpected parameter \"client_no_context_takeover\"");
319
+ if (!params.client_max_window_bits) {
320
+ if (typeof this._options.clientMaxWindowBits === "number") params.client_max_window_bits = this._options.clientMaxWindowBits;
321
+ } else if (this._options.clientMaxWindowBits === false || typeof this._options.clientMaxWindowBits === "number" && params.client_max_window_bits > this._options.clientMaxWindowBits) throw new Error("Unexpected or invalid parameter \"client_max_window_bits\"");
322
+ return params;
323
+ }
324
+ /**
325
+ * Normalize parameters.
326
+ *
327
+ * @param {Array} configurations The extension negotiation offers/reponse
328
+ * @return {Array} The offers/response with normalized parameters
329
+ * @private
330
+ */
331
+ normalizeParams(configurations) {
332
+ configurations.forEach((params) => {
333
+ Object.keys(params).forEach((key) => {
334
+ let value = params[key];
335
+ if (value.length > 1) throw new Error(`Parameter "${key}" must have only a single value`);
336
+ value = value[0];
337
+ if (key === "client_max_window_bits") {
338
+ if (value !== true) {
339
+ const num = +value;
340
+ if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
341
+ value = num;
342
+ } else if (!this._isServer) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
343
+ } else if (key === "server_max_window_bits") {
344
+ const num = +value;
345
+ if (!Number.isInteger(num) || num < 8 || num > 15) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
346
+ value = num;
347
+ } else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
348
+ if (value !== true) throw new TypeError(`Invalid value for parameter "${key}": ${value}`);
349
+ } else throw new Error(`Unknown parameter "${key}"`);
350
+ params[key] = value;
351
+ });
352
+ });
353
+ return configurations;
354
+ }
355
+ /**
356
+ * Decompress data. Concurrency limited.
357
+ *
358
+ * @param {Buffer} data Compressed data
359
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
360
+ * @param {Function} callback Callback
361
+ * @public
362
+ */
363
+ decompress(data, fin, callback) {
364
+ zlibLimiter.add((done) => {
365
+ this._decompress(data, fin, (err, result) => {
366
+ done();
367
+ callback(err, result);
368
+ });
369
+ });
370
+ }
371
+ /**
372
+ * Compress data. Concurrency limited.
373
+ *
374
+ * @param {(Buffer|String)} data Data to compress
375
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
376
+ * @param {Function} callback Callback
377
+ * @public
378
+ */
379
+ compress(data, fin, callback) {
380
+ zlibLimiter.add((done) => {
381
+ this._compress(data, fin, (err, result) => {
382
+ done();
383
+ callback(err, result);
384
+ });
385
+ });
386
+ }
387
+ /**
388
+ * Decompress data.
389
+ *
390
+ * @param {Buffer} data Compressed data
391
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
392
+ * @param {Function} callback Callback
393
+ * @private
394
+ */
395
+ _decompress(data, fin, callback) {
396
+ const endpoint = this._isServer ? "client" : "server";
397
+ if (!this._inflate) {
398
+ const key = `${endpoint}_max_window_bits`;
399
+ const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
400
+ this._inflate = zlib.createInflateRaw({
401
+ ...this._options.zlibInflateOptions,
402
+ windowBits
403
+ });
404
+ this._inflate[kPerMessageDeflate] = this;
405
+ this._inflate[kTotalLength] = 0;
406
+ this._inflate[kBuffers] = [];
407
+ this._inflate.on("error", inflateOnError);
408
+ this._inflate.on("data", inflateOnData);
409
+ }
410
+ this._inflate[kCallback] = callback;
411
+ this._inflate.write(data);
412
+ if (fin) this._inflate.write(TRAILER);
413
+ this._inflate.flush(() => {
414
+ const err = this._inflate[kError$1];
415
+ if (err) {
416
+ this._inflate.close();
417
+ this._inflate = null;
418
+ callback(err);
419
+ return;
420
+ }
421
+ const data$1 = bufferUtil.concat(this._inflate[kBuffers], this._inflate[kTotalLength]);
422
+ if (this._inflate._readableState.endEmitted) {
423
+ this._inflate.close();
424
+ this._inflate = null;
425
+ } else {
426
+ this._inflate[kTotalLength] = 0;
427
+ this._inflate[kBuffers] = [];
428
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) this._inflate.reset();
429
+ }
430
+ callback(null, data$1);
431
+ });
432
+ }
433
+ /**
434
+ * Compress data.
435
+ *
436
+ * @param {(Buffer|String)} data Data to compress
437
+ * @param {Boolean} fin Specifies whether or not this is the last fragment
438
+ * @param {Function} callback Callback
439
+ * @private
440
+ */
441
+ _compress(data, fin, callback) {
442
+ const endpoint = this._isServer ? "server" : "client";
443
+ if (!this._deflate) {
444
+ const key = `${endpoint}_max_window_bits`;
445
+ const windowBits = typeof this.params[key] !== "number" ? zlib.Z_DEFAULT_WINDOWBITS : this.params[key];
446
+ this._deflate = zlib.createDeflateRaw({
447
+ ...this._options.zlibDeflateOptions,
448
+ windowBits
449
+ });
450
+ this._deflate[kTotalLength] = 0;
451
+ this._deflate[kBuffers] = [];
452
+ this._deflate.on("data", deflateOnData);
453
+ }
454
+ this._deflate[kCallback] = callback;
455
+ this._deflate.write(data);
456
+ this._deflate.flush(zlib.Z_SYNC_FLUSH, () => {
457
+ if (!this._deflate) return;
458
+ let data$1 = bufferUtil.concat(this._deflate[kBuffers], this._deflate[kTotalLength]);
459
+ if (fin) data$1 = new FastBuffer$1(data$1.buffer, data$1.byteOffset, data$1.length - 4);
460
+ this._deflate[kCallback] = null;
461
+ this._deflate[kTotalLength] = 0;
462
+ this._deflate[kBuffers] = [];
463
+ if (fin && this.params[`${endpoint}_no_context_takeover`]) this._deflate.reset();
464
+ callback(null, data$1);
465
+ });
466
+ }
467
+ };
468
+ module.exports = PerMessageDeflate$5;
469
+ /**
470
+ * The listener of the `zlib.DeflateRaw` stream `'data'` event.
471
+ *
472
+ * @param {Buffer} chunk A chunk of data
473
+ * @private
474
+ */
475
+ function deflateOnData(chunk) {
476
+ this[kBuffers].push(chunk);
477
+ this[kTotalLength] += chunk.length;
478
+ }
479
+ /**
480
+ * The listener of the `zlib.InflateRaw` stream `'data'` event.
481
+ *
482
+ * @param {Buffer} chunk A chunk of data
483
+ * @private
484
+ */
485
+ function inflateOnData(chunk) {
486
+ this[kTotalLength] += chunk.length;
487
+ if (this[kPerMessageDeflate]._maxPayload < 1 || this[kTotalLength] <= this[kPerMessageDeflate]._maxPayload) {
488
+ this[kBuffers].push(chunk);
489
+ return;
490
+ }
491
+ this[kError$1] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
492
+ this[kError$1].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
493
+ this[kError$1][kStatusCode$2] = 1009;
494
+ this.removeListener("data", inflateOnData);
495
+ this.reset();
496
+ }
497
+ /**
498
+ * The listener of the `zlib.InflateRaw` stream `'error'` event.
499
+ *
500
+ * @param {Error} err The emitted error
501
+ * @private
502
+ */
503
+ function inflateOnError(err) {
504
+ this[kPerMessageDeflate]._inflate = null;
505
+ if (this[kError$1]) {
506
+ this[kCallback](this[kError$1]);
507
+ return;
508
+ }
509
+ err[kStatusCode$2] = 1007;
510
+ this[kCallback](err);
511
+ }
512
+ }) });
513
+
514
+ //#endregion
515
+ //#region node_modules/ws/lib/validation.js
516
+ var require_validation = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/validation.js": ((exports, module) => {
517
+ const { isUtf8 } = __require("buffer");
518
+ const { hasBlob } = require_constants();
519
+ const tokenChars$2 = [
520
+ 0,
521
+ 0,
522
+ 0,
523
+ 0,
524
+ 0,
525
+ 0,
526
+ 0,
527
+ 0,
528
+ 0,
529
+ 0,
530
+ 0,
531
+ 0,
532
+ 0,
533
+ 0,
534
+ 0,
535
+ 0,
536
+ 0,
537
+ 0,
538
+ 0,
539
+ 0,
540
+ 0,
541
+ 0,
542
+ 0,
543
+ 0,
544
+ 0,
545
+ 0,
546
+ 0,
547
+ 0,
548
+ 0,
549
+ 0,
550
+ 0,
551
+ 0,
552
+ 0,
553
+ 1,
554
+ 0,
555
+ 1,
556
+ 1,
557
+ 1,
558
+ 1,
559
+ 1,
560
+ 0,
561
+ 0,
562
+ 1,
563
+ 1,
564
+ 0,
565
+ 1,
566
+ 1,
567
+ 0,
568
+ 1,
569
+ 1,
570
+ 1,
571
+ 1,
572
+ 1,
573
+ 1,
574
+ 1,
575
+ 1,
576
+ 1,
577
+ 1,
578
+ 0,
579
+ 0,
580
+ 0,
581
+ 0,
582
+ 0,
583
+ 0,
584
+ 0,
585
+ 1,
586
+ 1,
587
+ 1,
588
+ 1,
589
+ 1,
590
+ 1,
591
+ 1,
592
+ 1,
593
+ 1,
594
+ 1,
595
+ 1,
596
+ 1,
597
+ 1,
598
+ 1,
599
+ 1,
600
+ 1,
601
+ 1,
602
+ 1,
603
+ 1,
604
+ 1,
605
+ 1,
606
+ 1,
607
+ 1,
608
+ 1,
609
+ 1,
610
+ 1,
611
+ 0,
612
+ 0,
613
+ 0,
614
+ 1,
615
+ 1,
616
+ 1,
617
+ 1,
618
+ 1,
619
+ 1,
620
+ 1,
621
+ 1,
622
+ 1,
623
+ 1,
624
+ 1,
625
+ 1,
626
+ 1,
627
+ 1,
628
+ 1,
629
+ 1,
630
+ 1,
631
+ 1,
632
+ 1,
633
+ 1,
634
+ 1,
635
+ 1,
636
+ 1,
637
+ 1,
638
+ 1,
639
+ 1,
640
+ 1,
641
+ 1,
642
+ 1,
643
+ 0,
644
+ 1,
645
+ 0,
646
+ 1,
647
+ 0
648
+ ];
649
+ /**
650
+ * Checks if a status code is allowed in a close frame.
651
+ *
652
+ * @param {Number} code The status code
653
+ * @return {Boolean} `true` if the status code is valid, else `false`
654
+ * @public
655
+ */
656
+ function isValidStatusCode$2(code) {
657
+ return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999;
658
+ }
659
+ /**
660
+ * Checks if a given buffer contains only correct UTF-8.
661
+ * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
662
+ * Markus Kuhn.
663
+ *
664
+ * @param {Buffer} buf The buffer to check
665
+ * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
666
+ * @public
667
+ */
668
+ function _isValidUTF8(buf) {
669
+ const len = buf.length;
670
+ let i = 0;
671
+ while (i < len) if ((buf[i] & 128) === 0) i++;
672
+ else if ((buf[i] & 224) === 192) {
673
+ if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false;
674
+ i += 2;
675
+ } else if ((buf[i] & 240) === 224) {
676
+ if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false;
677
+ i += 3;
678
+ } else if ((buf[i] & 248) === 240) {
679
+ if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false;
680
+ i += 4;
681
+ } else return false;
682
+ return true;
683
+ }
684
+ /**
685
+ * Determines whether a value is a `Blob`.
686
+ *
687
+ * @param {*} value The value to be tested
688
+ * @return {Boolean} `true` if `value` is a `Blob`, else `false`
689
+ * @private
690
+ */
691
+ function isBlob$2(value) {
692
+ return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
693
+ }
694
+ module.exports = {
695
+ isBlob: isBlob$2,
696
+ isValidStatusCode: isValidStatusCode$2,
697
+ isValidUTF8: _isValidUTF8,
698
+ tokenChars: tokenChars$2
699
+ };
700
+ if (isUtf8) module.exports.isValidUTF8 = function(buf) {
701
+ return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
702
+ };
703
+ else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
704
+ const isValidUTF8$1 = __require("utf-8-validate");
705
+ module.exports.isValidUTF8 = function(buf) {
706
+ return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8$1(buf);
707
+ };
708
+ } catch (e) {}
709
+ }) });
710
+
711
+ //#endregion
712
+ //#region node_modules/ws/lib/receiver.js
713
+ var require_receiver = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/receiver.js": ((exports, module) => {
714
+ const { Writable } = __require("stream");
715
+ const PerMessageDeflate$4 = require_permessage_deflate();
716
+ const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants();
717
+ const { concat, toArrayBuffer, unmask } = require_buffer_util();
718
+ const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = require_validation();
719
+ const FastBuffer = Buffer[Symbol.species];
720
+ const GET_INFO = 0;
721
+ const GET_PAYLOAD_LENGTH_16 = 1;
722
+ const GET_PAYLOAD_LENGTH_64 = 2;
723
+ const GET_MASK = 3;
724
+ const GET_DATA = 4;
725
+ const INFLATING = 5;
726
+ const DEFER_EVENT = 6;
727
+ /**
728
+ * HyBi Receiver implementation.
729
+ *
730
+ * @extends Writable
731
+ */
732
+ var Receiver$2 = class extends Writable {
733
+ /**
734
+ * Creates a Receiver instance.
735
+ *
736
+ * @param {Object} [options] Options object
737
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
738
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
739
+ * multiple times in the same tick
740
+ * @param {String} [options.binaryType=nodebuffer] The type for binary data
741
+ * @param {Object} [options.extensions] An object containing the negotiated
742
+ * extensions
743
+ * @param {Boolean} [options.isServer=false] Specifies whether to operate in
744
+ * client or server mode
745
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
746
+ * buffered data chunks
747
+ * @param {Number} [options.maxFragments=0] The maximum number of message
748
+ * fragments
749
+ * @param {Number} [options.maxPayload=0] The maximum allowed message length
750
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
751
+ * not to skip UTF-8 validation for text and close messages
752
+ */
753
+ constructor(options = {}) {
754
+ super();
755
+ this._allowSynchronousEvents = options.allowSynchronousEvents !== void 0 ? options.allowSynchronousEvents : true;
756
+ this._binaryType = options.binaryType || BINARY_TYPES$1[0];
757
+ this._extensions = options.extensions || {};
758
+ this._isServer = !!options.isServer;
759
+ this._maxBufferedChunks = options.maxBufferedChunks | 0;
760
+ this._maxFragments = options.maxFragments | 0;
761
+ this._maxPayload = options.maxPayload | 0;
762
+ this._skipUTF8Validation = !!options.skipUTF8Validation;
763
+ this[kWebSocket$3] = void 0;
764
+ this._bufferedBytes = 0;
765
+ this._buffers = [];
766
+ this._compressed = false;
767
+ this._payloadLength = 0;
768
+ this._mask = void 0;
769
+ this._fragmented = 0;
770
+ this._masked = false;
771
+ this._fin = false;
772
+ this._opcode = 0;
773
+ this._totalPayloadLength = 0;
774
+ this._messageLength = 0;
775
+ this._numFragments = 0;
776
+ this._fragments = [];
777
+ this._errored = false;
778
+ this._loop = false;
779
+ this._state = GET_INFO;
780
+ }
781
+ /**
782
+ * Implements `Writable.prototype._write()`.
783
+ *
784
+ * @param {Buffer} chunk The chunk of data to write
785
+ * @param {String} encoding The character encoding of `chunk`
786
+ * @param {Function} cb Callback
787
+ * @private
788
+ */
789
+ _write(chunk, encoding, cb) {
790
+ if (this._opcode === 8 && this._state == GET_INFO) return cb();
791
+ if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
792
+ cb(this.createError(RangeError, "Too many buffered chunks", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
793
+ return;
794
+ }
795
+ this._bufferedBytes += chunk.length;
796
+ this._buffers.push(chunk);
797
+ this.startLoop(cb);
798
+ }
799
+ /**
800
+ * Consumes `n` bytes from the buffered data.
801
+ *
802
+ * @param {Number} n The number of bytes to consume
803
+ * @return {Buffer} The consumed bytes
804
+ * @private
805
+ */
806
+ consume(n) {
807
+ this._bufferedBytes -= n;
808
+ if (n === this._buffers[0].length) return this._buffers.shift();
809
+ if (n < this._buffers[0].length) {
810
+ const buf = this._buffers[0];
811
+ this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);
812
+ return new FastBuffer(buf.buffer, buf.byteOffset, n);
813
+ }
814
+ const dst = Buffer.allocUnsafe(n);
815
+ do {
816
+ const buf = this._buffers[0];
817
+ const offset = dst.length - n;
818
+ if (n >= buf.length) dst.set(this._buffers.shift(), offset);
819
+ else {
820
+ dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
821
+ this._buffers[0] = new FastBuffer(buf.buffer, buf.byteOffset + n, buf.length - n);
822
+ }
823
+ n -= buf.length;
824
+ } while (n > 0);
825
+ return dst;
826
+ }
827
+ /**
828
+ * Starts the parsing loop.
829
+ *
830
+ * @param {Function} cb Callback
831
+ * @private
832
+ */
833
+ startLoop(cb) {
834
+ this._loop = true;
835
+ do
836
+ switch (this._state) {
837
+ case GET_INFO:
838
+ this.getInfo(cb);
839
+ break;
840
+ case GET_PAYLOAD_LENGTH_16:
841
+ this.getPayloadLength16(cb);
842
+ break;
843
+ case GET_PAYLOAD_LENGTH_64:
844
+ this.getPayloadLength64(cb);
845
+ break;
846
+ case GET_MASK:
847
+ this.getMask();
848
+ break;
849
+ case GET_DATA:
850
+ this.getData(cb);
851
+ break;
852
+ case INFLATING:
853
+ case DEFER_EVENT:
854
+ this._loop = false;
855
+ return;
856
+ }
857
+ while (this._loop);
858
+ if (!this._errored) cb();
859
+ }
860
+ /**
861
+ * Reads the first two bytes of a frame.
862
+ *
863
+ * @param {Function} cb Callback
864
+ * @private
865
+ */
866
+ getInfo(cb) {
867
+ if (this._bufferedBytes < 2) {
868
+ this._loop = false;
869
+ return;
870
+ }
871
+ const buf = this.consume(2);
872
+ if ((buf[0] & 48) !== 0) {
873
+ cb(this.createError(RangeError, "RSV2 and RSV3 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_2_3"));
874
+ return;
875
+ }
876
+ const compressed = (buf[0] & 64) === 64;
877
+ if (compressed && !this._extensions[PerMessageDeflate$4.extensionName]) {
878
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
879
+ return;
880
+ }
881
+ this._fin = (buf[0] & 128) === 128;
882
+ this._opcode = buf[0] & 15;
883
+ this._payloadLength = buf[1] & 127;
884
+ if (this._opcode === 0) {
885
+ if (compressed) {
886
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
887
+ return;
888
+ }
889
+ if (!this._fragmented) {
890
+ cb(this.createError(RangeError, "invalid opcode 0", true, 1002, "WS_ERR_INVALID_OPCODE"));
891
+ return;
892
+ }
893
+ this._opcode = this._fragmented;
894
+ } else if (this._opcode === 1 || this._opcode === 2) {
895
+ if (this._fragmented) {
896
+ cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE"));
897
+ return;
898
+ }
899
+ this._compressed = compressed;
900
+ } else if (this._opcode > 7 && this._opcode < 11) {
901
+ if (!this._fin) {
902
+ cb(this.createError(RangeError, "FIN must be set", true, 1002, "WS_ERR_EXPECTED_FIN"));
903
+ return;
904
+ }
905
+ if (compressed) {
906
+ cb(this.createError(RangeError, "RSV1 must be clear", true, 1002, "WS_ERR_UNEXPECTED_RSV_1"));
907
+ return;
908
+ }
909
+ if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
910
+ cb(this.createError(RangeError, `invalid payload length ${this._payloadLength}`, true, 1002, "WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"));
911
+ return;
912
+ }
913
+ } else {
914
+ cb(this.createError(RangeError, `invalid opcode ${this._opcode}`, true, 1002, "WS_ERR_INVALID_OPCODE"));
915
+ return;
916
+ }
917
+ if (!this._fin && !this._fragmented) this._fragmented = this._opcode;
918
+ this._masked = (buf[1] & 128) === 128;
919
+ if (this._isServer) {
920
+ if (!this._masked) {
921
+ cb(this.createError(RangeError, "MASK must be set", true, 1002, "WS_ERR_EXPECTED_MASK"));
922
+ return;
923
+ }
924
+ } else if (this._masked) {
925
+ cb(this.createError(RangeError, "MASK must be clear", true, 1002, "WS_ERR_UNEXPECTED_MASK"));
926
+ return;
927
+ }
928
+ if (this._payloadLength === 126) this._state = GET_PAYLOAD_LENGTH_16;
929
+ else if (this._payloadLength === 127) this._state = GET_PAYLOAD_LENGTH_64;
930
+ else this.haveLength(cb);
931
+ }
932
+ /**
933
+ * Gets extended payload length (7+16).
934
+ *
935
+ * @param {Function} cb Callback
936
+ * @private
937
+ */
938
+ getPayloadLength16(cb) {
939
+ if (this._bufferedBytes < 2) {
940
+ this._loop = false;
941
+ return;
942
+ }
943
+ this._payloadLength = this.consume(2).readUInt16BE(0);
944
+ this.haveLength(cb);
945
+ }
946
+ /**
947
+ * Gets extended payload length (7+64).
948
+ *
949
+ * @param {Function} cb Callback
950
+ * @private
951
+ */
952
+ getPayloadLength64(cb) {
953
+ if (this._bufferedBytes < 8) {
954
+ this._loop = false;
955
+ return;
956
+ }
957
+ const buf = this.consume(8);
958
+ const num = buf.readUInt32BE(0);
959
+ if (num > Math.pow(2, 21) - 1) {
960
+ cb(this.createError(RangeError, "Unsupported WebSocket frame: payload length > 2^53 - 1", false, 1009, "WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"));
961
+ return;
962
+ }
963
+ this._payloadLength = num * Math.pow(2, 32) + buf.readUInt32BE(4);
964
+ this.haveLength(cb);
965
+ }
966
+ /**
967
+ * Payload length has been read.
968
+ *
969
+ * @param {Function} cb Callback
970
+ * @private
971
+ */
972
+ haveLength(cb) {
973
+ if (this._payloadLength && this._opcode < 8) {
974
+ this._totalPayloadLength += this._payloadLength;
975
+ if (this._totalPayloadLength > this._maxPayload && this._maxPayload > 0) {
976
+ cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));
977
+ return;
978
+ }
979
+ }
980
+ if (this._masked) this._state = GET_MASK;
981
+ else this._state = GET_DATA;
982
+ }
983
+ /**
984
+ * Reads mask bytes.
985
+ *
986
+ * @private
987
+ */
988
+ getMask() {
989
+ if (this._bufferedBytes < 4) {
990
+ this._loop = false;
991
+ return;
992
+ }
993
+ this._mask = this.consume(4);
994
+ this._state = GET_DATA;
995
+ }
996
+ /**
997
+ * Reads data bytes.
998
+ *
999
+ * @param {Function} cb Callback
1000
+ * @private
1001
+ */
1002
+ getData(cb) {
1003
+ let data = EMPTY_BUFFER$2;
1004
+ if (this._payloadLength) {
1005
+ if (this._bufferedBytes < this._payloadLength) {
1006
+ this._loop = false;
1007
+ return;
1008
+ }
1009
+ data = this.consume(this._payloadLength);
1010
+ if (this._masked && (this._mask[0] | this._mask[1] | this._mask[2] | this._mask[3]) !== 0) unmask(data, this._mask);
1011
+ }
1012
+ if (this._opcode > 7) {
1013
+ this.controlMessage(data, cb);
1014
+ return;
1015
+ }
1016
+ if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
1017
+ cb(this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
1018
+ return;
1019
+ }
1020
+ if (this._compressed) {
1021
+ this._state = INFLATING;
1022
+ this.decompress(data, cb);
1023
+ return;
1024
+ }
1025
+ if (data.length) {
1026
+ this._messageLength = this._totalPayloadLength;
1027
+ this._fragments.push(data);
1028
+ }
1029
+ this.dataMessage(cb);
1030
+ }
1031
+ /**
1032
+ * Decompresses data.
1033
+ *
1034
+ * @param {Buffer} data Compressed data
1035
+ * @param {Function} cb Callback
1036
+ * @private
1037
+ */
1038
+ decompress(data, cb) {
1039
+ this._extensions[PerMessageDeflate$4.extensionName].decompress(data, this._fin, (err, buf) => {
1040
+ if (err) return cb(err);
1041
+ if (buf.length) {
1042
+ this._messageLength += buf.length;
1043
+ if (this._messageLength > this._maxPayload && this._maxPayload > 0) {
1044
+ cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));
1045
+ return;
1046
+ }
1047
+ this._fragments.push(buf);
1048
+ }
1049
+ this.dataMessage(cb);
1050
+ if (this._state === GET_INFO) this.startLoop(cb);
1051
+ });
1052
+ }
1053
+ /**
1054
+ * Handles a data message.
1055
+ *
1056
+ * @param {Function} cb Callback
1057
+ * @private
1058
+ */
1059
+ dataMessage(cb) {
1060
+ if (!this._fin) {
1061
+ this._state = GET_INFO;
1062
+ return;
1063
+ }
1064
+ const messageLength = this._messageLength;
1065
+ const fragments = this._fragments;
1066
+ this._totalPayloadLength = 0;
1067
+ this._messageLength = 0;
1068
+ this._fragmented = 0;
1069
+ this._numFragments = 0;
1070
+ this._fragments = [];
1071
+ if (this._opcode === 2) {
1072
+ let data;
1073
+ if (this._binaryType === "nodebuffer") data = concat(fragments, messageLength);
1074
+ else if (this._binaryType === "arraybuffer") data = toArrayBuffer(concat(fragments, messageLength));
1075
+ else if (this._binaryType === "blob") data = new Blob(fragments);
1076
+ else data = fragments;
1077
+ if (this._allowSynchronousEvents) {
1078
+ this.emit("message", data, true);
1079
+ this._state = GET_INFO;
1080
+ } else {
1081
+ this._state = DEFER_EVENT;
1082
+ setImmediate(() => {
1083
+ this.emit("message", data, true);
1084
+ this._state = GET_INFO;
1085
+ this.startLoop(cb);
1086
+ });
1087
+ }
1088
+ } else {
1089
+ const buf = concat(fragments, messageLength);
1090
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
1091
+ cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8"));
1092
+ return;
1093
+ }
1094
+ if (this._state === INFLATING || this._allowSynchronousEvents) {
1095
+ this.emit("message", buf, false);
1096
+ this._state = GET_INFO;
1097
+ } else {
1098
+ this._state = DEFER_EVENT;
1099
+ setImmediate(() => {
1100
+ this.emit("message", buf, false);
1101
+ this._state = GET_INFO;
1102
+ this.startLoop(cb);
1103
+ });
1104
+ }
1105
+ }
1106
+ }
1107
+ /**
1108
+ * Handles a control message.
1109
+ *
1110
+ * @param {Buffer} data Data to handle
1111
+ * @return {(Error|RangeError|undefined)} A possible error
1112
+ * @private
1113
+ */
1114
+ controlMessage(data, cb) {
1115
+ if (this._opcode === 8) {
1116
+ if (data.length === 0) {
1117
+ this._loop = false;
1118
+ this.emit("conclude", 1005, EMPTY_BUFFER$2);
1119
+ this.end();
1120
+ } else {
1121
+ const code = data.readUInt16BE(0);
1122
+ if (!isValidStatusCode$1(code)) {
1123
+ cb(this.createError(RangeError, `invalid status code ${code}`, true, 1002, "WS_ERR_INVALID_CLOSE_CODE"));
1124
+ return;
1125
+ }
1126
+ const buf = new FastBuffer(data.buffer, data.byteOffset + 2, data.length - 2);
1127
+ if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
1128
+ cb(this.createError(Error, "invalid UTF-8 sequence", true, 1007, "WS_ERR_INVALID_UTF8"));
1129
+ return;
1130
+ }
1131
+ this._loop = false;
1132
+ this.emit("conclude", code, buf);
1133
+ this.end();
1134
+ }
1135
+ this._state = GET_INFO;
1136
+ return;
1137
+ }
1138
+ if (this._allowSynchronousEvents) {
1139
+ this.emit(this._opcode === 9 ? "ping" : "pong", data);
1140
+ this._state = GET_INFO;
1141
+ } else {
1142
+ this._state = DEFER_EVENT;
1143
+ setImmediate(() => {
1144
+ this.emit(this._opcode === 9 ? "ping" : "pong", data);
1145
+ this._state = GET_INFO;
1146
+ this.startLoop(cb);
1147
+ });
1148
+ }
1149
+ }
1150
+ /**
1151
+ * Builds an error object.
1152
+ *
1153
+ * @param {function(new:Error|RangeError)} ErrorCtor The error constructor
1154
+ * @param {String} message The error message
1155
+ * @param {Boolean} prefix Specifies whether or not to add a default prefix to
1156
+ * `message`
1157
+ * @param {Number} statusCode The status code
1158
+ * @param {String} errorCode The exposed error code
1159
+ * @return {(Error|RangeError)} The error
1160
+ * @private
1161
+ */
1162
+ createError(ErrorCtor, message, prefix, statusCode, errorCode) {
1163
+ this._loop = false;
1164
+ this._errored = true;
1165
+ const err = new ErrorCtor(prefix ? `Invalid WebSocket frame: ${message}` : message);
1166
+ Error.captureStackTrace(err, this.createError);
1167
+ err.code = errorCode;
1168
+ err[kStatusCode$1] = statusCode;
1169
+ return err;
1170
+ }
1171
+ };
1172
+ module.exports = Receiver$2;
1173
+ }) });
1174
+
1175
+ //#endregion
1176
+ //#region node_modules/ws/lib/sender.js
1177
+ var require_sender = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/sender.js": ((exports, module) => {
1178
+ const { Duplex: Duplex$3 } = __require("stream");
1179
+ const { randomFillSync } = __require("crypto");
1180
+ const { types: { isUint8Array } } = __require("util");
1181
+ const PerMessageDeflate$3 = require_permessage_deflate();
1182
+ const { EMPTY_BUFFER: EMPTY_BUFFER$1, kWebSocket: kWebSocket$2, NOOP: NOOP$1 } = require_constants();
1183
+ const { isBlob: isBlob$1, isValidStatusCode } = require_validation();
1184
+ const { mask: applyMask, toBuffer: toBuffer$1 } = require_buffer_util();
1185
+ const kByteLength = Symbol("kByteLength");
1186
+ const maskBuffer = Buffer.alloc(4);
1187
+ const RANDOM_POOL_SIZE = 8 * 1024;
1188
+ let randomPool;
1189
+ let randomPoolPointer = RANDOM_POOL_SIZE;
1190
+ const DEFAULT = 0;
1191
+ const DEFLATING = 1;
1192
+ const GET_BLOB_DATA = 2;
1193
+ /**
1194
+ * HyBi Sender implementation.
1195
+ */
1196
+ var Sender$2 = class Sender$2 {
1197
+ /**
1198
+ * Creates a Sender instance.
1199
+ *
1200
+ * @param {Duplex} socket The connection socket
1201
+ * @param {Object} [extensions] An object containing the negotiated extensions
1202
+ * @param {Function} [generateMask] The function used to generate the masking
1203
+ * key
1204
+ */
1205
+ constructor(socket, extensions, generateMask) {
1206
+ this._extensions = extensions || {};
1207
+ if (generateMask) {
1208
+ this._generateMask = generateMask;
1209
+ this._maskBuffer = Buffer.alloc(4);
1210
+ }
1211
+ this._socket = socket;
1212
+ this._firstFragment = true;
1213
+ this._compress = false;
1214
+ this._bufferedBytes = 0;
1215
+ this._queue = [];
1216
+ this._state = DEFAULT;
1217
+ this.onerror = NOOP$1;
1218
+ this[kWebSocket$2] = void 0;
1219
+ }
1220
+ /**
1221
+ * Frames a piece of data according to the HyBi WebSocket protocol.
1222
+ *
1223
+ * @param {(Buffer|String)} data The data to frame
1224
+ * @param {Object} options Options object
1225
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
1226
+ * FIN bit
1227
+ * @param {Function} [options.generateMask] The function used to generate the
1228
+ * masking key
1229
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
1230
+ * `data`
1231
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
1232
+ * key
1233
+ * @param {Number} options.opcode The opcode
1234
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
1235
+ * modified
1236
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
1237
+ * RSV1 bit
1238
+ * @return {(Buffer|String)[]} The framed data
1239
+ * @public
1240
+ */
1241
+ static frame(data, options) {
1242
+ let mask;
1243
+ let merge = false;
1244
+ let offset = 2;
1245
+ let skipMasking = false;
1246
+ if (options.mask) {
1247
+ mask = options.maskBuffer || maskBuffer;
1248
+ if (options.generateMask) options.generateMask(mask);
1249
+ else {
1250
+ if (randomPoolPointer === RANDOM_POOL_SIZE) {
1251
+ /* istanbul ignore else */
1252
+ if (randomPool === void 0) randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
1253
+ randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
1254
+ randomPoolPointer = 0;
1255
+ }
1256
+ mask[0] = randomPool[randomPoolPointer++];
1257
+ mask[1] = randomPool[randomPoolPointer++];
1258
+ mask[2] = randomPool[randomPoolPointer++];
1259
+ mask[3] = randomPool[randomPoolPointer++];
1260
+ }
1261
+ skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
1262
+ offset = 6;
1263
+ }
1264
+ let dataLength;
1265
+ if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];
1266
+ else {
1267
+ data = Buffer.from(data);
1268
+ dataLength = data.length;
1269
+ }
1270
+ else {
1271
+ dataLength = data.length;
1272
+ merge = options.mask && options.readOnly && !skipMasking;
1273
+ }
1274
+ let payloadLength = dataLength;
1275
+ if (dataLength >= 65536) {
1276
+ offset += 8;
1277
+ payloadLength = 127;
1278
+ } else if (dataLength > 125) {
1279
+ offset += 2;
1280
+ payloadLength = 126;
1281
+ }
1282
+ const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
1283
+ target[0] = options.fin ? options.opcode | 128 : options.opcode;
1284
+ if (options.rsv1) target[0] |= 64;
1285
+ target[1] = payloadLength;
1286
+ if (payloadLength === 126) target.writeUInt16BE(dataLength, 2);
1287
+ else if (payloadLength === 127) {
1288
+ target[2] = target[3] = 0;
1289
+ target.writeUIntBE(dataLength, 4, 6);
1290
+ }
1291
+ if (!options.mask) return [target, data];
1292
+ target[1] |= 128;
1293
+ target[offset - 4] = mask[0];
1294
+ target[offset - 3] = mask[1];
1295
+ target[offset - 2] = mask[2];
1296
+ target[offset - 1] = mask[3];
1297
+ if (skipMasking) return [target, data];
1298
+ if (merge) {
1299
+ applyMask(data, mask, target, offset, dataLength);
1300
+ return [target];
1301
+ }
1302
+ applyMask(data, mask, data, 0, dataLength);
1303
+ return [target, data];
1304
+ }
1305
+ /**
1306
+ * Sends a close message to the other peer.
1307
+ *
1308
+ * @param {Number} [code] The status code component of the body
1309
+ * @param {(String|Buffer)} [data] The message component of the body
1310
+ * @param {Boolean} [mask=false] Specifies whether or not to mask the message
1311
+ * @param {Function} [cb] Callback
1312
+ * @public
1313
+ */
1314
+ close(code, data, mask, cb) {
1315
+ let buf;
1316
+ if (code === void 0) buf = EMPTY_BUFFER$1;
1317
+ else if (typeof code !== "number" || !isValidStatusCode(code)) throw new TypeError("First argument must be a valid error code number");
1318
+ else if (data === void 0 || !data.length) {
1319
+ buf = Buffer.allocUnsafe(2);
1320
+ buf.writeUInt16BE(code, 0);
1321
+ } else {
1322
+ const length = Buffer.byteLength(data);
1323
+ if (length > 123) throw new RangeError("The message must not be greater than 123 bytes");
1324
+ buf = Buffer.allocUnsafe(2 + length);
1325
+ buf.writeUInt16BE(code, 0);
1326
+ if (typeof data === "string") buf.write(data, 2);
1327
+ else if (isUint8Array(data)) buf.set(data, 2);
1328
+ else throw new TypeError("Second argument must be a string or a Uint8Array");
1329
+ }
1330
+ const options = {
1331
+ [kByteLength]: buf.length,
1332
+ fin: true,
1333
+ generateMask: this._generateMask,
1334
+ mask,
1335
+ maskBuffer: this._maskBuffer,
1336
+ opcode: 8,
1337
+ readOnly: false,
1338
+ rsv1: false
1339
+ };
1340
+ if (this._state !== DEFAULT) this.enqueue([
1341
+ this.dispatch,
1342
+ buf,
1343
+ false,
1344
+ options,
1345
+ cb
1346
+ ]);
1347
+ else this.sendFrame(Sender$2.frame(buf, options), cb);
1348
+ }
1349
+ /**
1350
+ * Sends a ping message to the other peer.
1351
+ *
1352
+ * @param {*} data The message to send
1353
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
1354
+ * @param {Function} [cb] Callback
1355
+ * @public
1356
+ */
1357
+ ping(data, mask, cb) {
1358
+ let byteLength;
1359
+ let readOnly;
1360
+ if (typeof data === "string") {
1361
+ byteLength = Buffer.byteLength(data);
1362
+ readOnly = false;
1363
+ } else if (isBlob$1(data)) {
1364
+ byteLength = data.size;
1365
+ readOnly = false;
1366
+ } else {
1367
+ data = toBuffer$1(data);
1368
+ byteLength = data.length;
1369
+ readOnly = toBuffer$1.readOnly;
1370
+ }
1371
+ if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
1372
+ const options = {
1373
+ [kByteLength]: byteLength,
1374
+ fin: true,
1375
+ generateMask: this._generateMask,
1376
+ mask,
1377
+ maskBuffer: this._maskBuffer,
1378
+ opcode: 9,
1379
+ readOnly,
1380
+ rsv1: false
1381
+ };
1382
+ if (isBlob$1(data)) if (this._state !== DEFAULT) this.enqueue([
1383
+ this.getBlobData,
1384
+ data,
1385
+ false,
1386
+ options,
1387
+ cb
1388
+ ]);
1389
+ else this.getBlobData(data, false, options, cb);
1390
+ else if (this._state !== DEFAULT) this.enqueue([
1391
+ this.dispatch,
1392
+ data,
1393
+ false,
1394
+ options,
1395
+ cb
1396
+ ]);
1397
+ else this.sendFrame(Sender$2.frame(data, options), cb);
1398
+ }
1399
+ /**
1400
+ * Sends a pong message to the other peer.
1401
+ *
1402
+ * @param {*} data The message to send
1403
+ * @param {Boolean} [mask=false] Specifies whether or not to mask `data`
1404
+ * @param {Function} [cb] Callback
1405
+ * @public
1406
+ */
1407
+ pong(data, mask, cb) {
1408
+ let byteLength;
1409
+ let readOnly;
1410
+ if (typeof data === "string") {
1411
+ byteLength = Buffer.byteLength(data);
1412
+ readOnly = false;
1413
+ } else if (isBlob$1(data)) {
1414
+ byteLength = data.size;
1415
+ readOnly = false;
1416
+ } else {
1417
+ data = toBuffer$1(data);
1418
+ byteLength = data.length;
1419
+ readOnly = toBuffer$1.readOnly;
1420
+ }
1421
+ if (byteLength > 125) throw new RangeError("The data size must not be greater than 125 bytes");
1422
+ const options = {
1423
+ [kByteLength]: byteLength,
1424
+ fin: true,
1425
+ generateMask: this._generateMask,
1426
+ mask,
1427
+ maskBuffer: this._maskBuffer,
1428
+ opcode: 10,
1429
+ readOnly,
1430
+ rsv1: false
1431
+ };
1432
+ if (isBlob$1(data)) if (this._state !== DEFAULT) this.enqueue([
1433
+ this.getBlobData,
1434
+ data,
1435
+ false,
1436
+ options,
1437
+ cb
1438
+ ]);
1439
+ else this.getBlobData(data, false, options, cb);
1440
+ else if (this._state !== DEFAULT) this.enqueue([
1441
+ this.dispatch,
1442
+ data,
1443
+ false,
1444
+ options,
1445
+ cb
1446
+ ]);
1447
+ else this.sendFrame(Sender$2.frame(data, options), cb);
1448
+ }
1449
+ /**
1450
+ * Sends a data message to the other peer.
1451
+ *
1452
+ * @param {*} data The message to send
1453
+ * @param {Object} options Options object
1454
+ * @param {Boolean} [options.binary=false] Specifies whether `data` is binary
1455
+ * or text
1456
+ * @param {Boolean} [options.compress=false] Specifies whether or not to
1457
+ * compress `data`
1458
+ * @param {Boolean} [options.fin=false] Specifies whether the fragment is the
1459
+ * last one
1460
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
1461
+ * `data`
1462
+ * @param {Function} [cb] Callback
1463
+ * @public
1464
+ */
1465
+ send(data, options, cb) {
1466
+ const perMessageDeflate = this._extensions[PerMessageDeflate$3.extensionName];
1467
+ let opcode = options.binary ? 2 : 1;
1468
+ let rsv1 = options.compress;
1469
+ let byteLength;
1470
+ let readOnly;
1471
+ if (typeof data === "string") {
1472
+ byteLength = Buffer.byteLength(data);
1473
+ readOnly = false;
1474
+ } else if (isBlob$1(data)) {
1475
+ byteLength = data.size;
1476
+ readOnly = false;
1477
+ } else {
1478
+ data = toBuffer$1(data);
1479
+ byteLength = data.length;
1480
+ readOnly = toBuffer$1.readOnly;
1481
+ }
1482
+ if (this._firstFragment) {
1483
+ this._firstFragment = false;
1484
+ if (rsv1 && perMessageDeflate && perMessageDeflate.params[perMessageDeflate._isServer ? "server_no_context_takeover" : "client_no_context_takeover"]) rsv1 = byteLength >= perMessageDeflate._threshold;
1485
+ this._compress = rsv1;
1486
+ } else {
1487
+ rsv1 = false;
1488
+ opcode = 0;
1489
+ }
1490
+ if (options.fin) this._firstFragment = true;
1491
+ const opts = {
1492
+ [kByteLength]: byteLength,
1493
+ fin: options.fin,
1494
+ generateMask: this._generateMask,
1495
+ mask: options.mask,
1496
+ maskBuffer: this._maskBuffer,
1497
+ opcode,
1498
+ readOnly,
1499
+ rsv1
1500
+ };
1501
+ if (isBlob$1(data)) if (this._state !== DEFAULT) this.enqueue([
1502
+ this.getBlobData,
1503
+ data,
1504
+ this._compress,
1505
+ opts,
1506
+ cb
1507
+ ]);
1508
+ else this.getBlobData(data, this._compress, opts, cb);
1509
+ else if (this._state !== DEFAULT) this.enqueue([
1510
+ this.dispatch,
1511
+ data,
1512
+ this._compress,
1513
+ opts,
1514
+ cb
1515
+ ]);
1516
+ else this.dispatch(data, this._compress, opts, cb);
1517
+ }
1518
+ /**
1519
+ * Gets the contents of a blob as binary data.
1520
+ *
1521
+ * @param {Blob} blob The blob
1522
+ * @param {Boolean} [compress=false] Specifies whether or not to compress
1523
+ * the data
1524
+ * @param {Object} options Options object
1525
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
1526
+ * FIN bit
1527
+ * @param {Function} [options.generateMask] The function used to generate the
1528
+ * masking key
1529
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
1530
+ * `data`
1531
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
1532
+ * key
1533
+ * @param {Number} options.opcode The opcode
1534
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
1535
+ * modified
1536
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
1537
+ * RSV1 bit
1538
+ * @param {Function} [cb] Callback
1539
+ * @private
1540
+ */
1541
+ getBlobData(blob, compress, options, cb) {
1542
+ this._bufferedBytes += options[kByteLength];
1543
+ this._state = GET_BLOB_DATA;
1544
+ blob.arrayBuffer().then((arrayBuffer) => {
1545
+ if (this._socket.destroyed) {
1546
+ const err = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
1547
+ process.nextTick(callCallbacks, this, err, cb);
1548
+ return;
1549
+ }
1550
+ this._bufferedBytes -= options[kByteLength];
1551
+ const data = toBuffer$1(arrayBuffer);
1552
+ if (!compress) {
1553
+ this._state = DEFAULT;
1554
+ this.sendFrame(Sender$2.frame(data, options), cb);
1555
+ this.dequeue();
1556
+ } else this.dispatch(data, compress, options, cb);
1557
+ }).catch((err) => {
1558
+ process.nextTick(onError, this, err, cb);
1559
+ });
1560
+ }
1561
+ /**
1562
+ * Dispatches a message.
1563
+ *
1564
+ * @param {(Buffer|String)} data The message to send
1565
+ * @param {Boolean} [compress=false] Specifies whether or not to compress
1566
+ * `data`
1567
+ * @param {Object} options Options object
1568
+ * @param {Boolean} [options.fin=false] Specifies whether or not to set the
1569
+ * FIN bit
1570
+ * @param {Function} [options.generateMask] The function used to generate the
1571
+ * masking key
1572
+ * @param {Boolean} [options.mask=false] Specifies whether or not to mask
1573
+ * `data`
1574
+ * @param {Buffer} [options.maskBuffer] The buffer used to store the masking
1575
+ * key
1576
+ * @param {Number} options.opcode The opcode
1577
+ * @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
1578
+ * modified
1579
+ * @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
1580
+ * RSV1 bit
1581
+ * @param {Function} [cb] Callback
1582
+ * @private
1583
+ */
1584
+ dispatch(data, compress, options, cb) {
1585
+ if (!compress) {
1586
+ this.sendFrame(Sender$2.frame(data, options), cb);
1587
+ return;
1588
+ }
1589
+ const perMessageDeflate = this._extensions[PerMessageDeflate$3.extensionName];
1590
+ this._bufferedBytes += options[kByteLength];
1591
+ this._state = DEFLATING;
1592
+ perMessageDeflate.compress(data, options.fin, (_, buf) => {
1593
+ if (this._socket.destroyed) {
1594
+ callCallbacks(this, /* @__PURE__ */ new Error("The socket was closed while data was being compressed"), cb);
1595
+ return;
1596
+ }
1597
+ this._bufferedBytes -= options[kByteLength];
1598
+ this._state = DEFAULT;
1599
+ options.readOnly = false;
1600
+ this.sendFrame(Sender$2.frame(buf, options), cb);
1601
+ this.dequeue();
1602
+ });
1603
+ }
1604
+ /**
1605
+ * Executes queued send operations.
1606
+ *
1607
+ * @private
1608
+ */
1609
+ dequeue() {
1610
+ while (this._state === DEFAULT && this._queue.length) {
1611
+ const params = this._queue.shift();
1612
+ this._bufferedBytes -= params[3][kByteLength];
1613
+ Reflect.apply(params[0], this, params.slice(1));
1614
+ }
1615
+ }
1616
+ /**
1617
+ * Enqueues a send operation.
1618
+ *
1619
+ * @param {Array} params Send operation parameters.
1620
+ * @private
1621
+ */
1622
+ enqueue(params) {
1623
+ this._bufferedBytes += params[3][kByteLength];
1624
+ this._queue.push(params);
1625
+ }
1626
+ /**
1627
+ * Sends a frame.
1628
+ *
1629
+ * @param {(Buffer | String)[]} list The frame to send
1630
+ * @param {Function} [cb] Callback
1631
+ * @private
1632
+ */
1633
+ sendFrame(list, cb) {
1634
+ if (list.length === 2) {
1635
+ this._socket.cork();
1636
+ this._socket.write(list[0]);
1637
+ this._socket.write(list[1], cb);
1638
+ this._socket.uncork();
1639
+ } else this._socket.write(list[0], cb);
1640
+ }
1641
+ };
1642
+ module.exports = Sender$2;
1643
+ /**
1644
+ * Calls queued callbacks with an error.
1645
+ *
1646
+ * @param {Sender} sender The `Sender` instance
1647
+ * @param {Error} err The error to call the callbacks with
1648
+ * @param {Function} [cb] The first callback
1649
+ * @private
1650
+ */
1651
+ function callCallbacks(sender, err, cb) {
1652
+ if (typeof cb === "function") cb(err);
1653
+ for (let i = 0; i < sender._queue.length; i++) {
1654
+ const params = sender._queue[i];
1655
+ const callback = params[params.length - 1];
1656
+ if (typeof callback === "function") callback(err);
1657
+ }
1658
+ }
1659
+ /**
1660
+ * Handles a `Sender` error.
1661
+ *
1662
+ * @param {Sender} sender The `Sender` instance
1663
+ * @param {Error} err The error
1664
+ * @param {Function} [cb] The first pending callback
1665
+ * @private
1666
+ */
1667
+ function onError(sender, err, cb) {
1668
+ callCallbacks(sender, err, cb);
1669
+ sender.onerror(err);
1670
+ }
1671
+ }) });
1672
+
1673
+ //#endregion
1674
+ //#region node_modules/ws/lib/event-target.js
1675
+ var require_event_target = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/event-target.js": ((exports, module) => {
1676
+ const { kForOnEventAttribute: kForOnEventAttribute$1, kListener: kListener$1 } = require_constants();
1677
+ const kCode = Symbol("kCode");
1678
+ const kData = Symbol("kData");
1679
+ const kError = Symbol("kError");
1680
+ const kMessage = Symbol("kMessage");
1681
+ const kReason = Symbol("kReason");
1682
+ const kTarget = Symbol("kTarget");
1683
+ const kType = Symbol("kType");
1684
+ const kWasClean = Symbol("kWasClean");
1685
+ /**
1686
+ * Class representing an event.
1687
+ */
1688
+ var Event = class {
1689
+ /**
1690
+ * Create a new `Event`.
1691
+ *
1692
+ * @param {String} type The name of the event
1693
+ * @throws {TypeError} If the `type` argument is not specified
1694
+ */
1695
+ constructor(type) {
1696
+ this[kTarget] = null;
1697
+ this[kType] = type;
1698
+ }
1699
+ /**
1700
+ * @type {*}
1701
+ */
1702
+ get target() {
1703
+ return this[kTarget];
1704
+ }
1705
+ /**
1706
+ * @type {String}
1707
+ */
1708
+ get type() {
1709
+ return this[kType];
1710
+ }
1711
+ };
1712
+ Object.defineProperty(Event.prototype, "target", { enumerable: true });
1713
+ Object.defineProperty(Event.prototype, "type", { enumerable: true });
1714
+ /**
1715
+ * Class representing a close event.
1716
+ *
1717
+ * @extends Event
1718
+ */
1719
+ var CloseEvent = class extends Event {
1720
+ /**
1721
+ * Create a new `CloseEvent`.
1722
+ *
1723
+ * @param {String} type The name of the event
1724
+ * @param {Object} [options] A dictionary object that allows for setting
1725
+ * attributes via object members of the same name
1726
+ * @param {Number} [options.code=0] The status code explaining why the
1727
+ * connection was closed
1728
+ * @param {String} [options.reason=''] A human-readable string explaining why
1729
+ * the connection was closed
1730
+ * @param {Boolean} [options.wasClean=false] Indicates whether or not the
1731
+ * connection was cleanly closed
1732
+ */
1733
+ constructor(type, options = {}) {
1734
+ super(type);
1735
+ this[kCode] = options.code === void 0 ? 0 : options.code;
1736
+ this[kReason] = options.reason === void 0 ? "" : options.reason;
1737
+ this[kWasClean] = options.wasClean === void 0 ? false : options.wasClean;
1738
+ }
1739
+ /**
1740
+ * @type {Number}
1741
+ */
1742
+ get code() {
1743
+ return this[kCode];
1744
+ }
1745
+ /**
1746
+ * @type {String}
1747
+ */
1748
+ get reason() {
1749
+ return this[kReason];
1750
+ }
1751
+ /**
1752
+ * @type {Boolean}
1753
+ */
1754
+ get wasClean() {
1755
+ return this[kWasClean];
1756
+ }
1757
+ };
1758
+ Object.defineProperty(CloseEvent.prototype, "code", { enumerable: true });
1759
+ Object.defineProperty(CloseEvent.prototype, "reason", { enumerable: true });
1760
+ Object.defineProperty(CloseEvent.prototype, "wasClean", { enumerable: true });
1761
+ /**
1762
+ * Class representing an error event.
1763
+ *
1764
+ * @extends Event
1765
+ */
1766
+ var ErrorEvent = class extends Event {
1767
+ /**
1768
+ * Create a new `ErrorEvent`.
1769
+ *
1770
+ * @param {String} type The name of the event
1771
+ * @param {Object} [options] A dictionary object that allows for setting
1772
+ * attributes via object members of the same name
1773
+ * @param {*} [options.error=null] The error that generated this event
1774
+ * @param {String} [options.message=''] The error message
1775
+ */
1776
+ constructor(type, options = {}) {
1777
+ super(type);
1778
+ this[kError] = options.error === void 0 ? null : options.error;
1779
+ this[kMessage] = options.message === void 0 ? "" : options.message;
1780
+ }
1781
+ /**
1782
+ * @type {*}
1783
+ */
1784
+ get error() {
1785
+ return this[kError];
1786
+ }
1787
+ /**
1788
+ * @type {String}
1789
+ */
1790
+ get message() {
1791
+ return this[kMessage];
1792
+ }
1793
+ };
1794
+ Object.defineProperty(ErrorEvent.prototype, "error", { enumerable: true });
1795
+ Object.defineProperty(ErrorEvent.prototype, "message", { enumerable: true });
1796
+ /**
1797
+ * Class representing a message event.
1798
+ *
1799
+ * @extends Event
1800
+ */
1801
+ var MessageEvent = class extends Event {
1802
+ /**
1803
+ * Create a new `MessageEvent`.
1804
+ *
1805
+ * @param {String} type The name of the event
1806
+ * @param {Object} [options] A dictionary object that allows for setting
1807
+ * attributes via object members of the same name
1808
+ * @param {*} [options.data=null] The message content
1809
+ */
1810
+ constructor(type, options = {}) {
1811
+ super(type);
1812
+ this[kData] = options.data === void 0 ? null : options.data;
1813
+ }
1814
+ /**
1815
+ * @type {*}
1816
+ */
1817
+ get data() {
1818
+ return this[kData];
1819
+ }
1820
+ };
1821
+ Object.defineProperty(MessageEvent.prototype, "data", { enumerable: true });
1822
+ /**
1823
+ * This provides methods for emulating the `EventTarget` interface. It's not
1824
+ * meant to be used directly.
1825
+ *
1826
+ * @mixin
1827
+ */
1828
+ const EventTarget = {
1829
+ addEventListener(type, handler, options = {}) {
1830
+ for (const listener of this.listeners(type)) if (!options[kForOnEventAttribute$1] && listener[kListener$1] === handler && !listener[kForOnEventAttribute$1]) return;
1831
+ let wrapper;
1832
+ if (type === "message") wrapper = function onMessage(data, isBinary) {
1833
+ const event = new MessageEvent("message", { data: isBinary ? data : data.toString() });
1834
+ event[kTarget] = this;
1835
+ callListener(handler, this, event);
1836
+ };
1837
+ else if (type === "close") wrapper = function onClose(code, message) {
1838
+ const event = new CloseEvent("close", {
1839
+ code,
1840
+ reason: message.toString(),
1841
+ wasClean: this._closeFrameReceived && this._closeFrameSent
1842
+ });
1843
+ event[kTarget] = this;
1844
+ callListener(handler, this, event);
1845
+ };
1846
+ else if (type === "error") wrapper = function onError$1(error) {
1847
+ const event = new ErrorEvent("error", {
1848
+ error,
1849
+ message: error.message
1850
+ });
1851
+ event[kTarget] = this;
1852
+ callListener(handler, this, event);
1853
+ };
1854
+ else if (type === "open") wrapper = function onOpen() {
1855
+ const event = new Event("open");
1856
+ event[kTarget] = this;
1857
+ callListener(handler, this, event);
1858
+ };
1859
+ else return;
1860
+ wrapper[kForOnEventAttribute$1] = !!options[kForOnEventAttribute$1];
1861
+ wrapper[kListener$1] = handler;
1862
+ if (options.once) this.once(type, wrapper);
1863
+ else this.on(type, wrapper);
1864
+ },
1865
+ removeEventListener(type, handler) {
1866
+ for (const listener of this.listeners(type)) if (listener[kListener$1] === handler && !listener[kForOnEventAttribute$1]) {
1867
+ this.removeListener(type, listener);
1868
+ break;
1869
+ }
1870
+ }
1871
+ };
1872
+ module.exports = {
1873
+ CloseEvent,
1874
+ ErrorEvent,
1875
+ Event,
1876
+ EventTarget,
1877
+ MessageEvent
1878
+ };
1879
+ /**
1880
+ * Call an event listener
1881
+ *
1882
+ * @param {(Function|Object)} listener The listener to call
1883
+ * @param {*} thisArg The value to use as `this`` when calling the listener
1884
+ * @param {Event} event The event to pass to the listener
1885
+ * @private
1886
+ */
1887
+ function callListener(listener, thisArg, event) {
1888
+ if (typeof listener === "object" && listener.handleEvent) listener.handleEvent.call(listener, event);
1889
+ else listener.call(thisArg, event);
1890
+ }
1891
+ }) });
1892
+
1893
+ //#endregion
1894
+ //#region node_modules/ws/lib/extension.js
1895
+ var require_extension = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/extension.js": ((exports, module) => {
1896
+ const { tokenChars: tokenChars$1 } = require_validation();
1897
+ /**
1898
+ * Adds an offer to the map of extension offers or a parameter to the map of
1899
+ * parameters.
1900
+ *
1901
+ * @param {Object} dest The map of extension offers or parameters
1902
+ * @param {String} name The extension or parameter name
1903
+ * @param {(Object|Boolean|String)} elem The extension parameters or the
1904
+ * parameter value
1905
+ * @private
1906
+ */
1907
+ function push(dest, name, elem) {
1908
+ if (dest[name] === void 0) dest[name] = [elem];
1909
+ else dest[name].push(elem);
1910
+ }
1911
+ /**
1912
+ * Parses the `Sec-WebSocket-Extensions` header into an object.
1913
+ *
1914
+ * @param {String} header The field value of the header
1915
+ * @return {Object} The parsed object
1916
+ * @public
1917
+ */
1918
+ function parse$2(header) {
1919
+ const offers = Object.create(null);
1920
+ let params = Object.create(null);
1921
+ let mustUnescape = false;
1922
+ let isEscaping = false;
1923
+ let inQuotes = false;
1924
+ let extensionName;
1925
+ let paramName;
1926
+ let start = -1;
1927
+ let code = -1;
1928
+ let end = -1;
1929
+ let i = 0;
1930
+ for (; i < header.length; i++) {
1931
+ code = header.charCodeAt(i);
1932
+ if (extensionName === void 0) if (end === -1 && tokenChars$1[code] === 1) {
1933
+ if (start === -1) start = i;
1934
+ } else if (i !== 0 && (code === 32 || code === 9)) {
1935
+ if (end === -1 && start !== -1) end = i;
1936
+ } else if (code === 59 || code === 44) {
1937
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
1938
+ if (end === -1) end = i;
1939
+ const name = header.slice(start, end);
1940
+ if (code === 44) {
1941
+ push(offers, name, params);
1942
+ params = Object.create(null);
1943
+ } else extensionName = name;
1944
+ start = end = -1;
1945
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
1946
+ else if (paramName === void 0) if (end === -1 && tokenChars$1[code] === 1) {
1947
+ if (start === -1) start = i;
1948
+ } else if (code === 32 || code === 9) {
1949
+ if (end === -1 && start !== -1) end = i;
1950
+ } else if (code === 59 || code === 44) {
1951
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
1952
+ if (end === -1) end = i;
1953
+ push(params, header.slice(start, end), true);
1954
+ if (code === 44) {
1955
+ push(offers, extensionName, params);
1956
+ params = Object.create(null);
1957
+ extensionName = void 0;
1958
+ }
1959
+ start = end = -1;
1960
+ } else if (code === 61 && start !== -1 && end === -1) {
1961
+ paramName = header.slice(start, i);
1962
+ start = end = -1;
1963
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
1964
+ else if (isEscaping) {
1965
+ if (tokenChars$1[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`);
1966
+ if (start === -1) start = i;
1967
+ else if (!mustUnescape) mustUnescape = true;
1968
+ isEscaping = false;
1969
+ } else if (inQuotes) if (tokenChars$1[code] === 1) {
1970
+ if (start === -1) start = i;
1971
+ } else if (code === 34 && start !== -1) {
1972
+ inQuotes = false;
1973
+ end = i;
1974
+ } else if (code === 92) isEscaping = true;
1975
+ else throw new SyntaxError(`Unexpected character at index ${i}`);
1976
+ else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true;
1977
+ else if (end === -1 && tokenChars$1[code] === 1) {
1978
+ if (start === -1) start = i;
1979
+ } else if (start !== -1 && (code === 32 || code === 9)) {
1980
+ if (end === -1) end = i;
1981
+ } else if (code === 59 || code === 44) {
1982
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
1983
+ if (end === -1) end = i;
1984
+ let value = header.slice(start, end);
1985
+ if (mustUnescape) {
1986
+ value = value.replace(/\\/g, "");
1987
+ mustUnescape = false;
1988
+ }
1989
+ push(params, paramName, value);
1990
+ if (code === 44) {
1991
+ push(offers, extensionName, params);
1992
+ params = Object.create(null);
1993
+ extensionName = void 0;
1994
+ }
1995
+ paramName = void 0;
1996
+ start = end = -1;
1997
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
1998
+ }
1999
+ if (start === -1 || inQuotes || code === 32 || code === 9) throw new SyntaxError("Unexpected end of input");
2000
+ if (end === -1) end = i;
2001
+ const token = header.slice(start, end);
2002
+ if (extensionName === void 0) push(offers, token, params);
2003
+ else {
2004
+ if (paramName === void 0) push(params, token, true);
2005
+ else if (mustUnescape) push(params, paramName, token.replace(/\\/g, ""));
2006
+ else push(params, paramName, token);
2007
+ push(offers, extensionName, params);
2008
+ }
2009
+ return offers;
2010
+ }
2011
+ /**
2012
+ * Builds the `Sec-WebSocket-Extensions` header field value.
2013
+ *
2014
+ * @param {Object} extensions The map of extensions and parameters to format
2015
+ * @return {String} A string representing the given object
2016
+ * @public
2017
+ */
2018
+ function format$1(extensions) {
2019
+ return Object.keys(extensions).map((extension$2) => {
2020
+ let configurations = extensions[extension$2];
2021
+ if (!Array.isArray(configurations)) configurations = [configurations];
2022
+ return configurations.map((params) => {
2023
+ return [extension$2].concat(Object.keys(params).map((k) => {
2024
+ let values = params[k];
2025
+ if (!Array.isArray(values)) values = [values];
2026
+ return values.map((v) => v === true ? k : `${k}=${v}`).join("; ");
2027
+ })).join("; ");
2028
+ }).join(", ");
2029
+ }).join(", ");
2030
+ }
2031
+ module.exports = {
2032
+ format: format$1,
2033
+ parse: parse$2
2034
+ };
2035
+ }) });
2036
+
2037
+ //#endregion
2038
+ //#region node_modules/ws/lib/websocket.js
2039
+ var require_websocket = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/websocket.js": ((exports, module) => {
2040
+ const EventEmitter$1 = __require("events");
2041
+ const https = __require("https");
2042
+ const http$1 = __require("http");
2043
+ const net = __require("net");
2044
+ const tls = __require("tls");
2045
+ const { randomBytes, createHash: createHash$1 } = __require("crypto");
2046
+ const { Duplex: Duplex$2, Readable } = __require("stream");
2047
+ const { URL } = __require("url");
2048
+ const PerMessageDeflate$2 = require_permessage_deflate();
2049
+ const Receiver$1 = require_receiver();
2050
+ const Sender$1 = require_sender();
2051
+ const { isBlob } = require_validation();
2052
+ const { BINARY_TYPES, CLOSE_TIMEOUT: CLOSE_TIMEOUT$1, EMPTY_BUFFER, GUID: GUID$1, kForOnEventAttribute, kListener, kStatusCode, kWebSocket: kWebSocket$1, NOOP } = require_constants();
2053
+ const { EventTarget: { addEventListener, removeEventListener } } = require_event_target();
2054
+ const { format, parse: parse$1 } = require_extension();
2055
+ const { toBuffer } = require_buffer_util();
2056
+ const kAborted = Symbol("kAborted");
2057
+ const protocolVersions = [8, 13];
2058
+ const readyStates = [
2059
+ "CONNECTING",
2060
+ "OPEN",
2061
+ "CLOSING",
2062
+ "CLOSED"
2063
+ ];
2064
+ const subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
2065
+ /**
2066
+ * Class representing a WebSocket.
2067
+ *
2068
+ * @extends EventEmitter
2069
+ */
2070
+ var WebSocket$2 = class WebSocket$2 extends EventEmitter$1 {
2071
+ /**
2072
+ * Create a new `WebSocket`.
2073
+ *
2074
+ * @param {(String|URL)} address The URL to which to connect
2075
+ * @param {(String|String[])} [protocols] The subprotocols
2076
+ * @param {Object} [options] Connection options
2077
+ */
2078
+ constructor(address, protocols, options) {
2079
+ super();
2080
+ this._binaryType = BINARY_TYPES[0];
2081
+ this._closeCode = 1006;
2082
+ this._closeFrameReceived = false;
2083
+ this._closeFrameSent = false;
2084
+ this._closeMessage = EMPTY_BUFFER;
2085
+ this._closeTimer = null;
2086
+ this._errorEmitted = false;
2087
+ this._extensions = {};
2088
+ this._paused = false;
2089
+ this._protocol = "";
2090
+ this._readyState = WebSocket$2.CONNECTING;
2091
+ this._receiver = null;
2092
+ this._sender = null;
2093
+ this._socket = null;
2094
+ if (address !== null) {
2095
+ this._bufferedAmount = 0;
2096
+ this._isServer = false;
2097
+ this._redirects = 0;
2098
+ if (protocols === void 0) if (!options || options.protocols === void 0) protocols = [];
2099
+ else if (Array.isArray(options.protocols)) protocols = options.protocols;
2100
+ else protocols = [options.protocols];
2101
+ else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) {
2102
+ options = protocols;
2103
+ if (options.protocols === void 0) protocols = [];
2104
+ else if (Array.isArray(options.protocols)) protocols = options.protocols;
2105
+ else protocols = [options.protocols];
2106
+ } else protocols = [protocols];
2107
+ initAsClient(this, address, protocols, options);
2108
+ } else {
2109
+ this._autoPong = options.autoPong;
2110
+ this._closeTimeout = options.closeTimeout;
2111
+ this._isServer = true;
2112
+ }
2113
+ }
2114
+ /**
2115
+ * For historical reasons, the custom "nodebuffer" type is used by the default
2116
+ * instead of "blob".
2117
+ *
2118
+ * @type {String}
2119
+ */
2120
+ get binaryType() {
2121
+ return this._binaryType;
2122
+ }
2123
+ set binaryType(type) {
2124
+ if (!BINARY_TYPES.includes(type)) return;
2125
+ this._binaryType = type;
2126
+ if (this._receiver) this._receiver._binaryType = type;
2127
+ }
2128
+ /**
2129
+ * @type {Number}
2130
+ */
2131
+ get bufferedAmount() {
2132
+ if (!this._socket) return this._bufferedAmount;
2133
+ return this._socket._writableState.length + this._sender._bufferedBytes;
2134
+ }
2135
+ /**
2136
+ * @type {String}
2137
+ */
2138
+ get extensions() {
2139
+ return Object.keys(this._extensions).join();
2140
+ }
2141
+ /**
2142
+ * @type {Boolean}
2143
+ */
2144
+ get isPaused() {
2145
+ return this._paused;
2146
+ }
2147
+ /**
2148
+ * @type {Function}
2149
+ */
2150
+ /* istanbul ignore next */
2151
+ get onclose() {
2152
+ return null;
2153
+ }
2154
+ /**
2155
+ * @type {Function}
2156
+ */
2157
+ /* istanbul ignore next */
2158
+ get onerror() {
2159
+ return null;
2160
+ }
2161
+ /**
2162
+ * @type {Function}
2163
+ */
2164
+ /* istanbul ignore next */
2165
+ get onopen() {
2166
+ return null;
2167
+ }
2168
+ /**
2169
+ * @type {Function}
2170
+ */
2171
+ /* istanbul ignore next */
2172
+ get onmessage() {
2173
+ return null;
2174
+ }
2175
+ /**
2176
+ * @type {String}
2177
+ */
2178
+ get protocol() {
2179
+ return this._protocol;
2180
+ }
2181
+ /**
2182
+ * @type {Number}
2183
+ */
2184
+ get readyState() {
2185
+ return this._readyState;
2186
+ }
2187
+ /**
2188
+ * @type {String}
2189
+ */
2190
+ get url() {
2191
+ return this._url;
2192
+ }
2193
+ /**
2194
+ * Set up the socket and the internal resources.
2195
+ *
2196
+ * @param {Duplex} socket The network socket between the server and client
2197
+ * @param {Buffer} head The first packet of the upgraded stream
2198
+ * @param {Object} options Options object
2199
+ * @param {Boolean} [options.allowSynchronousEvents=false] Specifies whether
2200
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
2201
+ * multiple times in the same tick
2202
+ * @param {Function} [options.generateMask] The function used to generate the
2203
+ * masking key
2204
+ * @param {Number} [options.maxBufferedChunks=0] The maximum number of
2205
+ * buffered data chunks
2206
+ * @param {Number} [options.maxFragments=0] The maximum number of message
2207
+ * fragments
2208
+ * @param {Number} [options.maxPayload=0] The maximum allowed message size
2209
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
2210
+ * not to skip UTF-8 validation for text and close messages
2211
+ * @private
2212
+ */
2213
+ setSocket(socket, head, options) {
2214
+ const receiver = new Receiver$1({
2215
+ allowSynchronousEvents: options.allowSynchronousEvents,
2216
+ binaryType: this.binaryType,
2217
+ extensions: this._extensions,
2218
+ isServer: this._isServer,
2219
+ maxBufferedChunks: options.maxBufferedChunks,
2220
+ maxFragments: options.maxFragments,
2221
+ maxPayload: options.maxPayload,
2222
+ skipUTF8Validation: options.skipUTF8Validation
2223
+ });
2224
+ const sender = new Sender$1(socket, this._extensions, options.generateMask);
2225
+ this._receiver = receiver;
2226
+ this._sender = sender;
2227
+ this._socket = socket;
2228
+ receiver[kWebSocket$1] = this;
2229
+ sender[kWebSocket$1] = this;
2230
+ socket[kWebSocket$1] = this;
2231
+ receiver.on("conclude", receiverOnConclude);
2232
+ receiver.on("drain", receiverOnDrain);
2233
+ receiver.on("error", receiverOnError);
2234
+ receiver.on("message", receiverOnMessage);
2235
+ receiver.on("ping", receiverOnPing);
2236
+ receiver.on("pong", receiverOnPong);
2237
+ sender.onerror = senderOnError;
2238
+ if (socket.setTimeout) socket.setTimeout(0);
2239
+ if (socket.setNoDelay) socket.setNoDelay();
2240
+ if (head.length > 0) socket.unshift(head);
2241
+ socket.on("close", socketOnClose);
2242
+ socket.on("data", socketOnData);
2243
+ socket.on("end", socketOnEnd);
2244
+ socket.on("error", socketOnError$1);
2245
+ this._readyState = WebSocket$2.OPEN;
2246
+ this.emit("open");
2247
+ }
2248
+ /**
2249
+ * Emit the `'close'` event.
2250
+ *
2251
+ * @private
2252
+ */
2253
+ emitClose() {
2254
+ if (!this._socket) {
2255
+ this._readyState = WebSocket$2.CLOSED;
2256
+ this.emit("close", this._closeCode, this._closeMessage);
2257
+ return;
2258
+ }
2259
+ if (this._extensions[PerMessageDeflate$2.extensionName]) this._extensions[PerMessageDeflate$2.extensionName].cleanup();
2260
+ this._receiver.removeAllListeners();
2261
+ this._readyState = WebSocket$2.CLOSED;
2262
+ this.emit("close", this._closeCode, this._closeMessage);
2263
+ }
2264
+ /**
2265
+ * Start a closing handshake.
2266
+ *
2267
+ * +----------+ +-----------+ +----------+
2268
+ * - - -|ws.close()|-->|close frame|-->|ws.close()|- - -
2269
+ * | +----------+ +-----------+ +----------+ |
2270
+ * +----------+ +-----------+ |
2271
+ * CLOSING |ws.close()|<--|close frame|<--+-----+ CLOSING
2272
+ * +----------+ +-----------+ |
2273
+ * | | | +---+ |
2274
+ * +------------------------+-->|fin| - - - -
2275
+ * | +---+ | +---+
2276
+ * - - - - -|fin|<---------------------+
2277
+ * +---+
2278
+ *
2279
+ * @param {Number} [code] Status code explaining why the connection is closing
2280
+ * @param {(String|Buffer)} [data] The reason why the connection is
2281
+ * closing
2282
+ * @public
2283
+ */
2284
+ close(code, data) {
2285
+ if (this.readyState === WebSocket$2.CLOSED) return;
2286
+ if (this.readyState === WebSocket$2.CONNECTING) {
2287
+ abortHandshake$1(this, this._req, "WebSocket was closed before the connection was established");
2288
+ return;
2289
+ }
2290
+ if (this.readyState === WebSocket$2.CLOSING) {
2291
+ if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) this._socket.end();
2292
+ return;
2293
+ }
2294
+ this._sender.close(code, data, !this._isServer, (err) => {
2295
+ if (err) return;
2296
+ this._closeFrameSent = true;
2297
+ if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) this._socket.end();
2298
+ });
2299
+ this._readyState = WebSocket$2.CLOSING;
2300
+ setCloseTimer(this);
2301
+ }
2302
+ /**
2303
+ * Pause the socket.
2304
+ *
2305
+ * @public
2306
+ */
2307
+ pause() {
2308
+ if (this.readyState === WebSocket$2.CONNECTING || this.readyState === WebSocket$2.CLOSED) return;
2309
+ this._paused = true;
2310
+ this._socket.pause();
2311
+ }
2312
+ /**
2313
+ * Send a ping.
2314
+ *
2315
+ * @param {*} [data] The data to send
2316
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
2317
+ * @param {Function} [cb] Callback which is executed when the ping is sent
2318
+ * @public
2319
+ */
2320
+ ping(data, mask, cb) {
2321
+ if (this.readyState === WebSocket$2.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
2322
+ if (typeof data === "function") {
2323
+ cb = data;
2324
+ data = mask = void 0;
2325
+ } else if (typeof mask === "function") {
2326
+ cb = mask;
2327
+ mask = void 0;
2328
+ }
2329
+ if (typeof data === "number") data = data.toString();
2330
+ if (this.readyState !== WebSocket$2.OPEN) {
2331
+ sendAfterClose(this, data, cb);
2332
+ return;
2333
+ }
2334
+ if (mask === void 0) mask = !this._isServer;
2335
+ this._sender.ping(data || EMPTY_BUFFER, mask, cb);
2336
+ }
2337
+ /**
2338
+ * Send a pong.
2339
+ *
2340
+ * @param {*} [data] The data to send
2341
+ * @param {Boolean} [mask] Indicates whether or not to mask `data`
2342
+ * @param {Function} [cb] Callback which is executed when the pong is sent
2343
+ * @public
2344
+ */
2345
+ pong(data, mask, cb) {
2346
+ if (this.readyState === WebSocket$2.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
2347
+ if (typeof data === "function") {
2348
+ cb = data;
2349
+ data = mask = void 0;
2350
+ } else if (typeof mask === "function") {
2351
+ cb = mask;
2352
+ mask = void 0;
2353
+ }
2354
+ if (typeof data === "number") data = data.toString();
2355
+ if (this.readyState !== WebSocket$2.OPEN) {
2356
+ sendAfterClose(this, data, cb);
2357
+ return;
2358
+ }
2359
+ if (mask === void 0) mask = !this._isServer;
2360
+ this._sender.pong(data || EMPTY_BUFFER, mask, cb);
2361
+ }
2362
+ /**
2363
+ * Resume the socket.
2364
+ *
2365
+ * @public
2366
+ */
2367
+ resume() {
2368
+ if (this.readyState === WebSocket$2.CONNECTING || this.readyState === WebSocket$2.CLOSED) return;
2369
+ this._paused = false;
2370
+ if (!this._receiver._writableState.needDrain) this._socket.resume();
2371
+ }
2372
+ /**
2373
+ * Send a data message.
2374
+ *
2375
+ * @param {*} data The message to send
2376
+ * @param {Object} [options] Options object
2377
+ * @param {Boolean} [options.binary] Specifies whether `data` is binary or
2378
+ * text
2379
+ * @param {Boolean} [options.compress] Specifies whether or not to compress
2380
+ * `data`
2381
+ * @param {Boolean} [options.fin=true] Specifies whether the fragment is the
2382
+ * last one
2383
+ * @param {Boolean} [options.mask] Specifies whether or not to mask `data`
2384
+ * @param {Function} [cb] Callback which is executed when data is written out
2385
+ * @public
2386
+ */
2387
+ send(data, options, cb) {
2388
+ if (this.readyState === WebSocket$2.CONNECTING) throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");
2389
+ if (typeof options === "function") {
2390
+ cb = options;
2391
+ options = {};
2392
+ }
2393
+ if (typeof data === "number") data = data.toString();
2394
+ if (this.readyState !== WebSocket$2.OPEN) {
2395
+ sendAfterClose(this, data, cb);
2396
+ return;
2397
+ }
2398
+ const opts = {
2399
+ binary: typeof data !== "string",
2400
+ mask: !this._isServer,
2401
+ compress: true,
2402
+ fin: true,
2403
+ ...options
2404
+ };
2405
+ if (!this._extensions[PerMessageDeflate$2.extensionName]) opts.compress = false;
2406
+ this._sender.send(data || EMPTY_BUFFER, opts, cb);
2407
+ }
2408
+ /**
2409
+ * Forcibly close the connection.
2410
+ *
2411
+ * @public
2412
+ */
2413
+ terminate() {
2414
+ if (this.readyState === WebSocket$2.CLOSED) return;
2415
+ if (this.readyState === WebSocket$2.CONNECTING) {
2416
+ abortHandshake$1(this, this._req, "WebSocket was closed before the connection was established");
2417
+ return;
2418
+ }
2419
+ if (this._socket) {
2420
+ this._readyState = WebSocket$2.CLOSING;
2421
+ this._socket.destroy();
2422
+ }
2423
+ }
2424
+ };
2425
+ /**
2426
+ * @constant {Number} CONNECTING
2427
+ * @memberof WebSocket
2428
+ */
2429
+ Object.defineProperty(WebSocket$2, "CONNECTING", {
2430
+ enumerable: true,
2431
+ value: readyStates.indexOf("CONNECTING")
2432
+ });
2433
+ /**
2434
+ * @constant {Number} CONNECTING
2435
+ * @memberof WebSocket.prototype
2436
+ */
2437
+ Object.defineProperty(WebSocket$2.prototype, "CONNECTING", {
2438
+ enumerable: true,
2439
+ value: readyStates.indexOf("CONNECTING")
2440
+ });
2441
+ /**
2442
+ * @constant {Number} OPEN
2443
+ * @memberof WebSocket
2444
+ */
2445
+ Object.defineProperty(WebSocket$2, "OPEN", {
2446
+ enumerable: true,
2447
+ value: readyStates.indexOf("OPEN")
2448
+ });
2449
+ /**
2450
+ * @constant {Number} OPEN
2451
+ * @memberof WebSocket.prototype
2452
+ */
2453
+ Object.defineProperty(WebSocket$2.prototype, "OPEN", {
2454
+ enumerable: true,
2455
+ value: readyStates.indexOf("OPEN")
2456
+ });
2457
+ /**
2458
+ * @constant {Number} CLOSING
2459
+ * @memberof WebSocket
2460
+ */
2461
+ Object.defineProperty(WebSocket$2, "CLOSING", {
2462
+ enumerable: true,
2463
+ value: readyStates.indexOf("CLOSING")
2464
+ });
2465
+ /**
2466
+ * @constant {Number} CLOSING
2467
+ * @memberof WebSocket.prototype
2468
+ */
2469
+ Object.defineProperty(WebSocket$2.prototype, "CLOSING", {
2470
+ enumerable: true,
2471
+ value: readyStates.indexOf("CLOSING")
2472
+ });
2473
+ /**
2474
+ * @constant {Number} CLOSED
2475
+ * @memberof WebSocket
2476
+ */
2477
+ Object.defineProperty(WebSocket$2, "CLOSED", {
2478
+ enumerable: true,
2479
+ value: readyStates.indexOf("CLOSED")
2480
+ });
2481
+ /**
2482
+ * @constant {Number} CLOSED
2483
+ * @memberof WebSocket.prototype
2484
+ */
2485
+ Object.defineProperty(WebSocket$2.prototype, "CLOSED", {
2486
+ enumerable: true,
2487
+ value: readyStates.indexOf("CLOSED")
2488
+ });
2489
+ [
2490
+ "binaryType",
2491
+ "bufferedAmount",
2492
+ "extensions",
2493
+ "isPaused",
2494
+ "protocol",
2495
+ "readyState",
2496
+ "url"
2497
+ ].forEach((property) => {
2498
+ Object.defineProperty(WebSocket$2.prototype, property, { enumerable: true });
2499
+ });
2500
+ [
2501
+ "open",
2502
+ "error",
2503
+ "close",
2504
+ "message"
2505
+ ].forEach((method) => {
2506
+ Object.defineProperty(WebSocket$2.prototype, `on${method}`, {
2507
+ enumerable: true,
2508
+ get() {
2509
+ for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) return listener[kListener];
2510
+ return null;
2511
+ },
2512
+ set(handler) {
2513
+ for (const listener of this.listeners(method)) if (listener[kForOnEventAttribute]) {
2514
+ this.removeListener(method, listener);
2515
+ break;
2516
+ }
2517
+ if (typeof handler !== "function") return;
2518
+ this.addEventListener(method, handler, { [kForOnEventAttribute]: true });
2519
+ }
2520
+ });
2521
+ });
2522
+ WebSocket$2.prototype.addEventListener = addEventListener;
2523
+ WebSocket$2.prototype.removeEventListener = removeEventListener;
2524
+ module.exports = WebSocket$2;
2525
+ /**
2526
+ * Initialize a WebSocket client.
2527
+ *
2528
+ * @param {WebSocket} websocket The client to initialize
2529
+ * @param {(String|URL)} address The URL to which to connect
2530
+ * @param {Array} protocols The subprotocols
2531
+ * @param {Object} [options] Connection options
2532
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether any
2533
+ * of the `'message'`, `'ping'`, and `'pong'` events can be emitted multiple
2534
+ * times in the same tick
2535
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
2536
+ * automatically send a pong in response to a ping
2537
+ * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
2538
+ * for the closing handshake to finish after `websocket.close()` is called
2539
+ * @param {Function} [options.finishRequest] A function which can be used to
2540
+ * customize the headers of each http request before it is sent
2541
+ * @param {Boolean} [options.followRedirects=false] Whether or not to follow
2542
+ * redirects
2543
+ * @param {Function} [options.generateMask] The function used to generate the
2544
+ * masking key
2545
+ * @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
2546
+ * handshake request
2547
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
2548
+ * buffered data chunks
2549
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
2550
+ * fragments
2551
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
2552
+ * size
2553
+ * @param {Number} [options.maxRedirects=10] The maximum number of redirects
2554
+ * allowed
2555
+ * @param {String} [options.origin] Value of the `Origin` or
2556
+ * `Sec-WebSocket-Origin` header
2557
+ * @param {(Boolean|Object)} [options.perMessageDeflate=true] Enable/disable
2558
+ * permessage-deflate
2559
+ * @param {Number} [options.protocolVersion=13] Value of the
2560
+ * `Sec-WebSocket-Version` header
2561
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
2562
+ * not to skip UTF-8 validation for text and close messages
2563
+ * @private
2564
+ */
2565
+ function initAsClient(websocket, address, protocols, options) {
2566
+ const opts = {
2567
+ allowSynchronousEvents: true,
2568
+ autoPong: true,
2569
+ closeTimeout: CLOSE_TIMEOUT$1,
2570
+ protocolVersion: protocolVersions[1],
2571
+ maxBufferedChunks: 256 * 1024,
2572
+ maxFragments: 16 * 1024,
2573
+ maxPayload: 100 * 1024 * 1024,
2574
+ skipUTF8Validation: false,
2575
+ perMessageDeflate: true,
2576
+ followRedirects: false,
2577
+ maxRedirects: 10,
2578
+ ...options,
2579
+ socketPath: void 0,
2580
+ hostname: void 0,
2581
+ protocol: void 0,
2582
+ protocols: void 0,
2583
+ timeout: void 0,
2584
+ method: "GET",
2585
+ host: void 0,
2586
+ path: void 0,
2587
+ port: void 0
2588
+ };
2589
+ websocket._autoPong = opts.autoPong;
2590
+ websocket._closeTimeout = opts.closeTimeout;
2591
+ if (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`);
2592
+ let parsedUrl;
2593
+ if (address instanceof URL) parsedUrl = address;
2594
+ else try {
2595
+ parsedUrl = new URL(address);
2596
+ } catch {
2597
+ throw new SyntaxError(`Invalid URL: ${address}`);
2598
+ }
2599
+ if (parsedUrl.protocol === "http:") parsedUrl.protocol = "ws:";
2600
+ else if (parsedUrl.protocol === "https:") parsedUrl.protocol = "wss:";
2601
+ websocket._url = parsedUrl.href;
2602
+ const isSecure = parsedUrl.protocol === "wss:";
2603
+ const isIpcUrl = parsedUrl.protocol === "ws+unix:";
2604
+ let invalidUrlMessage;
2605
+ if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) invalidUrlMessage = "The URL's protocol must be one of \"ws:\", \"wss:\", \"http:\", \"https:\", or \"ws+unix:\"";
2606
+ else if (isIpcUrl && !parsedUrl.pathname) invalidUrlMessage = "The URL's pathname is empty";
2607
+ else if (parsedUrl.hash) invalidUrlMessage = "The URL contains a fragment identifier";
2608
+ if (invalidUrlMessage) {
2609
+ const err = new SyntaxError(invalidUrlMessage);
2610
+ if (websocket._redirects === 0) throw err;
2611
+ else {
2612
+ emitErrorAndClose(websocket, err);
2613
+ return;
2614
+ }
2615
+ }
2616
+ const defaultPort = isSecure ? 443 : 80;
2617
+ const key = randomBytes(16).toString("base64");
2618
+ const request = isSecure ? https.request : http$1.request;
2619
+ const protocolSet = /* @__PURE__ */ new Set();
2620
+ let perMessageDeflate;
2621
+ opts.createConnection = opts.createConnection || (isSecure ? tlsConnect : netConnect);
2622
+ opts.defaultPort = opts.defaultPort || defaultPort;
2623
+ opts.port = parsedUrl.port || defaultPort;
2624
+ opts.host = parsedUrl.hostname.startsWith("[") ? parsedUrl.hostname.slice(1, -1) : parsedUrl.hostname;
2625
+ opts.headers = {
2626
+ ...opts.headers,
2627
+ "Sec-WebSocket-Version": opts.protocolVersion,
2628
+ "Sec-WebSocket-Key": key,
2629
+ Connection: "Upgrade",
2630
+ Upgrade: "websocket"
2631
+ };
2632
+ opts.path = parsedUrl.pathname + parsedUrl.search;
2633
+ opts.timeout = opts.handshakeTimeout;
2634
+ if (opts.perMessageDeflate) {
2635
+ perMessageDeflate = new PerMessageDeflate$2({
2636
+ ...opts.perMessageDeflate,
2637
+ isServer: false,
2638
+ maxPayload: opts.maxPayload
2639
+ });
2640
+ opts.headers["Sec-WebSocket-Extensions"] = format({ [PerMessageDeflate$2.extensionName]: perMessageDeflate.offer() });
2641
+ }
2642
+ if (protocols.length) {
2643
+ for (const protocol of protocols) {
2644
+ if (typeof protocol !== "string" || !subprotocolRegex.test(protocol) || protocolSet.has(protocol)) throw new SyntaxError("An invalid or duplicated subprotocol was specified");
2645
+ protocolSet.add(protocol);
2646
+ }
2647
+ opts.headers["Sec-WebSocket-Protocol"] = protocols.join(",");
2648
+ }
2649
+ if (opts.origin) if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin;
2650
+ else opts.headers.Origin = opts.origin;
2651
+ if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
2652
+ if (isIpcUrl) {
2653
+ const parts = opts.path.split(":");
2654
+ opts.socketPath = parts[0];
2655
+ opts.path = parts[1];
2656
+ }
2657
+ let req;
2658
+ if (opts.followRedirects) {
2659
+ if (websocket._redirects === 0) {
2660
+ websocket._originalIpc = isIpcUrl;
2661
+ websocket._originalSecure = isSecure;
2662
+ websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
2663
+ const headers = options && options.headers;
2664
+ options = {
2665
+ ...options,
2666
+ headers: {}
2667
+ };
2668
+ if (headers) for (const [key$1, value] of Object.entries(headers)) options.headers[key$1.toLowerCase()] = value;
2669
+ } else if (websocket.listenerCount("redirect") === 0) {
2670
+ const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
2671
+ if (!isSameHost || websocket._originalSecure && !isSecure) {
2672
+ delete opts.headers.authorization;
2673
+ delete opts.headers.cookie;
2674
+ if (!isSameHost) delete opts.headers.host;
2675
+ opts.auth = void 0;
2676
+ }
2677
+ }
2678
+ if (opts.auth && !options.headers.authorization) options.headers.authorization = "Basic " + Buffer.from(opts.auth).toString("base64");
2679
+ req = websocket._req = request(opts);
2680
+ if (websocket._redirects) websocket.emit("redirect", websocket.url, req);
2681
+ } else req = websocket._req = request(opts);
2682
+ if (opts.timeout) req.on("timeout", () => {
2683
+ abortHandshake$1(websocket, req, "Opening handshake has timed out");
2684
+ });
2685
+ req.on("error", (err) => {
2686
+ if (req === null || req[kAborted]) return;
2687
+ req = websocket._req = null;
2688
+ emitErrorAndClose(websocket, err);
2689
+ });
2690
+ req.on("response", (res) => {
2691
+ const location = res.headers.location;
2692
+ const statusCode = res.statusCode;
2693
+ if (location && opts.followRedirects && statusCode >= 300 && statusCode < 400) {
2694
+ if (++websocket._redirects > opts.maxRedirects) {
2695
+ abortHandshake$1(websocket, req, "Maximum redirects exceeded");
2696
+ return;
2697
+ }
2698
+ req.abort();
2699
+ let addr;
2700
+ try {
2701
+ addr = new URL(location, address);
2702
+ } catch (e) {
2703
+ emitErrorAndClose(websocket, /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location}`));
2704
+ return;
2705
+ }
2706
+ initAsClient(websocket, addr, protocols, options);
2707
+ } else if (!websocket.emit("unexpected-response", req, res)) abortHandshake$1(websocket, req, `Unexpected server response: ${res.statusCode}`);
2708
+ });
2709
+ req.on("upgrade", (res, socket, head) => {
2710
+ websocket.emit("upgrade", res);
2711
+ if (websocket.readyState !== WebSocket$2.CONNECTING) return;
2712
+ req = websocket._req = null;
2713
+ const upgrade = res.headers.upgrade;
2714
+ if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
2715
+ abortHandshake$1(websocket, socket, "Invalid Upgrade header");
2716
+ return;
2717
+ }
2718
+ const digest = createHash$1("sha1").update(key + GUID$1).digest("base64");
2719
+ if (res.headers["sec-websocket-accept"] !== digest) {
2720
+ abortHandshake$1(websocket, socket, "Invalid Sec-WebSocket-Accept header");
2721
+ return;
2722
+ }
2723
+ const serverProt = res.headers["sec-websocket-protocol"];
2724
+ let protError;
2725
+ if (serverProt !== void 0) {
2726
+ if (!protocolSet.size) protError = "Server sent a subprotocol but none was requested";
2727
+ else if (!protocolSet.has(serverProt)) protError = "Server sent an invalid subprotocol";
2728
+ } else if (protocolSet.size) protError = "Server sent no subprotocol";
2729
+ if (protError) {
2730
+ abortHandshake$1(websocket, socket, protError);
2731
+ return;
2732
+ }
2733
+ if (serverProt) websocket._protocol = serverProt;
2734
+ const secWebSocketExtensions = res.headers["sec-websocket-extensions"];
2735
+ if (secWebSocketExtensions !== void 0) {
2736
+ if (!perMessageDeflate) {
2737
+ abortHandshake$1(websocket, socket, "Server sent a Sec-WebSocket-Extensions header but no extension was requested");
2738
+ return;
2739
+ }
2740
+ let extensions;
2741
+ try {
2742
+ extensions = parse$1(secWebSocketExtensions);
2743
+ } catch (err) {
2744
+ abortHandshake$1(websocket, socket, "Invalid Sec-WebSocket-Extensions header");
2745
+ return;
2746
+ }
2747
+ const extensionNames = Object.keys(extensions);
2748
+ if (extensionNames.length !== 1 || extensionNames[0] !== PerMessageDeflate$2.extensionName) {
2749
+ abortHandshake$1(websocket, socket, "Server indicated an extension that was not requested");
2750
+ return;
2751
+ }
2752
+ try {
2753
+ perMessageDeflate.accept(extensions[PerMessageDeflate$2.extensionName]);
2754
+ } catch (err) {
2755
+ abortHandshake$1(websocket, socket, "Invalid Sec-WebSocket-Extensions header");
2756
+ return;
2757
+ }
2758
+ websocket._extensions[PerMessageDeflate$2.extensionName] = perMessageDeflate;
2759
+ }
2760
+ websocket.setSocket(socket, head, {
2761
+ allowSynchronousEvents: opts.allowSynchronousEvents,
2762
+ generateMask: opts.generateMask,
2763
+ maxBufferedChunks: opts.maxBufferedChunks,
2764
+ maxFragments: opts.maxFragments,
2765
+ maxPayload: opts.maxPayload,
2766
+ skipUTF8Validation: opts.skipUTF8Validation
2767
+ });
2768
+ });
2769
+ if (opts.finishRequest) opts.finishRequest(req, websocket);
2770
+ else req.end();
2771
+ }
2772
+ /**
2773
+ * Emit the `'error'` and `'close'` events.
2774
+ *
2775
+ * @param {WebSocket} websocket The WebSocket instance
2776
+ * @param {Error} The error to emit
2777
+ * @private
2778
+ */
2779
+ function emitErrorAndClose(websocket, err) {
2780
+ websocket._readyState = WebSocket$2.CLOSING;
2781
+ websocket._errorEmitted = true;
2782
+ websocket.emit("error", err);
2783
+ websocket.emitClose();
2784
+ }
2785
+ /**
2786
+ * Create a `net.Socket` and initiate a connection.
2787
+ *
2788
+ * @param {Object} options Connection options
2789
+ * @return {net.Socket} The newly created socket used to start the connection
2790
+ * @private
2791
+ */
2792
+ function netConnect(options) {
2793
+ options.path = options.socketPath;
2794
+ return net.connect(options);
2795
+ }
2796
+ /**
2797
+ * Create a `tls.TLSSocket` and initiate a connection.
2798
+ *
2799
+ * @param {Object} options Connection options
2800
+ * @return {tls.TLSSocket} The newly created socket used to start the connection
2801
+ * @private
2802
+ */
2803
+ function tlsConnect(options) {
2804
+ options.path = void 0;
2805
+ if (!options.servername && options.servername !== "") options.servername = net.isIP(options.host) ? "" : options.host;
2806
+ return tls.connect(options);
2807
+ }
2808
+ /**
2809
+ * Abort the handshake and emit an error.
2810
+ *
2811
+ * @param {WebSocket} websocket The WebSocket instance
2812
+ * @param {(http.ClientRequest|net.Socket|tls.Socket)} stream The request to
2813
+ * abort or the socket to destroy
2814
+ * @param {String} message The error message
2815
+ * @private
2816
+ */
2817
+ function abortHandshake$1(websocket, stream, message) {
2818
+ websocket._readyState = WebSocket$2.CLOSING;
2819
+ const err = new Error(message);
2820
+ Error.captureStackTrace(err, abortHandshake$1);
2821
+ if (stream.setHeader) {
2822
+ stream[kAborted] = true;
2823
+ stream.abort();
2824
+ if (stream.socket && !stream.socket.destroyed) stream.socket.destroy();
2825
+ process.nextTick(emitErrorAndClose, websocket, err);
2826
+ } else {
2827
+ stream.destroy(err);
2828
+ stream.once("error", websocket.emit.bind(websocket, "error"));
2829
+ stream.once("close", websocket.emitClose.bind(websocket));
2830
+ }
2831
+ }
2832
+ /**
2833
+ * Handle cases where the `ping()`, `pong()`, or `send()` methods are called
2834
+ * when the `readyState` attribute is `CLOSING` or `CLOSED`.
2835
+ *
2836
+ * @param {WebSocket} websocket The WebSocket instance
2837
+ * @param {*} [data] The data to send
2838
+ * @param {Function} [cb] Callback
2839
+ * @private
2840
+ */
2841
+ function sendAfterClose(websocket, data, cb) {
2842
+ if (data) {
2843
+ const length = isBlob(data) ? data.size : toBuffer(data).length;
2844
+ if (websocket._socket) websocket._sender._bufferedBytes += length;
2845
+ else websocket._bufferedAmount += length;
2846
+ }
2847
+ if (cb) {
2848
+ const err = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
2849
+ process.nextTick(cb, err);
2850
+ }
2851
+ }
2852
+ /**
2853
+ * The listener of the `Receiver` `'conclude'` event.
2854
+ *
2855
+ * @param {Number} code The status code
2856
+ * @param {Buffer} reason The reason for closing
2857
+ * @private
2858
+ */
2859
+ function receiverOnConclude(code, reason) {
2860
+ const websocket = this[kWebSocket$1];
2861
+ websocket._closeFrameReceived = true;
2862
+ websocket._closeMessage = reason;
2863
+ websocket._closeCode = code;
2864
+ if (websocket._socket[kWebSocket$1] === void 0) return;
2865
+ websocket._socket.removeListener("data", socketOnData);
2866
+ process.nextTick(resume, websocket._socket);
2867
+ if (code === 1005) websocket.close();
2868
+ else websocket.close(code, reason);
2869
+ }
2870
+ /**
2871
+ * The listener of the `Receiver` `'drain'` event.
2872
+ *
2873
+ * @private
2874
+ */
2875
+ function receiverOnDrain() {
2876
+ const websocket = this[kWebSocket$1];
2877
+ if (!websocket.isPaused) websocket._socket.resume();
2878
+ }
2879
+ /**
2880
+ * The listener of the `Receiver` `'error'` event.
2881
+ *
2882
+ * @param {(RangeError|Error)} err The emitted error
2883
+ * @private
2884
+ */
2885
+ function receiverOnError(err) {
2886
+ const websocket = this[kWebSocket$1];
2887
+ if (websocket._socket[kWebSocket$1] !== void 0) {
2888
+ websocket._socket.removeListener("data", socketOnData);
2889
+ process.nextTick(resume, websocket._socket);
2890
+ websocket.close(err[kStatusCode]);
2891
+ }
2892
+ if (!websocket._errorEmitted) {
2893
+ websocket._errorEmitted = true;
2894
+ websocket.emit("error", err);
2895
+ }
2896
+ }
2897
+ /**
2898
+ * The listener of the `Receiver` `'finish'` event.
2899
+ *
2900
+ * @private
2901
+ */
2902
+ function receiverOnFinish() {
2903
+ this[kWebSocket$1].emitClose();
2904
+ }
2905
+ /**
2906
+ * The listener of the `Receiver` `'message'` event.
2907
+ *
2908
+ * @param {Buffer|ArrayBuffer|Buffer[])} data The message
2909
+ * @param {Boolean} isBinary Specifies whether the message is binary or not
2910
+ * @private
2911
+ */
2912
+ function receiverOnMessage(data, isBinary) {
2913
+ this[kWebSocket$1].emit("message", data, isBinary);
2914
+ }
2915
+ /**
2916
+ * The listener of the `Receiver` `'ping'` event.
2917
+ *
2918
+ * @param {Buffer} data The data included in the ping frame
2919
+ * @private
2920
+ */
2921
+ function receiverOnPing(data) {
2922
+ const websocket = this[kWebSocket$1];
2923
+ if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
2924
+ websocket.emit("ping", data);
2925
+ }
2926
+ /**
2927
+ * The listener of the `Receiver` `'pong'` event.
2928
+ *
2929
+ * @param {Buffer} data The data included in the pong frame
2930
+ * @private
2931
+ */
2932
+ function receiverOnPong(data) {
2933
+ this[kWebSocket$1].emit("pong", data);
2934
+ }
2935
+ /**
2936
+ * Resume a readable stream
2937
+ *
2938
+ * @param {Readable} stream The readable stream
2939
+ * @private
2940
+ */
2941
+ function resume(stream) {
2942
+ stream.resume();
2943
+ }
2944
+ /**
2945
+ * The `Sender` error event handler.
2946
+ *
2947
+ * @param {Error} The error
2948
+ * @private
2949
+ */
2950
+ function senderOnError(err) {
2951
+ const websocket = this[kWebSocket$1];
2952
+ if (websocket.readyState === WebSocket$2.CLOSED) return;
2953
+ if (websocket.readyState === WebSocket$2.OPEN) {
2954
+ websocket._readyState = WebSocket$2.CLOSING;
2955
+ setCloseTimer(websocket);
2956
+ }
2957
+ this._socket.end();
2958
+ if (!websocket._errorEmitted) {
2959
+ websocket._errorEmitted = true;
2960
+ websocket.emit("error", err);
2961
+ }
2962
+ }
2963
+ /**
2964
+ * Set a timer to destroy the underlying raw socket of a WebSocket.
2965
+ *
2966
+ * @param {WebSocket} websocket The WebSocket instance
2967
+ * @private
2968
+ */
2969
+ function setCloseTimer(websocket) {
2970
+ websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout);
2971
+ }
2972
+ /**
2973
+ * The listener of the socket `'close'` event.
2974
+ *
2975
+ * @private
2976
+ */
2977
+ function socketOnClose() {
2978
+ const websocket = this[kWebSocket$1];
2979
+ this.removeListener("close", socketOnClose);
2980
+ this.removeListener("data", socketOnData);
2981
+ this.removeListener("end", socketOnEnd);
2982
+ websocket._readyState = WebSocket$2.CLOSING;
2983
+ if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
2984
+ const chunk = this.read(this._readableState.length);
2985
+ websocket._receiver.write(chunk);
2986
+ }
2987
+ websocket._receiver.end();
2988
+ this[kWebSocket$1] = void 0;
2989
+ clearTimeout(websocket._closeTimer);
2990
+ if (websocket._receiver._writableState.finished || websocket._receiver._writableState.errorEmitted) websocket.emitClose();
2991
+ else {
2992
+ websocket._receiver.on("error", receiverOnFinish);
2993
+ websocket._receiver.on("finish", receiverOnFinish);
2994
+ }
2995
+ }
2996
+ /**
2997
+ * The listener of the socket `'data'` event.
2998
+ *
2999
+ * @param {Buffer} chunk A chunk of data
3000
+ * @private
3001
+ */
3002
+ function socketOnData(chunk) {
3003
+ if (!this[kWebSocket$1]._receiver.write(chunk)) this.pause();
3004
+ }
3005
+ /**
3006
+ * The listener of the socket `'end'` event.
3007
+ *
3008
+ * @private
3009
+ */
3010
+ function socketOnEnd() {
3011
+ const websocket = this[kWebSocket$1];
3012
+ websocket._readyState = WebSocket$2.CLOSING;
3013
+ websocket._receiver.end();
3014
+ this.end();
3015
+ }
3016
+ /**
3017
+ * The listener of the socket `'error'` event.
3018
+ *
3019
+ * @private
3020
+ */
3021
+ function socketOnError$1() {
3022
+ const websocket = this[kWebSocket$1];
3023
+ this.removeListener("error", socketOnError$1);
3024
+ this.on("error", NOOP);
3025
+ if (websocket) {
3026
+ websocket._readyState = WebSocket$2.CLOSING;
3027
+ this.destroy();
3028
+ }
3029
+ }
3030
+ }) });
3031
+
3032
+ //#endregion
3033
+ //#region node_modules/ws/lib/stream.js
3034
+ var require_stream = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/stream.js": ((exports, module) => {
3035
+ require_websocket();
3036
+ const { Duplex: Duplex$1 } = __require("stream");
3037
+ /**
3038
+ * Emits the `'close'` event on a stream.
3039
+ *
3040
+ * @param {Duplex} stream The stream.
3041
+ * @private
3042
+ */
3043
+ function emitClose$1(stream) {
3044
+ stream.emit("close");
3045
+ }
3046
+ /**
3047
+ * The listener of the `'end'` event.
3048
+ *
3049
+ * @private
3050
+ */
3051
+ function duplexOnEnd() {
3052
+ if (!this.destroyed && this._writableState.finished) this.destroy();
3053
+ }
3054
+ /**
3055
+ * The listener of the `'error'` event.
3056
+ *
3057
+ * @param {Error} err The error
3058
+ * @private
3059
+ */
3060
+ function duplexOnError(err) {
3061
+ this.removeListener("error", duplexOnError);
3062
+ this.destroy();
3063
+ if (this.listenerCount("error") === 0) this.emit("error", err);
3064
+ }
3065
+ /**
3066
+ * Wraps a `WebSocket` in a duplex stream.
3067
+ *
3068
+ * @param {WebSocket} ws The `WebSocket` to wrap
3069
+ * @param {Object} [options] The options for the `Duplex` constructor
3070
+ * @return {Duplex} The duplex stream
3071
+ * @public
3072
+ */
3073
+ function createWebSocketStream$1(ws, options) {
3074
+ let terminateOnDestroy = true;
3075
+ const duplex = new Duplex$1({
3076
+ ...options,
3077
+ autoDestroy: false,
3078
+ emitClose: false,
3079
+ objectMode: false,
3080
+ writableObjectMode: false
3081
+ });
3082
+ ws.on("message", function message(msg, isBinary) {
3083
+ const data = !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;
3084
+ if (!duplex.push(data)) ws.pause();
3085
+ });
3086
+ ws.once("error", function error(err) {
3087
+ if (duplex.destroyed) return;
3088
+ terminateOnDestroy = false;
3089
+ duplex.destroy(err);
3090
+ });
3091
+ ws.once("close", function close() {
3092
+ if (duplex.destroyed) return;
3093
+ duplex.push(null);
3094
+ });
3095
+ duplex._destroy = function(err, callback) {
3096
+ if (ws.readyState === ws.CLOSED) {
3097
+ callback(err);
3098
+ process.nextTick(emitClose$1, duplex);
3099
+ return;
3100
+ }
3101
+ let called = false;
3102
+ ws.once("error", function error(err$1) {
3103
+ called = true;
3104
+ callback(err$1);
3105
+ });
3106
+ ws.once("close", function close() {
3107
+ if (!called) callback(err);
3108
+ process.nextTick(emitClose$1, duplex);
3109
+ });
3110
+ if (terminateOnDestroy) ws.terminate();
3111
+ };
3112
+ duplex._final = function(callback) {
3113
+ if (ws.readyState === ws.CONNECTING) {
3114
+ ws.once("open", function open() {
3115
+ duplex._final(callback);
3116
+ });
3117
+ return;
3118
+ }
3119
+ if (ws._socket === null) return;
3120
+ if (ws._socket._writableState.finished) {
3121
+ callback();
3122
+ if (duplex._readableState.endEmitted) duplex.destroy();
3123
+ } else {
3124
+ ws._socket.once("finish", function finish() {
3125
+ callback();
3126
+ });
3127
+ ws.close();
3128
+ }
3129
+ };
3130
+ duplex._read = function() {
3131
+ if (ws.isPaused) ws.resume();
3132
+ };
3133
+ duplex._write = function(chunk, encoding, callback) {
3134
+ if (ws.readyState === ws.CONNECTING) {
3135
+ ws.once("open", function open() {
3136
+ duplex._write(chunk, encoding, callback);
3137
+ });
3138
+ return;
3139
+ }
3140
+ ws.send(chunk, callback);
3141
+ };
3142
+ duplex.on("end", duplexOnEnd);
3143
+ duplex.on("error", duplexOnError);
3144
+ return duplex;
3145
+ }
3146
+ module.exports = createWebSocketStream$1;
3147
+ }) });
3148
+
3149
+ //#endregion
3150
+ //#region node_modules/ws/lib/subprotocol.js
3151
+ var require_subprotocol = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/subprotocol.js": ((exports, module) => {
3152
+ const { tokenChars } = require_validation();
3153
+ /**
3154
+ * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
3155
+ *
3156
+ * @param {String} header The field value of the header
3157
+ * @return {Set} The subprotocol names
3158
+ * @public
3159
+ */
3160
+ function parse(header) {
3161
+ const protocols = /* @__PURE__ */ new Set();
3162
+ let start = -1;
3163
+ let end = -1;
3164
+ let i = 0;
3165
+ for (; i < header.length; i++) {
3166
+ const code = header.charCodeAt(i);
3167
+ if (end === -1 && tokenChars[code] === 1) {
3168
+ if (start === -1) start = i;
3169
+ } else if (i !== 0 && (code === 32 || code === 9)) {
3170
+ if (end === -1 && start !== -1) end = i;
3171
+ } else if (code === 44) {
3172
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
3173
+ if (end === -1) end = i;
3174
+ const protocol$1 = header.slice(start, end);
3175
+ if (protocols.has(protocol$1)) throw new SyntaxError(`The "${protocol$1}" subprotocol is duplicated`);
3176
+ protocols.add(protocol$1);
3177
+ start = end = -1;
3178
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
3179
+ }
3180
+ if (start === -1 || end !== -1) throw new SyntaxError("Unexpected end of input");
3181
+ const protocol = header.slice(start, i);
3182
+ if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
3183
+ protocols.add(protocol);
3184
+ return protocols;
3185
+ }
3186
+ module.exports = { parse };
3187
+ }) });
3188
+
3189
+ //#endregion
3190
+ //#region node_modules/ws/lib/websocket-server.js
3191
+ var require_websocket_server = /* @__PURE__ */ __commonJS({ "node_modules/ws/lib/websocket-server.js": ((exports, module) => {
3192
+ const EventEmitter = __require("events");
3193
+ const http = __require("http");
3194
+ const { Duplex } = __require("stream");
3195
+ const { createHash } = __require("crypto");
3196
+ const extension$1 = require_extension();
3197
+ const PerMessageDeflate$1 = require_permessage_deflate();
3198
+ const subprotocol$1 = require_subprotocol();
3199
+ const WebSocket$1 = require_websocket();
3200
+ const { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants();
3201
+ const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
3202
+ const RUNNING = 0;
3203
+ const CLOSING = 1;
3204
+ const CLOSED = 2;
3205
+ /**
3206
+ * Class representing a WebSocket server.
3207
+ *
3208
+ * @extends EventEmitter
3209
+ */
3210
+ var WebSocketServer$1 = class extends EventEmitter {
3211
+ /**
3212
+ * Create a `WebSocketServer` instance.
3213
+ *
3214
+ * @param {Object} options Configuration options
3215
+ * @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
3216
+ * any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
3217
+ * multiple times in the same tick
3218
+ * @param {Boolean} [options.autoPong=true] Specifies whether or not to
3219
+ * automatically send a pong in response to a ping
3220
+ * @param {Number} [options.backlog=511] The maximum length of the queue of
3221
+ * pending connections
3222
+ * @param {Boolean} [options.clientTracking=true] Specifies whether or not to
3223
+ * track clients
3224
+ * @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
3225
+ * wait for the closing handshake to finish after `websocket.close()` is
3226
+ * called
3227
+ * @param {Function} [options.handleProtocols] A hook to handle protocols
3228
+ * @param {String} [options.host] The hostname where to bind the server
3229
+ * @param {Number} [options.maxBufferedChunks=262144] The maximum number of
3230
+ * buffered data chunks
3231
+ * @param {Number} [options.maxFragments=16384] The maximum number of message
3232
+ * fragments
3233
+ * @param {Number} [options.maxPayload=104857600] The maximum allowed message
3234
+ * size
3235
+ * @param {Boolean} [options.noServer=false] Enable no server mode
3236
+ * @param {String} [options.path] Accept only connections matching this path
3237
+ * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
3238
+ * permessage-deflate
3239
+ * @param {Number} [options.port] The port where to bind the server
3240
+ * @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
3241
+ * server to use
3242
+ * @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
3243
+ * not to skip UTF-8 validation for text and close messages
3244
+ * @param {Function} [options.verifyClient] A hook to reject connections
3245
+ * @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
3246
+ * class to use. It must be the `WebSocket` class or class that extends it
3247
+ * @param {Function} [callback] A listener for the `listening` event
3248
+ */
3249
+ constructor(options, callback) {
3250
+ super();
3251
+ options = {
3252
+ allowSynchronousEvents: true,
3253
+ autoPong: true,
3254
+ maxBufferedChunks: 256 * 1024,
3255
+ maxFragments: 16 * 1024,
3256
+ maxPayload: 100 * 1024 * 1024,
3257
+ skipUTF8Validation: false,
3258
+ perMessageDeflate: false,
3259
+ handleProtocols: null,
3260
+ clientTracking: true,
3261
+ closeTimeout: CLOSE_TIMEOUT,
3262
+ verifyClient: null,
3263
+ noServer: false,
3264
+ backlog: null,
3265
+ server: null,
3266
+ host: null,
3267
+ path: null,
3268
+ port: null,
3269
+ WebSocket: WebSocket$1,
3270
+ ...options
3271
+ };
3272
+ if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified");
3273
+ if (options.port != null) {
3274
+ this._server = http.createServer((req, res) => {
3275
+ const body = http.STATUS_CODES[426];
3276
+ res.writeHead(426, {
3277
+ "Content-Length": body.length,
3278
+ "Content-Type": "text/plain"
3279
+ });
3280
+ res.end(body);
3281
+ });
3282
+ this._server.listen(options.port, options.host, options.backlog, callback);
3283
+ } else if (options.server) this._server = options.server;
3284
+ if (this._server) {
3285
+ const emitConnection = this.emit.bind(this, "connection");
3286
+ this._removeListeners = addListeners(this._server, {
3287
+ listening: this.emit.bind(this, "listening"),
3288
+ error: this.emit.bind(this, "error"),
3289
+ upgrade: (req, socket, head) => {
3290
+ this.handleUpgrade(req, socket, head, emitConnection);
3291
+ }
3292
+ });
3293
+ }
3294
+ if (options.perMessageDeflate === true) options.perMessageDeflate = {};
3295
+ if (options.clientTracking) {
3296
+ this.clients = /* @__PURE__ */ new Set();
3297
+ this._shouldEmitClose = false;
3298
+ }
3299
+ this.options = options;
3300
+ this._state = RUNNING;
3301
+ }
3302
+ /**
3303
+ * Returns the bound address, the address family name, and port of the server
3304
+ * as reported by the operating system if listening on an IP socket.
3305
+ * If the server is listening on a pipe or UNIX domain socket, the name is
3306
+ * returned as a string.
3307
+ *
3308
+ * @return {(Object|String|null)} The address of the server
3309
+ * @public
3310
+ */
3311
+ address() {
3312
+ if (this.options.noServer) throw new Error("The server is operating in \"noServer\" mode");
3313
+ if (!this._server) return null;
3314
+ return this._server.address();
3315
+ }
3316
+ /**
3317
+ * Stop the server from accepting new connections and emit the `'close'` event
3318
+ * when all existing connections are closed.
3319
+ *
3320
+ * @param {Function} [cb] A one-time listener for the `'close'` event
3321
+ * @public
3322
+ */
3323
+ close(cb) {
3324
+ if (this._state === CLOSED) {
3325
+ if (cb) this.once("close", () => {
3326
+ cb(/* @__PURE__ */ new Error("The server is not running"));
3327
+ });
3328
+ process.nextTick(emitClose, this);
3329
+ return;
3330
+ }
3331
+ if (cb) this.once("close", cb);
3332
+ if (this._state === CLOSING) return;
3333
+ this._state = CLOSING;
3334
+ if (this.options.noServer || this.options.server) {
3335
+ if (this._server) {
3336
+ this._removeListeners();
3337
+ this._removeListeners = this._server = null;
3338
+ }
3339
+ if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this);
3340
+ else this._shouldEmitClose = true;
3341
+ else process.nextTick(emitClose, this);
3342
+ } else {
3343
+ const server = this._server;
3344
+ this._removeListeners();
3345
+ this._removeListeners = this._server = null;
3346
+ server.close(() => {
3347
+ emitClose(this);
3348
+ });
3349
+ }
3350
+ }
3351
+ /**
3352
+ * See if a given request should be handled by this server instance.
3353
+ *
3354
+ * @param {http.IncomingMessage} req Request object to inspect
3355
+ * @return {Boolean} `true` if the request is valid, else `false`
3356
+ * @public
3357
+ */
3358
+ shouldHandle(req) {
3359
+ if (this.options.path) {
3360
+ const index = req.url.indexOf("?");
3361
+ if ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false;
3362
+ }
3363
+ return true;
3364
+ }
3365
+ /**
3366
+ * Handle a HTTP Upgrade request.
3367
+ *
3368
+ * @param {http.IncomingMessage} req The request object
3369
+ * @param {Duplex} socket The network socket between the server and client
3370
+ * @param {Buffer} head The first packet of the upgraded stream
3371
+ * @param {Function} cb Callback
3372
+ * @public
3373
+ */
3374
+ handleUpgrade(req, socket, head, cb) {
3375
+ socket.on("error", socketOnError);
3376
+ const key = req.headers["sec-websocket-key"];
3377
+ const upgrade = req.headers.upgrade;
3378
+ const version = +req.headers["sec-websocket-version"];
3379
+ if (req.method !== "GET") {
3380
+ abortHandshakeOrEmitwsClientError(this, req, socket, 405, "Invalid HTTP method");
3381
+ return;
3382
+ }
3383
+ if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
3384
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Upgrade header");
3385
+ return;
3386
+ }
3387
+ if (key === void 0 || !keyRegex.test(key)) {
3388
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Key header");
3389
+ return;
3390
+ }
3391
+ if (version !== 13 && version !== 8) {
3392
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Version header", { "Sec-WebSocket-Version": "13, 8" });
3393
+ return;
3394
+ }
3395
+ if (!this.shouldHandle(req)) {
3396
+ abortHandshake(socket, 400);
3397
+ return;
3398
+ }
3399
+ const secWebSocketProtocol = req.headers["sec-websocket-protocol"];
3400
+ let protocols = /* @__PURE__ */ new Set();
3401
+ if (secWebSocketProtocol !== void 0) try {
3402
+ protocols = subprotocol$1.parse(secWebSocketProtocol);
3403
+ } catch (err) {
3404
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Sec-WebSocket-Protocol header");
3405
+ return;
3406
+ }
3407
+ const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
3408
+ const extensions = {};
3409
+ if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
3410
+ const perMessageDeflate = new PerMessageDeflate$1({
3411
+ ...this.options.perMessageDeflate,
3412
+ isServer: true,
3413
+ maxPayload: this.options.maxPayload
3414
+ });
3415
+ try {
3416
+ const offers = extension$1.parse(secWebSocketExtensions);
3417
+ if (offers[PerMessageDeflate$1.extensionName]) {
3418
+ perMessageDeflate.accept(offers[PerMessageDeflate$1.extensionName]);
3419
+ extensions[PerMessageDeflate$1.extensionName] = perMessageDeflate;
3420
+ }
3421
+ } catch (err) {
3422
+ abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header");
3423
+ return;
3424
+ }
3425
+ }
3426
+ if (this.options.verifyClient) {
3427
+ const info = {
3428
+ origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`],
3429
+ secure: !!(req.socket.authorized || req.socket.encrypted),
3430
+ req
3431
+ };
3432
+ if (this.options.verifyClient.length === 2) {
3433
+ this.options.verifyClient(info, (verified, code, message, headers) => {
3434
+ if (!verified) return abortHandshake(socket, code || 401, message, headers);
3435
+ this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
3436
+ });
3437
+ return;
3438
+ }
3439
+ if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
3440
+ }
3441
+ this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
3442
+ }
3443
+ /**
3444
+ * Upgrade the connection to WebSocket.
3445
+ *
3446
+ * @param {Object} extensions The accepted extensions
3447
+ * @param {String} key The value of the `Sec-WebSocket-Key` header
3448
+ * @param {Set} protocols The subprotocols
3449
+ * @param {http.IncomingMessage} req The request object
3450
+ * @param {Duplex} socket The network socket between the server and client
3451
+ * @param {Buffer} head The first packet of the upgraded stream
3452
+ * @param {Function} cb Callback
3453
+ * @throws {Error} If called more than once with the same socket
3454
+ * @private
3455
+ */
3456
+ completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
3457
+ if (!socket.readable || !socket.writable) return socket.destroy();
3458
+ if (socket[kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");
3459
+ if (this._state > RUNNING) return abortHandshake(socket, 503);
3460
+ const headers = [
3461
+ "HTTP/1.1 101 Switching Protocols",
3462
+ "Upgrade: websocket",
3463
+ "Connection: Upgrade",
3464
+ `Sec-WebSocket-Accept: ${createHash("sha1").update(key + GUID).digest("base64")}`
3465
+ ];
3466
+ const ws = new this.options.WebSocket(null, void 0, this.options);
3467
+ if (protocols.size) {
3468
+ const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
3469
+ if (protocol) {
3470
+ headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
3471
+ ws._protocol = protocol;
3472
+ }
3473
+ }
3474
+ if (extensions[PerMessageDeflate$1.extensionName]) {
3475
+ const params = extensions[PerMessageDeflate$1.extensionName].params;
3476
+ const value = extension$1.format({ [PerMessageDeflate$1.extensionName]: [params] });
3477
+ headers.push(`Sec-WebSocket-Extensions: ${value}`);
3478
+ ws._extensions = extensions;
3479
+ }
3480
+ this.emit("headers", headers, req);
3481
+ socket.write(headers.concat("\r\n").join("\r\n"));
3482
+ socket.removeListener("error", socketOnError);
3483
+ ws.setSocket(socket, head, {
3484
+ allowSynchronousEvents: this.options.allowSynchronousEvents,
3485
+ maxBufferedChunks: this.options.maxBufferedChunks,
3486
+ maxFragments: this.options.maxFragments,
3487
+ maxPayload: this.options.maxPayload,
3488
+ skipUTF8Validation: this.options.skipUTF8Validation
3489
+ });
3490
+ if (this.clients) {
3491
+ this.clients.add(ws);
3492
+ ws.on("close", () => {
3493
+ this.clients.delete(ws);
3494
+ if (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this);
3495
+ });
3496
+ }
3497
+ cb(ws, req);
3498
+ }
3499
+ };
3500
+ module.exports = WebSocketServer$1;
3501
+ /**
3502
+ * Add event listeners on an `EventEmitter` using a map of <event, listener>
3503
+ * pairs.
3504
+ *
3505
+ * @param {EventEmitter} server The event emitter
3506
+ * @param {Object.<String, Function>} map The listeners to add
3507
+ * @return {Function} A function that will remove the added listeners when
3508
+ * called
3509
+ * @private
3510
+ */
3511
+ function addListeners(server, map) {
3512
+ for (const event of Object.keys(map)) server.on(event, map[event]);
3513
+ return function removeListeners() {
3514
+ for (const event of Object.keys(map)) server.removeListener(event, map[event]);
3515
+ };
3516
+ }
3517
+ /**
3518
+ * Emit a `'close'` event on an `EventEmitter`.
3519
+ *
3520
+ * @param {EventEmitter} server The event emitter
3521
+ * @private
3522
+ */
3523
+ function emitClose(server) {
3524
+ server._state = CLOSED;
3525
+ server.emit("close");
3526
+ }
3527
+ /**
3528
+ * Handle socket errors.
3529
+ *
3530
+ * @private
3531
+ */
3532
+ function socketOnError() {
3533
+ this.destroy();
3534
+ }
3535
+ /**
3536
+ * Close the connection when preconditions are not fulfilled.
3537
+ *
3538
+ * @param {Duplex} socket The socket of the upgrade request
3539
+ * @param {Number} code The HTTP response status code
3540
+ * @param {String} [message] The HTTP response body
3541
+ * @param {Object} [headers] Additional HTTP response headers
3542
+ * @private
3543
+ */
3544
+ function abortHandshake(socket, code, message, headers) {
3545
+ message = message || http.STATUS_CODES[code];
3546
+ headers = {
3547
+ Connection: "close",
3548
+ "Content-Type": "text/html",
3549
+ "Content-Length": Buffer.byteLength(message),
3550
+ ...headers
3551
+ };
3552
+ socket.once("finish", socket.destroy);
3553
+ socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message);
3554
+ }
3555
+ /**
3556
+ * Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
3557
+ * one listener for it, otherwise call `abortHandshake()`.
3558
+ *
3559
+ * @param {WebSocketServer} server The WebSocket server
3560
+ * @param {http.IncomingMessage} req The request object
3561
+ * @param {Duplex} socket The socket of the upgrade request
3562
+ * @param {Number} code The HTTP response status code
3563
+ * @param {String} message The HTTP response body
3564
+ * @param {Object} [headers] The HTTP response headers
3565
+ * @private
3566
+ */
3567
+ function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
3568
+ if (server.listenerCount("wsClientError")) {
3569
+ const err = new Error(message);
3570
+ Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
3571
+ server.emit("wsClientError", err, socket, req);
3572
+ } else abortHandshake(socket, code, message, headers);
3573
+ }
3574
+ }) });
3575
+
3576
+ //#endregion
3577
+ //#region node_modules/ws/wrapper.mjs
3578
+ var import_stream = /* @__PURE__ */ __toESM(require_stream(), 1);
3579
+ var import_extension = /* @__PURE__ */ __toESM(require_extension(), 1);
3580
+ var import_permessage_deflate = /* @__PURE__ */ __toESM(require_permessage_deflate(), 1);
3581
+ var import_receiver = /* @__PURE__ */ __toESM(require_receiver(), 1);
3582
+ var import_sender = /* @__PURE__ */ __toESM(require_sender(), 1);
3583
+ var import_subprotocol = /* @__PURE__ */ __toESM(require_subprotocol(), 1);
3584
+ var import_websocket = /* @__PURE__ */ __toESM(require_websocket(), 1);
3585
+ var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1);
3586
+ var wrapper_default = import_websocket.default;
3587
+
3588
+ //#endregion
3589
+ //#region node_modules/puppeteer-core/lib/puppeteer/node/NodeWebSocketTransport.js
3590
+ /**
3591
+ * @internal
3592
+ */
3593
+ var NodeWebSocketTransport = class NodeWebSocketTransport {
3594
+ static create(url, headers) {
3595
+ return new Promise((resolve, reject) => {
3596
+ const ws = new wrapper_default(url, [], {
3597
+ followRedirects: true,
3598
+ perMessageDeflate: false,
3599
+ allowSynchronousEvents: false,
3600
+ maxPayload: 256 * 1024 * 1024,
3601
+ headers: {
3602
+ "User-Agent": `Puppeteer ${packageVersion}`,
3603
+ ...headers
3604
+ }
3605
+ });
3606
+ ws.addEventListener("open", () => {
3607
+ return resolve(new NodeWebSocketTransport(ws));
3608
+ });
3609
+ ws.addEventListener("error", reject);
3610
+ });
3611
+ }
3612
+ #ws;
3613
+ onmessage;
3614
+ onclose;
3615
+ constructor(ws) {
3616
+ this.#ws = ws;
3617
+ this.#ws.addEventListener("message", (event) => {
3618
+ if (this.onmessage) this.onmessage.call(null, event.data);
3619
+ });
3620
+ this.#ws.addEventListener("close", () => {
3621
+ if (this.onclose) this.onclose.call(null);
3622
+ });
3623
+ this.#ws.addEventListener("error", debugCatchError);
3624
+ }
3625
+ send(message) {
3626
+ this.#ws.send(message);
3627
+ }
3628
+ close() {
3629
+ this.#ws.close();
3630
+ }
3631
+ };
3632
+
3633
+ //#endregion
3634
+ export { NodeWebSocketTransport as t };