@openclaw/discord 2026.6.1 → 2026.6.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -6,7 +6,7 @@ import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./
6
6
  import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-BKGK0ftO.js";
7
7
  import "./targets-Cv797U29.js";
8
8
  import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CEP1KbK0.js";
9
- import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-CXLt6qgK.js";
9
+ import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-rVB2j2W5.js";
10
10
  import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
11
11
  import { t as discordSetupPlugin } from "./channel.setup-BX7g7pL-.js";
12
12
  import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-nBcp0iGm.js";
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-CXLt6qgK.js";
1
+ import { t as discordPlugin } from "./channel-rVB2j2W5.js";
2
2
  export { discordPlugin };
@@ -131,7 +131,7 @@ const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./re
131
131
  const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-CRc4hYr1.js").then((n) => n.a));
132
132
  const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-BKGK0ftO.js").then((n) => n.r));
133
133
  async function loadDiscordProviderRuntime() {
134
- discordProviderRuntimePromise ??= import("./provider.runtime-D8AxhXYN.js");
134
+ discordProviderRuntimePromise ??= import("./provider.runtime-_cUqt2ma.js");
135
135
  return await discordProviderRuntimePromise;
136
136
  }
137
137
  async function loadDiscordProbeRuntime() {
@@ -1,2 +1,11 @@
1
1
  import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-j1bfTue_.js";
2
- export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
2
+ //#region extensions/discord/directory-contract-api.ts
3
+ const discordDirectoryContractPlugin = {
4
+ id: "discord",
5
+ directory: {
6
+ listPeers: listDiscordDirectoryPeersFromConfig,
7
+ listGroups: listDiscordDirectoryGroupsFromConfig
8
+ }
9
+ };
10
+ //#endregion
11
+ export { discordDirectoryContractPlugin, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
@@ -3,7 +3,7 @@ import { c as resolveDiscordAccountAllowFrom } from "./accounts-P19jm1lf.js";
3
3
  import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-C-MqM-B_.js";
4
4
  import { o as formatMention } from "./send.outbound-DhMLobqR.js";
5
5
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
6
- import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-BI4VdnRd.js";
6
+ import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-BzydhoOf.js";
7
7
  import { createRequire } from "node:module";
8
8
  import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
@@ -20,7 +20,7 @@ import { agentCommandFromIngress, getTtsProvider, resolveAgentDir, resolveTtsCon
20
20
  import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
21
21
  import { spawn } from "node:child_process";
22
22
  import { PassThrough, Readable, Transform } from "node:stream";
23
- import { Application, OpusErrorCode, createDecoder, createEncoder, isOpusError } from "libopus-wasm";
23
+ import { Application, OpusError, createDecoder, createEncoder } from "libopus-wasm";
24
24
  import { resolveRealtimeBootstrapContextInstructions } from "openclaw/plugin-sdk/realtime-bootstrap-context";
25
25
  import { parseTtsDirectives } from "openclaw/plugin-sdk/speech";
26
26
  //#region extensions/discord/src/voice/audio.ts
@@ -1588,6 +1588,7 @@ const DECRYPT_FAILURE_RECONNECT_THRESHOLD = 3;
1588
1588
  const DECRYPT_FAILURE_MARKER = "DecryptionFailed(";
1589
1589
  const DAVE_PASSTHROUGH_DISABLED_MARKER = "UnencryptedWhenPassthroughDisabled";
1590
1590
  const WASM_MEMORY_ACCESS_MARKER = "memory access out of bounds";
1591
+ const OPUS_INVALID_PACKET_CODE = -4;
1591
1592
  function createVoiceReceiveRecoveryState() {
1592
1593
  return {
1593
1594
  decryptFailureCount: 0,
@@ -1602,7 +1603,11 @@ function isAbortLikeReceiveError(err) {
1602
1603
  return name === "AbortError" || message === "Premature close" || message.includes("The operation was aborted") || message.includes("aborted");
1603
1604
  }
1604
1605
  function isOpusDecodeInvalidPacketError(err) {
1605
- return isOpusError(err) && err.code === OpusErrorCode.InvalidPacket && (err.operation === "decode" || err.operation === "decodeFloat");
1606
+ if (!err || typeof err !== "object") return false;
1607
+ const maybeOpusError = err;
1608
+ const isDecodeOperation = maybeOpusError.operation === "decode" || maybeOpusError.operation === "decodeFloat";
1609
+ const isInvalidPacket = maybeOpusError.code === OPUS_INVALID_PACKET_CODE || maybeOpusError.codeName === "InvalidPacket";
1610
+ return isDecodeOperation && isInvalidPacket && (err instanceof OpusError || maybeOpusError.name === "OpusError");
1606
1611
  }
1607
1612
  function analyzeVoiceReceiveError(err) {
1608
1613
  const message = formatErrorMessage(err);
@@ -178,7 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
178
178
  //#region extensions/discord/src/monitor/message-run-queue.ts
179
179
  let messageProcessRuntimePromise;
180
180
  async function loadMessageProcessRuntime() {
181
- messageProcessRuntimePromise ??= import("./message-handler.process-_dPFZ80j.js");
181
+ messageProcessRuntimePromise ??= import("./message-handler.process-fTJCmd5o.js");
182
182
  return await messageProcessRuntimePromise;
183
183
  }
184
184
  async function processDiscordQueuedMessage(params) {
@@ -307,7 +307,7 @@ function createDiscordReplyTypingFeedback(params) {
307
307
  //#region extensions/discord/src/monitor/message-handler.ts
308
308
  let messagePreflightRuntimePromise;
309
309
  async function loadMessagePreflightRuntime() {
310
- messagePreflightRuntimePromise ??= import("./message-handler.preflight-D6YqC67A.js");
310
+ messagePreflightRuntimePromise ??= import("./message-handler.preflight-BwvDbPNH.js");
311
311
  return await messagePreflightRuntimePromise;
312
312
  }
313
313
  function isNonEmptyString(value) {
@@ -5,7 +5,7 @@ import { t as resolveDiscordConversationIdentity } from "./conversation-identity
5
5
  import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-CVLF7gJH.js";
6
6
  import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CfDs1lWu.js";
7
7
  import "./thread-bindings-Tfr_vFxk.js";
8
- import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-BI4VdnRd.js";
8
+ import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-BzydhoOf.js";
9
9
  import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-ZTGvA2L8.js";
10
10
  import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
11
11
  import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -438,7 +438,7 @@ async function loadSystemEventsRuntime() {
438
438
  return await systemEventsRuntimePromise;
439
439
  }
440
440
  async function loadDiscordThreadingRuntime() {
441
- discordThreadingRuntimePromise ??= import("./provider-BI4VdnRd.js").then((n) => n.x);
441
+ discordThreadingRuntimePromise ??= import("./provider-BzydhoOf.js").then((n) => n.S);
442
442
  return await discordThreadingRuntimePromise;
443
443
  }
444
444
  function isPreflightAborted(abortSignal) {
@@ -10,9 +10,9 @@ import { t as beginDiscordInboundEventDeliveryCorrelation } from "./inbound-even
10
10
  import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-Bt6-9M13.js";
11
11
  import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-DXT8oJdo.js";
12
12
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.js";
13
- import { S as resolveDiscordAutoThreadReplyPlan, a as resolveReplyContext, i as buildGuildLabel, m as createDiscordSupplementalContextAccessChecker, n as deliverDiscordReply, p as buildDiscordInboundAccessContext, r as buildDirectLabel, w as resolveDiscordThreadStarter } from "./provider-BI4VdnRd.js";
13
+ import { C as resolveDiscordAutoThreadReplyPlan, T as resolveDiscordThreadStarter, a as buildGuildLabel, h as createDiscordSupplementalContextAccessChecker, i as buildDirectLabel, m as buildDiscordInboundAccessContext, n as deliverDiscordReply, o as resolveReplyContext, r as sanitizeDiscordFrontChannelReplyPayloads } from "./provider-BzydhoOf.js";
14
14
  import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-ZTGvA2L8.js";
15
- import { n as createDiscordReplyTypingFeedback } from "./message-handler-DRzdnJyM.js";
15
+ import { n as createDiscordReplyTypingFeedback } from "./message-handler-BVIAmV5J.js";
16
16
  import { buildAgentSessionKey, normalizeAccountId, resolveAccountEntry, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
17
17
  import { MessageFlags } from "discord-api-types/v10";
18
18
  import path from "node:path";
@@ -24,9 +24,9 @@ import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtim
24
24
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
25
25
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
26
26
  import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
27
- import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftGate, createFinalizableDraftLifecycle, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, normalizeChannelProgressDraftLineIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftMaxLineChars, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingProgressCommentary, resolveChannelStreamingSuppressDefaultToolProgressMessages, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
27
+ import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createFinalizableDraftLifecycle, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
28
28
  import { recordInboundSession, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
29
- import { EmbeddedBlockChunker, formatReasoningMessage, resolveAckReaction, resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
29
+ import { EmbeddedBlockChunker, resolveAckReaction, resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
30
30
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
31
31
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
32
32
  import { loadSessionStore, readLatestAssistantTextFromSessionTranscript, readSessionUpdatedAt, resolveAndPersistSessionFile, resolveSessionStoreEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
@@ -567,61 +567,40 @@ function createDiscordDraftPreviewController(params) {
567
567
  let draftText = "";
568
568
  let hasStreamedMessage = false;
569
569
  let finalizedViaPreviewMessage = false;
570
- let finalReplyStarted = false;
571
570
  let finalReplyDelivered = false;
572
571
  const previewToolProgressEnabled = Boolean(draftStream) && resolveChannelStreamingPreviewToolProgress(params.discordConfig);
573
- const commentaryProgressEnabled = Boolean(draftStream) && resolveChannelStreamingProgressCommentary(params.discordConfig);
574
572
  const suppressDefaultToolProgressMessages = Boolean(draftStream) && resolveChannelStreamingSuppressDefaultToolProgressMessages(params.discordConfig, {
575
573
  draftStreamActive: true,
576
574
  previewToolProgressEnabled
577
575
  });
578
- let previewToolProgressSuppressed = false;
579
- let previewToolProgressLines = [];
580
- let reasoningProgressRawText = "";
581
- let lastReasoningProgressLine;
582
576
  const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
583
- const renderProgressDraft = async (options) => {
584
- if (!draftStream || discordStreamMode !== "progress") return;
585
- const previewText = formatChannelProgressDraftText({
586
- entry: params.discordConfig,
587
- lines: previewToolProgressLines,
588
- seed: progressSeed
589
- });
590
- if (!previewText || previewText === lastPartialText) return;
591
- lastPartialText = previewText;
592
- draftText = previewText;
593
- hasStreamedMessage = true;
594
- draftChunker?.reset();
595
- draftStream.update(previewText);
596
- if (options?.flush) await draftStream.flush();
597
- };
598
- const progressDraftGate = createChannelProgressDraftGate({ onStart: () => renderProgressDraft({ flush: true }) });
599
- const clearProgressDraftLine = async (lineId) => {
600
- const nextLines = previewToolProgressLines.filter((line) => typeof line !== "object" || line.id?.trim() !== lineId);
601
- if (nextLines.length === previewToolProgressLines.length) return;
602
- previewToolProgressLines = nextLines;
603
- if (!progressDraftGate.hasStarted) return;
604
- if (formatChannelProgressDraftText({
605
- entry: params.discordConfig,
606
- lines: previewToolProgressLines,
607
- seed: progressSeed
608
- })) {
609
- await renderProgressDraft();
610
- return;
611
- }
612
- lastPartialText = "";
613
- draftText = "";
614
- hasStreamedMessage = false;
615
- if (draftStream?.messageId()) await draftStream.deleteCurrentMessage();
616
- };
577
+ const progressDraft = createChannelProgressDraftCompositor({
578
+ entry: params.discordConfig,
579
+ mode: discordStreamMode,
580
+ active: Boolean(draftStream),
581
+ seed: progressSeed,
582
+ update: async (previewText, options) => {
583
+ lastPartialText = previewText;
584
+ draftText = previewText;
585
+ hasStreamedMessage = true;
586
+ draftChunker?.reset();
587
+ draftStream?.update(previewText);
588
+ if (options?.flush) await draftStream?.flush();
589
+ },
590
+ deleteCurrent: async () => {
591
+ lastPartialText = "";
592
+ draftText = "";
593
+ hasStreamedMessage = false;
594
+ if (draftStream?.messageId()) await draftStream.deleteCurrentMessage();
595
+ },
596
+ isEmptyLine: isEmptyDiscordProgressLine,
597
+ shouldStartNow: shouldStartDiscordProgressDraftNow
598
+ });
617
599
  const resetProgressState = () => {
618
600
  lastPartialText = "";
619
601
  draftText = "";
620
602
  draftChunker?.reset();
621
- previewToolProgressSuppressed = false;
622
- previewToolProgressLines = [];
623
- reasoningProgressRawText = "";
624
- lastReasoningProgressLine = void 0;
603
+ progressDraft.reset();
625
604
  };
626
605
  const forceNewMessageIfNeeded = () => {
627
606
  if (shouldSplitPreviewMessages && hasStreamedMessage) {
@@ -633,22 +612,23 @@ function createDiscordDraftPreviewController(params) {
633
612
  return {
634
613
  draftStream,
635
614
  previewToolProgressEnabled,
636
- commentaryProgressEnabled,
615
+ commentaryProgressEnabled: progressDraft.commentaryProgressEnabled,
637
616
  suppressDefaultToolProgressMessages,
638
617
  get isProgressMode() {
639
618
  return discordStreamMode === "progress";
640
619
  },
641
620
  get hasProgressDraftStarted() {
642
- return progressDraftGate.hasStarted;
621
+ return progressDraft.hasStarted;
643
622
  },
644
623
  get finalizedViaPreviewMessage() {
645
624
  return finalizedViaPreviewMessage;
646
625
  },
647
626
  markFinalReplyStarted() {
648
- finalReplyStarted = true;
627
+ progressDraft.markFinalReplyStarted();
649
628
  },
650
629
  markFinalReplyDelivered() {
651
630
  finalReplyDelivered = true;
631
+ progressDraft.markFinalReplyDelivered();
652
632
  },
653
633
  markPreviewFinalized() {
654
634
  finalizedViaPreviewMessage = true;
@@ -656,80 +636,16 @@ function createDiscordDraftPreviewController(params) {
656
636
  disableBlockStreamingForDraft: draftStream ? true : void 0,
657
637
  async startProgressDraft() {
658
638
  if (!draftStream || discordStreamMode !== "progress") return;
659
- await progressDraftGate.startNow();
639
+ await progressDraft.start();
660
640
  },
661
641
  async pushToolProgress(line, options) {
662
- if (!draftStream) return;
663
- if (finalReplyStarted || finalReplyDelivered) return;
664
- if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
665
- if (isEmptyDiscordProgressLine(line)) return;
666
- const normalized = normalizeChannelProgressDraftLineIdentity(line);
667
- if (!normalized) return;
668
- const progressLine = typeof line === "object" && line !== void 0 ? line : normalized;
669
- if (discordStreamMode !== "progress") {
670
- if (!previewToolProgressEnabled || previewToolProgressSuppressed) return;
671
- const nextLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(params.discordConfig) });
672
- if (nextLines === previewToolProgressLines) return;
673
- previewToolProgressLines = nextLines;
674
- const previewText = formatChannelProgressDraftText({
675
- entry: params.discordConfig,
676
- lines: previewToolProgressLines,
677
- seed: progressSeed
678
- });
679
- lastPartialText = previewText;
680
- draftText = previewText;
681
- hasStreamedMessage = true;
682
- draftChunker?.reset();
683
- draftStream.update(previewText);
684
- return;
685
- }
686
- if (previewToolProgressEnabled && !previewToolProgressSuppressed && normalized) previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(params.discordConfig) });
687
- const alreadyStarted = progressDraftGate.hasStarted;
688
- let progressActive;
689
- if (shouldStartDiscordProgressDraftNow(line)) {
690
- await progressDraftGate.startNow();
691
- progressActive = progressDraftGate.hasStarted;
692
- } else progressActive = await progressDraftGate.noteWork();
693
- if ((alreadyStarted || progressActive) && progressDraftGate.hasStarted) await renderProgressDraft();
642
+ await progressDraft.pushToolProgress(line, options);
694
643
  },
695
644
  async pushReasoningProgress(text, options) {
696
- if (!draftStream || discordStreamMode !== "progress" || !text) return;
697
- if (finalReplyDelivered) return;
698
- reasoningProgressRawText = mergeReasoningProgressText(reasoningProgressRawText, text, { snapshot: options?.snapshot === true });
699
- const normalized = normalizeReasoningProgressLine(reasoningProgressRawText);
700
- if (!normalized) return;
701
- const displayLine = formatReasoningProgressDisplayLine(normalized, resolveChannelProgressDraftMaxLineChars(params.discordConfig));
702
- if (!displayLine) return;
703
- if (previewToolProgressEnabled && !previewToolProgressSuppressed) {
704
- const priorIndex = lastReasoningProgressLine === void 0 ? -1 : previewToolProgressLines.lastIndexOf(lastReasoningProgressLine);
705
- if (priorIndex >= 0) {
706
- previewToolProgressLines = [...previewToolProgressLines];
707
- previewToolProgressLines[priorIndex] = displayLine;
708
- } else previewToolProgressLines = [...previewToolProgressLines, displayLine].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
709
- lastReasoningProgressLine = displayLine;
710
- }
711
- if (await progressDraftGate.noteWork() && progressDraftGate.hasStarted) await renderProgressDraft();
645
+ await progressDraft.pushReasoningProgress(text, options);
712
646
  },
713
647
  async pushCommentaryProgress(text, options) {
714
- if (!draftStream || discordStreamMode !== "progress" || !commentaryProgressEnabled) return;
715
- if (finalReplyStarted || finalReplyDelivered) return;
716
- const itemId = options?.itemId?.trim();
717
- if (!text && !itemId) return;
718
- const normalized = normalizeCommentaryProgressText(text ?? "");
719
- const lineId = itemId ? `commentary:${itemId}` : normalized ? `commentary:${normalized}` : "";
720
- if (!normalized) {
721
- if (lineId) await clearProgressDraftLine(lineId);
722
- return;
723
- }
724
- previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, {
725
- id: lineId,
726
- kind: "item",
727
- text: normalized,
728
- label: "Commentary",
729
- prefix: false
730
- }, { maxLines: resolveChannelProgressDraftMaxLines(params.discordConfig) });
731
- await progressDraftGate.startNow();
732
- await renderProgressDraft();
648
+ await progressDraft.pushCommentaryProgress(text, options);
733
649
  },
734
650
  resolvePreviewFinalText(text) {
735
651
  if (typeof text !== "string") return;
@@ -756,8 +672,7 @@ function createDiscordDraftPreviewController(params) {
756
672
  if (!cleaned || cleaned.startsWith("Reasoning:\n")) return;
757
673
  if (cleaned === lastPartialText) return;
758
674
  if (discordStreamMode === "progress") return;
759
- previewToolProgressSuppressed = true;
760
- previewToolProgressLines = [];
675
+ progressDraft.suppress();
761
676
  hasStreamedMessage = true;
762
677
  if (discordStreamMode === "partial") {
763
678
  if (lastPartialText && lastPartialText.startsWith(cleaned) && cleaned.length < lastPartialText.length) return;
@@ -807,7 +722,7 @@ function createDiscordDraftPreviewController(params) {
807
722
  },
808
723
  async cleanup() {
809
724
  try {
810
- progressDraftGate.cancel();
725
+ progressDraft.cancel();
811
726
  if (!finalReplyDelivered) await draftStream?.discardPending();
812
727
  if (!finalReplyDelivered && !finalizedViaPreviewMessage && draftStream?.messageId()) await draftStream.clear();
813
728
  } catch (err) {
@@ -816,52 +731,6 @@ function createDiscordDraftPreviewController(params) {
816
731
  }
817
732
  };
818
733
  }
819
- function normalizeReasoningProgressLine(text) {
820
- return text.replace(/^\s*(?:>\s*)?(?:Reasoning:\s*(?:\r?\n|\r)\s*|Thinking\.{0,3}\s*(?:\r?\n|\r)\s*(?:\r?\n|\r)\s*)/i, "").replace(/\s+/g, " ").trim();
821
- }
822
- function normalizeReasoningProgressInput(text) {
823
- const normalized = normalizeReasoningProgressLine(text);
824
- return (normalized.match(/^_(.*)_$/u)?.[1] ?? normalized).trim();
825
- }
826
- function formatReasoningProgressDisplayLine(text, maxChars) {
827
- const formatted = normalizeReasoningProgressLine(formatReasoningMessage(normalizeReasoningProgressInput(text)));
828
- if (!formatted) return "";
829
- if (Array.from(formatted).length <= maxChars) return formatted;
830
- const italic = formatted.match(/^_(.*)_$/u);
831
- if (!italic) return compactReasoningProgressDisplayLine(formatted, maxChars);
832
- const body = compactReasoningProgressDisplayLine(italic[1] ?? "", Math.max(1, maxChars - 2));
833
- return body ? `_${body}_` : "";
834
- }
835
- function compactReasoningProgressDisplayLine(text, maxChars) {
836
- const normalized = text.replace(/\s+/g, " ").trim();
837
- const chars = Array.from(normalized);
838
- if (chars.length <= maxChars) return normalized;
839
- if (maxChars <= 1) return "…";
840
- const head = chars.slice(0, maxChars - 1).join("").trimEnd();
841
- const boundary = head.search(/\s+\S*$/u);
842
- if (boundary > Math.floor(maxChars * .6)) return `${head.slice(0, boundary).trimEnd()}…`;
843
- return `${head}…`;
844
- }
845
- function normalizeCommentaryProgressText(text) {
846
- const cleaned = stripInlineDirectiveTagsForDelivery(text).text.trim();
847
- if (!cleaned || isSilentCommentaryProgressText(cleaned)) return "";
848
- return cleaned.split(/\r?\n/u).map((line) => line.replace(/\s+/g, " ").trim()).filter(Boolean).map((line) => `_${line}_`).join("\n");
849
- }
850
- function isSilentCommentaryProgressText(text) {
851
- const normalized = text.replace(/^[\s*_`~]+|[\s*_`~]+$/gu, "").trim();
852
- return /^NO_REPLY$/iu.test(normalized);
853
- }
854
- function mergeReasoningProgressText(current, incoming, options) {
855
- if (!current) return incoming;
856
- const normalizedCurrent = normalizeReasoningProgressLine(current);
857
- const normalizedIncoming = normalizeReasoningProgressLine(incoming);
858
- if (!normalizedIncoming || normalizedIncoming === normalizedCurrent) return current;
859
- if (options?.snapshot === true || isReasoningSnapshotText(incoming) || normalizedIncoming.startsWith(normalizedCurrent)) return incoming;
860
- return `${current}${incoming}`;
861
- }
862
- function isReasoningSnapshotText(text) {
863
- return /^\s*(?:>\s*)?(?:Reasoning:\s*(?:\r?\n|\r)\s*|Thinking\.{0,3}\s*(?:\r?\n|\r)\s*(?:\r?\n|\r)\s*)/i.test(text);
864
- }
865
734
  function isEmptyDiscordProgressLine(line) {
866
735
  if (!line || typeof line === "string") return false;
867
736
  return line.toolName === "apply_patch" && !line.detail && !line.status;
@@ -1243,24 +1112,33 @@ async function processDiscordMessageInner(ctx, observer) {
1243
1112
  finalText: payload.text,
1244
1113
  resolveCandidateText: resolveCurrentTurnTranscriptFinalText
1245
1114
  }) : payload.text;
1246
- const effectivePayload = finalText !== payload.text ? {
1115
+ const [deliverablePayload] = sanitizeDiscordFrontChannelReplyPayloads([finalText !== payload.text ? {
1247
1116
  ...payload,
1248
1117
  text: finalText
1249
- } : payload;
1118
+ } : payload], { kind: info.kind });
1119
+ if (!deliverablePayload) {
1120
+ logVerbose(formatDiscordReplySkip({
1121
+ kind: info.kind,
1122
+ reason: "internal-only payload",
1123
+ target: deliverTarget,
1124
+ sessionKey: ctxPayload.SessionKey
1125
+ }));
1126
+ return { visibleReplySent: false };
1127
+ }
1250
1128
  const draftStream = draftPreview.draftStream;
1251
1129
  if (draftStream && draftPreview.isProgressMode && info.kind === "block") {
1252
- if (!resolveSendableOutboundReplyParts(effectivePayload).hasMedia && !payload.isError) return { visibleReplySent: false };
1130
+ if (!resolveSendableOutboundReplyParts(deliverablePayload).hasMedia && !deliverablePayload.isError) return { visibleReplySent: false };
1253
1131
  }
1254
- if (draftStream && isFinal && (!draftPreview.isProgressMode || draftPreview.hasProgressDraftStarted) && !payload.isError) {
1255
- const hasMedia = resolveSendableOutboundReplyParts(effectivePayload).hasMedia;
1256
- const ttsSupplement = getReplyPayloadTtsSupplement(effectivePayload);
1257
- const previewSourceText = finalText ?? ttsSupplement?.spokenText;
1132
+ if (draftStream && isFinal && (!draftPreview.isProgressMode || draftPreview.hasProgressDraftStarted) && !deliverablePayload.isError) {
1133
+ const hasMedia = resolveSendableOutboundReplyParts(deliverablePayload).hasMedia;
1134
+ const ttsSupplement = getReplyPayloadTtsSupplement(deliverablePayload);
1135
+ const previewSourceText = deliverablePayload.text ?? ttsSupplement?.spokenText;
1258
1136
  const previewFinalText = draftPreview.resolvePreviewFinalText(previewSourceText);
1259
1137
  const previewReplyToId = replyReference.peek();
1260
- const hasExplicitReplyDirective = Boolean(effectivePayload.replyToTag || effectivePayload.replyToCurrent) || typeof previewSourceText === "string" && /\[\[\s*reply_to(?:_current|\s*:)/i.test(previewSourceText);
1138
+ const hasExplicitReplyDirective = Boolean(deliverablePayload.replyToTag || deliverablePayload.replyToCurrent) || typeof previewSourceText === "string" && /\[\[\s*reply_to(?:_current|\s*:)/i.test(previewSourceText);
1261
1139
  if ((await deliverWithFinalizableLivePreviewAdapter({
1262
1140
  kind: info.kind,
1263
- payload: effectivePayload,
1141
+ payload: deliverablePayload,
1264
1142
  adapter: defineFinalizableLivePreviewAdapter({
1265
1143
  draft: {
1266
1144
  flush: () => draftPreview.flush(),
@@ -1270,7 +1148,7 @@ async function processDiscordMessageInner(ctx, observer) {
1270
1148
  id: draftStream.messageId
1271
1149
  },
1272
1150
  buildFinalEdit: () => {
1273
- if (draftPreview.finalizedViaPreviewMessage || hasMedia && !ttsSupplement || typeof previewFinalText !== "string" || hasExplicitReplyDirective || payload.isError) return;
1151
+ if (draftPreview.finalizedViaPreviewMessage || hasMedia && !ttsSupplement || typeof previewFinalText !== "string" || hasExplicitReplyDirective || deliverablePayload.isError) return;
1274
1152
  const rewrittenFinal = rewriteDiscordKnownMentions(previewFinalText, {
1275
1153
  accountId,
1276
1154
  mentionAliases: resolveDiscordAccount({
@@ -1298,7 +1176,7 @@ async function processDiscordMessageInner(ctx, observer) {
1298
1176
  draftPreview.markPreviewFinalized();
1299
1177
  replyReference.markSent();
1300
1178
  },
1301
- buildSupplementalPayload: () => ttsSupplement ? buildTtsSupplementMediaPayload(effectivePayload) : void 0,
1179
+ buildSupplementalPayload: () => ttsSupplement ? buildTtsSupplementMediaPayload(deliverablePayload) : void 0,
1302
1180
  deliverSupplemental: async (supplementalPayload) => {
1303
1181
  if (isProcessAborted(abortSignal)) return false;
1304
1182
  const supplementalReplyToId = previewReplyToId ?? replyReference.peek() ?? (replyToMode === "all" ? typeof message.id === "string" && message.id ? message.id : ctxPayload.MessageSid : void 0);
@@ -1329,10 +1207,10 @@ async function processDiscordMessageInner(ctx, observer) {
1329
1207
  }),
1330
1208
  deliverNormally: async () => {
1331
1209
  if (isProcessAborted(abortSignal)) return false;
1332
- const fallbackPayload = ttsSupplement && ttsSupplement.visibleTextAlreadyDelivered !== true && !effectivePayload.text?.trim() ? {
1333
- ...effectivePayload,
1210
+ const fallbackPayload = ttsSupplement && ttsSupplement.visibleTextAlreadyDelivered !== true && !deliverablePayload.text?.trim() ? {
1211
+ ...deliverablePayload,
1334
1212
  text: ttsSupplement.spokenText
1335
- } : effectivePayload;
1213
+ } : deliverablePayload;
1336
1214
  const replyToId = replyReference.use();
1337
1215
  notifyFinalReplyStart();
1338
1216
  await deliverDiscordReply({
@@ -1375,7 +1253,7 @@ async function processDiscordMessageInner(ctx, observer) {
1375
1253
  if (isFinal) notifyFinalReplyStart();
1376
1254
  await deliverDiscordReply({
1377
1255
  cfg,
1378
- replies: [effectivePayload],
1256
+ replies: [deliverablePayload],
1379
1257
  target: deliverTarget,
1380
1258
  token,
1381
1259
  accountId,
@@ -1393,7 +1271,7 @@ async function processDiscordMessageInner(ctx, observer) {
1393
1271
  kind: info.kind
1394
1272
  });
1395
1273
  replyReference.markSent();
1396
- if (isFinal && payload.isError !== true) markUserFacingFinalDelivered();
1274
+ if (isFinal && deliverablePayload.isError !== true) markUserFacingFinalDelivered();
1397
1275
  return { visibleReplySent: true };
1398
1276
  };
1399
1277
  const onDiscordDeliveryError = (err, info) => {
@@ -38,7 +38,7 @@ import { createHttp1EnvHttpProxyAgent, createHttp1ProxyAgent, createNodeProxyAge
38
38
  import { createNonExitingRuntime, createSubsystemLogger, danger, formatDurationSeconds, isVerbose, logVerbose, shouldLogVerbose, warn } from "openclaw/plugin-sdk/runtime-env";
39
39
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
40
40
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
41
- import { chunkItems, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
41
+ import { chunkItems, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
42
42
  import { buildOutboundSessionContext, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled, sendDurableMessageBatch } from "openclaw/plugin-sdk/channel-outbound";
43
43
  import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1 } from "openclaw/plugin-sdk/ssrf-runtime";
44
44
  import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -7769,9 +7769,7 @@ function buildGuildLabel(params) {
7769
7769
  }
7770
7770
  //#endregion
7771
7771
  //#region extensions/discord/src/monitor/reply-safety.ts
7772
- const DISCORD_INTERNAL_TRACE_LINE_RE = /^(?:>\s*)?(?:📊|🛠️|📖|📝|🔍|🔎|⚙️)\s*(?:Session Status|Exec|Read|Edit|Write|Patch|Search|Open|Click|Find|Screenshot|Update Plan|Tool Call|Tool Result|Function Call|Shell|Command)\s*:/i;
7773
- const DISCORD_INTERNAL_COMPACT_COMMAND_TRACE_LINE_RE = /^(?:>\s*)?🛠️\s*(?:(?:(?:elevated|pty)\b\s*(?:·|,)\s*)+)?(?:`{1,2}\s*\S|(?:run|check|fetch|pull|push|view|show|list|switch|create|merge|rebase|stage|restore|reset|stash|search|find|print|copy|move|remove|install|start|cd|git|pnpm|npm|yarn|bun|node|python|python3|bash|sh)\b)/i;
7774
- const DISCORD_INTERNAL_CHANNEL_LINE_RE = /^(?:>\s*)?(?:analysis|commentary|tool[-_ ]?call|tool[-_ ]?result|function[-_ ]?call|thinking|reasoning)\s*[:=]/i;
7772
+ const DISCORD_INTERNAL_CHANNEL_LINE_RE = /^(?:>\s*)?(?:analysis|commentary|thinking|reasoning)\s*[:=]/i;
7775
7773
  function hasNonEmptyRecord(value) {
7776
7774
  return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0);
7777
7775
  }
@@ -7784,7 +7782,10 @@ function hasInteractiveOrPresentationBlocks(value) {
7784
7782
  function hasNonTextReplyPayloadContent(payload) {
7785
7783
  return payload.audioAsVoice === true || hasNonEmptyRecord(payload.channelData) || hasInteractiveOrPresentationBlocks(payload.interactive) || hasInteractiveOrPresentationBlocks(payload.presentation);
7786
7784
  }
7787
- function stripDiscordInternalTraceLines(text) {
7785
+ function collapseExcessBlankLines(text) {
7786
+ return text.replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n");
7787
+ }
7788
+ function stripDiscordInternalChannelLines(text) {
7788
7789
  let inFence = false;
7789
7790
  const kept = [];
7790
7791
  for (const line of text.split(/\r?\n/)) {
@@ -7793,25 +7794,19 @@ function stripDiscordInternalTraceLines(text) {
7793
7794
  kept.push(line);
7794
7795
  continue;
7795
7796
  }
7796
- if (!inFence) {
7797
- const trimmed = line.trim();
7798
- if (DISCORD_INTERNAL_TRACE_LINE_RE.test(trimmed) || DISCORD_INTERNAL_COMPACT_COMMAND_TRACE_LINE_RE.test(trimmed) || DISCORD_INTERNAL_CHANNEL_LINE_RE.test(trimmed)) continue;
7799
- }
7797
+ if (!inFence && DISCORD_INTERNAL_CHANNEL_LINE_RE.test(line.trim())) continue;
7800
7798
  kept.push(line);
7801
7799
  }
7802
7800
  return kept.join("\n");
7803
7801
  }
7804
- function collapseExcessBlankLines(text) {
7805
- return text.replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n");
7806
- }
7807
7802
  function sanitizeDiscordFrontChannelText(text) {
7808
- return collapseExcessBlankLines(stripDiscordInternalTraceLines(stripPlainTextToolCallBlocks(sanitizeAssistantVisibleText(stripPlainTextToolCallBlocks(text))))).trim();
7803
+ return collapseExcessBlankLines(stripDiscordInternalChannelLines(stripPlainTextToolCallBlocks(sanitizeAssistantVisibleText(stripPlainTextToolCallBlocks(text))))).trim();
7809
7804
  }
7810
7805
  function sanitizeDiscordFrontChannelReplyPayloads(payloads, options = {}) {
7811
7806
  const preserveVerboseToolProgress = options.kind === "tool";
7812
7807
  const safePayloads = [];
7813
7808
  for (const payload of payloads) {
7814
- const safeText = typeof payload.text === "string" ? preserveVerboseToolProgress ? collapseExcessBlankLines(sanitizeAssistantVisibleText(payload.text)).trim() : sanitizeDiscordFrontChannelText(payload.text) : payload.text;
7809
+ const safeText = typeof payload.text === "string" ? preserveVerboseToolProgress ? collapseExcessBlankLines(sanitizeAssistantVisibleTextWithProfile(payload.text, "tool-progress")).trim() : sanitizeDiscordFrontChannelText(payload.text) : payload.text;
7815
7810
  const nextPayload = safeText === payload.text ? payload : {
7816
7811
  ...payload,
7817
7812
  text: safeText || void 0
@@ -9838,7 +9833,7 @@ function logDiscordStartupPhase(params) {
9838
9833
  });
9839
9834
  }
9840
9835
  async function loadDiscordVoiceRuntime() {
9841
- const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-M8890WS1.js");
9836
+ const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-DyYIi2by.js");
9842
9837
  discordVoiceRuntimePromise = promise;
9843
9838
  try {
9844
9839
  return await promise;
@@ -9848,7 +9843,7 @@ async function loadDiscordVoiceRuntime() {
9848
9843
  }
9849
9844
  }
9850
9845
  async function loadDiscordProviderSessionRuntime() {
9851
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-DgqndvlW.js");
9846
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CXhifSRN.js");
9852
9847
  discordProviderSessionRuntimePromise = promise;
9853
9848
  try {
9854
9849
  return await promise;
@@ -10223,4 +10218,4 @@ async function monitorDiscordProvider(opts = {}) {
10223
10218
  }
10224
10219
  }
10225
10220
  //#endregion
10226
- export { resolveDiscordReplyTarget as C, resolveDiscordTextCommandAccess as D, resolveDiscordDmCommandAccess as E, resolveDiscordAutoThreadReplyPlan as S, sanitizeDiscordThreadName as T, resolveDiscordEffectiveRoute as _, resolveReplyContext as a, registerDiscordListener as b, resolveDiscordGatewayIntents as c, createDiscordNativeCommand as d, buildDiscordGroupSystemPrompt as f, resolveDiscordConversationRoute as g, buildDiscordRoutePeer as h, buildGuildLabel as i, waitForDiscordGatewayPluginRegistration as l, createDiscordSupplementalContextAccessChecker as m, deliverDiscordReply as n, authorizeDiscordVoiceIngress as o, buildDiscordInboundAccessContext as p, buildDirectLabel as r, createDiscordGatewayPlugin as s, monitorDiscordProvider as t, resolveDiscordVoiceEnabled as u, shouldIgnoreStaleDiscordRouteBinding as v, resolveDiscordThreadStarter as w, threading_exports as x, handleDiscordDmCommandDecision as y };
10221
+ export { resolveDiscordAutoThreadReplyPlan as C, resolveDiscordDmCommandAccess as D, sanitizeDiscordThreadName as E, resolveDiscordTextCommandAccess as O, threading_exports as S, resolveDiscordThreadStarter as T, resolveDiscordConversationRoute as _, buildGuildLabel as a, handleDiscordDmCommandDecision as b, createDiscordGatewayPlugin as c, resolveDiscordVoiceEnabled as d, createDiscordNativeCommand as f, buildDiscordRoutePeer as g, createDiscordSupplementalContextAccessChecker as h, buildDirectLabel as i, resolveDiscordGatewayIntents as l, buildDiscordInboundAccessContext as m, deliverDiscordReply as n, resolveReplyContext as o, buildDiscordGroupSystemPrompt as p, sanitizeDiscordFrontChannelReplyPayloads as r, authorizeDiscordVoiceIngress as s, monitorDiscordProvider as t, waitForDiscordGatewayPluginRegistration as u, resolveDiscordEffectiveRoute as v, resolveDiscordReplyTarget as w, registerDiscordListener as x, shouldIgnoreStaleDiscordRouteBinding as y };
@@ -1,6 +1,6 @@
1
1
  import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-Tfr_vFxk.js";
2
2
  import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CRc4hYr1.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-DRzdnJyM.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-BVIAmV5J.js";
4
4
  import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
5
5
  import { getAcpSessionManager, isAcpRuntimeError } from "openclaw/plugin-sdk/acp-runtime";
6
6
  export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled };
@@ -0,0 +1,2 @@
1
+ import { t as monitorDiscordProvider } from "./provider-BzydhoOf.js";
2
+ export { monitorDiscordProvider };
@@ -21,10 +21,10 @@ import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as
21
21
  import "./runtime-api.actions.js";
22
22
  import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-eI8e8RpG.js";
23
23
  import "./runtime-api.lookup.js";
24
- import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BI4VdnRd.js";
24
+ import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-BzydhoOf.js";
25
25
  import { i as buildDiscordMediaPayload } from "./message-utils-ZTGvA2L8.js";
26
- import { t as createDiscordMessageHandler } from "./message-handler-DRzdnJyM.js";
27
- import "./runtime-api.monitor-CX6Z4-7x.js";
26
+ import { t as createDiscordMessageHandler } from "./message-handler-BVIAmV5J.js";
27
+ import "./runtime-api.monitor-DuIuN9Ro.js";
28
28
  import "./runtime-api.send.js";
29
29
  import "./runtime-api.threads.js";
30
30
  export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, testing as __testing, testing, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, buildDiscordMediaPayload, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
@@ -1,6 +1,6 @@
1
1
  import "./allow-list-C-MqM-B_.js";
2
2
  import "./timeouts-CEJ3--Uw.js";
3
- import "./provider-BI4VdnRd.js";
3
+ import "./provider-BzydhoOf.js";
4
4
  import "./message-utils-ZTGvA2L8.js";
5
- import "./message-handler-DRzdnJyM.js";
5
+ import "./message-handler-BVIAmV5J.js";
6
6
  export {};
@@ -1,8 +1,8 @@
1
1
  import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-DPxmW0Db.js";
2
2
  import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-C-MqM-B_.js";
3
3
  import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.js";
4
- import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BI4VdnRd.js";
4
+ import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-BzydhoOf.js";
5
5
  import { i as buildDiscordMediaPayload } from "./message-utils-ZTGvA2L8.js";
6
- import { t as createDiscordMessageHandler } from "./message-handler-DRzdnJyM.js";
7
- import "./runtime-api.monitor-CX6Z4-7x.js";
6
+ import { t as createDiscordMessageHandler } from "./message-handler-BVIAmV5J.js";
7
+ import "./runtime-api.monitor-DuIuN9Ro.js";
8
8
  export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, buildDiscordMediaPayload, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.6.1",
3
+ "version": "2026.6.2-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/discord",
9
- "version": "2026.6.1",
9
+ "version": "2026.6.2-beta.1",
10
10
  "dependencies": {
11
11
  "@discordjs/voice": "0.19.2",
12
12
  "discord-api-types": "0.38.48",
@@ -16,7 +16,7 @@
16
16
  "ws": "8.21.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "openclaw": ">=2026.6.1"
19
+ "openclaw": ">=2026.6.2-beta.1"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.6.1",
3
+ "version": "2026.6.2-beta.1",
4
4
  "description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "ws": "8.21.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "openclaw": ">=2026.6.1"
19
+ "openclaw": ">=2026.6.2-beta.1"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
@@ -63,10 +63,10 @@
63
63
  "allowInvalidConfigRecovery": true
64
64
  },
65
65
  "compat": {
66
- "pluginApi": ">=2026.6.1"
66
+ "pluginApi": ">=2026.6.2-beta.1"
67
67
  },
68
68
  "build": {
69
- "openclawVersion": "2026.6.1"
69
+ "openclawVersion": "2026.6.2-beta.1"
70
70
  },
71
71
  "release": {
72
72
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-BI4VdnRd.js";
2
- export { monitorDiscordProvider };