@openclaw/discord 2026.9.8 → 2026.10.1-beta.2

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 (147) hide show
  1. package/README.md +7 -0
  2. package/dist/.setup/{account-inspect-De8hOUxG.mjs → account-inspect-CjKqkDnH.mjs} +2 -2
  3. package/dist/.setup/{accounts-ChaMcixG.mjs → accounts-DXHCL8Zm.mjs} +9 -32
  4. package/dist/.setup/{active-turn-thread-route-fmHl1HNd.mjs → active-turn-thread-route-C4tp9noA.mjs} +5 -9
  5. package/dist/.setup/{activities-api-tvbsU2e3.mjs → activities-api-BL_hJ0JQ.mjs} +15 -18
  6. package/dist/.setup/{api-DVbJwZVt.mjs → api-_oznjffB.mjs} +1 -1
  7. package/dist/.setup/{approval-handler.runtime-DxCK2Rux.mjs → approval-handler.runtime-BilYSrRF.mjs} +22 -61
  8. package/dist/.setup/{approval-message-updates-BKFqavHZ.mjs → approval-message-updates-CgRwc2_Q.mjs} +2 -2
  9. package/dist/.setup/{audit-CLg9I71N.mjs → audit-DtvzxONM.mjs} +4 -4
  10. package/dist/.setup/{channel-access-C12aDZ0p.mjs → channel-access-BRp3Y-rF.mjs} +4 -17
  11. package/dist/.setup/{channel-type-DRCrEMss.mjs → channel-type-D1_b5UhU.mjs} +12 -16
  12. package/dist/.setup/{channel-DxlUVU9t.mjs → channel-z5lQMS_9.mjs} +79 -75
  13. package/dist/.setup/{channel.setup-CRo1GjV7.mjs → channel.setup-DBJtugJO.mjs} +14 -34
  14. package/dist/.setup/{components-Cq1PvIpN.mjs → components-CzXLR3QH.mjs} +56 -72
  15. package/dist/.setup/{config-schema-oxELUSDx.mjs → config-schema-CsemBDpS.mjs} +6 -17
  16. package/dist/.setup/{conversation-binding-route-Caz_XuFH.mjs → conversation-binding-route-Bi62ApSt.mjs} +1 -1
  17. package/dist/.setup/{directory-config-esqNn0Eo.mjs → directory-config-BH1LA-gi.mjs} +1 -1
  18. package/dist/.setup/{directory-live-DtKRHuGV.mjs → directory-live-C9xz7IPm.mjs} +10 -13
  19. package/dist/.setup/{discord-0xJYfdDD.mjs → discord-J7aRzq2Q.mjs} +101 -381
  20. package/dist/.setup/{doctor-BCl1H5tl.mjs → doctor-DxSAngJq.mjs} +31 -70
  21. package/dist/.setup/doctor-contract-Bg3NPAMw.mjs +137 -0
  22. package/dist/.setup/{handle-action-CUvQWnE7.mjs → handle-action-DlmFX-_G.mjs} +10 -11
  23. package/dist/.setup/{handle-action.guild-admin-Df-8gVle.mjs → handle-action.guild-admin-BnyqTczR.mjs} +67 -129
  24. package/dist/.setup/{live-policy-config-8Pv20CHc.mjs → live-policy-config-emmPNyh4.mjs} +1 -1
  25. package/dist/.setup/{message-handler-B-Jk4oDk.mjs → message-handler-BNToPZrx.mjs} +7 -6
  26. package/dist/.setup/{message-handler.preflight-v-__NSDq.mjs → message-handler.preflight-D0BcCyI7.mjs} +13 -23
  27. package/dist/.setup/{message-handler.preflight-pluralkit-CWLUBVcx.mjs → message-handler.preflight-pluralkit-D1g3eq0B.mjs} +5 -8
  28. package/dist/.setup/{message-handler.process-BNFFuChn.mjs → message-handler.process-CThRmCWK.mjs} +57 -96
  29. package/dist/.setup/{outbound-adapter-BobT-kse.mjs → outbound-adapter-BPq0c2wY.mjs} +11 -17
  30. package/dist/.setup/{outbound-session-route-zVGxxceg.mjs → outbound-session-route-DGPPKA0z.mjs} +21 -46
  31. package/dist/.setup/{presence-cache-Di3H3DIU.mjs → presence-cache-Dg3_dADn.mjs} +2 -4
  32. package/dist/.setup/{probe-LYrIHlBF.mjs → probe-DIRY8vh7.mjs} +17 -27
  33. package/dist/.setup/{provider-B_G5hASF.mjs → provider-D2OKMo0f.mjs} +273 -446
  34. package/dist/.setup/{provider-session.runtime-BYlTBFD2.mjs → provider-session.runtime-BupCTZQv.mjs} +3 -3
  35. package/dist/.setup/provider.runtime-BaW_JnfU.mjs +2 -0
  36. package/dist/.setup/{realtime-session.runtime-oUd9DOcz.mjs → realtime-session.runtime-D5RSC8Mm.mjs} +6 -8
  37. package/dist/.setup/{receive-recovery-CHPOsnLc.mjs → receive-recovery-GqF2PUN_.mjs} +1 -4
  38. package/dist/.setup/{resolve-allowlist-common-DPdRggu5.mjs → resolve-allowlist-common-DUYRrrVB.mjs} +5 -9
  39. package/dist/.setup/{resolve-channels-BFPNRmVv.mjs → resolve-channels--MUatisx.mjs} +3 -3
  40. package/dist/.setup/{resolve-users-0-aBuCy3.mjs → resolve-users-CxLcDmM0.mjs} +6 -9
  41. package/dist/.setup/{retry-pz_cSha2.mjs → retry-BKzO25k4.mjs} +27 -51
  42. package/dist/.setup/{runtime-sUksZ--Q.mjs → runtime-CerRBfaa.mjs} +2 -2
  43. package/dist/.setup/{runtime-FN000lxA.mjs → runtime-CwUA0RLr.mjs} +228 -255
  44. package/dist/.setup/{runtime-doctor-migrations-CshUGl36.mjs → runtime-doctor-migrations-BPV-R4G9.mjs} +6 -0
  45. package/dist/.setup/{security-audit-Cdaegq7C.mjs → security-audit-D42cp5N7.mjs} +21 -48
  46. package/dist/.setup/{send-CrfEI6Bs.mjs → send-2X7m2Zmw.mjs} +45 -58
  47. package/dist/.setup/{send.components-DxQAMfES.mjs → send.components-RqvgmCs3.mjs} +44 -90
  48. package/dist/.setup/{send.outbound-BISKnb-a.mjs → send.outbound-B4QHSEzm.mjs} +60 -98
  49. package/dist/.setup/{send.shared-DGFkbkQR.mjs → send.shared-BQIUh6Vn.mjs} +13 -20
  50. package/dist/.setup/{sender-identity-B9X5Vb9R.mjs → sender-identity-CooeYfAn.mjs} +1 -1
  51. package/dist/.setup/{session-key-normalization-wJgsKPNF.mjs → session-key-normalization-CCHGNSQw.mjs} +3 -9
  52. package/dist/.setup/setup-plugin-api-nn_giXvZ.mjs +3 -0
  53. package/dist/.setup/{shared-B3wZ4hN-.mjs → shared-CIJn6AEC.mjs} +7 -7
  54. package/dist/.setup/{subagent-hooks-nlUE9ow7.mjs → subagent-hooks-BYlVnxzy.mjs} +4 -9
  55. package/dist/.setup/{system-events-CdeZnvPV.mjs → system-events-CQ3if_pS.mjs} +2 -2
  56. package/dist/.setup/{target-resolver-BuLapkhy.mjs → target-resolver-Dzxf80Y3.mjs} +5 -13
  57. package/dist/.setup/targets-Lf8D55w-.mjs +3 -0
  58. package/dist/.setup/{thread-bindings-D7TfgjR_.mjs → thread-bindings-yNNlcUWE.mjs} +5 -6
  59. package/dist/.setup/{thread-bindings.manager-DN-NissX.mjs → thread-bindings.manager-plk0zJAW.mjs} +14 -20
  60. package/dist/.setup/{thread-bindings.session-updates-CshfKghV.mjs → thread-bindings.session-updates-C9aKtVs6.mjs} +295 -5
  61. package/dist/.setup/{timeouts-D86uWLt_.mjs → timeouts-pun7VJ02.mjs} +2 -15
  62. package/dist/.setup/{transcripts-source-p8EV179h.mjs → transcripts-source-CNWswry-.mjs} +31 -79
  63. package/dist/.setup/typing-CNlSKY5S.mjs +11 -0
  64. package/dist/.setup/{voice-runtime-B46rcwrG.mjs → voice-runtime-Bc75quiH.mjs} +62 -110
  65. package/dist/account-inspect-api.js +1 -1
  66. package/dist/action-runtime-api.js +1 -1
  67. package/dist/activities-api.js +1 -1
  68. package/dist/api.js +18 -18
  69. package/dist/channel-config-api.js +1 -1
  70. package/dist/channel-plugin-api.js +1 -1
  71. package/dist/control-ui/2afbdab1d3aa65a789d8a3eba666f4b1ec5df07073538fe30d6cf32093a1fb2d/index.js +1 -0
  72. package/dist/directory-contract-api.js +1 -1
  73. package/dist/doctor-contract-api.js +19 -128
  74. package/dist/index.js +1 -1
  75. package/dist/runtime-api.js +20 -21
  76. package/dist/security-audit-contract-api.js +1 -1
  77. package/dist/session-key-api.js +1 -1
  78. package/dist/setup-entry.js +1 -1
  79. package/dist/setup-plugin-api.js +1 -1
  80. package/dist/src/voice/audio-worker.runtime.js +6 -8
  81. package/dist/subagent-hooks-api.js +1 -1
  82. package/dist/transcripts-source-api.js +1 -1
  83. package/node_modules/libopus-wasm/CHANGELOG.md +8 -0
  84. package/node_modules/libopus-wasm/dist/discordjs.d.ts.map +1 -1
  85. package/node_modules/libopus-wasm/dist/discordjs.js +14 -2
  86. package/node_modules/libopus-wasm/dist/generated/libopus.generated.mjs +0 -0
  87. package/node_modules/libopus-wasm/dist/index.d.ts.map +1 -1
  88. package/node_modules/libopus-wasm/dist/index.js +55 -100
  89. package/node_modules/libopus-wasm/package.json +5 -5
  90. package/node_modules/undici/README.md +10 -1
  91. package/node_modules/undici/docs/docs/api/Agent.md +8 -8
  92. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
  93. package/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
  94. package/node_modules/undici/docs/docs/api/Errors.md +25 -0
  95. package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
  96. package/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
  97. package/node_modules/undici/docs/docs/api/Pool.md +5 -6
  98. package/node_modules/undici/docs/docs/index.md +10 -1
  99. package/node_modules/undici/lib/api/readable.js +1 -2
  100. package/node_modules/undici/lib/core/request.js +23 -2
  101. package/node_modules/undici/lib/core/util.js +0 -39
  102. package/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
  103. package/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
  104. package/node_modules/undici/lib/dispatcher/client.js +6 -1
  105. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
  106. package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
  107. package/node_modules/undici/lib/dispatcher/pool.js +90 -7
  108. package/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
  109. package/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
  110. package/node_modules/undici/lib/handler/redirect-handler.js +5 -0
  111. package/node_modules/undici/lib/handler/retry-handler.js +72 -13
  112. package/node_modules/undici/lib/interceptor/cache.js +4 -1
  113. package/node_modules/undici/lib/interceptor/decompress.js +236 -69
  114. package/node_modules/undici/lib/web/cache/cache.js +17 -8
  115. package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
  116. package/node_modules/undici/lib/web/cookies/index.js +19 -7
  117. package/node_modules/undici/lib/web/cookies/util.js +3 -1
  118. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
  119. package/node_modules/undici/lib/web/fetch/body.js +22 -15
  120. package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
  121. package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
  122. package/node_modules/undici/lib/web/fetch/headers.js +34 -31
  123. package/node_modules/undici/lib/web/fetch/index.js +46 -25
  124. package/node_modules/undici/lib/web/fetch/request.js +74 -79
  125. package/node_modules/undici/lib/web/fetch/response.js +43 -44
  126. package/node_modules/undici/lib/web/fetch/util.js +7 -7
  127. package/node_modules/undici/lib/web/infra/index.js +16 -1
  128. package/node_modules/undici/lib/web/webidl/index.js +2 -14
  129. package/node_modules/undici/lib/web/websocket/connection.js +33 -12
  130. package/node_modules/undici/lib/web/websocket/events.js +43 -26
  131. package/node_modules/undici/lib/web/websocket/receiver.js +2 -0
  132. package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
  133. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
  134. package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
  135. package/node_modules/undici/package.json +1 -1
  136. package/node_modules/undici/types/diagnostics-channel.d.ts +2 -1
  137. package/node_modules/undici/types/interceptors.d.ts +1 -1
  138. package/node_modules/undici/types/webidl.d.ts +13 -7
  139. package/openclaw.plugin.json +6 -0
  140. package/package.json +12 -7
  141. package/dist/.setup/doctor-contract-CvvgwrrG.mjs +0 -409
  142. package/dist/.setup/model-picker-preference-primitives-BHT1LkR_.mjs +0 -37
  143. package/dist/.setup/provider.runtime-CUE3UxER.mjs +0 -2
  144. package/dist/.setup/setup-plugin-api-BQUBxbhe.mjs +0 -3
  145. package/dist/.setup/targets-0KUcEIYx.mjs +0 -3
  146. package/dist/.setup/thread-bindings.state-g6v9zAym.mjs +0 -331
  147. package/dist/.setup/typing-BiHCzBRu.mjs +0 -15
