@openclaw/discord 2026.9.1-beta.1 → 2026.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/account-inspect-BY-ve3yH.js +45 -0
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-CfQ-vSyf.js → accounts-CwJQoLjM.js} +89 -45
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{activities-api-q-9PaaHH.js → activities-api-CTcGq3Hf.js} +30 -17
  6. package/dist/activities-api.js +1 -1
  7. package/dist/{allow-list-BDMimASD.js → allow-list-DBTtR2dz.js} +13 -35
  8. package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
  9. package/dist/api.js +18 -18
  10. package/dist/{approval-handler.runtime-B7qhK3fR.js → approval-handler.runtime-DUSe5fyH.js} +19 -12
  11. package/dist/{audit-CBEv_ERu.js → audit-DpPfwoJM.js} +8 -7
  12. package/dist/{channel-Dx1tMTfx.js → channel-BHajPgwR.js} +29 -23
  13. package/dist/{channel-actions.runtime-CLWWu9nC.js → channel-actions.runtime-DS8pXo0S.js} +38 -38
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/{channel.setup-DOzXS2Pk.js → channel.setup-BWmMe1tT.js} +18 -18
  17. package/dist/command-owners-D78sAoOz.js +10 -0
  18. package/dist/{components-B9V5o361.js → components-BimX47Mq.js} +111 -149
  19. package/dist/{config-schema-BR13IAx6.js → config-schema-B797-Spt.js} +19 -12
  20. package/dist/{conversation-binding-route-DJYrY2TQ.js → conversation-binding-route-DuR5NGIx.js} +1 -1
  21. package/dist/{directory-config-BK6eqekJ.js → directory-config-CD2v2Szs.js} +2 -2
  22. package/dist/directory-contract-api.js +1 -1
  23. package/dist/{directory-live-DSAJSrJk.js → directory-live-DaJzWJ2N.js} +4 -4
  24. package/dist/{doctor-Cm7Y1pJ2.js → doctor-D4HH1inA.js} +9 -6
  25. package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
  26. package/dist/doctor-contract-api.js +31 -28
  27. package/dist/{handle-action.guild-admin-BdwCRHmm.js → handle-action.guild-admin-4We6wWQU.js} +6 -3
  28. package/dist/index.js +1 -1
  29. package/dist/ingress-identity-XNmW-mZS.js +60 -0
  30. package/dist/{message-handler-BXpWZyni.js → message-handler-DhgBabyU.js} +61 -70
  31. package/dist/{message-handler.preflight-Ba5LAY_X.js → message-handler.preflight-oZ7dQCd0.js} +41 -101
  32. package/dist/{message-handler.process-3HEzmemS.js → message-handler.process-BzCYf1pa.js} +82 -108
  33. package/dist/{message-text-aiwO5R2F.js → message-text-DK4NnBg-.js} +11 -6
  34. package/dist/{outbound-adapter-BE4jSq2d.js → outbound-adapter-CtggmGh9.js} +52 -67
  35. package/dist/{outbound-components-oLpg8Qzb.js → outbound-components-Dn8SJWMS.js} +5 -4
  36. package/dist/{outbound-session-route-Cg15ZFJd.js → outbound-session-route-Q_HEusBQ.js} +57 -15
  37. package/dist/{owner-access-UlYi9t0M.js → owner-access-Cp8r6Ipf.js} +9 -7
  38. package/dist/{pluralkit-Tiyl70dx.js → pluralkit-BY75YcK0.js} +2 -2
  39. package/dist/{probe-n6ZXxK8V.js → probe-3ovFAp3b.js} +3 -3
  40. package/dist/{probe.runtime-CN4bdPfZ.js → probe.runtime-BckHn3cJ.js} +1 -1
  41. package/dist/{provider-session.runtime-B9xe-Qaf.js → provider-session.runtime-BL2lHBH7.js} +3 -3
  42. package/dist/{provider-B11xwilq.js → provider-uKmmrDM4.js} +299 -136
  43. package/dist/provider.runtime-C-IkWF2w.js +2 -0
  44. package/dist/{realtime-session.runtime-CU8IQUS-.js → realtime-session.runtime-CGYm1t_0.js} +798 -448
  45. package/dist/{resolve-allowlist-common-BLoYaxEG.js → resolve-allowlist-common-sKIKy-cF.js} +3 -3
  46. package/dist/{resolve-channels-C2sT_n67.js → resolve-channels-CoiMlWy0.js} +4 -4
  47. package/dist/{resolve-users-CzpjLwjy.js → resolve-users-DJpiokfW.js} +5 -4
  48. package/dist/{retry-Cv4jCU5Z.js → retry-DQt1zDgH.js} +356 -214
  49. package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
  50. package/dist/{runtime-CY4PRMF-.js → runtime-BHsdEdr5.js} +2 -2
  51. package/dist/{runtime-BHrTlFkf.js → runtime-Ghtfh5ZA.js} +151 -109
  52. package/dist/runtime-api.js +20 -20
  53. package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
  54. package/dist/secret-contract-api.js +1 -1
  55. package/dist/{security-audit-BfJhAXZp.js → security-audit-DKfK-iPY.js} +10 -11
  56. package/dist/security-audit-contract-api.js +1 -1
  57. package/dist/{security-audit.runtime-BVKF9VtY.js → security-audit.runtime-sKZyKgpx.js} +1 -1
  58. package/dist/{send-C49MFF9j.js → send-CZeWKUiA.js} +132 -100
  59. package/dist/{send.components-DKKAw5VX.js → send.components-BG5IDABj.js} +21 -15
  60. package/dist/{send.outbound-zam0TrZx.js → send.outbound-DHuFUL6W.js} +42 -63
  61. package/dist/{send.shared-JjljcV4O.js → send.shared-B0n_fWzu.js} +77 -149
  62. package/dist/{sender-identity-BJtfyise.js → sender-identity-B8Ncfi63.js} +1 -1
  63. package/dist/setup-plugin-api.js +1 -1
  64. package/dist/{shared-_5EcP4jW.js → shared-C3dKun_X.js} +24 -15
  65. package/dist/{subagent-hooks-DQzvOptn.js → subagent-hooks-ZoQXEI1E.js} +2 -2
  66. package/dist/subagent-hooks-api.js +1 -1
  67. package/dist/{system-events-C7yxaHWP.js → system-events-DFF_awl7.js} +2 -2
  68. package/dist/{target-resolver-vxIh6O3-.js → target-resolver-DLtHDwMK.js} +6 -5
  69. package/dist/targets-BObRyaKX.js +3 -0
  70. package/dist/{thread-bindings-DW5F9vat.js → thread-bindings-DKvsNjQR.js} +7 -6
  71. package/dist/{thread-bindings.manager-ByOtwjo_.js → thread-bindings.manager-pbbRT5gb.js} +38 -29
  72. package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-t6jeFB1-.js} +3 -2
  73. package/dist/{thread-bindings.state-D8OMdk4O.js → thread-bindings.state-DtgOqsbX.js} +34 -1
  74. package/dist/{threading-agH1T_6s.js → threading-BCx49X-6.js} +8 -6
  75. package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
  76. package/dist/{transcripts-source-BR11iHA4.js → transcripts-source-Dc6Nnli5.js} +55 -7
  77. package/dist/transcripts-source-api.js +1 -1
  78. package/dist/{typing-Dc_YMY2e.js → typing-CuopV-Hi.js} +2 -2
  79. package/dist/{voice-runtime-DIeaa8fJ.js → voice-runtime-BQnILUbG.js} +492 -105
  80. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
  81. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
  82. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
  83. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
  84. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
  85. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
  86. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  87. package/node_modules/@discordjs/voice/node_modules/@types/node/buffer.buffer.d.ts +5 -5
  88. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +2 -2
  89. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +16 -0
  90. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +10 -2
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +52 -0
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +210 -28
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +6 -2
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +36 -0
  96. package/node_modules/typebox/build/format/email.mjs +1 -1
  97. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  98. package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
  99. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  100. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
  101. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  102. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  103. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  104. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  105. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  106. package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
  107. package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
  108. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  109. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  110. package/node_modules/typebox/package.json +1 -1
  111. package/node_modules/undici/docs/docs/api/Client.md +4 -0
  112. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  113. package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  114. package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  115. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  116. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  117. package/node_modules/undici/lib/core/symbols.js +2 -0
  118. package/node_modules/undici/lib/dispatcher/agent.js +7 -2
  119. package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  120. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  121. package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  122. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  123. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  124. package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  125. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  126. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  127. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  128. package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  129. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  130. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
  131. package/node_modules/undici/lib/handler/cache-handler.js +29 -5
  132. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  133. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  134. package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  135. package/node_modules/undici/lib/handler/retry-handler.js +148 -30
  136. package/node_modules/undici/lib/interceptor/cache.js +65 -12
  137. package/node_modules/undici/lib/interceptor/decompress.js +115 -13
  138. package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  139. package/node_modules/undici/lib/interceptor/dns.js +7 -0
  140. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  141. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  142. package/node_modules/undici/lib/mock/mock-utils.js +11 -10
  143. package/node_modules/undici/lib/util/cache.js +45 -3
  144. package/node_modules/undici/lib/web/cookies/parse.js +150 -147
  145. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  146. package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  147. package/node_modules/undici/lib/web/fetch/index.js +6 -0
  148. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  149. package/node_modules/undici/lib/web/fetch/util.js +6 -1
  150. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  151. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  152. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  153. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  154. package/node_modules/undici/package.json +3 -3
  155. package/node_modules/undici/types/client.d.ts +10 -0
  156. package/node_modules/undici/types/interceptors.d.ts +2 -0
  157. package/node_modules/undici/types/mock-agent.d.ts +11 -10
  158. package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
  159. package/openclaw.plugin.json +15 -8
  160. package/package.json +7 -6
  161. package/skills/discord/SKILL.md +1 -1
  162. package/dist/account-inspect-BDfKyuvL.js +0 -89
  163. package/dist/provider.runtime-DiYaHvOz.js +0 -2
  164. package/dist/sdk-runtime-4geQHtXc.js +0 -338
  165. package/dist/targets-CtTKvntJ.js +0 -3
