@openclaw/discord 2026.7.2-beta.4 → 2026.7.2-beta.5

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.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/dist/{account-inspect-Dztmn4J4.js → account-inspect-SXiCBCgP.js} +1 -1
  3. package/dist/account-inspect-api.js +1 -1
  4. package/dist/{accounts-D2LKPukU.js → accounts-DJTf1LtA.js} +13 -15
  5. package/dist/action-runtime-api.js +1 -1
  6. package/dist/{activities-api-8TMGXUH4.js → activities-api-CHnz7E7t.js} +5 -5
  7. package/dist/activities-api.js +1 -1
  8. package/dist/api.js +16 -16
  9. package/dist/{approval-handler.runtime-ClZpan85.js → approval-handler.runtime-86UuBchU.js} +5 -5
  10. package/dist/{approval-message-safety-LyND6GR3.js → approval-message-safety-yjFtfJcK.js} +2 -2
  11. package/dist/{audit-CFfounXC.js → audit-BF8hmDKp.js} +4 -4
  12. package/dist/{channel-yq-so4jJ.js → channel-DnOg9aoT.js} +19 -18
  13. package/dist/{channel-actions-C8n1zWZ-.js → channel-actions-BweII8kV.js} +4 -4
  14. package/dist/{channel-actions.runtime-CgJy35O0.js → channel-actions.runtime-Dsv063Re.js} +6 -6
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/{channel.setup-Tn_O2B7F.js → channel.setup-Cpv7n0I8.js} +23 -50
  17. package/dist/{chunk-BrZocpfs.js → chunk-CMVEczdm.js} +12 -0
  18. package/dist/{directory-config-DF85-bUY.js → directory-config-677F_rhf.js} +2 -2
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-CrMtTrb0.js → directory-live-BQk4bBOC.js} +6 -6
  21. package/dist/{doctor-CORGPgoY.js → doctor-DIcs6IDL.js} +4 -4
  22. package/dist/{doctor-contract-BPUD3Di9.js → doctor-contract-CCFMIDk9.js} +15 -58
  23. package/dist/doctor-contract-api.js +1 -1
  24. package/dist/{handle-action.guild-admin-DikBWer5.js → handle-action.guild-admin-D14y2JtA.js} +2 -2
  25. package/dist/index.js +2 -2
  26. package/dist/legacy-state-migrations-api.js +1 -34
  27. package/dist/{manager.runtime-DVvlH8NR.js → manager.runtime-asX6a4R4.js} +3 -3
  28. package/dist/{message-handler-1ui-YxsF.js → message-handler-CxjL-a-8.js} +7 -47
  29. package/dist/message-handler.history-CJOsN9w5.js +28 -0
  30. package/dist/{message-handler.preflight-CAEQvP3t.js → message-handler.preflight-D-5zBjwh.js} +33 -48
  31. package/dist/{message-handler.process-REBztvIW.js → message-handler.process-W9QxWA1g.js} +58 -44
  32. package/dist/{message-utils-ajbkdTVA.js → message-utils-DSxXsDcG.js} +1 -1
  33. package/dist/model-picker-preference-primitives-D25pnCOu.js +37 -0
  34. package/dist/{outbound-adapter-XZWo4_HD.js → outbound-adapter-kse7KV--.js} +61 -96
  35. package/dist/{outbound-components-CTFDDcq5.js → outbound-components-DNgLQwXl.js} +3 -3
  36. package/dist/{outbound-session-route-D_nc_Ayk.js → outbound-session-route-DJUzy5WA.js} +1 -1
  37. package/dist/{pluralkit-CCovPs9s.js → pluralkit-DbN-Z7BG.js} +1 -1
  38. package/dist/{probe-Bci2pS8M.js → probe-BYRdyuw1.js} +43 -53
  39. package/dist/{probe.runtime-C88gnnXj.js → probe.runtime-uyKOQSBB.js} +1 -1
  40. package/dist/{provider-CfiChtjf.js → provider-Ca5Gua1B.js} +143 -123
  41. package/dist/{provider-session.runtime-D9GTBKPg.js → provider-session.runtime-IEheobg4.js} +3 -3
  42. package/dist/provider.runtime-Bn8horYu.js +2 -0
  43. package/dist/{resolve-allowlist-common-C1hTvZa4.js → resolve-allowlist-common-BU6_eGKg.js} +1 -1
  44. package/dist/{resolve-channels-CmFAdMeQ.js → resolve-channels-ByNsOMJj.js} +2 -2
  45. package/dist/{resolve-users-Cmu75lZy.js → resolve-users-CgWAonw-.js} +2 -2
  46. package/dist/{runtime-D-6AugWA.js → runtime-BZm4_qXV.js} +9 -9
  47. package/dist/runtime-api.actions.js +2 -2
  48. package/dist/runtime-api.js +19 -19
  49. package/dist/runtime-api.lookup.js +5 -5
  50. package/dist/{runtime-api.monitor-DPa2ZoSK.js → runtime-api.monitor-BKYTUIuf.js} +2 -2
  51. package/dist/runtime-api.monitor.js +4 -4
  52. package/dist/runtime-api.send.js +6 -6
  53. package/dist/runtime-api.threads.js +3 -3
  54. package/dist/{runtime-TwM8IrZU.js → runtime-h03Wce1c.js} +2 -2
  55. package/dist/security-audit-contract-api.js +1 -1
  56. package/dist/{security-audit-njzOejQp.js → security-audit-jGnJF__m.js} +38 -0
  57. package/dist/{security-audit.runtime-DZbDdAnw.js → security-audit.runtime-CPN0xFYz.js} +1 -1
  58. package/dist/{send-CfnXLUXq.js → send-C_PfNVFH.js} +5 -5
  59. package/dist/{send.components-V7cyCKbH.js → send.components-BrfbRJNq.js} +5 -5
  60. package/dist/{send.outbound-BbC2qjpH.js → send.outbound-1t1CryCK.js} +10 -35
  61. package/dist/{send.reactions-bLrJCZ4G.js → send.reactions-gesJG-Yp.js} +2 -2
  62. package/dist/{send.shared-Dfacnk-E.js → send.shared-BRGI9T9F.js} +3 -3
  63. package/dist/session-binding-contract-api.js +1 -1
  64. package/dist/setup-plugin-api.js +1 -1
  65. package/dist/{shared-DMA7f3a8.js → shared--6-q1Zhl.js} +5 -5
  66. package/dist/{subagent-hooks-kFyJQ-MK.js → subagent-hooks-Dx9hr5Qy.js} +3 -3
  67. package/dist/subagent-hooks-api.js +2 -2
  68. package/dist/{subagent-progress-mjPRFz-a.js → subagent-progress-BZREb7jm.js} +2 -2
  69. package/dist/{system-events-BSlhBq3u.js → system-events-tVfIe6Xm.js} +1 -1
  70. package/dist/{target-resolver-Bo1oWLPO.js → target-resolver-_m_TsenB.js} +3 -3
  71. package/dist/targets-DqNz_mmW.js +3 -0
  72. package/dist/{thread-bindings-DAHJuT22.js → thread-bindings-u_7pNz5d.js} +4 -4
  73. package/dist/{thread-bindings.discord-api-C_tCQcv3.js → thread-bindings.discord-api-DOCKdVgx.js} +4 -4
  74. package/dist/{thread-bindings.manager-DlZEGvC1.js → thread-bindings.manager-BB-OD9-d.js} +5 -4
  75. package/dist/{transcripts-source-CyJ-sc3n.js → transcripts-source-BW2VfPX0.js} +1 -1
  76. package/dist/transcripts-source-api.js +1 -1
  77. package/dist/{typing-Ci9nhuSi.js → typing-eAhz8LT2.js} +1 -1
  78. package/package.json +4 -5
  79. package/dist/provider.runtime-DSzKjpKs.js +0 -2
  80. package/dist/targets-CB8ahjZk.js +0 -3
  81. package/npm-shrinkwrap.json +0 -1139
