@openclaw/discord 2026.10.2 → 2026.10.5-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 (246) hide show
  1. package/dist/.setup/account-inspect-8cCu6uPG.mjs +31 -0
  2. package/dist/.setup/{accounts-HE9-mj1L.mjs → accounts-ljrzXBJi.mjs} +47 -45
  3. package/dist/.setup/{allow-list-vxkG9_JD.mjs → allow-list-B_ToXtew.mjs} +34 -101
  4. package/dist/.setup/{api-DlNUkDqj.mjs → api-CtmE1OUN.mjs} +25 -31
  5. package/dist/.setup/{approval-handler.runtime-DmnEa54W.mjs → approval-handler.runtime-D7FoZSn0.mjs} +30 -53
  6. package/dist/.setup/{approval-message-updates-B0jdSqOj.mjs → approval-message-updates-CIGByUcE.mjs} +2 -2
  7. package/dist/.setup/{audit-BpikUwN_.mjs → audit-zSawfbsN.mjs} +5 -8
  8. package/dist/.setup/{channel-Dr-AUnGt.mjs → channel-DI7DMzu0.mjs} +136 -215
  9. package/dist/.setup/{channel-access-BRp3Y-rF.mjs → channel-access-DasWY_OV.mjs} +6 -7
  10. package/dist/.setup/{channel.setup-BmNvkidb.mjs → channel.setup-DdFVN1mr.mjs} +35 -64
  11. package/dist/.setup/{components-DLJR0xU-.mjs → components-HN9052L1.mjs} +123 -146
  12. package/dist/.setup/{config-schema-BQWfnSCx.mjs → config-schema-_uBILpQf.mjs} +7 -3
  13. package/dist/.setup/{conversation-binding-route-DicJC1Lj.mjs → conversation-binding-route-DTjCBx-O.mjs} +1 -1
  14. package/dist/.setup/{directory-config-gqsdcplU.mjs → directory-config-3iVub-3m.mjs} +1 -1
  15. package/dist/.setup/{directory-live-Bipr0eUJ.mjs → directory-live-DLygQVtW.mjs} +18 -22
  16. package/dist/.setup/{discord-9gysrhzp.mjs → discord-BGqgx-yd.mjs} +686 -854
  17. package/dist/.setup/{doctor-B2bskDcF.mjs → doctor-DSrNJ7m2.mjs} +36 -47
  18. package/dist/.setup/{doctor-contract-Bg3NPAMw.mjs → doctor-contract-Bwv8EuQ_.mjs} +7 -16
  19. package/dist/.setup/{handle-action-UmkjXBfo.mjs → handle-action-CXH1h1tq.mjs} +25 -38
  20. package/dist/.setup/{handle-action.guild-admin-CB4sc9VV.mjs → handle-action.guild-admin-CHKW6PIs.mjs} +25 -31
  21. package/dist/.setup/{live-policy-config-VxexfRKo.mjs → live-policy-config-BPoB3eQi.mjs} +1 -1
  22. package/dist/.setup/{message-handler-BK69A-NB.mjs → message-handler-Ii_etru1.mjs} +9 -14
  23. package/dist/.setup/{message-handler.preflight-DFpsh90H.mjs → message-handler.preflight-C7YuSRl_.mjs} +79 -128
  24. package/dist/.setup/{message-handler.preflight-pluralkit-BXGGVmpe.mjs → message-handler.preflight-pluralkit-C3iAG--b.mjs} +6 -6
  25. package/dist/.setup/{message-handler.process-TKoqcqIP.mjs → message-handler.process-ClgWYH6o.mjs} +234 -206
  26. package/dist/.setup/{outbound-adapter-D4wRAb5S.mjs → outbound-adapter-D8OOIuKn.mjs} +73 -112
  27. package/dist/.setup/{outbound-session-route-BvBH4LC6.mjs → outbound-session-route-B0Hpwn3Q.mjs} +57 -115
  28. package/dist/.setup/output-activity-uBpMSX75.mjs +11 -0
  29. package/dist/.setup/{pluralkit-a6_NLfH9.mjs → pluralkit-B64dfq_j.mjs} +3 -1
  30. package/dist/.setup/{preflight-audio-DHGIHEpv.mjs → preflight-audio-wWgsZG5F.mjs} +1 -5
  31. package/dist/.setup/{presence-cache-Dg3_dADn.mjs → presence-cache-DCeTsL73.mjs} +3 -6
  32. package/dist/.setup/{probe-BwSKpnZf.mjs → probe-D3P1x4aN.mjs} +10 -18
  33. package/dist/.setup/{provider-YP8gN9_o.mjs → provider-D9EzOfG8.mjs} +2990 -3903
  34. package/dist/.setup/{provider-session.runtime-D1gkPxHT.mjs → provider-session.runtime-CsnRvddI.mjs} +5 -5
  35. package/dist/.setup/provider.runtime-BQVcM7Pg.mjs +2 -0
  36. package/dist/.setup/{realtime-session.runtime-BKUQBy1u.mjs → realtime-session.runtime-CxGBk8H-.mjs} +69 -98
  37. package/dist/.setup/{receive-recovery-DgkX7Qvi.mjs → receive-recovery-eVmK2_hl.mjs} +2 -12
  38. package/dist/.setup/resolve-allowlist-common-DNSsUQRF.mjs +66 -0
  39. package/dist/.setup/resolve-channels-UdT38DzU.mjs +173 -0
  40. package/dist/.setup/{resolve-users-DNrwvunm.mjs → resolve-users-DnCsrXZ_.mjs} +12 -41
  41. package/dist/.setup/{runtime-CESTexGn.mjs → runtime-CRTkKU1G.mjs} +202 -313
  42. package/dist/.setup/{runtime-DPcmPST9.mjs → runtime-DPm3gZXk.mjs} +2 -2
  43. package/dist/.setup/{secret-config-contract-uOE2J7yM.mjs → secret-config-contract-CIsH7R3B.mjs} +9 -18
  44. package/dist/.setup/{security-audit-D42cp5N7.mjs → security-audit-BFT84Uny.mjs} +1 -2
  45. package/dist/.setup/security-contract-DNyyjTZZ.mjs +19 -0
  46. package/dist/.setup/{send-CJk3VP5q.mjs → send-DbILKgcm.mjs} +184 -241
  47. package/dist/.setup/{send.components-dPljuV24.mjs → send.components-FxOS3CeP.mjs} +47 -63
  48. package/dist/.setup/{send.outbound-rOboMO_6.mjs → send.outbound-_jx4Xpd3.mjs} +178 -202
  49. package/dist/.setup/{send.receipt-DVOg2Oaw.mjs → send.receipt-BAlzXd8e.mjs} +33 -109
  50. package/dist/.setup/{send.shared-C4CN24D9.mjs → send.shared-CjQ4jbMA.mjs} +97 -153
  51. package/dist/.setup/{sender-identity-AHpUNr72.mjs → sender-identity-BNBvGt1l.mjs} +1 -1
  52. package/dist/.setup/setup-plugin-api-xfOFmxHP.mjs +3 -0
  53. package/dist/.setup/{shared-BoBnM5kM.mjs → shared-CestGDpq.mjs} +30 -20
  54. package/dist/.setup/{subagent-hooks-HH8Uy9cx.mjs → subagent-hooks-CME7dSGf.mjs} +5 -10
  55. package/dist/.setup/{system-events-Cwxaww8i.mjs → system-events-BwwSDCw4.mjs} +2 -2
  56. package/dist/.setup/target-parsing-C-HyNxcE.mjs +48 -0
  57. package/dist/.setup/{target-resolver-CSFoPQ12.mjs → target-resolver-Bse8fuTi.mjs} +11 -27
  58. package/dist/.setup/targets-DZJjkzwv.mjs +3 -0
  59. package/dist/.setup/{thread-bindings-DjQCkmsd.mjs → thread-bindings-0hPTSK14.mjs} +61 -52
  60. package/dist/.setup/{thread-bindings.manager-D2-GYZ5s.mjs → thread-bindings.manager-CdNa6UIs.mjs} +138 -211
  61. package/dist/.setup/{thread-bindings.session-updates-Bu_CGr_O.mjs → thread-bindings.session-updates-DGSljVf6.mjs} +60 -99
  62. package/dist/.setup/threading-BKe3E3tp.mjs +246 -0
  63. package/dist/.setup/{timeouts-pun7VJ02.mjs → timeouts-CuNARfyw.mjs} +10 -18
  64. package/dist/.setup/{transcripts-source-CaZQnGRH.mjs → transcripts-source-0qQYVu2H.mjs} +50 -368
  65. package/dist/.setup/{voice-runtime-DDymtIw8.mjs → voice-runtime-QlZJ4sHv.mjs} +166 -322
  66. package/dist/account-inspect-api.js +1 -1
  67. package/dist/action-runtime-api.js +1 -1
  68. package/dist/activities-api.js +77 -120
  69. package/dist/api.js +19 -18
  70. package/dist/channel-config-api.js +1 -1
  71. package/dist/channel-plugin-api.js +1 -1
  72. package/dist/directory-contract-api.js +1 -1
  73. package/dist/doctor-contract-api.js +1 -1
  74. package/dist/runtime-api.js +21 -20
  75. package/dist/secret-contract-api.js +1 -1
  76. package/dist/security-audit-contract-api.js +1 -1
  77. package/dist/security-contract-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 +38 -57
  81. package/dist/subagent-hooks-api.js +1 -1
  82. package/dist/transcripts-source-api.js +1 -1
  83. package/node_modules/@types/node/README.md +1 -1
  84. package/node_modules/@types/node/crypto.d.ts +2 -2
  85. package/node_modules/@types/node/dgram.d.ts +1 -1
  86. package/node_modules/@types/node/package.json +2 -2
  87. package/node_modules/@types/node/zlib.d.ts +6 -0
  88. package/node_modules/@types/ws/README.md +1 -1
  89. package/node_modules/@types/ws/index.d.mts +4 -0
  90. package/node_modules/@types/ws/index.d.ts +4 -0
  91. package/node_modules/@types/ws/package.json +3 -3
  92. package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts +21 -0
  93. package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts.map +1 -1
  94. package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts +21 -0
  95. package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts.map +1 -1
  96. package/node_modules/discord-api-types/globals.d.ts +6 -0
  97. package/node_modules/discord-api-types/globals.d.ts.map +1 -1
  98. package/node_modules/discord-api-types/globals.js +6 -0
  99. package/node_modules/discord-api-types/globals.js.map +1 -1
  100. package/node_modules/discord-api-types/package.json +3 -3
  101. package/node_modules/discord-api-types/payloads/index.mjs +1 -0
  102. package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.d.ts +207 -0
  103. package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.d.ts.map +1 -0
  104. package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.js +25 -0
  105. package/node_modules/discord-api-types/payloads/v10/applicationIdentityProfile.js.map +1 -0
  106. package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts +1 -1
  107. package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map +1 -1
  108. package/node_modules/discord-api-types/payloads/v10/guild.d.ts +27 -23
  109. package/node_modules/discord-api-types/payloads/v10/guild.d.ts.map +1 -1
  110. package/node_modules/discord-api-types/payloads/v10/guild.js +26 -22
  111. package/node_modules/discord-api-types/payloads/v10/guild.js.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v10/index.d.ts +1 -0
  113. package/node_modules/discord-api-types/payloads/v10/index.d.ts.map +1 -1
  114. package/node_modules/discord-api-types/payloads/v10/index.js +1 -0
  115. package/node_modules/discord-api-types/payloads/v10/index.js.map +1 -1
  116. package/node_modules/discord-api-types/payloads/v10/index.mjs +1 -0
  117. package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.d.ts +207 -0
  118. package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.d.ts.map +1 -0
  119. package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.js +25 -0
  120. package/node_modules/discord-api-types/payloads/v9/applicationIdentityProfile.js.map +1 -0
  121. package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts +1 -1
  122. package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map +1 -1
  123. package/node_modules/discord-api-types/payloads/v9/guild.d.ts +27 -23
  124. package/node_modules/discord-api-types/payloads/v9/guild.d.ts.map +1 -1
  125. package/node_modules/discord-api-types/payloads/v9/guild.js +26 -22
  126. package/node_modules/discord-api-types/payloads/v9/guild.js.map +1 -1
  127. package/node_modules/discord-api-types/payloads/v9/index.d.ts +1 -0
  128. package/node_modules/discord-api-types/payloads/v9/index.d.ts.map +1 -1
  129. package/node_modules/discord-api-types/payloads/v9/index.js +1 -0
  130. package/node_modules/discord-api-types/payloads/v9/index.js.map +1 -1
  131. package/node_modules/discord-api-types/payloads/v9/index.mjs +1 -0
  132. package/node_modules/discord-api-types/rest/common.d.ts +2 -0
  133. package/node_modules/discord-api-types/rest/common.d.ts.map +1 -1
  134. package/node_modules/discord-api-types/rest/common.js +2 -0
  135. package/node_modules/discord-api-types/rest/common.js.map +1 -1
  136. package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.d.ts +70 -0
  137. package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.d.ts.map +1 -0
  138. package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.js +3 -0
  139. package/node_modules/discord-api-types/rest/v10/applicationIdentityProfile.js.map +1 -0
  140. package/node_modules/discord-api-types/rest/v10/index.d.ts +1 -0
  141. package/node_modules/discord-api-types/rest/v10/index.d.ts.map +1 -1
  142. package/node_modules/discord-api-types/rest/v10/index.js +29 -0
  143. package/node_modules/discord-api-types/rest/v10/index.js.map +1 -1
  144. package/node_modules/discord-api-types/rest/v10/interactions.d.ts +4 -2
  145. package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -1
  146. package/node_modules/discord-api-types/rest/v10/user.d.ts +2 -2
  147. package/node_modules/discord-api-types/rest/v10/user.d.ts.map +1 -1
  148. package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.d.ts +70 -0
  149. package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.d.ts.map +1 -0
  150. package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.js +3 -0
  151. package/node_modules/discord-api-types/rest/v9/applicationIdentityProfile.js.map +1 -0
  152. package/node_modules/discord-api-types/rest/v9/index.d.ts +1 -0
  153. package/node_modules/discord-api-types/rest/v9/index.d.ts.map +1 -1
  154. package/node_modules/discord-api-types/rest/v9/index.js +29 -0
  155. package/node_modules/discord-api-types/rest/v9/index.js.map +1 -1
  156. package/node_modules/discord-api-types/rest/v9/interactions.d.ts +4 -2
  157. package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -1
  158. package/node_modules/discord-api-types/rest/v9/user.d.ts +2 -2
  159. package/node_modules/discord-api-types/rest/v9/user.d.ts.map +1 -1
  160. package/node_modules/discord-api-types/v10.mjs +1 -0
  161. package/node_modules/discord-api-types/v9.mjs +1 -0
  162. package/node_modules/micromark/dev/lib/compile.d.ts.map +1 -1
  163. package/node_modules/micromark/dev/lib/compile.js +14 -4
  164. package/node_modules/micromark/dev/lib/create-tokenizer.d.ts.map +1 -1
  165. package/node_modules/micromark/dev/lib/create-tokenizer.js +7 -6
  166. package/node_modules/micromark/dev/lib/initialize/document.js +25 -21
  167. package/node_modules/micromark/dev/lib/initialize/text.d.ts.map +1 -1
  168. package/node_modules/micromark/dev/lib/initialize/text.js +10 -6
  169. package/node_modules/micromark/dev/lib/preprocess.d.ts.map +1 -1
  170. package/node_modules/micromark/dev/lib/preprocess.js +19 -21
  171. package/node_modules/micromark/lib/compile.d.ts.map +1 -1
  172. package/node_modules/micromark/lib/compile.js +37 -29
  173. package/node_modules/micromark/lib/create-tokenizer.d.ts.map +1 -1
  174. package/node_modules/micromark/lib/create-tokenizer.js +37 -35
  175. package/node_modules/micromark/lib/initialize/document.js +21 -13
  176. package/node_modules/micromark/lib/initialize/text.d.ts.map +1 -1
  177. package/node_modules/micromark/lib/initialize/text.js +7 -3
  178. package/node_modules/micromark/lib/preprocess.d.ts.map +1 -1
  179. package/node_modules/micromark/lib/preprocess.js +16 -19
  180. package/node_modules/micromark/package.json +2 -15
  181. package/node_modules/micromark-core-commonmark/dev/lib/attention.js +18 -24
  182. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.d.ts.map +1 -1
  183. package/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js +1 -43
  184. package/node_modules/micromark-core-commonmark/dev/lib/code-indented.js +19 -43
  185. package/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js +2 -6
  186. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.d.ts.map +1 -1
  187. package/node_modules/micromark-core-commonmark/dev/lib/html-flow.js +2 -53
  188. package/node_modules/micromark-core-commonmark/dev/lib/label-end.js +14 -12
  189. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.d.ts.map +1 -1
  190. package/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js +14 -5
  191. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.d.ts.map +1 -1
  192. package/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js +14 -5
  193. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts +4 -0
  194. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  195. package/node_modules/micromark-core-commonmark/dev/lib/partial-non-lazy-continuation.js +67 -0
  196. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.d.ts.map +1 -1
  197. package/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js +8 -5
  198. package/node_modules/micromark-core-commonmark/lib/attention.js +14 -24
  199. package/node_modules/micromark-core-commonmark/lib/code-fenced.d.ts.map +1 -1
  200. package/node_modules/micromark-core-commonmark/lib/code-fenced.js +1 -39
  201. package/node_modules/micromark-core-commonmark/lib/code-indented.js +11 -29
  202. package/node_modules/micromark-core-commonmark/lib/heading-atx.js +2 -6
  203. package/node_modules/micromark-core-commonmark/lib/html-flow.d.ts.map +1 -1
  204. package/node_modules/micromark-core-commonmark/lib/html-flow.js +2 -51
  205. package/node_modules/micromark-core-commonmark/lib/label-end.js +11 -10
  206. package/node_modules/micromark-core-commonmark/lib/label-start-image.d.ts.map +1 -1
  207. package/node_modules/micromark-core-commonmark/lib/label-start-image.js +11 -3
  208. package/node_modules/micromark-core-commonmark/lib/label-start-link.d.ts.map +1 -1
  209. package/node_modules/micromark-core-commonmark/lib/label-start-link.js +11 -3
  210. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts +4 -0
  211. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.d.ts.map +1 -0
  212. package/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.js +61 -0
  213. package/node_modules/micromark-core-commonmark/lib/setext-underline.d.ts.map +1 -1
  214. package/node_modules/micromark-core-commonmark/lib/setext-underline.js +7 -5
  215. package/node_modules/micromark-core-commonmark/package.json +4 -16
  216. package/node_modules/micromark-factory-space/dev/index.d.ts +24 -1
  217. package/node_modules/micromark-factory-space/dev/index.d.ts.map +1 -1
  218. package/node_modules/micromark-factory-space/dev/index.js +58 -3
  219. package/node_modules/micromark-factory-space/index.d.ts +24 -1
  220. package/node_modules/micromark-factory-space/index.d.ts.map +1 -1
  221. package/node_modules/micromark-factory-space/index.js +55 -3
  222. package/node_modules/micromark-factory-space/package.json +1 -10
  223. package/node_modules/micromark-factory-space/readme.md +25 -25
  224. package/node_modules/micromark-util-edit-map/dev/index.d.ts +78 -0
  225. package/node_modules/micromark-util-edit-map/dev/index.d.ts.map +1 -0
  226. package/node_modules/micromark-util-edit-map/dev/index.js +237 -0
  227. package/node_modules/micromark-util-edit-map/index.d.ts +78 -0
  228. package/node_modules/micromark-util-edit-map/index.d.ts.map +1 -0
  229. package/node_modules/micromark-util-edit-map/index.js +225 -0
  230. package/node_modules/micromark-util-edit-map/license +22 -0
  231. package/node_modules/micromark-util-edit-map/package.json +48 -0
  232. package/node_modules/micromark-util-edit-map/readme.md +234 -0
  233. package/node_modules/micromark-util-types/index.d.ts +6 -3
  234. package/node_modules/micromark-util-types/package.json +2 -36
  235. package/node_modules/ws/lib/websocket.js +17 -3
  236. package/node_modules/ws/package.json +1 -1
  237. package/openclaw.plugin.json +3 -6
  238. package/package.json +7 -12
  239. package/dist/.setup/account-inspect-DsER5ILV.mjs +0 -45
  240. package/dist/.setup/provider.runtime-CZ51OIgD.mjs +0 -2
  241. package/dist/.setup/resolve-allowlist-common-BUyU3C-T.mjs +0 -27
  242. package/dist/.setup/resolve-channels-DA6QlhZN.mjs +0 -246
  243. package/dist/.setup/security-contract-DSHk7I2w.mjs +0 -26
  244. package/dist/.setup/setup-plugin-api-BVlCz3fm.mjs +0 -3
  245. package/dist/.setup/targets-bqXQENmX.mjs +0 -3
  246. package/dist/control-ui/2afbdab1d3aa65a789d8a3eba666f4b1ec5df07073538fe30d6cf32093a1fb2d/index.js +0 -1
