@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,19 +1,21 @@
1
- import { c as resolveDiscordReplyReference, o as createReusableDiscordReplyReference } from "./retry-DNsVTeTo.js";
2
- import { m as readDiscordComponentSpec } from "./components-ezGKo_Yh.js";
3
- import { A as resolveDiscordChannelId, C as readPositiveIntegerParam, D as withNormalizedTimestamp, E as readStringParam, S as readNonNegativeIntegerParam, T as readStringArrayParam, _ as assertMediaNotDataUrl, b as parseAvailableTags, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate, v as jsonResult, w as readReactionParams, x as readBooleanParam } from "./accounts-DNl-oCEw.js";
4
- import { r as sendDiscordComponentMessage } from "./send.components-ChK1wS7w.js";
5
- import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-BDMimASD.js";
6
- import { E as isThreadChannelType$1, I as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, W as getGateway, d as resolveDiscordTargetChannelId, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-B3fpaLWJ.js";
7
- import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-HIkgji_7.js";
1
+ import { f as resolveDiscordReplyReference, u as createReusableDiscordReplyReference, v as resolveDiscordChannelId } from "./retry-t5RcEsPk.js";
2
+ import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-gvRA0oaI.js";
3
+ import { o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
4
+ import { r as sendDiscordComponentMessage } from "./send.components-nsPnc7kK.js";
5
+ import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-C2JuH-R0.js";
6
+ import { F as createDiscordRuntimeAccountContext, T as hasAnyGuildPermissionDiscord, U as getGateway, d as resolveDiscordTargetChannelId, v as canManageGuildMemberRoleDiscord, w as hasAnyChannelPermissionDiscord, x as fetchChannelPermissionsDiscord, y as canManageGuildRoleDiscord } from "./send.shared-BJHt0Vyf.js";
7
+ import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-CaOs9Zy1.js";
8
+ import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
8
9
  import { n as getPresence } 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, a as DiscordThreadInitialMessageError, b as fetchGuildInfoDiscord, c as editMessageDiscord, d as listThreadsDiscord, f as pinMessageDiscord, g as addRoleDiscord, h as unpinMessageDiscord, j as uploadEmojiDiscord, k as timeoutMemberDiscord, l as fetchMessageDiscord, m as searchMessagesDiscord, 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 { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gmJ6yFPo.js";
11
- import "./targets-B2pf49zc.js";
10
+ 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, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-mTKSBdmZ.js";
11
+ import "./targets-DQSye1Rv.js";
12
12
  import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
13
13
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
14
14
  import { asBoolean, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
15
15
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
16
+ import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
16
17
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
18
+ import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
17
19
  //#region extensions/discord/src/actions/runtime-deps.ts
18
20
  const discordGuildActionRuntime = {
19
21
  addRoleDiscord,
@@ -241,8 +243,7 @@ function readDiscordChannelType(value) {
241
243
  return typeof type === "number" ? type : void 0;
242
244
  }
243
245
  function isDiscordThreadChannel(value) {
244
- const type = readDiscordChannelType(value);
245
- return type === 10 || type === 11 || type === 12;
246
+ return isDiscordThreadChannelType(readDiscordChannelType(value));
246
247
  }
247
248
  function isDiscordReadAncestryAllowed(params) {
248
249
  for (const ancestor of params.target.ancestors) {
@@ -623,9 +624,6 @@ const guildAdminActionGuards = {
623
624
  channelPermissionSet: channelPermissionGuard,
624
625
  channelPermissionRemove: channelPermissionGuard
625
626
  };
626
- function isThreadChannelType(channelType) {
627
- return channelType === ChannelType.GuildNewsThread || channelType === ChannelType.GuildPublicThread || channelType === ChannelType.GuildPrivateThread;
628
- }
629
627
  function isLockedThreadChannel(channel) {
630
628
  if (!channel || typeof channel !== "object") return false;
631
629
  return channel.thread_metadata?.locked === true;
@@ -658,7 +656,8 @@ async function resolveGuildAdminActionPermissions(params) {
658
656
  cfg: params.cfg,
659
657
  accountId: params.accountId
660
658
  }));
661
- if (!isThreadChannelType("type" in channel ? channel.type : void 0)) return params.guard.permissions;
659
+ const channelType = "type" in channel ? channel.type : void 0;
660
+ if (!isDiscordThreadChannelType(channelType)) return params.guard.permissions;
662
661
  return params.values.archived === false && !("name" in params.values) && !("topic" in params.values) && !("position" in params.values) && !("parentId" in params.values) && !("clearParent" in params.values) && !("nsfw" in params.values) && !("rateLimitPerUser" in params.values) && !("locked" in params.values) && !("autoArchiveDuration" in params.values) && !isLockedThreadChannel(channel) ? [PermissionFlagsBits.ManageThreads, PermissionFlagsBits.SendMessagesInThreads] : [PermissionFlagsBits.ManageThreads];
663
662
  }
664
663
  async function verifySenderGuildAdminPermission(params) {
@@ -765,18 +764,32 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
765
764
  if (!isActionEnabled("roleInfo")) throw new Error("Discord role info is disabled.");
766
765
  const guildId = readStringParam(params, "guildId", { required: true });
767
766
  await assertGuildMetadataReadAllowed(guildId);
767
+ const roles = await discordGuildActionRuntime.fetchRoleInfoDiscord(guildId, withOpts());
768
768
  return jsonResult({
769
769
  ok: true,
770
- roles: await discordGuildActionRuntime.fetchRoleInfoDiscord(guildId, withOpts())
770
+ roles
771
771
  });
772
772
  }
773
773
  case "emojiList": {
774
774
  if (!isActionEnabled("reactions")) throw new Error("Discord reactions are disabled.");
775
- const guildId = readStringParam(params, "guildId", { required: true });
775
+ const guildId = await resolveGuildIdForGuildAdminAction({
776
+ values: params,
777
+ accountId,
778
+ cfg
779
+ });
780
+ if (!guildId) throw new Error("Discord emoji listing requires guildId or a server channel.");
776
781
  await assertGuildMetadataReadAllowed(guildId);
782
+ const limit = Math.min(readPositiveIntegerParam(params, "limit") ?? 100, 100);
783
+ const fetchEmojis = async () => (await discordGuildActionRuntime.listGuildEmojisDiscord(guildId, withOpts())).flatMap(({ name, id, animated }) => name && id ? [{
784
+ name,
785
+ identifier: `${name}:${id}`,
786
+ ...animated ? { animated } : {}
787
+ }] : []).toSorted((left, right) => left.name.localeCompare(right.name) || left.identifier.localeCompare(right.identifier));
788
+ const gateway = getGateway(accountId ?? resolveDefaultDiscordAccountId(cfg));
789
+ const emojis = gateway ? await gateway.fetchGuildEmojis(guildId, fetchEmojis) : await fetchEmojis();
777
790
  return jsonResult({
778
791
  ok: true,
779
- emojis: await discordGuildActionRuntime.listGuildEmojisDiscord(guildId, withOpts())
792
+ emojis: emojis.slice(0, limit)
780
793
  });
781
794
  }
782
795
  case "emojiUpload": {
@@ -785,14 +798,15 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
785
798
  const name = readStringParam(params, "name", { required: true });
786
799
  const mediaUrl = readStringParam(params, "mediaUrl", { required: true });
787
800
  const roleIds = readStringArrayParam(params, "roleIds");
801
+ const emoji = await discordGuildActionRuntime.uploadEmojiDiscord({
802
+ guildId,
803
+ name,
804
+ mediaUrl,
805
+ roleIds: roleIds?.length ? roleIds : void 0
806
+ }, withOpts());
788
807
  return jsonResult({
789
808
  ok: true,
790
- emoji: await discordGuildActionRuntime.uploadEmojiDiscord({
791
- guildId,
792
- name,
793
- mediaUrl,
794
- roleIds: roleIds?.length ? roleIds : void 0
795
- }, withOpts())
809
+ emoji
796
810
  });
797
811
  }
798
812
  case "stickerUpload": {
@@ -802,15 +816,16 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
802
816
  const description = readStringParam(params, "description", { required: true });
803
817
  const tags = readStringParam(params, "tags", { required: true });
804
818
  const mediaUrl = readStringParam(params, "mediaUrl", { required: true });
819
+ const sticker = await discordGuildActionRuntime.uploadStickerDiscord({
820
+ guildId,
821
+ name,
822
+ description,
823
+ tags,
824
+ mediaUrl
825
+ }, withOpts());
805
826
  return jsonResult({
806
827
  ok: true,
807
- sticker: await discordGuildActionRuntime.uploadStickerDiscord({
808
- guildId,
809
- name,
810
- description,
811
- tags,
812
- mediaUrl
813
- }, withOpts())
828
+ sticker
814
829
  });
815
830
  }
816
831
  case "roleAdd":
@@ -835,9 +850,10 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
835
850
  if (!isActionEnabled("channelInfo")) throw new Error("Discord channel info is disabled.");
836
851
  const channelId = readStringParam(params, "channelId", { required: true });
837
852
  await readTargetGate.assertReadTargetAllowed({ channelId });
853
+ const channel = await discordGuildActionRuntime.fetchChannelInfoDiscord(channelId, withOpts());
838
854
  return jsonResult({
839
855
  ok: true,
840
- channel: await discordGuildActionRuntime.fetchChannelInfoDiscord(channelId, withOpts())
856
+ channel
841
857
  });
842
858
  }
843
859
  case "channelList": {
@@ -845,12 +861,13 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
845
861
  const guildId = readStringParam(params, "guildId", { required: true });
846
862
  await assertGuildMetadataReadAllowed(guildId, { filteredResults: true });
847
863
  const channels = await discordGuildActionRuntime.listGuildChannelsDiscord(guildId, withOpts());
864
+ const visibleChannels = await readTargetGate.filterGuildChannelList({
865
+ guildId,
866
+ channels
867
+ });
848
868
  return jsonResult({
849
869
  ok: true,
850
- channels: await readTargetGate.filterGuildChannelList({
851
- guildId,
852
- channels
853
- })
870
+ channels: visibleChannels
854
871
  });
855
872
  }
856
873
  case "voiceStatus": {
@@ -858,18 +875,20 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
858
875
  const guildId = readStringParam(params, "guildId", { required: true });
859
876
  await assertGuildMetadataReadAllowed(guildId);
860
877
  const userId = readStringParam(params, "userId", { required: true });
878
+ const voice = await discordGuildActionRuntime.fetchVoiceStatusDiscord(guildId, userId, withOpts());
861
879
  return jsonResult({
862
880
  ok: true,
863
- voice: await discordGuildActionRuntime.fetchVoiceStatusDiscord(guildId, userId, withOpts())
881
+ voice
864
882
  });
865
883
  }
866
884
  case "eventList": {
867
885
  if (!isActionEnabled("events")) throw new Error("Discord events are disabled.");
868
886
  const guildId = readStringParam(params, "guildId", { required: true });
869
887
  await assertGuildMetadataReadAllowed(guildId);
888
+ const events = await discordGuildActionRuntime.listScheduledEventsDiscord(guildId, withOpts());
870
889
  return jsonResult({
871
890
  ok: true,
872
- events: await discordGuildActionRuntime.listScheduledEventsDiscord(guildId, withOpts())
891
+ events
873
892
  });
874
893
  }
875
894
  case "eventCreate": {
@@ -896,27 +915,33 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
896
915
  image,
897
916
  privacy_level: 2
898
917
  };
918
+ const event = await discordGuildActionRuntime.createScheduledEventDiscord(guildId, payload, withOpts());
899
919
  return jsonResult({
900
920
  ok: true,
901
- event: await discordGuildActionRuntime.createScheduledEventDiscord(guildId, payload, withOpts())
921
+ event
902
922
  });
903
923
  }
904
- case "channelCreate":
924
+ case "channelCreate": {
905
925
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
926
+ const channel = await discordGuildActionRuntime.createChannelDiscord(readDiscordChannelCreateParams(params), withOpts());
906
927
  return jsonResult({
907
928
  ok: true,
908
- channel: await discordGuildActionRuntime.createChannelDiscord(readDiscordChannelCreateParams(params), withOpts())
929
+ channel
909
930
  });
910
- case "channelEdit":
931
+ }
932
+ case "channelEdit": {
911
933
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
934
+ const channel = await discordGuildActionRuntime.editChannelDiscord(readDiscordChannelEditParams(params), withOpts());
912
935
  return jsonResult({
913
936
  ok: true,
914
- channel: await discordGuildActionRuntime.editChannelDiscord(readDiscordChannelEditParams(params), withOpts())
937
+ channel
915
938
  });
939
+ }
916
940
  case "channelDelete": {
917
941
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
918
942
  const channelId = readStringParam(params, "channelId", { required: true });
919
- return jsonResult(await discordGuildActionRuntime.deleteChannelDiscord(channelId, withOpts()));
943
+ const result = await discordGuildActionRuntime.deleteChannelDiscord(channelId, withOpts());
944
+ return jsonResult(result);
920
945
  }
921
946
  case "channelMove":
922
947
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
@@ -927,14 +952,15 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
927
952
  const guildId = readStringParam(params, "guildId", { required: true });
928
953
  const name = readStringParam(params, "name", { required: true });
929
954
  const position = readNonNegativeIntegerParam(params, "position");
955
+ const channel = await discordGuildActionRuntime.createChannelDiscord({
956
+ guildId,
957
+ name,
958
+ type: 4,
959
+ position: position ?? void 0
960
+ }, withOpts());
930
961
  return jsonResult({
931
962
  ok: true,
932
- category: await discordGuildActionRuntime.createChannelDiscord({
933
- guildId,
934
- name,
935
- type: 4,
936
- position: position ?? void 0
937
- }, withOpts())
963
+ category: channel
938
964
  });
939
965
  }
940
966
  case "categoryEdit": {
@@ -942,19 +968,21 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
942
968
  const categoryId = readStringParam(params, "categoryId", { required: true });
943
969
  const name = readStringParam(params, "name");
944
970
  const position = readNonNegativeIntegerParam(params, "position");
971
+ const channel = await discordGuildActionRuntime.editChannelDiscord({
972
+ channelId: categoryId,
973
+ name: name ?? void 0,
974
+ position: position ?? void 0
975
+ }, withOpts());
945
976
  return jsonResult({
946
977
  ok: true,
947
- category: await discordGuildActionRuntime.editChannelDiscord({
948
- channelId: categoryId,
949
- name: name ?? void 0,
950
- position: position ?? void 0
951
- }, withOpts())
978
+ category: channel
952
979
  });
953
980
  }
954
981
  case "categoryDelete": {
955
982
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
956
983
  const categoryId = readStringParam(params, "categoryId", { required: true });
957
- return jsonResult(await discordGuildActionRuntime.deleteChannelDiscord(categoryId, withOpts()));
984
+ const result = await discordGuildActionRuntime.deleteChannelDiscord(categoryId, withOpts());
985
+ return jsonResult(result);
958
986
  }
959
987
  case "channelPermissionSet": {
960
988
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
@@ -1010,9 +1038,10 @@ async function handleDiscordMessageManagementAction(ctx) {
1010
1038
  if (!ctx.isActionEnabled("permissions")) throw new Error("Discord permissions are disabled.");
1011
1039
  const channelId = ctx.resolveChannelId();
1012
1040
  await ctx.assertReadTargetAllowed({ channelId });
1041
+ const permissions = await discordMessagingActionRuntime.fetchChannelPermissionsDiscord(channelId, ctx.withOpts());
1013
1042
  return jsonResult({
1014
1043
  ok: true,
1015
- permissions: await discordMessagingActionRuntime.fetchChannelPermissionsDiscord(channelId, ctx.withOpts())
1044
+ permissions
1016
1045
  });
1017
1046
  }
1018
1047
  case "fetchMessage": {
@@ -1051,10 +1080,11 @@ async function handleDiscordMessageManagementAction(ctx) {
1051
1080
  after: readStringParam(ctx.params, "after"),
1052
1081
  around: readStringParam(ctx.params, "around")
1053
1082
  };
1083
+ const messages = assertDiscordMessageListResult(await discordMessagingActionRuntime.readMessagesDiscord(channelId, query, ctx.withOpts()));
1054
1084
  return jsonResult({
1055
1085
  ok: true,
1056
1086
  channelId,
1057
- messages: assertDiscordMessageListResult(await discordMessagingActionRuntime.readMessagesDiscord(channelId, query, ctx.withOpts())).map((message) => ctx.normalizeMessage(message))
1087
+ messages: messages.map((message) => ctx.normalizeMessage(message))
1058
1088
  });
1059
1089
  }
1060
1090
  case "editMessage": {
@@ -1063,9 +1093,10 @@ async function handleDiscordMessageManagementAction(ctx) {
1063
1093
  const messageId = readStringParam(ctx.params, "messageId", { required: true });
1064
1094
  const content = readStringParam(ctx.params, "content", { required: true });
1065
1095
  await ctx.assertReadTargetAllowed({ channelId });
1096
+ const message = await discordMessagingActionRuntime.editMessageDiscord(channelId, messageId, { content }, ctx.withOpts());
1066
1097
  return jsonResult({
1067
1098
  ok: true,
1068
- message: await discordMessagingActionRuntime.editMessageDiscord(channelId, messageId, { content }, ctx.withOpts())
1099
+ message
1069
1100
  });
1070
1101
  }
1071
1102
  case "deleteMessage": {
@@ -1096,9 +1127,10 @@ async function handleDiscordMessageManagementAction(ctx) {
1096
1127
  if (!ctx.isActionEnabled("pins")) throw new Error("Discord pins are disabled.");
1097
1128
  const channelId = ctx.resolveChannelId();
1098
1129
  await ctx.assertReadTargetAllowed({ channelId });
1130
+ const pins = await discordMessagingActionRuntime.listPinsDiscord(channelId, ctx.withOpts());
1099
1131
  return jsonResult({
1100
1132
  ok: true,
1101
- pins: (await discordMessagingActionRuntime.listPinsDiscord(channelId, ctx.withOpts())).map((pin) => ctx.normalizeMessage(pin))
1133
+ pins: pins.map((pin) => ctx.normalizeMessage(pin))
1102
1134
  });
1103
1135
  }
1104
1136
  case "searchMessages": {
@@ -1173,9 +1205,10 @@ async function handleDiscordReactionMessagingAction(ctx) {
1173
1205
  }
1174
1206
  if (isEmpty) {
1175
1207
  await ctx.assertReadTargetAllowed({ channelId });
1208
+ const removed = await discordMessagingActionRuntime.removeOwnReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions());
1176
1209
  return jsonResult({
1177
1210
  ok: true,
1178
- removed: (await discordMessagingActionRuntime.removeOwnReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions())).removed
1211
+ removed: removed.removed
1179
1212
  });
1180
1213
  }
1181
1214
  await ctx.assertReadTargetAllowed({ channelId });
@@ -1191,9 +1224,10 @@ async function handleDiscordReactionMessagingAction(ctx) {
1191
1224
  const messageId = readStringParam(ctx.params, "messageId", { required: true });
1192
1225
  const limit = readPositiveIntegerParam(ctx.params, "limit");
1193
1226
  await ctx.assertReadTargetAllowed({ channelId });
1227
+ const reactions = await discordMessagingActionRuntime.fetchReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions({ limit }));
1194
1228
  return jsonResult({
1195
1229
  ok: true,
1196
- reactions: await discordMessagingActionRuntime.fetchReactionsDiscord(channelId, messageId, ctx.withReactionRuntimeOptions({ limit }))
1230
+ reactions
1197
1231
  });
1198
1232
  }
1199
1233
  default: return;
@@ -1259,7 +1293,8 @@ async function appendDiscordThreadRenameResult(ctx, params) {
1259
1293
  };
1260
1294
  }
1261
1295
  try {
1262
- if (!isThreadChannelType$1((await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, ctx.withOpts())).type)) return {
1296
+ const channel = await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, ctx.withOpts());
1297
+ if (!isDiscordThreadChannelType(channel.type)) return {
1263
1298
  ...params.payload,
1264
1299
  warning: "Discord threadName was ignored because the send target is not a thread."
1265
1300
  };
@@ -1292,8 +1327,14 @@ async function handleDiscordMessageSendAction(ctx) {
1292
1327
  required: true,
1293
1328
  label: "stickerIds"
1294
1329
  });
1295
- await discordMessagingActionRuntime.sendStickerDiscord(to, stickerIds, ctx.withOpts({ content }));
1296
- return jsonResult({ ok: true });
1330
+ const result = await discordMessagingActionRuntime.sendStickerDiscord(to, stickerIds, ctx.withOpts({
1331
+ content,
1332
+ ...ctx.params.silent === true ? { silent: true } : {}
1333
+ }));
1334
+ return jsonResult({
1335
+ ok: true,
1336
+ result
1337
+ });
1297
1338
  }
