@openclaw/discord 2026.8.1-beta.3 → 2026.8.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 (290) hide show
  1. package/dist/account-inspect-BY-ve3yH.js +45 -0
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-DNl-oCEw.js → accounts-CwJQoLjM.js} +87 -162
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{activities-api-KCBAmWxD.js → activities-api-CkKcHUB6.js} +14 -12
  6. package/dist/activities-api.js +1 -1
  7. package/dist/{allow-list-BDMimASD.js → allow-list-C2JuH-R0.js} +10 -6
  8. package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
  9. package/dist/api.js +18 -18
  10. package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-DZM6Kt1Z.js} +30 -106
  11. package/dist/{audit-Yc7eZDd6.js → audit-DIbQA4VT.js} +8 -7
  12. package/dist/{channel-cXYzGc4L.js → channel-CarzU3bg.js} +25 -25
  13. package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-B2wMqeVK.js} +60 -57
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/channel-type-CVLZyGYS.js +7 -0
  17. package/dist/{channel.setup-CSiwnMgs.js → channel.setup-z_ewMVa9.js} +18 -18
  18. package/dist/{components-ezGKo_Yh.js → components-gvRA0oaI.js} +33 -29
  19. package/dist/{config-schema-DC5kDtQ5.js → config-schema-B797-Spt.js} +21 -14
  20. package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DPpBRpYI.js} +1 -1
  21. package/dist/{directory-config-XyCfoqLg.js → directory-config-AA8wQx0D.js} +2 -2
  22. package/dist/directory-contract-api.js +1 -1
  23. package/dist/{directory-live-Df0NbFJB.js → directory-live-D_kFz_Fj.js} +4 -4
  24. package/dist/{doctor-DYY31GrO.js → doctor-QQTOkBfW.js} +5 -5
  25. package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
  26. package/dist/doctor-contract-api.js +4 -3
  27. package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-Cc88ZGon.js} +9 -5
  28. package/dist/index.js +1 -1
  29. package/dist/ingress-identity-BCzfPPYM.js +60 -0
  30. package/dist/{message-handler-B61q5MOF.js → message-handler-CAeEpqWo.js} +14 -10
  31. package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-CoKoE3dY.js} +32 -91
  32. package/dist/{message-handler.process--4_712Ec.js → message-handler.process-cdIJ_fDT.js} +99 -123
  33. package/dist/{message-utils-BXLLnFl6.js → message-text-C0K4-fkg.js} +41 -34
  34. package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-Ch0At5Ra.js} +85 -78
  35. package/dist/{outbound-components-B2PL0ooH.js → outbound-components-Bnt_7x7r.js} +5 -4
  36. package/dist/outbound-session-route-CzzerX2K.js +668 -0
  37. package/dist/{owner-access-Bg41VzAf.js → owner-access-yc1sX7Gx.js} +7 -6
  38. package/dist/{pluralkit-dUl4v1X3.js → pluralkit-B3cUVI7i.js} +2 -2
  39. package/dist/{probe-BTdtVRwU.js → probe-3ovFAp3b.js} +3 -3
  40. package/dist/{probe.runtime-Dq5-PRKT.js → probe.runtime-BckHn3cJ.js} +1 -1
  41. package/dist/{provider-DlK_ynqt.js → provider-CjI8BSzS.js} +511 -342
  42. package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-DdKRMcE9.js} +3 -3
  43. package/dist/provider.runtime-Bo1WbLLr.js +2 -0
  44. package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-37IC-p5K.js} +110 -126
  45. package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BJ5UZNNT.js} +3 -3
  46. package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-BexR2eUn.js} +6 -5
  47. package/dist/{resolve-users-BtKxLUZv.js → resolve-users-BtXBCH5W.js} +5 -4
  48. package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
  49. package/dist/{retry-DNsVTeTo.js → retry-t5RcEsPk.js} +237 -15
  50. package/dist/{runtime-CQovMsH3.js → runtime-BNlDfLwS.js} +2 -2
  51. package/dist/{runtime-D71_VFLr.js → runtime-DydyfxST.js} +182 -131
  52. package/dist/runtime-api.js +19 -26
  53. package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
  54. package/dist/secret-contract-api.js +1 -1
  55. package/dist/{security-audit-BfJhAXZp.js → security-audit-DKfK-iPY.js} +10 -11
  56. package/dist/security-audit-contract-api.js +1 -1
  57. package/dist/{security-audit.runtime-BVKF9VtY.js → security-audit.runtime-sKZyKgpx.js} +1 -1
  58. package/dist/{send-rQIffSYu.js → send-mTKSBdmZ.js} +149 -58
  59. package/dist/{send.components-ChK1wS7w.js → send.components-nsPnc7kK.js} +29 -30
  60. package/dist/{send.outbound-HIkgji_7.js → send.outbound-CaOs9Zy1.js} +87 -84
  61. package/dist/{send.shared-B3fpaLWJ.js → send.shared-BJHt0Vyf.js} +55 -33
  62. package/dist/{sender-identity-BJtfyise.js → sender-identity-Dt0imZyY.js} +1 -1
  63. package/dist/setup-plugin-api.js +1 -1
  64. package/dist/{shared-CaAaoksy.js → shared-BNesVA4P.js} +43 -18
  65. package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-IeZVPLGj.js} +2 -2
  66. package/dist/subagent-hooks-api.js +1 -6
  67. package/dist/{system-events-Nuwoq_au.js → system-events-Be5EJI3b.js} +2 -2
  68. package/dist/{target-resolver-DIXShHaZ.js → target-resolver-C0MnwEki.js} +6 -5
  69. package/dist/targets-DQSye1Rv.js +3 -0
  70. package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-wECUSIIG.js} +6 -6
  71. package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-B-3UHCc1.js} +31 -32
  72. package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-CC7HoQvt.js} +2 -1
  73. package/dist/{threading-DU6pgeGm.js → threading-te5ADPQI.js} +51 -27
  74. package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
  75. package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-DkUhR7YK.js} +9 -4
  76. package/dist/transcripts-source-api.js +1 -1
  77. package/dist/{typing-oLiS5Z13.js → typing-DAwJF5VT.js} +2 -2
  78. package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-COyYYTDD.js} +418 -74
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
  80. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
  81. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
  82. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
  83. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
  84. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
  85. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
  86. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
  87. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
  88. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
  89. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
  90. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
  96. package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
  97. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
  98. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
  99. package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
  100. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  101. package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
  102. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
  103. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
  104. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
  105. package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
  106. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
  107. package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
  108. package/node_modules/discord-api-types/CHANGELOG.md +8 -0
  109. package/node_modules/discord-api-types/package.json +4 -4
  110. package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
  111. package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
  113. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
  114. package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
  115. package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
  116. package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
  117. package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
  118. package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
  119. package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
  120. package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
  121. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
  122. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
  123. package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
  124. package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
  125. package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
  126. package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
  127. package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
  128. package/node_modules/typebox/build/format/date.d.mts +1 -1
  129. package/node_modules/typebox/build/format/date.mjs +1 -1
  130. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  131. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  132. package/node_modules/typebox/build/format/email.d.mts +1 -1
  133. package/node_modules/typebox/build/format/email.mjs +2 -2
  134. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  135. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  136. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  137. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  138. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  139. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  140. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  141. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  142. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  143. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  144. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  145. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  146. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
  147. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  148. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  149. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  150. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  151. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  152. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  153. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  154. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  155. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  156. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  157. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  158. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  159. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  160. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  161. package/node_modules/typebox/build/format/iri.mjs +26 -8
  162. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  163. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  164. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  165. package/node_modules/typebox/build/format/regex.mjs +2 -6
  166. package/node_modules/typebox/build/format/time.d.mts +2 -2
  167. package/node_modules/typebox/build/format/time.mjs +19 -14
  168. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  169. package/node_modules/typebox/build/format/uri.mjs +3 -130
  170. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  171. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  172. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  173. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  174. package/node_modules/typebox/build/format/url.d.mts +3 -3
  175. package/node_modules/typebox/build/format/url.mjs +4 -5
  176. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  177. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  178. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  179. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  180. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  181. package/node_modules/typebox/build/guard/string.mjs +7 -7
  182. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  183. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  184. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  185. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  186. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  187. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  188. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  189. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  190. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  191. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  192. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  193. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  194. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  195. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  196. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  197. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  198. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  199. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  200. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  201. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  202. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  203. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  204. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  205. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  206. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  207. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  208. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  209. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  210. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  211. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  212. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  213. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  214. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  215. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  216. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  217. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  218. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  219. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  220. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  221. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  222. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  223. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  224. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  225. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  226. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  227. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  228. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  229. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  230. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  231. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  232. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  233. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  234. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  235. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  236. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  237. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  238. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  239. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  240. package/node_modules/typebox/package.json +27 -27
  241. package/node_modules/typebox/readme.md +79 -82
  242. package/node_modules/undici/docs/docs/api/Client.md +21 -8
  243. package/node_modules/undici/lib/api/readable.js +33 -43
  244. package/node_modules/undici/lib/core/connect.js +16 -2
  245. package/node_modules/undici/lib/core/symbols.js +1 -0
  246. package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
  247. package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
  248. package/node_modules/undici/lib/dispatcher/client.js +74 -29
  249. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
  250. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
  251. package/node_modules/undici/lib/handler/retry-handler.js +7 -2
  252. package/node_modules/undici/lib/interceptor/cache.js +5 -2
  253. package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
  254. package/node_modules/undici/lib/mock/mock-utils.js +213 -24
  255. package/node_modules/undici/lib/util/cache.js +2 -4
  256. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  257. package/node_modules/undici/package.json +1 -1
  258. package/node_modules/undici/types/client.d.ts +40 -0
  259. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  260. package/node_modules/ws/package.json +1 -1
  261. package/openclaw.plugin.json +14 -6
  262. package/package.json +8 -8
  263. package/skills/discord/SKILL.md +1 -1
  264. package/dist/account-inspect-D5xmUpnj.js +0 -89
  265. package/dist/approval-message-safety-XGFPbDoI.js +0 -226
  266. package/dist/audit-core-BCX8UeFH.js +0 -105
  267. package/dist/channel-actions-Dr2QI8Bf.js +0 -212
  268. package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
  269. package/dist/provider.runtime-CzKGRiAF.js +0 -2
  270. package/dist/runtime-api.actions.js +0 -3
  271. package/dist/runtime-api.lookup.js +0 -7
  272. package/dist/runtime-api.monitor-CzeTYF32.js +0 -6
  273. package/dist/runtime-api.monitor.js +0 -9
  274. package/dist/runtime-api.send.js +0 -7
  275. package/dist/runtime-api.threads.js +0 -5
  276. package/dist/sdk-runtime-37OU6_Yh.js +0 -369
  277. package/dist/send.reactions-gmJ6yFPo.js +0 -78
  278. package/dist/send.receipt-Cnhoautb.js +0 -76
  279. package/dist/subagent-progress-FPLqBY1s.js +0 -110
  280. package/dist/targets-B2pf49zc.js +0 -3
  281. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  282. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  283. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  284. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  285. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  286. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  287. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  288. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  289. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  290. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
