@openclaw/discord 2026.6.6 → 2026.6.8-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.
@@ -1,2 +1,2 @@
1
- import { t as handleDiscordAction } from "./runtime-CTEQkMzj.js";
1
+ import { t as handleDiscordAction } from "./runtime-C80YEJ7Z.js";
2
2
  export { handleDiscordAction };
package/dist/api.js CHANGED
@@ -6,11 +6,11 @@ import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./
6
6
  import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-DMPTzuo7.js";
7
7
  import "./targets-CKaNidbk.js";
8
8
  import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CKzQAqFF.js";
9
- import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-D1F1Rd9W.js";
9
+ import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-b0hY1EJw.js";
10
10
  import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
11
11
  import { t as discordSetupPlugin } from "./channel.setup-By5cfELZ.js";
12
12
  import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-kjrWDeDg.js";
13
- import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqDSVry3.js";
13
+ import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-BS2qnhXF.js";
14
14
  import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-Bu7FYOsl.js";
15
15
  import { t as fetchPluralKitMessageInfo } from "./pluralkit-SYmlmerw.js";
16
16
  import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
@@ -18,6 +18,6 @@ import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65
18
18
  import { i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.js";
19
19
  import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
20
20
  //#region extensions/discord/api.ts
21
- const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-VhdpzLxz.js")).handleDiscordMessageAction(...args);
21
+ const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-DX5iW6ut.js")).handleDiscordMessageAction(...args);
22
22
  //#endregion
23
23
  export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_COMPONENT_ATTACHMENT_PREFIX, DISCORD_COMPONENT_CUSTOM_ID_KEY, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DISCORD_MODAL_CUSTOM_ID_KEY, DiscordApiError, DiscordFormModal, buildDiscordComponentCustomId, buildDiscordComponentMessage, buildDiscordComponentMessageFlags, buildDiscordInteractiveComponents, buildDiscordModalCustomId, collectDiscordSecurityAuditFindings, collectDiscordStatusIssues, createDiscordActionGate, createDiscordFormModal, discordPlugin, discordSetupPlugin, fetchDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchPluralKitMessageInfo, formatDiscordComponentEventText, getDiscordExecApprovalApprovers, handleDiscordMessageAction, handleDiscordSubagentDeliveryTarget, handleDiscordSubagentEnded, handleDiscordSubagentSpawning, inspectDiscordAccount, isDiscordExecApprovalApprover, isDiscordExecApprovalClientEnabled, listDiscordAccountIds, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, listEnabledDiscordAccounts, looksLikeDiscordTargetId, mergeAbortSignals, mergeDiscordAccountConfig, normalizeDiscordMessagingTarget, normalizeDiscordOutboundTarget, normalizeExplicitDiscordSessionKey, parseApplicationIdFromToken, parseDiscordComponentCustomId, parseDiscordComponentCustomIdForInteraction as parseDiscordComponentCustomIdForCarbon, parseDiscordComponentCustomIdForInteraction, parseDiscordModalCustomId, parseDiscordModalCustomIdForInteraction as parseDiscordModalCustomIdForCarbon, parseDiscordModalCustomIdForInteraction, parseDiscordSendTarget, parseDiscordTarget, probeDiscord, readDiscordComponentSpec, requestDiscord, resolveDefaultDiscordAccountId, resolveDiscordAccount, resolveDiscordAccountConfig, resolveDiscordChannelId, resolveDiscordComponentAttachmentName, resolveDiscordGroupRequireMention, resolveDiscordGroupToolPolicy, resolveDiscordMaxLinesPerMessage, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordRuntimeGroupPolicy, resolveDiscordTarget, shouldSuppressLocalDiscordExecApprovalPrompt, tryHandleDiscordMessageActionGuildAdmin };
@@ -37,7 +37,7 @@ function resolveDiscordActionExecutionMode({ action }) {
37
37
  }
38
38
  let discordChannelActionsRuntimePromise;
39
39
  async function loadDiscordChannelActionsRuntime() {
40
- discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-VhdpzLxz.js");
40
+ discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-DX5iW6ut.js");
41
41
  return await discordChannelActionsRuntimePromise;
42
42
  }