1298
1339
  case "sendMessage": {
1299
1340
  if (!ctx.isActionEnabled("messages")) throw new Error("Discord message sends are disabled.");
@@ -1301,7 +1342,7 @@ async function handleDiscordMessageSendAction(ctx) {
1301
1342
  const asVoice = ctx.params.asVoice === true;
1302
1343
  const silent = ctx.params.silent === true;
1303
1344
  const suppressEmbeds = ctx.params.suppressEmbeds === void 0 ? void 0 : ctx.params.suppressEmbeds === true;
1304
- const rawComponents = ctx.params.components;
1345
+ const rawComponents = coerceDiscordComponentParam(ctx.params.components);
1305
1346
  const componentSpec = hasDiscordComponentObjectKeys(rawComponents) ? discordMessagingActionRuntime.readDiscordComponentSpec(rawComponents) : null;
1306
1347
  const components = Array.isArray(rawComponents) || typeof rawComponents === "function" ? rawComponents : void 0;
1307
1348
  const mediaUrl = readStringParam(ctx.params, "mediaUrl", { trim: false }) ?? readStringParam(ctx.params, "path", { trim: false }) ?? readStringParam(ctx.params, "filePath", { trim: false });
@@ -1324,25 +1365,26 @@ async function handleDiscordMessageSendAction(ctx) {
1324
1365
  ...componentSpec,
1325
1366
  text: normalizedContent
1326
1367
  };
1368
+ const result = await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
1369
+ ...ctx.withOpts(),
1370
+ silent,
1371
+ reply: resolveActionReplyReference(ctx, replyTo),
1372
+ sessionKey: sessionKey ?? void 0,
1373
+ agentId: agentId ?? void 0,
1374
+ mediaUrl: mediaUrl ?? void 0,
1375
+ filename: filename ?? void 0,
1376
+ mediaAccess: ctx.options?.mediaAccess,
1377
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1378
+ mediaReadFile: ctx.options?.mediaReadFile,
1379
+ ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1380
+ });
1327
1381
  return jsonResult(await appendDiscordThreadRenameResult(ctx, {
1328
1382
  payload: {
1329
1383
  ok: true,
1330
- result: await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
1331
- ...ctx.withOpts(),
1332
- silent,
1333
- reply: resolveActionReplyReference(ctx, replyTo),
1334
- sessionKey: sessionKey ?? void 0,
1335
- agentId: agentId ?? void 0,
1336
- mediaUrl: mediaUrl ?? void 0,
1337
- filename: filename ?? void 0,
1338
- mediaAccess: ctx.options?.mediaAccess,
1339
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1340
- mediaReadFile: ctx.options?.mediaReadFile,
1341
- ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1342
- }),
1384
+ result,
1343
1385
  components: true
1344
1386
  },
1345
- target: to,
1387
+ target: result.receipt?.threadId ?? to,
1346
1388
  threadName
1347
1389
  }));
