@openclaw/discord 2026.8.1-beta.2 → 2026.8.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 (289) 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-Dl-TOyOX.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-q4Zqo44V.js} +29 -106
  9. package/dist/{audit-Db-rlntl.js → audit-DgrvFPGt.js} +5 -5
  10. package/dist/{channel-CnnbJSt5.js → channel-BsQUalPw.js} +72 -50
  11. package/dist/{channel-actions.runtime-CLKrx6tr.js → channel-actions.runtime-UMGGIfSy.js} +31 -45
  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-rPs4dsk_.js} +5 -5
  16. package/dist/{outbound-session-route-DxLkrgKQ.js → components-Dk35LTf_.js} +34 -76
  17. package/dist/{config-schema-BgEskFAs.js → config-schema-CxPqtVI1.js} +46 -14
  18. package/dist/conversation-binding-route-BjvX4e35.js +43 -0
  19. package/dist/{directory-config-BVX7Cflc.js → directory-config-B7DY_pNG.js} +2 -2
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-DGIGxpIo.js → directory-live-DuAXKkan.js} +3 -3
  22. package/dist/doctor-contract-api.js +2 -2
  23. package/dist/{doctor-BzC-TLnB.js → doctor-zQTtn6hm.js} +33 -12
  24. package/dist/{handle-action.guild-admin-BNVTUISF.js → handle-action.guild-admin-DZewwLr1.js} +9 -5
  25. package/dist/index.js +3 -4
  26. package/dist/ingress-identity-CzZKcPK8.js +60 -0
  27. package/dist/{message-handler-Unk_f10F.js → message-handler-C5By3yl5.js} +82 -6
  28. package/dist/{message-handler.preflight-C9zecxR9.js → message-handler.preflight-DrszWuHw.js} +44 -118
  29. package/dist/{message-handler.process-DWQ6UHHu.js → message-handler.process-DyFPDLCt.js} +205 -235
  30. package/dist/{message-utils-BSCPVgy0.js → message-text-Ca8M6TU8.js} +43 -42
  31. package/dist/{outbound-adapter-D9nRivT1.js → outbound-adapter-Dif8p481.js} +118 -91
  32. package/dist/{outbound-components-cTzwBJ60.js → outbound-components-wjv7yyAj.js} +5 -4
  33. package/dist/outbound-session-route-Bn4uXaoE.js +665 -0
  34. package/dist/owner-access-UlYi9t0M.js +107 -0
  35. package/dist/{pluralkit-DdiJ9KMK.js → pluralkit-9EuEN4UD.js} +1 -1
  36. package/dist/{probe-Bl-k5_Ku.js → probe-n6ZXxK8V.js} +1 -1
  37. package/dist/{probe.runtime-M9fREKvp.js → probe.runtime-CN4bdPfZ.js} +1 -1
  38. package/dist/{provider-DvSNb-2v.js → provider-LXiOcJrH.js} +887 -1350
  39. package/dist/{provider-session.runtime-BUEqD0rA.js → provider-session.runtime-DSNe7r2W.js} +3 -3
  40. package/dist/provider.runtime-DiInaDXO.js +2 -0
  41. package/dist/{realtime-session.runtime-C7wen-aF.js → realtime-session.runtime-DOViOIjY.js} +129 -134
  42. package/dist/{resolve-allowlist-common-D04lpEzb.js → resolve-allowlist-common-BLoYaxEG.js} +2 -2
  43. package/dist/{resolve-channels-Dm7jEeg6.js → resolve-channels-D2yl_2CN.js} +5 -4
  44. package/dist/{resolve-users-bktrCUUU.js → resolve-users-BLxfqajZ.js} +2 -2
  45. package/dist/{retry-CLpJcXXf.js → retry-DqHCW6PV.js} +187 -19
  46. package/dist/{runtime-DGsSyDTS.js → runtime-BYamRVPN.js} +89 -86
  47. package/dist/{runtime-DoHjckYm.js → runtime-DrxVBTtp.js} +9 -10
  48. package/dist/runtime-api.js +19 -25
  49. package/dist/{sdk-runtime-QpY8PvCh.js → sdk-runtime-6tfgYDjY.js} +57 -89
  50. package/dist/{secret-config-contract-B1akrlyY.js → secret-config-contract-B3i6WxV5.js} +53 -25
  51. package/dist/secret-contract-api.js +1 -1
  52. package/dist/{security-audit-jGnJF__m.js → security-audit-DKfK-iPY.js} +11 -12
  53. package/dist/security-audit-contract-api.js +1 -1
  54. package/dist/{security-audit.runtime-CPN0xFYz.js → security-audit.runtime-sKZyKgpx.js} +1 -1
  55. package/dist/{send-B7Q6Oc1I.js → send-UJHiAm4C.js} +82 -19
  56. package/dist/{send.components-iJyFXw9L.js → send.components-CrBJpGT_.js} +22 -39
  57. package/dist/{send.outbound-DS5tHwfR.js → send.outbound-D7JYmfm9.js} +77 -78
  58. package/dist/{send.shared-BmwFjW6T.js → send.shared-DZJ1akvQ.js} +136 -121
  59. package/dist/{sender-identity-QtalnCYv.js → sender-identity-BJtfyise.js} +1 -1
  60. package/dist/setup-plugin-api.js +1 -1
  61. package/dist/{shared-BIXIX6uJ.js → shared-Dii2HTn7.js} +41 -14
  62. package/dist/subagent-hooks-JyGrtQIl.js +49 -0
  63. package/dist/subagent-hooks-api.js +1 -6
  64. package/dist/{system-events-CTqDf6_s.js → system-events-BEmcj4xJ.js} +2 -2
  65. package/dist/{target-resolver-maOKSqO0.js → target-resolver-V-IYae6s.js} +3 -3
  66. package/dist/targets-CQp53cGj.js +3 -0
  67. package/dist/{thread-bindings-3L8p82GV.js → thread-bindings-DvYP79fy.js} +28 -26
  68. package/dist/{thread-bindings.manager-DCIH6WDC.js → thread-bindings.manager-Clm77DBM.js} +11 -14
  69. package/dist/{thread-bindings.session-updates-bJ2KQFY6.js → thread-bindings.session-updates-CJb-BpPL.js} +1 -1
  70. package/dist/{thread-bindings.state-aeV8HNgV.js → thread-bindings.state-D8OMdk4O.js} +1 -1
  71. package/dist/threading-CXuu_7o9.js +478 -0
  72. package/dist/transcripts-source-BLEMH_yi.js +270 -0
  73. package/dist/transcripts-source-api.js +7 -2
  74. package/dist/{typing-CS-nNVoe.js → typing-B9snnwMe.js} +1 -1
  75. package/dist/{voice-runtime-BEdqNcST.js → voice-runtime-DY6_o73o.js} +250 -150
  76. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
  77. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
  78. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
  80. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
  81. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
  82. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  83. package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
  84. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
  85. package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
  86. package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
  87. package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
  88. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
  89. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
  90. package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
  96. package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
  97. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
  98. package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
  99. package/node_modules/discord-api-types/CHANGELOG.md +8 -0
  100. package/node_modules/discord-api-types/package.json +4 -4
  101. package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
  102. package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
  103. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
  104. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
  105. package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
  106. package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
  107. package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
  108. package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
  109. package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
  110. package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
  111. package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
  113. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
  114. package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
  115. package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
  116. package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
  117. package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
  118. package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
  119. package/node_modules/typebox/build/format/date.d.mts +1 -1
  120. package/node_modules/typebox/build/format/date.mjs +1 -1
  121. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  122. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  123. package/node_modules/typebox/build/format/email.d.mts +1 -1
  124. package/node_modules/typebox/build/format/email.mjs +2 -2
  125. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  126. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  127. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  128. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  129. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  130. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  131. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  132. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  133. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  134. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  135. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  136. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  137. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  138. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  139. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  140. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  141. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  142. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  143. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  144. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  145. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  146. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  147. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  148. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  149. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  150. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  151. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  152. package/node_modules/typebox/build/format/iri.mjs +26 -8
  153. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  154. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  155. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  156. package/node_modules/typebox/build/format/regex.mjs +2 -6
  157. package/node_modules/typebox/build/format/time.d.mts +2 -2
  158. package/node_modules/typebox/build/format/time.mjs +19 -14
  159. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  160. package/node_modules/typebox/build/format/uri.mjs +3 -130
  161. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  162. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  163. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  164. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  165. package/node_modules/typebox/build/format/url.d.mts +3 -3
  166. package/node_modules/typebox/build/format/url.mjs +4 -5
  167. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  168. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  169. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  170. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  171. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  172. package/node_modules/typebox/build/guard/string.mjs +7 -7
  173. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  174. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  175. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  176. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  177. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  178. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  179. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  180. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  181. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  182. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  183. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  184. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  185. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  186. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  187. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  188. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  189. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  190. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  191. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  192. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  193. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  194. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  195. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  196. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  197. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  198. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  199. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  200. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  201. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  202. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  203. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  204. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  205. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  206. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  207. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  208. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  209. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  210. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  211. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  212. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  213. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  214. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  215. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  216. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  217. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  218. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  219. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  220. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  221. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  222. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  223. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  224. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  225. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  226. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  227. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  228. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  229. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  230. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  231. package/node_modules/typebox/package.json +27 -27
  232. package/node_modules/typebox/readme.md +79 -82
  233. package/node_modules/undici/docs/docs/api/Client.md +21 -8
  234. package/node_modules/undici/lib/api/readable.js +33 -43
  235. package/node_modules/undici/lib/core/connect.js +16 -2
  236. package/node_modules/undici/lib/core/symbols.js +1 -0
  237. package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
  238. package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
  239. package/node_modules/undici/lib/dispatcher/client.js +74 -29
  240. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
  241. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
  242. package/node_modules/undici/lib/handler/retry-handler.js +7 -2
  243. package/node_modules/undici/lib/interceptor/cache.js +5 -2
  244. package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
  245. package/node_modules/undici/lib/mock/mock-utils.js +213 -24
  246. package/node_modules/undici/lib/util/cache.js +2 -4
  247. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  248. package/node_modules/undici/package.json +1 -1
  249. package/node_modules/undici/types/client.d.ts +40 -0
  250. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  251. package/node_modules/ws/package.json +1 -1
  252. package/openclaw.plugin.json +24 -10
  253. package/package.json +8 -10
  254. package/skills/discord/SKILL.md +1 -1
  255. package/dist/approval-message-safety-AcIxvrf3.js +0 -140
  256. package/dist/audit-core-xwjIczO0.js +0 -105
  257. package/dist/channel-actions-5s_hjYKd.js +0 -208
  258. package/dist/channel-api-CAJ0wMoV.js +0 -21
  259. package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
  260. package/dist/provider.runtime-C9PnJZbZ.js +0 -2
  261. package/dist/runtime-api.actions.js +0 -3
  262. package/dist/runtime-api.lookup.js +0 -7
  263. package/dist/runtime-api.monitor-CHxrFPnW.js +0 -5
  264. package/dist/runtime-api.monitor.js +0 -8
  265. package/dist/runtime-api.send.js +0 -7
  266. package/dist/runtime-api.threads.js +0 -5
  267. package/dist/send.reactions-BAn0iiVQ.js +0 -78
  268. package/dist/send.receipt-IPI1p-SP.js +0 -66
  269. package/dist/subagent-hooks-CTt5KCJr.js +0 -120
  270. package/dist/subagent-progress-DhaE_h8a.js +0 -109
  271. package/dist/targets-yUFTHoAx.js +0 -3
  272. package/dist/transcripts-source-CfFMexGt.js +0 -123
  273. package/node_modules/p-map/index.d.ts +0 -155
  274. package/node_modules/p-map/index.js +0 -285
  275. package/node_modules/p-map/license +0 -9
  276. package/node_modules/p-map/package.json +0 -57
  277. package/node_modules/p-map/readme.md +0 -190
  278. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  279. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  280. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  281. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  282. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  283. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  284. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  285. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  286. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  287. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
  288. package/dist/{allow-list-DnxIlPP2.js → allow-list-BDMimASD.js} +1 -1
  289. package/dist/{doctor-contract-DLa-BTiU.js → doctor-contract-DsWvKIXF.js} +1 -1
