@openclaw/discord 2026.5.16-beta.6 → 2026.5.18-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-CgtNlbhO.js";
7
7
  import "./targets-Z4SW2zZs.js";
8
8
  import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CYgemFy7.js";
9
- import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-Do2rHpEK.js";
9
+ import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-n7fwA0Rx.js";
10
10
  import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-DnCXUKGA.js";
11
11
  import { t as discordSetupPlugin } from "./channel.setup-D1j7U4B3.js";
12
12
  import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-CnPSppNz.js";
@@ -132,7 +132,7 @@ const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./re
132
132
  const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-XKdkYEit.js").then((n) => n.a));
133
133
  const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-CgtNlbhO.js").then((n) => n.r));
134
134
  async function loadDiscordProviderRuntime() {
135
- discordProviderRuntimePromise ??= import("./provider.runtime-DGM9_soz.js");
135
+ discordProviderRuntimePromise ??= import("./provider.runtime-TGlvSd9K.js");
136
136
  return await discordProviderRuntimePromise;
137
137
  }
138
138
  async function loadDiscordProbeRuntime() {
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-Do2rHpEK.js";
1
+ import { t as discordPlugin } from "./channel-n7fwA0Rx.js";
2
2
  export { discordPlugin };
@@ -3,7 +3,7 @@ import { c as resolveDiscordAccountAllowFrom } from "./accounts-ltxKLzxN.js";
3
3
  import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-CBI-M84K.js";
4
4
  import { i as formatMention } from "./send.outbound-PAYV11wW.js";
5
5
  import { t as getDiscordRuntime } from "./runtime-Tqtvj5GX.js";
6
- import { o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-BsIBTjLB.js";
6
+ import { o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-BXK0P155.js";
7
7
  import { t as buildDiscordGroupSystemPrompt } from "./inbound-context-CzEAvKgx.js";
8
8
  import { createRequire } from "node:module";
9
9
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -380,6 +380,10 @@ const DISCORD_REALTIME_DEFAULT_MIN_BARGE_IN_AUDIO_END_MS = 250;
380
380
  const DISCORD_REALTIME_FORCED_CONSULT_FALLBACK_DELAY_MS = 200;
381
381
  const DISCORD_REALTIME_DUPLICATE_ERROR_SUPPRESS_MS = 6e4;
382
382
  const REALTIME_PCM16_BYTES_PER_SAMPLE = 2;
383
+ const DISCORD_RAW_PCM_FRAME_BYTES = 3840;
384
+ const DISCORD_REALTIME_OUTPUT_PREROLL_FRAMES = 25;
385
+ const DISCORD_REALTIME_TRAILING_SILENCE_MIN_MS = 700;
386
+ const DISCORD_REALTIME_TRAILING_SILENCE_MAX_MS = 3e3;
383
387
  const DISCORD_REALTIME_FORCED_CONSULT_TRAILING_FRAGMENT_WORDS = new Set([
384
388
  "a",
385
389
  "about",
@@ -427,6 +431,9 @@ function formatRealtimeInterruptionLog(event) {
427
431
  if (event.type === "error" && event.detail === "Cancellation failed: no active response found") return `discord voice: realtime model interrupt raced ${event.direction}:${event.type}${detail}`;
428
432
  }
429
433
  }
434
+ function isRealtimeResponseCancelled(event) {
435
+ return event.direction === "server" && (event.type === "response.cancelled" || event.type === "response.done" && event.detail?.includes("status=cancelled") === true);
436
+ }
430
437
  function shouldLogRealtimeVerboseEvent(event) {
431
438
  return !DISCORD_REALTIME_VERBOSE_OMITTED_EVENTS.has(event.type);
432
439
  }
@@ -540,6 +547,8 @@ var DiscordRealtimeVoiceSession = class {
540
547
  this.outputAudioRealtimeBytes = 0;
541
548
  this.outputAudioChunks = 0;
542
549
  this.outputStreamEnding = false;
550
+ this.outputPacedBuffer = Buffer.alloc(0);
551
+ this.outputPlaybackStarted = false;
543
552
  this.queuedExactSpeechMessages = [];
544
553
  this.exactSpeechResponseActive = false;
545
554
  this.exactSpeechAudioStarted = false;
@@ -573,6 +582,7 @@ var DiscordRealtimeVoiceSession = class {
573
582
  defaultModel: this.realtimeConfig?.model,
574
583
  noRegisteredProviderMessage: "No configured realtime voice provider registered"
575
584
  });
585
+ this.realtimeProviderId = resolved.provider.id;
576
586
  const isAgentProxy = isDiscordAgentProxyVoiceMode(this.params.mode);
577
587
  const defaultToolPolicy = isAgentProxy ? "owner" : "safe-read-only";
578
588
  const toolPolicy = resolveRealtimeVoiceAgentConsultToolPolicy(this.realtimeConfig?.toolPolicy, defaultToolPolicy);
@@ -621,7 +631,7 @@ var DiscordRealtimeVoiceSession = class {
621
631
  if (shouldLogRealtimeVerboseEvent(event)) logVoiceVerbose(`realtime ${event.direction}:${event.type}${detail}`);
622
632
  if (event.direction === "server" && (event.type === "response.done" || event.type === "response.cancelled")) {
623
633
  if (this.exactSpeechResponseActive && !this.exactSpeechAudioStarted) this.completeExactSpeechResponse(event.type);
624
- this.finishOutputAudioStream(event.type);
634
+ this.finishOutputAudioStream(event.type, { playBuffered: !isRealtimeResponseCancelled(event) });
625
635
  }
626
636
  const interruptionLog = formatRealtimeInterruptionLog(event);
627
637
  if (interruptionLog) logger$2.info(interruptionLog);
@@ -657,6 +667,7 @@ var DiscordRealtimeVoiceSession = class {
657
667
  this.clearOutputAudio("session-close");
658
668
  this.bridge?.close();
659
669
  this.bridge = null;
670
+ this.realtimeProviderId = void 0;
660
671
  const voiceSdk = loadDiscordVoiceSdk();
661
672
  this.params.entry.player.off(voiceSdk.AudioPlayerStatus.Idle, this.playerIdleHandler);
662
673
  }
@@ -699,6 +710,7 @@ var DiscordRealtimeVoiceSession = class {
699
710
  return {
700
711
  sendInputAudio: (discordPcm48kStereo) => this.sendInputAudioForTurn(turn, discordPcm48kStereo),
701
712
  close: () => {
713
+ this.sendRealtimeTrailingSilenceForTurn(turn);
702
714
  this.logSpeakerTurnClosed(turn);
703
715
  turn.closed = true;
704
716
  this.prunePendingSpeakerTurns();
@@ -738,7 +750,7 @@ var DiscordRealtimeVoiceSession = class {
738
750
  this.bridge?.handleBargeIn({ audioPlaybackActive: true });
739
751
  }
740
752
  isBargeInEnabled() {
741
- const providerId = this.realtimeConfig?.provider ?? "openai";
753
+ const providerId = this.realtimeProviderId ?? this.realtimeConfig?.provider ?? "openai";
742
754
  return resolveDiscordRealtimeBargeIn({
743
755
  realtimeConfig: this.realtimeConfig,
744
756
  providerId
@@ -761,18 +773,18 @@ var DiscordRealtimeVoiceSession = class {
761
773
  }
762
774
  const stream = this.ensureOutputStream();
763
775
  if (this.exactSpeechResponseActive) this.exactSpeechAudioStarted = true;
764
- stream.write(discordPcm);
765
776
  this.outputAudioDiscordBytes += discordPcm.length;
766
777
  this.outputAudioRealtimeBytes += realtimePcm24kMono.length;
767
778
  this.outputAudioChunks += 1;
768
779
  this.outputAudioTimestampMs += pcm16MonoDurationMs(realtimePcm24kMono, REALTIME_VOICE_AUDIO_FORMAT_PCM16_24KHZ.sampleRateHz);
780
+ this.queueOutputAudio(stream, discordPcm);
769
781
  }
770
782
  ensureOutputStream() {
771
783
  if (this.outputStream && !this.outputStream.destroyed && !this.outputStream.writableEnded) return this.outputStream;
772
- const voiceSdk = loadDiscordVoiceSdk();
773
- const stream = new PassThrough();
784
+ const stream = new PassThrough({ highWaterMark: DISCORD_RAW_PCM_FRAME_BYTES * 128 });
774
785
  this.outputStream = stream;
775
- this.outputAudioStartedAt = Date.now();
786
+ this.outputPacedBuffer = Buffer.alloc(0);
787
+ this.outputPlaybackStarted = false;
776
788
  stream.once("close", () => {
777
789
  if (this.outputStream === stream) {
778
790
  this.logOutputAudioStopped("stream-close");
@@ -781,11 +793,29 @@ var DiscordRealtimeVoiceSession = class {
781
793
  this.completeExactSpeechResponse("stream-close", { drain: false });
782
794
  }
783
795
  });
796
+ return stream;
797
+ }
798
+ queueOutputAudio(stream, discordPcm) {
799
+ if (this.outputPlaybackStarted) {
800
+ stream.write(discordPcm);
801
+ return;
802
+ }
803
+ this.outputPacedBuffer = this.outputPacedBuffer.length > 0 ? Buffer.concat([this.outputPacedBuffer, discordPcm]) : discordPcm;
804
+ if (this.outputPacedBuffer.length >= DISCORD_RAW_PCM_FRAME_BYTES * DISCORD_REALTIME_OUTPUT_PREROLL_FRAMES) this.startOutputPlayback(stream);
805
+ }
806
+ startOutputPlayback(stream) {
807
+ if (this.outputPlaybackStarted || stream.destroyed) return;
808
+ const voiceSdk = loadDiscordVoiceSdk();
809
+ if (this.outputPacedBuffer.length > 0) {
810
+ stream.write(this.outputPacedBuffer);
811
+ this.outputPacedBuffer = Buffer.alloc(0);
812
+ }
784
813
  const resource = voiceSdk.createAudioResource(stream, { inputType: voiceSdk.StreamType.Raw });
785
814
  this.params.entry.player.play(resource);
815
+ this.outputPlaybackStarted = true;
816
+ this.outputAudioStartedAt = Date.now();
786
817
  const realtimeConfig = this.realtimeConfig;
787
818
  logger$2.info(`discord voice: realtime audio playback started guild=${this.params.entry.guildId} channel=${this.params.entry.channelId} mode=${this.params.mode} model=${realtimeConfig?.model ?? "provider-default"} voice=${realtimeConfig?.voice ?? "provider-default"}`);
788
- return stream;
789
819
  }
790
820
  clearOutputAudio(reason = "clear") {
791
821
  this.resetOutputStream(reason);
@@ -795,15 +825,24 @@ var DiscordRealtimeVoiceSession = class {
795
825
  const stream = this.outputStream;
796
826
  this.logOutputAudioStopped(reason);
797
827
  this.outputStream = null;
828
+ this.outputPacedBuffer = Buffer.alloc(0);
829
+ this.outputPlaybackStarted = false;
798
830
  this.resetOutputAudioStats();
799
831
  stream?.end();
800
832
  stream?.destroy();
801
833
  }
802
- finishOutputAudioStream(reason) {
834
+ finishOutputAudioStream(reason, { playBuffered = true } = {}) {
803
835
  const stream = this.outputStream;
804
836
  if (!stream || stream.destroyed || this.outputStreamEnding) return;
805
837
  this.outputStreamEnding = true;
806
838
  logger$2.info(`discord voice: realtime audio playback finishing reason=${reason} guild=${this.params.entry.guildId} channel=${this.params.entry.channelId} audioMs=${Math.floor(this.outputAudioTimestampMs)} chunks=${this.outputAudioChunks}`);
839
+ if (playBuffered) this.startOutputPlayback(stream);
840
+ else {
841
+ this.resetOutputStream(reason);
842
+ this.params.entry.player.stop(true);
843
+ this.completeExactSpeechResponse(reason);
844
+ return;
845
+ }
807
846
  stream.end();
808
847
  }
809
848
  enqueueExactSpeechMessage(text) {
@@ -850,6 +889,8 @@ var DiscordRealtimeVoiceSession = class {
850
889
  this.outputAudioChunks = 0;
851
890
  this.outputAudioStartedAt = void 0;
852
891
  this.outputStreamEnding = false;
892
+ this.outputPacedBuffer = Buffer.alloc(0);
893
+ this.outputPlaybackStarted = false;
853
894
  }
854
895
  syncOutputAudioTimestamp() {
855
896
  this.bridge?.setMediaTimestamp(Math.floor(this.outputAudioTimestampMs));
@@ -863,6 +904,16 @@ var DiscordRealtimeVoiceSession = class {
863
904
  const sinceLastAudioMs = turn.lastAudioAt ? Date.now() - turn.lastAudioAt : void 0;
864
905
  logger$2.info(`discord voice: realtime speaker turn closed guild=${this.params.entry.guildId} channel=${this.params.entry.channelId} user=${turn.context.userId} speaker=${turn.context.speakerLabel} owner=${turn.context.senderIsOwner} hasAudio=${turn.hasAudio} chunks=${turn.inputChunks} discordBytes=${turn.inputDiscordBytes} realtimeBytes=${turn.inputRealtimeBytes} elapsedMs=${elapsedMs}${sinceLastAudioMs === void 0 ? "" : ` sinceLastAudioMs=${sinceLastAudioMs}`} interruptedPlayback=${turn.interruptedPlayback}`);
865
906
  }
907
+ sendRealtimeTrailingSilenceForTurn(turn) {
908
+ if (!this.bridge || this.stopped || turn.closed || !turn.hasAudio) return;
909
+ const providerId = this.realtimeProviderId ?? this.realtimeConfig?.provider ?? "openai";
910
+ const rawSilenceDurationMs = (this.realtimeConfig?.providers?.[providerId])?.silenceDurationMs;
911
+ const silenceMs = Math.min(DISCORD_REALTIME_TRAILING_SILENCE_MAX_MS, Math.max(DISCORD_REALTIME_TRAILING_SILENCE_MIN_MS, typeof rawSilenceDurationMs === "number" && Number.isFinite(rawSilenceDurationMs) ? rawSilenceDurationMs : 0));
912
+ const silenceBytes = Math.ceil(REALTIME_VOICE_AUDIO_FORMAT_PCM16_24KHZ.sampleRateHz * silenceMs / 1e3) * REALTIME_PCM16_BYTES_PER_SAMPLE;
913
+ const silence = Buffer.alloc(silenceBytes);
914
+ this.bridge.sendAudio(silence);
915
+ logger$2.info(`discord voice: realtime trailing silence sent guild=${this.params.entry.guildId} channel=${this.params.entry.channelId} user=${turn.context.userId} speaker=${turn.context.speakerLabel} silenceMs=${silenceMs} realtimeBytes=${silence.length}`);
916
+ }
866
917
  handleToolCall(event, session) {
867
918
  const callId = event.callId || event.itemId || "unknown";
868
919
  if (event.name !== REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME) {
@@ -121,7 +121,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
121
121
  //#region extensions/discord/src/monitor/message-run-queue.ts
122
122
  let messageProcessRuntimePromise;
123
123
  async function loadMessageProcessRuntime() {
124
- messageProcessRuntimePromise ??= import("./message-handler.process-3R3ffiyj.js");
124
+ messageProcessRuntimePromise ??= import("./message-handler.process-9JHT0Fok.js");
125
125
  return await messageProcessRuntimePromise;
126
126
  }
127
127
  async function processDiscordQueuedMessage(params) {
@@ -173,7 +173,7 @@ function createDiscordMessageRunQueue(params) {
173
173
  //#region extensions/discord/src/monitor/message-handler.ts
174
174
  let messagePreflightRuntimePromise;
175
175
  async function loadMessagePreflightRuntime() {
176
- messagePreflightRuntimePromise ??= import("./message-handler.preflight-BxiKPdL6.js");
176
+ messagePreflightRuntimePromise ??= import("./message-handler.preflight--cdiq4ck.js");
177
177
  return await messagePreflightRuntimePromise;
178
178
  }
179
179
  function isNonEmptyString(value) {
@@ -5,7 +5,7 @@ import { t as resolveDiscordConversationIdentity } from "./conversation-identity
5
5
  import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-CSphZOiL.js";
6
6
  import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-_zMU4M2x.js";
7
7
  import "./thread-bindings-CXZ2h9DB.js";
8
- import { C as resolveDiscordDmCommandAccess, f as buildDiscordRoutePeer, g as handleDiscordDmCommandDecision, h as shouldIgnoreStaleDiscordRouteBinding, m as resolveDiscordEffectiveRoute, p as resolveDiscordConversationRoute, w as resolveDiscordTextCommandAccess } from "./provider-BsIBTjLB.js";
8
+ import { C as resolveDiscordDmCommandAccess, f as buildDiscordRoutePeer, g as handleDiscordDmCommandDecision, h as shouldIgnoreStaleDiscordRouteBinding, m as resolveDiscordEffectiveRoute, p as resolveDiscordConversationRoute, w as resolveDiscordTextCommandAccess } from "./provider-BXK0P155.js";
9
9
  import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-BZriBbcg.js";
10
10
  import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-DC0FdEcU.js";
11
11
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -439,7 +439,7 @@ async function loadSystemEventsRuntime() {
439
439
  return await systemEventsRuntimePromise;
440
440
  }
441
441
  async function loadDiscordThreadingRuntime() {
442
- discordThreadingRuntimePromise ??= import("./provider-BsIBTjLB.js").then((n) => n.v);
442
+ discordThreadingRuntimePromise ??= import("./provider-BXK0P155.js").then((n) => n.v);
443
443
  return await discordThreadingRuntimePromise;
444
444
  }
445
445
  function isPreflightAborted(abortSignal) {
@@ -9,7 +9,7 @@ import { t as beginDiscordInboundEventDeliveryCorrelation } from "./inbound-even
9
9
  import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-C54-43UU.js";
10
10
  import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-nClS_TQx.js";
11
11
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEwuGaWT.js";
12
- import { a as resolveReplyContext, i as buildGuildLabel, n as deliverDiscordReply, r as buildDirectLabel, x as resolveDiscordThreadStarter, y as resolveDiscordAutoThreadReplyPlan } from "./provider-BsIBTjLB.js";
12
+ import { a as resolveReplyContext, i as buildGuildLabel, n as deliverDiscordReply, r as buildDirectLabel, x as resolveDiscordThreadStarter, y as resolveDiscordAutoThreadReplyPlan } from "./provider-BXK0P155.js";
13
13
  import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-BZriBbcg.js";
14
14
  import { t as sendTyping } from "./typing-DudlJ-Fv.js";
15
15
  import { n as buildDiscordInboundAccessContext, r as createDiscordSupplementalContextAccessChecker } from "./inbound-context-CzEAvKgx.js";
@@ -1290,7 +1290,7 @@ async function processDiscordMessage(ctx, observer) {
1290
1290
  suppressTyping: isRoomEvent ? true : void 0,
1291
1291
  allowProgressCallbacksWhenSourceDeliverySuppressed: sourceRepliesAreToolOnly && draftPreview.draftStream && draftPreview.isProgressMode ? true : void 0,
1292
1292
  disableBlockStreaming: sourceRepliesAreToolOnly ? true : draftPreview.disableBlockStreamingForDraft ?? (typeof resolvedBlockStreamingEnabled === "boolean" ? !resolvedBlockStreamingEnabled : void 0),
1293
- onPartialReply: draftPreview.draftStream ? (payload) => draftPreview.updateFromPartial(payload.text) : void 0,
1293
+ onPartialReply: draftPreview.draftStream && !draftPreview.isProgressMode ? (payload) => draftPreview.updateFromPartial(payload.text) : void 0,
1294
1294
  onAssistantMessageStart: draftPreview.draftStream ? () => draftPreview.handleAssistantMessageBoundary() : void 0,
1295
1295
  onReasoningEnd: draftPreview.draftStream ? () => draftPreview.handleAssistantMessageBoundary() : void 0,
1296
1296
  onModelSelected,
@@ -9182,7 +9182,7 @@ function logDiscordStartupPhase(params) {
9182
9182
  });
9183
9183
  }
9184
9184
  async function loadDiscordVoiceRuntime() {
9185
- const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-BT4BCSNT.js");
9185
+ const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-DigfejdS.js");
9186
9186
  discordVoiceRuntimePromise = promise;
9187
9187
  try {
9188
9188
  return await promise;
@@ -9192,7 +9192,7 @@ async function loadDiscordVoiceRuntime() {
9192
9192
  }
9193
9193
  }
9194
9194
  async function loadDiscordProviderSessionRuntime() {
9195
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-B_OVq72d.js");
9195
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CMvHIMEE.js");
9196
9196
  discordProviderSessionRuntimePromise = promise;
9197
9197
  try {
9198
9198
  return await promise;
@@ -1,6 +1,6 @@
1
1
  import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-CXZ2h9DB.js";
2
2
  import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-XKdkYEit.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-CW0aFKln.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-Jsc36DUW.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-BXK0P155.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-CniGmJUL.js";
23
23
  import "./runtime-api.lookup.js";
24
- import { S as sanitizeDiscordThreadName, _ as registerDiscordListener, b as resolveDiscordReplyTarget, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BsIBTjLB.js";
24
+ import { S as sanitizeDiscordThreadName, _ as registerDiscordListener, b as resolveDiscordReplyTarget, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BXK0P155.js";
25
25
  import { i as buildDiscordMediaPayload } from "./message-utils-BZriBbcg.js";
26
- import { t as createDiscordMessageHandler } from "./message-handler-CW0aFKln.js";
27
- import "./runtime-api.monitor-CMb4SJdb.js";
26
+ import { t as createDiscordMessageHandler } from "./message-handler-Jsc36DUW.js";
27
+ import "./runtime-api.monitor-D97Sc6-n.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, 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,5 +1,5 @@
1
1
  import "./allow-list-CBI-M84K.js";
2
- import "./provider-BsIBTjLB.js";
2
+ import "./provider-BXK0P155.js";
3
3
  import "./message-utils-BZriBbcg.js";
4
- import "./message-handler-CW0aFKln.js";
4
+ import "./message-handler-Jsc36DUW.js";
5
5
  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-BKSpa4GB.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-CBI-M84K.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-CEwuGaWT.js";
4
- import { S as sanitizeDiscordThreadName, _ as registerDiscordListener, b as resolveDiscordReplyTarget, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BsIBTjLB.js";
4
+ import { S as sanitizeDiscordThreadName, _ as registerDiscordListener, b as resolveDiscordReplyTarget, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BXK0P155.js";
5
5
  import { i as buildDiscordMediaPayload } from "./message-utils-BZriBbcg.js";
6
- import { t as createDiscordMessageHandler } from "./message-handler-CW0aFKln.js";
7
- import "./runtime-api.monitor-CMb4SJdb.js";
6
+ import { t as createDiscordMessageHandler } from "./message-handler-Jsc36DUW.js";
7
+ import "./runtime-api.monitor-D97Sc6-n.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 };
package/dist/test-api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as discordPlugin } from "./channel-Do2rHpEK.js";
1
+ import { t as discordPlugin } from "./channel-n7fwA0Rx.js";
2
2
  import { n as discordOutbound } from "./outbound-adapter-C54-43UU.js";
3
3
  import { t as __testing } from "./thread-bindings.manager-XKdkYEit.js";
4
4
  import { n as buildDiscordInboundAccessContext } from "./inbound-context-CzEAvKgx.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.5.16-beta.6",
3
+ "version": "2026.5.18-beta.1",
4
4
  "description": "OpenClaw Discord channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,7 +21,7 @@
21
21
  "openclaw": "workspace:*"
22
22
  },
23
23
  "peerDependencies": {
24
- "openclaw": ">=2026.5.16-beta.6"
24
+ "openclaw": ">=2026.5.18-beta.1"
25
25
  },
26
26
  "peerDependenciesMeta": {
27
27
  "openclaw": {
@@ -65,10 +65,10 @@
65
65
  "allowInvalidConfigRecovery": true
66
66
  },
67
67
  "compat": {
68
- "pluginApi": ">=2026.5.16-beta.6"
68
+ "pluginApi": ">=2026.5.18-beta.1"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.5.16-beta.6"
71
+ "openclawVersion": "2026.5.18-beta.1"
72
72
  },
73
73
  "release": {
74
74
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-BsIBTjLB.js";
2
- export { monitorDiscordProvider };