1348
1390
  }
@@ -1350,41 +1392,43 @@ async function handleDiscordMessageSendAction(ctx) {
1350
1392
  if (!mediaUrl) throw new Error("Voice messages require a media file reference (mediaUrl, path, or filePath).");
1351
1393
  if (content && content.trim()) throw new Error("Voice messages cannot include text content (Discord limitation). Remove the content parameter.");
1352
1394
  assertMediaNotDataUrl(mediaUrl);
1395
+ const result = await discordMessagingActionRuntime.sendVoiceMessageDiscord(to, mediaUrl, {
1396
+ ...ctx.withOpts(),
1397
+ reply: resolveActionReplyReference(ctx, replyTo),
1398
+ silent,
1399
+ mediaAccess: ctx.options?.mediaAccess,
1400
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1401
+ mediaReadFile: ctx.options?.mediaReadFile
1402
+ });
1353
1403
  return jsonResult(await appendDiscordThreadRenameResult(ctx, {
1354
1404
  payload: {
1355
1405
  ok: true,
1356
- result: await discordMessagingActionRuntime.sendVoiceMessageDiscord(to, mediaUrl, {
1357
- ...ctx.withOpts(),
1358
- reply: resolveActionReplyReference(ctx, replyTo),
1359
- silent,
1360
- mediaAccess: ctx.options?.mediaAccess,
1361
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1362
- mediaReadFile: ctx.options?.mediaReadFile
1363
- }),
1406
+ result,
1364
1407
  voiceMessage: true
1365
1408
  },
1366
1409
  target: to,
1367
1410
  threadName
1368
1411
  }));
1369
1412
  }