@@ -1,11 +1,10 @@
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-DqHCW6PV.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";
6
+ import { resolveAskUserQuestionOptionIndex } from "openclaw/plugin-sdk/reply-payload";
7
7
  import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
8
- import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
9
8
  //#region extensions/discord/src/custom-id-codec.ts
10
9
  /**
11
10
  * URI-component codec for values embedded in `k=v;` custom-id grammars
@@ -232,6 +231,7 @@ function parseButtonSpec(raw, label) {
232
231
  callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
233
232
  emoji: readOptionalEmoji(obj.emoji, `${label}.emoji`),
234
233
  disabled: typeof obj.disabled === "boolean" ? obj.disabled : void 0,
234
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
235
235
  allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
236
236
  };
237
237
  }
@@ -392,13 +392,20 @@ function parseComponentBlock(raw, label) {
392
392
  default: throw new Error(`${label}.type must be a supported component block`);
393
393
  }
394
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
+ }
395
403
  function readDiscordComponentSpec(raw) {
396
404
  if (raw === void 0 || raw === null) return null;
397
405
  const obj = requireObject(raw, "components");
398
406
  const blocksRaw = obj.blocks;
399
407
  const blocks = Array.isArray(blocksRaw) ? blocksRaw.map((entry, idx) => parseComponentBlock(entry, `components.blocks[${idx}]`)) : void 0;
400
408
  const modalRaw = obj.modal;
401
- const reusable = typeof obj.reusable === "boolean" ? obj.reusable : void 0;
402
409
  let modal;
403
410
  if (modalRaw !== void 0) {
404
411
  const modalObj = requireObject(modalRaw, "components.modal");
@@ -417,7 +424,7 @@ function readDiscordComponentSpec(raw) {
417
424
  }
418
425
  return {
419
426
  text: normalizeOptionalString(obj.text),
420
- reusable,
427
+ reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
421
428
  container: typeof obj.container === "object" && obj.container && !Array.isArray(obj.container) ? {
422
429
  accentColor: obj.container.accentColor,
423
430
  spoiler: typeof obj.container.spoiler === "boolean" ? obj.container.spoiler : void 0
@@ -921,7 +928,7 @@ function resolveDiscordSelectCallbackDataKind(options) {
921
928
  if (renderableOptions.some((option) => option.action)) return "mixed";
922
929
  }
923
930
  const DISCORD_INTERACTIVE_BUTTON_ROW_SIZE = 5;
924
- function buildDiscordButtonComponent(button, optionIndex) {
931
+ function buildDiscordButtonComponent(button, options) {
925
932
  const action = resolveMessagePresentationButtonAction(button);
926
933
  if (!action) return;
927
934
  if (action.type === "approval") {
@@ -935,6 +942,13 @@ function buildDiscordButtonComponent(button, optionIndex) {
935
942
  };
936
943
  }
937
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;
938
952
  const internalCustomId = buildDiscordQuestionCustomId({
939
953
  questionId: action.questionId,
940
954
  optionIndex
@@ -967,8 +981,11 @@ function buildDiscordButtonComponent(button, optionIndex) {
967
981
  if (button.reusable === true) component.reusable = true;
968
982
  return component;
969
983
  }
970
- function appendDiscordButtonBlocks(blocks, buttons) {
971
- 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
+ });
972
989
  for (let index = 0; index < components.length; index += DISCORD_INTERACTIVE_BUTTON_ROW_SIZE) blocks.push({
973
990
  type: "actions",
974
991
  buttons: components.slice(index, index + DISCORD_INTERACTIVE_BUTTON_ROW_SIZE)
@@ -995,26 +1012,10 @@ function appendDiscordSelectBlock(blocks, block) {
995
1012
  /**
996
1013
  * @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
997
1014
  */
