@openclaw/discord 2026.11.5 → 2026.11.7

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 (61) hide show
  1. package/dist/.setup/{allow-list-BXrS8-R9.mjs → allow-list-C3j0qLDp.mjs} +1 -1
  2. package/dist/.setup/{api-BlBD4ism.mjs → api-DYRggUgK.mjs} +1 -1
  3. package/dist/.setup/{approval-handler.runtime-o2N6GRFH.mjs → approval-handler.runtime-BN4W1r0o.mjs} +5 -5
  4. package/dist/.setup/{audit-5b-FXj9R.mjs → audit-BL6EoUun.mjs} +3 -3
  5. package/dist/.setup/{channel-CplVDtyZ.mjs → channel-DdI2l55_.mjs} +21 -17
  6. package/dist/.setup/{channel.setup-B3MtmBQG.mjs → channel.setup-kNWMxlgu.mjs} +3 -3
  7. package/dist/.setup/{components-YCvQ6YLS.mjs → components-C1Phe3uw.mjs} +1 -1
  8. package/dist/.setup/{conversation-binding-route-kCTw8cij.mjs → conversation-binding-route-K_jFbvi5.mjs} +1 -1
  9. package/dist/.setup/{directory-live-DH3tpS3x.mjs → directory-live-CY2-qrHI.mjs} +5 -4
  10. package/dist/.setup/{discord-DGVSguhx.mjs → discord-BRVFhk09.mjs} +1 -1
  11. package/dist/.setup/{doctor-eujgbnpZ.mjs → doctor-RqH-6JB0.mjs} +1 -1
  12. package/dist/.setup/{guilds-eDq22iSM.mjs → guilds-BSnrns-F.mjs} +2 -2
  13. package/dist/.setup/{handle-action-CktwmzMz.mjs → handle-action-uD87h2FK.mjs} +6 -6
  14. package/dist/.setup/{handle-action.guild-admin-WLQ7fRqI.mjs → handle-action.guild-admin-CqBx_3mG.mjs} +2 -2
  15. package/dist/.setup/{listeners-Df8lx3vK.mjs → listeners-DnHLrLIN.mjs} +1 -1
  16. package/dist/.setup/{live-policy-config-DiBVuaU6.mjs → live-policy-config-y0Qy36X3.mjs} +1 -1
  17. package/dist/.setup/{message-handler-DeoWTD-4.mjs → message-handler-CWL_u0X8.mjs} +5 -5
  18. package/dist/.setup/{message-handler.preflight-DKOjgF0z.mjs → message-handler.preflight-83tpEdBG.mjs} +10 -10
  19. package/dist/.setup/{message-handler.preflight-pluralkit-CYZfXXb6.mjs → message-handler.preflight-pluralkit-Dhcx7Ifz.mjs} +4 -4
  20. package/dist/.setup/{message-handler.process-RKRgMCJy.mjs → message-handler.process-BC-wNZwK.mjs} +16 -17
  21. package/dist/.setup/{outbound-payload-BaZmjewa.mjs → outbound-payload-CK3_bDvK.mjs} +5 -5
  22. package/dist/.setup/{outbound-session-route-Cgx4i9cS.mjs → outbound-session-route-Ay_DnOOl.mjs} +5 -5
  23. package/dist/.setup/{probe-DezB-6xz.mjs → probe-CbDJojNV.mjs} +1 -1
  24. package/dist/.setup/{provider-D63dgDSw.mjs → provider-CRb3Myky.mjs} +131 -74
  25. package/dist/.setup/{provider-session.runtime-ePktW62k.mjs → provider-session.runtime-3cZpps3H.mjs} +3 -3
  26. package/dist/.setup/provider.runtime-tmkt3QOg.mjs +1 -0
  27. package/dist/.setup/{realtime-session.runtime-rlZ3WzwC.mjs → realtime-session.runtime-BRYpjS9P.mjs} +5 -3
  28. package/dist/.setup/{resolve-allowlist-common-Bk8Fj6Ik.mjs → resolve-allowlist-common-B-S0wRIw.mjs} +1 -1
  29. package/dist/.setup/{resolve-channels-Bp8frXvc.mjs → resolve-channels-g16NM6Ho.mjs} +8 -6
  30. package/dist/.setup/{resolve-users-Cvcj22sG.mjs → resolve-users-DAfOOXdy.mjs} +3 -3
  31. package/dist/.setup/{runtime-BJaCvlmq.mjs → runtime--HZ9r3tF.mjs} +10 -8
  32. package/dist/.setup/{send-CVW7V-VZ.mjs → send-CtvwfZQ2.mjs} +9 -8
  33. package/dist/.setup/{send.components-C8YXdnO_.mjs → send.components-CtLtE0yD.mjs} +6 -6
  34. package/dist/.setup/{send.outbound-Uzcmh3Yd.mjs → send.outbound-D58xXPgs.mjs} +5 -5
  35. package/dist/.setup/{send.receipt-NZDOTZBU.mjs → send.receipt-DLOV4qx6.mjs} +1 -1
  36. package/dist/.setup/{send.shared-a_6Oeyg1.mjs → send.shared-B_KKRrD7.mjs} +4 -4
  37. package/dist/.setup/{sender-identity-76HFb8eK.mjs → sender-identity-BbA7FNbr.mjs} +1 -1
  38. package/dist/.setup/setup-plugin-api-ty5RJrMy.mjs +2 -0
  39. package/dist/.setup/{shared-yDUSExm2.mjs → shared-Dv2DamaK.mjs} +2 -2
  40. package/dist/.setup/{subagent-hooks-CDkdHQyy.mjs → subagent-hooks-yT45eTyz.mjs} +1 -1
  41. package/dist/.setup/{system-events-yfWz150v.mjs → system-events-Dlzp9Jcj.mjs} +2 -2
  42. package/dist/.setup/{target-resolver-BOOzqxxM.mjs → target-resolver-BzaZPBm9.mjs} +2 -2
  43. package/dist/.setup/{thread-bindings-zce4cpu_.mjs → thread-bindings-DRWhgKCc.mjs} +2 -2
  44. package/dist/.setup/{thread-bindings.manager-NywKzUtc.mjs → thread-bindings.manager-CWJKirn1.mjs} +7 -7
  45. package/dist/.setup/{thread-bindings.session-updates-D0j7oh8S.mjs → thread-bindings.session-updates-DzJrXc4w.mjs} +1 -1
  46. package/dist/.setup/{threading-DodLYDt-.mjs → threading-BbsPuT5G.mjs} +2 -2
  47. package/dist/.setup/{transcripts-source-ie9GBWaU.mjs → transcripts-source-DIW1fU_P.mjs} +15 -15
  48. package/dist/.setup/{voice-runtime-Dc8Su9Cm.mjs → voice-runtime-oJ6BZs5D.mjs} +10 -9
  49. package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
  50. package/dist/action-runtime-api.js +1 -1
  51. package/dist/activities-api.js +1 -1
  52. package/dist/api.js +11 -11
  53. package/dist/channel-plugin-api.js +1 -1
  54. package/dist/runtime-api.js +19 -19
  55. package/dist/setup-entry.js +1 -1
  56. package/dist/setup-plugin-api.js +1 -1
  57. package/dist/subagent-hooks-api.js +1 -1
  58. package/dist/transcripts-source-api.js +1 -1
  59. package/package.json +4 -4
  60. package/dist/.setup/provider.runtime-DcNkwhPW.mjs +0 -1
  61. package/dist/.setup/setup-plugin-api-BExhGEhL.mjs +0 -2