1413
+ const result = await discordMessagingActionRuntime.sendMessageDiscord(to, content ?? "", {
1414
+ ...ctx.withOpts(),
1415
+ mediaAccess: ctx.options?.mediaAccess,
1416
+ mediaUrl,
1417
+ filename: filename ?? void 0,
1418
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1419
+ mediaReadFile: ctx.options?.mediaReadFile,
1420
+ reply: resolveActionReplyReference(ctx, replyTo),
1421
+ components,
1422
+ embeds,
1423
+ silent,
1424
+ ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1425
+ });
1370
1426
  return jsonResult(await appendDiscordThreadRenameResult(ctx, {
1371
1427
  payload: {
1372
1428
  ok: true,
1373
- result: await discordMessagingActionRuntime.sendMessageDiscord(to, content ?? "", {
1374
- ...ctx.withOpts(),
1375
- mediaAccess: ctx.options?.mediaAccess,
1376
- mediaUrl,
1377
- filename: filename ?? void 0,
1378
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1379
- mediaReadFile: ctx.options?.mediaReadFile,
1380
- reply: resolveActionReplyReference(ctx, replyTo),
1381
- components,
1382
- embeds,
1383
- silent,
1384
- ...suppressEmbeds === void 0 ? {} : { suppressEmbeds }
1385
- })
1429
+ result
1386
1430
  },
1387
- target: to,
1431
+ target: result.receipt?.threadId ?? to,
1388
1432
  threadName
1389
1433
  }));
