lightclaw2 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/README.md +1 -0
  2. package/dist/index.d.ts +21 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +26 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/src/channel.d.ts +11 -0
  7. package/dist/src/channel.d.ts.map +1 -0
  8. package/dist/src/channel.js +255 -0
  9. package/dist/src/channel.js.map +1 -0
  10. package/dist/src/config.d.ts +29 -0
  11. package/dist/src/config.d.ts.map +1 -0
  12. package/dist/src/config.js +99 -0
  13. package/dist/src/config.js.map +1 -0
  14. package/dist/src/dedup.d.ts +7 -0
  15. package/dist/src/dedup.d.ts.map +1 -0
  16. package/dist/src/dedup.js +52 -0
  17. package/dist/src/dedup.js.map +1 -0
  18. package/dist/src/gateway.d.ts +16 -0
  19. package/dist/src/gateway.d.ts.map +1 -0
  20. package/dist/src/gateway.js +283 -0
  21. package/dist/src/gateway.js.map +1 -0
  22. package/dist/src/inbound.d.ts +18 -0
  23. package/dist/src/inbound.d.ts.map +1 -0
  24. package/dist/src/inbound.js +252 -0
  25. package/dist/src/inbound.js.map +1 -0
  26. package/dist/src/media.d.ts +12 -0
  27. package/dist/src/media.d.ts.map +1 -0
  28. package/dist/src/media.js +87 -0
  29. package/dist/src/media.js.map +1 -0
  30. package/dist/src/outbound.d.ts +28 -0
  31. package/dist/src/outbound.d.ts.map +1 -0
  32. package/dist/src/outbound.js +172 -0
  33. package/dist/src/outbound.js.map +1 -0
  34. package/dist/src/runtime.d.ts +4 -0
  35. package/dist/src/runtime.d.ts.map +1 -0
  36. package/dist/src/runtime.js +11 -0
  37. package/dist/src/runtime.js.map +1 -0
  38. package/dist/src/session-history.d.ts +88 -0
  39. package/dist/src/session-history.d.ts.map +1 -0
  40. package/dist/src/session-history.js +545 -0
  41. package/dist/src/session-history.js.map +1 -0
  42. package/dist/src/socket-handlers.d.ts +21 -0
  43. package/dist/src/socket-handlers.d.ts.map +1 -0
  44. package/dist/src/socket-handlers.js +120 -0
  45. package/dist/src/socket-handlers.js.map +1 -0
  46. package/dist/src/socket-registry.d.ts +53 -0
  47. package/dist/src/socket-registry.d.ts.map +1 -0
  48. package/dist/src/socket-registry.js +115 -0
  49. package/dist/src/socket-registry.js.map +1 -0
  50. package/dist/src/types.d.ts +100 -0
  51. package/dist/src/types.d.ts.map +1 -0
  52. package/dist/src/types.js +10 -0
  53. package/dist/src/types.js.map +1 -0
  54. package/node_modules/@socket.io/component-emitter/LICENSE +24 -0
  55. package/node_modules/@socket.io/component-emitter/Readme.md +79 -0
  56. package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +179 -0
  57. package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +176 -0
  58. package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +4 -0
  59. package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +179 -0
  60. package/node_modules/@socket.io/component-emitter/lib/esm/index.js +169 -0
  61. package/node_modules/@socket.io/component-emitter/lib/esm/package.json +4 -0
  62. package/node_modules/@socket.io/component-emitter/package.json +28 -0
  63. package/node_modules/debug/LICENSE +20 -0
  64. package/node_modules/debug/README.md +481 -0
  65. package/node_modules/debug/package.json +64 -0
  66. package/node_modules/debug/src/browser.js +272 -0
  67. package/node_modules/debug/src/common.js +292 -0
  68. package/node_modules/debug/src/index.js +10 -0
  69. package/node_modules/debug/src/node.js +263 -0
  70. package/node_modules/engine.io-client/LICENSE +22 -0
  71. package/node_modules/engine.io-client/README.md +331 -0
  72. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +3 -0
  73. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +4 -0
  74. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +1 -0
  75. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +14 -0
  76. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +15 -0
  77. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +38 -0
  78. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +1 -0
  79. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +67 -0
  80. package/node_modules/engine.io-client/build/cjs/globals.d.ts +4 -0
  81. package/node_modules/engine.io-client/build/cjs/globals.js +26 -0
  82. package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +21 -0
  83. package/node_modules/engine.io-client/build/cjs/globals.node.js +97 -0
  84. package/node_modules/engine.io-client/build/cjs/index.d.ts +15 -0
  85. package/node_modules/engine.io-client/build/cjs/index.js +32 -0
  86. package/node_modules/engine.io-client/build/cjs/package.json +10 -0
  87. package/node_modules/engine.io-client/build/cjs/socket.d.ts +482 -0
  88. package/node_modules/engine.io-client/build/cjs/socket.js +765 -0
  89. package/node_modules/engine.io-client/build/cjs/transport.d.ts +106 -0
  90. package/node_modules/engine.io-client/build/cjs/transport.js +153 -0
  91. package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +8 -0
  92. package/node_modules/engine.io-client/build/cjs/transports/index.js +11 -0
  93. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +15 -0
  94. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +60 -0
  95. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +108 -0
  96. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +285 -0
  97. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +11 -0
  98. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +44 -0
  99. package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +52 -0
  100. package/node_modules/engine.io-client/build/cjs/transports/polling.js +165 -0
  101. package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +36 -0
  102. package/node_modules/engine.io-client/build/cjs/transports/websocket.js +136 -0
  103. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +14 -0
  104. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +68 -0
  105. package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +18 -0
  106. package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +94 -0
  107. package/node_modules/engine.io-client/build/cjs/util.d.ts +7 -0
  108. package/node_modules/engine.io-client/build/cjs/util.js +65 -0
  109. package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +3 -0
  110. package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +2 -0
  111. package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +1 -0
  112. package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +11 -0
  113. package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +15 -0
  114. package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +34 -0
  115. package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +1 -0
  116. package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +64 -0
  117. package/node_modules/engine.io-client/build/esm/globals.d.ts +4 -0
  118. package/node_modules/engine.io-client/build/esm/globals.js +22 -0
  119. package/node_modules/engine.io-client/build/esm/globals.node.d.ts +21 -0
  120. package/node_modules/engine.io-client/build/esm/globals.node.js +91 -0
  121. package/node_modules/engine.io-client/build/esm/index.d.ts +15 -0
  122. package/node_modules/engine.io-client/build/esm/index.js +15 -0
  123. package/node_modules/engine.io-client/build/esm/package.json +10 -0
  124. package/node_modules/engine.io-client/build/esm/socket.d.ts +482 -0
  125. package/node_modules/engine.io-client/build/esm/socket.js +727 -0
  126. package/node_modules/engine.io-client/build/esm/transport.d.ts +106 -0
  127. package/node_modules/engine.io-client/build/esm/transport.js +142 -0
  128. package/node_modules/engine.io-client/build/esm/transports/index.d.ts +8 -0
  129. package/node_modules/engine.io-client/build/esm/transports/index.js +8 -0
  130. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +15 -0
  131. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +56 -0
  132. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +108 -0
  133. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +271 -0
  134. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +11 -0
  135. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +17 -0
  136. package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +52 -0
  137. package/node_modules/engine.io-client/build/esm/transports/polling.js +145 -0
  138. package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +36 -0
  139. package/node_modules/engine.io-client/build/esm/transports/websocket.js +125 -0
  140. package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +14 -0
  141. package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +41 -0
  142. package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +18 -0
  143. package/node_modules/engine.io-client/build/esm/transports/webtransport.js +80 -0
  144. package/node_modules/engine.io-client/build/esm/util.d.ts +7 -0
  145. package/node_modules/engine.io-client/build/esm/util.js +59 -0
  146. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +3 -0
  147. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +2 -0
  148. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +1 -0
  149. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +11 -0
  150. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +15 -0
  151. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +34 -0
  152. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +1 -0
  153. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +64 -0
  154. package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +4 -0
  155. package/node_modules/engine.io-client/build/esm-debug/globals.js +22 -0
  156. package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +21 -0
  157. package/node_modules/engine.io-client/build/esm-debug/globals.node.js +91 -0
  158. package/node_modules/engine.io-client/build/esm-debug/index.d.ts +15 -0
  159. package/node_modules/engine.io-client/build/esm-debug/index.js +15 -0
  160. package/node_modules/engine.io-client/build/esm-debug/package.json +10 -0
  161. package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +482 -0
  162. package/node_modules/engine.io-client/build/esm-debug/socket.js +756 -0
  163. package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +106 -0
  164. package/node_modules/engine.io-client/build/esm-debug/transport.js +145 -0
  165. package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +8 -0
  166. package/node_modules/engine.io-client/build/esm-debug/transports/index.js +8 -0
  167. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +15 -0
  168. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +56 -0
  169. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +108 -0
  170. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +276 -0
  171. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +11 -0
  172. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +17 -0
  173. package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +52 -0
  174. package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +158 -0
  175. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +36 -0
  176. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +128 -0
  177. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +14 -0
  178. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +41 -0
  179. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +18 -0
  180. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +87 -0
  181. package/node_modules/engine.io-client/build/esm-debug/util.d.ts +7 -0
  182. package/node_modules/engine.io-client/build/esm-debug/util.js +59 -0
  183. package/node_modules/engine.io-client/dist/engine.io.esm.min.js +7 -0
  184. package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +1 -0
  185. package/node_modules/engine.io-client/dist/engine.io.js +3064 -0
  186. package/node_modules/engine.io-client/dist/engine.io.js.map +1 -0
  187. package/node_modules/engine.io-client/dist/engine.io.min.js +7 -0
  188. package/node_modules/engine.io-client/dist/engine.io.min.js.map +1 -0
  189. package/node_modules/engine.io-client/node_modules/ws/LICENSE +20 -0
  190. package/node_modules/engine.io-client/node_modules/ws/README.md +548 -0
  191. package/node_modules/engine.io-client/node_modules/ws/browser.js +8 -0
  192. package/node_modules/engine.io-client/node_modules/ws/index.js +13 -0
  193. package/node_modules/engine.io-client/node_modules/ws/lib/buffer-util.js +131 -0
  194. package/node_modules/engine.io-client/node_modules/ws/lib/constants.js +18 -0
  195. package/node_modules/engine.io-client/node_modules/ws/lib/event-target.js +292 -0
  196. package/node_modules/engine.io-client/node_modules/ws/lib/extension.js +203 -0
  197. package/node_modules/engine.io-client/node_modules/ws/lib/limiter.js +55 -0
  198. package/node_modules/engine.io-client/node_modules/ws/lib/permessage-deflate.js +528 -0
  199. package/node_modules/engine.io-client/node_modules/ws/lib/receiver.js +706 -0
  200. package/node_modules/engine.io-client/node_modules/ws/lib/sender.js +602 -0
  201. package/node_modules/engine.io-client/node_modules/ws/lib/stream.js +161 -0
  202. package/node_modules/engine.io-client/node_modules/ws/lib/subprotocol.js +62 -0
  203. package/node_modules/engine.io-client/node_modules/ws/lib/validation.js +152 -0
  204. package/node_modules/engine.io-client/node_modules/ws/lib/websocket-server.js +550 -0
  205. package/node_modules/engine.io-client/node_modules/ws/lib/websocket.js +1388 -0
  206. package/node_modules/engine.io-client/node_modules/ws/package.json +69 -0
  207. package/node_modules/engine.io-client/node_modules/ws/wrapper.mjs +8 -0
  208. package/node_modules/engine.io-client/package.json +95 -0
  209. package/node_modules/engine.io-parser/LICENSE +22 -0
  210. package/node_modules/engine.io-parser/Readme.md +158 -0
  211. package/node_modules/engine.io-parser/build/cjs/commons.d.ts +14 -0
  212. package/node_modules/engine.io-parser/build/cjs/commons.js +19 -0
  213. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +2 -0
  214. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +48 -0
  215. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +2 -0
  216. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +66 -0
  217. package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +2 -0
  218. package/node_modules/engine.io-parser/build/cjs/decodePacket.js +59 -0
  219. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +4 -0
  220. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +72 -0
  221. package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +3 -0
  222. package/node_modules/engine.io-parser/build/cjs/encodePacket.js +38 -0
  223. package/node_modules/engine.io-parser/build/cjs/index.d.ts +9 -0
  224. package/node_modules/engine.io-parser/build/cjs/index.js +164 -0
  225. package/node_modules/engine.io-parser/build/cjs/package.json +8 -0
  226. package/node_modules/engine.io-parser/build/esm/commons.d.ts +14 -0
  227. package/node_modules/engine.io-parser/build/esm/commons.js +14 -0
  228. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +2 -0
  229. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +43 -0
  230. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +2 -0
  231. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +62 -0
  232. package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +2 -0
  233. package/node_modules/engine.io-parser/build/esm/decodePacket.js +55 -0
  234. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +4 -0
  235. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +68 -0
  236. package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +3 -0
  237. package/node_modules/engine.io-parser/build/esm/encodePacket.js +33 -0
  238. package/node_modules/engine.io-parser/build/esm/index.d.ts +9 -0
  239. package/node_modules/engine.io-parser/build/esm/index.js +156 -0
  240. package/node_modules/engine.io-parser/build/esm/package.json +8 -0
  241. package/node_modules/engine.io-parser/package.json +46 -0
  242. package/node_modules/ms/index.js +162 -0
  243. package/node_modules/ms/license.md +21 -0
  244. package/node_modules/ms/package.json +38 -0
  245. package/node_modules/ms/readme.md +59 -0
  246. package/node_modules/socket.io-client/LICENSE +21 -0
  247. package/node_modules/socket.io-client/README.md +29 -0
  248. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +2 -0
  249. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +4 -0
  250. package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +12 -0
  251. package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +69 -0
  252. package/node_modules/socket.io-client/build/cjs/index.d.ts +29 -0
  253. package/node_modules/socket.io-client/build/cjs/index.js +76 -0
  254. package/node_modules/socket.io-client/build/cjs/manager.d.ts +295 -0
  255. package/node_modules/socket.io-client/build/cjs/manager.js +416 -0
  256. package/node_modules/socket.io-client/build/cjs/on.d.ts +2 -0
  257. package/node_modules/socket.io-client/build/cjs/on.js +9 -0
  258. package/node_modules/socket.io-client/build/cjs/socket.d.ts +593 -0
  259. package/node_modules/socket.io-client/build/cjs/socket.js +909 -0
  260. package/node_modules/socket.io-client/build/cjs/url.d.ts +33 -0
  261. package/node_modules/socket.io-client/build/cjs/url.js +69 -0
  262. package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +2 -0
  263. package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +2 -0
  264. package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +12 -0
  265. package/node_modules/socket.io-client/build/esm/contrib/backo2.js +66 -0
  266. package/node_modules/socket.io-client/build/esm/index.d.ts +29 -0
  267. package/node_modules/socket.io-client/build/esm/index.js +58 -0
  268. package/node_modules/socket.io-client/build/esm/manager.d.ts +295 -0
  269. package/node_modules/socket.io-client/build/esm/manager.js +367 -0
  270. package/node_modules/socket.io-client/build/esm/on.d.ts +2 -0
  271. package/node_modules/socket.io-client/build/esm/on.js +6 -0
  272. package/node_modules/socket.io-client/build/esm/package.json +5 -0
  273. package/node_modules/socket.io-client/build/esm/socket.d.ts +593 -0
  274. package/node_modules/socket.io-client/build/esm/socket.js +880 -0
  275. package/node_modules/socket.io-client/build/esm/url.d.ts +33 -0
  276. package/node_modules/socket.io-client/build/esm/url.js +59 -0
  277. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +2 -0
  278. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +2 -0
  279. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +12 -0
  280. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +66 -0
  281. package/node_modules/socket.io-client/build/esm-debug/index.d.ts +29 -0
  282. package/node_modules/socket.io-client/build/esm-debug/index.js +62 -0
  283. package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +295 -0
  284. package/node_modules/socket.io-client/build/esm-debug/manager.js +386 -0
  285. package/node_modules/socket.io-client/build/esm-debug/on.d.ts +2 -0
  286. package/node_modules/socket.io-client/build/esm-debug/on.js +6 -0
  287. package/node_modules/socket.io-client/build/esm-debug/package.json +5 -0
  288. package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +593 -0
  289. package/node_modules/socket.io-client/build/esm-debug/socket.js +902 -0
  290. package/node_modules/socket.io-client/build/esm-debug/url.d.ts +33 -0
  291. package/node_modules/socket.io-client/build/esm-debug/url.js +63 -0
  292. package/node_modules/socket.io-client/dist/socket.io.esm.min.js +7 -0
  293. package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -0
  294. package/node_modules/socket.io-client/dist/socket.io.js +4955 -0
  295. package/node_modules/socket.io-client/dist/socket.io.js.map +1 -0
  296. package/node_modules/socket.io-client/dist/socket.io.min.js +7 -0
  297. package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -0
  298. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +7 -0
  299. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -0
  300. package/node_modules/socket.io-client/package.json +101 -0
  301. package/node_modules/socket.io-parser/LICENSE +20 -0
  302. package/node_modules/socket.io-parser/Readme.md +81 -0
  303. package/node_modules/socket.io-parser/build/cjs/binary.d.ts +20 -0
  304. package/node_modules/socket.io-parser/build/cjs/binary.js +87 -0
  305. package/node_modules/socket.io-parser/build/cjs/index.d.ts +91 -0
  306. package/node_modules/socket.io-parser/build/cjs/index.js +359 -0
  307. package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +7 -0
  308. package/node_modules/socket.io-parser/build/cjs/is-binary.js +54 -0
  309. package/node_modules/socket.io-parser/build/cjs/package.json +3 -0
  310. package/node_modules/socket.io-parser/build/esm/binary.d.ts +20 -0
  311. package/node_modules/socket.io-parser/build/esm/binary.js +83 -0
  312. package/node_modules/socket.io-parser/build/esm/index.d.ts +91 -0
  313. package/node_modules/socket.io-parser/build/esm/index.js +348 -0
  314. package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +7 -0
  315. package/node_modules/socket.io-parser/build/esm/is-binary.js +50 -0
  316. package/node_modules/socket.io-parser/build/esm/package.json +3 -0
  317. package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +20 -0
  318. package/node_modules/socket.io-parser/build/esm-debug/binary.js +83 -0
  319. package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +91 -0
  320. package/node_modules/socket.io-parser/build/esm-debug/index.js +353 -0
  321. package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +7 -0
  322. package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +50 -0
  323. package/node_modules/socket.io-parser/build/esm-debug/package.json +3 -0
  324. package/node_modules/socket.io-parser/package.json +44 -0
  325. package/node_modules/xmlhttprequest-ssl/LICENSE +22 -0
  326. package/node_modules/xmlhttprequest-ssl/README.md +67 -0
  327. package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +689 -0
  328. package/node_modules/xmlhttprequest-ssl/package.json +40 -0
  329. package/openclaw.plugin.json +17 -0
  330. package/package.json +61 -0
  331. package/skills/lightclaw-cron/SKILL.md +381 -0