@@ -1,30 +1,23 @@
1
- import { O as resolveDiscordOutboundSessionRoute } from "./accounts-DNl-oCEw.js";
2
- import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-ChK1wS7w.js";
1
+ import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-nsPnc7kK.js";
3
2
  import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
4
- import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-Df0NbFJB.js";
5
- import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-BDMimASD.js";
6
- import { C as hasAllGuildPermissionsDiscord, G as registerGateway, K as unregisterGateway, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, U as clearGateways, W as getGateway, _ as DiscordSendError, x as fetchChannelPermissionsDiscord } from "./send.shared-B3fpaLWJ.js";
7
- import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
3
+ import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-D_kFz_Fj.js";
4
+ import { _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as resolveGroupDmAllow, y as shouldEmitDiscordReactionNotification } from "./allow-list-C2JuH-R0.js";
5
+ import { C as hasAllGuildPermissionsDiscord, G as unregisterGateway, H as clearGateways, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, U as getGateway, W as registerGateway, _ as DiscordSendError, x as fetchChannelPermissionsDiscord } from "./send.shared-BJHt0Vyf.js";
6
+ import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-CaOs9Zy1.js";
8
7
  import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
9
- import { A as listGuildEmojisDiscord, C as fetchVoiceStatusDiscord, D as removeRoleDiscord, E as listScheduledEventsDiscord, F as editChannelDiscord, I as moveChannelDiscord, L as removeChannelPermissionDiscord, M as uploadStickerDiscord, N as createChannelDiscord, O as resolveEventCoverImage, P as deleteChannelDiscord, R as setChannelPermissionDiscord, S as fetchRoleInfoDiscord, T as listGuildChannelsDiscord, _ as banMemberDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, i as sendWebhookMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, n as sendTypingDiscord, o as createThreadDiscord, p as readMessagesDiscord, r as sendVoiceMessageDiscord, s as deleteMessageDiscord, u as listPinsDiscord, v as createScheduledEventDiscord, w as kickMemberDiscord, x as fetchMemberInfoDiscord, y as fetchChannelInfoDiscord } from "./send-rQIffSYu.js";
10
- import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
11
- import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
12
- import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-D71_VFLr.js";
13
- import { t as discordMessageActions } from "./channel-actions-Dr2QI8Bf.js";
8
+ import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-mTKSBdmZ.js";
9
+ import { a as isAbortError, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, l as runDiscordTaskWithTimeout, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as normalizeDiscordInboundWorkerTimeoutMs, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordListenerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
10
+ import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-DydyfxST.js";
11
+ import { p as discordMessageActions, t as resolveDiscordOutboundSessionRoute } from "./outbound-session-route-CzzerX2K.js";
14
12
  import { C as resolveThreadBindingMaxAgeExpiresAt, S as resolveThreadBindingInactivityExpiresAt, w as resolveThreadBindingMaxAgeMs, x as resolveThreadBindingIdleTimeoutMs } from "./thread-bindings.state-D8OMdk4O.js";
15
- import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CJb-BpPL.js";
16
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CGeUoIqb.js";
17
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtKxLUZv.js";
18
- import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CngsgErq.js";
19
- import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-VlymUnbz.js";
20
- import { i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BTdtVRwU.js";
21
- import "./runtime-api.actions.js";
22
- import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-Yc7eZDd6.js";
23
- import "./runtime-api.lookup.js";
24
- import { d as waitForDiscordGatewayPluginRegistration, f as createDiscordNativeCommand, l as createDiscordGatewayPlugin, t as monitorDiscordProvider, u as resolveDiscordGatewayIntents, v as registerDiscordListener } from "./provider-DlK_ynqt.js";
25
- import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-DU6pgeGm.js";
26
- import { t as createDiscordMessageHandler } from "./message-handler-B61q5MOF.js";
27
- import "./runtime-api.monitor-CzeTYF32.js";
28
- import "./runtime-api.send.js";
29
- import "./runtime-api.threads.js";
13
+ import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CC7HoQvt.js";
14
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-BexR2eUn.js";
15
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtXBCH5W.js";
16
+ import { _ as resolveThreadBindingThreadName, g as resolveThreadBindingIntroText, h as formatThreadBindingDurationLabel, m as resolveThreadBindingPersonaFromRecord, n as createThreadBindingManager, p as resolveThreadBindingPersona, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-B-3UHCc1.js";
17
+ import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-wECUSIIG.js";
18
+ import { i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-3ovFAp3b.js";
19
+ import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-DIbQA4VT.js";
20
+ import { d as resolveDiscordGatewayIntents, f as waitForDiscordGatewayPluginRegistration, p as createDiscordNativeCommand, t as monitorDiscordProvider, u as createDiscordGatewayPlugin, y as registerDiscordListener } from "./provider-CjI8BSzS.js";
21
+ import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-te5ADPQI.js";
22
+ import { t as createDiscordMessageHandler } from "./message-handler-CAeEpqWo.js";
30
23
  export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
@@ -3,7 +3,7 @@ import { collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignme
3
3
  import { collectNestedChannelTtsAssignments } from "openclaw/plugin-sdk/channel-secret-tts-runtime";
4
4
  //#region extensions/discord/src/secret-config-contract.ts
5
5
  function createVoiceProviderSecretTarget(params) {
6
- const path = `${params.scope === "account" ? "channels.discord.accounts.*" : "channels.discord"}.voice.${params.capability}.providers.*.apiKey`;
6
+ const path = `${params.scope === "account" ? "channels.discord.accounts.*" : "channels.discord"}.voice.${params.providerPath}.providers.*.apiKey`;
7
7
  return {
8
8
  id: path,
9
9
  targetType: path,
@@ -14,7 +14,7 @@ function createVoiceProviderSecretTarget(params) {
14
14
  includeInPlan: true,
15
15
  includeInConfigure: true,
16
16
  includeInAudit: true,
17
- providerIdPathSegmentIndex: params.scope === "account" ? 7 : 5
17
+ providerIdPathSegmentIndex: path.split(".").length - 2
18
18
  };
19
19
  }
20
20
  function discordRealtimeVoiceSecretOwnerId(accountId, providerId) {
@@ -47,11 +47,15 @@ const secretTargetRegistryEntries = [
47
47
  includeInAudit: true
48
48
  },
49
49
  createVoiceProviderSecretTarget({
50
- capability: "realtime",
50
+ providerPath: "realtime",
51
51
  scope: "account"
52
52
  }),
53
53
  createVoiceProviderSecretTarget({
54
- capability: "tts",
54
+ providerPath: "tts",
55
+ scope: "account"
56
+ }),
57
+ createVoiceProviderSecretTarget({
58
+ providerPath: "tts.personas.*",
55
59
  scope: "account"
56
60
  }),
57
61
  {
@@ -77,11 +81,15 @@ const secretTargetRegistryEntries = [
77
81
  includeInAudit: true
78
82
  },
79
83
  createVoiceProviderSecretTarget({
80
- capability: "realtime",
84
+ providerPath: "realtime",
85
+ scope: "channel"
86
+ }),
87
+ createVoiceProviderSecretTarget({
88
+ providerPath: "tts",
81
89
  scope: "channel"
82
90
  }),
83
91
  createVoiceProviderSecretTarget({
84
- capability: "tts",
92
+ providerPath: "tts.personas.*",
85
93
  scope: "channel"
86
94
  })
87
95
  ];
@@ -1,2 +1,2 @@
1
- import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B3i6WxV5.js";
1
+ import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-DFu9hfU8.js";
2
2
  export { collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -32,12 +32,8 @@ function listBroadMemberTargetPaths(params) {
32
32
  }
33
33
  function addDiscordNameBasedEntries(params) {
34
34
  if (!Array.isArray(params.values)) return;
35
- for (const value of params.values) {
36
- if (!isDiscordMutableAllowEntry(String(value))) continue;
37
- const text = normalizeOptionalString(String(value)) ?? "";
38
- if (!text) continue;
39
- params.target.add(`${params.source}:${text}`);
40
- }
35
+ const entries = new Set(params.values.map((value) => String(value).trim()).filter(isDiscordMutableAllowEntry));
36
+ if (entries.size > 0) params.target.set(params.source, entries.size);
41
37
  }
42
38
  async function collectDiscordSecurityAuditFindings(params) {
43
39
  const findings = [];
@@ -45,7 +41,7 @@ async function collectDiscordSecurityAuditFindings(params) {
45
41
  const accountId = normalizeOptionalString(params.accountId) ?? params.account.accountId ?? "default";
46
42
  const dangerousNameMatchingEnabled = isDangerousNameMatchingEnabled(discordCfg);
47
43
  const storeAllowFrom = await readChannelAllowFromStore("discord", process.env, accountId).catch(() => []);
48
- const discordNameBasedAllowEntries = /* @__PURE__ */ new Set();
44
+ const discordNameBasedAllowEntries = /* @__PURE__ */ new Map();
49
45
  const discordPathPrefix = params.orderedAccountIds.length > 1 || params.hasExplicitAccountPath ? `channels.discord.accounts.${accountId}` : "channels.discord";
50
46
  if ((discordCfg.groupPolicy ?? params.cfg.channels?.defaults?.groupPolicy ?? "allowlist") === "allowlist") {
51
47
  const broadMemberPaths = listBroadMemberTargetPaths({
@@ -73,7 +69,7 @@ async function collectDiscordSecurityAuditFindings(params) {
73
69
  addDiscordNameBasedEntries({
74
70
  target: discordNameBasedAllowEntries,
75
71
  values: storeAllowFrom,
76
- source: "~/.openclaw/credentials/discord-allowFrom.json"
72
+ source: "Discord pairing store"
77
73
  });
78
74
  const guildEntries = discordCfg.guilds ?? {};
79
75
  for (const [guildKey, guildValue] of Object.entries(guildEntries)) {
@@ -96,13 +92,16 @@ async function collectDiscordSecurityAuditFindings(params) {
96
92
  }
97
93
  }
98
94
  if (discordNameBasedAllowEntries.size > 0) {
99
- const examples = Array.from(discordNameBasedAllowEntries).slice(0, 5);
100
- const more = discordNameBasedAllowEntries.size > examples.length ? ` (+${discordNameBasedAllowEntries.size - examples.length} more)` : "";
95
+ const counts = Array.from(discordNameBasedAllowEntries);
96
+ const entryCount = counts.reduce((total, [, count]) => total + count, 0);
97
+ const sources = counts.slice(0, 5).map(([source, count]) => `${source} (${count})`);
98
+ const more = counts.length > sources.length ? ` (+${counts.length - sources.length} more sources)` : "";
99
+ const summary = `Found ${entryCount} name/tag entries: ${sources.join(", ")}${more}.`;
101
100
  findings.push({
102
101
  checkId: "channels.discord.allowFrom.name_based_entries",
103
102
  severity: dangerousNameMatchingEnabled ? "info" : "warn",
104
103
  title: dangerousNameMatchingEnabled ? "Discord allowlist uses break-glass name/tag matching" : "Discord allowlist contains name or tag entries",
105
- detail: dangerousNameMatchingEnabled ? `Discord name/tag allowlist matching is explicitly enabled via dangerouslyAllowNameMatching. This mutable-identity mode is operator-selected break-glass behavior and out-of-scope for vulnerability reports by itself. Found: ${examples.join(", ")}${more}.` : `Discord name/tag allowlist matching uses normalized slugs and can collide across users. Found: ${examples.join(", ")}${more}.`,
104
+ detail: dangerousNameMatchingEnabled ? "Discord name/tag allowlist matching is explicitly enabled via dangerouslyAllowNameMatching. This mutable-identity mode is operator-selected break-glass behavior and out-of-scope for vulnerability reports by itself. " + summary : "Discord name/tag allowlist matching uses normalized slugs and can collide across users. " + summary,
106
105
  remediation: dangerousNameMatchingEnabled ? "Prefer stable Discord IDs (or <@id>/user:<id>/pk:<id>), then disable dangerouslyAllowNameMatching." : "Prefer stable Discord IDs (or <@id>/user:<id>/pk:<id>) in channels.discord.allowFrom and channels.discord.guilds.*.users, or explicitly opt in with dangerouslyAllowNameMatching=true if you accept the risk."
107
106
  });
108
107
  }
@@ -1,2 +1,2 @@
1
- import { t as collectDiscordSecurityAuditFindings } from "./security-audit-BfJhAXZp.js";
1
+ import { t as collectDiscordSecurityAuditFindings } from "./security-audit-DKfK-iPY.js";
2
2
  export { collectDiscordSecurityAuditFindings };
@@ -1,2 +1,2 @@
1
- import { t as collectDiscordSecurityAuditFindings } from "./security-audit-BfJhAXZp.js";
1
+ import { t as collectDiscordSecurityAuditFindings } from "./security-audit-DKfK-iPY.js";
2
2
  export { collectDiscordSecurityAuditFindings };
@@ -1,11 +1,8 @@
1
- import { $t as timeoutGuildMember, A as RateLimitError, At as pinChannelMessage, Bt as deleteChannelPermission, Ct as editChannelMessage, Dt as listChannelArchivedThreads, Ft as createGuildBan, Gt as listGuildChannels, Ht as getGuildMember, It as createGuildChannel, Jt as listGuildScheduledEvents, Kt as listGuildEmojis, Lt as createGuildEmoji, M as readDiscordCode, Mt as sendChannelTyping, N as readDiscordMessage, Nt as unpinChannelMessage, Ot as listChannelMessages, P as readRetryAfter, Pt as addGuildMemberRole, Qt as removeGuildMemberRole, Rt as createGuildScheduledEvent, St as editChannel, Tt as getChannelMessage, Ut as getGuildVoiceState, Vt as getGuild, Wt as listGuildActiveThreads, Xt as putChannelPermission, Yt as moveGuildChannels, Zt as removeGuildMember, bt as deleteChannel, en as __exportAll, i as recordDiscordMessageCreateAmbiguity, j as isUnknownDiscordVoiceStateError, jt as searchGuildMessages, k as DiscordError, kt as listChannelPins, n as createDiscordRetryRunner, qt as listGuildRoles, t as classifyDiscordDeliveryFailure, wt as getChannel, xt as deleteChannelMessage, yt as createThread, zt as createGuildSticker } from "./retry-DNsVTeTo.js";
2
- import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-DdLPmPoa.js";
3
- import { c as resolveDiscordAccount } from "./accounts-DNl-oCEw.js";
4
- import { A as resolveDiscordMessageFlags, C as hasAllGuildPermissionsDiscord, L as resolveDiscordClientAccountContext, N as resolveDiscordSuppressEmbeds, P as createDiscordClient, R as resolveDiscordRest, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, _ as DiscordSendError, b as canViewDiscordGuildChannel, g as DISCORD_MAX_STICKER_BYTES, h as DISCORD_MAX_EVENT_COVER_BYTES, k as createDiscordMessageNonce, l as resolveChannelId, m as DISCORD_MAX_EMOJI_BYTES, n as buildDiscordTextChunks, o as normalizeEmojiName, p as sendDiscordText, q as parseAndResolveChannelRecipient, t as buildDiscordSendError, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord, z as DISCORD_REST_TIMEOUT_MS } from "./send.shared-B3fpaLWJ.js";
5
- import { n as sendPollDiscord, o as rewriteDiscordKnownMentions, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
6
- import { r as createDiscordSendResult } from "./send.receipt-Cnhoautb.js";
7
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
8
- import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
1
+ import { $t as listGuildRoles, At as getChannel, B as readRetryAfter, Bt as addGuildMemberRole, Ct as listMessageReactionUsers, Dt as deleteChannelMessage, Et as deleteChannel, F as DiscordError, Ft as listChannelPins, Gt as createGuildSticker, Ht as createGuildChannel, I as RateLimitError, It as pinChannelMessage, Jt as getGuildMember, Kt as deleteChannelPermission, L as isUnknownDiscordVoiceStateError, Lt as searchGuildMessages, Nt as listChannelArchivedThreads, Ot as editChannel, Pt as listChannelMessages, Qt as listGuildEmojis, R as readDiscordCode, Rt as sendChannelTyping, St as deleteOwnMessageReaction, Tt as createThread, Ut as createGuildEmoji, Vt as createGuildBan, Wt as createGuildScheduledEvent, Xt as listGuildActiveThreads, Yt as getGuildVoiceState, Zt as listGuildChannels, an as timeoutGuildMember, c as createDiscordSendResult, en as listGuildScheduledEvents, i as recordDiscordMessageCreateAmbiguity, in as removeGuildMemberRole, jt as getChannelMessage, kt as editChannelMessage, n as createDiscordRetryRunner, nn as putChannelPermission, on as __exportAll, qt as getGuild, rn as removeGuildMember, t as classifyDiscordDeliveryFailure, tn as moveGuildChannels, xt as createOwnMessageReaction, z as readDiscordMessage, zt as unpinChannelMessage } from "./retry-t5RcEsPk.js";
2
+ import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-BrLjLUJi.js";
3
+ import { C as hasAllGuildPermissionsDiscord, I as resolveDiscordClientAccountContext, K as parseAndResolveChannelRecipient, L as resolveDiscordRest, M as resolveDiscordSuppressEmbeds, N as createDiscordClient, O as createDiscordMessageNonce, R as DISCORD_REST_TIMEOUT_MS, S as fetchMemberGuildPermissionsDiscord, T as hasAnyGuildPermissionDiscord, _ as DiscordSendError, b as canViewDiscordGuildChannel, g as DISCORD_MAX_STICKER_BYTES, h as DISCORD_MAX_EVENT_COVER_BYTES, i as formatReactionEmoji, k as resolveDiscordMessageFlags, l as resolveChannelId, m as DISCORD_MAX_EMOJI_BYTES, n as buildDiscordTextChunks, o as normalizeEmojiName, p as sendDiscordText, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-BJHt0Vyf.js";
4
+ import { n as sendPollDiscord, o as rewriteDiscordKnownMentions, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-CaOs9Zy1.js";
5
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
9
6
  import fs from "node:fs/promises";
10
7
  import { ChannelType } from "discord-api-types/v10";
11
8
  import crypto from "node:crypto";
@@ -58,7 +55,8 @@ async function editChannelDiscord(payload, opts) {
58
55
  return await editChannel(rest, payload.channelId, { body });
59
56
  }
60
57
  async function deleteChannelDiscord(channelId, opts) {
61
- await deleteChannel(resolveDiscordRest(opts), channelId);
58
+ const rest = resolveDiscordRest(opts);
59
+ await deleteChannel(rest, channelId);
62
60
  return {
63
61
  ok: true,
64
62
  channelId
@@ -83,13 +81,15 @@ async function setChannelPermissionDiscord(payload, opts) {
83
81
  return { ok: true };
84
82
  }
85
83
  async function removeChannelPermissionDiscord(channelId, targetId, opts) {
86
- await deleteChannelPermission(resolveDiscordRest(opts), channelId, targetId);
84
+ const rest = resolveDiscordRest(opts);
85
+ await deleteChannelPermission(rest, channelId, targetId);
87
86
  return { ok: true };
88
87
  }
89
88
  //#endregion
90
89
  //#region extensions/discord/src/send.emojis-stickers.ts
91
90
  async function listGuildEmojisDiscord(guildId, opts) {
92
- return await listGuildEmojis(resolveDiscordRest(opts), guildId);
91
+ const rest = resolveDiscordRest(opts);
92
+ return await listGuildEmojis(rest, guildId);
93
93
  }
94
94
  async function uploadEmojiDiscord(payload, opts) {
95
95
  const rest = resolveDiscordRest(opts);
@@ -136,27 +136,34 @@ async function uploadStickerDiscord(payload, opts) {
136
136
  //#endregion
137
137
  //#region extensions/discord/src/send.guild.ts
138
138
  async function fetchMemberInfoDiscord(guildId, userId, opts) {
139
- return await getGuildMember(resolveDiscordRest(opts), guildId, userId);
139
+ const rest = resolveDiscordRest(opts);
140
+ return await getGuildMember(rest, guildId, userId);
140
141
  }
141
142
  async function fetchRoleInfoDiscord(guildId, opts) {
142
- return await listGuildRoles(resolveDiscordRest(opts), guildId);
143
+ const rest = resolveDiscordRest(opts);
144
+ return await listGuildRoles(rest, guildId);
143
145
  }
144
146
  async function addRoleDiscord(payload, opts) {
145
- await addGuildMemberRole(resolveDiscordRest(opts), payload.guildId, payload.userId, payload.roleId);
147
+ const rest = resolveDiscordRest(opts);
148
+ await addGuildMemberRole(rest, payload.guildId, payload.userId, payload.roleId);
146
149
  return { ok: true };
147
150
  }
148
151
  async function removeRoleDiscord(payload, opts) {
149
- await removeGuildMemberRole(resolveDiscordRest(opts), payload.guildId, payload.userId, payload.roleId);
152
+ const rest = resolveDiscordRest(opts);
153
+ await removeGuildMemberRole(rest, payload.guildId, payload.userId, payload.roleId);
150
154
  return { ok: true };
151
155
  }
152
156
  async function fetchChannelInfoDiscord(channelId, opts) {
153
- return await getChannel(resolveDiscordRest(opts), channelId);
157
+ const rest = resolveDiscordRest(opts);
158
+ return await getChannel(rest, channelId);
154
159
  }
155
160
  async function fetchGuildInfoDiscord(guildId, opts) {
156
- return await getGuild(resolveDiscordRest(opts), guildId);
161
+ const rest = resolveDiscordRest(opts);
162
+ return await getGuild(rest, guildId);
157
163
  }
158
164
  async function listGuildChannelsDiscord(guildId, opts) {
159
- return await listGuildChannels(resolveDiscordRest(opts), guildId);
165
+ const rest = resolveDiscordRest(opts);
166
+ return await listGuildChannels(rest, guildId);
160
167
  }
161
168
  async function fetchVoiceStatusDiscord(guildId, userId, opts) {
162
169
  const rest = resolveDiscordRest(opts);
@@ -175,7 +182,8 @@ async function fetchVoiceStatusDiscord(guildId, userId, opts) {
175
182
  }
176
183
  }
177
184
  async function listScheduledEventsDiscord(guildId, opts) {
178
- return await listGuildScheduledEvents(resolveDiscordRest(opts), guildId);
185
+ const rest = resolveDiscordRest(opts);
186
+ return await listGuildScheduledEvents(rest, guildId);
179
187
  }
180
188
  const ALLOWED_EVENT_COVER_TYPES = /* @__PURE__ */ new Set([
181
189
  "image/png",
@@ -190,13 +198,15 @@ async function resolveEventCoverImage(imageUrl, opts) {
190
198
  return `data:${contentType};base64,${media.buffer.toString("base64")}`;
191
199
  }
192
200
  async function createScheduledEventDiscord(guildId, payload, opts) {
193
- return await createGuildScheduledEvent(resolveDiscordRest(opts), guildId, payload);
201
+ const rest = resolveDiscordRest(opts);
202
+ return await createGuildScheduledEvent(rest, guildId, payload);
194
203
  }
195
204
  async function timeoutMemberDiscord(payload, opts) {
196
205
  const rest = resolveDiscordRest(opts);
197
206
  let until = payload.until;
198
207
  if (!until && payload.durationMinutes) {
199
- until = timestampMsToIsoString(resolveExpiresAtMsFromDurationMs(payload.durationMinutes * 60 * 1e3));
208
+ const ms = payload.durationMinutes * 60 * 1e3;
209
+ until = timestampMsToIsoString(resolveExpiresAtMsFromDurationMs(ms));
200
210
  if (!until) throw new Error("Discord timeout duration is outside the supported Date range");
201
211
  }
202
212
  return await timeoutGuildMember(rest, payload.guildId, payload.userId, {
@@ -205,7 +215,8 @@ async function timeoutMemberDiscord(payload, opts) {
205
215
  });
206
216
  }
207
217
  async function kickMemberDiscord(payload, opts) {
208
- await removeGuildMember(resolveDiscordRest(opts), payload.guildId, payload.userId, { headers: payload.reason ? { "X-Audit-Log-Reason": encodeURIComponent(payload.reason) } : void 0 });
218
+ const rest = resolveDiscordRest(opts);
219
+ await removeGuildMember(rest, payload.guildId, payload.userId, { headers: payload.reason ? { "X-Audit-Log-Reason": encodeURIComponent(payload.reason) } : void 0 });
209
220
  return { ok: true };
210
221
  }
211
222
  async function banMemberDiscord(payload, opts) {
@@ -268,28 +279,34 @@ async function readMessagesDiscord(channelId, query, opts) {
268
279
  return assertDiscordResponseArray(await listChannelMessages(rest, channelId, params), "message read");
269
280
  }
270
281
  async function fetchMessageDiscord(channelId, messageId, opts) {
271
- return await getChannelMessage(resolveDiscordRest(opts), channelId, messageId);
282
+ const rest = resolveDiscordRest(opts);
283
+ return await getChannelMessage(rest, channelId, messageId);
272
284
  }
273
285
  async function editMessageDiscord(channelId, messageId, payload, opts) {
274
- return await editChannelMessage(resolveDiscordRest(opts), channelId, messageId, { body: {
286
+ const rest = resolveDiscordRest(opts);
287
+ return await editChannelMessage(rest, channelId, messageId, { body: {
275
288
  content: payload.content,
276
289
  ...payload.flags !== void 0 ? { flags: payload.flags } : {}
277
290
  } });
278
291
  }
279
292
  async function deleteMessageDiscord(channelId, messageId, opts) {
280
- await deleteChannelMessage(resolveDiscordRest(opts), channelId, messageId);
293
+ const rest = resolveDiscordRest(opts);
294
+ await deleteChannelMessage(rest, channelId, messageId);
281
295
  return { ok: true };
282
296
  }
283
297
  async function pinMessageDiscord(channelId, messageId, opts) {
284
- await pinChannelMessage(resolveDiscordRest(opts), channelId, messageId);
298
+ const rest = resolveDiscordRest(opts);
299
+ await pinChannelMessage(rest, channelId, messageId);
285
300
  return { ok: true };
286
301
  }
287
302
  async function unpinMessageDiscord(channelId, messageId, opts) {
288
- await unpinChannelMessage(resolveDiscordRest(opts), channelId, messageId);
303
+ const rest = resolveDiscordRest(opts);
304
+ await unpinChannelMessage(rest, channelId, messageId);
289
305
  return { ok: true };
290
306
  }
291
307
  async function listPinsDiscord(channelId, opts) {
292
- return await listChannelPins(resolveDiscordRest(opts), channelId);
308
+ const rest = resolveDiscordRest(opts);
309
+ return await listChannelPins(rest, channelId);
293
310
  }
294
311
  async function createThreadDiscord(channelId, payload, opts) {
295
312
  const { rest, request } = createDiscordClient(opts);
@@ -302,7 +319,8 @@ async function createThreadDiscord(channelId, payload, opts) {
302
319
  const archiveDuration = payload.autoArchiveMinutes ?? resolveDefaultThreadAutoArchiveDuration(channel);
303
320
  if (archiveDuration !== void 0) body.auto_archive_duration = archiveDuration;
304
321
  const isForumLike = channel?.type === ChannelType.GuildForum || channel?.type === ChannelType.GuildMedia;
305
- const initialMessageChunks = buildDiscordTextChunks(isForumLike ? payload.content?.trim() ? payload.content : payload.name : payload.content?.trim() ? payload.content : "", { maxLinesPerMessage: DISCORD_THREAD_TRANSPORT_ONLY_MAX_LINES });
322
+ const initialMessageContent = isForumLike ? payload.content?.trim() ? payload.content : payload.name : payload.content?.trim() ? payload.content : "";
323
+ const initialMessageChunks = buildDiscordTextChunks(initialMessageContent, { maxLinesPerMessage: DISCORD_THREAD_TRANSPORT_ONLY_MAX_LINES });
306
324
  if (isForumLike) {
307
325
  body.message = { content: initialMessageChunks[0] ?? payload.name };
308
326
  if (payload.appliedTags?.length) body.applied_tags = payload.appliedTags;
@@ -384,7 +402,7 @@ async function searchMessagesDiscord(query, opts) {
384
402
  }
385
403
  //#endregion
386
404
  //#region extensions/discord/src/send.webhook.ts
387
- const DISCORD_WEBHOOK_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
405
+ const DISCORD_WEBHOOK_ERROR_BODY_LIMIT_BYTES = 8192;
388
406
  const DISCORD_WEBHOOK_TIMEOUT_MS = DISCORD_REST_TIMEOUT_MS;
389
407
  function resolveWebhookExecutionUrl(params) {
390
408
  const baseUrl = new URL(`https://discord.com/api/v10/webhooks/${encodeURIComponent(params.webhookId)}/${encodeURIComponent(params.webhookToken)}`);
@@ -456,6 +474,7 @@ async function sendWebhookMessageDiscord(text, opts) {
456
474
  try {
457
475
  const response = await request(async () => {
458
476
  await opts.onPlatformSendDispatch?.();
477
+ opts.assertPlatformSendAuthorized?.();
459
478
  const attemptResponse = await (proxyFetch ?? fetch)(url, {
460
479
  method: "POST",
461
480
  headers: { "content-type": "application/json" },
@@ -518,7 +537,7 @@ async function sendWebhookMessageDiscord(text, opts) {
518
537
  const DISCORD_VOICE_MESSAGE_FLAG = 8192;
519
538
  const WAVEFORM_SAMPLES = 256;
520
539
  const DISCORD_OPUS_SAMPLE_RATE_HZ = 48e3;
521
- const DISCORD_VOICE_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
540
+ const DISCORD_VOICE_ERROR_BODY_LIMIT_BYTES = 8192;
522
541
  const DISCORD_VOICE_UPLOAD_SSRF_POLICY = {
523
542
  allowRfc2544BenchmarkRange: true,
524
543
  allowIpv6UniqueLocalRange: true
@@ -542,7 +561,7 @@ function createRateLimitError(response, body) {
542
561
  */
543
562
  async function getAudioDuration(filePath) {
544
563
  try {
545
- const duration = parseStrictFiniteNumber(await runFfprobe([
564
+ const stdout = await runFfprobe([
546
565
  "-v",
547
566
  "error",
548
567
  "-show_entries",
@@ -550,7 +569,8 @@ async function getAudioDuration(filePath) {
550
569
  "-of",
551
570
  "csv=p=0",
552
571
  filePath
553
- ]));
572
+ ]);
573
+ const duration = parseStrictFiniteNumber(stdout);
554
574
  if (duration === void 0) throw new Error("Could not parse duration");
555
575
  return Math.round(duration * 100) / 100;
556
576
  } catch (err) {
@@ -638,7 +658,7 @@ async function ensureOggOpus(filePath) {
638
658
  const trimmed = filePath.trim();
639
659
  if (/^[a-z][a-z0-9+.-]*:\/\//i.test(trimmed)) throw new Error(`Voice message conversion requires a local file path; received a URL/protocol source: ${trimmed}`);
640
660
  if (normalizeLowercaseStringOrEmpty(path.extname(filePath)) === ".ogg") try {
641
- const { codec, sampleRateHz } = parseFfprobeCodecAndSampleRate(await runFfprobe([
661
+ const stdout = await runFfprobe([
642
662
  "-v",
643
663
  "error",
644
664
  "-select_streams",
@@ -648,7 +668,8 @@ async function ensureOggOpus(filePath) {
648
668
  "-of",
649
669
  "csv=p=0",
650
670
  filePath
651
- ]));
671
+ ]);
672
+ const { codec, sampleRateHz } = parseFfprobeCodecAndSampleRate(stdout);
652
673
  if (codec === "opus" && sampleRateHz === DISCORD_OPUS_SAMPLE_RATE_HZ) return {
653
674
  path: filePath,
654
675
  cleanup: false
@@ -711,20 +732,22 @@ async function createVoiceRequestError(response, fallbackMessage) {
711
732
  return new DiscordError(response, parsed ?? { message: fallbackMessage });
712
733
  }
713
734
  async function requestVoiceUploadUrl(params) {
714
- const { response: res, release } = await fetchWithSsrFGuard({
715
- url: `${params.rest.options?.baseUrl ?? "https://discord.com/api"}/channels/${params.channelId}/attachments`,
716
- init: {
717
- method: "POST",
718
- headers: {
719
- Authorization: `Bot ${params.botToken}`,
720
- "Content-Type": "application/json"
721
- },
722
- body: JSON.stringify({ files: [{
723
- filename: params.filename,
724
- file_size: params.fileSize,
725
- id: "0"
726
- }] })
735
+ const url = `${params.rest.options?.baseUrl ?? "https://discord.com/api"}/channels/${params.channelId}/attachments`;
736
+ const uploadUrlInit = {
737
+ method: "POST",
738
+ headers: {
739
+ Authorization: `Bot ${params.botToken}`,
740
+ "Content-Type": "application/json"
727
741
  },
742
+ body: JSON.stringify({ files: [{
743
+ filename: params.filename,
744
+ file_size: params.fileSize,
745
+ id: "0"
746
+ }] })
747
+ };
748
+ const { response: res, release } = await fetchWithSsrFGuard({
749
+ url,
750
+ init: uploadUrlInit,
728
751
  timeoutMs: params.rest.options.timeout,
729
752
  policy: DISCORD_VOICE_UPLOAD_SSRF_POLICY,
730
753
  auditContext: "discord.voice.upload-url"
@@ -763,7 +786,7 @@ async function uploadVoiceAttachment(params) {
763
786
  * 2. Upload the OGG file to the provided URL
764
787
  * 3. Send the message with flag 8192 and attachment metadata
765
788
  */
766
- async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, replyTo, request, silent, token) {
789
+ async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, replyTo, request, silent, token, onPlatformSendDispatch, assertPlatformSendAuthorized) {
767
790
  const filename = "voice-message.ogg";
768
791
  const fileSize = audioBuffer.byteLength;
769
792
  const botToken = token;
@@ -803,6 +826,8 @@ async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, r
803
826
  let messageCreateMayHaveCommitted = false;
804
827
  try {
805
828
  return await request(async () => {
829
+ await onPlatformSendDispatch?.();
830
+ assertPlatformSendAuthorized?.();
806
831
  try {
807
832
  return await rest.post(`/channels/${channelId}/messages`, { body: messagePayload });
808
833
  } catch (error) {
@@ -859,10 +884,6 @@ async function sendVoiceMessageDiscord(to, audioPath, opts) {
859
884
  let rest;
860
885
  let channelId;
861
886
  try {
862
- const accountInfo = resolveDiscordAccount({
863
- cfg,
864
- accountId: opts.accountId
865
- });
866
887
  const client = createDiscordClient({
867
888
  ...opts,
868
889
  cfg
@@ -870,15 +891,15 @@ async function sendVoiceMessageDiscord(to, audioPath, opts) {
870
891
  token = client.token;
871
892
  rest = client.rest;
872
893
  const request = client.request;
873
- const recipient = await parseAndResolveChannelRecipient(to, cfg, opts.accountId);
894
+ const accountInfo = client.account;
895
+ const recipient = await parseAndResolveChannelRecipient(to, cfg, accountInfo.accountId);
874
896
  channelId = (await resolveChannelId(rest, recipient, request)).channelId;
875
897
  const ogg = await ensureOggOpus(localInputPath);
876
898
  oggPath = ogg.path;
877
899
  oggCleanup = ogg.cleanup;
878
900
  const metadata = await getVoiceMessageMetadata(oggPath);
879
901
  const audioBuffer = await fs.readFile(oggPath);
880
- await opts.onPlatformSendDispatch?.();
881
- const result = await sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, opts.reply?.messageId, request, opts.silent, token);
902
+ const result = await sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, opts.reply?.messageId, request, opts.silent, token, opts.onPlatformSendDispatch, opts.assertPlatformSendAuthorized);
882
903
  recordChannelActivity({
883
904
  channel: "discord",
884
905
  accountId: accountInfo.accountId,
@@ -902,13 +923,83 @@ async function sendVoiceMessageDiscord(to, audioPath, opts) {
902
923
  //#endregion
903
924
  //#region extensions/discord/src/send.typing.ts
904
925
  async function sendTypingDiscord(channelId, opts) {
905
- await sendChannelTyping(resolveDiscordRest(opts), channelId);
926
+ const rest = resolveDiscordRest(opts);
927
+ await sendChannelTyping(rest, channelId);
906
928
  return {
907
929
  ok: true,
908
930
  channelId
909
931
  };
910
932
  }
911
933
  //#endregion
934
+ //#region extensions/discord/src/send.reactions.ts
935
+ function resolveDiscordReactionClient(opts) {
936
+ if (opts.rest && opts.cfg && opts.accountId) return createDiscordClient(opts);
937
+ if (!opts.cfg) throw new Error("Discord reactions requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
938
+ const cfg = requireRuntimeConfig(opts.cfg, "Discord reactions");
939
+ return createDiscordClient({
940
+ ...opts,
941
+ cfg
942
+ });
943
+ }
944
+ async function reactMessageDiscord(channelId, messageId, emoji, opts) {
945
+ const { rest, request } = resolveDiscordReactionClient(opts);
946
+ const encoded = normalizeReactionEmoji(emoji);
947
+ await request(() => createOwnMessageReaction(rest, channelId, messageId, encoded), "react");
948
+ return { ok: true };
949
+ }
950
+ async function removeReactionDiscord(channelId, messageId, emoji, opts) {
951
+ const { rest, request } = resolveDiscordReactionClient(opts);
952
+ const encoded = normalizeReactionEmoji(emoji);
953
+ await request(() => deleteOwnMessageReaction(rest, channelId, messageId, encoded), "reaction-remove");
954
+ return { ok: true };
955
+ }
956
+ async function removeOwnReactionsDiscord(channelId, messageId, opts) {
957
+ const { rest, request } = resolveDiscordReactionClient(opts);
958
+ const message = await request(() => getChannelMessage(rest, channelId, messageId), "reaction-list");
959
+ const identifiers = /* @__PURE__ */ new Set();
960
+ for (const reaction of message.reactions ?? []) {
961
+ const identifier = reaction.me ? buildReactionIdentifier(reaction.emoji) : void 0;
962
+ if (identifier) identifiers.add(identifier);
963
+ }
964
+ if (identifiers.size === 0) return {
965
+ ok: true,
966
+ removed: []
967
+ };
968
+ const removed = Array.from(identifiers);
969
+ await Promise.all(removed.map((identifier) => request(() => deleteOwnMessageReaction(rest, channelId, messageId, normalizeReactionEmoji(identifier)), "reaction-remove")));
970
+ return {
971
+ ok: true,
972
+ removed
973
+ };
974
+ }
975
+ async function fetchReactionsDiscord(channelId, messageId, opts) {
976
+ const { rest, request } = resolveDiscordReactionClient(opts);
977
+ const reactions = (await request(() => getChannelMessage(rest, channelId, messageId), "reaction-list")).reactions ?? [];
978
+ if (reactions.length === 0) return [];
979
+ const limit = typeof opts.limit === "number" && Number.isFinite(opts.limit) ? Math.min(Math.max(Math.floor(opts.limit), 1), 100) : 100;
980
+ const summaries = [];
981
+ for (const reaction of reactions) {
982
+ const identifier = buildReactionIdentifier(reaction.emoji);
983
+ if (!identifier) continue;
984
+ const encoded = encodeURIComponent(identifier);
985
+ const users = await request(() => listMessageReactionUsers(rest, channelId, messageId, encoded, { limit }), "reaction-users");
986
+ summaries.push({
987
+ emoji: {
988
+ id: reaction.emoji.id ?? null,
989
+ name: reaction.emoji.name ?? null,
990
+ raw: formatReactionEmoji(reaction.emoji)
991
+ },
992
+ count: reaction.count,
993
+ users: users.map((user) => ({
994
+ id: user.id,
995
+ username: user.username,
996
+ tag: user.username && user.discriminator ? `${user.username}#${user.discriminator}` : user.username
997
+ }))
998
+ });
999
+ }
1000
+ return summaries;
1001
+ }
1002
+ //#endregion
912
1003
  //#region extensions/discord/src/send.ts
913
1004
  var send_exports = /* @__PURE__ */ __exportAll({
914
1005
  DiscordSendError: () => DiscordSendError,
@@ -966,4 +1057,4 @@ var send_exports = /* @__PURE__ */ __exportAll({
966
1057
  uploadStickerDiscord: () => uploadStickerDiscord
967
1058
  });
968
1059
  //#endregion
969
- export { listGuildEmojisDiscord as A, fetchVoiceStatusDiscord as C, removeRoleDiscord as D, listScheduledEventsDiscord as E, editChannelDiscord as F, moveChannelDiscord as I, removeChannelPermissionDiscord as L, uploadStickerDiscord as M, createChannelDiscord as N, resolveEventCoverImage as O, deleteChannelDiscord as P, setChannelPermissionDiscord as R, fetchRoleInfoDiscord as S, listGuildChannelsDiscord as T, banMemberDiscord as _, DiscordThreadInitialMessageError as a, fetchGuildInfoDiscord as b, editMessageDiscord as c, listThreadsDiscord as d, pinMessageDiscord as f, addRoleDiscord as g, unpinMessageDiscord as h, sendWebhookMessageDiscord as i, uploadEmojiDiscord as j, timeoutMemberDiscord as k, fetchMessageDiscord as l, searchMessagesDiscord as m, sendTypingDiscord as n, createThreadDiscord as o, readMessagesDiscord as p, sendVoiceMessageDiscord as r, deleteMessageDiscord as s, send_exports as t, listPinsDiscord as u, createScheduledEventDiscord as v, kickMemberDiscord as w, fetchMemberInfoDiscord as x, fetchChannelInfoDiscord as y };
1060
+ export { listScheduledEventsDiscord as A, moveChannelDiscord as B, fetchChannelInfoDiscord as C, fetchVoiceStatusDiscord as D, fetchRoleInfoDiscord as E, uploadEmojiDiscord as F, setChannelPermissionDiscord as H, uploadStickerDiscord as I, createChannelDiscord as L, resolveEventCoverImage as M, timeoutMemberDiscord as N, kickMemberDiscord as O, listGuildEmojisDiscord as P, deleteChannelDiscord as R, createScheduledEventDiscord as S, fetchMemberInfoDiscord as T, removeChannelPermissionDiscord as V, readMessagesDiscord as _, removeReactionDiscord as a, addRoleDiscord as b, sendWebhookMessageDiscord as c, deleteMessageDiscord as d, editMessageDiscord as f, pinMessageDiscord as g, listThreadsDiscord as h, removeOwnReactionsDiscord as i, removeRoleDiscord as j, listGuildChannelsDiscord as k, DiscordThreadInitialMessageError as l, listPinsDiscord as m, fetchReactionsDiscord as n, sendTypingDiscord as o, fetchMessageDiscord as p, reactMessageDiscord as r, sendVoiceMessageDiscord as s, send_exports as t, createThreadDiscord as u, searchMessagesDiscord as v, fetchGuildInfoDiscord as w, banMemberDiscord as x, unpinMessageDiscord as y, editChannelDiscord as z };