@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,8 +1,7 @@
1
- import { h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-DNl-oCEw.js";
2
- import { n as inspectDiscordAccountTokenState } from "./account-inspect-D5xmUpnj.js";
3
- import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-CaAaoksy.js";
4
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CGeUoIqb.js";
5
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtKxLUZv.js";
1
+ import { _ as inspectDiscordAccountTokenState, h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-CwJQoLjM.js";
2
+ import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-BNesVA4P.js";
3
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-BexR2eUn.js";
4
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-BtXBCH5W.js";
6
5
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
7
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
7
  import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
@@ -279,22 +278,23 @@ async function resolveDiscordGroupAllowlist(params) {
279
278
  })
280
279
  });
281
280
  }
281
+ const discordSetupWizard = createDiscordSetupWizardBase({
282
+ promptAllowFrom: promptDiscordAllowFrom,
283
+ resolveAllowFromEntries: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordAllowFromEntries({
284
+ token: resolveDiscordToken(cfg, { accountId }).token || (typeof credentialValues.token === "string" ? credentialValues.token : ""),
285
+ entries
286
+ }),
287
+ resolveGroupAllowlist: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordGroupAllowlist({
288
+ cfg,
289
+ accountId,
290
+ credentialValues,
291
+ entries
292
+ })
293
+ });
282
294
  //#endregion
283
295
  //#region extensions/discord/src/channel.setup.ts
284
296
  const discordSetupPlugin = { ...createDiscordPluginBase({
285
- setupWizard: createDiscordSetupWizardBase({
286
- promptAllowFrom: promptDiscordAllowFrom,
287
- resolveAllowFromEntries: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordAllowFromEntries({
288
- token: resolveDiscordToken(cfg, { accountId }).token || (typeof credentialValues.token === "string" ? credentialValues.token : ""),
289
- entries
290
- }),
291
- resolveGroupAllowlist: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordGroupAllowlist({
292
- cfg,
293
- accountId,
294
- credentialValues,
295
- entries
296
- })
297
- }),
297
+ setupWizard: discordSetupWizard,
298
298
  setupContract: discordSetupContract
299
299
  }) };
300
300
  //#endregion
@@ -1,8 +1,9 @@
1
- import { $ as MediaGallery, G as Modal, J as Button, K as RadioGroup, Q as LinkButton, U as CheckboxGroup, W as Label, X as Container, Y as ChannelSelectMenu, Z as File, at as StringSelectMenu, ct as UserSelectMenu, en as __exportAll, et as MentionableSelectMenu, it as Separator, nt as Row, ot as TextDisplay, q as TextInput, rt as Section, st as Thumbnail, tt as RoleSelectMenu, ut as parseCustomId } from "./retry-DNsVTeTo.js";
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-t5RcEsPk.js";
2
2
  import { ButtonStyle, MessageFlags, TextInputStyle } from "discord-api-types/v10";
3
3
  import crypto from "node:crypto";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