@@ -1,10 +1,10 @@
1
- import { s as resolveDefaultDiscordAccountId } from "./accounts-HE9-mj1L.mjs";
2
- import { t as inspectDiscordAccount } from "./account-inspect-DsER5ILV.mjs";
3
- import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-BoBnM5kM.mjs";
1
+ import { c as resolveDefaultDiscordAccountId } from "./accounts-ljrzXBJi.mjs";
2
+ import { t as inspectDiscordAccount } from "./account-inspect-8cCu6uPG.mjs";
3
+ import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-CestGDpq.mjs";
4
4
  import { t as runtime_doctor_migrations_exports } from "./runtime-doctor-migrations-BPV-R4G9.mjs";
5
- import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bg3NPAMw.mjs";
5
+ import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bwv8EuQ_.mjs";
6
6
  import { t as isDiscordMutableAllowEntry } from "./security-doctor-nGgPm65L.mjs";
7
- import { n as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-CaZQnGRH.mjs";
7
+ import { n as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-0qQYVu2H.mjs";
8
8
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
10
10
  //#region extensions/discord/src/doctor.ts
@@ -40,21 +40,18 @@ function collectDiscordIdLists(prefix, account, userAllowlistsOnly = false) {
40
40
  }
41
41
  function scanDiscordNumericIdEntries(cfg) {
42
42
  const hits = [];
43
- const scanList = (pathLabel, list) => {
44
- if (!Array.isArray(list)) return;
45
- for (const [index, entry] of list.entries()) {
46
- if (typeof entry !== "number") continue;
47
- hits.push({
48
- path: `${pathLabel}[${index}]`,
49
- entry,
50
- safe: Number.isSafeInteger(entry) && entry >= 0
51
- });
52
- }
53
- };
54
43
  for (const scope of (0, runtime_doctor_migrations_exports.collectChannelAccountScopes)({
55
44
  cfg,
56
45
  channelId: "discord"
57
- })) for (const ref of collectDiscordIdLists(scope.prefix, scope.account)) scanList(ref.pathLabel, ref.holder[ref.key]);
46
+ })) for (const ref of collectDiscordIdLists(scope.prefix, scope.account)) {
47
+ const list = ref.holder[ref.key];
48
+ if (!Array.isArray(list)) continue;
49
+ for (const [index, entry] of list.entries()) if (typeof entry === "number") hits.push({
50
+ path: `${ref.pathLabel}[${index}]`,
51
+ entry,
52
+ safe: Number.isSafeInteger(entry) && entry >= 0
53
+ });
54
+ }
58
55
  return hits;
