@openclaw/discord 2026.8.1 → 2026.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) 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-Dl-TOyOX.js → activities-api-CkKcHUB6.js} +14 -13
  6. package/dist/activities-api.js +1 -1
  7. package/dist/{allow-list-BDMimASD.js → allow-list-C2JuH-R0.js} +10 -6
  8. package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
  9. package/dist/api.js +17 -17
  10. package/dist/{approval-handler.runtime-q4Zqo44V.js → approval-handler.runtime-DZM6Kt1Z.js} +8 -7
  11. package/dist/{audit-DgrvFPGt.js → audit-DIbQA4VT.js} +8 -7
  12. package/dist/{channel-BsQUalPw.js → channel-CarzU3bg.js} +24 -22
  13. package/dist/{channel-actions.runtime-UMGGIfSy.js → channel-actions.runtime-B2wMqeVK.js} +13 -11
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/{channel.setup-rPs4dsk_.js → channel.setup-z_ewMVa9.js} +18 -18
  17. package/dist/{components-Dk35LTf_.js → components-gvRA0oaI.js} +1 -1
  18. package/dist/{config-schema-CxPqtVI1.js → config-schema-B797-Spt.js} +5 -4
  19. package/dist/{conversation-binding-route-BjvX4e35.js → conversation-binding-route-DPpBRpYI.js} +1 -1
  20. package/dist/{directory-config-B7DY_pNG.js → directory-config-AA8wQx0D.js} +2 -2
  21. package/dist/directory-contract-api.js +1 -1
  22. package/dist/{directory-live-DuAXKkan.js → directory-live-D_kFz_Fj.js} +4 -4
  23. package/dist/{doctor-zQTtn6hm.js → doctor-QQTOkBfW.js} +5 -5
  24. package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
  25. package/dist/doctor-contract-api.js +3 -2
  26. package/dist/{handle-action.guild-admin-DZewwLr1.js → handle-action.guild-admin-Cc88ZGon.js} +2 -2
  27. package/dist/index.js +1 -1
  28. package/dist/{ingress-identity-CzZKcPK8.js → ingress-identity-BCzfPPYM.js} +1 -1
  29. package/dist/{message-handler-C5By3yl5.js → message-handler-CAeEpqWo.js} +14 -10
  30. package/dist/{message-handler.preflight-DrszWuHw.js → message-handler.preflight-CoKoE3dY.js} +24 -19
  31. package/dist/{message-handler.process-DyFPDLCt.js → message-handler.process-cdIJ_fDT.js} +56 -74
  32. package/dist/{message-text-Ca8M6TU8.js → message-text-C0K4-fkg.js} +9 -4
  33. package/dist/{outbound-adapter-Dif8p481.js → outbound-adapter-Ch0At5Ra.js} +34 -24
  34. package/dist/{outbound-components-wjv7yyAj.js → outbound-components-Bnt_7x7r.js} +3 -3
  35. package/dist/{outbound-session-route-Bn4uXaoE.js → outbound-session-route-CzzerX2K.js} +10 -7
  36. package/dist/{owner-access-UlYi9t0M.js → owner-access-yc1sX7Gx.js} +7 -6
  37. package/dist/{pluralkit-9EuEN4UD.js → pluralkit-B3cUVI7i.js} +2 -2
  38. package/dist/{probe-n6ZXxK8V.js → probe-3ovFAp3b.js} +3 -3
  39. package/dist/{probe.runtime-CN4bdPfZ.js → probe.runtime-BckHn3cJ.js} +1 -1
  40. package/dist/{provider-LXiOcJrH.js → provider-CjI8BSzS.js} +97 -76
  41. package/dist/{provider-session.runtime-DSNe7r2W.js → provider-session.runtime-DdKRMcE9.js} +3 -3
  42. package/dist/provider.runtime-Bo1WbLLr.js +2 -0
  43. package/dist/{realtime-session.runtime-DOViOIjY.js → realtime-session.runtime-37IC-p5K.js} +5 -5
  44. package/dist/{resolve-allowlist-common-BLoYaxEG.js → resolve-allowlist-common-BJ5UZNNT.js} +3 -3
  45. package/dist/{resolve-channels-D2yl_2CN.js → resolve-channels-BexR2eUn.js} +4 -4
  46. package/dist/{resolve-users-BLxfqajZ.js → resolve-users-BtXBCH5W.js} +5 -4
  47. package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
  48. package/dist/{retry-DqHCW6PV.js → retry-t5RcEsPk.js} +37 -29
  49. package/dist/{runtime-DrxVBTtp.js → runtime-BNlDfLwS.js} +2 -2
  50. package/dist/{runtime-BYamRVPN.js → runtime-DydyfxST.js} +126 -92
  51. package/dist/runtime-api.js +19 -19
  52. package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
  53. package/dist/secret-contract-api.js +1 -1
  54. package/dist/{send-UJHiAm4C.js → send-mTKSBdmZ.js} +76 -48
  55. package/dist/{send.components-CrBJpGT_.js → send.components-nsPnc7kK.js} +20 -14
  56. package/dist/{send.outbound-D7JYmfm9.js → send.outbound-CaOs9Zy1.js} +34 -20
  57. package/dist/{send.shared-DZJ1akvQ.js → send.shared-BJHt0Vyf.js} +24 -17
  58. package/dist/{sender-identity-BJtfyise.js → sender-identity-Dt0imZyY.js} +1 -1
  59. package/dist/setup-plugin-api.js +1 -1
  60. package/dist/{shared-Dii2HTn7.js → shared-BNesVA4P.js} +17 -14
  61. package/dist/{subagent-hooks-JyGrtQIl.js → subagent-hooks-IeZVPLGj.js} +2 -2
  62. package/dist/subagent-hooks-api.js +1 -1
  63. package/dist/{system-events-BEmcj4xJ.js → system-events-Be5EJI3b.js} +2 -2
  64. package/dist/{target-resolver-V-IYae6s.js → target-resolver-C0MnwEki.js} +6 -5
  65. package/dist/targets-DQSye1Rv.js +3 -0
  66. package/dist/{thread-bindings-DvYP79fy.js → thread-bindings-wECUSIIG.js} +6 -5
  67. package/dist/{thread-bindings.manager-Clm77DBM.js → thread-bindings.manager-B-3UHCc1.js} +28 -25
  68. package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-CC7HoQvt.js} +2 -1
  69. package/dist/{threading-CXuu_7o9.js → threading-te5ADPQI.js} +8 -6
  70. package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
  71. package/dist/{transcripts-source-BLEMH_yi.js → transcripts-source-DkUhR7YK.js} +3 -3
  72. package/dist/transcripts-source-api.js +1 -1
  73. package/dist/{typing-B9snnwMe.js → typing-DAwJF5VT.js} +2 -2
  74. package/dist/{voice-runtime-DY6_o73o.js → voice-runtime-COyYYTDD.js} +348 -14
  75. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
  76. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
  77. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
  78. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
  80. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
  81. package/node_modules/typebox/build/format/email.mjs +1 -1
  82. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  83. package/node_modules/typebox/package.json +1 -1
  84. package/openclaw.plugin.json +2 -2
  85. package/package.json +5 -5
  86. package/dist/account-inspect-BDfKyuvL.js +0 -89
  87. package/dist/provider.runtime-DiInaDXO.js +0 -2
  88. package/dist/sdk-runtime-6tfgYDjY.js +0 -338
  89. package/dist/targets-CQp53cGj.js +0 -3