998
- 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;
1015
+ function buildDiscordInteractiveComponents(interactive, options = {}) {
1016
+ return buildDiscordPresentationComponents(interactive ? legacyInteractiveReplyToPresentation(interactive) : void 0, options);
1016
1017
  }
1017
- function buildDiscordPresentationComponents(presentation) {
1018
+ function buildDiscordPresentationComponents(presentation, options = {}) {
1018
1019
  if (!presentation) return;
1019
1020
  const blocks = [];
1020
1021
  if (presentation.title) blocks.push({
@@ -1023,7 +1024,7 @@ function buildDiscordPresentationComponents(presentation) {
1023
1024
  });
1024
1025
  for (const block of presentation.blocks) {
1025
1026
  if (block.type === "text" || block.type === "context") {
1026
- const text = block.text.trim();
1027
+ const text = block.text;
1027
1028
  if (text) blocks.push({
1028
1029
  type: "text",
1029
1030
  text: block.type === "context" ? `-# ${text}` : text
@@ -1035,7 +1036,7 @@ function buildDiscordPresentationComponents(presentation) {
1035
1036
  continue;
1036
1037
  }
1037
1038
  if (block.type === "buttons") {
1038
- appendDiscordButtonBlocks(blocks, block.buttons);
1039
+ appendDiscordButtonBlocks(blocks, block.buttons, options);
1039
1040
  continue;
1040
1041
  }
1041
1042
  if (block.type === "select") appendDiscordSelectBlock(blocks, block);
@@ -1055,6 +1056,7 @@ var components_exports = /* @__PURE__ */ __exportAll({
1055
1056
  buildDiscordComponentMessageFlags: () => buildDiscordComponentMessageFlags,
1056
1057
  buildDiscordInteractiveComponents: () => buildDiscordInteractiveComponents,
1057
1058
  buildDiscordModalCustomId: () => buildDiscordModalCustomId,
1059
+ coerceDiscordComponentParam: () => coerceDiscordComponentParam,
1058
1060
  createDiscordFormModal: () => createDiscordFormModal,
1059
1061
  formatDiscordComponentEventText: () => formatDiscordComponentEventText,
1060
1062
  parseDiscordComponentCustomId: () => parseDiscordComponentCustomId,
@@ -1071,48 +1073,4 @@ function formatDiscordComponentEventText(params) {
1071
1073
  return `Selected ${values.join(", ")} from "${params.label}".`;
1072
1074
  }
1073
1075
  //#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 };
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,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";
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 { z } from "zod";
5
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";
6
8
  //#region extensions/discord/src/config-ui-hints.ts
7
9
  const discordChannelConfigUiHints = {
8
10
  "": {
@@ -33,6 +35,10 @@ const discordChannelConfigUiHints = {
33
35
  },
34
36
  progress: { includeCommentary: true }
35
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
+ },
36
42
  proxy: {
37
43
  label: "Discord Proxy URL",
38
44
  help: "Proxy URL for Discord gateway + API requests (app-id lookup and allowlist resolution). Set per account via channels.discord.accounts.<id>.proxy."
@@ -168,7 +174,11 @@ const discordChannelConfigUiHints = {
168
174
  },
169
175
  "voice.autoJoin": {
170
176
  label: "Discord Voice Auto-Join",
171
- help: "Voice channels to auto-join on startup (list of guildId/channelId entries)."
177
+ help: "Voice channels to auto-join (list of guildId/channelId entries). Set whenOccupied on an entry to connect only while humans are present."
178
+ },
179
+ "voice.autoJoin.*.whenOccupied": {
180
+ label: "Discord Voice Auto-Join When Occupied",
181
+ 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
182
  },
173
183
  "voice.allowedChannels": {
174
184
  label: "Discord Voice Allowed Channels",
@@ -301,7 +311,7 @@ const discordChannelConfigUiHints = {
301
311
  },
302
312
  activities: {
303
313
  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."
314
+ 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
315
  },
306
316
  "activities.clientSecret": {
307
317
  label: "Discord Activities Client Secret",
@@ -389,7 +399,8 @@ const DiscordGuildSchema = buildGroupEntrySchema({
389
399
  ] });
390
400
  const DiscordVoiceAutoJoinSchema = z.object({
391
401
  guildId: z.string().min(1),
392
- channelId: z.string().min(1)
402
+ channelId: z.string().min(1),
403
+ whenOccupied: z.boolean().optional()
393
404
  }).strict();
394
405
  const DiscordVoiceAllowedChannelSchema = z.object({
395
406
  guildId: z.string().min(1),
@@ -454,13 +465,14 @@ const DiscordVoiceSchema = z.object({
454
465
  captureSilenceGraceMs: z.number().int().positive().max(3e4).optional(),
455
466
  tts: TtsConfigSchema.optional()
456
467
  }).strict().optional();
457
- const DiscordAccountSchema = z.object({
458
- ...buildCommonChannelAccountShape({
459
- omit: ["groupAllowFrom"],
460
- groupPolicyDefault: true,
461
- allowFrom: DiscordIdListSchema.optional(),
462
- streaming: DiscordPreviewStreamingConfigSchema.optional()
463
- }),
468
+ const { accountShape, rootPolicyShape } = buildChannelAccountSchemaParts({
469
+ omit: ["groupAllowFrom"],
470
+ allowFrom: DiscordIdListSchema.optional(),
471
+ streaming: DiscordPreviewStreamingConfigSchema.optional()
472
+ });
473
+ const DiscordAccountSchemaBase = z.object({
474
+ ...accountShape,
475
+ joinIntro: z.boolean().optional(),
464
476
  commands: ProviderCommandsSchema,
465
477
  token: registerSensitiveConfigSchema(SecretInputSchema.optional()),
466
478
  applicationId: DiscordIdSchema.optional(),
@@ -583,7 +595,26 @@ const DiscordAccountSchema = z.object({
583
595
  path: ["autoPresence", "minUpdateIntervalMs"]
584
596
  });
585
597
  });
586
- const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordAccountSchema.extend({
598
+ function normalizeShippedDiscordDmAliases(value) {
599
+ const entry = asObjectRecord(value);
600
+ if (!entry) return value;
601
+ const updated = normalizeLegacyDmAliases({
602
+ entry,
603
+ pathPrefix: "channels.discord",
604
+ changes: []
605
+ }).entry;
606
+ const dm = asObjectRecord(updated.dm);
607
+ if (!dm || dm.policy === void 0 && dm.allowFrom === void 0) return updated;
608
+ const { policy: _policy, allowFrom: _allowFrom, ...retainedDm } = dm;
609
+ const { dm: _dm, ...rest } = updated;
610
+ return Object.keys(retainedDm).length > 0 ? {
611
+ ...rest,
612
+ dm: retainedDm
613
+ } : rest;
614
+ }
615
+ const DiscordAccountSchema = z.preprocess(normalizeShippedDiscordDmAliases, DiscordAccountSchemaBase);
616
+ const DiscordConfigSchemaBase = DiscordAccountSchemaBase.safeExtend({
617
+ ...rootPolicyShape,
587
618
  accounts: z.record(z.string(), DiscordAccountSchema.optional()).optional(),
588
619
  defaultAccount: z.string().optional()
589
620
  }).superRefine((value, ctx) => {
@@ -631,6 +662,7 @@ const DiscordChannelConfigSchema = buildChannelConfigSchema(DiscordAccountSchema
631
662
  message: "channels.discord.accounts.*.dmPolicy=\"allowlist\" requires channels.discord.accounts.*.allowFrom (or channels.discord.allowFrom) to contain at least one sender ID"
632
663
  });
633
664
  }
634
- }), { uiHints: discordChannelConfigUiHints });
665
+ });
666
+ const DiscordChannelConfigSchema = buildChannelConfigSchema(z.preprocess(normalizeShippedDiscordDmAliases, DiscordConfigSchemaBase), { uiHints: discordChannelConfigUiHints });
635
667
  //#endregion
636
668
  export { DiscordChannelConfigSchema as t };
@@ -0,0 +1,43 @@
1
+ import { l as shouldIgnoreStaleDiscordRouteBinding } from "./outbound-session-route-Bn4uXaoE.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-DqHCW6PV.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-B7DY_pNG.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-DqHCW6PV.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,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,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-BLEMH_yi.js";
3
+ import { t as inspectDiscordAccount } from "./account-inspect-BDfKyuvL.js";
4
+ import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-Dii2HTn7.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,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-BYamRVPN.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-Bn4uXaoE.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-Dl-TOyOX.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
@@ -0,0 +1,60 @@
1
+ import { r as normalizeDiscordAllowList } from "./allow-list-BDMimASD.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 };