@@ -1,13 +1,13 @@
1
- import { _ as parseDiscordTarget, h as normalizeDiscordMessagingTarget, m as looksLikeDiscordTargetId } from "./retry-Cv4jCU5Z.js";
2
- import { c as resolveDiscordAccount, i as listDiscordStartupAccountIds, l as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
1
+ import { g as normalizeDiscordMessagingTarget, h as looksLikeDiscordTargetId, v as parseDiscordTarget } from "./retry-DQt1zDgH.js";
2
+ import { c as resolveDiscordAccount, i as listDiscordStartupAccountIds, l as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
3
3
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
4
- import { u as withAbortTimeout } from "./timeouts-B9cy6RvQ.js";
5
- import { C as shouldSuppressLocalDiscordExecApprovalPrompt, D as isChannelExecApprovalClientEnabledFromConfig, E as createChannelNativeOriginTargetResolver, O as matchesApprovalRequestFilters, S as isDiscordExecApprovalClientEnabled, T as createChannelApproverDmTargetResolver, b as getDiscordExecApprovalApprovers, d as resolveDiscordCurrentConversationIdentity, f as resolveDiscordRuntimeBindingConversationId, p as discordMessageActions, s as resolveDiscordConversationRoute, t as resolveDiscordOutboundSessionRoute, w as createApproverRestrictedNativeApprovalCapability, x as isDiscordExecApprovalApprover, y as resolveRequiredDiscordChannelPermissions } from "./outbound-session-route-Cg15ZFJd.js";
6
- import { a as discordSecurityAdapter, c as buildTokenChannelStatusSummary, i as discordSetupContract, l as projectCredentialSnapshotFields, n as discordConfigAdapter, o as DEFAULT_ACCOUNT_ID, s as PAIRING_APPROVED_MESSAGE, t as createDiscordPluginBase, u as resolveConfiguredFromCredentialStatuses } from "./shared-_5EcP4jW.js";
4
+ import { u as withAbortTimeout } from "./timeouts-D86uWLt_.js";
5
+ import { C as shouldSuppressLocalDiscordExecApprovalPrompt, D as isChannelExecApprovalClientEnabledFromConfig, E as createChannelNativeOriginTargetResolver, O as matchesApprovalRequestFilters, S as isDiscordExecApprovalClientEnabled, T as createChannelApproverDmTargetResolver, b as getDiscordExecApprovalApprovers, d as resolveDiscordCurrentConversationIdentity, f as resolveDiscordRuntimeBindingConversationId, p as discordMessageActions, s as resolveDiscordConversationRoute, t as resolveDiscordOutboundSessionRoute, w as createApproverRestrictedNativeApprovalCapability, x as isDiscordExecApprovalApprover, y as resolveRequiredDiscordChannelPermissions } from "./outbound-session-route-Q_HEusBQ.js";
6
+ import { a as discordSecurityAdapter, c as buildTokenChannelStatusSummary, i as discordSetupContract, l as projectCredentialSnapshotFields, n as discordConfigAdapter, o as DEFAULT_ACCOUNT_ID, s as PAIRING_APPROVED_MESSAGE, t as createDiscordPluginBase, u as resolveConfiguredFromCredentialStatuses } from "./shared-C3dKun_X.js";
7
7
  import { r as openDiscordCommandDeployHashStore } from "./command-deploy-store-DFkBTViB.js";
8
- import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DJYrY2TQ.js";
9
- import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-CJb-BpPL.js";
10
- import { n as discordOutbound } from "./outbound-adapter-BE4jSq2d.js";
8
+ import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DuR5NGIx.js";
9
+ import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-t6jeFB1-.js";
10
+ import { n as discordOutbound } from "./outbound-adapter-CtggmGh9.js";
11
11
  import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
12
12
  import { t as defaultTopLevelPlacement } from "./thread-binding-api-BDZJD4na.js";
13
13
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -180,7 +180,11 @@ function createDiscordApprovalCapability(configOverride) {
180
180
  resolveApproverDmTargets: createDiscordApproverDmTargetResolver(configOverride),
181
181
  notifyOriginWhenDmOnly: true,
182
182
  nativeRuntime: createLazyChannelApprovalNativeRuntimeAdapter({
183
- eventKinds: ["exec", "plugin"],
183
+ eventKinds: [
184
+ "exec",
185
+ "plugin",
186
+ "system-agent"
187
+ ],
184
188
  isConfigured: ({ cfg, accountId }) => isDiscordExecApprovalClientEnabled({
185
189
  cfg,
186
190
  accountId,
@@ -192,7 +196,7 @@ function createDiscordApprovalCapability(configOverride) {
192
196
  request,
193
197
  configOverride
194
198
  }),
195
- load: async () => (await import("./approval-handler.runtime-B7qhK3fR.js")).discordApprovalNativeRuntime
199
+ load: async () => (await import("./approval-handler.runtime-DUSe5fyH.js")).discordApprovalNativeRuntime
196
200
  })
197
201
  });
198
202
  }
@@ -299,22 +303,22 @@ function resolveDiscordInboundConversation(params) {
299
303
  }
300
304
  //#endregion
301
305
  //#region extensions/discord/src/channel.loaders.ts
302
- const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-BK6eqekJ.js").then((n) => n.t));
303
- const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-C2sT_n67.js").then((n) => n.n));
304
- const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-CzpjLwjy.js").then((n) => n.n));
305
- const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-ByOtwjo_.js").then((n) => n.i));
306
- const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-vxIh6O3-.js").then((n) => n.r));
307
- const loadDiscordProviderRuntime = createLazyRuntimeModule(() => import("./provider.runtime-DiYaHvOz.js"));
308
- const loadDiscordProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-CN4bdPfZ.js"));
306
+ const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CD2v2Szs.js").then((n) => n.t));
307
+ const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CoiMlWy0.js").then((n) => n.n));
308
+ const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DJpiokfW.js").then((n) => n.n));
309
+ const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-pbbRT5gb.js").then((n) => n.i));
310
+ const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-DLtHDwMK.js").then((n) => n.r));
311
+ const loadDiscordProviderRuntime = createLazyRuntimeModule(() => import("./provider.runtime-C-IkWF2w.js"));
312
+ const loadDiscordProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-BckHn3cJ.js"));
309
313
  async function probeDiscordStatusAccount(params) {
310
314
  const startedAtMs = Date.now();
311
315
  const runtime = await loadDiscordProbeRuntime();
312
316
  const remainingMs = Math.max(1, params.timeoutMs - Math.max(0, Date.now() - startedAtMs));
313
317
  return await runtime.probeDiscord(params.token, remainingMs, { includeApplication: true });
314
318
  }
315
- const loadDiscordAuditModule = createLazyRuntimeModule(() => import("./audit-CBEv_ERu.js").then((n) => n.n));
316
- const loadDiscordSendModule = createLazyRuntimeModule(() => import("./send-C49MFF9j.js").then((n) => n.t));
317
- const loadDiscordDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-DSAJSrJk.js").then((n) => n.t));
319
+ const loadDiscordAuditModule = createLazyRuntimeModule(() => import("./audit-DpPfwoJM.js").then((n) => n.n));
320
+ const loadDiscordSendModule = createLazyRuntimeModule(() => import("./send-CZeWKUiA.js").then((n) => n.t));
321
+ const loadDiscordDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-DaJzWJ2N.js").then((n) => n.t));
318
322
  //#endregion
319
323
  //#region extensions/discord/src/conversation-route-owner.ts
320
324
  function inspectDiscordConversationRouteOwner(params) {
@@ -426,8 +430,9 @@ function resolveDiscordGroupRequireMention(params) {
426
430
  return resolveScopeRequireMention(resolveDiscordPolicyScope(params));
427
431
  }
428
432
  function resolveDiscordGroupToolPolicy(params) {
433
+ const scope = resolveDiscordPolicyScope(params);
429
434
  return resolveScopeToolsPolicy({
430
- ...resolveDiscordPolicyScope(params),
435
+ ...scope,
431
436
  senderPolicyMode: params.senderPolicyMode,
432
437
  senderId: params.senderId,
433
438
  senderName: params.senderName,
@@ -764,10 +769,11 @@ const discordPlugin = createChatChannelPlugin({
764
769
  }).map(toConversationLifecycleBinding)
765
770
  },
766
771
  heartbeat: { sendTyping: async ({ cfg, to, accountId, threadId }) => {
767
- const target = parseDiscordTarget(resolveDiscordAttachedOutboundTarget({
772
+ const resolvedTo = resolveDiscordAttachedOutboundTarget({
768
773
  to,
769
774
  threadId
770
- }), { defaultKind: "channel" });
775
+ });
776
+ const target = parseDiscordTarget(resolvedTo, { defaultKind: "channel" });
771
777
  if (!target || target.kind !== "channel") return;
772
778
  await (await loadDiscordSendModule()).sendTypingDiscord(target.id, {
773
779
  cfg,
@@ -1,11 +1,11 @@
1
- import { _ as parseDiscordTarget, v as resolveDiscordChannelId } from "./retry-Cv4jCU5Z.js";
2
- import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-B9V5o361.js";
3
- import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-BHrTlFkf.js";
4
- import "./targets-CtTKvntJ.js";
1
+ import { v as parseDiscordTarget, y as resolveDiscordChannelId } from "./retry-DQt1zDgH.js";
2
+ import { i as buildDiscordPresentationComponents, m as coerceDiscordComponentParam, r as buildDiscordInteractiveComponents } from "./components-BimX47Mq.js";
3
+ import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-Ghtfh5ZA.js";
4
+ import "./targets-BObRyaKX.js";
5
5
  import "./action-runtime-api.js";
6
- import { h as discordInboundEventDelivery } from "./outbound-session-route-Cg15ZFJd.js";
7
- import { r as isDiscordComponentSpecWithinMessageLimit, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-oLpg8Qzb.js";
8
- import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-BdwCRHmm.js";
6
+ import { h as discordInboundEventDelivery } from "./outbound-session-route-Q_HEusBQ.js";
7
+ import { r as isDiscordComponentSpecWithinMessageLimit, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-Dn8SJWMS.js";
8
+ import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-4We6wWQU.js";
9
9
  import { n as notifyDiscordActiveTurnThreadCreated, r as notifyDiscordActiveTurnThreadReplyDelivered } from "./active-turn-thread-route-fmHl1HNd.js";
10
10
  import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
11
11
  import { adaptMessagePresentationForChannel, normalizeLegacyInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
@@ -87,27 +87,27 @@ async function handleDiscordMessageAction(ctx) {
87
87
  const to = readSendTarget();
88
88
  const asVoice = readBooleanParam(params, "asVoice") === true;
89
89
  const mediaUrl = readStringParam$1(params, "media", { trim: false }) ?? readStringParam$1(params, "path", { trim: false }) ?? readStringParam$1(params, "filePath", { trim: false });
90
- const requestedContent = readStringParam$1(params, "message", { allowEmpty: true });
91
- const presentation = params.components == null ? normalizeMessagePresentation(params.presentation) : void 0;
92
- const generatedPresentationComponents = buildDiscordPresentationComponents(presentation ? adaptMessagePresentationForChannel({
90
+ const content = readStringParam$1(params, "message", {
91
+ allowEmpty: true,
92
+ trim: false
93
+ });
94
+ const explicitComponents = coerceDiscordComponentParam(params.components);
95
+ const presentation = explicitComponents == null ? normalizeMessagePresentation(params.presentation) : void 0;
96
+ const adaptedPresentation = presentation ? adaptMessagePresentationForChannel({
93
97
  presentation,
94
98
  capabilities: DISCORD_PRESENTATION_CAPABILITIES
95
- }) : void 0);
99
+ }) : void 0;
100
+ const generatedPresentationComponents = buildDiscordPresentationComponents(adaptedPresentation);
96
101
  const presentationComponents = generatedPresentationComponents && isDiscordComponentSpecWithinMessageLimit({
97
102
  spec: generatedPresentationComponents,
98
- fallbackText: requestedContent,
103
+ fallbackText: content,
99
104
  includesMedia: Boolean(mediaUrl)
100
105
  }) ? generatedPresentationComponents : void 0;
101
106
  const presentationFellBack = Boolean(generatedPresentationComponents && !presentationComponents);
102
- const rawComponents = presentationFellBack ? void 0 : params.components ?? presentationComponents ?? buildDiscordInteractiveComponents(normalizeLegacyInteractiveReply(params.interactive));
103
- const hasComponents = Boolean(rawComponents) && (typeof rawComponents === "function" || typeof rawComponents === "object");
104
- const components = hasComponents ? rawComponents : void 0;
107
+ const rawComponents = presentationFellBack ? void 0 : explicitComponents ?? presentationComponents ?? buildDiscordInteractiveComponents(normalizeLegacyInteractiveReply(params.interactive));
108
+ const components = Boolean(rawComponents) && (typeof rawComponents === "function" || typeof rawComponents === "object") ? rawComponents : void 0;
105
109
  const rawEmbeds = params.embeds;
106
110
  const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
107
- const content = readStringParam$1(params, "message", {
108
- required: !asVoice && !hasComponents && !embeds?.length && !mediaUrl && !presentationFellBack,
109
- allowEmpty: true
110
- });
111
111
  const deliveryContent = presentationFellBack && presentation ? renderMessagePresentationFallbackText({
112
112
  text: content,
113
113
  presentation
@@ -123,7 +123,7 @@ async function handleDiscordMessageAction(ctx) {
123
123
  action: "sendMessage",
124
124
  accountId: accountId ?? void 0,
125
125
  to,
126
- content: deliveryContent ?? "",
126
+ content: deliveryContent,
127
127
  ...threadName ? { threadName } : {},
128
128
  mediaUrl: mediaUrl ?? void 0,
129
129
  filename: filename ?? void 0,
@@ -146,7 +146,16 @@ async function handleDiscordMessageAction(ctx) {
146
146
  if (readStringParam$1(params, "buffer", { trim: false })) throw new Error("Use action: \"send\" for base64 buffer attachments; upload-file requires filePath, path, or media.");
147
147
  throw new Error("upload-file requires filePath, path, or media.");
148
148
  }
149
- const content = readStringParam$1(params, "message", { allowEmpty: true }) ?? readStringParam$1(params, "content", { allowEmpty: true }) ?? readStringParam$1(params, "caption", { allowEmpty: true });
149
+ const content = readStringParam$1(params, "message", {
150
+ allowEmpty: true,
151
+ trim: false
152
+ }) ?? readStringParam$1(params, "content", {
153
+ allowEmpty: true,
154
+ trim: false
155
+ }) ?? readStringParam$1(params, "caption", {
156
+ allowEmpty: true,
157
+ trim: false
158
+ });
150
159
  const filename = readStringParam$1(params, "filename");
151
160
  const replyTo = readStringParam$1(params, "replyTo");
152
161
  const silent = readBooleanParam(params, "silent") === true;
@@ -170,10 +179,11 @@ async function handleDiscordMessageAction(ctx) {
170
179
  return withAdoptedThreadReplyRoute(result, to, sessionKey);
171
180
  }
172
181
  if (action === "react") {
173
- const messageId = normalizeOptionalStringifiedId(resolveReactionMessageId({
182
+ const messageIdRaw = resolveReactionMessageId({
174
183
  args: params,
175
184
  toolContext: ctx.toolContext
176
- })) ?? "";
185
+ });
186
+ const messageId = normalizeOptionalStringifiedId(messageIdRaw) ?? "";
177
187
  if (!messageId) throw new Error("messageId required. Provide messageId explicitly or react to the current inbound message.");
178
188
  const emoji = readStringParam$1(params, "emoji", { allowEmpty: true });
179
189
  const remove = readBooleanParam(params, "remove");
@@ -209,24 +219,14 @@ async function handleDiscordMessageAction(ctx) {
209
219
  around: readStringParam$1(params, "around")
210
220
  }, cfg, actionOptions);
211
221
  }
212
- if (action === "edit") {
222
+ if (action === "edit" || action === "delete") {
213
223
  const messageId = readStringParam$1(params, "messageId", { required: true });
214
- const content = readStringParam$1(params, "message", { required: true });
215
224
  return await handleDiscordAction({
216
- action: "editMessage",
225
+ action: action === "edit" ? "editMessage" : "deleteMessage",
217
226
  accountId: accountId ?? void 0,
218
227
  channelId: resolveChannelId(),
219
228
  messageId,
220
- content
221
- }, cfg, actionOptions);
222
- }
223
- if (action === "delete") {
224
- const messageId = readStringParam$1(params, "messageId", { required: true });
225
- return await handleDiscordAction({
226
- action: "deleteMessage",
227
- accountId: accountId ?? void 0,
228
- channelId: resolveChannelId(),
229
- messageId
229
+ ...action === "edit" ? { content: params.message } : {}
230
230
  }, cfg, actionOptions);
231
231
  }
232
232
  if (action === "pin" || action === "unpin" || action === "list-pins") {
@@ -246,7 +246,7 @@ async function handleDiscordMessageAction(ctx) {
246
246
  if (action === "thread-create") {
247
247
  const name = readStringParam$1(params, "threadName", { required: true });
248
248
  const messageId = readStringParam$1(params, "messageId");
249
- const content = readStringParam$1(params, "message");
249
+ const content = readStringParam$1(params, "message", { trim: false });
250
250
  const autoArchiveMinutes = readDiscordAutoArchiveDurationParam(params, "autoArchiveMin");
251
251
  const appliedTags = readStringArrayParam$1(params, "appliedTags");
252
252
  const result = await handleDiscordAction({
@@ -284,7 +284,7 @@ async function handleDiscordMessageAction(ctx) {
284
284
  accountId: accountId ?? void 0,
285
285
  to,
286
286
  stickerIds,
287
- content: readStringParam$1(params, "message"),
287
+ content: readStringParam$1(params, "message", { trim: false }),
288
288
  ...readBooleanParam(params, "silent") === true ? { silent: true } : {}
289
289
  }, cfg, actionOptions);
290
290
  notifyVisibleOutbound(result, to);
@@ -1,2 +1,2 @@
1
- import { t as DiscordChannelConfigSchema } from "./config-schema-BR13IAx6.js";
1
+ import { t as DiscordChannelConfigSchema } from "./config-schema-B797-Spt.js";
2
2
  export { DiscordChannelConfigSchema };
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-Dx1tMTfx.js";
1
+ import { t as discordPlugin } from "./channel-BHajPgwR.js";
2
2
  export { discordPlugin };
@@ -1,8 +1,7 @@
1
- import { h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-CfQ-vSyf.js";
2
- import { n as inspectDiscordAccountTokenState } from "./account-inspect-BDfKyuvL.js";
3
- import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-_5EcP4jW.js";
4
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-C2sT_n67.js";
5
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-CzpjLwjy.js";
1
+ import { _ as inspectDiscordAccountTokenState, h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-CwJQoLjM.js";
2
+ import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-C3dKun_X.js";
3
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CoiMlWy0.js";
4
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-DJpiokfW.js";
6
5
  import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
7
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
7
  import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
@@ -279,22 +278,23 @@ async function resolveDiscordGroupAllowlist(params) {
279
278
  })
280
279
  });
281
280
  }
281
+ const discordSetupWizard = createDiscordSetupWizardBase({
282
+ promptAllowFrom: promptDiscordAllowFrom,
283
+ resolveAllowFromEntries: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordAllowFromEntries({
284
+ token: resolveDiscordToken(cfg, { accountId }).token || (typeof credentialValues.token === "string" ? credentialValues.token : ""),
285
+ entries
286
+ }),
287
+ resolveGroupAllowlist: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordGroupAllowlist({
288
+ cfg,
289
+ accountId,
290
+ credentialValues,
291
+ entries
292
+ })
293
+ });
282
294
  //#endregion
283
295
  //#region extensions/discord/src/channel.setup.ts
284
296
  const discordSetupPlugin = { ...createDiscordPluginBase({
285
- setupWizard: createDiscordSetupWizardBase({
286
- promptAllowFrom: promptDiscordAllowFrom,
287
- resolveAllowFromEntries: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordAllowFromEntries({
288
- token: resolveDiscordToken(cfg, { accountId }).token || (typeof credentialValues.token === "string" ? credentialValues.token : ""),
289
- entries
290
- }),
291
- resolveGroupAllowlist: async ({ cfg, accountId, credentialValues, entries }) => await resolveDiscordGroupAllowlist({
292
- cfg,
293
- accountId,
294
- credentialValues,
295
- entries
296
- })
297
- }),
297
+ setupWizard: discordSetupWizard,
298
298
  setupContract: discordSetupContract
299
299
  }) };
300
300
  //#endregion
@@ -0,0 +1,10 @@
1
+ //#region extensions/discord/src/command-owners.ts
2
+ function resolveDiscordCommandOwnerEntries(cfg) {
3
+ const entries = (cfg.commands?.ownerAllowFrom ?? []).map((entry) => String(entry).trim()).filter((entry) => entry && (/^(discord|user|pk):/i.test(entry) || !entry.includes(":")));
4
+ return entries.length > 0 ? entries.filter((entry) => !/^discord:user:/i.test(entry)) : void 0;
5
+ }
6
+ function resolveDiscordCommandOwnerAllowFrom(cfg) {
7
+ return resolveDiscordCommandOwnerEntries(cfg)?.map((entry) => entry.replace(/^discord:/i, "").trim()).filter(Boolean);
8
+ }
9
+ //#endregion
10
+ export { resolveDiscordCommandOwnerEntries as n, resolveDiscordCommandOwnerAllowFrom as t };