@@ -62,7 +62,9 @@ class WebSocketStream {
62
62
 
63
63
  this.#handler.socket.destroy()
64
64
  },
65
- onSocketClose: () => this.#onSocketClose(),
65
+ // When the WebSocket connection is closed for a WebSocketStream stream, possibly cleanly, the user agent must
66
+ // queue a global task on the WebSocket task source given stream ’s relevant global object to run the following substeps:
67
+ onSocketClose: () => queueMicrotask(() => this.#onSocketClose()),
66
68
  onPing: () => {},
67
69
  onPong: () => {},
68
70
 
@@ -246,11 +248,15 @@ class WebSocketStream {
246
248
  const frame = new WebsocketFrameSend(data)
247
249
 
248
250
  this.#handler.socket.write(frame.createFrame(opcode), () => {
251
+ // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
249
252
  promise.resolve(undefined)
250
253
  })
254
+ } else {
255
+ // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
256
+ promise.resolve(undefined)
251
257
  }
252
258
 
253
- // 6.3. Queue a global task on the WebSocket task source given stream ’s relevant global object to resolve promise with undefined.
259
+ // 7. Return promise.
254
260
  return promise.promise
255
261
  }
256
262
 
@@ -278,7 +284,7 @@ class WebSocketStream {
278
284
  // This is done in the opening handshake.
279
285
 
280
286
  // 3. Let extensions be the extensions in use .
281
- const extensions = parsedExtensions ?? ''
287
+ const extensions = response.headersList.get('sec-websocket-extensions') ?? ''
282
288
 
283
289
  // 4. Let protocol be the subprotocol in use .
284
290
  const protocol = response.headersList.get('sec-websocket-protocol') ?? ''
@@ -291,6 +297,7 @@ class WebSocketStream {
291
297
  start: (controller) => {
292
298
  this.#readableStreamController = controller
293
299
  },
300
+ pull: () => this.#pull(),
294
301
  cancel: (reason) => this.#cancel(reason)
295
302
  })
296
303
 
@@ -350,6 +357,9 @@ class WebSocketStream {
350
357
  this.#readableStreamController.enqueue(chunk)
351
358
 
352
359
  // 4. Apply backpressure to the WebSocket.
360
+ if (this.#readableStreamController.desiredSize <= 0) {
361
+ this.#handler.socket.pause()
362
+ }
353
363
  }
354
364
 
355
365
  /** @type {import('../websocket').Handler['onSocketClose']} */
@@ -383,7 +393,7 @@ class WebSocketStream {
383
393
  // 1006.
384
394
  let code = result?.code ?? 1005
385
395
 
386
- if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
396
+ if (!this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) {
387
397
  code = 1006
388
398
  }
389
399
 
@@ -441,6 +451,11 @@ class WebSocketStream {
441
451
  closeWebSocketConnection(this.#handler, code, reasonString)
442
452
  }
443
453
 
454
+ // To pull bytes from a WebSocketStream stream , if stream is currently applying backpressure, release backpressure.
455
+ #pull () {
456
+ this.#handler.socket.resume()
457
+ }
458
+
444
459
  // To cancel a WebSocketStream stream given reason , close using reason giving stream and reason .
445
460
  #cancel (reason) {
446
461
  this.#closeUsingReason(reason)
@@ -28,6 +28,8 @@ const { channels } = require('../../core/diagnostics')
28
28
  const kRef = Symbol.for('nodejs.ref')
29
29
  const kUnref = Symbol.for('nodejs.unref')
30
30
 
31
+ let ping
32
+
31
33
  function getSocketAddress (socket) {
32
34
  if (typeof socket?.address === 'function') {
33
35
  return socket.address()
@@ -198,16 +200,14 @@ class WebSocket extends EventTarget {
198
200
  this.#binaryType = 'blob'
199
201
  }
200
202
 
203
+ // TODO: remove this
201
204
  [kRef] () {
202
- webidl.brandCheck(this, WebSocket)
203
-
204
205
  this.#refed = true
205
206
  this.#handler.socket?.ref?.()
206
207
  }
207
208
 
209
+ // TODO: remove this
208
210
  [kUnref] () {
209
- webidl.brandCheck(this, WebSocket)
210
-
211
211
  this.#refed = false
212
212
  this.#handler.socket?.unref?.()
213
213
  }
@@ -218,7 +218,7 @@ class WebSocket extends EventTarget {
218
218
  * @param {string|undefined} reason
219
219
  */
220
220
  close (code = undefined, reason = undefined) {
221
- webidl.brandCheck(this, WebSocket)
221
+ webidl.brandCheck(this, webidl.is.WebSocket)
222
222
 
223
223
  const prefix = 'WebSocket.close'
224
224
 
@@ -245,7 +245,7 @@ class WebSocket extends EventTarget {
245
245
  * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data
246
246
  */
247
247
  send (data) {
248
- webidl.brandCheck(this, WebSocket)
248
+ webidl.brandCheck(this, webidl.is.WebSocket)
249
249
 
250
250
  const prefix = 'WebSocket.send'
251
251
  webidl.argumentLengthCheck(arguments, 1, prefix)
@@ -339,45 +339,45 @@ class WebSocket extends EventTarget {
339
339
  }
340
340
 
341
341
  get readyState () {
342
- webidl.brandCheck(this, WebSocket)
342
+ webidl.brandCheck(this, webidl.is.WebSocket)
343
343
 
344
344
  // The readyState getter steps are to return this's ready state.
345
345
  return this.#handler.readyState
346
346
  }
347
347
 
348
348
  get bufferedAmount () {
349
- webidl.brandCheck(this, WebSocket)
349
+ webidl.brandCheck(this, webidl.is.WebSocket)
350
350
 
351
351
  return this.#bufferedAmount
352
352
  }
353
353
 
354
354
  get url () {
355
- webidl.brandCheck(this, WebSocket)
355
+ webidl.brandCheck(this, webidl.is.WebSocket)
356
356
 
357
357
  // The url getter steps are to return this's url, serialized.
358
358
  return URLSerializer(this.#url)
359
359
  }
360
360
 
361
361
  get extensions () {
362
- webidl.brandCheck(this, WebSocket)
362
+ webidl.brandCheck(this, webidl.is.WebSocket)
363
363
 
364
364
  return this.#extensions
365
365
  }
366
366
 
367
367
  get protocol () {
368
- webidl.brandCheck(this, WebSocket)
368
+ webidl.brandCheck(this, webidl.is.WebSocket)
369
369
 
370
370
  return this.#protocol
371
371
  }
372
372
 
373
373
  get onopen () {
374
- webidl.brandCheck(this, WebSocket)
374
+ webidl.brandCheck(this, webidl.is.WebSocket)
375
375
 
376
376
  return this.#events.open
377
377
  }
378
378
 
379
379
  set onopen (fn) {
380
- webidl.brandCheck(this, WebSocket)
380
+ webidl.brandCheck(this, webidl.is.WebSocket)
381
381
 
382
382
  if (this.#events.open) {
383
383
  this.removeEventListener('open', this.#events.open)
@@ -394,13 +394,13 @@ class WebSocket extends EventTarget {
394
394
  }
395
395
 
396
396
  get onerror () {
397
- webidl.brandCheck(this, WebSocket)
397
+ webidl.brandCheck(this, webidl.is.WebSocket)
398
398
 
399
399
  return this.#events.error
400
400
  }
401
401
 
402
402
  set onerror (fn) {
403
- webidl.brandCheck(this, WebSocket)
403
+ webidl.brandCheck(this, webidl.is.WebSocket)
404
404
 
405
405
  if (this.#events.error) {
406
406
  this.removeEventListener('error', this.#events.error)
@@ -417,13 +417,13 @@ class WebSocket extends EventTarget {
417
417
  }
418
418
 
419
419
  get onclose () {
420
- webidl.brandCheck(this, WebSocket)
420
+ webidl.brandCheck(this, webidl.is.WebSocket)
421
421
 
422
422
  return this.#events.close
423
423
  }
424
424
 
425
425
  set onclose (fn) {
426
- webidl.brandCheck(this, WebSocket)
426
+ webidl.brandCheck(this, webidl.is.WebSocket)
427
427
 
428
428
  if (this.#events.close) {
429
429
  this.removeEventListener('close', this.#events.close)
@@ -440,13 +440,13 @@ class WebSocket extends EventTarget {
440
440
  }
441
441
 
442
442
  get onmessage () {
443
- webidl.brandCheck(this, WebSocket)
443
+ webidl.brandCheck(this, webidl.is.WebSocket)
444
444
 
445
445
  return this.#events.message
446
446
  }
447
447
 
448
448
  set onmessage (fn) {
449
- webidl.brandCheck(this, WebSocket)
449
+ webidl.brandCheck(this, webidl.is.WebSocket)
450
450
 
451
451
  if (this.#events.message) {
452
452
  this.removeEventListener('message', this.#events.message)
@@ -463,13 +463,13 @@ class WebSocket extends EventTarget {
463
463
  }
464
464
 
465
465
  get binaryType () {
466
- webidl.brandCheck(this, WebSocket)
466
+ webidl.brandCheck(this, webidl.is.WebSocket)
467
467
 
468
468
  return this.#binaryType
469
469
  }
470
470
 
471
471
  set binaryType (type) {
472
- webidl.brandCheck(this, WebSocket)
472
+ webidl.brandCheck(this, webidl.is.WebSocket)
473
473
 
474
474
  if (type !== 'blob' && type !== 'arraybuffer') {
475
475
  this.#binaryType = 'blob'
@@ -654,33 +654,36 @@ class WebSocket extends EventTarget {
654
654
  }
655
655
  }
656
656
 
657
- /**
658
- * @param {WebSocket} ws
659
- * @param {Buffer|undefined} buffer
660
- */
661
- static ping (ws, buffer) {
662
- if (Buffer.isBuffer(buffer)) {
663
- if (buffer.length > 125) {
664
- throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')
657
+ static {
658
+ /**
659
+ * @param {WebSocket} ws
660
+ * @param {Buffer|undefined} buffer
661
+ */
662
+ ping = (ws, buffer) => {
663
+ if (Buffer.isBuffer(buffer)) {
664
+ if (buffer.length > 125) {
665
+ throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')
666
+ }
667
+ } else if (buffer !== undefined) {
668
+ throw new TypeError('Expected buffer payload')
665
669
  }
666
- } else if (buffer !== undefined) {
667
- throw new TypeError('Expected buffer payload')
668
- }
669
670
 
670
- // An endpoint MAY send a Ping frame any time after the connection is
671
- // established and before the connection is closed.
672
- const readyState = ws.#handler.readyState
671
+ // An endpoint MAY send a Ping frame any time after the connection is
672
+ // established and before the connection is closed.
673
+ const readyState = ws.#handler.readyState
673
674
 
674
- if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
675
- const frame = new WebsocketFrameSend(buffer)
676
- ws.#handler.socket.write(frame.createFrame(opcodes.PING))
675
+ if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
676
+ const frame = new WebsocketFrameSend(buffer)
677
+ ws.#handler.socket.write(frame.createFrame(opcodes.PING))
678
+ }
679
+ }
680
+
681
+ webidl.is.WebSocket = (arg) => {
682
+ return arg != null && typeof arg === 'object' && #handler in arg
677
683
  }
678
684
  }
679
685
  }
680
686
 
681
- const { ping } = WebSocket
682
- Reflect.deleteProperty(WebSocket, 'ping')
683
-
684
687
  // https://websockets.spec.whatwg.org/#dom-websocket-connecting
685
688
  WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING
686
689
  // https://websockets.spec.whatwg.org/#dom-websocket-open
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "8.10.2",
3
+ "version": "8.11.2",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
@@ -2,6 +2,7 @@ import { Socket } from 'node:net'
2
2
  import { URL } from 'node:url'
3
3
  import buildConnector from './connector'
4
4
  import Dispatcher from './dispatcher'
5
+ import { IncomingHttpHeaders } from './header'
5
6
 
6
7
  declare namespace DiagnosticsChannel {
7
8
  interface Request {
@@ -14,7 +15,7 @@ declare namespace DiagnosticsChannel {
14
15
  interface Response {
15
16
  statusCode: number;
16
17
  statusText: string;
17
- headers: Array<Buffer>;
18
+ headers: Array<Buffer> | IncomingHttpHeaders;
18
19
  }
19
20
  interface ConnectParams {
20
21
  host: URL['host'];
@@ -12,7 +12,7 @@ declare namespace Interceptors {
12
12
  export type DecompressInterceptorOpts = {
13
13
  skipErrorResponses?: boolean
14
14
  skipStatusCodes?: number[]
15
- /** Maximum decompressed response size in bytes. @default 67108864 */
15
+ /** Maximum decompressed response size in bytes per stage. 0 disables the limit. @default 0 */
16
16
  maxSize?: number
17
17
  }
18
18
 
@@ -248,13 +248,22 @@ type WebidlIsFunction<T> = (arg: any) => arg is T
248
248
  interface WebidlIs {
249
249
  Request: WebidlIsFunction<undici.Request>
250
250
  Response: WebidlIsFunction<undici.Response>
251
+ Headers: WebidlIsFunction<undici.Headers>
252
+ FormData: WebidlIsFunction<undici.FormData>
253
+ WebSocket: WebidlIsFunction<undici.WebSocket>
254
+ WebSocketError: WebidlIsFunction<undici.WebSocketError>
255
+ Cache: WebidlIsFunction<undici.Cache>
256
+ CacheStorage: WebidlIsFunction<undici.CacheStorage>
257
+ EventSource: WebidlIsFunction<undici.EventSource>
258
+ MessageEvent: WebidlIsFunction<undici.MessageEvent>
259
+ CloseEvent: WebidlIsFunction<undici.CloseEvent>
260
+ ErrorEvent: WebidlIsFunction<undici.ErrorEvent>
261
+
251
262
  ReadableStream: WebidlIsFunction<ReadableStream>
252
263
  Blob: WebidlIsFunction<Blob>
253
264
  URLSearchParams: WebidlIsFunction<URLSearchParams>
254
265
  File: WebidlIsFunction<File>
255
- FormData: WebidlIsFunction<undici.FormData>
256
266
  URL: WebidlIsFunction<URL>
257
- WebSocketError: WebidlIsFunction<undici.WebSocketError>
258
267
  AbortSignal: WebidlIsFunction<AbortSignal>
259
268
  MessagePort: WebidlIsFunction<MessagePort>
260
269
  USVString: WebidlIsFunction<string>
@@ -272,12 +281,9 @@ export interface Webidl {
272
281
  attributes: WebIDLExtendedAttributes
273
282
 
274
283
  /**
275
- * @description Performs a brand-check on {@param V} to ensure it is a
276
- * {@param cls} object.
284
+ * @description Performs a brand-check on {@param V}.
277
285
  */
278
- brandCheck <Interface extends new () => unknown>(V: unknown, cls: Interface): asserts V is Interface
279
-
280
- brandCheckMultiple <Interfaces extends (new () => unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number]
286
+ brandCheck <T>(V: unknown, assertion: WebidlIsFunction<T>): asserts V is T
281
287
 
282
288
  /**
283
289
  * @see https://webidl.spec.whatwg.org/#es-sequence
@@ -6,6 +6,9 @@
6
6
  "doctorContract": {
7
7
  "configRepair": true,
8
8
  "stateMigrations": [
9
+ {
10
+ "id": "discord-retired-state"
11
+ },
9
12
  {
10
13
  "id": "discord-legacy-state"
11
14
  }
@@ -42,6 +45,9 @@
42
45
  "additionalProperties": false,
43
46
  "properties": {}
44
47
  },
48
+ "controlUi": {
49
+ "entry": "dist/control-ui/2afbdab1d3aa65a789d8a3eba666f4b1ec5df07073538fe30d6cf32093a1fb2d/index.js"
50
+ },
45
51
  "channelConfigs": {
46
52
  "discord": {
47
53
  "schema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.9.8",
3
+ "version": "2026.10.1-beta.2",
4
4
  "description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,15 +11,15 @@
11
11
  "@discord/embedded-app-sdk": "2.5.0",
12
12
  "@discordjs/voice": "0.19.2",
13
13
  "discord-api-types": "0.38.55",
14
- "libopus-wasm": "0.4.0",
14
+ "libopus-wasm": "0.4.1",
15
15
  "mdast-util-from-markdown": "2.0.3",
16
16
  "typebox": "1.3.34",
17
- "undici": "8.10.2",
17
+ "undici": "8.11.2",
18
18
  "ws": "8.21.3",
19
19
  "zod": "4.6.5"
20
20
  },
21
21
  "peerDependencies": {
22
- "openclaw": ">=2026.9.8"
22
+ "openclaw": ">=2026.10.1-beta.2"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "openclaw": {
@@ -95,14 +95,14 @@
95
95
  "allowInvalidConfigRecovery": true
96
96
  },
97
97
  "compat": {
98
- "pluginApi": ">=2026.9.8"
98
+ "pluginApi": ">=2026.10.1-beta.2"
99
99
  },
100
100
  "build": {
101
101
  "bundledDist": false,
102
102
  "workerEntries": [
103
103
  "./src/voice/audio-worker.runtime.ts"
104
104
  ],
105
- "openclawVersion": "2026.9.8",
105
+ "openclawVersion": "2026.10.1-beta.2",
106
106
  "staticAssets": [
107
107
  {
108
108
  "source": "./assets/embedded-app-sdk.mjs",
@@ -111,12 +111,17 @@
111
111
  ]
112
112
  },
113
113
  "assetScripts": {
114
- "build": "node --import tsx ../../scripts/build-discord-activity-sdk.mts"
114
+ "build": "node --import ../../scripts/tsx.mjs ../../scripts/build-discord-activity-sdk.mts && cd ../.. && node --import ./scripts/tsx.mjs scripts/build-plugin-control-ui.mts extensions/discord",
115
+ "copy": "cd ../.. && node --import ./scripts/tsx.mjs scripts/build-plugin-control-ui.mts extensions/discord --copy",
116
+ "buildOutputs": [
117
+ "openclaw.plugin.json"
118
+ ]
115
119
  },
116
120
  "release": {
117
121
  "publishToClawHub": true,
118
122
  "publishToNpm": true
119
123
  },
124
+ "controlUi": "./browser/index.ts",
120
125
  "runtimeExtensions": [
121
126
  "./dist/index.js"
122
127
  ],