43
43
  function listDiscoverableDiscordAccounts(cfg) {
@@ -1,10 +1,10 @@
1
1
  import { Ut as resolveDiscordChannelId } from "./send.receipt-DsQWEQ2O.js";
2
2
  import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-D-CYw0-b.js";
3
- import { t as handleDiscordAction } from "./runtime-CTEQkMzj.js";
3
+ import { t as handleDiscordAction } from "./runtime-C80YEJ7Z.js";
4
4
  import "./targets-CKaNidbk.js";
5
5
  import "./action-runtime-api.js";
6
6
  import { r as notifyDiscordInboundEventOutboundSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
7
- import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CqDSVry3.js";
7
+ import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-BS2qnhXF.js";
8
8
  import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
10
10
  import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
@@ -5,7 +5,7 @@ import { x as resolveDiscordOutboundSessionRoute } from "./components-D-CYw0-b.j
5
5
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
6
6
  import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-CKzQAqFF.js";
7
7
  import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-xwjIczO0.js";
8
- import { t as discordMessageActions$1 } from "./channel-actions-mj6l-3MR.js";
8
+ import { t as discordMessageActions$1 } from "./channel-actions-BnPHwCZ_.js";
9
9
  import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
10
10
  import { n as discordOutbound } from "./outbound-adapter-CmN7ao1t.js";
11
11
  import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-D11J9bXI.js";
@@ -131,7 +131,7 @@ const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./re
131
131
  const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-C9YT7wF2.js").then((n) => n.a));
132
132
  const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-DMPTzuo7.js").then((n) => n.r));
133
133
  async function loadDiscordProviderRuntime() {
134
- discordProviderRuntimePromise ??= import("./provider.runtime-DEIIsrzu.js");
134
+ discordProviderRuntimePromise ??= import("./provider.runtime-nb-6cRoy.js");
135
135
  return await discordProviderRuntimePromise;
136
136
  }
137
137
  async function loadDiscordProbeRuntime() {
@@ -1,2 +1,2 @@
1
- import { t as discordPlugin } from "./channel-D1F1Rd9W.js";
1
+ import { t as discordPlugin } from "./channel-b0hY1EJw.js";
2
2
  export { discordPlugin };
@@ -1,4 +1,4 @@
1
- import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CTEQkMzj.js";
1
+ import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-C80YEJ7Z.js";
2
2
  import "./action-runtime-api.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
@@ -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-C8oC51um.js";
5
5
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
6
- import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-TciPJrrX.js";
6
+ import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-DrScDA1p.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";
@@ -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-VFjwLei2.js");
181
+ messageProcessRuntimePromise ??= import("./message-handler.process-Dp5NQT05.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-Bd7_OArA.js");
310
+ messagePreflightRuntimePromise ??= import("./message-handler.preflight-DAnLOeDA.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-iSWjCYjB.js";
6
6
  import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-304M1PMr.js";
7
7
  import "./thread-bindings-DO32M2kW.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-TciPJrrX.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-DrScDA1p.js";
9
9
  import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-Bx993JLN.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";
@@ -447,7 +447,7 @@ async function loadSystemEventsRuntime() {
447
447
  return await systemEventsRuntimePromise;
448
448
  }
449
449
  async function loadDiscordThreadingRuntime() {
450
- discordThreadingRuntimePromise ??= import("./provider-TciPJrrX.js").then((n) => n.S);
450
+ discordThreadingRuntimePromise ??= import("./provider-DrScDA1p.js").then((n) => n.S);
451
451
  return await discordThreadingRuntimePromise;
452
452
  }
453
453
  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-CmN7ao1t.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-C5TBc_9x.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-TciPJrrX.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-DrScDA1p.js";
14
14
  import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-Bx993JLN.js";
15
- import { n as createDiscordReplyTypingFeedback } from "./message-handler-CSLoBcem.js";
15
+ import { n as createDiscordReplyTypingFeedback } from "./message-handler-CQVkXHMN.js";
16
16
  import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
17
17
  import { MessageFlags } from "discord-api-types/v10";
18
18
  import path from "node:path";
@@ -296,11 +296,11 @@ async function resolveDiscordTextCommandAccess(params) {
296
296
  }
297
297
  //#endregion
298
298
  //#region extensions/discord/src/monitor/thread-title.ts
299
- const DEFAULT_THREAD_TITLE_TIMEOUT_MS = 1e4;
299
+ const DEFAULT_THREAD_TITLE_TIMEOUT_MS = 6e4;
300
300
  const MAX_THREAD_TITLE_SOURCE_CHARS = 600;
301
301
  const MAX_THREAD_TITLE_CHANNEL_NAME_CHARS = 120;
302
302
  const MAX_THREAD_TITLE_CHANNEL_DESCRIPTION_CHARS = 320;
303
- const DISCORD_THREAD_TITLE_MAX_TOKENS = 512;
303
+ const DISCORD_THREAD_TITLE_MAX_TOKENS = 4096;
304
304
  const DISCORD_THREAD_TITLE_SYSTEM_PROMPT = "Generate a concise Discord thread title (3-6 words). Return only the title. Use channel context when provided and avoid redundant channel-name words unless needed for clarity.";
305
305
  async function generateThreadTitle(params) {
306
306
  const sourceText = params.messageText.trim();
@@ -335,6 +335,7 @@ async function generateThreadTitle(params) {
335
335
  }
336
336
  }
337
337
  async function completeThreadTitle(params) {
338
+ const maxTokens = Math.min(DISCORD_THREAD_TITLE_MAX_TOKENS, Math.floor(params.model.maxTokens));
338
339
  return await withAbortTimeout({
339
340
  timeoutMs: params.timeoutMs,
340
341
  createTimeoutError: () => /* @__PURE__ */ new Error(`thread-title timed out after ${params.timeoutMs}ms`),
@@ -350,7 +351,7 @@ async function completeThreadTitle(params) {
350
351
  }]
351
352
  },
352
353
  options: {
353
- maxTokens: DISCORD_THREAD_TITLE_MAX_TOKENS,
354
+ maxTokens,
354
355
  signal
355
356
  }
356
357
  })
@@ -9833,7 +9834,7 @@ function logDiscordStartupPhase(params) {
9833
9834
  });
9834
9835
  }
9835
9836
  async function loadDiscordVoiceRuntime() {
9836
- const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-BGJHboPr.js");
9837
+ const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-BU1vkOeO.js");
9837
9838
  discordVoiceRuntimePromise = promise;
9838
9839
  try {
9839
9840
  return await promise;
@@ -9843,7 +9844,7 @@ async function loadDiscordVoiceRuntime() {
9843
9844
  }
9844
9845
  }
9845
9846
  async function loadDiscordProviderSessionRuntime() {
9846
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-BevqNU6t.js");
9847
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-DXTzSYOJ.js");
9847
9848
  discordProviderSessionRuntimePromise = promise;
9848
9849
  try {
9849
9850
  return await promise;
@@ -1,6 +1,6 @@
1
1
  import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DO32M2kW.js";
2
2
  import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-C9YT7wF2.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-CSLoBcem.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-CQVkXHMN.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-DrScDA1p.js";
2
+ export { monitorDiscordProvider };
@@ -723,6 +723,36 @@ async function handleDiscordReactionMessagingAction(ctx) {
723
723
  function hasDiscordComponentObjectKeys(value) {
724
724
  return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length > 0);
725
725
  }
726
+ function readDiscordThreadArchiveTimestamp(thread) {
727
+ if (!thread || typeof thread !== "object" || Array.isArray(thread)) return;
728
+ const metadata = thread.thread_metadata;
729
+ if (metadata && typeof metadata === "object" && !Array.isArray(metadata)) {
730
+ const archiveTimestamp = metadata.archive_timestamp;
731
+ if (typeof archiveTimestamp === "string" && archiveTimestamp.trim()) return archiveTimestamp;
732
+ }
733
+ }
734
+ function normalizeDiscordThreadListActionResult(params) {
735
+ const record = params.value && typeof params.value === "object" && !Array.isArray(params.value) ? params.value : void 0;
736
+ const threadItems = Array.isArray(record?.threads) ? record.threads : [];
737
+ const hasMore = record?.has_more === true;
738
+ const nextBefore = params.includeArchived && hasMore ? readDiscordThreadArchiveTimestamp(threadItems[threadItems.length - 1]) : void 0;
739
+ return {
740
+ ok: true,
741
+ threads: params.value,
742
+ complete: !hasMore,
743
+ hasMore,
744
+ returnedCount: threadItems.length,
745
+ source: params.includeArchived ? "discord.threadList.archived" : "discord.threadList.active",
746
+ query: {
747
+ guildId: params.guildId,
748
+ ...params.channelId ? { channelId: params.channelId } : {},
749
+ includeArchived: params.includeArchived,
750
+ ...params.before ? { before: params.before } : {},
751
+ ...params.limit !== void 0 ? { limit: params.limit } : {}
752
+ },
753
+ ...nextBefore ? { nextBefore } : {}
754
+ };
755
+ }
726
756
  async function appendDiscordThreadRenameResult(ctx, params) {
727
757
  const threadName = params.threadName?.trim();
728
758
  if (!threadName) return params.payload;
@@ -922,16 +952,20 @@ async function handleDiscordMessageSendAction(ctx) {
922
952
  const includeArchived = readBooleanParam(ctx.params, "includeArchived");
923
953
  const before = readStringParam(ctx.params, "before");
924
954
  const limit = readPositiveIntegerParam(ctx.params, "limit");
925
- return jsonResult({
926
- ok: true,
927
- threads: await discordMessagingActionRuntime.listThreadsDiscord({
955
+ return jsonResult(normalizeDiscordThreadListActionResult({
956
+ value: await discordMessagingActionRuntime.listThreadsDiscord({
928
957
  guildId,
929
958
  channelId,
930
959
  includeArchived,
931
960
  before,
932
961
  limit
933
- }, ctx.withOpts())
934
- });
962
+ }, ctx.withOpts()),
963
+ guildId,
964
+ channelId,
965
+ includeArchived: includeArchived === true,
966
+ before,
967
+ limit
968
+ }));
935
969
  }
936
970
  case "threadReply": {
937
971
  if (!ctx.isActionEnabled("threads")) throw new Error("Discord threads are disabled.");
@@ -1,3 +1,3 @@
1
- import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CTEQkMzj.js";
2
- import { t as discordMessageActions } from "./channel-actions-mj6l-3MR.js";
1
+ import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-C80YEJ7Z.js";
2
+ import { t as discordMessageActions } from "./channel-actions-BnPHwCZ_.js";
3
3
  export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };
@@ -6,9 +6,9 @@ import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive
6
6
  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";
7
7
  import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-zGsXF-up.js";
8
8
  import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-C8oC51um.js";
9
- import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CTEQkMzj.js";
9
+ import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-C80YEJ7Z.js";
10
10
  import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
11
- import { t as discordMessageActions } from "./channel-actions-mj6l-3MR.js";
11
+ import { t as discordMessageActions } from "./channel-actions-BnPHwCZ_.js";
12
12
  import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-iSWjCYjB.js";
13
13
  import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
14
14
  import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-Rautpk8n.js";
@@ -21,10 +21,10 @@ import { a as isAbortError, c as normalizeDiscordListenerTimeoutMs, i as DISCORD
21
21
  import "./runtime-api.actions.js";
22
22
  import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BlfewK04.js";
23
23
  import "./runtime-api.lookup.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-TciPJrrX.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-DrScDA1p.js";
25
25
  import { i as buildDiscordMediaPayload } from "./message-utils-Bx993JLN.js";
26
- import { t as createDiscordMessageHandler } from "./message-handler-CSLoBcem.js";
27
- import "./runtime-api.monitor-XwB3ioXs.js";
26
+ import { t as createDiscordMessageHandler } from "./message-handler-CQVkXHMN.js";
27
+ import "./runtime-api.monitor-D8KNDAd5.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, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, 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, runDiscordTaskWithTimeout, 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-C5TBc_9x.js";
3
- import "./provider-TciPJrrX.js";
3
+ import "./provider-DrScDA1p.js";
4
4
  import "./message-utils-Bx993JLN.js";
5
- import "./message-handler-CSLoBcem.js";
5
+ import "./message-handler-CQVkXHMN.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 isAbortError, c as normalizeDiscordListenerTimeoutMs, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordInboundWorkerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, u as runDiscordTaskWithTimeout } from "./timeouts-C5TBc_9x.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-TciPJrrX.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-DrScDA1p.js";
5
5
  import { i as buildDiscordMediaPayload } from "./message-utils-Bx993JLN.js";
6
- import { t as createDiscordMessageHandler } from "./message-handler-CSLoBcem.js";
7
- import "./runtime-api.monitor-XwB3ioXs.js";
6
+ import { t as createDiscordMessageHandler } from "./message-handler-CQVkXHMN.js";
7
+ import "./runtime-api.monitor-D8KNDAd5.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, isAbortError, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.6.6",
3
+ "version": "2026.6.8-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/discord",
9
- "version": "2026.6.6",
9
+ "version": "2026.6.8-beta.2",
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.6"
19
+ "openclaw": ">=2026.6.8-beta.2"
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.6",
3
+ "version": "2026.6.8-beta.2",
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.6"
19
+ "openclaw": ">=2026.6.8-beta.2"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
@@ -27,7 +27,7 @@
27
27
  "extensions": [
28
28
  "./index.ts"
29
29
  ],
30
- "setupEntry": "./setup-entry.ts",
30
+ "setupEntry": "./dist/setup-entry.js",
31
31
  "setupFeatures": {
32
32
  "legacyStateMigrations": true
33
33
  },
@@ -63,10 +63,10 @@
63
63
  "allowInvalidConfigRecovery": true
64
64
  },
65
65
  "compat": {
66
- "pluginApi": ">=2026.6.6"
66
+ "pluginApi": ">=2026.6.8-beta.2"
67
67
  },
68
68
  "build": {
69
- "openclawVersion": "2026.6.6"
69
+ "openclawVersion": "2026.6.8-beta.2"
70
70
  },
71
71
  "release": {
72
72
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-TciPJrrX.js";
2
- export { monitorDiscordProvider };