@@ -1,22 +1,23 @@
1
- import { C as Client, D as RateLimitError, F as Message, I as User, K as Container, M as Command, N as CommandWithSubcommands, P as Guild, Q as Row, V as Modal, W as Button, Yt as __exportAll, _ as MessageReactionRemoveListener, _t as editChannel, at as BaseMessageInteractiveComponent, bt as getChannelMessage, d as discord_exports, et as Separator, f as GuildCreateListener, g as MessageReactionAddListener, h as MessageCreateListener, m as InteractionCreateListener, mt as createThread, nt as TextDisplay, p as GuildDeleteListener, t as chunkDiscordTextWithMode, tt as StringSelectMenu, v as PresenceUpdateListener, w as Plugin, x as ThreadUpdateListener, y as ReadyListener } from "./chunk-BrZocpfs.js";
2
- import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-D2LKPukU.js";
3
- import { n as getDiscordActivitiesRuntime } from "./runtime-TwM8IrZU.js";
4
- import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, k as encodeCustomIdComponent, l as parseExecApprovalData, s as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./outbound-session-route-D_nc_Ayk.js";
5
- import { D as canViewDiscordGuildChannel, F as createDiscordRestClient, H as registerGateway, K as validateDiscordProxyUrl, U as unregisterGateway, q as withValidatedDiscordProxy, z as DISCORD_REST_TIMEOUT_MS } from "./send.shared-Dfacnk-E.js";
6
- import { _ as resolveDiscordModalEntryWithPersistence, g as resolveDiscordComponentEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-V7cyCKbH.js";
1
+ import { C as Client, D as RateLimitError, F as Message, I as User, K as Container, M as Command, N as CommandWithSubcommands, P as Guild, Q as Row, V as Modal, W as Button, Yt as __exportAll, _ as MessageReactionRemoveListener, _t as editChannel, at as BaseMessageInteractiveComponent, bt as getChannelMessage, d as discord_exports, et as Separator, f as GuildCreateListener, g as MessageReactionAddListener, h as MessageCreateListener, m as InteractionCreateListener, mt as createThread, nt as TextDisplay, p as GuildDeleteListener, t as chunkDiscordTextWithMode, tt as StringSelectMenu, v as PresenceUpdateListener, w as Plugin, x as ThreadUpdateListener, y as ReadyListener } from "./chunk-CMVEczdm.js";
2
+ import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-DJTf1LtA.js";
3
+ import { n as getDiscordActivitiesRuntime } from "./runtime-h03Wce1c.js";
4
+ import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, k as encodeCustomIdComponent, l as parseExecApprovalData, s as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./outbound-session-route-DJUzy5WA.js";
5
+ import { D as canViewDiscordGuildChannel, F as createDiscordRestClient, H as registerGateway, K as validateDiscordProxyUrl, U as unregisterGateway, q as withValidatedDiscordProxy, z as DISCORD_REST_TIMEOUT_MS } from "./send.shared-BRGI9T9F.js";
6
+ import { _ as resolveDiscordModalEntryWithPersistence, g as resolveDiscordComponentEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-BrfbRJNq.js";
7
7
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
8
8
  import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-C43z8vUm.js";
9
9
  import { C as resolveTimestampMs, a as normalizeDiscordSlug, b as formatDiscordReactionEmoji, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, g as resolveDiscordOwnerAllowFrom, h as resolveDiscordOwnerAccess, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordMemberAllowed, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, t as allowListMatches, v as resolveGroupDmAllow, x as formatDiscordUserTag, y as shouldEmitDiscordReactionNotification } from "./allow-list-DzKrtfah.js";
10
- import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-BbC2qjpH.js";
10
+ import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
11
11
  import { i as setPresence, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
12
- import { n as sendVoiceMessageDiscord } from "./send-CfnXLUXq.js";
12
+ import { n as sendVoiceMessageDiscord } from "./send-C_PfNVFH.js";
13
13
  import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-B9cy6RvQ.js";
14
- import { a as getDiscordExecApprovalApprovers, n as formatDiscordApprovalDisplayValue, r as resolveDiscordConversationIdentity, s as isDiscordExecApprovalClientEnabled, t as DISCORD_APPROVAL_ALLOWED_MENTIONS } from "./approval-message-safety-LyND6GR3.js";
15
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CmFAdMeQ.js";
16
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cmu75lZy.js";
17
- import { a as isThreadArchived, d as resolveDiscordChannelIdSafe, f as resolveDiscordChannelInfoSafe, g as resolveDiscordChannelTopicSafe, h as resolveDiscordChannelParentSafe, m as resolveDiscordChannelParentIdSafe, p as resolveDiscordChannelNameSafe, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-C_tCQcv3.js";
18
- import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bci2pS8M.js";
19
- import { a as formatDiscordMediaText, d as resolveDiscordChannelInfo, f as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText } from "./message-utils-ajbkdTVA.js";
14
+ import { a as getDiscordExecApprovalApprovers, n as formatDiscordApprovalDisplayValue, r as resolveDiscordConversationIdentity, s as isDiscordExecApprovalClientEnabled, t as DISCORD_APPROVAL_ALLOWED_MENTIONS } from "./approval-message-safety-yjFtfJcK.js";
15
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-ByNsOMJj.js";
16
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-CgWAonw-.js";
17
+ import { a as isThreadArchived, d as resolveDiscordChannelIdSafe, f as resolveDiscordChannelInfoSafe, g as resolveDiscordChannelTopicSafe, h as resolveDiscordChannelParentSafe, m as resolveDiscordChannelParentIdSafe, p as resolveDiscordChannelNameSafe, y as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-DOCKdVgx.js";
18
+ import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-BYRdyuw1.js";
19
+ import { i as timestampMs, n as normalizeModelRef, r as sanitizeRecentModels, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-D25pnCOu.js";
20
+ import { a as formatDiscordMediaText, d as resolveDiscordChannelInfo, f as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText } from "./message-utils-DSxXsDcG.js";
20
21
  import { t as resolveDiscordSenderIdentity } from "./sender-identity-mG_zsdox.js";
21
22
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
22
23
  import { buildAgentSessionKey, deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
@@ -31,7 +32,7 @@ import { Type } from "typebox";
31
32
  import { Check, Errors } from "typebox/value";
32
33
  import { inspect } from "node:util";
33
34
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
34
- import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
35
+ import { PlatformMessageNotDispatchedError, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
35
36
  import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1 } from "openclaw/plugin-sdk/ssrf-runtime";
36
37
  import { createHttp1EnvHttpProxyAgent, createHttp1ProxyAgent, createNodeProxyAgent, resolveEnvHttpProxyAgentOptions, wrapFetchWithAbortSignal } from "openclaw/plugin-sdk/fetch-runtime";
37
38
  import { createNonExitingRuntime, createSubsystemLogger, danger, formatDurationSeconds, isVerbose, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
@@ -41,7 +42,7 @@ import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-run
41
42
  import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
42
43
  import { chunkItems, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
43
44
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
44
- import { buildOutboundSessionContext, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled, sendDurableMessageBatch } from "openclaw/plugin-sdk/channel-outbound";
45
+ import { buildOutboundSessionContext, resolveChannelStreamingBlockEnabled, sendDurableMessageBatch } from "openclaw/plugin-sdk/channel-outbound";
45
46
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
46
47
  import { resolveSendableOutboundReplyParts, resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
47
48
  import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
@@ -59,7 +60,7 @@ import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
59
60
  import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
60
61
  import { enqueueSystemEvent, enqueueSystemEvent as enqueueSystemEvent$1 } from "openclaw/plugin-sdk/system-event-runtime";
61
62
  import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
62
- import { formatInboundEnvelope, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
63
+ import { createChannelPartialDeliveryError, dispatchChannelInboundTurn, formatInboundEnvelope, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
63
64
  import { ModelSelectionLockedError, applyModelOverrideToSessionEntry, resolveChannelModelOverride } from "openclaw/plugin-sdk/model-session-runtime";
64
65
  import { completeWithPreparedSimpleCompletionModel, extractAssistantText, prepareSimpleCompletionModelForAgent } from "openclaw/plugin-sdk/simple-completion-runtime";
65
66
  import { deleteSessionEntry, getSessionEntry, listSessionEntries, patchSessionEntry, readSessionUpdatedAt as readSessionUpdatedAt$1, resolveStorePath, resolveStorePath as resolveStorePath$1 } from "openclaw/plugin-sdk/session-store-runtime";
@@ -68,8 +69,8 @@ import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNa
68
69
  import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime";
69
70
  import * as pluginRuntime from "openclaw/plugin-sdk/plugin-runtime";
70
71
  import { createInteractiveConversationBindingHelpers, dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime";
71
- import { dispatchReplyWithDispatcher, finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
72
72
  import * as conversationRuntime from "openclaw/plugin-sdk/conversation-binding-runtime";
73
+ import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
73
74
  import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
74
75
  import { EventEmitter } from "node:events";
75
76
  import * as ws from "ws";
@@ -1824,12 +1825,16 @@ async function safeDiscordInteractionCall(label, fn) {
1824
1825
  throw error;
1825
1826
  }
1826
1827
  }
1828
+ async function settleDiscordInteractionWithoutVisibleReply(interaction) {
1829
+ if (interaction.responseState !== "deferred") return;
1830
+ await safeDiscordInteractionCall("interaction delete deferred reply", () => interaction.deleteReply());
1831
+ }
1827
1832
  async function deliverDiscordInteractionReply(params) {
1828
1833
  const { interaction, payload, textLimit, maxLinesPerMessage, preferFollowUp, chunkMode } = params;
1829
1834
  const reply = resolveSendableOutboundReplyParts(payload);
1830
1835
  const discordData = payload.channelData?.discord;
1831
1836
  let firstMessageComponents = Array.isArray(discordData?.components) && discordData.components.length > 0 ? discordData.components : void 0;
1832
- let hasReplied = false;
1837
+ let payloadDelivered = false;
1833
1838
  const sendMessage = async (content, files, components) => {
1834
1839
  const contentPayload = content ? { content } : {};
1835
1840
  const payloadLocal = files && files.length > 0 ? {
@@ -1852,17 +1857,27 @@ async function deliverDiscordInteractionReply(params) {
1852
1857
  ...components ? { components } : {},
1853
1858
  ...params.responseEphemeral !== void 0 ? { ephemeral: params.responseEphemeral } : {}
1854
1859
  };
1855
- await safeDiscordInteractionCall("interaction send", async () => {
1856
- if (!preferFollowUp && !hasReplied) {
1857
- await interaction.reply(payloadLocal);
1858
- hasReplied = true;
1860
+ let result;
1861
+ try {
1862
+ result = await safeDiscordInteractionCall("interaction send", async () => {
1863
+ if (!preferFollowUp && !payloadDelivered) {
1864
+ await interaction.reply(payloadLocal);
1865
+ payloadDelivered = true;
1866
+ firstMessageComponents = void 0;
1867
+ return;
1868
+ }
1869
+ await interaction.followUp(payloadLocal);
1870
+ payloadDelivered = true;
1859
1871
  firstMessageComponents = void 0;
1860
- return;
1861
- }
1862
- await interaction.followUp(payloadLocal);
1863
- hasReplied = true;
1864
- firstMessageComponents = void 0;
1865
- });
1872
+ });
1873
+ } catch (error) {
1874
+ if (!payloadDelivered) throw error;
1875
+ throw createChannelPartialDeliveryError(error, { visibleReplySent: true });
1876
+ }
1877
+ if (result !== null) return;
1878
+ const expiry = new PlatformMessageNotDispatchedError("Discord interaction expired before message dispatch", { cause: /* @__PURE__ */ new Error("Unknown interaction") });
1879
+ if (!payloadDelivered) throw expiry;
1880
+ throw createChannelPartialDeliveryError(expiry, { visibleReplySent: true });
1866
1881
  };
1867
1882
  if (reply.hasMedia) {
1868
1883
  const media = await Promise.all(reply.mediaUrls.map(async (url) => {
@@ -1882,9 +1897,9 @@ async function deliverDiscordInteractionReply(params) {
1882
1897
  if (!chunk.trim()) continue;
1883
1898
  await sendMessage(chunk);
1884
1899
  }
1885
- return;
1900
+ return payloadDelivered;
1886
1901
  }
1887
- if (!reply.hasText && !firstMessageComponents) return;
1902
+ if (!reply.hasText && !firstMessageComponents) return false;
1888
1903
  let chunks = reply.text || firstMessageComponents ? resolveTextChunksWithFallback(reply.text, chunkDiscordTextWithMode(reply.text, {
1889
1904
  maxChars: textLimit,
1890
1905
  maxLines: maxLinesPerMessage,
@@ -1895,6 +1910,7 @@ async function deliverDiscordInteractionReply(params) {
1895
1910
  if (!chunk.trim() && !firstMessageComponents) continue;
1896
1911
  await sendMessage(chunk, void 0, firstMessageComponents);
1897
1912
  }
1913
+ return payloadDelivered;
1898
1914
  }
1899
1915
  //#endregion
1900
1916
  //#region extensions/discord/src/monitor/route-resolution.ts
@@ -2017,7 +2033,7 @@ async function resolveDiscordNativeInteractionRouteState(params) {
2017
2033
  const nativeCommandRuntime = {
2018
2034
  matchPluginCommand: pluginRuntime.matchPluginCommand,
2019
2035
  executePluginCommand: pluginRuntime.executePluginCommand,
2020
- dispatchReplyWithDispatcher,
2036
+ dispatchChannelInboundTurn,
2021
2037
  resolveDirectStatusReplyForSession,
2022
2038
  resolveDiscordNativeInteractionRouteState,
2023
2039
  getSessionEntry
@@ -2025,58 +2041,68 @@ const nativeCommandRuntime = {
2025
2041
  //#endregion
2026
2042
  //#region extensions/discord/src/monitor/native-command-agent-reply.ts
2027
2043
  async function dispatchDiscordNativeAgentReply(params) {
2028
- const { onModelSelected, ...replyPipeline } = createChannelMessageReplyPipeline({
2029
- cfg: params.cfg,
2030
- agentId: params.effectiveRoute.agentId,
2031
- channel: "discord",
2032
- accountId: params.effectiveRoute.accountId
2033
- });
2034
2044
  const blockStreamingEnabled = resolveChannelStreamingBlockEnabled(params.discordConfig);
2035
2045
  let didReply = false;
2036
- const dispatchResult = await nativeCommandRuntime.dispatchReplyWithDispatcher({
2037
- ctx: params.ctxPayload,
2046
+ let settledWithoutVisibleReply = false;
2047
+ const turnResult = await nativeCommandRuntime.dispatchChannelInboundTurn({
2038
2048
  cfg: params.cfg,
2039
- dispatcherOptions: {
2040
- ...replyPipeline,
2041
- humanDelay: resolveHumanDelayConfig(params.cfg, params.effectiveRoute.agentId),
2049
+ channel: "discord",
2050
+ accountId: params.effectiveRoute.accountId,
2051
+ route: {
2052
+ agentId: params.effectiveRoute.agentId,
2053
+ sessionKey: params.ctxPayload.SessionKey ?? params.effectiveRoute.sessionKey
2054
+ },
2055
+ ctxPayload: params.ctxPayload,
2056
+ delivery: {
2042
2057
  deliver: async (payload) => {
2043
- if (params.suppressReplies) return;
2044
- try {
2045
- await deliverDiscordInteractionReply({
2046
- interaction: params.interaction,
2047
- payload,
2048
- mediaLocalRoots: params.mediaLocalRoots,
2049
- textLimit: resolveTextChunkLimit(params.cfg, "discord", params.accountId, { fallbackLimit: 2e3 }),
2050
- maxLinesPerMessage: resolveDiscordMaxLinesPerMessage({
2051
- cfg: params.cfg,
2052
- discordConfig: params.discordConfig,
2053
- accountId: params.accountId
2054
- }),
2055
- preferFollowUp: params.preferFollowUp || didReply,
2056
- responseEphemeral: params.responseEphemeral,
2057
- chunkMode: resolveChunkMode(params.cfg, "discord", params.accountId)
2058
- });
2059
- } catch (error) {
2060
- if (isDiscordUnknownInteraction(error)) {
2061
- logVerbose("discord: interaction reply skipped (interaction expired)");
2062
- return;
2063
- }
2064
- throw error;
2065
- }
2066
- didReply = true;
2058
+ if (params.suppressReplies) return {
2059
+ visibleReplySent: false,
2060
+ suppression: { reason: "no_visible_result" }
2061
+ };
2062
+ const payloadDelivered = await deliverDiscordInteractionReply({
2063
+ interaction: params.interaction,
2064
+ payload,
2065
+ mediaLocalRoots: params.mediaLocalRoots,
2066
+ textLimit: resolveTextChunkLimit(params.cfg, "discord", params.accountId, { fallbackLimit: 2e3 }),
2067
+ maxLinesPerMessage: resolveDiscordMaxLinesPerMessage({
2068
+ cfg: params.cfg,
2069
+ discordConfig: params.discordConfig,
2070
+ accountId: params.accountId
2071
+ }),
2072
+ preferFollowUp: params.preferFollowUp || didReply,
2073
+ responseEphemeral: params.responseEphemeral,
2074
+ chunkMode: resolveChunkMode(params.cfg, "discord", params.accountId)
2075
+ });
2076
+ didReply ||= payloadDelivered;
2077
+ return payloadDelivered ? { visibleReplySent: true } : {
2078
+ visibleReplySent: false,
2079
+ suppression: { reason: "no_visible_result" }
2080
+ };
2081
+ },
2082
+ onDelivered: (_payload, _info, result) => {
2083
+ if (result?.visibleReplySent === false) settledWithoutVisibleReply = true;
2067
2084
  },
2068
2085
  onError: (err, info) => {
2086
+ if (isChannelPartialDeliveryError(err)) {
2087
+ didReply = true;
2088
+ logVerbose("discord: interaction reply partially delivered before expiry");
2089
+ }
2069
2090
  const message = err instanceof Error ? err.stack ?? err.message : String(err);
2070
2091
  params.log.error(`discord slash ${info.kind} reply failed: ${message}`);
2071
2092
  }
2072
2093
  },
2094
+ replyPipeline: {},
2095
+ dispatcherOptions: { humanDelay: resolveHumanDelayConfig(params.cfg, params.effectiveRoute.agentId) },
2073
2096
  replyOptions: {
2074
2097
  skillFilter: params.channelConfig?.skills,
2075
- disableBlockStreaming: typeof blockStreamingEnabled === "boolean" ? !blockStreamingEnabled : void 0,
2076
- onModelSelected
2098
+ disableBlockStreaming: typeof blockStreamingEnabled === "boolean" ? !blockStreamingEnabled : void 0
2077
2099
  }
2078
2100
  });
2079
- if (params.suppressReplies || didReply || dispatchResult.queuedFinal || dispatchResult.counts.final !== 0 || dispatchResult.counts.block !== 0 || dispatchResult.counts.tool !== 0) return;
2101
+ if (!didReply && (params.suppressReplies || settledWithoutVisibleReply)) {
2102
+ await settleDiscordInteractionWithoutVisibleReply(params.interaction);
2103
+ return;
2104
+ }
2105
+ if (params.suppressReplies || didReply || settledWithoutVisibleReply || turnResult.dispatched && hasVisibleInboundReplyDispatch(turnResult.dispatchResult)) return;
2080
2106
  await safeDiscordInteractionCall("interaction empty fallback", async () => {
2081
2107
  const payload = {
2082
2108
  content: DISCORD_EMPTY_VISIBLE_REPLY_WARNING,
@@ -2385,7 +2411,7 @@ function createDiscordSupplementalContextAccessChecker(params) {
2385
2411
  isSenderAllowed: () => resolveDiscordMemberAllowed({
2386
2412
  userAllowList,
2387
2413
  roleAllowList,
2388
- memberRoleIds: sender.memberRoleIds ?? [],
2414
+ memberRoleIds: [...sender.memberRoleIds ?? []],
2389
2415
  userId: sender.id ?? "",
2390
2416
  userName: sender.name,
2391
2417
  userTag: sender.tag,
@@ -2398,7 +2424,7 @@ function buildDiscordGroupSystemPrompt(channelConfig) {
2398
2424
  const systemPromptParts = [channelConfig?.systemPrompt?.trim() || null].filter((entry) => Boolean(entry));
2399
2425
  return systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : void 0;
2400
2426
  }
2401
- function buildDiscordUntrustedContext(params) {
2427
+ function buildDiscordChannelStructuredContext(params) {
2402
2428
  if (!params.isGuild) return;
2403
2429
  const entries = [];
2404
2430
  if (typeof params.channelTopic === "string" && params.channelTopic.trim().length > 0) entries.push({
@@ -2412,7 +2438,7 @@ function buildDiscordUntrustedContext(params) {
2412
2438
  function buildDiscordInboundAccessContext(params) {
2413
2439
  return {
2414
2440
  groupSystemPrompt: params.isGuild ? buildDiscordGroupSystemPrompt(params.channelConfig) : void 0,
2415
- untrustedContext: buildDiscordUntrustedContext({
2441
+ channelStructuredContext: buildDiscordChannelStructuredContext({
2416
2442
  isGuild: params.isGuild,
2417
2443
  channelTopic: params.channelTopic
2418
2444
  }),
@@ -2428,7 +2454,7 @@ function buildDiscordInboundAccessContext(params) {
2428
2454
  //#region extensions/discord/src/monitor/native-command-context.ts
2429
2455
  function buildDiscordNativeCommandContext(params) {
2430
2456
  const conversationLabel = params.isDirectMessage ? params.user.globalName ?? params.user.username : params.channelId;
2431
- const { groupSystemPrompt, ownerAllowFrom, untrustedContext } = buildDiscordInboundAccessContext({
2457
+ const { groupSystemPrompt, ownerAllowFrom, channelStructuredContext } = buildDiscordInboundAccessContext({
2432
2458
  channelConfig: params.channelConfig,
2433
2459
  guildInfo: params.guildInfo,
2434
2460
  sender: params.sender,
@@ -2453,7 +2479,7 @@ function buildDiscordNativeCommandContext(params) {
2453
2479
  GroupSpace: params.isGuild ? params.guildInfo?.id ?? params.guildInfo?.slug ?? params.guildId : void 0,
2454
2480
  MemberRoleIds: params.memberRoleIds,
2455
2481
  GroupSystemPrompt: groupSystemPrompt,
2456
- UntrustedStructuredContext: untrustedContext,
2482
+ ChannelStructuredContext: channelStructuredContext,
2457
2483
  OwnerAllowFrom: ownerAllowFrom,
2458
2484
  SenderName: params.user.globalName ?? params.user.username,
2459
2485
  SenderId: params.user.id,
@@ -2687,28 +2713,6 @@ function buildDiscordModelPickerPreferenceKey(scope) {
2687
2713
  if (guildId) return `discord:${accountId}:guild:${guildId}:user:${userId}`;
2688
2714
  return `discord:${accountId}:dm:user:${userId}`;
2689
2715
  }
2690
- function normalizeModelRef(raw) {
2691
- const value = raw?.trim();
2692
- if (!value) return null;
2693
- const slashIndex = value.indexOf("/");
2694
- if (slashIndex <= 0 || slashIndex >= value.length - 1) return null;
2695
- const provider = normalizeProviderId(value.slice(0, slashIndex));
2696
- const model = value.slice(slashIndex + 1).trim();
2697
- if (!provider || !model) return null;
2698
- return `${provider}/${model}`;
2699
- }
2700
- function sanitizeRecentModels(models, limit) {
2701
- const deduped = [];
2702
- const seen = /* @__PURE__ */ new Set();
2703
- for (const item of models ?? []) {
2704
- const normalized = normalizeModelRef(item);
2705
- if (!normalized || seen.has(normalized)) continue;
2706
- seen.add(normalized);
2707
- deduped.push(normalized);
2708
- if (deduped.length >= limit) break;
2709
- }
2710
- return deduped;
2711
- }
2712
2716
  function sanitizeStoredPreferenceEntry(value) {
2713
2717
  if (!value || typeof value !== "object") return;
2714
2718
  const typedValue = value;
@@ -2722,16 +2726,6 @@ function sanitizeStoredPreferenceEntry(value) {
2722
2726
  updatedOrder: typeof typedValue.updatedOrder === "number" && Number.isSafeInteger(typedValue.updatedOrder) ? typedValue.updatedOrder : void 0
2723
2727
  };
2724
2728
  }
2725
- function hashSegment(value, length) {
2726
- return createHash("sha256").update(value, "utf8").digest("hex").slice(0, length);
2727
- }
2728
- function buildPreferenceModelKey(scopeKey, modelRef) {
2729
- return `v1:${hashSegment(scopeKey, 32)}:${hashSegment(modelRef, 24)}`;
2730
- }
2731
- function timestampMs(value) {
2732
- const parsed = Date.parse(value);
2733
- return Number.isFinite(parsed) ? parsed : 0;
2734
- }
2735
2729
  function timestampOrder(value) {
2736
2730
  return value !== void 0 && value >= 0 ? value : 0;
2737
2731
  }
@@ -5092,7 +5086,10 @@ async function dispatchDiscordCommandInteraction(params) {
5092
5086
  return { accepted: true };
5093
5087
  }
5094
5088
  if (pluginMatch && commandName !== "status") {
5095
- if (suppressReplies) return { accepted: true };
5089
+ if (suppressReplies) {
5090
+ await settleDiscordInteractionWithoutVisibleReply(interaction);
5091
+ return { accepted: true };
5092
+ }
5096
5093
  const messageThreadId = !isDirectMessage && isThreadChannel ? channelId : void 0;
5097
5094
  const pluginThreadParentId = !isDirectMessage && isThreadChannel ? threadParentId : void 0;
5098
5095
  const routeState = await getNativeRouteState();
@@ -5121,10 +5118,13 @@ async function dispatchDiscordCommandInteraction(params) {
5121
5118
  messageThreadId,
5122
5119
  threadParentId: pluginThreadParentId
5123
5120
  });
5124
- if (pluginReply.suppressReply === true) return {
5125
- accepted: true,
5126
- effectiveRoute
5127
- };
5121
+ if (pluginReply.suppressReply === true) {
5122
+ await settleDiscordInteractionWithoutVisibleReply(interaction);
5123
+ return {
5124
+ accepted: true,
5125
+ effectiveRoute
5126
+ };
5127
+ }
5128
5128
  if (!hasRenderableReplyPayload(pluginReply)) {
5129
5129
  await respond(DISCORD_EMPTY_VISIBLE_REPLY_WARNING);
5130
5130
  return {
@@ -7252,7 +7252,7 @@ async function runDiscordGatewayLifecycle(params) {
7252
7252
  gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
7253
7253
  if (params.voiceManager) {
7254
7254
  await params.voiceManager.destroy();
7255
- const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CyJ-sc3n.js").then((n) => n.n);
7255
+ const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-BW2VfPX0.js").then((n) => n.n);
7256
7256
  setDiscordTranscriptsVoiceManager({
7257
7257
  accountId: params.accountId,
7258
7258
  manager: null
@@ -7267,7 +7267,7 @@ async function runDiscordGatewayLifecycle(params) {
7267
7267
  let discordVoiceRuntimePromise;
7268
7268
  let discordProviderSessionRuntimePromise;
7269
7269
  async function loadDiscordVoiceRuntime() {
7270
- const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-DVvlH8NR.js");
7270
+ const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-asX6a4R4.js");
7271
7271
  discordVoiceRuntimePromise = promise;
7272
7272
  try {
7273
7273
  return await promise;
@@ -7277,7 +7277,7 @@ async function loadDiscordVoiceRuntime() {
7277
7277
  }
7278
7278
  }
7279
7279
  async function loadDiscordProviderSessionRuntime() {
7280
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-D9GTBKPg.js");
7280
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-IEheobg4.js");
7281
7281
  discordProviderSessionRuntimePromise = promise;
7282
7282
  try {
7283
7283
  return await promise;
@@ -9138,7 +9138,10 @@ async function deliverDiscordReply(params) {
9138
9138
  params.runtime;
9139
9139
  const delivery = resolveDiscordDeliveryOptions(params);
9140
9140
  const payloads = sanitizeDiscordFrontChannelReplyPayloads(params.replies, { kind: params.kind }).map(formatDiscordReasoningPayload);
9141
- if (payloads.length === 0) return;
9141
+ if (payloads.length === 0) return {
9142
+ visibleReplySent: false,
9143
+ suppression: { reason: "no_visible_result" }
9144
+ };
9142
9145
  const send = await sendDurableMessageBatch({
9143
9146
  cfg: params.cfg,
9144
9147
  channel: "discord",
@@ -9165,12 +9168,28 @@ async function deliverDiscordReply(params) {
9165
9168
  })
9166
9169
  });
9167
9170
  if (send.status === "failed" || send.status === "partial_failed") throw send.error;
9168
- if ((send.status === "sent" ? send.results : []).length === 0) throw new Error(`discord final reply produced no delivered message for ${delivery.to}`);
9171
+ if (send.status === "suppressed") {
9172
+ const hookEffect = send.payloadOutcomes?.find((outcome) => outcome.status === "suppressed")?.hookEffect;
9173
+ return {
9174
+ visibleReplySent: false,
9175
+ suppression: {
9176
+ reason: send.reason,
9177
+ ...hookEffect?.cancelReason ? { cancelReason: hookEffect.cancelReason } : {},
9178
+ ...hookEffect?.metadata ? { metadata: hookEffect.metadata } : {}
9179
+ }
9180
+ };
9181
+ }
9182
+ const results = send.results;
9183
+ if (results.length === 0) throw new Error(`discord final reply produced no delivered message for ${delivery.to}`);
9184
+ return {
9185
+ messageIds: results.flatMap((result) => result.messageId ? [result.messageId] : []),
9186
+ visibleReplySent: true
9187
+ };
9169
9188
  }
9170
9189
  //#endregion
9171
9190
  //#region extensions/discord/src/monitor/agent-components.dispatch.ts
9172
9191
  const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("./agent-components.runtime-CEPrf2SY.js"));
9173
- const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-Ci9nhuSi.js").then((n) => n.n));
9192
+ const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-eAhz8LT2.js").then((n) => n.n));
9174
9193
  function buildDiscordComponentConversationLabel(params) {
9175
9194
  if (params.interactionCtx.isDirectMessage) return buildDirectLabel(params.interactionCtx.user);
9176
9195
  if (params.interactionCtx.isGroupDm) return `Group DM #${params.channelCtx.channelName ?? params.interactionCtx.channelId} channel id:${params.interactionCtx.channelId}`;
@@ -9379,9 +9398,9 @@ async function dispatchDiscordComponentEvent(params) {
9379
9398
  }
9380
9399
  },
9381
9400
  delivery: {
9382
- deliver: async (payload, info) => {
9401
+ deliverWithProviderMessageSending: async (payload, info) => {
9383
9402
  const replyToId = replyReference.use();
9384
- await deliverDiscordReply({
9403
+ const result = await deliverDiscordReply({
9385
9404
  cfg: ctx.cfg,
9386
9405
  replies: [payload],
9387
9406
  target: deliverTarget,
@@ -9402,7 +9421,8 @@ async function dispatchDiscordComponentEvent(params) {
9402
9421
  mediaLocalRoots,
9403
9422
  kind: info.kind
9404
9423
  });
9405
- replyReference.markSent();
9424
+ if (result.visibleReplySent) replyReference.markSent();
9425
+ return result;
9406
9426
  },
9407
9427
  onError: (err) => {
9408
9428
  logError(`discord component dispatch failed: ${String(err)}`);
@@ -9582,7 +9602,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
9582
9602
  }
9583
9603
  //#endregion
9584
9604
  //#region extensions/discord/src/monitor/agent-components.handlers.ts
9585
- const loadComponentsRuntime = createLazyRuntimeModule(() => import("./outbound-session-route-D_nc_Ayk.js").then((n) => n.n));
9605
+ const loadComponentsRuntime = createLazyRuntimeModule(() => import("./outbound-session-route-DJUzy5WA.js").then((n) => n.n));
9586
9606
  async function handleDiscordComponentEvent(params) {
9587
9607
  const parsed = parseDiscordComponentData(params.data, resolveInteractionCustomId(params.interaction));
9588
9608
  if (!parsed) {
@@ -10988,7 +11008,7 @@ async function monitorDiscordProvider(opts = {}) {
10988
11008
  runtime,
10989
11009
  botUserId
10990
11010
  });
10991
- const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CyJ-sc3n.js").then((n) => n.n);
11011
+ const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-BW2VfPX0.js").then((n) => n.n);
10992
11012
  setDiscordTranscriptsVoiceManager({
10993
11013
  accountId: account.accountId,
10994
11014
  manager: voiceManager
@@ -1,6 +1,6 @@
1
- import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DAHJuT22.js";
2
- import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-DlZEGvC1.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-1ui-YxsF.js";
1
+ import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-u_7pNz5d.js";
2
+ import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BB-OD9-d.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-CxjL-a-8.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-Ca5Gua1B.js";
2
+ export { monitorDiscordProvider };
@@ -1,4 +1,4 @@
1
- import { p as normalizeDiscordToken } from "./accounts-D2LKPukU.js";
1
+ import { p as normalizeDiscordToken } from "./accounts-DJTf1LtA.js";
2
2
  import { r as fetchDiscord } from "./api-C43z8vUm.js";
3
3
  import { a as normalizeDiscordSlug } from "./allow-list-DzKrtfah.js";
4
4
  //#region extensions/discord/src/guilds.ts
@@ -1,7 +1,7 @@
1
- import { Yt as __exportAll } from "./chunk-BrZocpfs.js";
1
+ import { Yt as __exportAll } from "./chunk-CMVEczdm.js";
2
2
  import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-C43z8vUm.js";
3
3
  import { a as normalizeDiscordSlug } from "./allow-list-DzKrtfah.js";
4
- import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-C1hTvZa4.js";
4
+ import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-BU6_eGKg.js";
5
5
  //#region extensions/discord/src/resolve-channels.ts
6
6
  var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
7
7
  function parseDiscordChannelInput(raw) {
@@ -1,6 +1,6 @@
1
- import { Yt as __exportAll } from "./chunk-BrZocpfs.js";
1
+ import { Yt as __exportAll } from "./chunk-CMVEczdm.js";
2
2
  import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-C43z8vUm.js";
3
- import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-C1hTvZa4.js";
3
+ import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-BU6_eGKg.js";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/discord/src/resolve-users.ts
6
6
  var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
@@ -1,14 +1,14 @@
1
- import { n as createReusableDiscordReplyReference, u as resolveDiscordChannelId } from "./chunk-BrZocpfs.js";
2
- import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-D2LKPukU.js";
3
- import { h as readDiscordComponentSpec } from "./outbound-session-route-D_nc_Ayk.js";
4
- import { E as canManageGuildRoleDiscord, I as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, V as getGateway, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-Dfacnk-E.js";
5
- import { a as assertMediaNotDataUrl, c as readBooleanParam, d as readReactionParams, f as readStringArrayParam, h as withNormalizedTimestamp, l as readNonNegativeIntegerParam, m as resolvePollMaxSelections, o as jsonResult, p as readStringParam, r as sendDiscordComponentMessage, s as parseAvailableTags, u as readPositiveIntegerParam } from "./send.components-V7cyCKbH.js";
1
+ import { n as createReusableDiscordReplyReference, u as resolveDiscordChannelId } from "./chunk-CMVEczdm.js";
2
+ import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-DJTf1LtA.js";
3
+ import { h as readDiscordComponentSpec } from "./outbound-session-route-DJUzy5WA.js";
4
+ import { E as canManageGuildRoleDiscord, I as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, V as getGateway, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-BRGI9T9F.js";
5
+ import { a as assertMediaNotDataUrl, c as readBooleanParam, d as readReactionParams, f as readStringArrayParam, h as withNormalizedTimestamp, l as readNonNegativeIntegerParam, m as resolvePollMaxSelections, o as jsonResult, p as readStringParam, r as sendDiscordComponentMessage, s as parseAvailableTags, u as readPositiveIntegerParam } from "./send.components-BrfbRJNq.js";
6
6
  import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy, v as resolveGroupDmAllow } from "./allow-list-DzKrtfah.js";
7
- import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BbC2qjpH.js";
7
+ import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-1t1CryCK.js";
8
8
  import { n as getPresence } from "./presence-cache-z1N8MbJ3.js";
9
- import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, i as DiscordThreadInitialMessageError, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord, y as fetchGuildInfoDiscord } from "./send-CfnXLUXq.js";
10
- import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-bLrJCZ4G.js";
11
- import "./targets-CB8ahjZk.js";
9
+ import { A as uploadEmojiDiscord, C as kickMemberDiscord, D as resolveEventCoverImage, E as removeRoleDiscord, F as moveChannelDiscord, I as removeChannelPermissionDiscord, L as setChannelPermissionDiscord, M as createChannelDiscord, N as deleteChannelDiscord, O as timeoutMemberDiscord, P as editChannelDiscord, S as fetchVoiceStatusDiscord, T as listScheduledEventsDiscord, _ as createScheduledEventDiscord, a as createThreadDiscord, b as fetchMemberInfoDiscord, c as fetchMessageDiscord, d as pinMessageDiscord, f as readMessagesDiscord, g as banMemberDiscord, h as addRoleDiscord, i as DiscordThreadInitialMessageError, j as uploadStickerDiscord, k as listGuildEmojisDiscord, l as listPinsDiscord, m as unpinMessageDiscord, n as sendVoiceMessageDiscord, o as deleteMessageDiscord, p as searchMessagesDiscord, s as editMessageDiscord, u as listThreadsDiscord, v as fetchChannelInfoDiscord, w as listGuildChannelsDiscord, x as fetchRoleInfoDiscord, y as fetchGuildInfoDiscord } from "./send-C_PfNVFH.js";
10
+ import { i as removeReactionDiscord, n as reactMessageDiscord, r as removeOwnReactionsDiscord, t as fetchReactionsDiscord } from "./send.reactions-gesJG-Yp.js";
11
+ import "./targets-DqNz_mmW.js";
12
12
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
14
14
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -1,3 +1,3 @@
1
- import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-D-6AugWA.js";
2
- import { t as discordMessageActions } from "./channel-actions-C8n1zWZ-.js";
1
+ import { c as readDiscordChannelMoveParams, i as requiredGuildPermissionForModerationAction, l as readDiscordParentIdParam, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-BZm4_qXV.js";
2
+ import { t as discordMessageActions } from "./channel-actions-BweII8kV.js";
3
3
  export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };