@openclaw/discord 2026.7.1-beta.1 → 2026.7.1-beta.4

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 (672) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{api-CJvEMuA6.js → api-DPRqYi4Z.js} +2 -1
  3. package/dist/api.js +14 -14
  4. package/dist/{approval-handler.runtime-DzoY4ufU.js → approval-handler.runtime-Bw2pZNk1.js} +24 -4
  5. package/dist/{audit-BXGKCgbA.js → audit-MLpDpN3Z.js} +3 -3
  6. package/dist/{channel-actions-CamohoDF.js → channel-actions-D_fjVUZ_.js} +6 -9
  7. package/dist/{channel-actions.runtime-C1y4B9J0.js → channel-actions.runtime-CVHlFqQg.js} +5 -5
  8. package/dist/channel-config-api.js +1 -1
  9. package/dist/{channel-Da36gsaP.js → channel-kBTCV_g9.js} +27 -47
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.setup-KhiBHeGT.js → channel.setup-tZcpIn4e.js} +3 -3
  12. package/dist/{components-CBPNJhVP.js → components-BIBizbtZ.js} +10 -6
  13. package/dist/{config-schema-spuxW477.js → config-schema-BgIhO3ko.js} +1 -1
  14. package/dist/{conversation-identity-BEsyd7A1.js → conversation-identity-DWC5d8Sy.js} +2 -2
  15. package/dist/{directory-config-CouAqvDj.js → directory-config-ByaUKL1f.js} +1 -1
  16. package/dist/directory-contract-api.js +1 -1
  17. package/dist/{directory-live-C8lwwDJo.js → directory-live-BX79ImQA.js} +2 -2
  18. package/dist/{doctor-D3ngpo-Y.js → doctor-Bgoxm5AN.js} +1 -1
  19. package/dist/{handle-action.guild-admin-zmPNo8TF.js → handle-action.guild-admin-CgJSNVui.js} +2 -2
  20. package/dist/index.js +1 -1
  21. package/dist/{manager.runtime-TLLuQzsA.js → manager.runtime-D-ZJn56X.js} +28 -15
  22. package/dist/{message-handler-ClZrgeka.js → message-handler-DbrX-sHg.js} +12 -16
  23. package/dist/{message-handler.preflight-CjnHwEwP.js → message-handler.preflight-Dd-xQ-qv.js} +38 -44
  24. package/dist/{message-handler.process-OruF8JFV.js → message-handler.process-CV1GmuBj.js} +33 -95
  25. package/dist/{message-utils-C_tYBSAu.js → message-utils-B_3yA5bN.js} +11 -6
  26. package/dist/{outbound-adapter-B0iwUl6c.js → outbound-adapter-82RWi_SR.js} +140 -166
  27. package/dist/{pluralkit-DaWTJTmF.js → pluralkit-DcD-3EcL.js} +1 -1
  28. package/dist/{preflight-audio-ClWbnQto.js → preflight-audio-DYL2ABgA.js} +3 -6
  29. package/dist/presence-cache-z1N8MbJ3.js +45 -0
  30. package/dist/{probe-Bkf8mJlj.js → probe-D1ImJEo2.js} +2 -2
  31. package/dist/{probe.runtime-3Rerer9g.js → probe.runtime-B1dsEeBD.js} +1 -1
  32. package/dist/{provider-CChQJujf.js → provider-Cm9QSAO8.js} +65 -65
  33. package/dist/{provider-session.runtime-Dy71XetI.js → provider-session.runtime-DYKny61v.js} +3 -3
  34. package/dist/provider.runtime-BIHvVXCg.js +2 -0
  35. package/dist/{resolve-allowlist-common-BDNoAQll.js → resolve-allowlist-common-CWbE8XlH.js} +1 -1
  36. package/dist/{resolve-channels-C_rAwrkj.js → resolve-channels-CcpvWoRa.js} +3 -3
  37. package/dist/{resolve-users-Cz1tkemy.js → resolve-users-DJamun9s.js} +3 -3
  38. package/dist/{runtime-C-fNslbg.js → runtime-C6rRmQ6l.js} +344 -313
  39. package/dist/runtime-api.actions.js +2 -2
  40. package/dist/runtime-api.js +20 -20
  41. package/dist/runtime-api.lookup.js +5 -5
  42. package/dist/runtime-api.monitor-DoCAqUlv.js +6 -0
  43. package/dist/runtime-api.monitor.js +6 -5
  44. package/dist/runtime-api.send.js +5 -5
  45. package/dist/runtime-api.threads.js +3 -3
  46. package/dist/{secret-config-contract-BjM-1hr9.js → secret-config-contract-BDNrRWvd.js} +6 -1
  47. package/dist/secret-contract-api.js +1 -1
  48. package/dist/{send-BYTToRY1.js → send-iJ0B4bAX.js} +28 -17
  49. package/dist/{send.components-Cmv2qMB5.js → send.components-D0I39utR.js} +18 -15
  50. package/dist/{send.outbound-BqvRMxXy.js → send.outbound-Bj61Q3a0.js} +105 -20
  51. package/dist/{send.receipt-CK162xD0.js → send.receipt-BpBQED_5.js} +51 -26
  52. package/dist/{send.shared-YLGCAMjV.js → send.shared-wAwMhHDN.js} +147 -41
  53. package/dist/session-binding-contract-api.js +1 -1
  54. package/dist/setup-plugin-api.js +1 -1
  55. package/dist/{shared-D11J9bXI.js → shared-BQVKfnev.js} +5 -12
  56. package/dist/{subagent-hooks-cE_tFGCX.js → subagent-hooks-B-bJxxGg.js} +2 -2
  57. package/dist/subagent-hooks-api.js +2 -5
  58. package/dist/{system-events-XRYuwB2n.js → system-events-DVnqSyTt.js} +1 -1
  59. package/dist/{target-resolver-DYufMbXm.js → target-resolver-CwHaSLt3.js} +2 -2
  60. package/dist/targets-69w7c3vU.js +3 -0
  61. package/dist/{thread-bindings-C1yhwdOw.js → thread-bindings-DsTxqu3E.js} +4 -4
  62. package/dist/{thread-bindings.discord-api-XBJmlLaf.js → thread-bindings.discord-api-BjIf9lGs.js} +4 -4
  63. package/dist/{thread-bindings.manager-BdFs0ot7.js → thread-bindings.manager-Bwmtqc3E.js} +3 -3
  64. package/dist/{transcripts-source-DW6d1eCL.js → transcripts-source-BvvM5Ns9.js} +1 -1
  65. package/dist/transcripts-source-api.js +1 -1
  66. package/dist/{typing-BMQEI8OW.js → typing-BVcJgILg.js} +1 -1
  67. package/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +23 -1
  68. package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +291 -256
  69. package/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +23 -1
  70. package/node_modules/@napi-rs/wasm-runtime/package.json +6 -6
  71. package/node_modules/@snazzah/davey/index.js +46 -46
  72. package/node_modules/@snazzah/davey/package.json +20 -20
  73. package/node_modules/@snazzah/davey-android-arm-eabi/davey.android-arm-eabi.node +0 -0
  74. package/node_modules/@snazzah/davey-android-arm-eabi/package.json +1 -1
  75. package/node_modules/@snazzah/davey-android-arm64/davey.android-arm64.node +0 -0
  76. package/node_modules/@snazzah/davey-android-arm64/package.json +1 -1
  77. package/node_modules/@snazzah/davey-darwin-arm64/davey.darwin-arm64.node +0 -0
  78. package/node_modules/@snazzah/davey-darwin-arm64/package.json +1 -1
  79. package/node_modules/@snazzah/davey-darwin-x64/davey.darwin-x64.node +0 -0
  80. package/node_modules/@snazzah/davey-darwin-x64/package.json +1 -1
  81. package/node_modules/@snazzah/davey-freebsd-x64/davey.freebsd-x64.node +0 -0
  82. package/node_modules/@snazzah/davey-freebsd-x64/package.json +1 -1
  83. package/node_modules/@snazzah/davey-linux-arm-gnueabihf/davey.linux-arm-gnueabihf.node +0 -0
  84. package/node_modules/@snazzah/davey-linux-arm-gnueabihf/package.json +1 -1
  85. package/node_modules/@snazzah/davey-linux-arm64-gnu/davey.linux-arm64-gnu.node +0 -0
  86. package/node_modules/@snazzah/davey-linux-arm64-gnu/package.json +1 -1
  87. package/node_modules/@snazzah/davey-linux-arm64-musl/davey.linux-arm64-musl.node +0 -0
  88. package/node_modules/@snazzah/davey-linux-arm64-musl/package.json +1 -1
  89. package/node_modules/@snazzah/davey-linux-x64-gnu/davey.linux-x64-gnu.node +0 -0
  90. package/node_modules/@snazzah/davey-linux-x64-gnu/package.json +1 -1
  91. package/node_modules/@snazzah/davey-linux-x64-musl/davey.linux-x64-musl.node +0 -0
  92. package/node_modules/@snazzah/davey-linux-x64-musl/package.json +1 -1
  93. package/node_modules/@snazzah/davey-wasm32-wasi/davey.wasm32-wasi.wasm +0 -0
  94. package/node_modules/@snazzah/davey-wasm32-wasi/package.json +2 -2
  95. package/node_modules/@snazzah/davey-win32-arm64-msvc/davey.win32-arm64-msvc.node +0 -0
  96. package/node_modules/@snazzah/davey-win32-arm64-msvc/package.json +1 -1
  97. package/node_modules/@snazzah/davey-win32-ia32-msvc/davey.win32-ia32-msvc.node +0 -0
  98. package/node_modules/@snazzah/davey-win32-ia32-msvc/package.json +1 -1
  99. package/node_modules/@snazzah/davey-win32-x64-msvc/davey.win32-x64-msvc.node +0 -0
  100. package/node_modules/@snazzah/davey-win32-x64-msvc/package.json +1 -1
  101. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +60 -48
  102. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +60 -48
  103. package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -1
  104. package/node_modules/@tybys/wasm-util/dist/wasm-util.js +60 -48
  105. package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -1
  106. package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +62 -49
  107. package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +60 -48
  108. package/node_modules/@tybys/wasm-util/package.json +1 -1
  109. package/node_modules/@types/node/README.md +1 -1
  110. package/node_modules/@types/node/assert/strict.d.ts +10 -1
  111. package/node_modules/@types/node/assert.d.ts +144 -17
  112. package/node_modules/@types/node/async_hooks.d.ts +9 -9
  113. package/node_modules/@types/node/buffer.d.ts +64 -30
  114. package/node_modules/@types/node/child_process.d.ts +17 -21
  115. package/node_modules/@types/node/cluster.d.ts +13 -13
  116. package/node_modules/@types/node/console.d.ts +1 -1
  117. package/node_modules/@types/node/crypto.d.ts +471 -575
  118. package/node_modules/@types/node/diagnostics_channel.d.ts +274 -32
  119. package/node_modules/@types/node/dns.d.ts +15 -15
  120. package/node_modules/@types/node/events.d.ts +3 -3
  121. package/node_modules/@types/node/ffi.d.ts +486 -0
  122. package/node_modules/@types/node/fs/promises.d.ts +7 -4
  123. package/node_modules/@types/node/fs.d.ts +24 -18
  124. package/node_modules/@types/node/globals.d.ts +4 -4
  125. package/node_modules/@types/node/http.d.ts +30 -5
  126. package/node_modules/@types/node/http2.d.ts +5 -1
  127. package/node_modules/@types/node/index.d.ts +1 -3
  128. package/node_modules/@types/node/inspector.d.ts +1 -1
  129. package/node_modules/@types/node/module.d.ts +16 -45
  130. package/node_modules/@types/node/net.d.ts +1 -1
  131. package/node_modules/@types/node/os.d.ts +2 -2
  132. package/node_modules/@types/node/package.json +4 -4
  133. package/node_modules/@types/node/perf_hooks.d.ts +1 -9
  134. package/node_modules/@types/node/process.d.ts +25 -12
  135. package/node_modules/@types/node/quic.d.ts +92 -11
  136. package/node_modules/@types/node/readline.d.ts +12 -11
  137. package/node_modules/@types/node/repl.d.ts +10 -10
  138. package/node_modules/@types/node/sqlite.d.ts +56 -1
  139. package/node_modules/@types/node/stream/iter.d.ts +150 -0
  140. package/node_modules/@types/node/stream/promises.d.ts +2 -2
  141. package/node_modules/@types/node/stream/web.d.ts +1 -1
  142. package/node_modules/@types/node/stream.d.ts +37 -5
  143. package/node_modules/@types/node/test/reporters.d.ts +1 -1
  144. package/node_modules/@types/node/test.d.ts +120 -10
  145. package/node_modules/@types/node/tls.d.ts +1 -1
  146. package/node_modules/@types/node/ts5.6/index.d.ts +2 -4
  147. package/node_modules/@types/node/ts5.7/index.d.ts +1 -3
  148. package/node_modules/@types/node/url.d.ts +3 -3
  149. package/node_modules/@types/node/util/types.d.ts +1 -1
  150. package/node_modules/@types/node/util.d.ts +22 -22
  151. package/node_modules/@types/node/v8.d.ts +85 -3
  152. package/node_modules/@types/node/vm.d.ts +9 -9
  153. package/node_modules/@types/node/web-globals/domexception.d.ts +15 -0
  154. package/node_modules/@types/node/worker_threads.d.ts +10 -12
  155. package/node_modules/@types/node/zlib.d.ts +3 -3
  156. package/node_modules/discord-api-types/CHANGELOG.md +16 -0
  157. package/node_modules/discord-api-types/README.md +1 -1
  158. package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts +16 -0
  159. package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts.map +1 -1
  160. package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts +16 -0
  161. package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts.map +1 -1
  162. package/node_modules/discord-api-types/gateway/index.mjs +1 -0
  163. package/node_modules/discord-api-types/gateway/v10.d.ts +125 -8
  164. package/node_modules/discord-api-types/gateway/v10.d.ts.map +1 -1
  165. package/node_modules/discord-api-types/gateway/v10.js +13 -1
  166. package/node_modules/discord-api-types/gateway/v10.js.map +1 -1
  167. package/node_modules/discord-api-types/gateway/v10.mjs +1 -0
  168. package/node_modules/discord-api-types/gateway/v9.d.ts +125 -8
  169. package/node_modules/discord-api-types/gateway/v9.d.ts.map +1 -1
  170. package/node_modules/discord-api-types/gateway/v9.js +13 -1
  171. package/node_modules/discord-api-types/gateway/v9.js.map +1 -1
  172. package/node_modules/discord-api-types/gateway/v9.mjs +1 -0
  173. package/node_modules/discord-api-types/package.json +4 -4
  174. package/node_modules/discord-api-types/payloads/common.d.ts +6 -0
  175. package/node_modules/discord-api-types/payloads/common.d.ts.map +1 -1
  176. package/node_modules/discord-api-types/payloads/common.js +6 -0
  177. package/node_modules/discord-api-types/payloads/common.js.map +1 -1
  178. package/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts +1 -1
  179. package/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map +1 -1
  180. package/node_modules/discord-api-types/payloads/v10/auditLog.d.ts +12 -1
  181. package/node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map +1 -1
  182. package/node_modules/discord-api-types/payloads/v10/auditLog.js +2 -0
  183. package/node_modules/discord-api-types/payloads/v10/auditLog.js.map +1 -1
  184. package/node_modules/discord-api-types/payloads/v10/invite.d.ts +7 -1
  185. package/node_modules/discord-api-types/payloads/v10/invite.d.ts.map +1 -1
  186. package/node_modules/discord-api-types/payloads/v10/invite.js.map +1 -1
  187. package/node_modules/discord-api-types/payloads/v10/monetization.d.ts +4 -4
  188. package/node_modules/discord-api-types/payloads/v10/monetization.d.ts.map +1 -1
  189. package/node_modules/discord-api-types/payloads/v10/monetization.js +4 -4
  190. package/node_modules/discord-api-types/payloads/v10/monetization.js.map +1 -1
  191. package/node_modules/discord-api-types/payloads/v10/webhook.d.ts +2 -2
  192. package/node_modules/discord-api-types/payloads/v10/webhook.d.ts.map +1 -1
  193. package/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts +1 -1
  194. package/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map +1 -1
  195. package/node_modules/discord-api-types/payloads/v9/auditLog.d.ts +12 -1
  196. package/node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map +1 -1
  197. package/node_modules/discord-api-types/payloads/v9/auditLog.js +2 -0
  198. package/node_modules/discord-api-types/payloads/v9/auditLog.js.map +1 -1
  199. package/node_modules/discord-api-types/payloads/v9/invite.d.ts +7 -1
  200. package/node_modules/discord-api-types/payloads/v9/invite.d.ts.map +1 -1
  201. package/node_modules/discord-api-types/payloads/v9/invite.js.map +1 -1
  202. package/node_modules/discord-api-types/payloads/v9/monetization.d.ts +4 -4
  203. package/node_modules/discord-api-types/payloads/v9/monetization.d.ts.map +1 -1
  204. package/node_modules/discord-api-types/payloads/v9/monetization.js +4 -4
  205. package/node_modules/discord-api-types/payloads/v9/monetization.js.map +1 -1
  206. package/node_modules/discord-api-types/payloads/v9/webhook.d.ts +2 -2
  207. package/node_modules/discord-api-types/payloads/v9/webhook.d.ts.map +1 -1
  208. package/node_modules/discord-api-types/rest/common.d.ts +5 -0
  209. package/node_modules/discord-api-types/rest/common.d.ts.map +1 -1
  210. package/node_modules/discord-api-types/rest/common.js +5 -0
  211. package/node_modules/discord-api-types/rest/common.js.map +1 -1
  212. package/node_modules/discord-api-types/rest/index.mjs +1 -0
  213. package/node_modules/discord-api-types/rest/v10/autoModeration.d.ts +1 -1
  214. package/node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map +1 -1
  215. package/node_modules/discord-api-types/rest/v10/channel.d.ts +49 -16
  216. package/node_modules/discord-api-types/rest/v10/channel.d.ts.map +1 -1
  217. package/node_modules/discord-api-types/rest/v10/emoji.d.ts +2 -2
  218. package/node_modules/discord-api-types/rest/v10/emoji.d.ts.map +1 -1
  219. package/node_modules/discord-api-types/rest/v10/guild.d.ts +9 -9
  220. package/node_modules/discord-api-types/rest/v10/guild.d.ts.map +1 -1
  221. package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts +1 -1
  222. package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map +1 -1
  223. package/node_modules/discord-api-types/rest/v10/index.d.ts +1 -1
  224. package/node_modules/discord-api-types/rest/v10/index.d.ts.map +1 -1
  225. package/node_modules/discord-api-types/rest/v10/index.js +23 -0
  226. package/node_modules/discord-api-types/rest/v10/index.js.map +1 -1
  227. package/node_modules/discord-api-types/rest/v10/index.mjs +1 -0
  228. package/node_modules/discord-api-types/rest/v10/interactions.d.ts +1 -1
  229. package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -1
  230. package/node_modules/discord-api-types/rest/v10/invite.d.ts +67 -0
  231. package/node_modules/discord-api-types/rest/v10/invite.d.ts.map +1 -1
  232. package/node_modules/discord-api-types/rest/v10/invite.js +23 -0
  233. package/node_modules/discord-api-types/rest/v10/invite.js.map +1 -1
  234. package/node_modules/discord-api-types/rest/v10/monetization.d.ts +2 -2
  235. package/node_modules/discord-api-types/rest/v10/monetization.d.ts.map +1 -1
  236. package/node_modules/discord-api-types/rest/v10/soundboard.d.ts +2 -2
  237. package/node_modules/discord-api-types/rest/v10/soundboard.d.ts.map +1 -1
  238. package/node_modules/discord-api-types/rest/v10/stageInstance.d.ts +1 -1
  239. package/node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map +1 -1
  240. package/node_modules/discord-api-types/rest/v10/sticker.d.ts +1 -1
  241. package/node_modules/discord-api-types/rest/v10/sticker.d.ts.map +1 -1
  242. package/node_modules/discord-api-types/rest/v10/user.d.ts +1 -1
  243. package/node_modules/discord-api-types/rest/v10/user.d.ts.map +1 -1
  244. package/node_modules/discord-api-types/rest/v10/voice.d.ts +2 -2
  245. package/node_modules/discord-api-types/rest/v10/voice.d.ts.map +1 -1
  246. package/node_modules/discord-api-types/rest/v10/webhook.d.ts +6 -6
  247. package/node_modules/discord-api-types/rest/v10/webhook.d.ts.map +1 -1
  248. package/node_modules/discord-api-types/rest/v9/autoModeration.d.ts +1 -1
  249. package/node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map +1 -1
  250. package/node_modules/discord-api-types/rest/v9/channel.d.ts +49 -16
  251. package/node_modules/discord-api-types/rest/v9/channel.d.ts.map +1 -1
  252. package/node_modules/discord-api-types/rest/v9/emoji.d.ts +2 -2
  253. package/node_modules/discord-api-types/rest/v9/emoji.d.ts.map +1 -1
  254. package/node_modules/discord-api-types/rest/v9/guild.d.ts +9 -9
  255. package/node_modules/discord-api-types/rest/v9/guild.d.ts.map +1 -1
  256. package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts +1 -1
  257. package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map +1 -1
  258. package/node_modules/discord-api-types/rest/v9/index.d.ts +1 -1
  259. package/node_modules/discord-api-types/rest/v9/index.d.ts.map +1 -1
  260. package/node_modules/discord-api-types/rest/v9/index.js +23 -0
  261. package/node_modules/discord-api-types/rest/v9/index.js.map +1 -1
  262. package/node_modules/discord-api-types/rest/v9/index.mjs +1 -0
  263. package/node_modules/discord-api-types/rest/v9/interactions.d.ts +1 -1
  264. package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -1
  265. package/node_modules/discord-api-types/rest/v9/invite.d.ts +67 -0
  266. package/node_modules/discord-api-types/rest/v9/invite.d.ts.map +1 -1
  267. package/node_modules/discord-api-types/rest/v9/invite.js +23 -0
  268. package/node_modules/discord-api-types/rest/v9/invite.js.map +1 -1
  269. package/node_modules/discord-api-types/rest/v9/monetization.d.ts +2 -2
  270. package/node_modules/discord-api-types/rest/v9/monetization.d.ts.map +1 -1
  271. package/node_modules/discord-api-types/rest/v9/soundboard.d.ts +2 -2
  272. package/node_modules/discord-api-types/rest/v9/soundboard.d.ts.map +1 -1
  273. package/node_modules/discord-api-types/rest/v9/stageInstance.d.ts +1 -1
  274. package/node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map +1 -1
  275. package/node_modules/discord-api-types/rest/v9/sticker.d.ts +1 -1
  276. package/node_modules/discord-api-types/rest/v9/sticker.d.ts.map +1 -1
  277. package/node_modules/discord-api-types/rest/v9/user.d.ts +1 -1
  278. package/node_modules/discord-api-types/rest/v9/user.d.ts.map +1 -1
  279. package/node_modules/discord-api-types/rest/v9/voice.d.ts +2 -2
  280. package/node_modules/discord-api-types/rest/v9/voice.d.ts.map +1 -1
  281. package/node_modules/discord-api-types/rest/v9/webhook.d.ts +6 -6
  282. package/node_modules/discord-api-types/rest/v9/webhook.d.ts.map +1 -1
  283. package/node_modules/discord-api-types/rpc/v10.d.ts +19 -19
  284. package/node_modules/discord-api-types/rpc/v10.d.ts.map +1 -1
  285. package/node_modules/discord-api-types/v10.mjs +2 -0
  286. package/node_modules/discord-api-types/v9.mjs +2 -0
  287. package/node_modules/typebox/build/compile/validator.d.mts +2 -7
  288. package/node_modules/typebox/build/compile/validator.mjs +6 -36
  289. package/node_modules/typebox/build/error/errors.d.mts +1 -7
  290. package/node_modules/typebox/build/format/_idna.mjs +36 -6
  291. package/node_modules/typebox/build/format/_puny.mjs +4 -1
  292. package/node_modules/typebox/build/format/uuid.d.mts +2 -2
  293. package/node_modules/typebox/build/format/uuid.mjs +3 -3
  294. package/node_modules/typebox/build/guard/emit.d.mts +0 -4
  295. package/node_modules/typebox/build/guard/emit.mjs +0 -8
  296. package/node_modules/typebox/build/guard/guard.d.mts +4 -8
  297. package/node_modules/typebox/build/guard/guard.mjs +5 -13
  298. package/node_modules/typebox/build/schema/engine/boolean.d.mts +3 -3
  299. package/node_modules/typebox/build/schema/engine/boolean.mjs +4 -4
  300. package/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
  301. package/node_modules/typebox/build/schema/engine/index.mjs +0 -1
  302. package/node_modules/typebox/build/schema/engine/schema.mjs +5 -10
  303. package/node_modules/typebox/build/schema/engine/type.mjs +14 -18
  304. package/node_modules/typebox/build/schema/types/dependencies.mjs +1 -1
  305. package/node_modules/typebox/build/schema/types/index.d.mts +0 -1
  306. package/node_modules/typebox/build/schema/types/index.mjs +0 -1
  307. package/node_modules/typebox/build/schema/types/schema.d.mts +1 -1
  308. package/node_modules/typebox/build/schema/types/schema.mjs +2 -2
  309. package/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
  310. package/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
  311. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
  312. package/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
  313. package/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
  314. package/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
  315. package/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
  316. package/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
  317. package/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
  318. package/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
  319. package/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
  320. package/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
  321. package/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
  322. package/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
  323. package/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
  324. package/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
  325. package/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
  326. package/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
  327. package/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
  328. package/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
  329. package/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
  330. package/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
  331. package/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
  332. package/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
  333. package/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
  334. package/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
  335. package/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
  336. package/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
  337. package/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
  338. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
  339. package/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
  340. package/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
  341. package/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
  342. package/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
  343. package/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
  344. package/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
  345. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
  346. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
  347. package/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
  348. package/node_modules/typebox/build/system/memory/clone.mjs +73 -26
  349. package/node_modules/typebox/build/system/settings/settings.d.mts +15 -0
  350. package/node_modules/typebox/build/system/settings/settings.mjs +3 -1
  351. package/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
  352. package/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
  353. package/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
  354. package/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
  355. package/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
  356. package/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
  357. package/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
  358. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
  359. package/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
  360. package/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
  361. package/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
  362. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
  363. package/node_modules/typebox/build/type/action/conditional.d.mts +2 -3
  364. package/node_modules/typebox/build/type/action/conditional.mjs +2 -1
  365. package/node_modules/typebox/build/type/action/index.d.mts +7 -4
  366. package/node_modules/typebox/build/type/action/index.mjs +7 -4
  367. package/node_modules/typebox/build/type/action/mapped.d.mts +2 -3
  368. package/node_modules/typebox/build/type/action/mapped.mjs +2 -1
  369. package/node_modules/typebox/build/type/action/module.d.mts +8 -7
  370. package/node_modules/typebox/build/type/action/module.mjs +7 -6
  371. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  372. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
  373. package/node_modules/typebox/build/type/action/with.d.mts +11 -0
  374. package/node_modules/typebox/build/type/action/with.mjs +11 -0
  375. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  376. package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +1 -3
  377. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +3 -2
  378. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +2 -2
  379. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +3 -4
  380. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +2 -1
  381. package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +2 -3
  382. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +3 -6
  383. package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +6 -9
  384. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +10 -16
  385. package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
  386. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
  387. package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
  388. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
  389. package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +2 -5
  390. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +3 -2
  391. package/node_modules/typebox/build/type/engine/enum/index.d.mts +0 -1
  392. package/node_modules/typebox/build/type/engine/enum/index.mjs +0 -1
  393. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +1 -2
  394. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +2 -6
  395. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +10 -6
  396. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +10 -6
  397. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +2 -1
  398. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +3 -3
  399. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +17 -5
  400. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +34 -8
  401. package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +5 -6
  402. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +11 -12
  403. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +5 -6
  404. package/node_modules/typebox/build/type/engine/extract/operation.mjs +11 -12
  405. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  406. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
  407. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  408. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  409. package/node_modules/typebox/build/type/engine/index.d.mts +2 -2
  410. package/node_modules/typebox/build/type/engine/index.mjs +2 -2
  411. package/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
  412. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
  413. package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +3 -3
  414. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +4 -4
  415. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +2 -2
  416. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +3 -3
  417. package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +3 -1
  418. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +9 -6
  419. package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +2 -1
  420. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +5 -2
  421. package/node_modules/typebox/build/type/engine/instantiate.d.mts +44 -31
  422. package/node_modules/typebox/build/type/engine/instantiate.mjs +82 -83
  423. package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +3 -6
  424. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +2 -2
  425. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +3 -3
  426. package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +2 -1
  427. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +5 -1
  428. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +4 -4
  429. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +3 -3
  430. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +5 -4
  431. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +10 -5
  432. package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +7 -9
  433. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +17 -15
  434. package/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
  435. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
  436. package/node_modules/typebox/build/type/engine/object/from_type.d.mts +3 -1
  437. package/node_modules/typebox/build/type/engine/object/from_type.mjs +8 -5
  438. package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
  439. package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
  440. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
  441. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  442. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
  443. package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +3 -4
  444. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +2 -1
  445. package/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
  446. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
  447. package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +1 -1
  448. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +3 -2
  449. package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +2 -2
  450. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +2 -2
  451. package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +3 -1
  452. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +7 -4
  453. package/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
  454. package/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
  455. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
  456. package/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
  457. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  458. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
  459. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  460. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  461. package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +2 -2
  462. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +2 -2
  463. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  464. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  465. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +1 -1
  466. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +3 -2
  467. package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +2 -2
  468. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +2 -2
  469. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +2 -2
  470. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +2 -2
  471. package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +3 -1
  472. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +8 -5
  473. package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +2 -2
  474. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +2 -2
  475. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +2 -2
  476. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +2 -2
  477. package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +3 -3
  478. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +6 -6
  479. package/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
  480. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
  481. package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +1 -1
  482. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +3 -2
  483. package/node_modules/typebox/build/type/engine/required/from_object.d.mts +2 -2
  484. package/node_modules/typebox/build/type/engine/required/from_object.mjs +2 -2
  485. package/node_modules/typebox/build/type/engine/required/from_type.d.mts +3 -1
  486. package/node_modules/typebox/build/type/engine/required/from_type.mjs +7 -4
  487. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +3 -3
  488. package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +2 -2
  489. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +6 -6
  490. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  491. package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +1 -0
  492. package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
  493. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
  494. package/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
  495. package/node_modules/typebox/build/type/engine/{options → with}/instantiate.mjs +5 -5
  496. package/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
  497. package/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
  498. package/node_modules/typebox/build/type/extends/enum.d.mts +4 -4
  499. package/node_modules/typebox/build/type/extends/enum.mjs +3 -2
  500. package/node_modules/typebox/build/type/extends/extends_left.d.mts +5 -7
  501. package/node_modules/typebox/build/type/extends/extends_left.mjs +24 -27
  502. package/node_modules/typebox/build/type/extends/extends_right.d.mts +7 -5
  503. package/node_modules/typebox/build/type/extends/extends_right.mjs +20 -15
  504. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  505. package/node_modules/typebox/build/type/extends/object.d.mts +8 -1
  506. package/node_modules/typebox/build/type/extends/object.mjs +25 -3
  507. package/node_modules/typebox/build/type/extends/parameters.mjs +2 -2
  508. package/node_modules/typebox/build/type/extends/record.d.mts +13 -0
  509. package/node_modules/typebox/build/type/extends/record.mjs +23 -0
  510. package/node_modules/typebox/build/type/extends/template_literal.d.mts +3 -3
  511. package/node_modules/typebox/build/type/extends/template_literal.mjs +3 -3
  512. package/node_modules/typebox/build/type/extends/tuple.d.mts +3 -6
  513. package/node_modules/typebox/build/type/extends/tuple.mjs +6 -5
  514. package/node_modules/typebox/build/type/extends/union.mjs +2 -2
  515. package/node_modules/typebox/build/type/script/mapping.d.mts +84 -99
  516. package/node_modules/typebox/build/type/script/mapping.mjs +81 -85
  517. package/node_modules/typebox/build/type/script/parser.d.mts +40 -40
  518. package/node_modules/typebox/build/type/script/parser.mjs +22 -22
  519. package/node_modules/typebox/build/type/script/script.d.mts +3 -4
  520. package/node_modules/typebox/build/type/script/script.mjs +3 -2
  521. package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -1
  522. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  523. package/node_modules/typebox/build/type/script/token/internal/take.mjs +1 -1
  524. package/node_modules/typebox/build/type/script/token/until.mjs +2 -2
  525. package/node_modules/typebox/build/type/types/_codec.d.mts +12 -12
  526. package/node_modules/typebox/build/type/types/_codec.mjs +0 -1
  527. package/node_modules/typebox/build/type/types/_immutable.d.mts +2 -9
  528. package/node_modules/typebox/build/type/types/_immutable.mjs +2 -10
  529. package/node_modules/typebox/build/type/types/_optional.d.mts +2 -9
  530. package/node_modules/typebox/build/type/types/_optional.mjs +2 -11
  531. package/node_modules/typebox/build/type/types/_readonly.d.mts +2 -9
  532. package/node_modules/typebox/build/type/types/_readonly.mjs +2 -10
  533. package/node_modules/typebox/build/type/types/_refine.d.mts +8 -10
  534. package/node_modules/typebox/build/type/types/_refine.mjs +1 -2
  535. package/node_modules/typebox/build/type/types/call.d.mts +3 -3
  536. package/node_modules/typebox/build/type/types/call.mjs +3 -2
  537. package/node_modules/typebox/build/type/types/deferred.d.mts +1 -0
  538. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  539. package/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
  540. package/node_modules/typebox/build/type/types/dependent.mjs +24 -0
  541. package/node_modules/typebox/build/type/types/enum.d.mts +3 -1
  542. package/node_modules/typebox/build/type/types/enum.mjs +5 -0
  543. package/node_modules/typebox/build/type/types/index.d.mts +1 -4
  544. package/node_modules/typebox/build/type/types/index.mjs +1 -4
  545. package/node_modules/typebox/build/type/types/number.d.mts +1 -1
  546. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  547. package/node_modules/typebox/build/type/types/record.d.mts +13 -7
  548. package/node_modules/typebox/build/type/types/record.mjs +15 -9
  549. package/node_modules/typebox/build/type/types/static.d.mts +2 -5
  550. package/node_modules/typebox/build/typebox.d.mts +4 -8
  551. package/node_modules/typebox/build/typebox.mjs +4 -8
  552. package/node_modules/typebox/build/value/clean/clean.mjs +4 -2
  553. package/node_modules/typebox/build/value/clean/from_intersect.mjs +2 -2
  554. package/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
  555. package/node_modules/typebox/build/value/clean/from_union.d.mts +1 -1
  556. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -2
  557. package/node_modules/typebox/build/value/clone/clone.mjs +2 -73
  558. package/node_modules/typebox/build/value/codec/decode.mjs +4 -2
  559. package/node_modules/typebox/build/value/codec/encode.mjs +4 -2
  560. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -4
  561. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -4
  562. package/node_modules/typebox/build/value/codec/from_record.mjs +2 -7
  563. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -4
  564. package/node_modules/typebox/build/value/codec/from_union.mjs +2 -3
  565. package/node_modules/typebox/build/value/convert/from_enum.mjs +3 -4
  566. package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +1 -1
  567. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +2 -3
  568. package/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
  569. package/node_modules/typebox/build/value/create/from_enum.mjs +2 -2
  570. package/node_modules/typebox/build/value/create/from_type.mjs +23 -31
  571. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  572. package/node_modules/typebox/build/value/default/from_type.mjs +8 -10
  573. package/node_modules/typebox/build/value/index.d.mts +0 -1
  574. package/node_modules/typebox/build/value/index.mjs +0 -1
  575. package/node_modules/typebox/build/value/repair/from_enum.mjs +2 -3
  576. package/node_modules/typebox/build/value/repair/from_type.mjs +24 -22
  577. package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +6 -2
  578. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +62 -26
  579. package/node_modules/typebox/build/value/value.d.mts +0 -1
  580. package/node_modules/typebox/build/value/value.mjs +0 -1
  581. package/node_modules/typebox/package.json +25 -25
  582. package/node_modules/typebox/readme.md +97 -80
  583. package/node_modules/undici-types/agent.d.ts +0 -2
  584. package/node_modules/undici-types/client.d.ts +25 -19
  585. package/node_modules/undici-types/dispatcher.d.ts +7 -33
  586. package/node_modules/undici-types/dispatcher1-wrapper.d.ts +7 -0
  587. package/node_modules/undici-types/fetch.d.ts +24 -4
  588. package/node_modules/undici-types/h2c-client.d.ts +6 -6
  589. package/node_modules/undici-types/handlers.d.ts +1 -2
  590. package/node_modules/undici-types/header.d.ts +5 -0
  591. package/node_modules/undici-types/index.d.ts +3 -1
  592. package/node_modules/undici-types/interceptors.d.ts +1 -1
  593. package/node_modules/undici-types/package.json +1 -1
  594. package/node_modules/undici-types/pool.d.ts +0 -2
  595. package/node_modules/undici-types/proxy-agent.d.ts +2 -2
  596. package/node_modules/undici-types/round-robin-pool.d.ts +0 -2
  597. package/node_modules/undici-types/snapshot-agent.d.ts +4 -0
  598. package/node_modules/undici-types/socks5-proxy-agent.d.ts +2 -2
  599. package/node_modules/undici-types/webidl.d.ts +0 -1
  600. package/npm-shrinkwrap.json +85 -85
  601. package/openclaw.plugin.json +1 -1
  602. package/package.json +6 -6
  603. package/dist/gateway-registry-DPxmW0Db.js +0 -74
  604. package/dist/provider.runtime-BiOSsG0m.js +0 -2
  605. package/dist/runtime-api.monitor-CN1_mmYY.js +0 -6
  606. package/dist/targets-BA7gf0K0.js +0 -3
  607. package/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  608. package/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
  609. package/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
  610. package/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
  611. package/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
  612. package/node_modules/typebox/build/type/action/_optional.d.mts +0 -19
  613. package/node_modules/typebox/build/type/action/_optional.mjs +0 -40
  614. package/node_modules/typebox/build/type/action/_readonly.d.mts +0 -19
  615. package/node_modules/typebox/build/type/action/_readonly.mjs +0 -40
  616. package/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
  617. package/node_modules/typebox/build/type/action/awaited.mjs +0 -15
  618. package/node_modules/typebox/build/type/action/options.d.mts +0 -11
  619. package/node_modules/typebox/build/type/action/options.mjs +0 -11
  620. package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
  621. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
  622. package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +0 -14
  623. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +0 -24
  624. package/node_modules/typebox/build/type/engine/options/index.d.mts +0 -1
  625. package/node_modules/typebox/build/type/engine/options/index.mjs +0 -1
  626. package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +0 -8
  627. package/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
  628. package/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
  629. package/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
  630. package/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
  631. package/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
  632. package/node_modules/typebox/build/type/extends/promise.mjs +0 -9
  633. package/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
  634. package/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
  635. package/node_modules/typebox/build/type/types/base.d.mts +0 -50
  636. package/node_modules/typebox/build/type/types/base.mjs +0 -84
  637. package/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
  638. package/node_modules/typebox/build/type/types/iterator.mjs +0 -28
  639. package/node_modules/typebox/build/type/types/promise.d.mts +0 -21
  640. package/node_modules/typebox/build/type/types/promise.mjs +0 -29
  641. package/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
  642. package/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
  643. package/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
  644. package/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
  645. package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
  646. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
  647. package/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
  648. package/node_modules/typebox/build/value/create/from_base.mjs +0 -4
  649. package/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
  650. package/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
  651. package/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
  652. package/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
  653. package/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
  654. package/node_modules/typebox/build/value/default/from_base.mjs +0 -5
  655. package/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
  656. package/node_modules/typebox/build/value/mutate/error.mjs +0 -6
  657. package/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
  658. package/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
  659. package/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
  660. package/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
  661. package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
  662. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
  663. package/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
  664. package/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
  665. package/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
  666. package/node_modules/typebox/build/value/mutate/index.mjs +0 -1
  667. package/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
  668. package/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
  669. package/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
  670. package/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
  671. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.d.mts +0 -0
  672. /package/node_modules/typebox/build/type/engine/{awaited → with}/index.mjs +0 -0
@@ -1,17 +1,57 @@
1
- import { Ut as resolveDiscordChannelId } from "./send.receipt-CK162xD0.js";
1
+ import { qt as resolveDiscordChannelId, r as createReusableDiscordReplyReference } from "./send.receipt-BpBQED_5.js";
2
2
  import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
3
- import { d as readDiscordComponentSpec } from "./components-CBPNJhVP.js";
4
- import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-Cmv2qMB5.js";
5
- import { n as getGateway, o as getPresence } from "./gateway-registry-DPxmW0Db.js";
6
- import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-YLGCAMjV.js";
3
+ import { d as readDiscordComponentSpec } from "./components-BIBizbtZ.js";
4
+ import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-D0I39utR.js";
5
+ import { n as getPresence } from "./presence-cache-z1N8MbJ3.js";
6
+ import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, W as getGateway, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-wAwMhHDN.js";
7
7
  import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy } from "./allow-list-C-MqM-B_.js";
8
- import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-BYTToRY1.js";
9
- import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.js";
10
- import "./targets-BA7gf0K0.js";
8
+ import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-iJ0B4bAX.js";
9
+ import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-Bj61Q3a0.js";
10
+ import "./targets-69w7c3vU.js";
11
11
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
12
12
  import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
13
13
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
14
14
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
15
+ //#region extensions/discord/src/actions/runtime.messaging.runtime.ts
16
+ const discordMessagingActionRuntime = {
17
+ createThreadDiscord,
18
+ deleteMessageDiscord,
19
+ editChannelDiscord,
20
+ editMessageDiscord,
21
+ fetchChannelInfoDiscord,
22
+ fetchGuildInfoDiscord,
23
+ fetchChannelPermissionsDiscord,
24
+ fetchMessageDiscord,
25
+ fetchReactionsDiscord,
26
+ listPinsDiscord,
27
+ listThreadsDiscord,
28
+ pinMessageDiscord,
29
+ reactMessageDiscord,
30
+ readDiscordComponentSpec,
31
+ readMessagesDiscord,
32
+ removeOwnReactionsDiscord,
33
+ removeReactionDiscord,
34
+ resolveDiscordReactionTargetChannelId,
35
+ resolveDiscordChannelId,
36
+ searchMessagesDiscord,
37
+ sendDiscordComponentMessage,
38
+ sendMessageDiscord,
39
+ sendPollDiscord,
40
+ sendStickerDiscord,
41
+ sendVoiceMessageDiscord,
42
+ unpinMessageDiscord
43
+ };
44
+ async function resolveDiscordReactionTargetChannelId(params) {
45
+ try {
46
+ return resolveDiscordChannelId(params.target);
47
+ } catch {
48
+ return (await resolveDiscordTargetChannelId(params.target, {
49
+ cfg: params.cfg,
50
+ accountId: params.accountId
51
+ })).channelId;
52
+ }
53
+ }
54
+ //#endregion
15
55
  //#region extensions/discord/src/actions/runtime.shared.ts