@@ -0,0 +1,359 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Decoder = exports.Encoder = exports.PacketType = exports.protocol = void 0;
4
+ exports.isPacketValid = isPacketValid;
5
+ const component_emitter_1 = require("@socket.io/component-emitter");
6
+ const binary_js_1 = require("./binary.js");
7
+ const is_binary_js_1 = require("./is-binary.js");
8
+ const debug_1 = require("debug"); // debug()
9
+ const debug = (0, debug_1.default)("socket.io-parser"); // debug()
10
+ /**
11
+ * These strings must not be used as event names, as they have a special meaning.
12
+ */
13
+ const RESERVED_EVENTS = [
14
+ "connect", // used on the client side
15
+ "connect_error", // used on the client side
16
+ "disconnect", // used on both sides
17
+ "disconnecting", // used on the server side
18
+ "newListener", // used by the Node.js EventEmitter
19
+ "removeListener", // used by the Node.js EventEmitter
20
+ ];
21
+ /**
22
+ * Protocol version.
23
+ *
24
+ * @public
25
+ */
26
+ exports.protocol = 5;
27
+ var PacketType;
28
+ (function (PacketType) {
29
+ PacketType[PacketType["CONNECT"] = 0] = "CONNECT";
30
+ PacketType[PacketType["DISCONNECT"] = 1] = "DISCONNECT";
31
+ PacketType[PacketType["EVENT"] = 2] = "EVENT";
32
+ PacketType[PacketType["ACK"] = 3] = "ACK";
33
+ PacketType[PacketType["CONNECT_ERROR"] = 4] = "CONNECT_ERROR";
34
+ PacketType[PacketType["BINARY_EVENT"] = 5] = "BINARY_EVENT";
35
+ PacketType[PacketType["BINARY_ACK"] = 6] = "BINARY_ACK";
36
+ })(PacketType || (exports.PacketType = PacketType = {}));
37
+ /**
38
+ * A socket.io Encoder instance
39
+ */
40
+ class Encoder {
41
+ /**
42
+ * Encoder constructor
43
+ *
44
+ * @param {function} replacer - custom replacer to pass down to JSON.parse
45
+ */
46
+ constructor(replacer) {
47
+ this.replacer = replacer;
48
+ }
49
+ /**
50
+ * Encode a packet as a single string if non-binary, or as a
51
+ * buffer sequence, depending on packet type.
52
+ *
53
+ * @param {Object} obj - packet object
54
+ */
55
+ encode(obj) {
56
+ debug("encoding packet %j", obj);
57
+ if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {
58
+ if ((0, is_binary_js_1.hasBinary)(obj)) {
59
+ return this.encodeAsBinary({
60
+ type: obj.type === PacketType.EVENT
61
+ ? PacketType.BINARY_EVENT
62
+ : PacketType.BINARY_ACK,
63
+ nsp: obj.nsp,
64
+ data: obj.data,
65
+ id: obj.id,
66
+ });
67
+ }
68
+ }
69
+ return [this.encodeAsString(obj)];
70
+ }
71
+ /**
72
+ * Encode packet as string.
73
+ */
74
+ encodeAsString(obj) {
75
+ // first is type
76
+ let str = "" + obj.type;
77
+ // attachments if we have them
78
+ if (obj.type === PacketType.BINARY_EVENT ||
79
+ obj.type === PacketType.BINARY_ACK) {
80
+ str += obj.attachments + "-";
81
+ }
82
+ // if we have a namespace other than `/`
83
+ // we append it followed by a comma `,`
84
+ if (obj.nsp && "/" !== obj.nsp) {
85
+ str += obj.nsp + ",";
86
+ }
87
+ // immediately followed by the id
88
+ if (null != obj.id) {
89
+ str += obj.id;
90
+ }
91
+ // json data
92
+ if (null != obj.data) {
93
+ str += JSON.stringify(obj.data, this.replacer);
94
+ }
95
+ debug("encoded %j as %s", obj, str);
96
+ return str;
97
+ }
98
+ /**
99
+ * Encode packet as 'buffer sequence' by removing blobs, and
100
+ * deconstructing packet into object with placeholders and
101
+ * a list of buffers.
102
+ */
103
+ encodeAsBinary(obj) {
104
+ const deconstruction = (0, binary_js_1.deconstructPacket)(obj);
105
+ const pack = this.encodeAsString(deconstruction.packet);
106
+ const buffers = deconstruction.buffers;
107
+ buffers.unshift(pack); // add packet info to beginning of data list
108
+ return buffers; // write all the buffers
109
+ }
110
+ }
111
+ exports.Encoder = Encoder;
112
+ /**
113
+ * A socket.io Decoder instance
114
+ *
115
+ * @return {Object} decoder
116
+ */
117
+ class Decoder extends component_emitter_1.Emitter {
118
+ /**
119
+ * Decoder constructor
120
+ *
121
+ * @param {function} reviver - custom reviver to pass down to JSON.stringify
122
+ */
123
+ constructor(reviver) {
124
+ super();
125
+ this.reviver = reviver;
126
+ }
127
+ /**
128
+ * Decodes an encoded packet string into packet JSON.
129
+ *
130
+ * @param {String} obj - encoded packet
131
+ */
132
+ add(obj) {
133
+ let packet;
134
+ if (typeof obj === "string") {
135
+ if (this.reconstructor) {
136
+ throw new Error("got plaintext data when reconstructing a packet");
137
+ }
138
+ packet = this.decodeString(obj);
139
+ const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;
140
+ if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {
141
+ packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;
142
+ // binary packet's json
143
+ this.reconstructor = new BinaryReconstructor(packet);
144
+ // no attachments, labeled binary but no binary data to follow
145
+ if (packet.attachments === 0) {
146
+ super.emitReserved("decoded", packet);
147
+ }
148
+ }
149
+ else {
150
+ // non-binary full packet
151
+ super.emitReserved("decoded", packet);
152
+ }
153
+ }
154
+ else if ((0, is_binary_js_1.isBinary)(obj) || obj.base64) {
155
+ // raw binary data
156
+ if (!this.reconstructor) {
157
+ throw new Error("got binary data when not reconstructing a packet");
158
+ }
159
+ else {
160
+ packet = this.reconstructor.takeBinaryData(obj);
161
+ if (packet) {
162
+ // received final buffer
163
+ this.reconstructor = null;
164
+ super.emitReserved("decoded", packet);
165
+ }
166
+ }
167
+ }
168
+ else {
169
+ throw new Error("Unknown type: " + obj);
170
+ }
171
+ }
172
+ /**
173
+ * Decode a packet String (JSON data)
174
+ *
175
+ * @param {String} str
176
+ * @return {Object} packet
177
+ */
178
+ decodeString(str) {
179
+ let i = 0;
180
+ // look up type
181
+ const p = {
182
+ type: Number(str.charAt(0)),
183
+ };
184
+ if (PacketType[p.type] === undefined) {
185
+ throw new Error("unknown packet type " + p.type);
186
+ }
187
+ // look up attachments if type binary
188
+ if (p.type === PacketType.BINARY_EVENT ||
189
+ p.type === PacketType.BINARY_ACK) {
190
+ const start = i + 1;
191
+ while (str.charAt(++i) !== "-" && i != str.length) { }
192
+ const buf = str.substring(start, i);
193
+ if (buf != Number(buf) || str.charAt(i) !== "-") {
194
+ throw new Error("Illegal attachments");
195
+ }
196
+ p.attachments = Number(buf);
197
+ }
198
+ // look up namespace (if any)
199
+ if ("/" === str.charAt(i + 1)) {
200
+ const start = i + 1;
201
+ while (++i) {
202
+ const c = str.charAt(i);
203
+ if ("," === c)
204
+ break;
205
+ if (i === str.length)
206
+ break;
207
+ }
208
+ p.nsp = str.substring(start, i);
209
+ }
210
+ else {
211
+ p.nsp = "/";
212
+ }
213
+ // look up id
214
+ const next = str.charAt(i + 1);
215
+ if ("" !== next && Number(next) == next) {
216
+ const start = i + 1;
217
+ while (++i) {
218
+ const c = str.charAt(i);
219
+ if (null == c || Number(c) != c) {
220
+ --i;
221
+ break;
222
+ }
223
+ if (i === str.length)
224
+ break;
225
+ }
226
+ p.id = Number(str.substring(start, i + 1));
227
+ }
228
+ // look up json data
229
+ if (str.charAt(++i)) {
230
+ const payload = this.tryParse(str.substr(i));
231
+ if (Decoder.isPayloadValid(p.type, payload)) {
232
+ p.data = payload;
233
+ }
234
+ else {
235
+ throw new Error("invalid payload");
236
+ }
237
+ }
238
+ debug("decoded %s as %j", str, p);
239
+ return p;
240
+ }
241
+ tryParse(str) {
242
+ try {
243
+ return JSON.parse(str, this.reviver);
244
+ }
245
+ catch (e) {
246
+ return false;
247
+ }
248
+ }
249
+ static isPayloadValid(type, payload) {
250
+ switch (type) {
251
+ case PacketType.CONNECT:
252
+ return isObject(payload);
253
+ case PacketType.DISCONNECT:
254
+ return payload === undefined;
255
+ case PacketType.CONNECT_ERROR:
256
+ return typeof payload === "string" || isObject(payload);
257
+ case PacketType.EVENT:
258
+ case PacketType.BINARY_EVENT:
259
+ return (Array.isArray(payload) &&
260
+ (typeof payload[0] === "number" ||
261
+ (typeof payload[0] === "string" &&
262
+ RESERVED_EVENTS.indexOf(payload[0]) === -1)));
263
+ case PacketType.ACK:
264
+ case PacketType.BINARY_ACK:
265
+ return Array.isArray(payload);
266
+ }
267
+ }
268
+ /**
269
+ * Deallocates a parser's resources
270
+ */
271
+ destroy() {
272
+ if (this.reconstructor) {
273
+ this.reconstructor.finishedReconstruction();
274
+ this.reconstructor = null;
275
+ }
276
+ }
277
+ }
278
+ exports.Decoder = Decoder;
279
+ /**
280
+ * A manager of a binary event's 'buffer sequence'. Should
281
+ * be constructed whenever a packet of type BINARY_EVENT is
282
+ * decoded.
283
+ *
284
+ * @param {Object} packet
285
+ * @return {BinaryReconstructor} initialized reconstructor
286
+ */
287
+ class BinaryReconstructor {
288
+ constructor(packet) {
289
+ this.packet = packet;
290
+ this.buffers = [];
291
+ this.reconPack = packet;
292
+ }
293
+ /**
294
+ * Method to be called when binary data received from connection
295
+ * after a BINARY_EVENT packet.
296
+ *
297
+ * @param {Buffer | ArrayBuffer} binData - the raw binary data received
298
+ * @return {null | Object} returns null if more binary data is expected or
299
+ * a reconstructed packet object if all buffers have been received.
300
+ */
301
+ takeBinaryData(binData) {
302
+ this.buffers.push(binData);
303
+ if (this.buffers.length === this.reconPack.attachments) {
304
+ // done with buffer list
305
+ const packet = (0, binary_js_1.reconstructPacket)(this.reconPack, this.buffers);
306
+ this.finishedReconstruction();
307
+ return packet;
308
+ }
309
+ return null;
310
+ }
311
+ /**
312
+ * Cleans up binary packet reconstruction variables.
313
+ */
314
+ finishedReconstruction() {
315
+ this.reconPack = null;
316
+ this.buffers = [];
317
+ }
318
+ }
319
+ function isNamespaceValid(nsp) {
320
+ return typeof nsp === "string";
321
+ }
322
+ // see https://caniuse.com/mdn-javascript_builtins_number_isinteger
323
+ const isInteger = Number.isInteger ||
324
+ function (value) {
325
+ return (typeof value === "number" &&
326
+ isFinite(value) &&
327
+ Math.floor(value) === value);
328
+ };
329
+ function isAckIdValid(id) {
330
+ return id === undefined || isInteger(id);
331
+ }
332
+ // see https://stackoverflow.com/questions/8511281/check-if-a-value-is-an-object-in-javascript
333
+ function isObject(value) {
334
+ return Object.prototype.toString.call(value) === "[object Object]";
335
+ }
336
+ function isDataValid(type, payload) {
337
+ switch (type) {
338
+ case PacketType.CONNECT:
339
+ return payload === undefined || isObject(payload);
340
+ case PacketType.DISCONNECT:
341
+ return payload === undefined;
342
+ case PacketType.EVENT:
343
+ return (Array.isArray(payload) &&
344
+ (typeof payload[0] === "number" ||
345
+ (typeof payload[0] === "string" &&
346
+ RESERVED_EVENTS.indexOf(payload[0]) === -1)));
347
+ case PacketType.ACK:
348
+ return Array.isArray(payload);
349
+ case PacketType.CONNECT_ERROR:
350
+ return typeof payload === "string" || isObject(payload);
351
+ default:
352
+ return false;
353
+ }
354
+ }
355
+ function isPacketValid(packet) {
356
+ return (isNamespaceValid(packet.nsp) &&
357
+ isAckIdValid(packet.id) &&
358
+ isDataValid(packet.type, packet.data));
359
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.
3
+ *
4
+ * @private
5
+ */
6
+ export declare function isBinary(obj: any): boolean;
7
+ export declare function hasBinary(obj: any, toJSON?: boolean): boolean;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBinary = isBinary;
4
+ exports.hasBinary = hasBinary;
5
+ const withNativeArrayBuffer = typeof ArrayBuffer === "function";
6
+ const isView = (obj) => {
7
+ return typeof ArrayBuffer.isView === "function"
8
+ ? ArrayBuffer.isView(obj)
9
+ : obj.buffer instanceof ArrayBuffer;
10
+ };
11
+ const toString = Object.prototype.toString;
12
+ const withNativeBlob = typeof Blob === "function" ||
13
+ (typeof Blob !== "undefined" &&
14
+ toString.call(Blob) === "[object BlobConstructor]");
15
+ const withNativeFile = typeof File === "function" ||
16
+ (typeof File !== "undefined" &&
17
+ toString.call(File) === "[object FileConstructor]");
18
+ /**
19
+ * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.
20
+ *
21
+ * @private
22
+ */
23
+ function isBinary(obj) {
24
+ return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||
25
+ (withNativeBlob && obj instanceof Blob) ||
26
+ (withNativeFile && obj instanceof File));
27
+ }
28
+ function hasBinary(obj, toJSON) {
29
+ if (!obj || typeof obj !== "object") {
30
+ return false;
31
+ }
32
+ if (Array.isArray(obj)) {
33
+ for (let i = 0, l = obj.length; i < l; i++) {
34
+ if (hasBinary(obj[i])) {
35
+ return true;
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+ if (isBinary(obj)) {
41
+ return true;
42
+ }
43
+ if (obj.toJSON &&
44
+ typeof obj.toJSON === "function" &&
45
+ arguments.length === 1) {
46
+ return hasBinary(obj.toJSON(), true);
47
+ }
48
+ for (const key in obj) {
49
+ if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {
50
+ return true;
51
+ }
52
+ }
53
+ return false;
54
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.
3
+ *
4
+ * @param {Object} packet - socket.io event packet
5
+ * @return {Object} with deconstructed packet and list of buffers
6
+ * @public
7
+ */
8
+ export declare function deconstructPacket(packet: any): {
9
+ packet: any;
10
+ buffers: any[];
11
+ };
12
+ /**
13
+ * Reconstructs a binary packet from its placeholder packet and buffers
14
+ *
15
+ * @param {Object} packet - event packet with placeholders
16
+ * @param {Array} buffers - binary buffers to put in placeholder positions
17
+ * @return {Object} reconstructed packet
18
+ * @public
19
+ */
20
+ export declare function reconstructPacket(packet: any, buffers: any): any;
@@ -0,0 +1,83 @@
1
+ import { isBinary } from "./is-binary.js";
2
+ /**
3
+ * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.
4
+ *
5
+ * @param {Object} packet - socket.io event packet
6
+ * @return {Object} with deconstructed packet and list of buffers
7
+ * @public
8
+ */
9
+ export function deconstructPacket(packet) {
10
+ const buffers = [];
11
+ const packetData = packet.data;
12
+ const pack = packet;
13
+ pack.data = _deconstructPacket(packetData, buffers);
14
+ pack.attachments = buffers.length; // number of binary 'attachments'
15
+ return { packet: pack, buffers: buffers };
16
+ }
17
+ function _deconstructPacket(data, buffers) {
18
+ if (!data)
19
+ return data;
20
+ if (isBinary(data)) {
21
+ const placeholder = { _placeholder: true, num: buffers.length };
22
+ buffers.push(data);
23
+ return placeholder;
24
+ }
25
+ else if (Array.isArray(data)) {
26
+ const newData = new Array(data.length);
27
+ for (let i = 0; i < data.length; i++) {
28
+ newData[i] = _deconstructPacket(data[i], buffers);
29
+ }
30
+ return newData;
31
+ }
32
+ else if (typeof data === "object" && !(data instanceof Date)) {
33
+ const newData = {};
34
+ for (const key in data) {
35
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
36
+ newData[key] = _deconstructPacket(data[key], buffers);
37
+ }
38
+ }
39
+ return newData;
40
+ }
41
+ return data;
42
+ }
43
+ /**
44
+ * Reconstructs a binary packet from its placeholder packet and buffers
45
+ *
46
+ * @param {Object} packet - event packet with placeholders
47
+ * @param {Array} buffers - binary buffers to put in placeholder positions
48
+ * @return {Object} reconstructed packet
49
+ * @public
50
+ */
51
+ export function reconstructPacket(packet, buffers) {
52
+ packet.data = _reconstructPacket(packet.data, buffers);
53
+ delete packet.attachments; // no longer useful
54
+ return packet;
55
+ }
56
+ function _reconstructPacket(data, buffers) {
57
+ if (!data)
58
+ return data;
59
+ if (data && data._placeholder === true) {
60
+ const isIndexValid = typeof data.num === "number" &&
61
+ data.num >= 0 &&
62
+ data.num < buffers.length;
63
+ if (isIndexValid) {
64
+ return buffers[data.num]; // appropriate buffer (should be natural order anyway)
65
+ }
66
+ else {
67
+ throw new Error("illegal attachments");
68
+ }
69
+ }
70
+ else if (Array.isArray(data)) {
71
+ for (let i = 0; i < data.length; i++) {
72
+ data[i] = _reconstructPacket(data[i], buffers);
73
+ }
74
+ }
75
+ else if (typeof data === "object") {
76
+ for (const key in data) {
77
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
78
+ data[key] = _reconstructPacket(data[key], buffers);
79
+ }
80
+ }
81
+ }
82
+ return data;
83
+ }
@@ -0,0 +1,91 @@
1
+ import { Emitter } from "@socket.io/component-emitter";
2
+ /**
3
+ * Protocol version.
4
+ *
5
+ * @public
6
+ */
7
+ export declare const protocol: number;
8
+ export declare enum PacketType {
9
+ CONNECT = 0,
10
+ DISCONNECT = 1,
11
+ EVENT = 2,
12
+ ACK = 3,
13
+ CONNECT_ERROR = 4,
14
+ BINARY_EVENT = 5,
15
+ BINARY_ACK = 6
16
+ }
17
+ export interface Packet {
18
+ type: PacketType;
19
+ nsp: string;
20
+ data?: any;
21
+ id?: number;
22
+ attachments?: number;
23
+ }
24
+ /**
25
+ * A socket.io Encoder instance
26
+ */
27
+ export declare class Encoder {
28
+ private replacer?;
29
+ /**
30
+ * Encoder constructor
31
+ *
32
+ * @param {function} replacer - custom replacer to pass down to JSON.parse
33
+ */
34
+ constructor(replacer?: (this: any, key: string, value: any) => any);
35
+ /**
36
+ * Encode a packet as a single string if non-binary, or as a
37
+ * buffer sequence, depending on packet type.
38
+ *
39
+ * @param {Object} obj - packet object
40
+ */
41
+ encode(obj: Packet): any[];
42
+ /**
43
+ * Encode packet as string.
44
+ */
45
+ private encodeAsString;
46
+ /**
47
+ * Encode packet as 'buffer sequence' by removing blobs, and
48
+ * deconstructing packet into object with placeholders and
49
+ * a list of buffers.
50
+ */
51
+ private encodeAsBinary;
52
+ }
53
+ interface DecoderReservedEvents {
54
+ decoded: (packet: Packet) => void;
55
+ }
56
+ /**
57
+ * A socket.io Decoder instance
58
+ *
59
+ * @return {Object} decoder
60
+ */
61
+ export declare class Decoder extends Emitter<{}, {}, DecoderReservedEvents> {
62
+ private reviver?;
63
+ private reconstructor;
64
+ /**
65
+ * Decoder constructor
66
+ *
67
+ * @param {function} reviver - custom reviver to pass down to JSON.stringify
68
+ */
69
+ constructor(reviver?: (this: any, key: string, value: any) => any);
70
+ /**
71
+ * Decodes an encoded packet string into packet JSON.
72
+ *
73
+ * @param {String} obj - encoded packet
74
+ */
75
+ add(obj: any): void;
76
+ /**
77
+ * Decode a packet String (JSON data)
78
+ *
79
+ * @param {String} str
80
+ * @return {Object} packet
81
+ */
82
+ private decodeString;
83
+ private tryParse;
84
+ private static isPayloadValid;
85
+ /**
86
+ * Deallocates a parser's resources
87
+ */
88
+ destroy(): void;
89
+ }
90
+ export declare function isPacketValid(packet: Packet): boolean;
91
+ export {};