@@ -1,20 +1,20 @@
1
- import { Dt as deleteChannelMessage, a as chunkDiscordTextWithMode, kt as editChannelMessage, v as resolveDiscordChannelId, wt as createChannelMessage, y as discord_exports } from "./retry-DqHCW6PV.js";
2
- import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CfQ-vSyf.js";
3
- import { C as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-BDMimASD.js";
4
- import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-DZJ1akvQ.js";
5
- import { i as discordTextHasBroadcastMention } from "./send.outbound-D7JYmfm9.js";
6
- import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-UJHiAm4C.js";
7
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
8
- import "./targets-CQp53cGj.js";
9
- import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Bn4uXaoE.js";
10
- import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-Dif8p481.js";
11
- import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-LXiOcJrH.js";
12
- import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-Ca8M6TU8.js";
13
- import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-CXuu_7o9.js";
14
- import { n as resolveDiscordWebhookId } from "./sender-identity-BJtfyise.js";
1
+ import { Dt as deleteChannelMessage, a as chunkDiscordTextWithMode, kt as editChannelMessage, v as resolveDiscordChannelId, wt as createChannelMessage, y as discord_exports } from "./retry-t5RcEsPk.js";
2
+ import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
3
+ import { C as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-C2JuH-R0.js";
4
+ import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-BJHt0Vyf.js";
5
+ import { i as discordTextHasBroadcastMention } from "./send.outbound-CaOs9Zy1.js";
6
+ import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-mTKSBdmZ.js";
7
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
8
+ import "./targets-DQSye1Rv.js";
9
+ import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-CzzerX2K.js";
10
+ import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-Ch0At5Ra.js";
11
+ import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-CjI8BSzS.js";
12
+ import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-C0K4-fkg.js";
13
+ import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-te5ADPQI.js";
14
+ import { n as resolveDiscordWebhookId } from "./sender-identity-Dt0imZyY.js";
15
15
  import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.js";
16
16
  import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
17
- import { t as sendTyping } from "./typing-B9snnwMe.js";
17
+ import { t as sendTyping } from "./typing-DAwJF5VT.js";
18
18
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
19
19
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
20
20
  import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
@@ -24,7 +24,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
24
24
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
25
25
  import { resolveChunkMode } from "openclaw/plugin-sdk/reply-chunking";
26
26
  import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
27
- import { bindIngressLifecycleToReplyOptions, buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createFinalizableDraftStreamControlsForState, createTypingCallbacks, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelDraftStreamingChunking, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewCommandText, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingProgressNarration, resolveChannelStreamingSuppressDefaultToolProgressMessages, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
27
+ import { bindIngressLifecycleToReplyOptions, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createFinalizableDraftStreamControlsForState, createTypingCallbacks, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelDraftStreamingChunking, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewCommandText, resolveChannelStreamingProgressNarration, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
28
28
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
29
29
  import { evaluateSupplementalContextVisibility } from "openclaw/plugin-sdk/security-runtime";
30
30
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
@@ -37,7 +37,7 @@ import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
37
37
  import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
38
38
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
39
39
  import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
40
- import { DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
40
+ import { createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
41
41
  import { readLatestAssistantTextByIdentity } from "openclaw/plugin-sdk/session-transcript-runtime";
42
42
  //#region extensions/discord/src/monitor/message-handler.retry.ts
43
43
  const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /^reply session initialization conflicted for \S+$/u;
@@ -116,10 +116,11 @@ async function buildDiscordMessageProcessContext(params) {
116
116
  channel: "discord",
117
117
  accountId
118
118
  });
119
+ const allowNameMatching = isDangerousNameMatchingEnabled(discordConfig);
119
120
  const isSupplementalContextSenderAllowed = createDiscordSupplementalContextAccessChecker({
120
121
  channelConfig,
121
122
  guildInfo,
122
- allowNameMatching: isDangerousNameMatchingEnabled(discordConfig),
123
+ allowNameMatching,
123
124
  isGuild: isGuildMessage
124
125
  });
125
126
  const storePath = resolveStorePath(cfg.session?.store, { agentId: route.agentId });
@@ -202,17 +203,19 @@ async function buildDiscordMessageProcessContext(params) {
202
203
  parentType: threadParentType,
203
204
  resolveTimestampMs
204
205
  });
205
- if (starter?.text) if (evaluateSupplementalContextVisibility({
206
- mode: contextVisibilityMode,
207
- kind: "thread",
208
- senderAllowed: isSupplementalContextSenderAllowed({
209
- id: starter.authorId,
210
- name: starter.authorName ?? starter.author,
211
- tag: starter.authorTag,
212
- memberRoleIds: starter.memberRoleIds
213
- })
214
- }).include) threadStarterBody = starter.text;
215
- else logVerbose(`discord: drop thread starter context (mode=${contextVisibilityMode})`);
206
+ if (starter?.text) {
207
+ if (evaluateSupplementalContextVisibility({
208
+ mode: contextVisibilityMode,
209
+ kind: "thread",
210
+ senderAllowed: isSupplementalContextSenderAllowed({
211
+ id: starter.authorId,
212
+ name: starter.authorName ?? starter.author,
213
+ tag: starter.authorTag,
214
+ memberRoleIds: starter.memberRoleIds
215
+ })
216
+ }).include) threadStarterBody = starter.text;
217
+ else logVerbose(`discord: drop thread starter context (mode=${contextVisibilityMode})`);
218
+ }
216
219
  }
217
220
  const parentName = threadParentName ?? "parent";
218
221
  threadLabel = threadName ? `Discord thread #${normalizeDiscordSlug(parentName)} › ${threadName}` : `Discord thread #${normalizeDiscordSlug(parentName)}`;
@@ -650,15 +653,13 @@ function createDiscordMessageReactionRuntime(params) {
650
653
  messageId: message.id,
651
654
  reactionContext: ackReactionContext
652
655
  });
653
- const statusReactionTiming = DEFAULT_TIMING;
654
656
  let statusReactionTarget = `${messageChannelId}/${message.id}`;
655
657
  let statusReactionsActive = statusReactionsEnabled;
656
658
  let statusReactions = createStatusReactionController({
657
659
  enabled: statusReactionsEnabled,
658
660
  adapter: discordAdapter,
659
661
  initialEmoji: ackReaction,
660
- emojis: void 0,
661
- timing: statusReactionTiming,
662
+ presentation: "acknowledgement",
662
663
  onError: (err) => {
663
664
  logAckFailure({
664
665
  log: logVerbose,
@@ -711,8 +712,7 @@ function createDiscordMessageReactionRuntime(params) {
711
712
  reactionContext: ackReactionContext
712
713
  }),
713
714
  initialEmoji: emoji,
714
- emojis: void 0,
715
- timing: statusReactionTiming,
715
+ presentation: "acknowledgement",
716
716
  onError: (err) => {
717
717
  logAckFailure({
718
718
  log: logVerbose,
@@ -859,6 +859,7 @@ function createDiscordDraftStream(params) {
859
859
  };
860
860
  const { loop, update, stop, discardPending, seal } = createFinalizableDraftStreamControlsForState({
861
861
  throttleMs,
862
+ coalesceInFlight: true,
862
863
  state: streamState,
863
864
  sendOrEditStreamMessage
864
865
  });
@@ -990,24 +991,17 @@ function createDiscordDraftPreviewController(params) {
990
991
  let progressDraftStartedBeforeFinal = false;
991
992
  let progressDraftCollapsed = false;
992
993
  let progressNarratorLifecycle;
993
- const previewToolProgressEnabled = Boolean(draftStream) && resolveChannelStreamingPreviewToolProgress(params.discordConfig, true, discordStreamMode);
994
994
  const narrationProgressEnabled = Boolean(draftStream) && discordStreamMode === "progress" && resolveChannelStreamingProgressNarration(params.discordConfig);
995
995
  const narrationHideCommandText = narrationProgressEnabled && resolveChannelStreamingPreviewCommandText(params.discordConfig) === "status";
996
- const suppressDefaultToolProgressMessages = Boolean(draftStream) && resolveChannelStreamingSuppressDefaultToolProgressMessages(params.discordConfig, {
997
- draftStreamActive: true,
998
- previewToolProgressEnabled
999
- });
1000
996
  const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
1001
997
  const progressDraft = createChannelProgressDraftCompositor({
998
+ presentation: discordStreamMode === "progress" ? "summary" : void 0,
1002
999
  entry: params.discordConfig,
1003
1000
  mode: discordStreamMode,
1004
1001
  active: Boolean(draftStream),
1005
1002
  seed: progressSeed,
1006
1003
  reasoningLinePrefix: "🧠 ",
1007
- commentaryLinePrefix: "💬 ",
1008
- reasoningGate: previewToolProgressEnabled,
1009
1004
  commentaryItalics: false,
1010
- buildProgressEventLine: (input, options) => input.event === "tool" || input.event === "item" || input.event === "command-output" ? buildChannelProgressDraftLineForEntry(params.discordConfig, input, options) : buildChannelProgressDraftLine(input, options),
1011
1005
  update: async (previewText, options) => {
1012
1006
  if (!draftStream) return false;
1013
1007
  lastPartialText = previewText;
@@ -1040,10 +1034,6 @@ function createDiscordDraftPreviewController(params) {
1040
1034
  }
1041
1035
  resetProgressState();
1042
1036
  };
1043
- const pushPreambleHeadline = async (text, options) => {
1044
- if (discordStreamMode === "progress") return await progressDraft.pushPreambleHeadline(text, options);
1045
- return false;
1046
- };
1047
1037
  const beginNewProgressTurn = (options) => {
1048
1038
  const beganNewTurn = progressDraft.beginNewTurn(options);
1049
1039
  if (beganNewTurn) {
@@ -1060,11 +1050,10 @@ function createDiscordDraftPreviewController(params) {
1060
1050
  };
1061
1051
  return {
1062
1052
  draftStream,
1063
- previewToolProgressEnabled,
1064
1053
  narrationProgressEnabled,
1065
1054
  narrationHideCommandText,
1066
1055
  commentaryProgressEnabled: progressDraft.commentaryProgressEnabled,
1067
- suppressDefaultToolProgressMessages,
1056
+ suppressDefaultToolProgressMessages: progressDraft.suppressDefaultToolProgressMessages,
1068
1057
  get isProgressMode() {
1069
1058
  return discordStreamMode === "progress";
1070
1059
  },
@@ -1115,31 +1104,18 @@ function createDiscordDraftPreviewController(params) {
1115
1104
  disableBlockStreamingForDraft: draftStream ? true : void 0,
1116
1105
  pushToolEvent: progressDraft.pushToolEvent,
1117
1106
  pushItemEvent: progressDraft.pushItemEvent,
1118
- pushApprovalEvent: progressDraft.pushApprovalEvent,
1107
+ pushApprovalEvent: progressDraft.pushApprovalEvent.bind(progressDraft),
1119
1108
  pushCommandOutputEvent: progressDraft.pushCommandOutputEvent,
1120
1109
  pushPatchEvent: progressDraft.pushPatchEvent,
1121
- async pushToolProgress(line, options) {
1122
- return await progressDraft.pushToolProgress(line, options);
1123
- },
1124
- async pushPlanProgress(steps, options) {
1125
- return await progressDraft.pushPlanProgress(steps, options);
1126
- },
1127
- async pushReasoningProgress(text, options) {
1128
- return await progressDraft.pushReasoningProgress(text, options);
1129
- },
1130
- async pushNarrationProgress(text) {
1131
- return await progressDraft.pushNarrationProgress(text);
1132
- },
1133
- pushPreambleHeadline,
1110
+ pushPlanProgress: progressDraft.pushPlanProgress.bind(progressDraft),
1111
+ pushReasoningProgress: progressDraft.pushReasoningProgress.bind(progressDraft),
1112
+ pushNarrationProgress: progressDraft.pushNarrationProgress.bind(progressDraft),
1134
1113
  async pushPreambleItemEvent(payload) {
1135
- const headlineAccepted = await pushPreambleHeadline(payload.progressText, { itemId: payload.itemId });
1114
+ const headlineAccepted = await progressDraft.pushPreambleHeadline(payload.progressText, { itemId: payload.itemId });
1136
1115
  if (!progressDraft.commentaryProgressEnabled) return headlineAccepted;
1137
1116
  const commentaryAccepted = await progressDraft.pushCommentaryProgress(payload.progressText, { itemId: payload.itemId });
1138
1117
  return headlineAccepted || commentaryAccepted;
1139
1118
  },
1140
- async pushCommentaryProgress(text, options) {
1141
- return await progressDraft.pushCommentaryProgress(text, options);
1142
- },
1143
1119
  resolvePreviewFinalText(text) {
1144
1120
  if (typeof text !== "string") return;
1145
1121
  const formatted = convertMarkdownTables(stripInlineDirectiveTagsForDelivery(text).text, params.tableMode);
@@ -1236,7 +1212,7 @@ function shouldStartDiscordProgressDraftNow(line) {
1236
1212
  }
1237
1213
  //#endregion
1238
1214
  //#region extensions/discord/src/monitor/reply-typing-feedback.ts
1239
- const DISCORD_REPLY_TYPING_MAX_DURATION_MS = 20 * 6e4;
1215
+ const DISCORD_REPLY_TYPING_MAX_DURATION_MS = 12e5;
1240
1216
  function createDiscordReplyTypingFeedback(params) {
1241
1217
  const rest = params.rest ?? createDiscordRestClient({
1242
1218
  cfg: params.cfg,
@@ -1569,8 +1545,9 @@ async function processDiscordMessageInner(ctx, observer) {
1569
1545
  const raw = (payload.text ?? "").trim();
1570
1546
  const body = raw.startsWith("Reasoning:\n") ? raw.slice(11).trim() : raw;
1571
1547
  if (!body) return { visibleReplySent: false };
1548
+ const chunkLimit = Math.max(256, Math.min(textLimit, 2e3) - 8);
1572
1549
  const chunks = chunkDiscordTextWithMode(body, {
1573
- maxChars: Math.max(256, Math.min(textLimit, 2e3) - 8),
1550
+ maxChars: chunkLimit,
1574
1551
  maxLines: maxLinesPerMessage,
1575
1552
  chunkMode
1576
1553
  });
@@ -1598,7 +1575,8 @@ async function processDiscordMessageInner(ctx, observer) {
1598
1575
  mediaLocalRoots,
1599
1576
  kind: "block",
1600
1577
  bindPendingFinalDelivery: info.bindPendingFinalDelivery,
1601
- onPlatformSendDispatch: info.onPlatformSendDispatch
1578
+ onPlatformSendDispatch: info.onPlatformSendDispatch,
1579
+ assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
1602
1580
  });
1603
1581
  if (result.visibleReplySent) replyReference.markSent();
1604
1582
  return result;
@@ -1615,10 +1593,11 @@ async function processDiscordMessageInner(ctx, observer) {
1615
1593
  finalText: payload.text,
1616
1594
  resolveCandidateText: resolveCurrentTurnTranscriptFinalText
1617
1595
  }) : payload.text;
1618
- const [deliverablePayload] = sanitizeDiscordFrontChannelReplyPayloads([finalText !== payload.text ? {
1596
+ const effectivePayload = finalText !== payload.text ? {
1619
1597
  ...payload,
1620
1598
  text: finalText
1621
- } : payload], { kind: info.kind });
1599
+ } : payload;
1600
+ const [deliverablePayload] = sanitizeDiscordFrontChannelReplyPayloads([effectivePayload], { kind: info.kind });
1622
1601
  if (!deliverablePayload) {
1623
1602
  logVerbose(formatDiscordReplySkip({
1624
1603
  kind: info.kind,
@@ -1698,7 +1677,8 @@ async function processDiscordMessageInner(ctx, observer) {
1698
1677
  allowedMentions,
1699
1678
  kind: info.kind,
1700
1679
  bindPendingFinalDelivery: info.bindPendingFinalDelivery,
1701
- onPlatformSendDispatch: info.onPlatformSendDispatch
1680
+ onPlatformSendDispatch: info.onPlatformSendDispatch,
1681
+ assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
1702
1682
  })).visibleReplySent;
1703
1683
  },
1704
1684
  onNormalDelivered: () => {
@@ -1737,7 +1717,8 @@ async function processDiscordMessageInner(ctx, observer) {
1737
1717
  mediaLocalRoots,
1738
1718
  kind: info.kind,
1739
1719
  bindPendingFinalDelivery: info.bindPendingFinalDelivery,
1740
- onPlatformSendDispatch: info.onPlatformSendDispatch
1720
+ onPlatformSendDispatch: info.onPlatformSendDispatch,
1721
+ assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
1741
1722
  });
1742
1723
  if (!result.visibleReplySent) return result;
1743
1724
  replyReference.markSent();
@@ -1857,7 +1838,8 @@ async function processDiscordMessageInner(ctx, observer) {
1857
1838
  dispatchError = true;
1858
1839
  if (await completeDiscordSessionConflict(err, (payload, info) => deliverDiscordPayload(payload, {
1859
1840
  ...info,
1860
- onPlatformSendDispatch: () => Promise.resolve()
1841
+ onPlatformSendDispatch: () => Promise.resolve(),
1842
+ assertPlatformSendAuthorized: () => void 0
1861
1843
  }), onDiscordDeliveryError)) return;
1862
1844
  throw err;
1863
1845
  } finally {
@@ -1,4 +1,4 @@
1
- import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-Clm77DBM.js";
1
+ import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-B-3UHCc1.js";
2
2
  import { ComponentType, StickerFormatType } from "discord-api-types/v10";
3
3
  import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -11,8 +11,8 @@ import { formatMediaPlaceholderText } from "openclaw/plugin-sdk/channel-inbound"
11
11
  const discordChannelInfoCacheState = { entries: /* @__PURE__ */ new Map() };
12
12
  //#endregion
13
13
  //#region extensions/discord/src/monitor/message-channel-info.ts
14
- const DISCORD_CHANNEL_INFO_CACHE_TTL_MS = 300 * 1e3;
15
- const DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS = 30 * 1e3;
14
+ const DISCORD_CHANNEL_INFO_CACHE_TTL_MS = 3e5;
15
+ const DISCORD_CHANNEL_INFO_NEGATIVE_CACHE_TTL_MS = 3e4;
16
16
  const DISCORD_CHANNEL_INFO_CACHE_MAX_ENTRIES = 1e3;
17
17
  function resolveDiscordChannelInfoCacheExpiresAt(ttlMs, nowMs) {
18
18
  return resolveExpiresAtMsFromDurationMs(ttlMs, { nowMs });
@@ -131,6 +131,11 @@ function resolveDiscordReferencedReplyMessage(message) {
131
131
  const referenceType = message.messageReference?.type;
132
132
  return Number(referenceType) === FORWARD_MESSAGE_REFERENCE_TYPE ? null : message.referencedMessage ?? null;
133
133
  }
134
+ function resolveDiscordReferencedReplyMessageId(message) {
135
+ const referenceType = message.messageReference?.type;
136
+ if (Number(referenceType) === FORWARD_MESSAGE_REFERENCE_TYPE) return null;
137
+ return normalizeOptionalString(message.messageReference?.message_id) ?? normalizeOptionalString(message.referencedMessage?.id) ?? null;
138
+ }
134
139
  function formatDiscordSnapshotAuthor(author) {
135
140
  if (!author) return;
136
141
  const globalName = normalizeOptionalString(author.global_name) ?? void 0;
@@ -563,4 +568,4 @@ function resolveDiscordSnapshotMessageText(snapshot) {
563
568
  return [content || embedText || componentText, attachmentText].filter(Boolean).join("\n");
564
569
  }
565
570
  //#endregion
566
- export { formatDiscordMediaText as a, resolveReferencedReplyMediaList as c, resolveDiscordCdnPolicy as d, resolveDiscordChannelInfo as f, resolveDiscordMessageText as i, hasDiscordMessageStickers as l, resolveDiscordForwardedMessagesTextFromSnapshots as n, resolveForwardedMediaList as o, resolveDiscordMessageChannelId as p, resolveDiscordMessageHistoryText as r, resolveMediaList as s, resolveDiscordEmbedText as t, resolveDiscordMessageStickers as u };
571
+ export { formatDiscordMediaText as a, resolveReferencedReplyMediaList as c, resolveDiscordReferencedReplyMessage as d, resolveDiscordReferencedReplyMessageId as f, resolveDiscordMessageChannelId as h, resolveDiscordMessageText as i, hasDiscordMessageStickers as l, resolveDiscordChannelInfo as m, resolveDiscordForwardedMessagesTextFromSnapshots as n, resolveForwardedMediaList as o, resolveDiscordCdnPolicy as p, resolveDiscordMessageHistoryText as r, resolveMediaList as s, resolveDiscordEmbedText as t, resolveDiscordMessageStickers as u };
@@ -1,7 +1,7 @@
1
- import { a as chunkDiscordTextWithMode, f as resolveDiscordReplyReference, g as normalizeDiscordOutboundTarget, l as toDiscordOutboundDeliveryResult, o as createDiscordSendReceipt, r as hasDiscordMessageCreateAmbiguity, s as createDiscordSendReceiptFromResults } from "./retry-DqHCW6PV.js";
2
- import { t as createDiscordActionGate } from "./accounts-CfQ-vSyf.js";
3
- import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-Bn4uXaoE.js";
4
- import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-wjv7yyAj.js";
1
+ import { a as chunkDiscordTextWithMode, f as resolveDiscordReplyReference, g as normalizeDiscordOutboundTarget, l as toDiscordOutboundDeliveryResult, o as createDiscordSendReceipt, r as hasDiscordMessageCreateAmbiguity, s as createDiscordSendReceiptFromResults } from "./retry-t5RcEsPk.js";
2
+ import { t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
3
+ import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-CzzerX2K.js";
4
+ import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-Bnt_7x7r.js";
5
5
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
@@ -33,7 +33,8 @@ function normalizeMediaPathForExtension(mediaUrl) {
33
33
  }
34
34
  } catch {
35
35
  const withoutHash = trimmed.split("#", 1)[0] ?? trimmed;
36
- return normalizeLowercaseStringOrEmpty(withoutHash.split("?", 1)[0] ?? withoutHash);
36
+ const withoutQuery = withoutHash.split("?", 1)[0] ?? withoutHash;
37
+ return normalizeLowercaseStringOrEmpty(withoutQuery);
37
38
  }
38
39
  }
39
40
  function isLikelyDiscordVideoMedia(mediaUrl) {
@@ -59,7 +60,7 @@ function normalizeDiscordApprovalPayload(payload) {
59
60
  }
60
61
  //#endregion
61
62
  //#region extensions/discord/src/outbound-send-context.ts
62
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-UJHiAm4C.js").then((n) => n.t));
63
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-mTKSBdmZ.js").then((n) => n.t));
63
64
  function resolveDiscordOutboundTarget(params) {
64
65
  if (params.threadId == null) return params.to;
65
66
  const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
@@ -113,7 +114,8 @@ function resolveDiscordDeliveryOptions(ctx, sendContext, reply = sendContext.res
113
114
  accountId: ctx.accountId ?? void 0,
114
115
  silent: ctx.silent ?? void 0,
115
116
  cfg: ctx.cfg,
116
- onPlatformSendDispatch: ctx.onPlatformSendDispatch
117
+ onPlatformSendDispatch: ctx.onPlatformSendDispatch,
118
+ assertPlatformSendAuthorized: ctx.assertDirectAdapterHandoff
117
119
  };
118
120
  }
119
121
  function resolveDiscordFormattedDeliveryOptions(ctx, sendContext, reply = sendContext.resolveReply()) {
@@ -278,8 +280,8 @@ async function sendDiscordOutboundPayload(params) {
278
280
  //#region extensions/discord/src/outbound-adapter.ts
279
281
  const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
280
282
  const log = createSubsystemLogger("discord/outbound");
281
- const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-DvYP79fy.js").then((n) => n.t));
282
- const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-CrBJpGT_.js").then((n) => n.i));
283
+ const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-wECUSIIG.js").then((n) => n.t));
284
+ const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-nsPnc7kK.js").then((n) => n.i));
283
285
  function resolveDiscordWebhookIdentity(params) {
284
286
  const usernameRaw = normalizeOptionalString(params.identity?.name);
285
287
  const fallbackUsername = normalizeOptionalString(params.binding.label) ?? params.binding.agentId;
@@ -311,7 +313,8 @@ async function maybeSendDiscordWebhookText(params) {
311
313
  replyTo: params.replyToId ?? void 0,
312
314
  username: persona.username,
313
315
  avatarUrl: persona.avatarUrl,
314
- onPlatformSendDispatch: params.onPlatformSendDispatch
316
+ onPlatformSendDispatch: params.onPlatformSendDispatch,
317
+ assertPlatformSendAuthorized: params.assertPlatformSendAuthorized
315
318
  });
316
319
  }
317
320
  async function resolveDiscordOutboundMessageSend(params) {
@@ -337,7 +340,8 @@ async function resolveDiscordOutboundMessageSend(params) {
337
340
  onDeliveryResult: params.onDeliveryResult ? async (result) => {
338
341
  await params.onDeliveryResult?.(attachChannelToResult("discord", toDiscordOutboundDeliveryResult(result)));
339
342
  } : void 0,
340
- onPlatformSendDispatch: params.onPlatformSendDispatch
343
+ onPlatformSendDispatch: params.onPlatformSendDispatch,
344
+ assertPlatformSendAuthorized: params.assertDirectAdapterHandoff
341
345
  }
342
346
  };
343
347
  }
@@ -388,7 +392,8 @@ const discordOutbound = {
388
392
  onPlatformSendDispatch: ctx.onPlatformSendDispatch ? async () => {
389
393
  webhookSelected = true;
390
394
  await ctx.onPlatformSendDispatch?.();
391
- } : void 0
395
+ } : void 0,
396
+ assertPlatformSendAuthorized: ctx.assertDirectAdapterHandoff
392
397
  });
393
398
  if (webhookResult) return toDiscordOutboundDeliveryResult(webhookResult);
394
399
  } catch (error) {
@@ -401,16 +406,20 @@ const discordOutbound = {
401
406
  },
402
407
  sendMedia: async (ctx) => {
403
408
  const { send, target, options } = await resolveDiscordOutboundMessageSend(ctx);
404
- if (ctx.audioAsVoice && ctx.mediaUrl) return toDiscordOutboundDeliveryResult(await (resolveOutboundSendDep(ctx.deps, "discordVoice") ?? (await loadDiscordSendRuntime()).sendVoiceMessageDiscord)(target, ctx.mediaUrl, {
405
- cfg: ctx.cfg,
406
- reply: options.reply,
407
- accountId: ctx.accountId ?? void 0,
408
- silent: ctx.silent ?? void 0,
409
- mediaAccess: ctx.mediaAccess,
410
- mediaLocalRoots: ctx.mediaLocalRoots,
411
- mediaReadFile: ctx.mediaReadFile,
412
- onPlatformSendDispatch: ctx.onPlatformSendDispatch
413
- }));
409
+ if (ctx.audioAsVoice && ctx.mediaUrl) {
410
+ const sendVoice = resolveOutboundSendDep(ctx.deps, "discordVoice") ?? (await loadDiscordSendRuntime()).sendVoiceMessageDiscord;
411
+ return toDiscordOutboundDeliveryResult(await sendVoice(target, ctx.mediaUrl, {
412
+ cfg: ctx.cfg,
413
+ reply: options.reply,
414
+ accountId: ctx.accountId ?? void 0,
415
+ silent: ctx.silent ?? void 0,
416
+ mediaAccess: ctx.mediaAccess,
417
+ mediaLocalRoots: ctx.mediaLocalRoots,
418
+ mediaReadFile: ctx.mediaReadFile,
419
+ onPlatformSendDispatch: ctx.onPlatformSendDispatch,
420
+ assertPlatformSendAuthorized: ctx.assertDirectAdapterHandoff
421
+ }));
422
+ }
414
423
  const mediaOptions = {
415
424
  ...options,
416
425
  mediaUrl: ctx.mediaUrl,
@@ -435,7 +444,7 @@ const discordOutbound = {
435
444
  }
436
445
  return toDiscordOutboundDeliveryResult(await send(target, ctx.text, mediaOptions));
437
446
  },
438
- sendPoll: async ({ cfg, to, poll, content, accountId, threadId, silent, sessionKey, inboundEventKind, onPlatformSendDispatch }) => {
447
+ sendPoll: async ({ cfg, to, poll, content, accountId, threadId, silent, sessionKey, inboundEventKind, onPlatformSendDispatch, assertDirectAdapterHandoff }) => {
439
448
  if (!createDiscordActionGate({
440
449
  cfg,
441
450
  accountId
@@ -450,7 +459,8 @@ const discordOutbound = {
450
459
  threadId: threadId ?? void 0,
451
460
  silent: silent ?? void 0,
452
461
  cfg,
453
- onPlatformSendDispatch
462
+ onPlatformSendDispatch,
463
+ assertPlatformSendAuthorized: assertDirectAdapterHandoff
454
464
  });
455
465
  discordInboundEventDelivery.notify({
456
466
  sessionKey,
@@ -1,4 +1,4 @@
1
- import { h as readDiscordComponentSpec } from "./components-Dk35LTf_.js";
1
+ import { h as readDiscordComponentSpec } from "./components-gvRA0oaI.js";
2
2
  import { resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
3
3
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  //#region extensions/discord/src/outbound-components.ts
@@ -31,11 +31,11 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
31
31
  }
32
32
  }
33
33
  };
34
- const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-CrBJpGT_.js").then((n) => n.i), "sendDiscordComponentMessage");
34
+ const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-nsPnc7kK.js").then((n) => n.i), "sendDiscordComponentMessage");
35
35
  async function sendDiscordComponentMessageLazy(...args) {
36
36
  return await (await loadDiscordComponentSend())(...args);
37
37
  }
38
- const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-Dk35LTf_.js").then((n) => n.a));
38
+ const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-gvRA0oaI.js").then((n) => n.a));
39
39
  function addPayloadTextFallback(spec, payload) {
40
40
  return spec.text ? spec : {
41
41
  ...spec,
@@ -1,7 +1,7 @@
1
- import { _ as parseDiscordTarget, h as normalizeDiscordMessagingTarget } from "./retry-DqHCW6PV.js";
2
- import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-Dk35LTf_.js";
3
- import { c as resolveDiscordAccount, r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-CfQ-vSyf.js";
4
- import { t as inspectDiscordAccount } from "./account-inspect-BDfKyuvL.js";
1
+ import { _ as parseDiscordTarget, h as normalizeDiscordMessagingTarget } from "./retry-t5RcEsPk.js";
2
+ import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-gvRA0oaI.js";
3
+ import { c as resolveDiscordAccount, r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
4
+ import { t as inspectDiscordAccount } from "./account-inspect-BY-ve3yH.js";
5
5
  import { ChannelType } from "discord-api-types/v10";
6
6
  import { Type } from "typebox";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -43,8 +43,9 @@ function getDiscordExecApprovalApprovers(params) {
43
43
  });
44
44
  }
45
45
  function isDiscordExecApprovalClientEnabled(params) {
46
+ const config = params.configOverride ?? resolveDiscordAccount(params).config.execApprovals;
46
47
  return isChannelExecApprovalClientEnabledFromConfig({
47
- enabled: (params.configOverride ?? resolveDiscordAccount(params).config.execApprovals)?.enabled,
48
+ enabled: config?.enabled,
48
49
  approverCount: getDiscordExecApprovalApprovers({
49
50
  cfg: params.cfg,
50
51
  accountId: params.accountId,
@@ -201,7 +202,9 @@ function withDiscordInboundEventDeliveryMetadata(payload, params) {
201
202
  };
202
203
  }
203
204
  function notifyDiscordInboundEventOutboundPayloadSuccess(params) {
204
- const metadata = asOptionalRecord(asOptionalRecord(asOptionalRecord(params.payload.channelData)?.discord)?.[DISCORD_INBOUND_EVENT_DELIVERY_KEY]);
205
+ const channelData = asOptionalRecord(params.payload.channelData);
206
+ const discordData = asOptionalRecord(channelData?.discord);
207
+ const metadata = asOptionalRecord(discordData?.[DISCORD_INBOUND_EVENT_DELIVERY_KEY]);
205
208
  if (!metadata) return;
206
209
  discordInboundEventDelivery.notify({
207
210
  sessionKey: normalizeOptionalString(metadata.sessionKey),
@@ -262,7 +265,7 @@ function matchesCurrentDiscordThread(params) {
262
265
  if (!requestedTarget) return false;
263
266
  return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === requestedTarget);
264
267
  }
265
- const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-UMGGIfSy.js"));
268
+ const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-B2wMqeVK.js"));
266
269
  function listDiscoverableDiscordAccounts(cfg) {
267
270
  return listDiscordAccountIds(cfg).map((accountId) => inspectDiscordAccount({
268
271
  cfg,
@@ -1,5 +1,5 @@
1
- import { l as resolveDiscordAccountAllowFrom } from "./accounts-CfQ-vSyf.js";
2
- import { c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, t as allowListMatches } from "./allow-list-BDMimASD.js";
1
+ import { l as resolveDiscordAccountAllowFrom } from "./accounts-CwJQoLjM.js";
2
+ import { c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, t as allowListMatches } from "./allow-list-C2JuH-R0.js";
3
3
  import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native";
4
4
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
5
5
  //#region extensions/discord/src/voice/access.ts
@@ -9,11 +9,12 @@ async function authorizeDiscordVoiceIngress(params) {
9
9
  groupPolicy: params.discordConfig.groupPolicy,
10
10
  defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
11
11
  }).groupPolicy;
12
+ const guild = params.guild ?? {
13
+ id: params.guildId,
14
+ ...params.guildName ? { name: params.guildName } : {}
15
+ };
12
16
  const guildInfo = resolveDiscordGuildEntry({
13
- guild: params.guild ?? {
14
- id: params.guildId,
15
- ...params.guildName ? { name: params.guildName } : {}
16
- },
17
+ guild,
17
18
  guildId: params.guildId,
18
19
  guildEntries: params.discordConfig.guilds
19
20
  });
@@ -1,11 +1,11 @@
1
- import { on as __exportAll } from "./retry-DqHCW6PV.js";
1
+ import { on as __exportAll } from "./retry-t5RcEsPk.js";
2
2
  import { readProviderJsonObjectResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
3
3
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
4
4
  import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
5
5
  //#region extensions/discord/src/pluralkit.ts
6
6
  var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });
7
7
  const PLURALKIT_API_BASE = "https://api.pluralkit.me/v2";
8
- const PLURALKIT_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
8
+ const PLURALKIT_ERROR_BODY_LIMIT_BYTES = 8192;
9
9
  const PLURALKIT_LOOKUP_TIMEOUT_MS = 1e4;
10
10
  async function fetchPluralKitMessageInfo(params) {
11
11
  if (!params.config?.enabled) return null;
@@ -1,5 +1,5 @@
1
- import { m as normalizeDiscordToken } from "./accounts-CfQ-vSyf.js";
2
- import { n as DiscordApiError, r as fetchDiscord } from "./api-DNVbJyEy.js";
1
+ import { m as normalizeDiscordToken } from "./accounts-CwJQoLjM.js";
2
+ import { n as DiscordApiError, r as fetchDiscord } from "./api-BfmEP6wp.js";
3
3
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
5
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
@@ -7,7 +7,7 @@ import { fetchWithTimeout, runChannelProbe } from "openclaw/plugin-sdk/text-util
7
7
  //#region extensions/discord/src/probe.ts
8
8
  const DISCORD_API_BASE = "https://discord.com/api/v10";
9
9
  const DISCORD_PROBE_GET_ME_LABEL = "discord.probe.getMe";
10
- const DISCORD_PROBE_JSON_MAX_BYTES = 16 * 1024 * 1024;
10
+ const DISCORD_PROBE_JSON_MAX_BYTES = 16777216;
11
11
  const DISCORD_PROBE_COMPLETION_RESERVE_MAX_MS = 25;
12
12
  const DISCORD_APP_FLAG_GATEWAY_PRESENCE = 4096;
13
13
  const DISCORD_APP_FLAG_GATEWAY_PRESENCE_LIMITED = 8192;
@@ -1,2 +1,2 @@
1
- import { a as probeDiscordApplicationId, i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-n6ZXxK8V.js";
1
+ import { a as probeDiscordApplicationId, i as probeDiscord, n as fetchDiscordApplicationSummary, o as resolveDiscordPrivilegedIntentsFromFlags, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-3ovFAp3b.js";
2
2
  export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, probeDiscordApplicationId, resolveDiscordPrivilegedIntentsFromFlags };