16
56
  function readDiscordParentIdParam(params) {
17
57
  if (params.clearParent === true) return null;
@@ -66,6 +106,242 @@ function readDiscordChannelMoveParams(params) {
66
106
  };
67
107
  }
68
108
  //#endregion
109
+ //#region extensions/discord/src/actions/runtime.messaging.shared.ts
110
+ function hasDiscordGuildEntries(guilds) {
111
+ return Boolean(guilds && Object.keys(guilds).length > 0);
112
+ }
113
+ function allowsAllDiscordGuildChannels(channels) {
114
+ const wildcard = channels?.["*"];
115
+ if (!wildcard || wildcard.enabled === false) return false;
116
+ return Object.values(channels ?? {}).every((entry) => entry?.enabled !== false);
117
+ }
118
+ function resolveDiscordActionGuildEntry(params) {
119
+ const guildId = params.guildId?.trim();
120
+ if (!params.guilds) return null;
121
+ if (guildId && params.guilds[guildId]) return {
122
+ ...params.guilds[guildId],
123
+ id: guildId
124
+ };
125
+ if (guildId) {
126
+ const byConfiguredId = Object.values(params.guilds).find((guild) => guild?.id === guildId);
127
+ if (byConfiguredId) return {
128
+ ...byConfiguredId,
129
+ id: guildId
130
+ };
131
+ }
132
+ const guildSlug = params.guildName ? normalizeDiscordSlug(params.guildName) : "";
133
+ if (guildSlug) {
134
+ const bySlug = params.guilds[guildSlug] ?? Object.values(params.guilds).find((guild) => guild?.slug === guildSlug);
135
+ if (bySlug) return {
136
+ ...bySlug,
137
+ id: guildId,
138
+ slug: guildSlug || bySlug.slug
139
+ };
140
+ }
141
+ if (params.includeWildcard === false) return null;
142
+ const wildcard = params.guilds["*"];
143
+ return wildcard ? {
144
+ ...wildcard,
145
+ id: guildId
146
+ } : null;
147
+ }
148
+ function readDiscordChannelStringField(value, ...keys) {
149
+ if (!value || typeof value !== "object") return;
150
+ const record = value;
151
+ for (const key of keys) {
152
+ const candidate = record[key];
153
+ if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
154
+ }
155
+ }
156
+ function readDiscordChannelType(value) {
157
+ if (!value || typeof value !== "object") return;
158
+ const type = value.type;
159
+ return typeof type === "number" ? type : void 0;
160
+ }
161
+ function isDiscordThreadChannel(value) {
162
+ const type = readDiscordChannelType(value);
163
+ return type === 10 || type === 11 || type === 12;
164
+ }
165
+ function isDiscordReadTargetAllowedInGuild(params) {
166
+ if (resolveDiscordChannelConfigWithFallback({
167
+ guildInfo: params.guildInfo,
168
+ channelId: params.target.channelId,
169
+ channelName: params.target.channelName,
170
+ channelSlug: params.target.channelSlug,
171
+ parentId: params.target.parentId,
172
+ parentName: params.target.parentName,
173
+ parentSlug: params.target.parentSlug,
174
+ scope: params.target.scope
175
+ })?.allowed === false) return false;
176
+ return isDiscordGroupAllowedByPolicy({
177
+ groupPolicy: params.groupPolicy,
178
+ guildAllowlisted: Boolean(params.guildInfo),
179
+ channelAllowlistConfigured: hasDiscordGuildEntries(params.guildInfo?.channels),
180
+ channelAllowed: true
181
+ });
182
+ }
183
+ function isDiscordReadTargetExplicitlyAllowedById(params) {
184
+ const channelEntry = params.guildInfo?.channels?.[params.target.channelId];
185
+ if (!channelEntry || channelEntry.enabled === false) return false;
186
+ return isDiscordGroupAllowedByPolicy({
187
+ groupPolicy: params.groupPolicy,
188
+ guildAllowlisted: Boolean(params.guildInfo),
189
+ channelAllowlistConfigured: true,
190
+ channelAllowed: true
191
+ });
192
+ }
193
+ function createDiscordMessagingActionContext(params) {
194
+ const accountId = readStringParam(params.input, "accountId");
195
+ const cfgOptions = { cfg: params.cfg };
196
+ const accountConfig = mergeDiscordAccountConfig(params.cfg, accountId ?? resolveDefaultDiscordAccountId(params.cfg));
197
+ const guilds = accountConfig.guilds;
198
+ const hasGuildEntries = Object.keys(guilds ?? {}).length > 0;
199
+ const { groupPolicy } = resolveOpenProviderRuntimeGroupPolicy({
200
+ providerConfigPresent: params.cfg.channels?.discord !== void 0,
201
+ groupPolicy: accountConfig.groupPolicy,
202
+ defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
203
+ });
204
+ const withOpts = (extra) => createDiscordActionOptions({
205
+ cfg: params.cfg,
206
+ accountId,
207
+ extra
208
+ });
209
+ const resolvedReactionAccountId = accountId ?? resolveDefaultDiscordAccountId(params.cfg);
210
+ const reactionRuntimeOptions = resolvedReactionAccountId ? createDiscordRuntimeAccountContext({
211
+ cfg: params.cfg,
212
+ accountId: resolvedReactionAccountId
213
+ }) : cfgOptions;
214
+ const guildNameById = /* @__PURE__ */ new Map();
215
+ const resolveGuildName = async (guildId) => {
216
+ if (guildNameById.has(guildId)) return guildNameById.get(guildId) ?? null;
217
+ try {
218
+ const guildName = readDiscordChannelStringField(await discordMessagingActionRuntime.fetchGuildInfoDiscord(guildId, withOpts()), "name") ?? null;
219
+ guildNameById.set(guildId, guildName);
220
+ return guildName;
221
+ } catch {
222
+ guildNameById.set(guildId, null);
223
+ return null;
224
+ }
225
+ };
226
+ const resolveReadGuildEntry = async (guildId) => {
227
+ const direct = resolveDiscordActionGuildEntry({
228
+ guilds,
229
+ guildId,
230
+ includeWildcard: false
231
+ });
232
+ if (direct || !guildId) return direct;
233
+ const guildName = await resolveGuildName(guildId);
234
+ const named = resolveDiscordActionGuildEntry({
235
+ guilds,
236
+ guildId,
237
+ guildName: guildName ?? void 0,
238
+ includeWildcard: false
239
+ });
240
+ if (named) return named;
241
+ return resolveDiscordActionGuildEntry({
242
+ guilds,
243
+ guildId
244
+ });
245
+ };
246
+ const resolveReadTargetContext = async (channelId) => {
247
+ const fallback = {
248
+ channelId,
249
+ channelSlug: normalizeDiscordSlug(channelId) || channelId
250
+ };
251
+ let channelInfo;
252
+ try {
253
+ channelInfo = await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, withOpts());
254
+ } catch {
255
+ return fallback;
256
+ }
257
+ const channelName = readDiscordChannelStringField(channelInfo, "name");
258
+ const target = {
259
+ channelId,
260
+ channelSlug: channelName ? normalizeDiscordSlug(channelName) : fallback.channelSlug
261
+ };
262
+ const targetGuildId = readDiscordChannelStringField(channelInfo, "guild_id", "guildId");
263
+ if (targetGuildId) target.guildId = targetGuildId;
264
+ if (channelName) target.channelName = channelName;
265
+ if (!isDiscordThreadChannel(channelInfo)) return target;
266
+ target.scope = "thread";
267
+ target.parentId = readDiscordChannelStringField(channelInfo, "parent_id", "parentId");
268
+ if (!target.parentId) return target;
269
+ try {
270
+ const parentName = readDiscordChannelStringField(await discordMessagingActionRuntime.fetchChannelInfoDiscord(target.parentId, withOpts()), "name");
271
+ if (parentName) {
272
+ target.parentName = parentName;
273
+ target.parentSlug = normalizeDiscordSlug(parentName);
274
+ }
275
+ } catch {}
276
+ return target;
277
+ };
278
+ return {
279
+ action: params.action,
280
+ params: params.input,
281
+ isActionEnabled: params.isActionEnabled,
282
+ cfg: params.cfg,
283
+ options: params.options,
284
+ accountId,
285
+ resolveChannelId: () => discordMessagingActionRuntime.resolveDiscordChannelId(readStringParam(params.input, "channelId", { required: true })),
286
+ assertReadTargetAllowed: async ({ guildId, channelId }) => {
287
+ const targetChannelId = discordMessagingActionRuntime.resolveDiscordChannelId(channelId);
288
+ if (!hasGuildEntries && groupPolicy !== "disabled" && groupPolicy !== "allowlist") return;
289
+ const target = await resolveReadTargetContext(targetChannelId);
290
+ if (guildId) {
291
+ if (target.guildId && target.guildId !== guildId) throw new Error("Discord read target channel is not allowed.");
292
+ const guildInfo = await resolveReadGuildEntry(guildId);
293
+ if (!isDiscordReadTargetAllowedInGuild({
294
+ groupPolicy,
295
+ guildInfo,
296
+ target
297
+ })) throw new Error("Discord read target channel is not allowed.");
298
+ return;
299
+ }
300
+ if (target.guildId) {
301
+ const guildInfo = await resolveReadGuildEntry(target.guildId);
302
+ if (!isDiscordReadTargetAllowedInGuild({
303
+ groupPolicy,
304
+ guildInfo,
305
+ target
306
+ })) throw new Error("Discord read target channel is not allowed.");
307
+ return;
308
+ }
309
+ if (!Object.values(guilds ?? {}).some((guildInfo) => isDiscordReadTargetExplicitlyAllowedById({
310
+ groupPolicy,
311
+ guildInfo: guildInfo ?? null,
312
+ target
313
+ }))) throw new Error("Discord read target channel is not allowed.");
314
+ },
315
+ assertGuildReadTargetAllowed: async ({ guildId, channelTargetRequiredMessage }) => {
316
+ const guildInfo = await resolveReadGuildEntry(guildId);
317
+ if (!isDiscordGroupAllowedByPolicy({
318
+ groupPolicy,
319
+ guildAllowlisted: Boolean(guildInfo),
320
+ channelAllowlistConfigured: false,
321
+ channelAllowed: true
322
+ })) throw new Error("Discord read target channel is not allowed.");
323
+ if (hasDiscordGuildEntries(guildInfo?.channels) && !allowsAllDiscordGuildChannels(guildInfo.channels)) throw new Error(channelTargetRequiredMessage ?? "Discord message search requires channelId or channelIds so each read target can be authorized.");
324
+ },
325
+ resolveReactionChannelId: async () => {
326
+ const target = readStringParam(params.input, "channelId") ?? readStringParam(params.input, "to", { required: true });
327
+ return await discordMessagingActionRuntime.resolveDiscordReactionTargetChannelId({
328
+ target,
329
+ cfg: params.cfg,
330
+ accountId: resolvedReactionAccountId
331
+ });
332
+ },
333
+ withOpts,
334
+ withReactionRuntimeOptions: (extra) => ({
335
+ ...reactionRuntimeOptions ?? cfgOptions,
336
+ ...extra
337
+ }),
338
+ normalizeMessage: (message) => {
339
+ if (!message || typeof message !== "object") return message;
340
+ return withNormalizedTimestamp(message, message.timestamp);
341
+ }
342
+ };
343
+ }
344
+ //#endregion
69
345
  //#region extensions/discord/src/actions/runtime.guild.ts
70
346
  const discordGuildActionRuntime = {
71
347
  addRoleDiscord,
@@ -245,15 +521,29 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
245
521
  accountId,
246
522
  cfg
247
523
  });
524
+ const readTargetGate = createDiscordMessagingActionContext({
525
+ action,
526
+ input: params,
527
+ isActionEnabled,
528
+ cfg,
529
+ options
530
+ });
248
531
  const withOpts = (extra) => createDiscordActionOptions({
249
532
  cfg,
250
533
  accountId,
251
534
  extra
252
535
  });
536
+ const assertGuildMetadataReadAllowed = async (guildId) => {
537
+ await readTargetGate.assertGuildReadTargetAllowed({
538
+ guildId,
539
+ channelTargetRequiredMessage: "Discord guild metadata reads require a wildcard channel allowlist for this guild."
540
+ });
541
+ };
253
542
  switch (action) {
254
543
  case "memberInfo": {
255
544
  if (!isActionEnabled("memberInfo")) throw new Error("Discord member info is disabled.");
256
545
  const guildId = readStringParam(params, "guildId", { required: true });
546
+ await assertGuildMetadataReadAllowed(guildId);
257
547
  const userId = readStringParam(params, "userId", { required: true });
258
548
  const effectiveAccountId = accountId ?? resolveDefaultDiscordAccountId(cfg);
259
549
  const member = await discordGuildActionRuntime.fetchMemberInfoDiscord(guildId, userId, createDiscordActionOptions({
@@ -275,6 +565,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
275
565
  case "roleInfo": {
276
566
  if (!isActionEnabled("roleInfo")) throw new Error("Discord role info is disabled.");
277
567
  const guildId = readStringParam(params, "guildId", { required: true });
568
+ await assertGuildMetadataReadAllowed(guildId);
278
569
  return jsonResult({
279
570
  ok: true,
280
571
  roles: await discordGuildActionRuntime.fetchRoleInfoDiscord(guildId, withOpts())
@@ -283,6 +574,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
283
574
  case "emojiList": {
284
575
  if (!isActionEnabled("reactions")) throw new Error("Discord reactions are disabled.");
285
576
  const guildId = readStringParam(params, "guildId", { required: true });
577
+ await assertGuildMetadataReadAllowed(guildId);
286
578
  return jsonResult({
287
579
  ok: true,
288
580
  emojis: await discordGuildActionRuntime.listGuildEmojisDiscord(guildId, withOpts())
@@ -343,6 +635,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
343
635
  case "channelInfo": {
344
636
  if (!isActionEnabled("channelInfo")) throw new Error("Discord channel info is disabled.");
345
637
  const channelId = readStringParam(params, "channelId", { required: true });
638
+ await readTargetGate.assertReadTargetAllowed({ channelId });
346
639
  return jsonResult({
347
640
  ok: true,
348
641
  channel: await discordGuildActionRuntime.fetchChannelInfoDiscord(channelId, withOpts())
@@ -351,6 +644,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
351
644
  case "channelList": {
352
645
  if (!isActionEnabled("channelInfo")) throw new Error("Discord channel info is disabled.");
353
646
  const guildId = readStringParam(params, "guildId", { required: true });
647
+ await assertGuildMetadataReadAllowed(guildId);
354
648
  return jsonResult({
355
649
  ok: true,
356
650
  channels: await discordGuildActionRuntime.listGuildChannelsDiscord(guildId, withOpts())
@@ -359,6 +653,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
359
653
  case "voiceStatus": {
360
654
  if (!isActionEnabled("voiceStatus")) throw new Error("Discord voice status is disabled.");
361
655
  const guildId = readStringParam(params, "guildId", { required: true });
656
+ await assertGuildMetadataReadAllowed(guildId);
362
657
  const userId = readStringParam(params, "userId", { required: true });
363
658
  return jsonResult({
364
659
  ok: true,
@@ -368,6 +663,7 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
368
663
  case "eventList": {
369
664
  if (!isActionEnabled("events")) throw new Error("Discord events are disabled.");
370
665
  const guildId = readStringParam(params, "guildId", { required: true });
666
+ await assertGuildMetadataReadAllowed(guildId);
371
667
  return jsonResult({
372
668
  ok: true,
373
669
  events: await discordGuildActionRuntime.listScheduledEventsDiscord(guildId, withOpts())
@@ -456,69 +752,29 @@ async function handleDiscordGuildAction(action, params, isActionEnabled, cfg, op
456
752
  if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
457
753
  const categoryId = readStringParam(params, "categoryId", { required: true });
458
754
  return jsonResult(await discordGuildActionRuntime.deleteChannelDiscord(categoryId, withOpts()));
459
- }
460
- case "channelPermissionSet": {
461
- if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
462
- const { channelId, targetId } = readChannelPermissionTarget(params);
463
- const targetType = readStringParam(params, "targetType", { required: true }) === "member" ? 1 : 0;
464
- const allow = readStringParam(params, "allow");
465
- const deny = readStringParam(params, "deny");
466
- await discordGuildActionRuntime.setChannelPermissionDiscord({
467
- channelId,
468
- targetId,
469
- targetType,
470
- allow: allow ?? void 0,
471
- deny: deny ?? void 0
472
- }, withOpts());
473
- return jsonResult({ ok: true });
474
- }
475
- case "channelPermissionRemove": {
476
- if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
477
- const { channelId, targetId } = readChannelPermissionTarget(params);
478
- await discordGuildActionRuntime.removeChannelPermissionDiscord(channelId, targetId, withOpts());
479
- return jsonResult({ ok: true });
480
- }
481
- default: throw new Error(`Unknown action: ${action}`);
482
- }
483
- }
484
- //#endregion
485
- //#region extensions/discord/src/actions/runtime.messaging.runtime.ts
486
- const discordMessagingActionRuntime = {
487
- createThreadDiscord,
488
- deleteMessageDiscord,
489
- editChannelDiscord,
490
- editMessageDiscord,
491
- fetchChannelInfoDiscord,
492
- fetchGuildInfoDiscord,
493
- fetchChannelPermissionsDiscord,
494
- fetchMessageDiscord,
495
- fetchReactionsDiscord,
496
- listPinsDiscord,
497
- listThreadsDiscord,
498
- pinMessageDiscord,
499
- reactMessageDiscord,
500
- readDiscordComponentSpec,
501
- readMessagesDiscord,
502
- removeOwnReactionsDiscord,
503
- removeReactionDiscord,
504
- resolveDiscordReactionTargetChannelId,
505
- resolveDiscordChannelId,
506
- searchMessagesDiscord,
507
- sendDiscordComponentMessage,
508
- sendMessageDiscord,
509
- sendPollDiscord,
510
- sendStickerDiscord,
511
- sendVoiceMessageDiscord,
512
- unpinMessageDiscord
513
- };
514
- async function resolveDiscordReactionTargetChannelId(params) {
515
- try {
516
- return resolveDiscordChannelId(params.target);
517
- } catch {
518
- return (await resolveDiscordTargetChannelId(params.target, {
519
- cfg: params.cfg,
520
- accountId: params.accountId
521
- })).channelId;
755
+ }
756
+ case "channelPermissionSet": {
757
+ if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
758
+ const { channelId, targetId } = readChannelPermissionTarget(params);
759
+ const targetType = readStringParam(params, "targetType", { required: true }) === "member" ? 1 : 0;
760
+ const allow = readStringParam(params, "allow");
761
+ const deny = readStringParam(params, "deny");
762
+ await discordGuildActionRuntime.setChannelPermissionDiscord({
763
+ channelId,
764
+ targetId,
765
+ targetType,
766
+ allow: allow ?? void 0,
767
+ deny: deny ?? void 0
768
+ }, withOpts());
769
+ return jsonResult({ ok: true });
770
+ }
771
+ case "channelPermissionRemove": {
772
+ if (!isActionEnabled("channels")) throw new Error("Discord channel management is disabled.");
773
+ const { channelId, targetId } = readChannelPermissionTarget(params);
774
+ await discordGuildActionRuntime.removeChannelPermissionDiscord(channelId, targetId, withOpts());
775
+ return jsonResult({ ok: true });
776
+ }
777
+ default: throw new Error(`Unknown action: ${action}`);
522
778
  }
523
779
  }
524
780
  //#endregion
@@ -874,7 +1130,7 @@ async function handleDiscordMessageSendAction(ctx) {
874
1130
  result: await discordMessagingActionRuntime.sendDiscordComponentMessage(to, payload, {
875
1131
  ...ctx.withOpts(),
876
1132
  silent,
877
- replyTo: replyTo ?? void 0,
1133
+ reply: createReusableDiscordReplyReference(replyTo),
878
1134
  sessionKey: sessionKey ?? void 0,
879
1135
  agentId: agentId ?? void 0,
880
1136
  mediaUrl: mediaUrl ?? void 0,
@@ -899,7 +1155,7 @@ async function handleDiscordMessageSendAction(ctx) {
899
1155
  ok: true,
900
1156
  result: await discordMessagingActionRuntime.sendVoiceMessageDiscord(to, mediaUrl, {
901
1157
  ...ctx.withOpts(),
902
- replyTo,
1158
+ reply: createReusableDiscordReplyReference(replyTo),
903
1159
  silent
904
1160
  }),
905
1161
  voiceMessage: true
@@ -918,7 +1174,7 @@ async function handleDiscordMessageSendAction(ctx) {
918
1174
  filename: filename ?? void 0,
919
1175
  mediaLocalRoots: ctx.options?.mediaLocalRoots,
920
1176
  mediaReadFile: ctx.options?.mediaReadFile,
921
- replyTo,
1177
+ reply: createReusableDiscordReplyReference(replyTo),
922
1178
  components,
923
1179
  embeds,
924
1180
  silent,
@@ -965,6 +1221,14 @@ async function handleDiscordMessageSendAction(ctx) {
965
1221
  const includeArchived = readBooleanParam(ctx.params, "includeArchived");
966
1222
  const before = readStringParam(ctx.params, "before");
967
1223
  const limit = readPositiveIntegerParam(ctx.params, "limit");
1224
+ if (channelId && includeArchived === true) await ctx.assertReadTargetAllowed({
1225
+ guildId,
1226
+ channelId
1227
+ });
1228
+ else await ctx.assertGuildReadTargetAllowed({
1229
+ guildId,
1230
+ channelTargetRequiredMessage: "Discord active thread lists require a wildcard channel allowlist so each read target can be authorized."
1231
+ });
968
1232
  return jsonResult(normalizeDiscordThreadListActionResult({
969
1233
  value: await discordMessagingActionRuntime.listThreadsDiscord({
970
1234
  guildId,
@@ -993,7 +1257,7 @@ async function handleDiscordMessageSendAction(ctx) {
993
1257
  mediaUrl,
994
1258
  mediaLocalRoots: ctx.options?.mediaLocalRoots,
995
1259
  mediaReadFile: ctx.options?.mediaReadFile,
996
- replyTo
1260
+ reply: createReusableDiscordReplyReference(replyTo)
997
1261
  })
998
1262
  });
999
1263
  }
@@ -1001,239 +1265,6 @@ async function handleDiscordMessageSendAction(ctx) {
1001
1265
  }
1002
1266
  }
1003
1267
  //#endregion
1004
- //#region extensions/discord/src/actions/runtime.messaging.shared.ts
1005
- function hasDiscordGuildEntries(guilds) {
1006
- return Boolean(guilds && Object.keys(guilds).length > 0);
1007
- }
1008
- function allowsAllDiscordGuildChannels(channels) {
1009
- const wildcard = channels?.["*"];
1010
- if (!wildcard || wildcard.enabled === false) return false;
1011
- return Object.values(channels ?? {}).every((entry) => entry?.enabled !== false);
1012
- }
1013
- function resolveDiscordActionGuildEntry(params) {
1014
- const guildId = params.guildId?.trim();
1015
- if (!params.guilds) return null;
1016
- if (guildId && params.guilds[guildId]) return {
1017
- ...params.guilds[guildId],
1018
- id: guildId
1019
- };
1020
- if (guildId) {
1021
- const byConfiguredId = Object.values(params.guilds).find((guild) => guild?.id === guildId);
1022
- if (byConfiguredId) return {
1023
- ...byConfiguredId,
1024
- id: guildId
1025
- };
1026
- }
1027
- const guildSlug = params.guildName ? normalizeDiscordSlug(params.guildName) : "";
1028
- if (guildSlug) {
1029
- const bySlug = params.guilds[guildSlug] ?? Object.values(params.guilds).find((guild) => guild?.slug === guildSlug);
1030
- if (bySlug) return {
1031
- ...bySlug,
1032
- id: guildId,
1033
- slug: guildSlug || bySlug.slug
1034
- };
1035
- }
1036
- if (params.includeWildcard === false) return null;
1037
- const wildcard = params.guilds["*"];
1038
- return wildcard ? {
1039
- ...wildcard,
1040
- id: guildId
1041
- } : null;
1042
- }
1043
- function readDiscordChannelStringField(value, ...keys) {
1044
- if (!value || typeof value !== "object") return;
1045
- const record = value;
1046
- for (const key of keys) {
1047
- const candidate = record[key];
1048
- if (typeof candidate === "string" && candidate.trim()) return candidate.trim();
1049
- }
1050
- }
1051
- function readDiscordChannelType(value) {
1052
- if (!value || typeof value !== "object") return;
1053
- const type = value.type;
1054
- return typeof type === "number" ? type : void 0;
1055
- }
1056
- function isDiscordThreadChannel(value) {
1057
- const type = readDiscordChannelType(value);
1058
- return type === 10 || type === 11 || type === 12;
1059
- }
1060
- function isDiscordReadTargetAllowedInGuild(params) {
1061
- if (resolveDiscordChannelConfigWithFallback({
1062
- guildInfo: params.guildInfo,
1063
- channelId: params.target.channelId,
1064
- channelName: params.target.channelName,
1065
- channelSlug: params.target.channelSlug,
1066
- parentId: params.target.parentId,
1067
- parentName: params.target.parentName,
1068
- parentSlug: params.target.parentSlug,
1069
- scope: params.target.scope
1070
- })?.allowed === false) return false;
1071
- return isDiscordGroupAllowedByPolicy({
1072
- groupPolicy: params.groupPolicy,
1073
- guildAllowlisted: Boolean(params.guildInfo),
1074
- channelAllowlistConfigured: hasDiscordGuildEntries(params.guildInfo?.channels),
1075
- channelAllowed: true
1076
- });
1077
- }
1078
- function isDiscordReadTargetExplicitlyAllowedById(params) {
1079
- const channelEntry = params.guildInfo?.channels?.[params.target.channelId];
1080
- if (!channelEntry || channelEntry.enabled === false) return false;
1081
- return isDiscordGroupAllowedByPolicy({
1082
- groupPolicy: params.groupPolicy,
1083
- guildAllowlisted: Boolean(params.guildInfo),
1084
- channelAllowlistConfigured: true,
1085
- channelAllowed: true
1086
- });
1087
- }
1088
- function createDiscordMessagingActionContext(params) {
1089
- const accountId = readStringParam(params.input, "accountId");
1090
- const cfgOptions = { cfg: params.cfg };
1091
- const accountConfig = mergeDiscordAccountConfig(params.cfg, accountId ?? resolveDefaultDiscordAccountId(params.cfg));
1092
- const guilds = accountConfig.guilds;
1093
- const hasGuildEntries = Object.keys(guilds ?? {}).length > 0;
1094
- const { groupPolicy } = resolveOpenProviderRuntimeGroupPolicy({
1095
- providerConfigPresent: params.cfg.channels?.discord !== void 0,
1096
- groupPolicy: accountConfig.groupPolicy,
1097
- defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
1098
- });
1099
- const withOpts = (extra) => createDiscordActionOptions({
1100
- cfg: params.cfg,
1101
- accountId,
1102
- extra
1103
- });
1104
- const resolvedReactionAccountId = accountId ?? resolveDefaultDiscordAccountId(params.cfg);
1105
- const reactionRuntimeOptions = resolvedReactionAccountId ? createDiscordRuntimeAccountContext({
1106
- cfg: params.cfg,
1107
- accountId: resolvedReactionAccountId
1108
- }) : cfgOptions;
1109
- const guildNameById = /* @__PURE__ */ new Map();
1110
- const resolveGuildName = async (guildId) => {
1111
- if (guildNameById.has(guildId)) return guildNameById.get(guildId) ?? null;
1112
- try {
1113
- const guildName = readDiscordChannelStringField(await discordMessagingActionRuntime.fetchGuildInfoDiscord(guildId, withOpts()), "name") ?? null;
1114
- guildNameById.set(guildId, guildName);
1115
- return guildName;
1116
- } catch {
1117
- guildNameById.set(guildId, null);
1118
- return null;
1119
- }
1120
- };
1121
- const resolveReadGuildEntry = async (guildId) => {
1122
- const direct = resolveDiscordActionGuildEntry({
1123
- guilds,
1124
- guildId,
1125
- includeWildcard: false
1126
- });
1127
- if (direct || !guildId) return direct;
1128
- const named = resolveDiscordActionGuildEntry({
1129
- guilds,
1130
- guildId,
1131
- guildName: await resolveGuildName(guildId) ?? void 0,
1132
- includeWildcard: false
1133
- });
1134
- if (named) return named;
1135
- return resolveDiscordActionGuildEntry({
1136
- guilds,
1137
- guildId
1138
- });
1139
- };
1140
- const resolveReadTargetContext = async (channelId) => {
1141
- const fallback = {
1142
- channelId,
1143
- channelSlug: normalizeDiscordSlug(channelId) || channelId
1144
- };
1145
- let channelInfo;
1146
- try {
1147
- channelInfo = await discordMessagingActionRuntime.fetchChannelInfoDiscord(channelId, withOpts());
1148
- } catch {
1149
- return fallback;
1150
- }
1151
- const channelName = readDiscordChannelStringField(channelInfo, "name");
1152
- const target = {
1153
- channelId,
1154
- channelSlug: channelName ? normalizeDiscordSlug(channelName) : fallback.channelSlug
1155
- };
1156
- const targetGuildId = readDiscordChannelStringField(channelInfo, "guild_id", "guildId");
1157
- if (targetGuildId) target.guildId = targetGuildId;
1158
- if (channelName) target.channelName = channelName;
1159
- if (!isDiscordThreadChannel(channelInfo)) return target;
1160
- target.scope = "thread";
1161
- target.parentId = readDiscordChannelStringField(channelInfo, "parent_id", "parentId");
1162
- if (!target.parentId) return target;
1163
- try {
1164
- const parentName = readDiscordChannelStringField(await discordMessagingActionRuntime.fetchChannelInfoDiscord(target.parentId, withOpts()), "name");
1165
- if (parentName) {
1166
- target.parentName = parentName;
1167
- target.parentSlug = normalizeDiscordSlug(parentName);
1168
- }
1169
- } catch {}
1170
- return target;
1171
- };
1172
- return {
1173
- action: params.action,
1174
- params: params.input,
1175
- isActionEnabled: params.isActionEnabled,
1176
- cfg: params.cfg,
1177
- options: params.options,
1178
- accountId,
1179
- resolveChannelId: () => discordMessagingActionRuntime.resolveDiscordChannelId(readStringParam(params.input, "channelId", { required: true })),
1180
- assertReadTargetAllowed: async ({ guildId, channelId }) => {
1181
- const targetChannelId = discordMessagingActionRuntime.resolveDiscordChannelId(channelId);
1182
- if (!hasGuildEntries && groupPolicy !== "disabled" && groupPolicy !== "allowlist") return;
1183
- const target = await resolveReadTargetContext(targetChannelId);
1184
- if (guildId) {
1185
- if (target.guildId && target.guildId !== guildId) throw new Error("Discord read target channel is not allowed.");
1186
- if (!isDiscordReadTargetAllowedInGuild({
1187
- groupPolicy,
1188
- guildInfo: await resolveReadGuildEntry(guildId),
1189
- target
1190
- })) throw new Error("Discord read target channel is not allowed.");
1191
- return;
1192
- }
1193
- if (target.guildId) {
1194
- if (!isDiscordReadTargetAllowedInGuild({
1195
- groupPolicy,
1196
- guildInfo: await resolveReadGuildEntry(target.guildId),
1197
- target
1198
- })) throw new Error("Discord read target channel is not allowed.");
1199
- return;
1200
- }
1201
- if (!Object.values(guilds ?? {}).some((guildInfo) => isDiscordReadTargetExplicitlyAllowedById({
1202
- groupPolicy,
1203
- guildInfo: guildInfo ?? null,
1204
- target
1205
- }))) throw new Error("Discord read target channel is not allowed.");
1206
- },
1207
- assertGuildReadTargetAllowed: async ({ guildId }) => {
1208
- const guildInfo = await resolveReadGuildEntry(guildId);
1209
- if (!isDiscordGroupAllowedByPolicy({
1210
- groupPolicy,
1211
- guildAllowlisted: Boolean(guildInfo),
1212
- channelAllowlistConfigured: false,
1213
- channelAllowed: true
1214
- })) throw new Error("Discord read target channel is not allowed.");
1215
- if (hasDiscordGuildEntries(guildInfo?.channels) && !allowsAllDiscordGuildChannels(guildInfo.channels)) throw new Error("Discord message search requires channelId or channelIds so each read target can be authorized.");
1216
- },
1217
- resolveReactionChannelId: async () => {
1218
- const target = readStringParam(params.input, "channelId") ?? readStringParam(params.input, "to", { required: true });
1219
- return await discordMessagingActionRuntime.resolveDiscordReactionTargetChannelId({
1220
- target,
1221
- cfg: params.cfg,
1222
- accountId: resolvedReactionAccountId
1223
- });
1224
- },
1225
- withOpts,
1226
- withReactionRuntimeOptions: (extra) => ({
1227
- ...reactionRuntimeOptions ?? cfgOptions,
1228
- ...extra
1229
- }),
1230
- normalizeMessage: (message) => {
1231
- if (!message || typeof message !== "object") return message;
1232
- return withNormalizedTimestamp(message, message.timestamp);
1233
- }
1234
- };
1235
- }
1236
- //#endregion
1237
1268
  //#region extensions/discord/src/actions/runtime.messaging.ts
1238
1269
  async function handleDiscordMessagingAction(action, params, isActionEnabled, cfg, options) {
1239
1270
  if (!cfg) throw new Error("Discord messaging actions require a resolved runtime config.");
@@ -1348,7 +1379,7 @@ const ACTIVITY_TYPE_MAP = {
1348
1379
  custom: 4,
1349
1380
  competing: 5
1350
1381
  };
1351
- const VALID_STATUSES = new Set([
1382
+ const VALID_STATUSES = /* @__PURE__ */ new Set([
1352
1383
  "online",
1353
1384
  "dnd",
1354
1385
  "idle",
@@ -1401,7 +1432,7 @@ async function handleDiscordPresenceAction(action, params, isActionEnabled) {
1401
1432
  }
1402
1433
  //#endregion
1403
1434
  //#region extensions/discord/src/actions/runtime.ts
1404
- const messagingActions = new Set([
1435
+ const messagingActions = /* @__PURE__ */ new Set([
1405
1436
  "react",
1406
1437
  "reactions",
1407
1438
  "sticker",
@@ -1420,7 +1451,7 @@ const messagingActions = new Set([
1420
1451
  "listPins",
1421
1452
  "searchMessages"
1422
1453
  ]);
1423
- const guildActions = new Set([
1454
+ const guildActions = /* @__PURE__ */ new Set([
1424
1455
  "memberInfo",
1425
1456
  "roleInfo",
1426
1457
  "emojiList",
@@ -1443,12 +1474,12 @@ const guildActions = new Set([
1443
1474
  "channelPermissionSet",
1444
1475
  "channelPermissionRemove"
1445
1476
  ]);
1446
- const moderationActions = new Set([
1477
+ const moderationActions = /* @__PURE__ */ new Set([
1447
1478
  "timeout",
1448
1479
  "kick",
1449
1480
  "ban"
1450
1481
  ]);
1451
- const presenceActions = new Set(["setPresence"]);
1482
+ const presenceActions = /* @__PURE__ */ new Set(["setPresence"]);
1452
1483
  async function handleDiscordAction(params, cfg, options) {
1453
1484
  const action = readStringParam(params, "action", { required: true });
1454
1485
  const isActionEnabled = createDiscordActionGate({