- import { reduceLegacyInteractiveReply, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
5
+ import { legacyInteractiveReplyToPresentation, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
6
+ import { resolveAskUserQuestionOptionIndex } from "openclaw/plugin-sdk/reply-payload";
6
7
  import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
7
8
  //#region extensions/discord/src/custom-id-codec.ts
8
9
  /**
@@ -230,6 +231,7 @@ function parseButtonSpec(raw, label) {
230
231
  callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
231
232
  emoji: readOptionalEmoji(obj.emoji, `${label}.emoji`),
232
233
  disabled: typeof obj.disabled === "boolean" ? obj.disabled : void 0,
234
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
233
235
  allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
234
236
  };
235
237
  }
@@ -390,13 +392,20 @@ function parseComponentBlock(raw, label) {
390
392
  default: throw new Error(`${label}.type must be a supported component block`);
391
393
  }
392
394
  }
395
+ function coerceDiscordComponentParam(raw) {
396
+ if (typeof raw !== "string") return raw;
397
+ try {
398
+ return JSON.parse(raw);
399
+ } catch {
400
+ return raw;
401
+ }
402
+ }
393
403
  function readDiscordComponentSpec(raw) {
394
404
  if (raw === void 0 || raw === null) return null;
395
405
  const obj = requireObject(raw, "components");
396
406
  const blocksRaw = obj.blocks;
397
407
  const blocks = Array.isArray(blocksRaw) ? blocksRaw.map((entry, idx) => parseComponentBlock(entry, `components.blocks[${idx}]`)) : void 0;
398
408
  const modalRaw = obj.modal;
399
- const reusable = typeof obj.reusable === "boolean" ? obj.reusable : void 0;
400
409
  let modal;
401
410
  if (modalRaw !== void 0) {
402
411
  const modalObj = requireObject(modalRaw, "components.modal");
@@ -415,7 +424,7 @@ function readDiscordComponentSpec(raw) {
415
424
  }
416
425
  return {
417
426
  text: normalizeOptionalString(obj.text),
418
- reusable,
427
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
419
428
  container: typeof obj.container === "object" && obj.container && !Array.isArray(obj.container) ? {
420
429
  accentColor: obj.container.accentColor,
421
430
  spoiler: typeof obj.container.spoiler === "boolean" ? obj.container.spoiler : void 0
@@ -919,7 +928,7 @@ function resolveDiscordSelectCallbackDataKind(options) {
919
928
  if (renderableOptions.some((option) => option.action)) return "mixed";
920
929
  }
921
930
  const DISCORD_INTERACTIVE_BUTTON_ROW_SIZE = 5;
922
- function buildDiscordButtonComponent(button, optionIndex) {
931
+ function buildDiscordButtonComponent(button, options) {
923
932
  const action = resolveMessagePresentationButtonAction(button);
924
933
  if (!action) return;
925
934
  if (action.type === "approval") {
@@ -933,6 +942,13 @@ function buildDiscordButtonComponent(button, optionIndex) {
933
942
  };
934
943
  }
935
944
  if (action.type === "question") {
945
+ if ("intent" in action) return;
946
+ const optionIndex = resolveAskUserQuestionOptionIndex({
947
+ questionOptionIndices: options.questionOptionIndices,
948
+ questionId: action.questionId,
949
+ optionValue: action.optionValue
950
+ });
951
+ if (optionIndex === void 0) return;
936
952
  const internalCustomId = buildDiscordQuestionCustomId({
937
953
  questionId: action.questionId,
938
954
  optionIndex
@@ -965,8 +981,11 @@ function buildDiscordButtonComponent(button, optionIndex) {
965
981
  if (button.reusable === true) component.reusable = true;
966
982
  return component;
967
983
  }
968
- function appendDiscordButtonBlocks(blocks, buttons) {
969
- const components = buttons.map((button, optionIndex) => buildDiscordButtonComponent(button, optionIndex)).filter((button) => Boolean(button));
984
+ function appendDiscordButtonBlocks(blocks, buttons, options) {
985
+ const components = buttons.flatMap((button) => {
986
+ const component = buildDiscordButtonComponent(button, options);
987
+ return component ? [component] : [];
988
+ });
970
989
  for (let index = 0; index < components.length; index += DISCORD_INTERACTIVE_BUTTON_ROW_SIZE) blocks.push({
971
990
  type: "actions",
972
991
  buttons: components.slice(index, index + DISCORD_INTERACTIVE_BUTTON_ROW_SIZE)
@@ -993,26 +1012,10 @@ function appendDiscordSelectBlock(blocks, block) {
993
1012
  /**
994
1013
  * @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
995
1014
  */
996
- function buildDiscordInteractiveComponents(interactive) {
997
- const blocks = reduceLegacyInteractiveReply(interactive, [], (state, block) => {
998
- if (block.type === "text") {
999
- const text = block.text.trim();
1000
- if (text) state.push({
1001
- type: "text",
1002
- text
1003
- });
1004
- return state;
1005
- }
1006
- if (block.type === "buttons") {
1007
- appendDiscordButtonBlocks(state, block.buttons);
1008
- return state;
1009
- }
1010
- if (block.type === "select") appendDiscordSelectBlock(state, block);
1011
- return state;
1012
- });
1013
- return blocks.length > 0 ? { blocks } : void 0;
1015
+ function buildDiscordInteractiveComponents(interactive, options = {}) {
1016
+ return buildDiscordPresentationComponents(interactive ? legacyInteractiveReplyToPresentation(interactive) : void 0, options);
1014
1017
  }
1015
- function buildDiscordPresentationComponents(presentation) {
1018
+ function buildDiscordPresentationComponents(presentation, options = {}) {
1016
1019
  if (!presentation) return;
1017
1020
  const blocks = [];
1018
1021
  if (presentation.title) blocks.push({
@@ -1021,7 +1024,7 @@ function buildDiscordPresentationComponents(presentation) {
1021
1024
  });
1022
1025
  for (const block of presentation.blocks) {
1023
1026
  if (block.type === "text" || block.type === "context") {
1024
- const text = block.text.trim();
1027
+ const text = block.text;
1025
1028
  if (text) blocks.push({
1026
1029
  type: "text",
1027
1030
  text: block.type === "context" ? `-# ${text}` : text
@@ -1033,7 +1036,7 @@ function buildDiscordPresentationComponents(presentation) {
1033
1036
  continue;
1034
1037
  }
1035
1038
  if (block.type === "buttons") {
1036
- appendDiscordButtonBlocks(blocks, block.buttons);
1039
+ appendDiscordButtonBlocks(blocks, block.buttons, options);
1037
1040
  continue;
1038
1041
  }
1039
1042
  if (block.type === "select") appendDiscordSelectBlock(blocks, block);
@@ -1053,6 +1056,7 @@ var components_exports = /* @__PURE__ */ __exportAll({
1053
1056
  buildDiscordComponentMessageFlags: () => buildDiscordComponentMessageFlags,
1054
1057
  buildDiscordInteractiveComponents: () => buildDiscordInteractiveComponents,
1055
1058
  buildDiscordModalCustomId: () => buildDiscordModalCustomId,
1059
+ coerceDiscordComponentParam: () => coerceDiscordComponentParam,
1056
1060
  createDiscordFormModal: () => createDiscordFormModal,
1057
1061
  formatDiscordComponentEventText: () => formatDiscordComponentEventText,
1058
1062
  parseDiscordComponentCustomId: () => parseDiscordComponentCustomId,
@@ -1069,4 +1073,4 @@ function formatDiscordComponentEventText(params) {
1069
1073
  return `Selected ${values.join(", ")} from "${params.label}".`;
1070
1074
  }
1071
1075
  //#endregion
1072
- 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 };
1076
+ 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 _, shared_interactive_exports as a, buildDiscordComponentCustomId as b, parseExecApprovalData as c, buildDiscordComponentMessage as d, buildDiscordComponentMessageFlags as f, resolveDiscordComponentAttachmentName as g, readDiscordComponentSpec as h, buildDiscordPresentationComponents as i, encodeCustomIdComponent as k, DiscordFormModal as l, coerceDiscordComponentParam 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, DISCORD_MODAL_CUSTOM_ID_KEY as v, parseDiscordComponentCustomId as w, buildDiscordModalCustomId as x, buildDiscordActivityCustomId as y };
@@ -1,10 +1,10 @@
1
1
  import { normalizeLegacyDmAliases } from "openclaw/plugin-sdk/channel-config-helpers";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, TtsConfigSchema, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildCommonChannelAccountShape, buildGroupEntrySchema, requireAllowlistAllowFrom, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
4
- import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
5
3
  import { buildSecretInputSchema, registerSensitiveConfigSchema } from "openclaw/plugin-sdk/secret-input";
6
- import { z } from "zod";
7
4
  import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
5
+ import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, TtsConfigSchema, buildChannelAccountSchemaParts, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildGroupEntrySchema, requireAllowlistAllowFrom, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
6
+ import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor-migrations";
7
+ import { z } from "zod";
8
8
  //#region extensions/discord/src/config-ui-hints.ts
9
9
  const discordChannelConfigUiHints = {
10
10
  "": {
@@ -35,6 +35,10 @@ const discordChannelConfigUiHints = {
35
35
  },
36
36
  progress: { includeCommentary: true }
37
37
  }),
38
+ joinIntro: {
39
+ label: "Discord Guild Join Introduction",
40
+ help: "Post one brief, room-specific introduction when the bot joins an allowed Discord guild (default: true). Account settings override the channel-wide setting."
41
+ },
38
42
  proxy: {
39
43
  label: "Discord Proxy URL",
40
44
  help: "Proxy URL for Discord gateway + API requests (app-id lookup and allowlist resolution). Set per account via channels.discord.accounts.<id>.proxy."
@@ -53,11 +57,11 @@ const discordChannelConfigUiHints = {
53
57
  },
54
58
  "threadBindings.enabled": {
55
59
  label: "Discord Thread Binding Enabled",
56
- help: "Enable Discord thread binding features (/focus, bound-thread routing/delivery, and thread-bound subagent sessions). Overrides session.threadBindings.enabled when set."
60
+ help: "Enable Discord thread-bound session spawning, routing, and delivery. Overrides session.threadBindings.enabled when set."
57
61
  },
58
62
  "threadBindings.idleHours": {
59
63
  label: "Discord Thread Binding Idle Timeout (hours)",
60
- help: "Inactivity window in hours for Discord thread-bound sessions (/focus and spawned thread sessions). Set 0 to disable idle auto-unfocus (default: 24). Overrides session.threadBindings.idleHours when set."
64
+ help: "Inactivity window in hours for Discord thread-bound sessions. Set 0 to disable idle expiry (default: 24). Overrides session.threadBindings.idleHours when set."
61
65
  },
62
66
  "threadBindings.maxAgeHours": {
63
67
  label: "Discord Thread Binding Max Age (hours)",
@@ -461,13 +465,14 @@ const DiscordVoiceSchema = z.object({
461
465
  captureSilenceGraceMs: z.number().int().positive().max(3e4).optional(),
462
466
  tts: TtsConfigSchema.optional()
463
467
  }).strict().optional();
468
+ const { accountShape, rootPolicyShape } = buildChannelAccountSchemaParts({
469
+ omit: ["groupAllowFrom"],
470
+ allowFrom: DiscordIdListSchema.optional(),
471
+ streaming: DiscordPreviewStreamingConfigSchema.optional()
472
+ });
464
473
  const DiscordAccountSchemaBase = z.object({
465
- ...buildCommonChannelAccountShape({
466
- omit: ["groupAllowFrom"],
467
- groupPolicyDefault: true,
468
- allowFrom: DiscordIdListSchema.optional(),
469
- streaming: DiscordPreviewStreamingConfigSchema.optional()
470
- }),
474
+ ...accountShape,
475
+ joinIntro: z.boolean().optional(),
471
476
  commands: ProviderCommandsSchema,
472
477
  token: registerSensitiveConfigSchema(SecretInputSchema.optional()),
473
478
  applicationId: DiscordIdSchema.optional(),
@@ -509,7 +514,7 @@ const DiscordAccountSchemaBase = z.object({
509
514
  execApprovals: buildChannelExecApprovalsSchema(DiscordIdSchema, { cleanupAfterResolve: z.boolean().optional() }),
510
515
  agentComponents: z.object({
511
516
  enabled: z.boolean().optional(),
512
- ttlMs: z.number().int().positive().max(1440 * 60 * 1e3).optional()
517
+ ttlMs: z.number().int().positive().max(864e5).optional()
513
518
  }).strict().optional(),
514
519
  slashCommand: z.object({ ephemeral: z.boolean().optional() }).strict().optional(),
515
520
  threadBindings: z.object({
@@ -608,7 +613,8 @@ function normalizeShippedDiscordDmAliases(value) {
608
613
  } : rest;
609
614
  }
610
615
  const DiscordAccountSchema = z.preprocess(normalizeShippedDiscordDmAliases, DiscordAccountSchemaBase);
611
- const DiscordConfigSchemaBase = DiscordAccountSchemaBase.extend({
616
+ const DiscordConfigSchemaBase = DiscordAccountSchemaBase.safeExtend({
617
+ ...rootPolicyShape,
612
618
  accounts: z.record(z.string(), DiscordAccountSchema.optional()).optional(),
613
619
  defaultAccount: z.string().optional()
614
620
  }).superRefine((value, ctx) => {
@@ -657,6 +663,7 @@ const DiscordConfigSchemaBase = DiscordAccountSchemaBase.extend({
657
663
  });
658
664
  }
659
665
  });
660
- const DiscordChannelConfigSchema = buildChannelConfigSchema(z.preprocess(normalizeShippedDiscordDmAliases, DiscordConfigSchemaBase), { uiHints: discordChannelConfigUiHints });
666
+ const DiscordConfigSchema = z.preprocess(normalizeShippedDiscordDmAliases, DiscordConfigSchemaBase);
667
+ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordConfigSchema, { uiHints: discordChannelConfigUiHints });
661
668
  //#endregion
662
669
  export { DiscordChannelConfigSchema as t };
@@ -1,4 +1,4 @@
1
- import { c as shouldIgnoreStaleDiscordRouteBinding } from "./approval-message-safety-XGFPbDoI.js";
1
+ import { l as shouldIgnoreStaleDiscordRouteBinding } from "./outbound-session-route-CzzerX2K.js";
2
2
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
3
3
  import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
4
4
  //#region extensions/discord/src/monitor/conversation-binding-route.ts
@@ -1,5 +1,5 @@
1
- import { en as __exportAll } from "./retry-DNsVTeTo.js";
2
- import { l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId } from "./accounts-DNl-oCEw.js";
1
+ import { on as __exportAll } from "./retry-t5RcEsPk.js";
2
+ import { l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.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-XyCfoqLg.js";
1
+ import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-AA8wQx0D.js";
2
2
  //#region extensions/discord/directory-contract-api.ts
3
3
  const discordDirectoryContractPlugin = {
4
4
  id: "discord",
@@ -1,7 +1,7 @@
1
- import { en as __exportAll } from "./retry-DNsVTeTo.js";
2
- import { c as resolveDiscordAccount, m as normalizeDiscordToken } from "./accounts-DNl-oCEw.js";
3
- import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-DNVbJyEy.js";
4
- import { a as normalizeDiscordSlug } from "./allow-list-BDMimASD.js";
1
+ import { on as __exportAll } from "./retry-t5RcEsPk.js";
2
+ import { c as resolveDiscordAccount, m as normalizeDiscordToken } from "./accounts-CwJQoLjM.js";
3
+ import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-BfmEP6wp.js";
4
+ import { a as normalizeDiscordSlug } from "./allow-list-C2JuH-R0.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,8 +1,8 @@
1
- import { s as resolveDefaultDiscordAccountId } from "./accounts-DNl-oCEw.js";
2
- import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-DeIMNbRh.js";
3
- import { t as inspectDiscordAccount } from "./account-inspect-D5xmUpnj.js";
4
- import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-CaAaoksy.js";
5
- import { n as normalizeCompatibilityConfig } from "./doctor-contract-DsWvKIXF.js";
1
+ import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
2
+ import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-DkUhR7YK.js";
3
+ import { t as inspectDiscordAccount } from "./account-inspect-BY-ve3yH.js";
4
+ import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-BNesVA4P.js";
5
+ import { n as normalizeCompatibilityConfig } from "./doctor-contract-Co5vRCZ6.js";
6
6
  import { t as isDiscordMutableAllowEntry } from "./security-doctor-nGgPm65L.js";
7
7
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
8
8
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -65,7 +65,8 @@ function hasLegacyDiscordGuildChannelAgentId(value) {
65
65
  });
66
66
  }
67
67
  function hasUnsupportedRealtimeWakeNamesInVoice(value) {
68
- const wakeNames = asObjectRecord(asObjectRecord(value)?.realtime)?.wakeNames;
68
+ const voice = asObjectRecord(value);
69
+ const wakeNames = asObjectRecord(voice?.realtime)?.wakeNames;
69
70
  return Array.isArray(wakeNames) ? wakeNames.length === 0 || wakeNames.some((wakeName) => typeof wakeName === "string" && !isSupportedRealtimeVoiceActivationName(wakeName)) : false;
70
71
  }
71
72
  function hasUnsupportedDiscordRealtimeWakeNames(value) {
@@ -274,7 +275,8 @@ const legacyConfigRules = [
274
275
  ],
275
276
  message: "channels.discord.accounts.<id>.voice.tts.<provider> keys (openai/elevenlabs/microsoft/edge) are legacy; use channels.discord.accounts.<id>.voice.tts.providers.<provider>. Run \"openclaw doctor --fix\".",
276
277
  match: (value) => hasLegacyAccountStreamingAliases(value, (accountValue) => {
277
- return hasLegacyTtsProviderKeys(asObjectRecord(asObjectRecord(accountValue)?.voice)?.tts);
278
+ const account = asObjectRecord(accountValue);
279
+ return hasLegacyTtsProviderKeys(asObjectRecord(account?.voice)?.tts);
278
280
  })
279
281
  },
280
282
  {
@@ -324,11 +326,12 @@ const legacyConfigRules = [
324
326
  function normalizeCompatibilityConfig({ cfg }) {
325
327
  const changes = [];
326
328
  const bindingsToAdd = [];
329
+ const aliases = streamingAliasMigration.normalizeChannelConfig({
330
+ cfg,
331
+ changes
332
+ });
327
333
  const tuningKnobs = stripRetiredChannelKeys({
328
- cfg: streamingAliasMigration.normalizeChannelConfig({
329
- cfg,
330
- changes
331
- }).config,
334
+ cfg: aliases.config,
332
335
  channelId: "discord",
333
336
  keys: RETIRED_TUNING_KEYS,
334
337
  scope: "root-and-accounts"
@@ -1,10 +1,10 @@
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
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";
3
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-Co5vRCZ6.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
- import { definePluginDoctorMigrationFromPlans } from "openclaw/plugin-sdk/runtime-doctor-migrations";
7
6
  import path from "node:path";
7
+ import { definePluginDoctorMigrationFromPlans } from "openclaw/plugin-sdk/runtime-doctor-migrations";
8
8
  import fs from "node:fs";
9
9
  //#region extensions/discord/src/monitor/model-picker-preferences-migrations.ts
10
10
  const PREFERENCE_MAX_ENTRIES = 2e3;
@@ -37,7 +37,8 @@ function normalizeLegacyPreferenceKey(key) {
37
37
  }
38
38
  function legacyUpdatedAtForIndex(updatedAt, index, total) {
39
39
  const baseMs = preferenceTimestampMs(updatedAt);
40
- return timestampMsToIsoString(Math.min(baseMs + Math.max(0, total), MAX_DATE_TIMESTAMP_MS) - Math.max(0, index)) ?? timestampMsToIsoString(baseMs) ?? timestampMsToIsoString(Math.max(0, total - index)) ?? "1970-01-01T00:00:00.000Z";
40
+ const shiftedMs = Math.min(baseMs + Math.max(0, total), MAX_DATE_TIMESTAMP_MS) - Math.max(0, index);
41
+ return timestampMsToIsoString(shiftedMs) ?? timestampMsToIsoString(baseMs) ?? timestampMsToIsoString(Math.max(0, total - index)) ?? "1970-01-01T00:00:00.000Z";
41
42
  }
42
43
  function readFiniteNumberField(entry, key) {
43
44
  const value = entry[key];
@@ -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-D71_VFLr.js";
1
+ import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-DydyfxST.js";
2
2
  import "./action-runtime-api.js";
3
- import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-Dr2QI8Bf.js";
3
+ import { m as isTrustedRequesterGuildAdminAction } from "./outbound-session-route-CzzerX2K.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,4 +1,4 @@
1
- import { t as registerDiscordActivities } from "./activities-api-KCBAmWxD.js";
1
+ import { t as registerDiscordActivities } from "./activities-api-CkKcHUB6.js";
2
2
  import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
3
3
  import { registerDiscordTranscriptSourceProvider } from "./transcripts-source-api.js";
4
4
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
@@ -0,0 +1,60 @@
1
+ import { r as normalizeDiscordAllowList } from "./allow-list-C2JuH-R0.js";
2
+ import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
3
+ //#region extensions/discord/src/monitor/ingress-identity.ts
4
+ const DISCORD_ALLOW_LIST_PREFIXES = [
5
+ "discord:",
6
+ "user:",
7
+ "pk:"
8
+ ];
9
+ const DISCORD_USER_ID_KIND = "stable-id";
10
+ const DISCORD_USER_NAME_KIND = "username";
11
+ function normalizeDiscordIdEntry(entry) {
12
+ const text = entry.trim();
13
+ if (!text) return null;
14
+ const maybeId = text.replace(/^<@!?/, "").replace(/>$/, "");
15
+ if (/^\d+$/.test(maybeId)) return maybeId;
16
+ const prefix = DISCORD_ALLOW_LIST_PREFIXES.find((entryPrefix) => text.startsWith(entryPrefix));
17
+ if (prefix) return text.slice(prefix.length).trim() || null;
18
+ return null;
19
+ }
20
+ function normalizeDiscordNameEntry(entry) {
21
+ const text = entry.trim();
22
+ if (!text || text === "*" || normalizeDiscordIdEntry(text) || /#\d{4}$/.test(text)) return null;
23
+ const nameSlug = normalizeDiscordAllowList([text], DISCORD_ALLOW_LIST_PREFIXES)?.names.values().next().value;
24
+ return typeof nameSlug === "string" && nameSlug ? nameSlug : null;
25
+ }
26
+ function normalizeDiscordTagEntry(entry) {
27
+ const text = entry.trim();
28
+ return /#\d{4}$/.test(text) ? normalizeDiscordNameSubject(text) : null;
29
+ }
30
+ function normalizeDiscordNameSubject(value) {
31
+ const nameSlug = normalizeDiscordAllowList([value], DISCORD_ALLOW_LIST_PREFIXES)?.names.values().next().value;
32
+ return typeof nameSlug === "string" && nameSlug ? nameSlug : null;
33
+ }
34
+ const discordIngressIdentity = defineStableChannelIngressIdentity({
35
+ resolveParticipant: (subject) => {
36
+ const kind = subject.aliases?.participantKind;
37
+ const id = subject.stableId;
38
+ return typeof id === "string" && id && (kind === "user" || kind === "bot" || kind === "pluralkit-member") ? {
39
+ domain: kind === "pluralkit-member" ? "pluralkit" : "discord",
40
+ idKind: kind,
41
+ id
42
+ } : void 0;
43
+ },
44
+ key: "discordUserId",
45
+ kind: DISCORD_USER_ID_KIND,
46
+ authentication: "verified",
47
+ normalizeEntry: normalizeDiscordIdEntry,
48
+ normalizeSubject: (value) => value.trim() || null,
49
+ sensitivity: "pii",
50
+ aliases: [["discordUserName", normalizeDiscordNameEntry], ["discordUserTag", normalizeDiscordTagEntry]].map(([key, normalizeEntry]) => ({
51
+ key,
52
+ kind: DISCORD_USER_NAME_KIND,
53
+ normalizeEntry,
54
+ normalizeSubject: normalizeDiscordNameSubject,
55
+ authentication: "mutable",
56
+ sensitivity: "pii"
57
+ }))
58
+ });
59
+ //#endregion
60
+ export { discordIngressIdentity as t };
@@ -1,7 +1,7 @@
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-CngsgErq.js";
3
- import { _ as mapGatewayDispatchData } from "./provider-DlK_ynqt.js";
4
- import { i as resolveDiscordMessageText, l as resolveDiscordCdnPolicy, p as resolveDiscordMessageChannelId, u as hasDiscordMessageStickers } from "./message-utils-BXLLnFl6.js";
2
+ import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-B-3UHCc1.js";
3
+ import { v as mapGatewayDispatchData } from "./provider-CjI8BSzS.js";
4
+ import { f as resolveDiscordReferencedReplyMessageId, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordCdnPolicy } from "./message-text-C0K4-fkg.js";
5
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";
@@ -58,8 +58,9 @@ function isDiscordAuthenticationFailure(error) {
58
58
  return false;
59
59
  }
60
60
  function createDiscordIngressMonitor(params) {
61
+ const queue = params.queue ?? getDiscordRuntime().state.openChannelIngressQueue({ accountId: params.accountId });
61
62
  const monitor = createChannelIngressMonitor({
62
- queue: params.queue ?? getDiscordRuntime().state.openChannelIngressQueue({ accountId: params.accountId }),
63
+ queue,
63
64
  inspect: inspectDiscordMessage,
64
65
  payload: {
65
66
  version: DISCORD_INGRESS_PAYLOAD_VERSION,
@@ -170,9 +171,9 @@ function normalizeDiscordThreadChannel(threadChannel) {
170
171
  }
171
172
  //#endregion
172
173
  //#region extensions/discord/src/monitor/message-avatar.ts
173
- const DISCORD_AVATAR_MAX_BYTES = 256 * 1024;
174
+ const DISCORD_AVATAR_MAX_BYTES = 262144;
174
175
  const DISCORD_AVATAR_CACHE_MAX_ENTRIES = 128;
175
- const DISCORD_GUILD_ICON_TTL_MS = 5 * 6e4;
176
+ const DISCORD_GUILD_ICON_TTL_MS = 3e5;
176
177
  function setBoundedEntry(map, key, value) {
177
178
  map.delete(key);
178
179
  map.set(key, value);
@@ -248,7 +249,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
248
249
  }
249
250
  //#endregion
250
251
  //#region extensions/discord/src/monitor/message-run-queue.ts
251
- const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process--4_712Ec.js"));
252
+ const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-cdIJ_fDT.js"));
252
253
  async function processDiscordQueuedMessage(params) {
253
254
  const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
254
255
  try {
@@ -335,7 +336,7 @@ function createDiscordMessageRunQueue(params) {
335
336
  }
336
337
  //#endregion
337
338
  //#region extensions/discord/src/monitor/message-dispatcher.ts
338
- const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-Bzg_Hawz.js"));
339
+ const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-CoKoE3dY.js"));
339
340
  function isNonEmptyString(value) {
340
341
  return typeof value === "string" && value.length > 0;
341
342
  }
@@ -365,7 +366,9 @@ function createDiscordMessageDispatcher(params) {
365
366
  message,
366
367
  eventChannelId: entry.data.channel_id
367
368
  });
368
- return channelId ? `discord:${params.accountId}:${channelId}:${authorId}` : null;
369
+ if (!channelId) return null;
370
+ const replyTargetId = resolveDiscordReferencedReplyMessageId(message);
371
+ return `discord:${params.accountId}:${channelId}:${authorId}:reply:${replyTargetId ?? "none"}`;
369
372
  };
370
373
  const { debouncer } = createChannelInboundDebouncer({
371
374
  cfg: params.cfg,
@@ -374,8 +377,9 @@ function createDiscordMessageDispatcher(params) {
374
377
  shouldDebounce: (entry) => {
375
378
  const message = entry.data.message;
376
379
  if (!message) return false;
380
+ const baseText = resolveDiscordMessageText(message, { includeForwarded: false });
377
381
  return shouldDebounceTextInbound({
378
- text: resolveDiscordMessageText(message, { includeForwarded: false }),
382
+ text: baseText,
379
383
  cfg: params.cfg,
380
384
  hasMedia: message.attachments && message.attachments.length > 0 || hasDiscordMessageStickers(message)
381
385
  });