59
56
  }
60
57
  function collectDiscordNumericIdWarnings(params) {
@@ -82,10 +79,12 @@ function maybeRepairDiscordNumericIds(cfg, doctorFixCommand) {
82
79
  };
83
80
  const next = structuredClone(cfg);
84
81
  const changes = [];
85
- const repairList = (pathLabel, holder, key) => {
82
+ for (const scope of (0, runtime_doctor_migrations_exports.collectChannelAccountScopes)({
83
+ cfg: next,
84
+ channelId: "discord"
85
+ })) for (const { pathLabel, holder, key } of collectDiscordIdLists(scope.prefix, scope.account)) {
86
86
  const raw = holder[key];
87
- if (!Array.isArray(raw)) return;
88
- if (raw.some((entry) => typeof entry === "number" && (!Number.isSafeInteger(entry) || entry < 0))) return;
87
+ if (!Array.isArray(raw) || raw.some((entry) => typeof entry === "number" && (!Number.isSafeInteger(entry) || entry < 0))) continue;
89
88
  let converted = 0;
90
89
  holder[key] = raw.map((entry) => {
91
90
  if (typeof entry === "number") {
@@ -95,24 +94,13 @@ function maybeRepairDiscordNumericIds(cfg, doctorFixCommand) {
95
94
  return entry;
96
95
  });
97
96
  if (converted > 0) changes.push(`- ${sanitizeForLog(pathLabel)}: converted ${converted} numeric ${converted === 1 ? "ID" : "IDs"} to strings`);
98
- };
99
- for (const scope of (0, runtime_doctor_migrations_exports.collectChannelAccountScopes)({
100
- cfg: next,
101
- channelId: "discord"
102
- })) for (const ref of collectDiscordIdLists(scope.prefix, scope.account)) repairList(ref.pathLabel, ref.holder, ref.key);
103
- if (changes.length === 0) return {
104
- config: cfg,
105
- changes: [],
106
- warnings: collectDiscordNumericIdWarnings({
107
- hits,
108
- doctorFixCommand
109
- })
110
- };
97
+ }
98
+ const repaired = changes.length > 0;
111
99
  return {
112
- config: next,
100
+ config: repaired ? next : cfg,
113
101
  changes,
114
102
  warnings: collectDiscordNumericIdWarnings({
115
- hits: hits.filter((hit) => !hit.safe),
103
+ hits: repaired ? hits.filter((hit) => !hit.safe) : hits,
116
104
  doctorFixCommand
117
105
  })
118
106
  };
@@ -148,20 +136,21 @@ function collectDiscordTranscriptsAutoStartWarnings(cfg) {
148
136
  }
149
137
  function collectDiscordMutableAllowlistWarnings(cfg) {
150
138
  const hits = [];
151
- const addHits = (pathLabel, list) => {
152
- if (!Array.isArray(list)) return;
153
- for (const entry of list) {
154
- const text = normalizeOptionalString(String(entry)) ?? "";
155
- if (!text || text === "*" || !isDiscordMutableAllowEntry(text)) continue;
156
- hits.push({
157
- path: pathLabel,
158
- entry: text
159
- });
160
- }
161
- };
162
139
  for (const scope of (0, runtime_doctor_migrations_exports.collectProviderDangerousNameMatchingScopes)(cfg, "discord")) {
163
140
  if (scope.dangerousNameMatchingEnabled) continue;
164
- for (const ref of collectDiscordIdLists(scope.prefix, scope.account, true)) addHits(ref.pathLabel, ref.holder[ref.key]);
141
+ for (const ref of collectDiscordIdLists(scope.prefix, scope.account, true)) {
142
+ const pathLabel = ref.pathLabel;
143
+ const list = ref.holder[ref.key];
144
+ if (!Array.isArray(list)) continue;
145
+ for (const entry of list) {
146
+ const text = normalizeOptionalString(String(entry)) ?? "";
147
+ if (!text || text === "*" || !isDiscordMutableAllowEntry(text)) continue;
148
+ hits.push({
149
+ path: pathLabel,
150
+ entry: text
151
+ });
152
+ }
153
+ }
165
154
  }
166
155
  if (hits.length === 0) return [];
167
156
  const exampleLines = hits.slice(0, 8).map((hit) => `- ${sanitizeForLog(hit.path)}: ${sanitizeForLog(hit.entry)}`);
@@ -11,7 +11,7 @@ const RETIRED_TUNING_KEYS = /* @__PURE__ */ new Set([
11
11
  const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
12
12
  channelId: "discord",
13
13
  streaming: {
14
- defaultMode: "off",
14
+ defaultMode: "progress",
15
15
  includePreviewChunk: true
16
16
  },
17
17
  accountStreamingReplacesRoot: true,
@@ -20,14 +20,11 @@ const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChan
20
20
  accounts: true
21
21
  }
22
22
  });
23
- function hasUnsupportedRealtimeWakeNamesInVoice(value) {
24
- const voice = (0, runtime_doctor_migrations_exports.asObjectRecord)(value);
23
+ function hasUnsupportedDiscordRealtimeWakeNames(value) {
24
+ const voice = (0, runtime_doctor_migrations_exports.asObjectRecord)((0, runtime_doctor_migrations_exports.asObjectRecord)(value)?.voice);
25
25
  const wakeNames = (0, runtime_doctor_migrations_exports.asObjectRecord)(voice?.realtime)?.wakeNames;
26
26
  return Array.isArray(wakeNames) ? wakeNames.length === 0 || wakeNames.some((wakeName) => typeof wakeName === "string" && !isSupportedRealtimeVoiceActivationName(wakeName)) : false;
27
27
  }
28
- function hasUnsupportedDiscordRealtimeWakeNames(value) {
29
- return hasUnsupportedRealtimeWakeNamesInVoice((0, runtime_doctor_migrations_exports.asObjectRecord)(value)?.voice);
30
- }
31
28
  function normalizeUnsupportedRealtimeWakeNames(entry, pathPrefix, changes) {
32
29
  const voice = (0, runtime_doctor_migrations_exports.asObjectRecord)(entry.voice);
33
30
  const realtime = (0, runtime_doctor_migrations_exports.asObjectRecord)(voice?.realtime);
@@ -104,21 +101,15 @@ function normalizeCompatibilityConfig({ cfg }) {
104
101
  config: cfg,
105
102
  changes: []
106
103
  };
107
- let updated = rawEntry;
108
- let changed = tuningKnobs.config !== cfg;
109
104
  if (tuningKnobs.changed) changes.push("Removed retired Discord tuning knobs.");
110
105
  const accounts = (0, runtime_doctor_migrations_exports.normalizeChannelAccounts)({
111
- entry: updated,
106
+ entry: rawEntry,
112
107
  pathPrefix: "channels.discord",
113
108
  changes,
114
109
  normalizeAccount: ({ account, pathPrefix, changes: accountChanges }) => normalizeUnsupportedRealtimeWakeNames(account, pathPrefix, accountChanges)
115
110
  });
116
- updated = accounts.entry;
117
- changed = changed || accounts.changed;
118
- const normalizedWakeNames = normalizeUnsupportedRealtimeWakeNames(updated, "channels.discord", changes);
119
- updated = normalizedWakeNames.entry;
120
- changed = changed || normalizedWakeNames.changed;
121
- if (!changed) return {
111
+ const normalizedWakeNames = normalizeUnsupportedRealtimeWakeNames(accounts.entry, "channels.discord", changes);
112
+ if (tuningKnobs.config === cfg && !accounts.changed && !normalizedWakeNames.changed) return {
122
113
  config: cfg,
123
114
  changes: []
124
115
  };
@@ -127,7 +118,7 @@ function normalizeCompatibilityConfig({ cfg }) {
127
118
  ...tuningKnobs.config,
128
119
  channels: {
129
120
  ...tuningKnobs.config.channels,
130
- discord: updated
121
+ discord: normalizedWakeNames.entry
131
122
  }
132
123
  },
133
124
  changes
@@ -1,11 +1,12 @@
1
- import { C as withDiscordRequestAuthority } from "./discord-9gysrhzp.mjs";
2
- import { m as resolveDiscordChannelId, p as parseDiscordTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-DVOg2Oaw.mjs";
3
- import "./targets-bqXQENmX.mjs";
4
- import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-CESTexGn.mjs";
5
- import { i as buildDiscordPresentationComponents, m as coerceDiscordComponentParam, r as buildDiscordInteractiveComponents } from "./components-DLJR0xU-.mjs";
1
+ import { W as withDiscordRequestAuthority } from "./discord-BGqgx-yd.mjs";
2
+ import { u as matchesDiscordToolContextTarget } from "./send.receipt-BAlzXd8e.mjs";
3
+ import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
4
+ import "./targets-DZJjkzwv.mjs";
5
+ import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-CRTkKU1G.mjs";
6
+ import { i as buildDiscordPresentationComponents, m as coerceDiscordComponentParam, r as buildDiscordInteractiveComponents } from "./components-HN9052L1.mjs";
6
7
  import "../action-runtime-api.js";
7
- import { b as discordInboundEventDelivery, i as isDiscordComponentSpecWithinMessageLimit, n as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-session-route-BvBH4LC6.mjs";
8
- import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CB4sc9VV.mjs";
8
+ import { b as discordInboundEventDelivery, i as isDiscordComponentSpecWithinMessageLimit, n as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-session-route-B0Hpwn3Q.mjs";
9
+ import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CHKW6PIs.mjs";
9
10
  import { n as notifyDiscordActiveTurnThreadCreated, r as notifyDiscordActiveTurnThreadReplyDelivered } from "./active-turn-thread-route-C4tp9noA.mjs";
10
11
  import { asOptionalRecord, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
11
12
  import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
@@ -14,16 +15,6 @@ import { adaptMessagePresentationForChannel, normalizeLegacyInteractiveReply, no
14
15
  import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringArrayParam as readStringArrayParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/agent-runtime";
15
16
  //#region extensions/discord/src/actions/handle-action.ts
16
17
  const providerId = "discord";
17
- function withCurrentSourceReplyRoute(result) {
18
- const details = asOptionalRecord(result.details) ?? {};
19
- return {
20
- ...result,
21
- details: {
22
- ...details,
23
- sourceReplyRoute: "current-source"
24
- }
25
- };
26
- }
27
18
  function readCurrentDiscordTarget(toolContext) {
28
19
  const provider = toolContext?.currentChannelProvider?.trim().toLowerCase();
29
20
  if (provider && provider !== providerId) return;
@@ -59,17 +50,16 @@ async function dispatchDiscordMessageAction(ctx) {
59
50
  accountId,
60
51
  ...payload
61
52
  }, cfg, actionOptions);
62
- const notifyVisibleOutbound = (result, to, fallbackSessionKey) => {
63
- if (asOptionalRecord(result.details)?.ok !== true) return;
53
+ const completeOutbound = (result, to, fallbackSessionKey) => {
54
+ const details = asOptionalRecord(result.details);
55
+ if (details?.ok !== true) return result;
64
56
  discordInboundEventDelivery.notify({
65
57
  sessionKey: ctx.sessionKey ?? fallbackSessionKey ?? void 0,
66
58
  to,
67
59
  accountId,
68
60
  inboundEventKind: ctx.inboundEventKind
69
61
  });
70
- };
71
- const withAdoptedThreadReplyRoute = (result, to, fallbackSessionKey) => {
72
- if (asOptionalRecord(result.details)?.ok !== true) return result;
62
+ if (action !== "send" && action !== "upload-file" && action !== "thread-reply") return result;
73
63
  let target;
74
64
  try {
75
65
  target = parseDiscordTarget(to, { defaultKind: "channel" });
@@ -80,7 +70,13 @@ async function dispatchDiscordMessageAction(ctx) {
80
70
  sessionKey: ctx.sessionKey ?? fallbackSessionKey,
81
71
  accountId,
82
72
  threadId: target.id
83
- })) return withCurrentSourceReplyRoute(result);
73
+ })) return {
74
+ ...result,
75
+ details: {
76
+ ...details,
77
+ sourceReplyRoute: "current-source"
78
+ }
79
+ };
84
80
  return result;
85
81
  };
86
82
  const readTarget = ([firstKey, secondKey] = ["channelId", "to"]) => {
@@ -136,7 +132,7 @@ async function dispatchDiscordMessageAction(ctx) {
136
132
  const sessionKey = readStringParam$1(params, "__sessionKey");
137
133
  const agentId = readStringParam$1(params, "__agentId");
138
134
  const threadName = action === "send" ? readStringParam$1(params, "threadName") : void 0;
139
- const result = await runAction({
135
+ return completeOutbound(await runAction({
140
136
  action: "sendMessage",
141
137
  to,
142
138
  content: deliveryContent,
@@ -153,9 +149,7 @@ async function dispatchDiscordMessageAction(ctx) {
153
149
  ...suppressEmbeds === void 0 ? {} : { suppressEmbeds },
154
150
  __sessionKey: sessionKey ?? void 0,
155
151
  __agentId: agentId ?? void 0
156
- });
157
- notifyVisibleOutbound(result, to, sessionKey);
158
- return withAdoptedThreadReplyRoute(result, to, sessionKey);
152
+ }), to, sessionKey);
159
153
  }
160
154
  if (action === "react") {
161
155
  const messageIdRaw = resolveReactionMessageId({
@@ -248,12 +242,11 @@ async function dispatchDiscordMessageAction(ctx) {
248
242
  threadId
249
243
  });
250
244
  }
251
- notifyVisibleOutbound(result, resolveChannelId());
252
- return result;
245
+ return completeOutbound(result, resolveChannelId());
253
246
  }
254
247
  if (action === "sticker") {
255
248
  const to = readStringParam$1(params, "to", { required: true });
256
- const result = await runAction({
249
+ return completeOutbound(await runAction({
257
250
  action: "sticker",
258
251
  to,
259
252
  stickerIds: readStringArrayParam$1(params, "stickerId", {
@@ -262,9 +255,7 @@ async function dispatchDiscordMessageAction(ctx) {
262
255
  }) ?? [],
263
256
  content: readStringParam$1(params, "message", { trim: false }),
264
257
  ...readBooleanParam(params, "silent") === true ? { silent: true } : {}
265
- });
266
- notifyVisibleOutbound(result, to);
267
- return result;
258
+ }), to);
268
259
  }
269
260
  if (action === "set-presence") return await runAction({
270
261
  action: "setPresence",
@@ -281,11 +272,7 @@ async function dispatchDiscordMessageAction(ctx) {
281
272
  actionOptions
282
273
  });
283
274
  if (adminResult !== void 0) {
284
- if (action === "thread-reply") {
285
- const threadId = readStringParam$1(params, "threadId") ?? readTarget();
286
- notifyVisibleOutbound(adminResult, threadId);
287
- return withAdoptedThreadReplyRoute(adminResult, threadId);
288
- }
275
+ if (action === "thread-reply") return completeOutbound(adminResult, readStringParam$1(params, "threadId") ?? readTarget());
289
276
  return adminResult;
290
277
  }
291
278
  throw new Error(`Action ${action} is not supported for provider ${providerId}.`);
@@ -1,6 +1,6 @@
1
- import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-CESTexGn.mjs";
1
+ import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-CRTkKU1G.mjs";
2
2
  import "../action-runtime-api.js";
3
- import { y as isTrustedRequesterGuildAdminAction } from "./outbound-session-route-BvBH4LC6.mjs";
3
+ import { y as isTrustedRequesterGuildAdminAction } from "./outbound-session-route-B0Hpwn3Q.mjs";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
6
6
  import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/param-readers";
@@ -55,14 +55,12 @@ function readDiscordRequesterSenderId(ctx) {
55
55
  }
56
56
  if (isTrustedRequesterGuildAdminAction(ctx.action) && (currentProvider || ctx.senderIsOwner !== true)) throw new Error("Discord guild admin actions require a trusted Discord sender identity." + (ctx.action === "channel-edit" && !currentProvider ? " Recreate an automation without recorded execution authorization from a fresh authenticated Discord turn that can manage automations." : ""));
57
57
  }
58
- function senderParam(senderUserId) {
59
- return senderUserId ? { senderUserId } : {};
60
- }
61
58
  async function tryHandleDiscordMessageActionGuildAdmin(params) {
62
59
  const { ctx, resolveChannelId, readPolicyOptions, actionOptions } = params;
63
60
  const { action, params: actionParams, cfg } = ctx;
64
61
  const accountId = ctx.accountId ?? readStringParam(actionParams, "accountId");
65
62
  const senderUserId = readDiscordRequesterSenderId(ctx);
63
+ const sender = senderUserId ? { senderUserId } : {};
66
64
  const runAction = (runtimeAction, values, options) => handleDiscordAction({
67
65
  action: runtimeAction,
68
66
  accountId: accountId ?? void 0,
@@ -81,43 +79,39 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
81
79
  ...limit ? { limit } : {}
82
80
  }, readPolicyOptions);
83
81
  }
84
- if (action === "emoji-upload") return await runAction("emojiUpload", {
85
- guildId: readStringParam(actionParams, "guildId", { required: true }),
86
- name: readStringParam(actionParams, "emojiName", { required: true }),
87
- mediaUrl: readStringParam(actionParams, "media", {
88
- required: true,
89
- trim: false
90
- }),
91
- roleIds: readStringArrayParam(actionParams, "roleIds"),
92
- ...senderParam(senderUserId)
93
- }, actionOptions);
94
- if (action === "sticker-upload") return await runAction("stickerUpload", {
95
- guildId: readStringParam(actionParams, "guildId", { required: true }),
96
- name: readStringParam(actionParams, "stickerName", { required: true }),
97
- description: readStringParam(actionParams, "stickerDesc", { required: true }),
98
- tags: readStringParam(actionParams, "stickerTags", { required: true }),
99
- mediaUrl: readStringParam(actionParams, "media", {
100
- required: true,
101
- trim: false
102
- }),
103
- ...senderParam(senderUserId)
104
- }, actionOptions);
82
+ if (action === "emoji-upload" || action === "sticker-upload") {
83
+ const emoji = action === "emoji-upload";
84
+ return await runAction(emoji ? "emojiUpload" : "stickerUpload", {
85
+ guildId: readStringParam(actionParams, "guildId", { required: true }),
86
+ name: readStringParam(actionParams, emoji ? "emojiName" : "stickerName", { required: true }),
87
+ ...emoji ? {} : {
88
+ description: readStringParam(actionParams, "stickerDesc", { required: true }),
89
+ tags: readStringParam(actionParams, "stickerTags", { required: true })
90
+ },
91
+ mediaUrl: readStringParam(actionParams, "media", {
92
+ required: true,
93
+ trim: false
94
+ }),
95
+ ...emoji ? { roleIds: readStringArrayParam(actionParams, "roleIds") } : {},
96
+ ...sender
97
+ }, actionOptions);
98
+ }
105
99
  if (action === "role-add" || action === "role-remove") return await runAction(action === "role-add" ? "roleAdd" : "roleRemove", {
106
100
  guildId: readStringParam(actionParams, "guildId", { required: true }),
107
101
  userId: readStringParam(actionParams, "userId", { required: true }),
108
102
  roleId: readStringParam(actionParams, "roleId", { required: true }),
109
- ...senderParam(senderUserId)
103
+ ...sender
110
104
  });
111
105
  if (action === "channel-create" || action === "channel-edit" || action === "channel-move") {
112
106
  const mutation = channelMutation[action];
113
107
  return await runAction(mutation.action, {
114
108
  ...mutation.read(actionParams),
115
- ...senderParam(senderUserId)
109
+ ...sender
116
110
  });
117
111
  }
118
112
  if (action === "channel-delete") return await runAction("channelDelete", {
119
113
  channelId: readStringParam(actionParams, "channelId", { required: true }),
120
- ...senderParam(senderUserId)
114
+ ...sender
121
115
  });
122
116
  if (action === "category-create" || action === "category-edit" || action === "category-delete") {
123
117
  const creating = action === "category-create";
@@ -129,7 +123,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
129
123
  return await runAction(creating ? "categoryCreate" : action === "category-edit" ? "categoryEdit" : "categoryDelete", {
130
124
  ...creating ? { guildId: categoryId } : { categoryId },
131
125
  ...fields,
132
- ...senderParam(senderUserId)
126
+ ...sender
133
127
  });
134
128
  }
135
129
  if (action === "event-create") return await runAction("eventCreate", {
@@ -142,7 +136,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
142
136
  location: readStringParam(actionParams, "location"),
143
137
  entityType: readStringParam(actionParams, "eventType"),
144
138
  image: readStringParam(actionParams, "image", { trim: false }),
145
- ...senderParam(senderUserId)
139
+ ...sender
146
140
  }, actionOptions);
147
141
  if (isDiscordModerationAction(action)) {
148
142
  const moderation = readDiscordModerationCommand(action, {
@@ -1,4 +1,4 @@
1
- import { i as normalizeDiscordAllowList } from "./allow-list-vxkG9_JD.mjs";
1
+ import { i as normalizeDiscordAllowList } from "./allow-list-B_ToXtew.mjs";
2
2
  import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
3
3
  //#region extensions/discord/src/monitor/ingress-identity.ts
4
4
  const DISCORD_ALLOW_LIST_PREFIXES = [
@@ -1,7 +1,7 @@
1
- import { D as getDiscordEndpointRuntime, k as resolveDiscordEndpointMediaGuard } from "./allow-list-vxkG9_JD.mjs";
1
+ import { D as getDiscordEndpointRuntime, k as resolveDiscordEndpointMediaGuard } from "./allow-list-B_ToXtew.mjs";
2
2
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
3
- import { D as createDiscordLivePolicyReader, O as mapGatewayDispatchData } from "./provider-YP8gN9_o.mjs";
4
- import { A as resolveDiscordMessageChannelId, O as resolveDiscordReferencedReplyMessageId, T as hasDiscordMessageStickers, w as resolveDiscordCdnPolicy, y as resolveDiscordMessageText } from "./transcripts-source-CaZQnGRH.mjs";
3
+ import { D as createDiscordLivePolicyReader, O as mapGatewayDispatchData } from "./provider-D9EzOfG8.mjs";
4
+ import { E as hasDiscordMessageStickers, T as resolveDiscordCdnPolicy, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, k as resolveDiscordReferencedReplyMessageId } from "./transcripts-source-0qQYVu2H.mjs";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { danger } from "openclaw/plugin-sdk/runtime-env";
@@ -13,6 +13,7 @@ import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
13
13
  import { logDebug } from "openclaw/plugin-sdk/logging-core";
14
14
  import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, createChannelIngressError, createChannelIngressMonitor, createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
15
15
  import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
16
+ import { createDeferred } from "openclaw/plugin-sdk/concurrency-runtime";
16
17
  import { createChannelInboundDebouncer, resolveInboundDebounceMs, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
17
18
  //#region extensions/discord/src/monitor/ingress.ts
18
19
  const DISCORD_INGRESS_PAYLOAD_VERSION = 1;
@@ -194,7 +195,7 @@ function createDiscordAvatarResolver() {
194
195
  }
195
196
  //#endregion
196
197
  //#region extensions/discord/src/monitor/message-run-queue.ts
197
- const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-TKoqcqIP.mjs"));
198
+ const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-ClgWYH6o.mjs"));
198
199
  async function processDiscordQueuedMessage(params) {
199
200
  const abortSignal = params.job.context.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.context.abortSignal, params.lifecycleSignal]) : params.job.context.abortSignal ?? params.lifecycleSignal;
200
201
  try {
@@ -234,10 +235,7 @@ function createDiscordMessageRunQueue(params) {
234
235
  else params.abortSignal?.addEventListener("abort", onAbort, { once: true });
235
236
  return {
236
237
  enqueue(job) {
237
- let resolvePending;
238
- const pending = new Promise((resolve) => {
239
- resolvePending = resolve;
240
- });
238
+ const { promise: pending, resolve: resolvePending } = createDeferred();
241
239
  pendingTasks.add(pending);
242
240
  const settlePending = () => {
243
241
  pendingTasks.delete(pending);
@@ -281,7 +279,7 @@ function createDiscordMessageRunQueue(params) {
281
279
  }
282
280
  //#endregion
283
281
  //#region extensions/discord/src/monitor/message-dispatcher.ts
284
- const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-DFpsh90H.mjs"));
282
+ const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-C7YuSRl_.mjs"));
285
283
  function createDiscordMessageDispatcher(params) {
286
284
  const readPolicy = params.readPolicy ?? createDiscordLivePolicyReader({
287
285
  ...params,
@@ -436,8 +434,7 @@ function createDiscordMessageDispatcher(params) {
436
434
  pendingDebounceEntries.add(entry);
437
435
  }
438
436
  await debouncer.enqueue(entry);
439
- if (options?.turnAdoptionLifecycle) return { kind: "deferred" };
440
- return { kind: "completed" };
437
+ return { kind: options?.turnAdoptionLifecycle ? "deferred" : "completed" };
441
438
  } catch (err) {
442
439
  params.runtime.error(danger(`handler failed: ${String(err)}`));
443
440
  if (options?.turnAdoptionLifecycle) throw err;
@@ -464,9 +461,7 @@ function createDiscordMessageDispatcher(params) {
464
461
  function createDiscordMessageHandler(params) {
465
462
  const dispatcher = createDiscordMessageDispatcher(params);
466
463
  const ingress = (params.testing?.createIngressMonitor ?? createDiscordIngressMonitor)({
467
- accountId: params.accountId,
468
- client: params.client,
469
- runtime: params.runtime,
464
+ ...params,
470
465
  dispatch: (event, lifecycle) => dispatcher(event, params.client, {
471
466
  abortSignal: lifecycle.abortSignal,
472
467
  turnAdoptionLifecycle: lifecycle