@openclaw/discord 2026.5.4-beta.3 → 2026.5.5-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
@@ -7,7 +7,7 @@ import { _ as parseDiscordModalCustomIdForInteraction, a as buildDiscordComponen
7
7
  import { t as buildDiscordInteractiveComponents } from "./shared-interactive-KgJjCqnB.js";
8
8
  import "./targets-DcNwQ9vN.js";
9
9
  import { a as shouldSuppressLocalDiscordExecApprovalPrompt, i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers, r as isDiscordExecApprovalApprover } from "./approval-shared-GfJeMdLu.js";
10
- import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-wqYExrBU.js";
10
+ import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-DCzV1kRa.js";
11
11
  import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-Daag9II6.js";
12
12
  import { t as discordSetupPlugin } from "./channel.setup-C-HEMkxU.js";
13
13
  import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-DgpxQHUn.js";
@@ -131,7 +131,7 @@ const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import(".
131
131
  const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DPJkRKx1.js").then((n) => n.n));
132
132
  const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-BxPG0IHV.js").then((n) => n.a));
133
133
  async function loadDiscordProviderRuntime() {
134
- discordProviderRuntimePromise ??= import("./provider.runtime-gtpKILBo.js");
134
+ discordProviderRuntimePromise ??= import("./provider.runtime-_9O7nHSa.js");
135
135
  return await discordProviderRuntimePromise;
136
136
  }
137
137
  async function loadDiscordProbeRuntime() {
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-wqYExrBU.js";
1
+ import { t as discordPlugin } from "./channel-DCzV1kRa.js";
2
2
  export { discordPlugin };
@@ -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-B-CiOj1K.js");
124
+ messageProcessRuntimePromise ??= import("./message-handler.process-CVZ-6HNh.js");
125
125
  return await messageProcessRuntimePromise;
126
126
  }
127
127
  async function processDiscordQueuedMessage(params) {
@@ -495,6 +495,8 @@ function createDiscordDraftPreviewController(params) {
495
495
  });
496
496
  let previewToolProgressSuppressed = false;
497
497
  let previewToolProgressLines = [];
498
+ let reasoningProgressRawText = "";
499
+ let lastReasoningProgressLine;
498
500
  const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
499
501
  const renderProgressDraft = async (options) => {
500
502
  if (!draftStream || discordStreamMode !== "progress") return;
@@ -518,6 +520,8 @@ function createDiscordDraftPreviewController(params) {
518
520
  draftChunker?.reset();
519
521
  previewToolProgressSuppressed = false;
520
522
  previewToolProgressLines = [];
523
+ reasoningProgressRawText = "";
524
+ lastReasoningProgressLine = void 0;
521
525
  };
522
526
  const forceNewMessageIfNeeded = () => {
523
527
  if (shouldSplitPreviewMessages && hasStreamedMessage) {
@@ -554,8 +558,9 @@ function createDiscordDraftPreviewController(params) {
554
558
  if (!draftStream) return;
555
559
  if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
556
560
  const normalized = line?.replace(/\s+/g, " ").trim();
561
+ if (!normalized) return;
557
562
  if (discordStreamMode !== "progress") {
558
- if (!previewToolProgressEnabled || previewToolProgressSuppressed || !normalized) return;
563
+ if (!previewToolProgressEnabled || previewToolProgressSuppressed) return;
559
564
  if (previewToolProgressLines.at(-1) === normalized) return;
560
565
  previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
561
566
  const previewText = formatChannelProgressDraftText({
@@ -577,6 +582,23 @@ function createDiscordDraftPreviewController(params) {
577
582
  await progressDraftGate.noteWork();
578
583
  if (alreadyStarted && progressDraftGate.hasStarted) await renderProgressDraft();
579
584
  },
585
+ async pushReasoningProgress(text) {
586
+ if (!draftStream || discordStreamMode !== "progress" || !text) return;
587
+ reasoningProgressRawText = mergeReasoningProgressText(reasoningProgressRawText, text);
588
+ const normalized = normalizeReasoningProgressLine(reasoningProgressRawText);
589
+ if (!normalized) return;
590
+ if (previewToolProgressEnabled && !previewToolProgressSuppressed) {
591
+ const priorIndex = lastReasoningProgressLine === void 0 ? -1 : previewToolProgressLines.lastIndexOf(lastReasoningProgressLine);
592
+ if (priorIndex >= 0) {
593
+ previewToolProgressLines = [...previewToolProgressLines];
594
+ previewToolProgressLines[priorIndex] = normalized;
595
+ } else previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
596
+ lastReasoningProgressLine = normalized;
597
+ }
598
+ const alreadyStarted = progressDraftGate.hasStarted;
599
+ await progressDraftGate.noteWork();
600
+ if (alreadyStarted && progressDraftGate.hasStarted) await renderProgressDraft();
601
+ },
580
602
  resolvePreviewFinalText(text) {
581
603
  if (typeof text !== "string") return;
582
604
  const formatted = convertMarkdownTables(stripInlineDirectiveTagsForDelivery(text).text, params.tableMode);
@@ -662,6 +684,20 @@ function createDiscordDraftPreviewController(params) {
662
684
  }
663
685
  };
664
686
  }
687
+ function normalizeReasoningProgressLine(text) {
688
+ return text.replace(/^\s*(?:>\s*)?Reasoning:\s*/i, "").replace(/\s+/g, " ").trim();
689
+ }
690
+ function mergeReasoningProgressText(current, incoming) {
691
+ if (!current) return incoming;
692
+ const normalizedCurrent = normalizeReasoningProgressLine(current);
693
+ const normalizedIncoming = normalizeReasoningProgressLine(incoming);
694
+ if (!normalizedIncoming || normalizedIncoming === normalizedCurrent) return current;
695
+ if (isReasoningSnapshotText(incoming) || normalizedIncoming.startsWith(normalizedCurrent)) return incoming;
696
+ return `${current}${incoming}`;
697
+ }
698
+ function isReasoningSnapshotText(text) {
699
+ return /^\s*(?:>\s*)?Reasoning:\s*/i.test(text);
700
+ }
665
701
  //#endregion
666
702
  //#region extensions/discord/src/monitor/message-handler.process.ts
667
703
  function sleep(ms) {
@@ -1083,8 +1119,9 @@ async function processDiscordMessage(ctx, observer) {
1083
1119
  onReasoningEnd: draftPreview.draftStream ? () => draftPreview.handleAssistantMessageBoundary() : void 0,
1084
1120
  onModelSelected,
1085
1121
  suppressDefaultToolProgressMessages: draftPreview.suppressDefaultToolProgressMessages ? true : void 0,
1086
- onReasoningStream: async () => {
1122
+ onReasoningStream: async (payload) => {
1087
1123
  await statusReactions.setThinking();
1124
+ await draftPreview.pushReasoningProgress(payload?.text);
1088
1125
  },
1089
1126
  onToolStart: async (payload) => {
1090
1127
  if (isProcessAborted(abortSignal)) return;
@@ -8144,7 +8144,7 @@ async function loadDiscordVoiceRuntime() {
8144
8144
  }
8145
8145
  }
8146
8146
  async function loadDiscordProviderSessionRuntime() {
8147
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-7BukaDmt.js");
8147
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CIEjB6UE.js");
8148
8148
  discordProviderSessionRuntimePromise = promise;
8149
8149
  try {
8150
8150
  return await promise;
@@ -1,6 +1,6 @@
1
1
  import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-C7GN5ebh.js";
2
2
  import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-BxPG0IHV.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-Bcw_CIgz.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-BXfM-W-H.js";
2
+ export { monitorDiscordProvider };
@@ -21,11 +21,11 @@ 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-CdKtgVPO.js";
23
23
  import "./runtime-api.lookup.js";
24
- import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-CnLt-Y4Z.js";
24
+ import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-BXfM-W-H.js";
25
25
  import { i as buildDiscordMediaPayload } from "./message-utils-Dmgu-7fC.js";
26
26
  import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-Bi95Nz8h.js";
27
- import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
28
- import "./runtime-api.monitor-B5uT6Cmc.js";
27
+ import { t as createDiscordMessageHandler } from "./message-handler-Bcw_CIgz.js";
28
+ import "./runtime-api.monitor-Dzus81NN.js";
29
29
  import "./runtime-api.send.js";
30
30
  import "./runtime-api.threads.js";
31
31
  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,6 +1,6 @@
1
1
  import "./allow-list-ek-1hMKN.js";
2
- import "./provider-CnLt-Y4Z.js";
2
+ import "./provider-BXfM-W-H.js";
3
3
  import "./message-utils-Dmgu-7fC.js";
4
4
  import "./threading-Bi95Nz8h.js";
5
- import "./message-handler-kDvsxS8t.js";
5
+ import "./message-handler-Bcw_CIgz.js";
6
6
  export {};
@@ -1,9 +1,9 @@
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-BKG4KIVC.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-ek-1hMKN.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-C7jeTtGs.js";
4
- import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-CnLt-Y4Z.js";
4
+ import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-BXfM-W-H.js";
5
5
  import { i as buildDiscordMediaPayload } from "./message-utils-Dmgu-7fC.js";
6
6
  import { o as sanitizeDiscordThreadName, r as resolveDiscordReplyTarget } from "./threading-Bi95Nz8h.js";
7
- import { t as createDiscordMessageHandler } from "./message-handler-kDvsxS8t.js";
8
- import "./runtime-api.monitor-B5uT6Cmc.js";
7
+ import { t as createDiscordMessageHandler } from "./message-handler-Bcw_CIgz.js";
8
+ import "./runtime-api.monitor-Dzus81NN.js";
9
9
  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-wqYExrBU.js";
1
+ import { t as discordPlugin } from "./channel-DCzV1kRa.js";
2
2
  import { n as discordOutbound } from "./outbound-adapter-FG0CgK3I.js";
3
3
  import { t as __testing } from "./thread-bindings.manager-BxPG0IHV.js";
4
4
  import { n as buildDiscordInboundAccessContext } from "./inbound-context-e_oBBJtF.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.5.4-beta.3",
3
+ "version": "2026.5.5-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.4-beta.3"
24
+ "openclaw": ">=2026.5.5-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.4-beta.3"
68
+ "pluginApi": ">=2026.5.5-beta.1"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.5.4-beta.3"
71
+ "openclawVersion": "2026.5.5-beta.1"
72
72
  },
73
73
  "release": {
74
74
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-CnLt-Y4Z.js";
2
- export { monitorDiscordProvider };