@openclaw/discord 2026.8.1-beta.2 → 2026.9.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/dist/{account-inspect-CqzrH14k.js → account-inspect-BDfKyuvL.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-DJTf1LtA.js → accounts-CfQ-vSyf.js} +34 -1
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{activities-api-DS7vpdtp.js → activities-api-q-9PaaHH.js} +134 -175
  6. package/dist/activities-api.js +1 -1
  7. package/dist/api.js +17 -17
  8. package/dist/{approval-handler.runtime-B6yEV79q.js → approval-handler.runtime-B7qhK3fR.js} +29 -106
  9. package/dist/{audit-Db-rlntl.js → audit-CBEv_ERu.js} +5 -5
  10. package/dist/{channel-CnnbJSt5.js → channel-Dx1tMTfx.js} +72 -50
  11. package/dist/{channel-actions.runtime-CLKrx6tr.js → channel-actions.runtime-CLWWu9nC.js} +28 -43
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/channel-type-CVLZyGYS.js +7 -0
  15. package/dist/{channel.setup-BFAO-V1P.js → channel.setup-DOzXS2Pk.js} +5 -5
  16. package/dist/{outbound-session-route-DxLkrgKQ.js → components-B9V5o361.js} +8 -70
  17. package/dist/{config-schema-BgEskFAs.js → config-schema-BR13IAx6.js} +33 -7
  18. package/dist/conversation-binding-route-DJYrY2TQ.js +43 -0
  19. package/dist/{directory-config-BVX7Cflc.js → directory-config-BK6eqekJ.js} +2 -2
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-DGIGxpIo.js → directory-live-DSAJSrJk.js} +3 -3
  22. package/dist/{doctor-BzC-TLnB.js → doctor-Cm7Y1pJ2.js} +33 -12
  23. package/dist/doctor-contract-api.js +2 -2
  24. package/dist/{handle-action.guild-admin-BNVTUISF.js → handle-action.guild-admin-BdwCRHmm.js} +9 -5
  25. package/dist/index.js +3 -4
  26. package/dist/{message-handler-Unk_f10F.js → message-handler-BXpWZyni.js} +82 -6
  27. package/dist/{message-handler.preflight-C9zecxR9.js → message-handler.preflight-Ba5LAY_X.js} +38 -50
  28. package/dist/{message-handler.process-DWQ6UHHu.js → message-handler.process-3HEzmemS.js} +204 -234
  29. package/dist/{message-utils-BSCPVgy0.js → message-text-aiwO5R2F.js} +41 -40
  30. package/dist/{outbound-adapter-D9nRivT1.js → outbound-adapter-BE4jSq2d.js} +113 -88
  31. package/dist/{outbound-components-cTzwBJ60.js → outbound-components-oLpg8Qzb.js} +3 -3
  32. package/dist/outbound-session-route-Cg15ZFJd.js +625 -0
  33. package/dist/owner-access-UlYi9t0M.js +107 -0
  34. package/dist/{pluralkit-DdiJ9KMK.js → pluralkit-Tiyl70dx.js} +1 -1
  35. package/dist/{probe-Bl-k5_Ku.js → probe-n6ZXxK8V.js} +1 -1
  36. package/dist/{probe.runtime-M9fREKvp.js → probe.runtime-CN4bdPfZ.js} +1 -1
  37. package/dist/{provider-DvSNb-2v.js → provider-B11xwilq.js} +720 -1325
  38. package/dist/{provider-session.runtime-BUEqD0rA.js → provider-session.runtime-B9xe-Qaf.js} +3 -3
  39. package/dist/provider.runtime-DiYaHvOz.js +2 -0
  40. package/dist/{realtime-session.runtime-C7wen-aF.js → realtime-session.runtime-CU8IQUS-.js} +97 -98
  41. package/dist/{resolve-allowlist-common-D04lpEzb.js → resolve-allowlist-common-BLoYaxEG.js} +2 -2
  42. package/dist/{resolve-channels-Dm7jEeg6.js → resolve-channels-C2sT_n67.js} +5 -4
  43. package/dist/{resolve-users-bktrCUUU.js → resolve-users-CzpjLwjy.js} +2 -2
  44. package/dist/{retry-CLpJcXXf.js → retry-Cv4jCU5Z.js} +111 -18
  45. package/dist/{runtime-DGsSyDTS.js → runtime-BHrTlFkf.js} +88 -85
  46. package/dist/{runtime-DoHjckYm.js → runtime-CY4PRMF-.js} +9 -10
  47. package/dist/runtime-api.js +19 -25
  48. package/dist/{sdk-runtime-QpY8PvCh.js → sdk-runtime-4geQHtXc.js} +57 -89
  49. package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
  50. package/dist/secret-contract-api.js +1 -1
  51. package/dist/security-audit-contract-api.js +1 -1
  52. package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-BVKF9VtY.js} +1 -1
  53. package/dist/{send-B7Q6Oc1I.js → send-C49MFF9j.js} +82 -19
  54. package/dist/{send.components-iJyFXw9L.js → send.components-DKKAw5VX.js} +21 -38
  55. package/dist/{send.outbound-DS5tHwfR.js → send.outbound-zam0TrZx.js} +77 -78
  56. package/dist/{send.shared-BmwFjW6T.js → send.shared-JjljcV4O.js} +135 -120
  57. package/dist/{sender-identity-QtalnCYv.js → sender-identity-BJtfyise.js} +1 -1
  58. package/dist/setup-plugin-api.js +1 -1
  59. package/dist/{shared-BIXIX6uJ.js → shared-_5EcP4jW.js} +38 -14
  60. package/dist/subagent-hooks-DQzvOptn.js +49 -0
  61. package/dist/subagent-hooks-api.js +1 -6
  62. package/dist/{system-events-CTqDf6_s.js → system-events-C7yxaHWP.js} +2 -2
  63. package/dist/{target-resolver-maOKSqO0.js → target-resolver-vxIh6O3-.js} +3 -3
  64. package/dist/targets-CtTKvntJ.js +3 -0
  65. package/dist/{thread-bindings-3L8p82GV.js → thread-bindings-DW5F9vat.js} +28 -26
  66. package/dist/{thread-bindings.manager-DCIH6WDC.js → thread-bindings.manager-ByOtwjo_.js} +9 -12
  67. package/dist/{thread-bindings.session-updates-bJ2KQFY6.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
  68. package/dist/{thread-bindings.state-aeV8HNgV.js → thread-bindings.state-D8OMdk4O.js} +1 -1
  69. package/dist/threading-agH1T_6s.js +478 -0
  70. package/dist/transcripts-source-BR11iHA4.js +265 -0
  71. package/dist/transcripts-source-api.js +7 -2
  72. package/dist/{typing-CS-nNVoe.js → typing-Dc_YMY2e.js} +1 -1
  73. package/dist/{voice-runtime-BEdqNcST.js → voice-runtime-DIeaa8fJ.js} +230 -148
  74. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
  75. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
  76. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
  77. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
  78. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
  80. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  81. package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
  82. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
  83. package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
  84. package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
  85. package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
  86. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
  87. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
  88. package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
  89. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  90. package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
  96. package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
  97. package/node_modules/discord-api-types/CHANGELOG.md +8 -0
  98. package/node_modules/discord-api-types/package.json +4 -4
  99. package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
  100. package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
  101. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
  102. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
  103. package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
  104. package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
  105. package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
  106. package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
  107. package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
  108. package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
  109. package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
  110. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
  111. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
  113. package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
  114. package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
  115. package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
  116. package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
  117. package/node_modules/typebox/build/format/date.d.mts +1 -1
  118. package/node_modules/typebox/build/format/date.mjs +1 -1
  119. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  120. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  121. package/node_modules/typebox/build/format/email.d.mts +1 -1
  122. package/node_modules/typebox/build/format/email.mjs +2 -2
  123. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  124. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  125. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  126. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  127. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  128. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  129. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  130. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  131. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  132. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  133. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  134. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  135. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  136. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  137. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  138. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  139. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  140. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  141. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  142. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  143. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  144. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  145. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  146. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  147. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  148. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  149. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  150. package/node_modules/typebox/build/format/iri.mjs +26 -8
  151. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  152. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  153. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  154. package/node_modules/typebox/build/format/regex.mjs +2 -6
  155. package/node_modules/typebox/build/format/time.d.mts +2 -2
  156. package/node_modules/typebox/build/format/time.mjs +19 -14
  157. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  158. package/node_modules/typebox/build/format/uri.mjs +3 -130
  159. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  160. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  161. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  162. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  163. package/node_modules/typebox/build/format/url.d.mts +3 -3
  164. package/node_modules/typebox/build/format/url.mjs +4 -5
  165. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  166. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  167. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  168. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  169. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  170. package/node_modules/typebox/build/guard/string.mjs +7 -7
  171. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  172. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  173. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  174. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  175. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  176. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  177. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  178. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  179. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  180. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  181. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  182. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  183. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  184. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  185. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  186. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  187. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  188. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  189. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  190. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  191. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  192. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  193. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  194. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  195. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  196. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  197. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  198. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  199. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  200. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  201. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  202. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  203. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  204. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  205. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  206. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  207. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  208. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  209. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  210. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  211. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  212. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  213. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  214. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  215. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  216. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  217. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  218. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  219. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  220. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  221. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  222. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  223. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  224. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  225. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  226. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  227. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  228. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  229. package/node_modules/typebox/package.json +27 -27
  230. package/node_modules/typebox/readme.md +79 -82
  231. package/node_modules/undici/docs/docs/api/Client.md +21 -8
  232. package/node_modules/undici/lib/api/readable.js +33 -43
  233. package/node_modules/undici/lib/core/connect.js +16 -2
  234. package/node_modules/undici/lib/core/symbols.js +1 -0
  235. package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
  236. package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
  237. package/node_modules/undici/lib/dispatcher/client.js +74 -29
  238. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
  239. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
  240. package/node_modules/undici/lib/handler/retry-handler.js +7 -2
  241. package/node_modules/undici/lib/interceptor/cache.js +5 -2
  242. package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
  243. package/node_modules/undici/lib/mock/mock-utils.js +213 -24
  244. package/node_modules/undici/lib/util/cache.js +2 -4
  245. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  246. package/node_modules/undici/package.json +1 -1
  247. package/node_modules/undici/types/client.d.ts +40 -0
  248. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  249. package/node_modules/ws/package.json +1 -1
  250. package/openclaw.plugin.json +12 -6
  251. package/package.json +8 -10
  252. package/dist/approval-message-safety-AcIxvrf3.js +0 -140
  253. package/dist/audit-core-xwjIczO0.js +0 -105
  254. package/dist/channel-actions-5s_hjYKd.js +0 -208
  255. package/dist/channel-api-CAJ0wMoV.js +0 -21
  256. package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
  257. package/dist/provider.runtime-C9PnJZbZ.js +0 -2
  258. package/dist/runtime-api.actions.js +0 -3
  259. package/dist/runtime-api.lookup.js +0 -7
  260. package/dist/runtime-api.monitor-CHxrFPnW.js +0 -5
  261. package/dist/runtime-api.monitor.js +0 -8
  262. package/dist/runtime-api.send.js +0 -7
  263. package/dist/runtime-api.threads.js +0 -5
  264. package/dist/send.reactions-BAn0iiVQ.js +0 -78
  265. package/dist/send.receipt-IPI1p-SP.js +0 -66
  266. package/dist/subagent-hooks-CTt5KCJr.js +0 -120
  267. package/dist/subagent-progress-DhaE_h8a.js +0 -109
  268. package/dist/targets-yUFTHoAx.js +0 -3
  269. package/dist/transcripts-source-CfFMexGt.js +0 -123
  270. package/node_modules/p-map/index.d.ts +0 -155
  271. package/node_modules/p-map/index.js +0 -285
  272. package/node_modules/p-map/license +0 -9
  273. package/node_modules/p-map/package.json +0 -57
  274. package/node_modules/p-map/readme.md +0 -190
  275. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  276. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  277. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  278. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  279. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  280. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  281. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  282. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  283. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  284. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
  285. package/dist/{allow-list-DnxIlPP2.js → allow-list-BDMimASD.js} +1 -1
  286. package/dist/{doctor-contract-DLa-BTiU.js → doctor-contract-DsWvKIXF.js} +1 -1
  287. package/dist/{security-audit-jGnJF__m.js → security-audit-BfJhAXZp.js} +1 -1
@@ -1,11 +1,9 @@
1
- import { $ as LinkButton, G as Label, J as TextInput, K as Modal, Q as File, W as CheckboxGroup, X as ChannelSelectMenu, Y as Button, Z as Container, at as Separator, ct as Thumbnail, dt as parseCustomId, et as MediaGallery, it as Section, lt as UserSelectMenu, nt as RoleSelectMenu, ot as StringSelectMenu, p as parseDiscordTarget, q as RadioGroup, rt as Row, st as TextDisplay, tn as __exportAll, tt as MentionableSelectMenu } from "./retry-CLpJcXXf.js";
2
- import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
3
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
1
+ import { $ as TextInput, Q as RadioGroup, X as Label, Y as CheckboxGroup, Z as Modal, at as MediaGallery, ct as Row, dt as StringSelectMenu, et as Button, ft as TextDisplay, gt as parseCustomId, it as LinkButton, lt as Section, mt as UserSelectMenu, nt as Container, on as __exportAll, ot as MentionableSelectMenu, pt as Thumbnail, rt as File, st as RoleSelectMenu, tt as ChannelSelectMenu, ut as Separator } from "./retry-Cv4jCU5Z.js";
4
2
  import { ButtonStyle, MessageFlags, TextInputStyle } from "discord-api-types/v10";
5
3
  import crypto from "node:crypto";
6
- import { reduceLegacyInteractiveReply, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
4
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
+ import { legacyInteractiveReplyToPresentation, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
7
6
  import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
8
- import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
9
7
  //#region extensions/discord/src/custom-id-codec.ts
10
8
  /**
11
9
  * URI-component codec for values embedded in `k=v;` custom-id grammars
@@ -232,6 +230,7 @@ function parseButtonSpec(raw, label) {
232
230
  callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
233
231
  emoji: readOptionalEmoji(obj.emoji, `${label}.emoji`),
234
232
  disabled: typeof obj.disabled === "boolean" ? obj.disabled : void 0,
233
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
235
234
  allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
236
235
  };
237
236
  }
@@ -398,7 +397,6 @@ function readDiscordComponentSpec(raw) {
398
397
  const blocksRaw = obj.blocks;
399
398
  const blocks = Array.isArray(blocksRaw) ? blocksRaw.map((entry, idx) => parseComponentBlock(entry, `components.blocks[${idx}]`)) : void 0;
400
399
  const modalRaw = obj.modal;
401
- const reusable = typeof obj.reusable === "boolean" ? obj.reusable : void 0;
402
400
  let modal;
403
401
  if (modalRaw !== void 0) {
404
402
  const modalObj = requireObject(modalRaw, "components.modal");
@@ -417,7 +415,7 @@ function readDiscordComponentSpec(raw) {
417
415
  }
418
416
  return {
419
417
  text: normalizeOptionalString(obj.text),
420
- reusable,
418
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
421
419
  container: typeof obj.container === "object" && obj.container && !Array.isArray(obj.container) ? {
422
420
  accentColor: obj.container.accentColor,
423
421
  spoiler: typeof obj.container.spoiler === "boolean" ? obj.container.spoiler : void 0
@@ -996,23 +994,7 @@ function appendDiscordSelectBlock(blocks, block) {
996
994
  * @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
997
995
  */
998
996
  function buildDiscordInteractiveComponents(interactive) {
999
- const blocks = reduceLegacyInteractiveReply(interactive, [], (state, block) => {
1000
- if (block.type === "text") {
1001
- const text = block.text.trim();
1002
- if (text) state.push({
1003
- type: "text",
1004
- text
1005
- });
1006
- return state;
1007
- }
1008
- if (block.type === "buttons") {
1009
- appendDiscordButtonBlocks(state, block.buttons);
1010
- return state;
1011
- }
1012
- if (block.type === "select") appendDiscordSelectBlock(state, block);
1013
- return state;
1014
- });
1015
- return blocks.length > 0 ? { blocks } : void 0;
997
+ return buildDiscordPresentationComponents(interactive ? legacyInteractiveReplyToPresentation(interactive) : void 0);
1016
998
  }
1017
999
  function buildDiscordPresentationComponents(presentation) {
1018
1000
  if (!presentation) return;
@@ -1023,7 +1005,7 @@ function buildDiscordPresentationComponents(presentation) {
1023
1005
  });
1024
1006
  for (const block of presentation.blocks) {
1025
1007
  if (block.type === "text" || block.type === "context") {
1026
- const text = block.text.trim();
1008
+ const text = block.text;
1027
1009
  if (text) blocks.push({
1028
1010
  type: "text",
1029
1011
  text: block.type === "context" ? `-# ${text}` : text
@@ -1071,48 +1053,4 @@ function formatDiscordComponentEventText(params) {
1071
1053
  return `Selected ${values.join(", ")} from "${params.label}".`;
1072
1054
  }
1073
1055
  //#endregion
1074
- //#region extensions/discord/src/outbound-session-route.ts
1075
- function resolveDiscordOutboundSessionRoute(params) {
1076
- const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
1077
- if (!parsed) return null;
1078
- const explicitThreadId = params.threadId == null ? void 0 : String(params.threadId).trim();
1079
- const peerId = explicitThreadId || parsed.id;
1080
- const isDm = parsed.kind === "user" && !explicitThreadId;
1081
- const recipientSessionExact = /^\d+$/.test(peerId);
1082
- const peer = {
1083
- kind: isDm ? "direct" : "channel",
1084
- id: peerId
1085
- };
1086
- const baseSessionKey = buildOutboundBaseSessionKey({
1087
- cfg: params.cfg,
1088
- agentId: params.agentId,
1089
- channel: "discord",
1090
- accountId: params.accountId,
1091
- peer
1092
- });
1093
- return buildThreadAwareOutboundSessionRoute({
1094
- route: {
1095
- sessionKey: baseSessionKey,
1096
- baseSessionKey,
1097
- recipientSessionExact,
1098
- peer,
1099
- chatType: isDm ? "direct" : "channel",
1100
- from: isDm ? `discord:${peerId}` : `discord:channel:${peerId}`,
1101
- to: isDm ? `user:${peerId}` : `channel:${peerId}`
1102
- },
1103
- threadId: params.threadId,
1104
- precedence: ["threadId"],
1105
- useSuffix: false
1106
- });
1107
- }
1108
- function resolveDiscordOutboundTargetKindHint(params) {
1109
- const resolvedKind = params.resolvedTarget?.kind;
1110
- if (resolvedKind === "user") return "user";
1111
- if (resolvedKind === "group" || resolvedKind === "channel") return "channel";
1112
- const target = params.target.trim();
1113
- if (/^channel:/i.test(target)) return "channel";
1114
- if (/^(user:|discord:|@|<@!?)/i.test(target)) return "user";
1115
- return "channel";
1116
- }
1117
- //#endregion
1118
- export { parseDiscordActivityCustomIdForInteraction as C, parseDiscordModalCustomIdForInteraction as D, parseDiscordModalCustomId as E, decodeCustomIdComponent as O, parseDiscordActivityCustomId as S, parseDiscordComponentCustomIdForInteraction as T, DISCORD_COMPONENT_CUSTOM_ID_KEY as _, buildDiscordPresentationComponents as a, buildDiscordComponentCustomId as b, buildExecApprovalCustomId as c, createDiscordFormModal as d, buildDiscordComponentMessage as f, resolveDiscordComponentAttachmentName as g, readDiscordComponentSpec as h, buildDiscordInteractiveComponents as i, encodeCustomIdComponent as k, parseExecApprovalData as l, DISCORD_COMPONENT_ATTACHMENT_PREFIX as m, components_exports as n, shared_interactive_exports as o, buildDiscordComponentMessageFlags as p, formatDiscordComponentEventText as r, parseDiscordQuestionData as s, resolveDiscordOutboundSessionRoute as t, DiscordFormModal as u, DISCORD_MODAL_CUSTOM_ID_KEY as v, parseDiscordComponentCustomId as w, buildDiscordModalCustomId as x, buildDiscordActivityCustomId as y };
1056
+ export { parseDiscordComponentCustomId as C, decodeCustomIdComponent as D, parseDiscordModalCustomIdForInteraction as E, encodeCustomIdComponent as O, parseDiscordActivityCustomIdForInteraction as S, parseDiscordModalCustomId as T, DISCORD_MODAL_CUSTOM_ID_KEY as _, shared_interactive_exports as a, buildDiscordModalCustomId as b, parseExecApprovalData as c, buildDiscordComponentMessage as d, buildDiscordComponentMessageFlags as f, DISCORD_COMPONENT_CUSTOM_ID_KEY as g, resolveDiscordComponentAttachmentName as h, buildDiscordPresentationComponents as i, DiscordFormModal as l, readDiscordComponentSpec as m, formatDiscordComponentEventText as n, parseDiscordQuestionData as o, DISCORD_COMPONENT_ATTACHMENT_PREFIX as p, buildDiscordInteractiveComponents as r, buildExecApprovalCustomId as s, components_exports as t, createDiscordFormModal as u, buildDiscordActivityCustomId as v, parseDiscordComponentCustomIdForInteraction as w, parseDiscordActivityCustomId as x, buildDiscordComponentCustomId as y };
@@ -1,8 +1,10 @@
1
+ import { normalizeLegacyDmAliases } from "openclaw/plugin-sdk/channel-config-helpers";
1
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
3
  import { buildSecretInputSchema, registerSensitiveConfigSchema } from "openclaw/plugin-sdk/secret-input";
4
+ import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
3
5
  import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, TtsConfigSchema, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildCommonChannelAccountShape, buildGroupEntrySchema, requireAllowlistAllowFrom, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
6
+ import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
4
7
  import { z } from "zod";
5
- import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
6
8
  //#region extensions/discord/src/config-ui-hints.ts
7
9
  const discordChannelConfigUiHints = {
8
10
  "": {
@@ -168,7 +170,11 @@ const discordChannelConfigUiHints = {
168
170
  },
169
171
  "voice.autoJoin": {
170
172
  label: "Discord Voice Auto-Join",
171
- help: "Voice channels to auto-join on startup (list of guildId/channelId entries)."
173
+ help: "Voice channels to auto-join (list of guildId/channelId entries). Set whenOccupied on an entry to connect only while humans are present."
174
+ },
175
+ "voice.autoJoin.*.whenOccupied": {
176
+ label: "Discord Voice Auto-Join When Occupied",
177
+ help: "Join and remain in this auto-managed voice channel only while at least one human is present. The OpenClaw bot and other bots do not count. Default: false."
172
178
  },
173
179
  "voice.allowedChannels": {
174
180
  label: "Discord Voice Allowed Channels",
@@ -301,7 +307,7 @@ const discordChannelConfigUiHints = {
301
307
  },
302
308
  activities: {
303
309
  label: "Discord Activities",
304
- help: "Enable Discord Activity widgets for this account. Routes, the agent tool, and the launch handler remain disabled when this block is absent."
310
+ help: "Enable the Discord Activity presenter for the core show_widget tool on this account. Activity routes and the launch handler remain disabled when this block is absent."
305
311
  },
306
312
  "activities.clientSecret": {
307
313
  label: "Discord Activities Client Secret",
@@ -389,7 +395,8 @@ const DiscordGuildSchema = buildGroupEntrySchema({
389
395
  ] });
390
396
  const DiscordVoiceAutoJoinSchema = z.object({
391
397
  guildId: z.string().min(1),
392
- channelId: z.string().min(1)
398
+ channelId: z.string().min(1),
399
+ whenOccupied: z.boolean().optional()
393
400
  }).strict();
394
401
  const DiscordVoiceAllowedChannelSchema = z.object({
395
402
  guildId: z.string().min(1),
@@ -454,7 +461,7 @@ const DiscordVoiceSchema = z.object({
454
461
  captureSilenceGraceMs: z.number().int().positive().max(3e4).optional(),
455
462
  tts: TtsConfigSchema.optional()
456
463
  }).strict().optional();
457
- const DiscordAccountSchema = z.object({
464
+ const DiscordAccountSchemaBase = z.object({
458
465
  ...buildCommonChannelAccountShape({
459
466
  omit: ["groupAllowFrom"],
460
467
  groupPolicyDefault: true,
@@ -583,7 +590,25 @@ const DiscordAccountSchema = z.object({
583
590
  path: ["autoPresence", "minUpdateIntervalMs"]
584
591
  });
585
592
  });
586
- const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordAccountSchema.extend({
593
+ function normalizeShippedDiscordDmAliases(value) {
594
+ const entry = asObjectRecord(value);
595
+ if (!entry) return value;
596
+ const updated = normalizeLegacyDmAliases({
597
+ entry,
598
+ pathPrefix: "channels.discord",
599
+ changes: []
600
+ }).entry;
601
+ const dm = asObjectRecord(updated.dm);
602
+ if (!dm || dm.policy === void 0 && dm.allowFrom === void 0) return updated;
603
+ const { policy: _policy, allowFrom: _allowFrom, ...retainedDm } = dm;
604
+ const { dm: _dm, ...rest } = updated;
605
+ return Object.keys(retainedDm).length > 0 ? {
606
+ ...rest,
607
+ dm: retainedDm
608
+ } : rest;
609
+ }
610
+ const DiscordAccountSchema = z.preprocess(normalizeShippedDiscordDmAliases, DiscordAccountSchemaBase);
611
+ const DiscordConfigSchemaBase = DiscordAccountSchemaBase.extend({
587
612
  accounts: z.record(z.string(), DiscordAccountSchema.optional()).optional(),
588
613
  defaultAccount: z.string().optional()
589
614
  }).superRefine((value, ctx) => {
@@ -631,6 +656,7 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordAccountSchema
631
656
  message: "channels.discord.accounts.*.dmPolicy=\"allowlist\" requires channels.discord.accounts.*.allowFrom (or channels.discord.allowFrom) to contain at least one sender ID"
632
657
  });
633
658
  }
634
- }), { uiHints: discordChannelConfigUiHints });
659
+ });
660
+ const DiscordChannelConfigSchema = buildChannelConfigSchema(z.preprocess(normalizeShippedDiscordDmAliases, DiscordConfigSchemaBase), { uiHints: discordChannelConfigUiHints });
635
661
  //#endregion
636
662
  export { DiscordChannelConfigSchema as t };
@@ -0,0 +1,43 @@
1
+ import { l as shouldIgnoreStaleDiscordRouteBinding } from "./outbound-session-route-Cg15ZFJd.js";
2
+ import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
3
+ import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
4
+ //#region extensions/discord/src/monitor/conversation-binding-route.ts
5
+ function resolveDiscordConversationBindingRoute(params) {
6
+ let runtimeRoute = resolveRuntimeConversationBindingRoute({
7
+ route: params.route,
8
+ touchBinding: params.touchBinding,
9
+ conversation: {
10
+ channel: "discord",
11
+ accountId: params.accountId,
12
+ conversationId: params.runtimeConversationId,
13
+ parentConversationId: params.parentConversationId
14
+ }
15
+ });
16
+ if (shouldIgnoreStaleDiscordRouteBinding({
17
+ bindingRecord: runtimeRoute.bindingRecord,
18
+ route: params.route
19
+ })) {
20
+ logVerbose(`discord: ignoring stale route binding for conversation ${params.runtimeConversationId} (${runtimeRoute.bindingRecord?.targetSessionKey} -> ${params.route.sessionKey})`);
21
+ runtimeRoute = {
22
+ bindingOwnerAvailable: true,
23
+ bindingRecord: null,
24
+ route: params.route
25
+ };
26
+ }
27
+ const configuredRoute = runtimeRoute.bindingRecord ? null : resolveConfiguredBindingRoute({
28
+ cfg: params.cfg,
29
+ route: params.route,
30
+ conversation: {
31
+ channel: "discord",
32
+ accountId: params.accountId,
33
+ conversationId: params.configuredConversationId,
34
+ parentConversationId: params.parentConversationId
35
+ }
36
+ });
37
+ return {
38
+ runtimeRoute,
39
+ configuredRoute
40
+ };
41
+ }
42
+ //#endregion
43
+ export { resolveDiscordConversationBindingRoute as t };
@@ -1,5 +1,5 @@
1
- import { tn as __exportAll } from "./retry-CLpJcXXf.js";
2
- import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-DJTf1LtA.js";
1
+ import { on as __exportAll } from "./retry-Cv4jCU5Z.js";
2
+ import { l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
3
3
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
4
4
  import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
5
5
  //#region extensions/discord/src/directory-config.ts
@@ -1,4 +1,4 @@
1
- import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BVX7Cflc.js";
1
+ import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BK6eqekJ.js";
2
2
  //#region extensions/discord/directory-contract-api.ts
3
3
  const discordDirectoryContractPlugin = {
4
4
  id: "discord",
@@ -1,7 +1,7 @@
1
- import { tn as __exportAll } from "./retry-CLpJcXXf.js";
2
- import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
1
+ import { on as __exportAll } from "./retry-Cv4jCU5Z.js";
2
+ import { c as resolveDiscordAccount, m as normalizeDiscordToken } from "./accounts-CfQ-vSyf.js";
3
3
  import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-DNVbJyEy.js";
4
- import { a as normalizeDiscordSlug } from "./allow-list-DnxIlPP2.js";
4
+ import { a as normalizeDiscordSlug } from "./allow-list-BDMimASD.js";
5
5
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  //#region extensions/discord/src/directory-cache-state.ts
@@ -1,10 +1,11 @@
1
- import { o as resolveDefaultDiscordAccountId } from "./accounts-DJTf1LtA.js";
2
- import { t as inspectDiscordAccount } from "./account-inspect-CqzrH14k.js";
3
- import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-BIXIX6uJ.js";
4
- import { n as normalizeCompatibilityConfig } from "./doctor-contract-DLa-BTiU.js";
1
+ import { s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
2
+ import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-BR11iHA4.js";
3
+ import { t as inspectDiscordAccount } from "./account-inspect-BDfKyuvL.js";
4
+ import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-_5EcP4jW.js";
5
+ import { n as normalizeCompatibilityConfig } from "./doctor-contract-DsWvKIXF.js";
5
6
  import { t as isDiscordMutableAllowEntry } from "./security-doctor-nGgPm65L.js";
6
- import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
8
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
9
  import { asObjectRecord, collectChannelAccountScopes, collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor-migrations";
9
10
  //#region extensions/discord/src/doctor.ts
10
11
  function sanitizeForLog(value) {
@@ -165,6 +166,22 @@ function collectDiscordMissingEnvTokenWarnings(params) {
165
166
  if (!account.enabled || account.tokenStatus !== "missing" || account.tokenSource !== "none") return [];
166
167
  return ["- channels.discord: default account has no available bot token, and DISCORD_BOT_TOKEN is absent in this doctor environment. After migration, verify DISCORD_BOT_TOKEN is present in the state-dir .env or configure channels.discord.token / channels.discord.accounts.default.token as a SecretRef."];
167
168
  }
169
+ function collectDiscordTranscriptsAutoStartWarnings(cfg) {
170
+ if (cfg.transcripts?.enabled === false || !Array.isArray(cfg.transcripts?.autoStart)) return [];
171
+ const ownership = discordVoiceTranscriptsSourceProvider.accessControl;
172
+ if (!ownership) return [];
173
+ return cfg.transcripts.autoStart.flatMap((entry, index) => {
174
+ const providerId = normalizeOptionalString(entry.providerId)?.toLowerCase();
175
+ if (providerId !== discordVoiceTranscriptsSourceProvider.id && !discordVoiceTranscriptsSourceProvider.aliases?.includes(providerId ?? "") || normalizeOptionalString(entry.accountId)) return [];
176
+ const resolution = ownership.resolveAccountId({
177
+ cfg,
178
+ source: entry
179
+ });
180
+ if (resolution.ok) return [];
181
+ const path = `transcripts.autoStart[${index}]`;
182
+ return [`- ${path} cannot select a Discord voice account: ${resolution.error} Set ${path}.accountId to the intended enabled voice account, or set channels.discord.defaultAccount when one account should be the global default.`];
183
+ });
184
+ }
168
185
  function collectDiscordMutableAllowlistWarnings(cfg) {
169
186
  const hits = [];
170
187
  const addHits = (pathLabel, list) => {
@@ -215,13 +232,17 @@ const discordDoctor = {
215
232
  warnOnEmptyGroupSenderAllowlist: false,
216
233
  legacyConfigRules: DISCORD_LEGACY_CONFIG_RULES,
217
234
  normalizeCompatibilityConfig,
218
- collectPreviewWarnings: ({ cfg, doctorFixCommand, env }) => [...collectDiscordMissingEnvTokenWarnings({
219
- cfg,
220
- env
221
- }), ...collectDiscordNumericIdWarnings({
222
- hits: scanDiscordNumericIdEntries(cfg),
223
- doctorFixCommand
224
- })],
235
+ collectPreviewWarnings: ({ cfg, doctorFixCommand, env }) => [
236
+ ...collectDiscordMissingEnvTokenWarnings({
237
+ cfg,
238
+ env
239
+ }),
240
+ ...collectDiscordNumericIdWarnings({
241
+ hits: scanDiscordNumericIdEntries(cfg),
242
+ doctorFixCommand
243
+ }),
244
+ ...collectDiscordTranscriptsAutoStartWarnings(cfg)
245
+ ],
225
246
  collectMutableAllowlistWarnings: ({ cfg }) => collectDiscordMutableAllowlistWarnings(cfg),
226
247
  repairConfig: ({ cfg, doctorFixCommand }) => maybeRepairDiscordNumericIds(cfg, doctorFixCommand)
227
248
  };
@@ -1,6 +1,6 @@
1
1
  import { n as DISCORD_COMMAND_DEPLOY_HASH_NAMESPACE, t as DISCORD_COMMAND_DEPLOY_HASH_MAX_ENTRIES } from "./command-deploy-store-DFkBTViB.js";
2
- import { a as THREAD_BINDINGS_MAX_ENTRIES, d as normalizePersistedBinding, k as toBindingRecordKey, o as THREAD_BINDINGS_NAMESPACE } from "./thread-bindings.state-aeV8HNgV.js";
3
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DLa-BTiU.js";
2
+ import { a as THREAD_BINDINGS_MAX_ENTRIES, d as normalizePersistedBinding, k as toBindingRecordKey, o as THREAD_BINDINGS_NAMESPACE } from "./thread-bindings.state-D8OMdk4O.js";
3
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DsWvKIXF.js";
4
4
  import { i as sanitizeRecentModels, r as preferenceTimestampMs, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-BHT1LkR_.js";
5
5
  import { MAX_DATE_TIMESTAMP_MS, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
6
6
  import path from "node:path";
@@ -1,7 +1,8 @@
1
- import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-DGsSyDTS.js";
1
+ import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-BHrTlFkf.js";
2
2
  import "./action-runtime-api.js";
3
- import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-5s_hjYKd.js";
3
+ import { m as isTrustedRequesterGuildAdminAction } from "./outbound-session-route-Cg15ZFJd.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
+ import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
5
6
  import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
6
7
  //#region extensions/discord/src/actions/handle-action.guild-admin.ts
7
8
  function readDiscordRequesterSenderId(ctx) {
@@ -36,11 +37,13 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
36
37
  }, cfg, readPolicyOptions);
37
38
  }
38
39
  if (action === "emoji-list") {
39
- const guildId = readStringParam(actionParams, "guildId", { required: true });
40
+ const guildId = readStringParam(actionParams, "guildId");
41
+ const limit = readPositiveIntegerParam(actionParams, "limit");
40
42
  return await handleDiscordAction({
41
43
  action: "emojiList",
42
44
  accountId: accountId ?? void 0,
43
- guildId
45
+ ...guildId ? { guildId } : { channelId: resolveChannelId() },
46
+ ...limit ? { limit } : {}
44
47
  }, cfg, readPolicyOptions);
45
48
  }
46
49
  if (action === "emoji-upload") {
@@ -283,7 +286,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
283
286
  channelId,
284
287
  content,
285
288
  mediaUrl: mediaUrl ?? void 0,
286
- replyTo: replyTo ?? void 0
289
+ replyTo: replyTo ?? void 0,
290
+ ...readBooleanParam(actionParams, "silent") === true ? { silent: true } : {}
287
291
  }, cfg, actionOptions);
288
292
  }
289
293
  if (action === "search") {
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
- import { t as registerDiscordActivities } from "./activities-api-DS7vpdtp.js";
1
+ import { t as registerDiscordActivities } from "./activities-api-q-9PaaHH.js";
2
2
  import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
3
- import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-CfFMexGt.js";
4
- import "./transcripts-source-api.js";
3
+ import { registerDiscordTranscriptSourceProvider } from "./transcripts-source-api.js";
5
4
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
6
5
  //#region extensions/discord/index.ts
7
6
  var discord_default = defineBundledChannelEntry({
@@ -26,7 +25,7 @@ var discord_default = defineBundledChannelEntry({
26
25
  registerDiscordSubagentHooks(api);
27
26
  },
28
27
  registerCapabilities(api) {
29
- api.registerTranscriptSourceProvider(discordVoiceTranscriptsSourceProvider);
28
+ registerDiscordTranscriptSourceProvider(api);
30
29
  }
31
30
  });
32
31
  //#endregion
@@ -1,13 +1,15 @@
1
1
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
2
- import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-DCIH6WDC.js";
3
- import { w as mapGatewayDispatchData } from "./provider-DvSNb-2v.js";
4
- import { f as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers } from "./message-utils-BSCPVgy0.js";
5
- import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-ByOtwjo_.js";
3
+ import { _ as mapGatewayDispatchData } from "./provider-B11xwilq.js";
4
+ import { d as resolveDiscordCdnPolicy, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordMessageChannelId } from "./message-text-aiwO5R2F.js";
5
+ import { logDebug } from "openclaw/plugin-sdk/logging-core";
6
6
  import { GatewayDispatchEvents } from "discord-api-types/v10";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
8
+ import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
9
  import { danger } from "openclaw/plugin-sdk/runtime-env";
9
10
  import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
10
11
  import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, createChannelIngressError, createChannelIngressMonitor, createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
12
+ import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
11
13
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
12
14
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
13
15
  import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
@@ -167,6 +169,77 @@ function normalizeDiscordThreadChannel(threadChannel) {
167
169
  };
168
170
  }
169
171
  //#endregion
172
+ //#region extensions/discord/src/monitor/message-avatar.ts
173
+ const DISCORD_AVATAR_MAX_BYTES = 256 * 1024;
174
+ const DISCORD_AVATAR_CACHE_MAX_ENTRIES = 128;
175
+ const DISCORD_GUILD_ICON_TTL_MS = 5 * 6e4;
176
+ function setBoundedEntry(map, key, value) {
177
+ map.delete(key);
178
+ map.set(key, value);
179
+ while (map.size > DISCORD_AVATAR_CACHE_MAX_ENTRIES) {
180
+ const oldest = map.keys().next().value;
181
+ if (oldest === void 0) break;
182
+ map.delete(oldest);
183
+ }
184
+ }
185
+ function discordAvatarUrl(owner, id, hash) {
186
+ return `https://cdn.discordapp.com/${owner}/${id}/${hash}.png?size=128`;
187
+ }
188
+ /** Dispatcher-lifetime resolver for eventually available Discord conversation images. */
189
+ function createDiscordAvatarResolver() {
190
+ const saved = /* @__PURE__ */ new Map();
191
+ const pending = /* @__PURE__ */ new Set();
192
+ const guildIcons = /* @__PURE__ */ new Map();
193
+ const pendingGuilds = /* @__PURE__ */ new Set();
194
+ const resolveSavedAvatar = (key, url) => {
195
+ const cached = saved.get(key);
196
+ if (cached) {
197
+ saved.delete(key);
198
+ saved.set(key, cached);
199
+ return cached;
200
+ }
201
+ if (pending.has(key) || pending.size >= DISCORD_AVATAR_CACHE_MAX_ENTRIES) return;
202
+ pending.add(key);
203
+ saveRemoteMedia({
204
+ url,
205
+ filePathHint: "conversation-avatar.png",
206
+ maxBytes: DISCORD_AVATAR_MAX_BYTES,
207
+ ssrfPolicy: resolveDiscordCdnPolicy()
208
+ }).then((media) => {
209
+ setBoundedEntry(saved, key, media.path);
210
+ }).catch((error) => {
211
+ logDebug(`discord conversation avatar download failed: ${formatErrorMessage(error)}`);
212
+ }).finally(() => {
213
+ pending.delete(key);
214
+ });
215
+ };
216
+ const refreshGuildIcon = (client, guildId, conversationId) => {
217
+ if (pendingGuilds.has(guildId) || pendingGuilds.size >= DISCORD_AVATAR_CACHE_MAX_ENTRIES) return;
218
+ pendingGuilds.add(guildId);
219
+ client.fetchGuild(guildId).then((guild) => {
220
+ const hash = guild.icon ?? null;
221
+ setBoundedEntry(guildIcons, guildId, {
222
+ expiresAt: Date.now() + DISCORD_GUILD_ICON_TTL_MS,
223
+ hash
224
+ });
225
+ if (hash) resolveSavedAvatar(`${conversationId}\0${hash}`, discordAvatarUrl("icons", guildId, hash));
226
+ }).catch((error) => {
227
+ logDebug(`discord guild icon lookup failed: ${formatErrorMessage(error)}`);
228
+ }).finally(() => {
229
+ pendingGuilds.delete(guildId);
230
+ });
231
+ };
232
+ return { resolve(params) {
233
+ if (!params.guildId) {
234
+ const hash = params.author.avatar;
235
+ return hash ? resolveSavedAvatar(`${params.conversationId}\0${hash}`, discordAvatarUrl("avatars", params.author.id, hash)) : void 0;
236
+ }
237
+ const guildIcon = guildIcons.get(params.guildId);
238
+ if (!guildIcon || guildIcon.expiresAt <= Date.now()) refreshGuildIcon(params.client, params.guildId, params.conversationId);
239
+ return guildIcon?.hash ? resolveSavedAvatar(`${params.conversationId}\0${guildIcon.hash}`, discordAvatarUrl("icons", params.guildId, guildIcon.hash)) : void 0;
240
+ } };
241
+ }
242
+ //#endregion
170
243
  //#region extensions/discord/src/monitor/message-handler.batch-gate.ts
171
244
  function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
172
245
  const replyThreading = resolveBatchedReplyThreadingPolicy(replyToMode, isBatched);
@@ -175,7 +248,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
175
248
  }
176
249
  //#endregion
177
250
  //#region extensions/discord/src/monitor/message-run-queue.ts
178
- const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-DWQ6UHHu.js"));
251
+ const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-3HEzmemS.js"));
179
252
  async function processDiscordQueuedMessage(params) {
180
253
  const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
181
254
  try {
@@ -262,7 +335,7 @@ function createDiscordMessageRunQueue(params) {
262
335
  }
263
336
  //#endregion
264
337
  //#region extensions/discord/src/monitor/message-dispatcher.ts
265
- const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-C9zecxR9.js"));
338
+ const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-Ba5LAY_X.js"));
266
339
  function isNonEmptyString(value) {
267
340
  return typeof value === "string" && value.length > 0;
268
341
  }
@@ -281,6 +354,7 @@ function createDiscordMessageDispatcher(params) {
281
354
  testing: params.testing
282
355
  });
283
356
  const dispatcherShutdown = new AbortController();
357
+ const avatarResolver = createDiscordAvatarResolver();
284
358
  const pendingDebounceEntries = /* @__PURE__ */ new Set();
285
359
  const pendingCancellationSettlements = /* @__PURE__ */ new Set();
286
360
  const resolveDebounceKey = (entry) => {
@@ -323,6 +397,7 @@ function createDiscordMessageDispatcher(params) {
323
397
  if (entries.length === 1) {
324
398
  const ctx = await (preflightDiscordMessageImpl ?? (await loadMessagePreflightRuntime()).preflightDiscordMessage)({
325
399
  ...params,
400
+ avatarResolver,
326
401
  ackReactionScope,
327
402
  groupPolicy,
328
403
  abortSignal,
@@ -377,6 +452,7 @@ function createDiscordMessageDispatcher(params) {
377
452
  };
378
453
  const ctx = await (preflightDiscordMessageImpl ?? (await loadMessagePreflightRuntime()).preflightDiscordMessage)({
379
454
  ...params,
455
+ avatarResolver,
380
456
  ackReactionScope,
381
457
  groupPolicy,
382
458
  abortSignal,