@openclaw/discord 2026.5.5-beta.1 → 2026.5.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-DCzV1kRa.js";
10
+ import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-D8E-S2xn.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-_9O7nHSa.js");
134
+ discordProviderRuntimePromise ??= import("./provider.runtime-2FGjVR8w.js");
135
135
  return await discordProviderRuntimePromise;
136
136
  }
137
137
  async function loadDiscordProbeRuntime() {
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-DCzV1kRa.js";
1
+ import { t as discordPlugin } from "./channel-D8E-S2xn.js";
2
2
  export { discordPlugin };
@@ -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-DYhlpFEl.js");
176
+ messagePreflightRuntimePromise ??= import("./message-handler.preflight-FbHEumdA.js");
177
177
  return await messagePreflightRuntimePromise;
178
178
  }
179
179
  function isNonEmptyString(value) {
@@ -679,10 +679,6 @@ async function preflightDiscordMessage(params) {
679
679
  }
680
680
  const botId = params.botUserId;
681
681
  const baseText = resolveDiscordMessageText(message, { includeForwarded: false });
682
- if (!isDirectMessage && baseText && hasControlCommand(baseText, params.cfg)) {
683
- logVerbose(`discord: drop text-based slash command ${message.id} (intercepted at gateway)`);
684
- return null;
685
- }
686
682
  recordChannelActivity({
687
683
  channel: "discord",
688
684
  accountId: params.accountId,
@@ -3455,23 +3455,31 @@ const sharedGatewayIdentifyLimiter = new GatewayIdentifyLimiter();
3455
3455
  //#endregion
3456
3456
  //#region extensions/discord/src/internal/gateway-lifecycle.ts
3457
3457
  var GatewayHeartbeatTimers = class {
3458
- start(params) {
3459
- this.stop();
3460
- const random = params.random ?? Math.random;
3461
- this.firstHeartbeatTimeout = setTimeout(params.onHeartbeat, Math.max(0, params.intervalMs * random()));
3462
- this.firstHeartbeatTimeout.unref?.();
3463
- this.heartbeatInterval = setInterval(() => {
3458
+ scheduleHeartbeatCycle(params) {
3459
+ this.heartbeatInterval = setTimeout(() => {
3460
+ this.heartbeatInterval = void 0;
3464
3461
  if (!params.isAcked()) {
3465
3462
  params.onAckTimeout();
3466
3463
  return;
3467
3464
  }
3468
3465
  params.onHeartbeat();
3466
+ this.scheduleHeartbeatCycle(params);
3469
3467
  }, params.intervalMs);
3470
3468
  this.heartbeatInterval.unref?.();
3471
3469
  }
3470
+ start(params) {
3471
+ this.stop();
3472
+ const random = params.random ?? Math.random;
3473
+ this.firstHeartbeatTimeout = setTimeout(() => {
3474
+ this.firstHeartbeatTimeout = void 0;
3475
+ params.onHeartbeat();
3476
+ this.scheduleHeartbeatCycle(params);
3477
+ }, Math.max(0, params.intervalMs * random()));
3478
+ this.firstHeartbeatTimeout.unref?.();
3479
+ }
3472
3480
  stop() {
3473
3481
  if (this.heartbeatInterval) {
3474
- clearInterval(this.heartbeatInterval);
3482
+ clearTimeout(this.heartbeatInterval);
3475
3483
  this.heartbeatInterval = void 0;
3476
3484
  }
3477
3485
  if (this.firstHeartbeatTimeout) {
@@ -8144,7 +8152,7 @@ async function loadDiscordVoiceRuntime() {
8144
8152
  }
8145
8153
  }
8146
8154
  async function loadDiscordProviderSessionRuntime() {
8147
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CIEjB6UE.js");
8155
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-BMF3HBc2.js");
8148
8156
  discordProviderSessionRuntimePromise = promise;
8149
8157
  try {
8150
8158
  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-Bcw_CIgz.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-CSPx1uqO.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-DqqLCjug.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-BXfM-W-H.js";
24
+ import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-DqqLCjug.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-Bcw_CIgz.js";
28
- import "./runtime-api.monitor-Dzus81NN.js";
27
+ import { t as createDiscordMessageHandler } from "./message-handler-CSPx1uqO.js";
28
+ import "./runtime-api.monitor-DPIfax5N.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-BXfM-W-H.js";
2
+ import "./provider-DqqLCjug.js";
3
3
  import "./message-utils-Dmgu-7fC.js";
4
4
  import "./threading-Bi95Nz8h.js";
5
- import "./message-handler-Bcw_CIgz.js";
5
+ import "./message-handler-CSPx1uqO.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-BXfM-W-H.js";
4
+ import { a as createDiscordNativeCommand, i as waitForDiscordGatewayPluginRegistration, n as createDiscordGatewayPlugin, o as registerDiscordListener, r as resolveDiscordGatewayIntents, t as monitorDiscordProvider } from "./provider-DqqLCjug.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-Bcw_CIgz.js";
8
- import "./runtime-api.monitor-Dzus81NN.js";
7
+ import { t as createDiscordMessageHandler } from "./message-handler-CSPx1uqO.js";
8
+ import "./runtime-api.monitor-DPIfax5N.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-DCzV1kRa.js";
1
+ import { t as discordPlugin } from "./channel-D8E-S2xn.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.5-beta.1",
3
+ "version": "2026.5.5-beta.2",
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.5-beta.1"
24
+ "openclaw": ">=2026.5.5-beta.2"
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.5-beta.1"
68
+ "pluginApi": ">=2026.5.5-beta.2"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.5.5-beta.1"
71
+ "openclawVersion": "2026.5.5-beta.2"
72
72
  },
73
73
  "release": {
74
74
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-BXfM-W-H.js";
2
- export { monitorDiscordProvider };