1390
1434
  }
@@ -1402,9 +1446,10 @@ async function handleDiscordMessageSendAction(ctx) {
1402
1446
  appliedTags: readStringArrayParam(ctx.params, "appliedTags") ?? void 0
1403
1447
  };
1404
1448
  try {
1449
+ const thread = await discordMessagingActionRuntime.createThreadDiscord(channelId, payload, ctx.withOpts());
1405
1450
  return jsonResult({
1406
1451
  ok: true,
1407
- thread: await discordMessagingActionRuntime.createThreadDiscord(channelId, payload, ctx.withOpts())
1452
+ thread
1408
1453
  });
1409
1454
  } catch (error) {
1410
1455
  if (error instanceof DiscordThreadInitialMessageError) {
@@ -1436,14 +1481,15 @@ async function handleDiscordMessageSendAction(ctx) {
1436
1481
  guildId,
1437
1482
  channelTargetRequiredMessage: "Discord active thread lists require a wildcard channel allowlist so each read target can be authorized."
1438
1483
  });
1484
+ const threads = await discordMessagingActionRuntime.listThreadsDiscord({
1485
+ guildId,
1486
+ channelId,
1487
+ includeArchived,
1488
+ before,
1489
+ limit
1490
+ }, ctx.withOpts());
1439
1491
  return jsonResult(normalizeDiscordThreadListActionResult({
1440
- value: await discordMessagingActionRuntime.listThreadsDiscord({
1441
- guildId,
1442
- channelId,
1443
- includeArchived,
1444
- before,
1445
- limit
1446
- }, ctx.withOpts()),
1492
+ value: threads,
1447
1493
  guildId,
1448
1494
  channelId,
1449
1495
  includeArchived: includeArchived === true,
@@ -1457,16 +1503,18 @@ async function handleDiscordMessageSendAction(ctx) {
1457
1503
  const content = readStringParam(ctx.params, "content", { required: true });
1458
1504
  const mediaUrl = readStringParam(ctx.params, "mediaUrl");
1459
1505
  const replyTo = readStringParam(ctx.params, "replyTo");
1506
+ const result = await discordMessagingActionRuntime.sendMessageDiscord(`channel:${channelId}`, content, {
1507
+ ...ctx.withOpts(),
1508
+ mediaUrl,
1509
+ mediaAccess: ctx.options?.mediaAccess,
1510
+ mediaLocalRoots: ctx.options?.mediaLocalRoots,
1511
+ mediaReadFile: ctx.options?.mediaReadFile,
1512
+ reply: resolveActionReplyReference(ctx, replyTo),
1513
+ ...ctx.params.silent === true ? { silent: true } : {}
1514
+ });
1460
1515
  return jsonResult({
1461
1516
  ok: true,
1462
- result: await discordMessagingActionRuntime.sendMessageDiscord(`channel:${channelId}`, content, {
1463
- ...ctx.withOpts(),
1464
- mediaUrl,
1465
- mediaAccess: ctx.options?.mediaAccess,
1466
- mediaLocalRoots: ctx.options?.mediaLocalRoots,
1467
- mediaReadFile: ctx.options?.mediaReadFile,
1468
- reply: resolveActionReplyReference(ctx, replyTo)
1469
- })
1517
+ result
1470
1518
  });
1471
1519
  }
1472
1520
  default: return;
@@ -1543,16 +1591,19 @@ async function handleDiscordModerationAction(action, params, isActionEnabled, cf
1543
1591
  cfg
1544
1592
  });
1545
1593
  switch (command.action) {
1546
- case "timeout": return jsonResult({
1547
- ok: true,
1548
- member: await discordModerationActionRuntime.timeoutMemberDiscord({
1594
+ case "timeout": {
1595
+ const member = await discordModerationActionRuntime.timeoutMemberDiscord({
1549
1596
  guildId: command.guildId,
1550
1597
  userId: command.userId,
1551
1598
  durationMinutes: command.durationMinutes,
1552
1599
  until: command.until,
1553
1600
  reason: command.reason
1554
- }, withOpts())
1555
- });
1601
+ }, withOpts());
1602
+ return jsonResult({
1603
+ ok: true,
1604
+ member
1605
+ });
1606
+ }
1556
1607
  case "kick":
1557
1608
  await discordModerationActionRuntime.kickMemberDiscord({
1558
1609
  guildId: command.guildId,
@@ -1587,13 +1638,13 @@ const VALID_STATUSES = /* @__PURE__ */ new Set([
1587
1638
  "idle",
1588
1639
  "invisible"
1589
1640
  ]);
1590
- async function handleDiscordPresenceAction(action, params, isActionEnabled) {
1641
+ async function handleDiscordPresenceAction(action, params, isActionEnabled, cfg) {
1591
1642
  if (action !== "setPresence") throw new Error(`Unknown presence action: ${action}`);
1592
1643
  if (!isActionEnabled("presence", false)) throw new Error("Discord presence changes are disabled.");
1593
- const accountId = readStringParam(params, "accountId");
1644
+ const accountId = readStringParam(params, "accountId") ?? resolveDefaultDiscordAccountId(cfg);
1594
1645
  const gateway = getGateway(accountId);
1595
- if (!gateway) throw new Error(`Discord gateway not available${accountId ? ` for account "${accountId}"` : ""}. The bot may not be connected.`);
1596
- if (!gateway.isConnected) throw new Error(`Discord gateway is not connected${accountId ? ` for account "${accountId}"` : ""}.`);
1646
+ if (!gateway) throw new Error(`Discord gateway not available for account "${accountId}". The bot may not be connected.`);
1647
+ if (!gateway.isConnected) throw new Error(`Discord gateway is not connected for account "${accountId}".`);
1597
1648
  const statusRaw = readStringParam(params, "status") ?? "online";
1598
1649
  if (!VALID_STATUSES.has(statusRaw)) throw new Error(`Invalid status "${statusRaw}". Must be one of: ${[...VALID_STATUSES].join(", ")}`);
1599
1650
  const status = statusRaw;
@@ -1681,17 +1732,17 @@ const moderationActions = /* @__PURE__ */ new Set([
1681
1732
  "kick",
1682
1733
  "ban"
1683
1734
  ]);
1684
- const presenceActions = /* @__PURE__ */ new Set(["setPresence"]);
1685
1735
  async function handleDiscordAction(params, cfg, options) {
1686
1736
  const action = readStringParam(params, "action", { required: true });
1737
+ const accountId = readStringParam(params, "accountId");
1687
1738
  const isActionEnabled = createDiscordActionGate({
1688
1739
  cfg,
1689
- accountId: readStringParam(params, "accountId")
1740
+ accountId
1690
1741
  });
1691
1742
  if (messagingActions.has(action)) return await handleDiscordMessagingAction(action, params, isActionEnabled, cfg, options);
1692
1743
  if (guildActions.has(action)) return await handleDiscordGuildAction(action, params, isActionEnabled, cfg, options);
1693
1744
  if (moderationActions.has(action)) return await handleDiscordModerationAction(action, params, isActionEnabled, cfg);
1694
- if (presenceActions.has(action)) return await handleDiscordPresenceAction(action, params, isActionEnabled);
1745
+ if (action === "setPresence") return await handleDiscordPresenceAction(action, params, isActionEnabled, cfg);
1695
1746
  throw new Error(`Unknown action: ${action}`);
1696
1747
  }
1697
1748
  //#endregion