@@ -1,30 +1,30 @@
1
1
  import { g as resolveDiscordToken, h as normalizeDiscordToken, l as resolveDiscordAccount, m as resolveDiscordMaxLinesPerMessage, p as resolveDiscordAccountDmPolicy, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-C_25wyxC.mjs";
2
- import { B as unregisterGateway, C as hasAnyChannelPermissionDiscord, N as createDiscordRestClient, y as canViewDiscordGuildChannel, z as registerGateway } from "./send.shared-a_6Oeyg1.mjs";
3
- import { B as RateLimitError, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, _ as Command, d as hasDiscordV2Components, g as User, h as Message, l as Client, m as Guild, n as GuildCreateListener, o as Modal, r as ReadyListener, t as discord_exports, u as asSerializableComponent, v as CommandWithSubcommands, z as DiscordError } from "./discord-DGVSguhx.mjs";
4
- import { S as formatDiscordUserTag, _ as resolveDiscordOwnerAllowFrom, a as normalizeDiscordDisplaySlug, b as shouldEmitDiscordReactionNotification, c as resolveDiscordChannelConfig, f as resolveDiscordGuildEntry, g as resolveDiscordOwnerAccess, i as normalizeDiscordAllowList, l as resolveDiscordChannelConfigWithFallback, m as resolveDiscordMemberAllowed, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, r as isDiscordGroupAllowedByPolicy, s as resolveDiscordAllowListMatch, u as resolveDiscordChannelPolicyCommandAuthorizer, w as isDiscordThreadChannelType, x as formatDiscordReactionEmoji, y as resolveGroupDmAllow } from "./allow-list-BXrS8-R9.mjs";
5
- import { v as chunkDiscordTextWithMode } from "./send.receipt-NZDOTZBU.mjs";
2
+ import { B as unregisterGateway, C as hasAnyChannelPermissionDiscord, N as createDiscordRestClient, y as canViewDiscordGuildChannel, z as registerGateway } from "./send.shared-B_KKRrD7.mjs";
3
+ import { B as RateLimitError, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, _ as Command, d as hasDiscordV2Components, g as User, h as Message, l as Client, m as Guild, n as GuildCreateListener, o as Modal, r as ReadyListener, t as discord_exports, u as asSerializableComponent, v as CommandWithSubcommands, z as DiscordError } from "./discord-BRVFhk09.mjs";
4
+ import { S as formatDiscordUserTag, _ as resolveDiscordOwnerAllowFrom, a as normalizeDiscordDisplaySlug, b as shouldEmitDiscordReactionNotification, c as resolveDiscordChannelConfig, f as resolveDiscordGuildEntry, g as resolveDiscordOwnerAccess, i as normalizeDiscordAllowList, l as resolveDiscordChannelConfigWithFallback, m as resolveDiscordMemberAllowed, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, r as isDiscordGroupAllowedByPolicy, s as resolveDiscordAllowListMatch, u as resolveDiscordChannelPolicyCommandAuthorizer, w as isDiscordThreadChannelType, x as formatDiscordReactionEmoji, y as resolveGroupDmAllow } from "./allow-list-C3j0qLDp.mjs";
5
+ import { v as chunkDiscordTextWithMode } from "./send.receipt-DLOV4qx6.mjs";
6
6
  import { n as getDiscordEndpointRuntime, t as assertDiscordEndpointGatewayUrl } from "./endpoint-runtime-lf4DeLas.mjs";
7
7
  import { n as validateDiscordProxyUrl, r as withValidatedDiscordProxy } from "./proxy-fetch-BzXwBAXt.mjs";
8
- import { a as isDiscordRateLimitResponseBody, s as summarizeDiscordResponseBody } from "./api-BlBD4ism.mjs";
9
- import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-CVW7V-VZ.mjs";
10
- import { s as formatMention, t as sendMessageDiscord } from "./send.outbound-Uzcmh3Yd.mjs";
8
+ import { a as isDiscordRateLimitResponseBody, s as summarizeDiscordResponseBody } from "./api-DYRggUgK.mjs";
9
+ import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-CtvwfZQ2.mjs";
10
+ import { s as formatMention, t as sendMessageDiscord } from "./send.outbound-D58xXPgs.mjs";
11
11
  import { l as withAbortTimeout } from "./timeouts-cIxzatmv.mjs";
12
12
  import { r as setPresence, t as clearPresences } from "./presence-cache-Dq-3nH7R.mjs";
13
13
  import { _ as parseDiscordModalCustomId, a as DISCORD_APPROVAL_DECISIONS, b as encodeCustomIdComponent, g as parseDiscordComponentCustomIdForInteraction, h as parseDiscordComponentCustomId, i as parseDiscordQuestionData, m as parseDiscordActivityCustomIdForInteraction, s as parseExecApprovalData, u as buildDiscordActivityCustomId, v as parseDiscordModalCustomIdForInteraction, y as decodeCustomIdComponent } from "./shared-interactive-DmzaoKOM.mjs";
14
- import { a as buildDiscordComponentMessage } from "./components-YCvQ6YLS.mjs";
15
- import { a as registerDiscordComponentEntries, o as resolveDiscordComponentEntryWithPersistence, s as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-C8YXdnO_.mjs";
14
+ import { a as buildDiscordComponentMessage } from "./components-C1Phe3uw.mjs";
15
+ import { a as registerDiscordComponentEntries, o as resolveDiscordComponentEntryWithPersistence, s as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-CtLtE0yD.mjs";
16
16
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
17
17
  import { n as getDiscordActivitiesRuntime } from "./runtime-BMgTyuwg.mjs";
18
18
  import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-C7rUdqUX.mjs";
19
- import { D as getDiscordExecApprovalApprovers, _ as resolveDiscordConversationIdentity, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, d as setDiscordPolicyBindings, f as buildDiscordConversationRouteContext, h as resolveDiscordEffectiveRoute, k as isDiscordExecApprovalClientEnabled, m as resolveDiscordConversationRoute, n as DISCORD_PRESENTATION_CAPABILITIES, p as buildDiscordRoutePeer, r as buildDiscordPresentationPayload, s as DISCORD_APPROVAL_ALLOWED_MENTIONS, u as resolveDiscordGroupToolPolicy } from "./outbound-session-route-Cgx4i9cS.mjs";
20
- import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-DiBVuaU6.mjs";
21
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-Bp8frXvc.mjs";
22
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cvcj22sG.mjs";
23
- import { a as isThreadArchived, n as getThreadBindingManager } from "./thread-bindings.manager-NywKzUtc.mjs";
19
+ import { D as getDiscordExecApprovalApprovers, _ as resolveDiscordConversationIdentity, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, d as setDiscordPolicyBindings, f as buildDiscordConversationRouteContext, h as resolveDiscordEffectiveRoute, k as isDiscordExecApprovalClientEnabled, m as resolveDiscordConversationRoute, n as DISCORD_PRESENTATION_CAPABILITIES, p as buildDiscordRoutePeer, r as buildDiscordPresentationPayload, s as DISCORD_APPROVAL_ALLOWED_MENTIONS, u as resolveDiscordGroupToolPolicy } from "./outbound-session-route-Ay_DnOOl.mjs";
20
+ import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-y0Qy36X3.mjs";
21
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-g16NM6Ho.mjs";
22
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-DAfOOXdy.mjs";
23
+ import { a as isThreadArchived, n as getThreadBindingManager } from "./thread-bindings.manager-CWJKirn1.mjs";
24
24
  import { n as resolveDiscordChannelNameSafe, r as resolveDiscordChannelTopicSafe, t as resolveDiscordChannelInfoSafe } from "./channel-access-9cyzozUP.mjs";
25
- import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-DezB-6xz.mjs";
26
- import { O as resolveDiscordReferencedReplyMessage, a as resolveDiscordVoiceEnabled, i as setDiscordTranscriptsVoiceManager, k as resolveDiscordReferencedReplyMessageId, l as resolveDiscordThreadLikeChannelContext, o as authorizeDiscordVoiceIngress, s as resolveDiscordVoiceAccess, u as resolveFetchedDiscordThreadLikeChannelContext } from "./transcripts-source-ie9GBWaU.mjs";
27
- import { t as resolveDiscordSenderIdentity } from "./sender-identity-76HFb8eK.mjs";
25
+ import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-CbDJojNV.mjs";
26
+ import { O as resolveDiscordReferencedReplyMessage, a as resolveDiscordVoiceEnabled, i as setDiscordTranscriptsVoiceManager, k as resolveDiscordReferencedReplyMessageId, l as resolveDiscordThreadLikeChannelContext, o as authorizeDiscordVoiceIngress, s as resolveDiscordVoiceAccess, u as resolveFetchedDiscordThreadLikeChannelContext } from "./transcripts-source-DIW1fU_P.mjs";
27
+ import { t as resolveDiscordSenderIdentity } from "./sender-identity-BbA7FNbr.mjs";
28
28
  import { n as hasDiscordApprovalControl, t as discordApprovalMessageUpdates } from "./approval-message-updates-DKsCfxSW.mjs";
29
29
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
30
30
  import { PlatformMessageNotDispatchedError, formatErrorMessage, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
@@ -34,7 +34,8 @@ import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
34
34
  import { asFiniteNumber, asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, parseFiniteNumber, readNonBlankString, summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
35
35
  import { captureRuntimeConfigAsyncReader, createRuntimeConfigReader, getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
36
36
  import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes, PermissionFlagsBits } from "discord-api-types/v10";
37
- import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
37
+ import { buildOutboundMediaLoadOptions, getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
38
+ import { resolveOutboundMediaAccessForConfig } from "openclaw/plugin-sdk/outbound-media";
38
39
  import { hasOutboundReplyContent, resolveSendableOutboundReplyParts, resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
39
40
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
40
41
  import { MAX_TIMER_TIMEOUT_MS, asDateTimestampMs, asSafeIntegerInRange, parseStrictInteger, parseStrictPositiveInteger, resolvePromptHistoryLimit } from "openclaw/plugin-sdk/number-runtime";
@@ -67,10 +68,10 @@ import { readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk
67
68
  import { enqueueKeyedTask } from "openclaw/plugin-sdk/keyed-async-queue";
68
69
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
69
70
  import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
70
- import { clearExpiredCooldowns, ensureAuthProfileStoreAsync, formatReasoningMessage, getPreparedModelCatalogSnapshot, isProfileInCooldown, listAgentIds, loadPreparedModelCatalog, resolveAgentAvatar, resolveAgentDir, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
71
+ import { buildChannelInboundEventContext, createChannelPartialDeliveryError, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
72
+ import { clearExpiredCooldowns, ensureAuthProfileStoreAsync, formatReasoningMessage, getPreparedModelCatalogSnapshot, isProfileInCooldown, listAgentIds, resolveAgentAvatar, resolveAgentDir, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
71
73
  import { deleteSessionEntry, getSessionEntryAsync, listSessionEntriesAsync, readSessionUpdatedAtAsync, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
72
74
  import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
73
- import { buildChannelInboundEventContext, createChannelPartialDeliveryError, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
74
75
  import { captureHttpExchangeAsync, captureWsEventAsync, resolveDebugProxySettings, resolveEffectiveDebugProxyUrl } from "openclaw/plugin-sdk/proxy-capture";
75
76
  import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
76
77
  import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
@@ -685,6 +686,45 @@ var DiscordInteractionListener = class {
685
686
  });
686
687
  }
687
688
  };
689
+ async function isDiscordPresenceMemberAllowed(params) {
690
+ const { client, guildInfo } = params;
691
+ let channelConfig = null;
692
+ if (hasConfiguredDiscordChannels(guildInfo.channels)) {
693
+ const fetched = await client.fetchChannel(params.channelId);
694
+ if (!fetched) return false;
695
+ const channel = await resolveFetchedDiscordThreadLikeChannelContext({
696
+ client,
697
+ channel: fetched,
698
+ channelIdFallback: params.channelId
699
+ });
700
+ channelConfig = resolveDiscordChannelConfigWithFallback({
701
+ guildInfo,
702
+ channelId: params.channelId,
703
+ channelName: channel.channelName,
704
+ channelSlug: channel.channelSlug,
705
+ parentId: channel.isThreadChannel ? channel.threadParentId : channel.parentId,
706
+ parentName: channel.isThreadChannel ? channel.threadParentName : void 0,
707
+ parentSlug: channel.isThreadChannel ? channel.threadParentSlug : "",
708
+ scope: channel.isThreadChannel ? "thread" : "channel"
709
+ });
710
+ }
711
+ const sender = params.allowNameMatching ? await client.fetchUser(params.userId).then((user) => ({
712
+ id: user.id,
713
+ name: user.username,
714
+ tag: formatDiscordUserTag(user)
715
+ })) : { id: params.userId };
716
+ const access = (memberRoleIds) => resolveDiscordMemberAccessState({
717
+ channelConfig,
718
+ guildInfo,
719
+ memberRoleIds,
720
+ sender,
721
+ allowNameMatching: params.allowNameMatching
722
+ });
723
+ const { hasAccessRestrictions, memberAllowed } = access([]);
724
+ if (!hasAccessRestrictions || memberAllowed) return true;
725
+ if (!(channelConfig?.roles ?? guildInfo.roles)?.length) return false;
726
+ return access((await client.fetchMember(params.guildId, params.userId)).roles).memberAllowed;
727
+ }
688
728
  var DiscordPresenceListener = class {
689
729
  constructor(params) {
690
730
  this.params = params;
@@ -787,11 +827,12 @@ var DiscordPresenceListener = class {
787
827
  if (this.stopped) return;
788
828
  const policy = await this.params.readPolicy?.();
789
829
  const cfg = policy?.cfg ?? this.params.cfg;
790
- const config = resolveDiscordGuildEntry({
830
+ const guildInfo = resolveDiscordGuildEntry({
791
831
  guildId: data.guild_id,
792
832
  guildEntries: policy ? policy.guildEntries : this.params.guildEntries
793
- })?.presenceEvents;
794
- if (!config || config.enabled === false) return;
833
+ });
834
+ const config = guildInfo?.presenceEvents;
835
+ if (!guildInfo || !config || config.enabled === false) return;
795
836
  if (config.users !== void 0 && !config.users.includes(userId)) return;
796
837
  const route = resolveAgentRoute({
797
838
  cfg,
@@ -851,6 +892,17 @@ var DiscordPresenceListener = class {
851
892
  this.recordPresenceBaseline(data.guild_id, presenceKey, "online");
852
893
  return;
853
894
  }
895
+ if (!await isDiscordPresenceMemberAllowed({
896
+ client,
897
+ guildInfo,
898
+ guildId: data.guild_id,
899
+ channelId: presenceEvent.channelId,
900
+ userId,
901
+ allowNameMatching: policy?.allowNameMatching ?? this.params.allowNameMatching ?? false
902
+ })) {
903
+ this.recordPresenceBaseline(data.guild_id, presenceKey, "online");
904
+ return;
905
+ }
854
906
  if (!await canViewDiscordGuildChannel(data.guild_id, presenceEvent.channelId, userId, {
855
907
  cfg,
856
908
  accountId: this.params.accountId,
@@ -1512,7 +1564,8 @@ function resolveDiscordInteractionReplyOptions(params) {
1512
1564
  return {
1513
1565
  textLimit: resolveTextChunkLimit(params.cfg, "discord", params.accountId, { fallbackLimit: 2e3 }),
1514
1566
  maxLinesPerMessage: resolveDiscordMaxLinesPerMessage(params),
1515
- chunkMode: resolveChunkMode(params.cfg, "discord", params.accountId)
1567
+ chunkMode: resolveChunkMode(params.cfg, "discord", params.accountId),
1568
+ mediaAccess: resolveOutboundMediaAccessForConfig(params.cfg)
1516
1569
  };
1517
1570
  }
1518
1571
  function isDiscordUnknownInteraction(error) {
@@ -1613,7 +1666,10 @@ async function deliverDiscordInteractionReply(params) {
1613
1666
  }
1614
1667
  };
1615
1668
  const files = reply.hasMedia ? await Promise.all(reply.mediaUrls.map(async (url) => {
1616
- const loaded = await loadWebMedia(url, { localRoots: params.mediaLocalRoots });
1669
+ const loaded = await loadWebMedia(url, {
1670
+ localRoots: params.mediaLocalRoots,
1671
+ ssrfPolicy: buildOutboundMediaLoadOptions({ mediaAccess: params.mediaAccess }).ssrfPolicy
1672
+ });
1617
1673
  return {
1618
1674
  name: loaded.fileName ?? "upload",
1619
1675
  data: loaded.buffer,
@@ -3952,31 +4008,24 @@ async function dispatchDiscordCommandInteraction(params) {
3952
4008
  if (!authority.isAllowed()) return reject("You are not authorized to use this command.", true);
3953
4009
  const isGuild = Boolean(interaction.guild);
3954
4010
  const channelId = rawChannelId || "unknown";
3955
- const menuNeedsModelContext = !(commandArgs?.raw && !commandArgs.values) && command.args?.some((arg) => typeof arg.choices === "function" && commandArgs?.values?.[arg.name] == null);
3956
- const menuModelContext = menuNeedsModelContext && bindingReadiness?.ok !== false ? await resolveDiscordNativeChoiceContext({
4011
+ const menuModelContext = !(commandArgs?.raw && !commandArgs.values) && command.args?.some((arg) => typeof arg.choices === "function" && commandArgs?.values?.[arg.name] == null) && bindingReadiness?.ok !== false ? await resolveDiscordNativeChoiceContext({
3957
4012
  interaction,
3958
4013
  cfg,
3959
4014
  accountId,
3960
4015
  threadBindings,
3961
4016
  route: effectiveRoute
3962
4017
  }) : null;
3963
- const menuModelCatalog = command.key === "think" && menuNeedsModelContext ? await loadPreparedModelCatalog({
3964
- config: cfg,
3965
- ...menuModelContext?.agentId ? {
3966
- agentId: menuModelContext.agentId,
3967
- agentDir: resolveAgentDir(cfg, menuModelContext.agentId)
3968
- } : {},
3969
- readOnly: true
3970
- }) : void 0;
3971
4018
  const menu = command.key === "verbose" && bindingReadiness?.ok === false ? null : await resolveCommandArgMenuAsync({
3972
4019
  command,
3973
4020
  args: commandArgs,
3974
4021
  cfg,
3975
- session: command.key === "verbose" ? effectiveRoute : void 0,
4022
+ session: command.key === "verbose" || command.key === "think" ? {
4023
+ agentId: menuModelContext?.agentId ?? effectiveRoute.agentId,
4024
+ sessionKey: effectiveRoute.sessionKey
4025
+ } : void 0,
3976
4026
  provider: menuModelContext?.provider,
3977
4027
  model: menuModelContext?.model,
3978
- agentRuntime: menuModelContext?.agentRuntime,
3979
- catalog: menuModelCatalog
4028
+ agentRuntime: menuModelContext?.agentRuntime
3980
4029
  });
3981
4030
  if (policy?.isCurrent() === false) return reject("Access policy changed. Try this interaction again.", true);
3982
4031
  if (menu) {
@@ -4253,17 +4302,21 @@ function canResumeAfterGatewayClose(code) {
4253
4302
  //#region extensions/discord/src/internal/gateway-identify-limiter.ts
4254
4303
  const IDENTIFY_WINDOW_MS = 5e3;
4255
4304
  var GatewayIdentifyLimiter = class {
4256
- async wait() {
4257
- const now = Date.now();
4258
- const nextAllowedAt = this.nextAllowedAt ?? now;
4259
- const waitMs = Math.max(0, nextAllowedAt - now);
4260
- this.nextAllowedAt = Math.max(now, nextAllowedAt) + IDENTIFY_WINDOW_MS;
4261
- if (waitMs > 0) await new Promise((resolve) => {
4262
- setTimeout(resolve, waitMs).unref();
4263
- });
4305
+ constructor() {
4306
+ this.nextAllowedAt = 0;
4307
+ }
4308
+ async schedule(identify) {
4309
+ for (;;) {
4310
+ const waitMs = this.nextAllowedAt - performance.now();
4311
+ if (waitMs <= 0) break;
4312
+ await new Promise((resolve) => {
4313
+ setTimeout(resolve, waitMs).unref();
4314
+ });
4315
+ }
4316
+ if (identify()) this.nextAllowedAt = performance.now() + IDENTIFY_WINDOW_MS;
4264
4317
  }
4265
4318
  reset() {
4266
- this.nextAllowedAt = void 0;
4319
+ this.nextAllowedAt = 0;
4267
4320
  }
4268
4321
  };
4269
4322
  const sharedGatewayIdentifyLimiter = new GatewayIdentifyLimiter();
@@ -4653,29 +4706,30 @@ var GatewayPlugin = class {
4653
4706
  d: this.sequence
4654
4707
  }, true);
4655
4708
  }
4656
- async identifyWithConcurrency(sourceSocket) {
4657
- await sharedGatewayIdentifyLimiter.wait();
4658
- const socket = sourceSocket ?? this.ws;
4659
- if (!socket || socket !== this.ws) return;
4660
- if (socket.readyState !== READY_STATE_OPEN) {
4661
- this.scheduleReconnect({
4662
- reason: "identify",
4663
- preferResume: false
4664
- });
4665
- return;
4666
- }
4667
- this.send({
4668
- op: GatewayOpcodes.Identify,
4669
- d: {
4670
- token: this.client?.options.token ?? "",
4671
- intents: this.options.intents ?? 0,
4672
- properties: {
4673
- os: process.platform,
4674
- browser: "openclaw",
4675
- device: "openclaw"
4676
- }
4709
+ identifyWithConcurrency(socket) {
4710
+ return sharedGatewayIdentifyLimiter.schedule(() => {
4711
+ if (socket !== this.ws) return false;
4712
+ if (socket.readyState !== READY_STATE_OPEN) {
4713
+ this.scheduleReconnect({
4714
+ reason: "identify",
4715
+ preferResume: false
4716
+ });
4717
+ return false;
4677
4718
  }
4678
- }, true);
4719
+ this.send({
4720
+ op: GatewayOpcodes.Identify,
4721
+ d: {
4722
+ token: this.client?.options.token ?? "",
4723
+ intents: this.options.intents ?? 0,
4724
+ properties: {
4725
+ os: process.platform,
4726
+ browser: "openclaw",
4727
+ device: "openclaw"
4728
+ }
4729
+ }
4730
+ }, true);
4731
+ return true;
4732
+ });
4679
4733
  }
4680
4734
  send(payload, skipRateLimit = false) {
4681
4735
  if (!this.ws || this.ws.readyState !== READY_STATE_OPEN) throw new Error("Discord gateway socket is not open");
@@ -6045,7 +6099,7 @@ function createAgentSelectMenu(ctx) {
6045
6099
  }
6046
6100
  //#endregion
6047
6101
  //#region extensions/discord/src/monitor/agent-components.ts
6048
- const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-YCvQ6YLS.mjs").then((n) => n.t));
6102
+ const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-C1Phe3uw.mjs").then((n) => n.t));
6049
6103
  async function resolveAuthorizedComponentEntry(params) {
6050
6104
  const entry = params.entry ?? await params.resolve(false);
6051
6105
  if (!entry) {
@@ -7825,7 +7879,10 @@ function registerDiscordMonitorListeners(params) {
7825
7879
  register(threadUpdateListener, new DiscordThreadReadyListener(threadUpdateListener), new DiscordThreadDeleteListener(params.cfg, params.accountId, params.logger));
7826
7880
  let presenceListener;
7827
7881
  if (params.discordConfig.intents?.presence) {
7828
- presenceListener = new DiscordPresenceListener(listenerOptions);
7882
+ presenceListener = new DiscordPresenceListener({
7883
+ ...listenerOptions,
7884
+ allowNameMatching: isDangerousNameMatchingEnabled(params.discordConfig)
7885
+ });
7829
7886
  register(presenceListener, new DiscordPresenceGuildCreateListener(presenceListener), new DiscordPresenceGuildDeleteListener(presenceListener), new DiscordPresenceReadyListener(presenceListener));
7830
7887
  params.runtime.log?.("discord: GuildPresences intent enabled — presence listener registered");
7831
7888
  }
@@ -7958,7 +8015,7 @@ async function monitorDiscordProvider(opts) {
7958
8015
  cfg,
7959
8016
  accountId: account.accountId
7960
8017
  }) ?? "pairing";
7961
- const discordProviderSessionRuntime = await import("./provider-session.runtime-ePktW62k.mjs");
8018
+ const discordProviderSessionRuntime = await import("./provider-session.runtime-3cZpps3H.mjs");
7962
8019
  const threadBindingIdleTimeoutMs = discordProviderSessionRuntime.resolveThreadBindingIdleTimeoutMs({
7963
8020
  channelIdleHoursRaw: discordCfg.threadBindings?.idleHours,
7964
8021
  sessionIdleHoursRaw: cfg.session?.threadBindings?.idleHours
@@ -8269,8 +8326,8 @@ async function monitorDiscordProvider(opts) {
8269
8326
  };
8270
8327
  let voiceManager = null;
8271
8328
  if (voiceEnabled) {
8272
- const { DiscordVoiceManager } = await import("./voice-runtime-Dc8Su9Cm.mjs");
8273
- const { DiscordVoiceGuildCreateListener, DiscordVoiceReadyListener, DiscordVoiceResumedListener, DiscordVoiceStateUpdateListener } = await import("./listeners-Df8lx3vK.mjs");
8329
+ const { DiscordVoiceManager } = await import("./voice-runtime-oJ6BZs5D.mjs");
8330
+ const { DiscordVoiceGuildCreateListener, DiscordVoiceReadyListener, DiscordVoiceResumedListener, DiscordVoiceStateUpdateListener } = await import("./listeners-DnHLrLIN.mjs");
8274
8331
  voiceManager = new DiscordVoiceManager({
8275
8332
  ...monitorOptions,
8276
8333
  scheduler
@@ -1,6 +1,6 @@
1
- import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-NywKzUtc.mjs";
2
- import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-zce4cpu_.mjs";
3
- import { t as createDiscordMessageHandler } from "./message-handler-DeoWTD-4.mjs";
1
+ import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-CWJKirn1.mjs";
2
+ import { l as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DRWhgKCc.mjs";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-CWL_u0X8.mjs";
4
4
  import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
5
5
  import { getAcpSessionManager, isAcpRuntimeError, rethrowIncognitoSessionError } from "openclaw/plugin-sdk/acp-runtime";
6
6
  export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled, rethrowIncognitoSessionError };
@@ -0,0 +1 @@
1
+ export { t as monitorDiscordProvider } from "./provider-CRb3Myky.mjs";
@@ -1,8 +1,8 @@
1
1
  import { _ as setDiscordAudioOutputStatus, h as restoreDiscordAudioError, l as createDiscordPcmToRealtimeConverter, m as getDiscordAudioOutputStatus, p as DiscordAudioOutputStatus } from "./receive-recovery-C3Ks4wAQ.mjs";
2
2
  import { t as resolveDiscordOutputAudioDelta } from "./output-activity-uBpMSX75.mjs";
3
3
  import { n as discordRealtimeVoiceSecretOwnerId } from "./secret-config-contract-B1kE4sDv.mjs";
4
- import { y as logVoiceVerbose } from "./provider-D63dgDSw.mjs";
5
- import { a as maybeControlDiscordVoiceAgentRun, i as logDiscordVoiceAgentControlResult, n as formatVoiceIngressPrompt, r as handleDiscordVoiceAgentControlToolCall, t as DiscordRealtimeRecording } from "./voice-runtime-Dc8Su9Cm.mjs";
4
+ import { y as logVoiceVerbose } from "./provider-CRb3Myky.mjs";
5
+ import { a as maybeControlDiscordVoiceAgentRun, i as logDiscordVoiceAgentControlResult, n as formatVoiceIngressPrompt, r as handleDiscordVoiceAgentControlToolCall, t as DiscordRealtimeRecording } from "./voice-runtime-oJ6BZs5D.mjs";
6
6
  import { MessageChannel } from "node:worker_threads";
7
7
  import { formatErrorMessage, readErrorName, toErrorObject, toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
8
8
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
@@ -1319,6 +1319,7 @@ var DiscordRealtimeSpeakerSession = class {
1319
1319
  this.inputOpen = true;
1320
1320
  this.activeOperations = 0;
1321
1321
  this.outputEnabled = true;
1322
+ this.interruptResponseOnInputAudio = false;
1322
1323
  this.inputIdleListeners = /* @__PURE__ */ new Set();
1323
1324
  this.lastActivityAt = Date.now();
1324
1325
  this.outputEnabled = !params.standby;
@@ -1414,6 +1415,7 @@ var DiscordRealtimeSpeakerSession = class {
1414
1415
  this.selection = selection;
1415
1416
  const capabilities = resolved.capabilities;
1416
1417
  this.policy = sessionPolicy;
1418
+ this.interruptResponseOnInputAudio = interruptResponseOnInputAudio;
1417
1419
  const { toolPolicy, consultPolicy, autoRespondToAudio } = sessionPolicy;
1418
1420
  const usesRealtimeAgentHandoff = this.params.mode === "bidi" || toolPolicy !== "none";
1419
1421
  const onReady = () => {
@@ -1656,7 +1658,7 @@ var DiscordRealtimeSpeakerSession = class {
1656
1658
  }
1657
1659
  }
1658
1660
  canReceiveDuringPlayback() {
1659
- return this.bridge?.bridge.outputAudioMode === "continuous" || this.playback.isBargeInEnabled();
1661
+ return this.bridge?.bridge.outputAudioMode === "continuous" || this.interruptResponseOnInputAudio || this.playback.isBargeInEnabled();
1660
1662
  }
1661
1663
  get realtimeConfig() {
1662
1664
  return this.params.discordConfig.voice?.realtime;
@@ -1,5 +1,5 @@
1
1
  import { h as normalizeDiscordToken } from "./accounts-C_25wyxC.mjs";
2
- import { o as normalizeDiscordSlug } from "./allow-list-BXrS8-R9.mjs";
2
+ import { o as normalizeDiscordSlug } from "./allow-list-C3j0qLDp.mjs";
3
3
  //#region extensions/discord/src/resolve-allowlist-common.ts
4
4
  function resolveDiscordAllowlistToken(token) {
5
5
  return normalizeDiscordToken(token, "channels.discord.token");
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { o as normalizeDiscordSlug, w as isDiscordThreadChannelType } from "./allow-list-BXrS8-R9.mjs";
3
- import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-BlBD4ism.mjs";
4
- import { n as listGuilds, t as listDiscordGuildChannels } from "./guilds-eDq22iSM.mjs";
5
- import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-Bk8Fj6Ik.mjs";
2
+ import { a as normalizeDiscordDisplaySlug, o as normalizeDiscordSlug, w as isDiscordThreadChannelType } from "./allow-list-C3j0qLDp.mjs";
3
+ import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-DYRggUgK.mjs";
4
+ import { n as listGuilds, t as listDiscordGuildChannels } from "./guilds-BSnrns-F.mjs";
5
+ import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-B-S0wRIw.mjs";
6
6
  //#region extensions/discord/src/resolve-channels.ts
7
7
  var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
8
8
  async function listGuildChannels(token, fetcher, guildId) {
@@ -81,8 +81,10 @@ async function resolveDiscordChannelAllowlist(params) {
81
81
  const ids = channels.filter((channel) => channel.id === query);
82
82
  if (ids.length) return ids;
83
83
  }
84
- const slug = normalizeDiscordSlug(query);
85
- return channels.filter((channel) => normalizeDiscordSlug(channel.name) === slug);
84
+ const slug = normalizeDiscordDisplaySlug(query);
85
+ if (!slug) return [];
86
+ const matchSlug = normalizeDiscordSlug(query) === slug ? normalizeDiscordSlug : normalizeDiscordDisplaySlug;
87
+ return channels.filter((channel) => matchSlug(channel.name) === slug);
86
88
  }
87
89
  const resolveEntry = async (input) => {
88
90
  const parsed = parseDiscordAllowlistInput(input, "channel");
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-BlBD4ism.mjs";
3
- import { n as listGuilds, r as searchDiscordGuildMembers } from "./guilds-eDq22iSM.mjs";
4
- import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-Bk8Fj6Ik.mjs";
2
+ import { t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-DYRggUgK.mjs";
3
+ import { n as listGuilds, r as searchDiscordGuildMembers } from "./guilds-BSnrns-F.mjs";
4
+ import { n as parseDiscordAllowlistInput, r as resolveDiscordAllowlistToken, t as filterDiscordGuilds } from "./resolve-allowlist-common-B-S0wRIw.mjs";
5
5
  import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  //#region extensions/discord/src/resolve-users.ts
7
7
  var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
@@ -1,13 +1,13 @@
1
1
  import { c as resolveDefaultDiscordAccountId, s as mergeDiscordAccountConfig, t as createDiscordActionGate } from "./accounts-C_25wyxC.mjs";
2
- import { C as hasAnyChannelPermissionDiscord, P as createDiscordRuntimeAccountContext, R as getGateway, _ as canManageGuildMemberRoleDiscord, b as fetchChannelPermissionsDiscord, n as buildDiscordTextChunks, u as resolveDiscordTargetChannelId, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, y as canViewDiscordGuildChannel } from "./send.shared-a_6Oeyg1.mjs";
3
- import { l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, w as isDiscordThreadChannelType, y as resolveGroupDmAllow } from "./allow-list-BXrS8-R9.mjs";
4
- import { f as resolveDiscordReplyReference, u as createReusableDiscordReplyReference } from "./send.receipt-NZDOTZBU.mjs";
2
+ import { C as hasAnyChannelPermissionDiscord, P as createDiscordRuntimeAccountContext, R as getGateway, _ as canManageGuildMemberRoleDiscord, b as fetchChannelPermissionsDiscord, n as buildDiscordTextChunks, u as resolveDiscordTargetChannelId, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, y as canViewDiscordGuildChannel } from "./send.shared-B_KKRrD7.mjs";
3
+ import { l as resolveDiscordChannelConfigWithFallback, n as hasConfiguredDiscordChannels, o as normalizeDiscordSlug, r as isDiscordGroupAllowedByPolicy, w as isDiscordThreadChannelType, y as resolveGroupDmAllow } from "./allow-list-C3j0qLDp.mjs";
4
+ import { f as resolveDiscordReplyReference, u as createReusableDiscordReplyReference } from "./send.receipt-DLOV4qx6.mjs";
5
5
  import { n as resolveDiscordChannelId, t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
6
- 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-CVW7V-VZ.mjs";
7
- import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-Uzcmh3Yd.mjs";
6
+ 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-CtvwfZQ2.mjs";
7
+ import { r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-D58xXPgs.mjs";
8
8
  import { n as getPresence } from "./presence-cache-Dq-3nH7R.mjs";
9
- import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-YCvQ6YLS.mjs";
10
- import { r as sendDiscordComponentMessage } from "./send.components-C8YXdnO_.mjs";
9
+ import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-C1Phe3uw.mjs";
10
+ import { r as sendDiscordComponentMessage } from "./send.components-CtLtE0yD.mjs";
11
11
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
12
12
  import { asBoolean, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { assertMediaNotDataUrl, jsonResult, parseAvailableTags, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
@@ -116,6 +116,7 @@ function readDiscordChannelCreateParams(params) {
116
116
  }
117
117
  function readDiscordChannelEditParams(params) {
118
118
  const parentId = readDiscordParentIdParam(params);
119
+ const appliedTags = readStringArrayParam(params, "appliedTags", { allowEmpty: true });
119
120
  return {
120
121
  channelId: readStringParam(params, "channelId", { required: true }),
121
122
  name: readStringParam(params, "name"),
@@ -127,7 +128,8 @@ function readDiscordChannelEditParams(params) {
127
128
  archived: asBoolean(params.archived),
128
129
  locked: asBoolean(params.locked),
129
130
  autoArchiveDuration: readDiscordAutoArchiveDurationParam(params, "autoArchiveDuration"),
130
- availableTags: parseAvailableTags(params.availableTags)
131
+ availableTags: parseAvailableTags(params.availableTags),
132
+ appliedTags
131
133
  };
132
134
  }
133
135
  function readDiscordChannelMoveParams(params) {
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as resolveDiscordMessageFlags, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-a_6Oeyg1.mjs";
3
- import { B as RateLimitError, C as listMessageReactionUsers, D as editChannelMessage, E as deleteChannelMessage, F as getGuildVoiceState, G as readRetryAfter, H as isUnknownDiscordVoiceStateError, I as listGuildEmojis, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, M as unpinChannelMessage, N as getGuild, O as getChannel, P as getGuildMember, S as deleteOwnMessageReaction, T as createThread, U as readDiscordCode, V as isUnknownDiscordMessageError, W as readDiscordMessage, j as pinChannelMessage, k as getChannelMessage, q as withDiscordRequestAuthority, w as createChannelMessage, x as createOwnMessageReaction, z as DiscordError } from "./discord-DGVSguhx.mjs";
4
- import { C as parseDiscordRetryAfterBodySeconds } from "./allow-list-BXrS8-R9.mjs";
5
- import { _ as recordDiscordMessageCreateAmbiguity, h as createDiscordRetryRunner, m as classifyDiscordDeliveryFailure, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, v as chunkDiscordTextWithMode } from "./send.receipt-NZDOTZBU.mjs";
2
+ import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as resolveDiscordMessageFlags, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-B_KKRrD7.mjs";
3
+ import { B as RateLimitError, C as listMessageReactionUsers, D as editChannelMessage, E as deleteChannelMessage, F as getGuildVoiceState, G as readRetryAfter, H as isUnknownDiscordVoiceStateError, I as listGuildEmojis, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, M as unpinChannelMessage, N as getGuild, O as getChannel, P as getGuildMember, S as deleteOwnMessageReaction, T as createThread, U as readDiscordCode, V as isUnknownDiscordMessageError, W as readDiscordMessage, j as pinChannelMessage, k as getChannelMessage, q as withDiscordRequestAuthority, w as createChannelMessage, x as createOwnMessageReaction, z as DiscordError } from "./discord-BRVFhk09.mjs";
4
+ import { C as parseDiscordRetryAfterBodySeconds } from "./allow-list-C3j0qLDp.mjs";
5
+ import { _ as recordDiscordMessageCreateAmbiguity, h as createDiscordRetryRunner, m as classifyDiscordDeliveryFailure, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, v as chunkDiscordTextWithMode } from "./send.receipt-DLOV4qx6.mjs";
6
6
  import { n as getDiscordEndpointRuntime, r as resolveDiscordEndpointAttachmentGuard } from "./endpoint-runtime-lf4DeLas.mjs";
7
- import { o as parseDiscordHttpErrorBody } from "./api-BlBD4ism.mjs";
8
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-BOOzqxxM.mjs";
9
- import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-Uzcmh3Yd.mjs";
7
+ import { o as parseDiscordHttpErrorBody } from "./api-DYRggUgK.mjs";
8
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-BzaZPBm9.mjs";
9
+ import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-D58xXPgs.mjs";
10
10
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-cIxzatmv.mjs";
11
11
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
12
12
  import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
@@ -51,7 +51,8 @@ async function editChannelDiscord(payload, opts) {
51
51
  archived: payload.archived,
52
52
  locked: payload.locked,
53
53
  auto_archive_duration: payload.autoArchiveDuration,
54
- available_tags: payload.availableTags
54
+ available_tags: payload.availableTags,
55
+ applied_tags: payload.appliedTags
55
56
  });
56
57
  return await rest.patch(Routes.channel(payload.channelId), { body });
57
58
  }
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { D as createDiscordMessageNonce, M as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-a_6Oeyg1.mjs";
3
- import { D as editChannelMessage, f as serializePayload, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-DGVSguhx.mjs";
4
- import { r as createDiscordSendResult } from "./send.receipt-NZDOTZBU.mjs";
5
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-BOOzqxxM.mjs";
6
- import { t as sendMessageDiscord } from "./send.outbound-Uzcmh3Yd.mjs";
7
- import { a as buildDiscordComponentMessage, u as resolveDiscordComponentAttachmentName } from "./components-YCvQ6YLS.mjs";
2
+ import { D as createDiscordMessageNonce, M as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-B_KKRrD7.mjs";
3
+ import { D as editChannelMessage, f as serializePayload, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-BRVFhk09.mjs";
4
+ import { r as createDiscordSendResult } from "./send.receipt-DLOV4qx6.mjs";
5
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-BzaZPBm9.mjs";
6
+ import { t as sendMessageDiscord } from "./send.outbound-D58xXPgs.mjs";
7
+ import { a as buildDiscordComponentMessage, u as resolveDiscordComponentAttachmentName } from "./components-C1Phe3uw.mjs";
8
8
  import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
9
9
  import { hasNonEmptyString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { ChannelType } from "discord-api-types/v10";
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-a_6Oeyg1.mjs";
3
- import { T as createThread, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-DGVSguhx.mjs";
4
- import { n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, u as createReusableDiscordReplyReference } from "./send.receipt-NZDOTZBU.mjs";
5
- import { a as normalizeDiscordSnowflake, i as normalizeDiscordHandleKey, s as resolveDiscordDirectoryUserId } from "./directory-live-DH3tpS3x.mjs";
6
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-BOOzqxxM.mjs";
2
+ import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-B_KKRrD7.mjs";
3
+ import { T as createThread, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-BRVFhk09.mjs";
4
+ import { n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, u as createReusableDiscordReplyReference } from "./send.receipt-DLOV4qx6.mjs";
5
+ import { a as normalizeDiscordSnowflake, i as normalizeDiscordHandleKey, s as resolveDiscordDirectoryUserId } from "./directory-live-CY2-qrHI.mjs";
6
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-BzaZPBm9.mjs";
7
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { ChannelType } from "discord-api-types/v10";
9
9
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -1,4 +1,4 @@
1
- import { B as RateLimitError } from "./discord-DGVSguhx.mjs";
1
+ import { B as RateLimitError } from "./discord-BRVFhk09.mjs";
2
2
  import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
3
3
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
@@ -1,9 +1,9 @@
1
1
  import { h as normalizeDiscordToken, l as resolveDiscordAccount, s as mergeDiscordAccountConfig } from "./accounts-C_25wyxC.mjs";
2
- import { A as getThreadMember, N as getGuild, O as getChannel, P as getGuildMember, R as RequestClient, b as getCurrentUser, d as hasDiscordV2Components, f as serializePayload, p as Embed, w as createChannelMessage, y as createUserDmChannel, z as DiscordError } from "./discord-DGVSguhx.mjs";
3
- import { w as isDiscordThreadChannelType } from "./allow-list-BXrS8-R9.mjs";
4
- import { d as resolveDiscordReplyMessageId, h as createDiscordRetryRunner, v as chunkDiscordTextWithMode } from "./send.receipt-NZDOTZBU.mjs";
2
+ import { A as getThreadMember, N as getGuild, O as getChannel, P as getGuildMember, R as RequestClient, b as getCurrentUser, d as hasDiscordV2Components, f as serializePayload, p as Embed, w as createChannelMessage, y as createUserDmChannel, z as DiscordError } from "./discord-BRVFhk09.mjs";
3
+ import { w as isDiscordThreadChannelType } from "./allow-list-C3j0qLDp.mjs";
4
+ import { d as resolveDiscordReplyMessageId, h as createDiscordRetryRunner, v as chunkDiscordTextWithMode } from "./send.receipt-DLOV4qx6.mjs";
5
5
  import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-BzXwBAXt.mjs";
6
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-BOOzqxxM.mjs";
6
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-BzaZPBm9.mjs";
7
7
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
8
  import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
@@ -1,4 +1,4 @@
1
- import { S as formatDiscordUserTag } from "./allow-list-BXrS8-R9.mjs";
1
+ import { S as formatDiscordUserTag } from "./allow-list-C3j0qLDp.mjs";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/discord/src/monitor/sender-identity.ts
4
4
  function resolveDiscordWebhookId(message) {
@@ -0,0 +1,2 @@
1
+ export { t as discordSetupPlugin } from "./channel.setup-kNWMxlgu.mjs";
2
+ import "../setup-plugin-api.js";
@@ -1,7 +1,7 @@
1
1
  import { c as resolveDefaultDiscordAccountId, f as resolveDiscordAccountDisabledReason, i as listDiscordAccountIds, l as resolveDiscordAccount, p as resolveDiscordAccountDmPolicy, r as isDiscordAccountEnabledForRuntime, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-C_25wyxC.mjs";
2
2
  import { t as inspectDiscordAccount } from "./account-inspect-DGkdWwix.mjs";
3
3
  import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
4
- import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-DiBVuaU6.mjs";
4
+ import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-y0Qy36X3.mjs";
5
5
  import { t as DiscordChannelConfigSchema } from "./config-schema-BNKN1cu5.mjs";
6
6
  import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bwv8EuQ_.mjs";
7
7
  import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B1kE4sDv.mjs";
@@ -97,7 +97,7 @@ const discordSetupContract = defineChannelSetupContract({
97
97
  //#region extensions/discord/src/shared.ts
98
98
  const DISCORD_CHANNEL = "discord";
99
99
  const livePolicyConfigPrefixes = Object.keys(selectDiscordLivePolicyConfig({})).flatMap((key) => [`channels.discord.${key}`, `channels.discord.accounts.*.${key}`]);
100
- const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-eujgbnpZ.mjs"));
100
+ const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-RqH-6JB0.mjs"));
101
101
  const discordDoctor = {
102
102
  dmAllowFromMode: "topOnly",
103
103
  groupModel: "route",