@openclaw/discord 2026.11.8 → 2026.11.9

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 (107) hide show
  1. package/dist/.setup/{account-inspect-DGkdWwix.mjs → account-inspect-CSz5Qodj.mjs} +2 -3
  2. package/dist/.setup/{accounts-C_25wyxC.mjs → accounts-DtjvhJUj.mjs} +4 -8
  3. package/dist/.setup/{active-turn-thread-route-KvRTAVE3.mjs → active-turn-thread-route-DkPnk2x8.mjs} +1 -2
  4. package/dist/.setup/{allow-list-C3j0qLDp.mjs → allow-list-CkqpzPvP.mjs} +4 -8
  5. package/dist/.setup/{api-DYRggUgK.mjs → api-C4j_kC-2.mjs} +4 -6
  6. package/dist/.setup/{approval-handler.runtime-eKrSqVPF.mjs → approval-handler.runtime-bB4eKcGl.mjs} +9 -10
  7. package/dist/.setup/{approval-message-updates-DKsCfxSW.mjs → approval-message-updates-DqOXxPss.mjs} +3 -4
  8. package/dist/.setup/{audit-DZLJ0my1.mjs → audit-D1UISAXW.mjs} +6 -7
  9. package/dist/.setup/{channel-access-9cyzozUP.mjs → channel-access-DhJhVrdZ.mjs} +1 -2
  10. package/dist/.setup/{channel-COE1KIJz.mjs → channel-i4V5w1Nh.mjs} +32 -39
  11. package/dist/.setup/{channel.setup-B4SQu9Qg.mjs → channel.setup-BrGEJ0Ia.mjs} +7 -10
  12. package/dist/.setup/{command-deploy-store-DFkBTViB.mjs → command-deploy-store-DPWiBMks.mjs} +1 -2
  13. package/dist/.setup/{command-owners-C7rUdqUX.mjs → command-owners-BzlhNBxA.mjs} +1 -2
  14. package/dist/.setup/{components-Cy4hDa6J.mjs → components-DeCLO9w0.mjs} +10 -16
  15. package/dist/.setup/{components.base-CiS0h_XP.mjs → components.base-C5sAPHe4.mjs} +1 -2
  16. package/dist/.setup/{config-schema-BNKN1cu5.mjs → config-schema-GX2yDgIH.mjs} +3 -5
  17. package/dist/.setup/{conversation-binding-route-Cy_QeEBm.mjs → conversation-binding-route-CHCfhsCl.mjs} +2 -3
  18. package/dist/.setup/{directory-config-Ble81PWH.mjs → directory-config-BXJuh9-J.mjs} +3 -4
  19. package/dist/.setup/{directory-live-DOVK9G9P.mjs → directory-live-dzJ14-DT.mjs} +7 -8
  20. package/dist/.setup/{discord-KsHAulAQ.mjs → discord-BGkLzt2b.mjs} +28 -52
  21. package/dist/.setup/{doctor-CQescbAS.mjs → doctor-DBBXoP9w.mjs} +7 -8
  22. package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
  23. package/dist/.setup/{endpoint-runtime-lf4DeLas.mjs → endpoint-runtime-BM3x-m6O.mjs} +1 -2
  24. package/dist/.setup/{guilds-BSnrns-F.mjs → guilds-DYBhgnfq.mjs} +3 -4
  25. package/dist/.setup/{handle-action-BfSo0qkY.mjs → handle-action-Dx2N-4A6.mjs} +10 -11
  26. package/dist/.setup/{handle-action.guild-admin-BOzk0kPz.mjs → handle-action.guild-admin-CGzsE3bM.mjs} +3 -4
  27. package/dist/.setup/{listeners-C0-BvUVA.mjs → listeners-DHjDOlXW.mjs} +2 -3
  28. package/dist/.setup/{live-policy-config-y0Qy36X3.mjs → live-policy-config-DjIHWFla.mjs} +3 -5
  29. package/dist/.setup/{message-handler-h8xpc_1a.mjs → message-handler-OqhwO2Il.mjs} +11 -15
  30. package/dist/.setup/{message-handler.preflight-CO1JNXKw.mjs → message-handler.preflight-DaqozzfW.mjs} +20 -43
  31. package/dist/.setup/{message-handler.preflight-pluralkit-C4FSmp6X.mjs → message-handler.preflight-pluralkit-CPWdqrEU.mjs} +10 -14
  32. package/dist/.setup/{message-handler.process-IPQv14En.mjs → message-handler.process-C6ETXKq2.mjs} +26 -34
  33. package/dist/.setup/{outbound-payload-Pz-zEQnX.mjs → outbound-payload-DOFjmMNE.mjs} +9 -11
  34. package/dist/.setup/{outbound-session-route-CpweCkxm.mjs → outbound-session-route-CzL157kC.mjs} +22 -34
  35. package/dist/.setup/{output-activity-uBpMSX75.mjs → output-activity-CDgs2s3O.mjs} +1 -2
  36. package/dist/.setup/{pluralkit-B64dfq_j.mjs → pluralkit-DcXbHTpQ.mjs} +2 -3
  37. package/dist/.setup/{preflight-audio-C6QtD6HX.mjs → preflight-audio-r4BbaJxh.mjs} +1 -2
  38. package/dist/.setup/{presence-cache-Dq-3nH7R.mjs → presence-cache-B3xj3b0l.mjs} +1 -2
  39. package/dist/.setup/{probe-CbDJojNV.mjs → probe-CfGMZwFD.mjs} +5 -6
  40. package/dist/.setup/{provider-D9dwCcy8.mjs → provider-BcSZ6vqo.mjs} +109 -185
  41. package/dist/.setup/{provider-session.runtime-pCvFOgHs.mjs → provider-session.runtime-CxGNqH7Q.mjs} +3 -3
  42. package/dist/.setup/provider.runtime-DPhNybGw.mjs +1 -0
  43. package/dist/.setup/{proxy-fetch-BzXwBAXt.mjs → proxy-fetch-B8cK6FLQ.mjs} +1 -2
  44. package/dist/.setup/{realtime-session.runtime-CP8Opnfr.mjs → realtime-session.runtime-Carw2Z1J.mjs} +15 -25
  45. package/dist/.setup/{receive-recovery-C3Ks4wAQ.mjs → receive-recovery-DV_v5ROf.mjs} +3 -6
  46. package/dist/.setup/{resolve-allowlist-common-B-S0wRIw.mjs → resolve-allowlist-common-CYdqBUgV.mjs} +3 -4
  47. package/dist/.setup/{resolve-channels-g16NM6Ho.mjs → resolve-channels-BNnyfCR8.mjs} +6 -7
  48. package/dist/.setup/{resolve-users-DAfOOXdy.mjs → resolve-users-CDMAGrzv.mjs} +5 -6
  49. package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
  50. package/dist/.setup/{runtime-BMgTyuwg.mjs → runtime-B-PgPsGR.mjs} +4 -6
  51. package/dist/.setup/{runtime-BRcmFvOV.mjs → runtime-BJxDx_zr.mjs} +18 -26
  52. package/dist/.setup/{runtime-DgnVQ7zW.mjs → runtime-DcBvHOm1.mjs} +1 -2
  53. package/dist/.setup/{runtime-doctor-migrations-BPV-R4G9.mjs → runtime-doctor-migrations-BpV1jKk0.mjs} +5 -9
  54. package/dist/.setup/{secret-config-contract-B1kE4sDv.mjs → secret-config-contract-CP6teHec.mjs} +1 -2
  55. package/dist/.setup/{security-audit-BFT84Uny.mjs → security-audit-CTwisG7c.mjs} +3 -4
  56. package/dist/.setup/{security-contract-DNyyjTZZ.mjs → security-contract-D-o0iWDk.mjs} +1 -2
  57. package/dist/.setup/{security-doctor-nGgPm65L.mjs → security-doctor-4s7omTZd.mjs} +1 -2
  58. package/dist/.setup/{send-DXPqEgjA.mjs → send-BQtMCED2.mjs} +19 -28
  59. package/dist/.setup/{send.components-MUCtA6qV.mjs → send.components-BTjOU5BX.mjs} +11 -14
  60. package/dist/.setup/{send.outbound-70KlFdzN.mjs → send.outbound-izfb48w-.mjs} +10 -15
  61. package/dist/.setup/{send.receipt-DkCkAjRL.mjs → send.receipt-D0vpuJMr.mjs} +11 -20
  62. package/dist/.setup/{send.shared-BXWCIkfx.mjs → send.shared-BVJkIe93.mjs} +12 -18
  63. package/dist/.setup/{sender-identity-BbA7FNbr.mjs → sender-identity-Dt5ELjRN.mjs} +2 -3
  64. package/dist/.setup/{session-contract-BO5tlIdl.mjs → session-contract-Bq71MS78.mjs} +1 -2
  65. package/dist/.setup/{session-key-normalization-CCHGNSQw.mjs → session-key-normalization-Cfvze5hd.mjs} +1 -2
  66. package/dist/.setup/setup-plugin-api-DCiNtEra.mjs +2 -0
  67. package/dist/.setup/{shared-G2-0EUo3.mjs → shared-djlPz0hY.mjs} +14 -17
  68. package/dist/.setup/{shared-interactive-DmzaoKOM.mjs → shared-interactive-DKBw4SNV.mjs} +7 -12
  69. package/dist/.setup/{subagent-hooks-BUvQ4Oj4.mjs → subagent-hooks-BTmMGFYh.mjs} +3 -4
  70. package/dist/.setup/{system-events-CYFu0Vp4.mjs → system-events-LN3PXCia.mjs} +3 -4
  71. package/dist/.setup/{target-parsing-C-HyNxcE.mjs → target-parsing-BiuhcK9Q.mjs} +1 -2
  72. package/dist/.setup/{target-resolver-54k9fO6u.mjs → target-resolver-C98DQ-sp.mjs} +6 -7
  73. package/dist/.setup/{thread-binding-api-BDZJD4na.mjs → thread-binding-api-Drd4Zu-5.mjs} +1 -2
  74. package/dist/.setup/{thread-bindings-BiO6_GA2.mjs → thread-bindings-ESkVljSW.mjs} +7 -10
  75. package/dist/.setup/{thread-bindings.manager-CadGpkjc.mjs → thread-bindings.manager-BG7MMT7H.mjs} +15 -20
  76. package/dist/.setup/{thread-bindings.session-updates-B4iJqhAn.mjs → thread-bindings.session-updates-Ddn14oJa.mjs} +6 -10
  77. package/dist/.setup/{threading-Bem-g91c.mjs → threading-BzxVQcv8.mjs} +5 -7
  78. package/dist/.setup/{timeouts-cIxzatmv.mjs → timeouts-CT9hnmo4.mjs} +1 -2
  79. package/dist/.setup/{transcripts-source-DUL7GRxU.mjs → transcripts-source-a1btN-pC.mjs} +20 -33
  80. package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
  81. package/dist/.setup/{voice-runtime-D0TWfWJO.mjs → voice-runtime-BI76hQQH.mjs} +28 -46
  82. package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
  83. package/dist/account-inspect-api.js +2 -3
  84. package/dist/action-runtime-api.js +1 -1
  85. package/dist/activities-api.js +9 -13
  86. package/dist/api.js +21 -22
  87. package/dist/channel-config-api.js +1 -1
  88. package/dist/channel-plugin-api.js +1 -1
  89. package/dist/contract-api.js +1 -1
  90. package/dist/directory-contract-api.js +2 -3
  91. package/dist/doctor-contract-api.js +5 -7
  92. package/dist/index.js +1 -2
  93. package/dist/runtime-api.js +22 -22
  94. package/dist/runtime-setter-api.js +1 -1
  95. package/dist/secret-contract-api.js +1 -1
  96. package/dist/security-audit-contract-api.js +1 -1
  97. package/dist/security-contract-api.js +1 -1
  98. package/dist/session-key-api.js +1 -1
  99. package/dist/setup-entry.js +2 -3
  100. package/dist/setup-plugin-api.js +1 -1
  101. package/dist/src/voice/audio-worker.runtime.js +8 -14
  102. package/dist/subagent-hooks-api.js +2 -3
  103. package/dist/thread-binding-api.js +1 -1
  104. package/dist/transcripts-source-api.js +2 -3
  105. package/package.json +4 -4
  106. package/dist/.setup/provider.runtime-DTEY_Gvi.mjs +0 -1
  107. package/dist/.setup/setup-plugin-api-Dj04bzEC.mjs +0 -2
@@ -1,13 +1,13 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as resolveDiscordMessageFlags, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-BXWCIkfx.mjs";
3
- import { B as RateLimitError, C as listMessageReactionUsers, D as editChannelMessage, E as deleteChannelMessage, F as getGuildVoiceState, G as readRetryAfter, H as isUnknownDiscordVoiceStateError, I as listGuildEmojis, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, M as unpinChannelMessage, N as getGuild, O as getChannel, P as getGuildMember, S as deleteOwnMessageReaction, T as createThread, U as readDiscordCode, V as isUnknownDiscordMessageError, W as readDiscordMessage, j as pinChannelMessage, k as getChannelMessage, q as withDiscordRequestAuthority, w as createChannelMessage, x as createOwnMessageReaction, z as DiscordError } from "./discord-KsHAulAQ.mjs";
4
- import { C as parseDiscordRetryAfterBodySeconds } from "./allow-list-C3j0qLDp.mjs";
5
- import { S as chunkDiscordTextWithMode, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, v as classifyDiscordDeliveryFailure, x as recordDiscordMessageCreateAmbiguity, y as createDiscordRetryRunner } from "./send.receipt-DkCkAjRL.mjs";
6
- import { n as getDiscordEndpointRuntime, r as resolveDiscordEndpointAttachmentGuard } from "./endpoint-runtime-lf4DeLas.mjs";
7
- import { o as parseDiscordHttpErrorBody } from "./api-DYRggUgK.mjs";
8
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-54k9fO6u.mjs";
9
- import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-70KlFdzN.mjs";
10
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-cIxzatmv.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, F as resolveDiscordClientAccountContext, I as resolveDiscordRest, M as createDiscordClient, O as resolveDiscordMessageFlags, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-BVJkIe93.mjs";
3
+ import { B as RateLimitError, C as listMessageReactionUsers, D as editChannelMessage, E as deleteChannelMessage, F as getGuildVoiceState, G as readRetryAfter, H as isUnknownDiscordVoiceStateError, I as listGuildEmojis, J as stripUndefinedFields, L as DISCORD_REST_TIMEOUT_MS, M as unpinChannelMessage, N as getGuild, O as getChannel, P as getGuildMember, S as deleteOwnMessageReaction, T as createThread, U as readDiscordCode, V as isUnknownDiscordMessageError, W as readDiscordMessage, j as pinChannelMessage, k as getChannelMessage, q as withDiscordRequestAuthority, w as createChannelMessage, x as createOwnMessageReaction, z as DiscordError } from "./discord-BGkLzt2b.mjs";
4
+ import { C as parseDiscordRetryAfterBodySeconds } from "./allow-list-CkqpzPvP.mjs";
5
+ import { S as chunkDiscordTextWithMode, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult, v as classifyDiscordDeliveryFailure, x as recordDiscordMessageCreateAmbiguity, y as createDiscordRetryRunner } from "./send.receipt-D0vpuJMr.mjs";
6
+ import { n as getDiscordEndpointRuntime, r as resolveDiscordEndpointAttachmentGuard } from "./endpoint-runtime-BM3x-m6O.mjs";
7
+ import { o as parseDiscordHttpErrorBody } from "./api-C4j_kC-2.mjs";
8
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-C98DQ-sp.mjs";
9
+ import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-izfb48w-.mjs";
10
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-CT9hnmo4.mjs";
11
11
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
12
12
  import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
13
13
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -26,7 +26,7 @@ import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
26
26
  import fs from "node:fs/promises";
27
27
  import path from "node:path";
28
28
  import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
29
- //#region extensions/discord/src/send.channels.ts
29
+ // extensions/discord/src/send.channels.ts
30
30
  async function createChannelDiscord(payload, opts) {
31
31
  const rest = resolveDiscordRest(opts);
32
32
  const body = stripUndefinedFields({
@@ -87,8 +87,7 @@ async function removeChannelPermissionDiscord(channelId, targetId, opts) {
87
87
  await resolveDiscordRest(opts).delete(Routes.channelPermission(channelId, targetId));
88
88
  return { ok: true };
89
89
  }
90
- //#endregion
91
- //#region extensions/discord/src/send.emojis-stickers.ts
90
+ // extensions/discord/src/send.emojis-stickers.ts
92
91
  const DISCORD_IMAGE_UPLOAD_TYPES = [
93
92
  "image/png",
94
93
  "image/jpeg",
@@ -146,8 +145,7 @@ async function uploadStickerDiscord(payload, opts) {
146
145
  }
147
146
  });
148
147
  }
149
- //#endregion
150
- //#region extensions/discord/src/send.guild.ts
148
+ // extensions/discord/src/send.guild.ts
151
149
  function readDiscordResource(read) {
152
150
  return async (id, opts) => await read(resolveDiscordRest(opts), id);
153
151
  }
@@ -226,8 +224,7 @@ async function banMemberDiscord(payload, opts) {
226
224
  });
227
225
  return { ok: true };
228
226
  }
229
- //#endregion
230
- //#region extensions/discord/src/send.messages.ts
227
+ // extensions/discord/src/send.messages.ts
231
228
  const DISCORD_THREAD_TRANSPORT_ONLY_MAX_LINES = Number.MAX_SAFE_INTEGER;
232
229
  function resolveDiscordThreadStarterMessageId(thread) {
233
230
  const starterMessage = "message" in thread ? thread.message : void 0;
@@ -429,8 +426,7 @@ async function searchMessagesDiscord(query, opts) {
429
426
  assertDiscordSearchResponse(result);
430
427
  return result;
431
428
  }
432
- //#endregion
433
- //#region extensions/discord/src/send.webhook.ts
429
+ // extensions/discord/src/send.webhook.ts
434
430
  const DISCORD_WEBHOOK_ERROR_BODY_LIMIT_BYTES = 8192;
435
431
  const DISCORD_WEBHOOK_TIMEOUT_MS = DISCORD_REST_TIMEOUT_MS;
436
432
  function throwIfWebhookDeadlineExpired(signal) {
@@ -548,8 +544,7 @@ async function sendWebhookMessageDiscord(text, opts) {
548
544
  deadline.cleanup();
549
545
  }
550
546
  }
551
- //#endregion
552
- //#region extensions/discord/src/send.voice.ts
547
+ // extensions/discord/src/send.voice.ts
553
548
  const WAVEFORM_SAMPLES = 256;
554
549
  const DISCORD_OPUS_SAMPLE_RATE_HZ = 48e3;
555
550
  const DISCORD_VOICE_ERROR_BODY_LIMIT_BYTES = 8192;
@@ -861,8 +856,7 @@ async function sendVoiceMessageDiscord(to, audioPath, opts) {
861
856
  });
862
857
  });
863
858
  }
864
- //#endregion
865
- //#region extensions/discord/src/send.typing.ts
859
+ // extensions/discord/src/send.typing.ts
866
860
  async function sendTypingDiscord(channelId, opts) {
867
861
  await resolveDiscordRest(opts).post(Routes.channelTyping(channelId));
868
862
  return {
@@ -870,8 +864,7 @@ async function sendTypingDiscord(channelId, opts) {
870
864
  channelId
871
865
  };
872
866
  }
873
- //#endregion
874
- //#region extensions/discord/src/send.reactions.ts
867
+ // extensions/discord/src/send.reactions.ts
875
868
  function reactionMutation(operation, label) {
876
869
  return async (channelId, messageId, emoji, opts) => {
877
870
  const { rest, request } = createDiscordClient(opts);
@@ -927,8 +920,7 @@ async function fetchReactionsDiscord(channelId, messageId, opts) {
927
920
  }
928
921
  return summaries;
929
922
  }
930
- //#endregion
931
- //#region extensions/discord/src/send.ts
923
+ // extensions/discord/src/send.ts
932
924
  var send_exports = /* @__PURE__ */ __exportAll({
933
925
  DiscordSendError: () => DiscordSendError,
934
926
  DiscordThreadInitialMessageError: () => DiscordThreadInitialMessageError,
@@ -984,5 +976,4 @@ var send_exports = /* @__PURE__ */ __exportAll({
984
976
  uploadEmojiDiscord: () => uploadEmojiDiscord,
985
977
  uploadStickerDiscord: () => uploadStickerDiscord
986
978
  });
987
- //#endregion
988
979
  export { listScheduledEventsDiscord as A, moveChannelDiscord as B, fetchChannelInfoDiscord as C, fetchVoiceStatusDiscord as D, fetchRoleInfoDiscord as E, uploadEmojiDiscord as F, setChannelPermissionDiscord as H, uploadStickerDiscord as I, createChannelDiscord as L, resolveEventCoverImage as M, timeoutMemberDiscord as N, kickMemberDiscord as O, listGuildEmojisDiscord as P, deleteChannelDiscord as R, createScheduledEventDiscord as S, fetchMemberInfoDiscord as T, removeChannelPermissionDiscord as V, readMessagesDiscord as _, removeReactionDiscord as a, addRoleDiscord as b, sendWebhookMessageDiscord as c, deleteMessageDiscord as d, editMessageDiscord as f, pinMessageDiscord as g, listThreadsDiscord as h, removeOwnReactionsDiscord as i, removeRoleDiscord as j, listGuildChannelsDiscord as k, DiscordThreadInitialMessageError as l, listPinsDiscord as m, fetchReactionsDiscord as n, sendTypingDiscord as o, fetchMessageDiscord as p, reactMessageDiscord as r, sendVoiceMessageDiscord as s, send_exports as t, createThreadDiscord as u, searchMessagesDiscord as v, fetchGuildInfoDiscord as w, banMemberDiscord as x, unpinMessageDiscord as y, editChannelDiscord as z };
@@ -1,11 +1,11 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { D as createDiscordMessageNonce, M as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-BXWCIkfx.mjs";
3
- import { D as editChannelMessage, f as serializePayload, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-KsHAulAQ.mjs";
4
- import { r as createDiscordSendResult } from "./send.receipt-DkCkAjRL.mjs";
5
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-54k9fO6u.mjs";
6
- import { t as sendMessageDiscord } from "./send.outbound-70KlFdzN.mjs";
7
- import { a as buildDiscordComponentMessage, u as resolveDiscordComponentAttachmentName } from "./components-Cy4hDa6J.mjs";
8
- import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { D as createDiscordMessageNonce, M as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-BVJkIe93.mjs";
3
+ import { D as editChannelMessage, f as serializePayload, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-BGkLzt2b.mjs";
4
+ import { r as createDiscordSendResult } from "./send.receipt-D0vpuJMr.mjs";
5
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-C98DQ-sp.mjs";
6
+ import { t as sendMessageDiscord } from "./send.outbound-izfb48w-.mjs";
7
+ import { a as buildDiscordComponentMessage, u as resolveDiscordComponentAttachmentName } from "./components-DeCLO9w0.mjs";
8
+ import { n as getOptionalDiscordRuntime } from "./runtime-DcBvHOm1.mjs";
9
9
  import { hasNonEmptyString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { ChannelType } from "discord-api-types/v10";
11
11
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
@@ -16,7 +16,7 @@ import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runt
16
16
  import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
17
17
  import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
18
18
  import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
19
- //#region extensions/discord/src/components-registry-state.ts
19
+ // extensions/discord/src/components-registry-state.ts
20
20
  const discordComponentRegistryState = resolveGlobalSingleton(Symbol.for("openclaw.discord.componentRegistryState"), () => ({
21
21
  withRegistryLock: createAsyncLock(),
22
22
  componentEntries: /* @__PURE__ */ new Map(),
@@ -31,8 +31,7 @@ const discordComponentRegistryState = resolveGlobalSingleton(Symbol.for("opencla
31
31
  state.persistentModalStore = void 0;
32
32
  state.persistentRegistryDisabled = false;
33
33
  }));
34
- //#endregion
35
- //#region extensions/discord/src/components-registry.ts
34
+ // extensions/discord/src/components-registry.ts
36
35
  const DEFAULT_COMPONENT_TTL_MS = 18e5;
37
36
  const PERSISTENT_COMPONENT_NAMESPACE = "discord.components";
38
37
  const PERSISTENT_MODAL_NAMESPACE = "discord.modals";
@@ -227,8 +226,7 @@ async function resolveDiscordModalEntryWithPersistence(params) {
227
226
  });
228
227
  });
229
228
  }
230
- //#endregion
231
- //#region extensions/discord/src/send.components.ts
229
+ // extensions/discord/src/send.components.ts
232
230
  var send_components_exports = /* @__PURE__ */ __exportAll({
233
231
  editDiscordComponentMessage: () => editDiscordComponentMessage,
234
232
  registerBuiltDiscordComponentMessage: () => registerBuiltDiscordComponentMessage,
@@ -394,5 +392,4 @@ async function writeDiscordComponentMessage(to, spec, opts, messageId) {
394
392
  });
395
393
  return deliveryResult ?? toDeliveryResult();
396
394
  }
397
- //#endregion
398
395
  export { registerDiscordComponentEntries as a, send_components_exports as i, registerBuiltDiscordComponentMessage as n, resolveDiscordComponentEntryWithPersistence as o, sendDiscordComponentMessage as r, resolveDiscordModalEntryWithPersistence as s, editDiscordComponentMessage as t };
@@ -1,8 +1,8 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-BXWCIkfx.mjs";
3
- import { T as createThread, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-KsHAulAQ.mjs";
4
- import { d as normalizeDiscordSnowflake, m as createReusableDiscordReplyReference, n as createDiscordSendReceiptFromResults, p as resolveDiscordDirectoryUserId, r as createDiscordSendResult, u as normalizeDiscordHandleKey } from "./send.receipt-DkCkAjRL.mjs";
5
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-54k9fO6u.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-BVJkIe93.mjs";
3
+ import { T as createThread, q as withDiscordRequestAuthority, w as createChannelMessage } from "./discord-BGkLzt2b.mjs";
4
+ import { d as normalizeDiscordSnowflake, m as createReusableDiscordReplyReference, n as createDiscordSendReceiptFromResults, p as resolveDiscordDirectoryUserId, r as createDiscordSendResult, u as normalizeDiscordHandleKey } from "./send.receipt-D0vpuJMr.mjs";
5
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-C98DQ-sp.mjs";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { ChannelType } from "discord-api-types/v10";
8
8
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -13,7 +13,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
13
13
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
14
14
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
15
15
  import { fromMarkdown } from "mdast-util-from-markdown";
16
- //#region extensions/discord/src/url-ranges.ts
16
+ // extensions/discord/src/url-ranges.ts
17
17
  const DISCORD_URL_START_RE = /(?:[A-Za-z][A-Za-z0-9+.-]*:\/\/|www\.|\/\/|mailto:)/giu;
18
18
  function findDiscordUrlRanges(markdown) {
19
19
  const ranges = [];
@@ -41,8 +41,7 @@ function findDiscordUrlRanges(markdown) {
41
41
  }
42
42
  return ranges;
43
43
  }
44
- //#endregion
45
- //#region extensions/discord/src/mentions.ts
44
+ // extensions/discord/src/mentions.ts
46
45
  const MENTION_CANDIDATE_PATTERN = /(^|[\s([{"'.,;:!?])@([a-z0-9_.-]{2,32}(?:#[0-9]{4})?)/gi;
47
46
  const DISCORD_RESERVED_MENTIONS = /* @__PURE__ */ new Set(["everyone", "here"]);
48
47
  const DISCORD_DISCRIMINATOR_SUFFIX = /#\d{4}$/;
@@ -137,8 +136,7 @@ function rewriteDiscordKnownMentions(text, params) {
137
136
  function discordTextHasBroadcastMention(text) {
138
137
  return DISCORD_BROADCAST_MENTION_PATTERN.test(text);
139
138
  }
140
- //#endregion
141
- //#region extensions/discord/src/markdown.ts
139
+ // extensions/discord/src/markdown.ts
142
140
  const DISCORD_NATIVE_TOKEN_RE = /<a?:[A-Za-z0-9_]+:\d+>|<\/[^>]+:\d+>/giu;
143
141
  function normalizeDiscordBold(markdown) {
144
142
  if (!markdown.includes("__")) return markdown;
@@ -287,8 +285,7 @@ function normalizeDiscordBold(markdown) {
287
285
  function renderDiscordMarkdown(markdown, tableMode) {
288
286
  return normalizeDiscordBold(convertMarkdownTables(markdown, tableMode));
289
287
  }
290
- //#endregion
291
- //#region extensions/discord/src/outbound-text.ts
288
+ // extensions/discord/src/outbound-text.ts
292
289
  function prepareDiscordOutboundText(text, params) {
293
290
  const { account } = params;
294
291
  const renderedText = renderDiscordMarkdown(text, params.tableMode ?? resolveMarkdownTableMode({
@@ -305,8 +302,7 @@ function prepareDiscordOutboundText(text, params) {
305
302
  })
306
303
  };
307
304
  }
308
- //#endregion
309
- //#region extensions/discord/src/send.outbound.ts
305
+ // extensions/discord/src/send.outbound.ts
310
306
  var send_outbound_exports = /* @__PURE__ */ __exportAll({
311
307
  sendMessageDiscord: () => sendMessageDiscord,
312
308
  sendPollDiscord: () => sendPollDiscord,
@@ -573,5 +569,4 @@ async function sendDiscordStructuredMessage(to, opts, kind, buildPayload) {
573
569
  });
574
570
  });
575
571
  }
576
- //#endregion
577
572
  export { prepareDiscordOutboundText as a, send_outbound_exports as i, sendPollDiscord as n, discordTextHasBroadcastMention as o, sendStickerDiscord as r, formatMention as s, sendMessageDiscord as t };
@@ -1,5 +1,5 @@
1
- import { B as RateLimitError } from "./discord-KsHAulAQ.mjs";
2
- import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
1
+ import { B as RateLimitError } from "./discord-BGkLzt2b.mjs";
2
+ import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
3
3
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
4
4
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
@@ -13,7 +13,7 @@ import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
13
13
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
14
14
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
15
15
  import { attachChannelToResults } from "openclaw/plugin-sdk/channel-send-result";
16
- //#region packages/normalization-core/src/utf16-slice.ts
16
+ // packages/normalization-core/src/utf16-slice.ts
17
17
  function isHighSurrogate(codeUnit) {
18
18
  return codeUnit >= 55296 && codeUnit <= 56319;
19
19
  }
@@ -26,8 +26,7 @@ function avoidTrailingHighSurrogateBreak(text, start, end) {
26
26
  const adjusted = end - 1;
27
27
  return adjusted > start ? adjusted : end + 1;
28
28
  }
29
- //#endregion
30
- //#region packages/normalization-core/src/grapheme.ts
29
+ // packages/normalization-core/src/grapheme.ts
31
30
  let graphemeSegmenter;
32
31
  function getGraphemeSegmenter() {
33
32
  graphemeSegmenter ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
@@ -51,8 +50,7 @@ function findGraphemeChunkEnd(text, start, maxEnd, preferredEnd = maxEnd, allowP
51
50
  if (end <= start && preferred < hardEnd) end = hardEnd === text.length ? hardEnd : segments.containing(hardEnd)?.index ?? hardEnd;
52
51
  return end > start ? end : allowPartial ? avoidTrailingHighSurrogateBreak(text, start, hardEnd) : start;
53
52
  }
54
- //#endregion
55
- //#region extensions/discord/src/chunk.ts
53
+ // extensions/discord/src/chunk.ts
56
54
  const DEFAULT_MAX_CHARS = 2e3;
57
55
  const DEFAULT_MAX_LINES = 17;
58
56
  const REASONING_ITALICS_MARKER_CHARS = 2;
@@ -367,8 +365,7 @@ function createDiscordRanges(source, maxChars, maxLines) {
367
365
  cutBoundary
368
366
  };
369
367
  }
370
- //#endregion
371
- //#region extensions/discord/src/retry.ts
368
+ // extensions/discord/src/retry.ts
372
369
  const DISCORD_RETRY_DEFAULTS = {
373
370
  attempts: 3,
374
371
  minDelayMs: 500,
@@ -462,8 +459,7 @@ function createDiscordRetryRunner(params) {
462
459
  })(runRequest, label);
463
460
  };
464
461
  }
465
- //#endregion
466
- //#region extensions/discord/src/reply-reference.ts
462
+ // extensions/discord/src/reply-reference.ts
467
463
  function resolveDiscordReplyReference(params) {
468
464
  if (!params.replyToId) return;
469
465
  const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
@@ -481,11 +477,9 @@ function createReusableDiscordReplyReference(messageId) {
481
477
  function resolveDiscordReplyMessageId(reply, isFirst) {
482
478
  return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
483
479
  }
484
- //#endregion
485
- //#region extensions/discord/src/directory-cache-state.ts
480
+ // extensions/discord/src/directory-cache-state.ts
486
481
  const discordDirectoryCacheState = { handlesByAccount: /* @__PURE__ */ new Map() };
487
- //#endregion
488
- //#region extensions/discord/src/directory-cache.ts
482
+ // extensions/discord/src/directory-cache.ts
489
483
  const DISCORD_DIRECTORY_CACHE_MAX_ENTRIES = 4e3;
490
484
  const DISCORD_DISCRIMINATOR_SUFFIX = /#\d{4}$/;
491
485
  function normalizeDiscordSnowflake(value) {
@@ -534,8 +528,7 @@ function resolveDiscordDirectoryUserId(params) {
534
528
  if (!handle) return;
535
529
  return cache.get(handle) ?? void 0;
536
530
  }
537
- //#endregion
538
- //#region extensions/discord/src/normalize.ts
531
+ // extensions/discord/src/normalize.ts
539
532
  function normalizeDiscordMessagingTarget(raw) {
540
533
  return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
541
534
  }
@@ -580,8 +573,7 @@ function looksLikeDiscordTargetId(raw) {
580
573
  const trimmed = raw.trim();
581
574
  return /^<@!?\d+>$/.test(trimmed) || /^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed) || /^\d{6,}$/.test(trimmed);
582
575
  }
583
- //#endregion
584
- //#region extensions/discord/src/send.receipt.ts
576
+ // extensions/discord/src/send.receipt.ts
585
577
  function toDiscordOutboundDeliveryResult(result) {
586
578
  const { channelId, ...delivery } = result;
587
579
  return {
@@ -644,5 +636,4 @@ function createDiscordSendResult(params) {
644
636
  })
645
637
  };
646
638
  }
647
- //#endregion
648
639
  export { findGraphemeChunkEnd as C, chunkDiscordTextWithMode as S, canFallbackDiscordWebhookSend as _, allowFromContainsDiscordUserId as a, hasDiscordMessageCreateAmbiguity as b, normalizeDiscordMessagingTarget as c, normalizeDiscordSnowflake as d, rememberDiscordDirectoryUser as f, resolveDiscordReplyReference as g, resolveDiscordReplyMessageId as h, toDiscordOutboundDeliveryResult as i, normalizeDiscordOutboundTarget as l, createReusableDiscordReplyReference as m, createDiscordSendReceiptFromResults as n, looksLikeDiscordTargetId as o, resolveDiscordDirectoryUserId as p, createDiscordSendResult as r, matchesDiscordToolContextTarget as s, createDiscordSendReceipt as t, normalizeDiscordHandleKey as u, classifyDiscordDeliveryFailure as v, recordDiscordMessageCreateAmbiguity as x, createDiscordRetryRunner as y };
@@ -1,9 +1,9 @@
1
- import { h as normalizeDiscordToken, l as resolveDiscordAccount, s as mergeDiscordAccountConfig } from "./accounts-C_25wyxC.mjs";
2
- import { A as getThreadMember, N as getGuild, O as getChannel, P as getGuildMember, R as RequestClient, b as getCurrentUser, d as hasDiscordV2Components, f as serializePayload, p as Embed, w as createChannelMessage, y as createUserDmChannel, z as DiscordError } from "./discord-KsHAulAQ.mjs";
3
- import { w as isDiscordThreadChannelType } from "./allow-list-C3j0qLDp.mjs";
4
- import { S as chunkDiscordTextWithMode, h as resolveDiscordReplyMessageId, y as createDiscordRetryRunner } from "./send.receipt-DkCkAjRL.mjs";
5
- import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-BzXwBAXt.mjs";
6
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-54k9fO6u.mjs";
1
+ import { h as normalizeDiscordToken, l as resolveDiscordAccount, s as mergeDiscordAccountConfig } from "./accounts-DtjvhJUj.mjs";
2
+ import { A as getThreadMember, N as getGuild, O as getChannel, P as getGuildMember, R as RequestClient, b as getCurrentUser, d as hasDiscordV2Components, f as serializePayload, p as Embed, w as createChannelMessage, y as createUserDmChannel, z as DiscordError } from "./discord-BGkLzt2b.mjs";
3
+ import { w as isDiscordThreadChannelType } from "./allow-list-CkqpzPvP.mjs";
4
+ import { S as chunkDiscordTextWithMode, h as resolveDiscordReplyMessageId, y as createDiscordRetryRunner } from "./send.receipt-D0vpuJMr.mjs";
5
+ import { t as resolveDiscordProxyFetchForAccount } from "./proxy-fetch-B8cK6FLQ.mjs";
6
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-C98DQ-sp.mjs";
7
7
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
8
  import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
@@ -13,7 +13,7 @@ import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
13
13
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
14
14
  import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
15
15
  import { randomBytes } from "node:crypto";
16
- //#region extensions/discord/src/monitor/gateway-registry.ts
16
+ // extensions/discord/src/monitor/gateway-registry.ts
17
17
  /**
18
18
  * Module-level registry of active Discord GatewayPlugin instances.
19
19
  * Bridges the gap between agent tool handlers (which only have REST access)
@@ -34,8 +34,7 @@ function getGateway(accountId) {
34
34
  function clearGateways() {
35
35
  gatewayRegistry.clear();
36
36
  }
37
- //#endregion
38
- //#region extensions/discord/src/client.ts
37
+ // extensions/discord/src/client.ts
39
38
  function createDiscordRuntimeAccountContext(params) {
40
39
  return {
41
40
  cfg: params.cfg,
@@ -120,8 +119,7 @@ function createDiscordClient(opts) {
120
119
  function resolveDiscordRest(opts) {
121
120
  return createDiscordRestClient(opts).rest;
122
121
  }
123
- //#endregion
124
- //#region extensions/discord/src/send.message-request.ts
122
+ // extensions/discord/src/send.message-request.ts
125
123
  const SUPPRESS_EMBEDS_FLAG = MessageFlags.SuppressEmbeds;
126
124
  const SUPPRESS_NOTIFICATIONS_FLAG = MessageFlags.SuppressNotifications;
127
125
  function createDiscordMessageNonce() {
@@ -163,8 +161,7 @@ function buildDiscordMessageRequest(params) {
163
161
  ...nonce ? { enforce_nonce: true } : {}
164
162
  };
165
163
  }
166
- //#endregion
167
- //#region extensions/discord/src/send.permissions.ts
164
+ // extensions/discord/src/send.permissions.ts
168
165
  const PERMISSION_ENTRIES = Object.entries(PermissionFlagsBits).filter(([, value]) => typeof value === "bigint");
169
166
  const ALL_PERMISSIONS = PERMISSION_ENTRIES.reduce((acc, [, value]) => acc | value, 0n);
170
167
  const ADMINISTRATOR_BIT = PermissionFlagsBits.Administrator;
@@ -381,8 +378,7 @@ async function fetchChannelPermissionsDiscord(channelId, opts) {
381
378
  channelType
382
379
  };
383
380
  }
384
- //#endregion
385
- //#region extensions/discord/src/send.types.ts
381
+ // extensions/discord/src/send.types.ts
386
382
  var DiscordSendError = class extends Error {
387
383
  constructor(message, opts) {
388
384
  super(message);
@@ -396,8 +392,7 @@ var DiscordSendError = class extends Error {
396
392
  const DISCORD_MAX_EMOJI_BYTES = 262144;
397
393
  const DISCORD_MAX_STICKER_BYTES = 524288;
398
394
  const DISCORD_MAX_EVENT_COVER_BYTES = 8388608;
399
- //#endregion
400
- //#region extensions/discord/src/send.shared.ts
395
+ // extensions/discord/src/send.shared.ts
401
396
  const DISCORD_TEXT_LIMIT = 2e3;
402
397
  const DISCORD_MAX_STICKERS = 3;
403
398
  const DISCORD_POLL_MAX_ANSWERS = 10;
@@ -586,5 +581,4 @@ function buildReactionIdentifier(emoji) {
586
581
  if (emoji.id && emoji.name) return `${emoji.name}:${emoji.id}`;
587
582
  return emoji.name ?? "";
588
583
  }
589
- //#endregion
590
584
  export { resolveDiscordSendEmbeds as A, unregisterGateway as B, hasAnyChannelPermissionDiscord as C, createDiscordMessageNonce as D, buildDiscordMessageRequest as E, resolveDiscordClientAccountContext as F, resolveDiscordRest as I, clearGateways as L, createDiscordClient as M, createDiscordRestClient as N, resolveDiscordMessageFlags as O, createDiscordRuntimeAccountContext as P, getGateway as R, hasAllGuildPermissionsDiscord as S, SUPPRESS_NOTIFICATIONS_FLAG as T, canManageGuildMemberRoleDiscord as _, normalizeEmojiName as a, fetchChannelPermissionsDiscord as b, resolveChannelId as c, sendDiscordChunks as d, sendDiscordMedia as f, DiscordSendError as g, DISCORD_MAX_STICKER_BYTES as h, normalizeDiscordPollInput as i, resolveDiscordSuppressEmbeds as j, resolveDiscordSendComponents as k, resolveDiscordChannel as l, DISCORD_MAX_EVENT_COVER_BYTES as m, buildDiscordTextChunks as n, normalizeReactionEmoji as o, DISCORD_MAX_EMOJI_BYTES as p, buildReactionIdentifier as r, normalizeStickerIds as s, buildDiscordSendError as t, resolveDiscordTargetChannelId as u, canManageGuildRoleDiscord as v, hasAnyGuildPermissionDiscord as w, fetchMemberGuildPermissionsDiscord as x, canViewDiscordGuildChannel as y, registerGateway as z };
@@ -1,6 +1,6 @@
1
- import { S as formatDiscordUserTag } from "./allow-list-C3j0qLDp.mjs";
1
+ import { S as formatDiscordUserTag } from "./allow-list-CkqpzPvP.mjs";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
- //#region extensions/discord/src/monitor/sender-identity.ts
3
+ // extensions/discord/src/monitor/sender-identity.ts
4
4
  function resolveDiscordWebhookId(message) {
5
5
  return normalizeOptionalString(message.webhookId ?? message.webhook_id) ?? null;
6
6
  }
@@ -32,5 +32,4 @@ function resolveDiscordSenderIdentity(params) {
32
32
  isPluralKit: false
33
33
  };
34
34
  }
35
- //#endregion
36
35
  export { resolveDiscordWebhookId as n, resolveDiscordSenderIdentity as t };
@@ -1,6 +1,5 @@
1
- //#region extensions/discord/src/session-contract.ts
1
+ // extensions/discord/src/session-contract.ts
2
2
  function deriveLegacySessionChatType(sessionKey) {
3
3
  return /^discord:(?:[^:]+:)?guild-[^:]+:channel-[^:]+$/.test(sessionKey) ? "channel" : void 0;
4
4
  }
5
- //#endregion
6
5
  export { deriveLegacySessionChatType as t };
@@ -1,5 +1,5 @@
1
1
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
- //#region extensions/discord/src/session-key-normalization.ts
2
+ // extensions/discord/src/session-key-normalization.ts
3
3
  function normalizeExplicitDiscordSessionKey(sessionKey, ctx) {
4
4
  let normalized = normalizeLowercaseStringOrEmpty(sessionKey);
5
5
  const chatType = normalizeLowercaseStringOrEmpty(ctx.ChatType);
@@ -13,5 +13,4 @@ function normalizeExplicitDiscordSessionKey(sessionKey, ctx) {
13
13
  const directId = senderId || fromDiscordId;
14
14
  return directId && directId === match[2] ? `${match[1]}discord:direct:${match[2]}` : normalized;
15
15
  }
16
- //#endregion
17
16
  export { normalizeExplicitDiscordSessionKey as t };
@@ -0,0 +1,2 @@
1
+ export { t as discordSetupPlugin } from "./channel.setup-BrGEJ0Ia.mjs";
2
+ import "../setup-plugin-api.js";
@@ -1,12 +1,12 @@
1
- import { c as resolveDefaultDiscordAccountId, f as resolveDiscordAccountDisabledReason, i as listDiscordAccountIds, l as resolveDiscordAccount, p as resolveDiscordAccountDmPolicy, r as isDiscordAccountEnabledForRuntime, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-C_25wyxC.mjs";
2
- import { t as inspectDiscordAccount } from "./account-inspect-DGkdWwix.mjs";
3
- import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
4
- import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-y0Qy36X3.mjs";
5
- import { t as DiscordChannelConfigSchema } from "./config-schema-BNKN1cu5.mjs";
6
- import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bwv8EuQ_.mjs";
7
- import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B1kE4sDv.mjs";
8
- import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DNyyjTZZ.mjs";
9
- import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.mjs";
1
+ import { c as resolveDefaultDiscordAccountId, f as resolveDiscordAccountDisabledReason, i as listDiscordAccountIds, l as resolveDiscordAccount, p as resolveDiscordAccountDmPolicy, r as isDiscordAccountEnabledForRuntime, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-DtjvhJUj.mjs";
2
+ import { t as inspectDiscordAccount } from "./account-inspect-CSz5Qodj.mjs";
3
+ import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
4
+ import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-DjIHWFla.mjs";
5
+ import { t as DiscordChannelConfigSchema } from "./config-schema-GX2yDgIH.mjs";
6
+ import { n as normalizeCompatibilityConfig } from "./doctor-contract-Dstl3cMg.mjs";
7
+ import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-CP6teHec.mjs";
8
+ import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-D-o0iWDk.mjs";
9
+ import { t as deriveLegacySessionChatType } from "./session-contract-Bq71MS78.mjs";
10
10
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
11
11
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
12
12
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
@@ -17,7 +17,7 @@ import { createConditionalWarningCollector, createOpenProviderConfiguredRouteWar
17
17
  import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
18
18
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
19
19
  import { createEnvPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
20
- //#region extensions/discord/src/security.ts
20
+ // extensions/discord/src/security.ts
21
21
  const resolveDiscordDmPolicy = createScopedDmSecurityResolver({
22
22
  channelKey: "discord",
23
23
  resolvePolicy: (account) => account.config.dmPolicy,
@@ -60,10 +60,9 @@ const discordSecurityAdapter = {
60
60
  severity: "warn",
61
61
  title: "Discord security warning"
62
62
  }),
63
- collectAuditFindings: async (params) => (await import("./security-audit-BFT84Uny.mjs").then((n) => n.n)).collectDiscordSecurityAuditFindings(params)
63
+ collectAuditFindings: async (params) => (await import("./security-audit-CTwisG7c.mjs").then((n) => n.n)).collectDiscordSecurityAuditFindings(params)
64
64
  };
65
- //#endregion
66
- //#region extensions/discord/src/setup-adapter.ts
65
+ // extensions/discord/src/setup-adapter.ts
67
66
  const discordSetupAdapter = createEnvPatchedAccountSetupAdapter({
68
67
  channelKey: "discord",
69
68
  defaultAccountOnlyEnvError: "DISCORD_BOT_TOKEN can only be used for the default account.",
@@ -93,11 +92,10 @@ const discordSetupContract = defineChannelSetupContract({
93
92
  },
94
93
  legacyAdapter: discordSetupAdapter
95
94
  });
96
- //#endregion
97
- //#region extensions/discord/src/shared.ts
95
+ // extensions/discord/src/shared.ts
98
96
  const DISCORD_CHANNEL = "discord";
99
97
  const livePolicyConfigPrefixes = Object.keys(selectDiscordLivePolicyConfig({})).flatMap((key) => [`channels.discord.${key}`, `channels.discord.accounts.*.${key}`]);
100
- const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-CQescbAS.mjs"));
98
+ const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-DBBXoP9w.mjs"));
101
99
  const discordDoctor = {
102
100
  dmAllowFromMode: "topOnly",
103
101
  groupModel: "route",
@@ -223,5 +221,4 @@ function createDiscordPluginBase(params) {
223
221
  }
224
222
  };
225
223
  }
226
- //#endregion
227
224
  export { discordSecurityAdapter as i, discordConfigAdapter as n, discordSetupContract as r, createDiscordPluginBase as t };
@@ -1,10 +1,10 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { i as parseCustomId } from "./components.base-CiS0h_XP.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { i as parseCustomId } from "./components.base-C5sAPHe4.mjs";
3
3
  import { readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { resolveAskUserQuestionOptionIndex } from "openclaw/plugin-sdk/reply-payload";
5
5
  import { legacyInteractiveReplyToPresentation, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
6
6
  import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
7
- //#region extensions/discord/src/custom-id-codec.ts
7
+ // extensions/discord/src/custom-id-codec.ts
8
8
  /**
9
9
  * URI-component codec for values embedded in `k=v;` custom-id grammars
10
10
  * (exec approvals, model picker, command args, agent components).
@@ -34,8 +34,7 @@ function needsCustomIdFieldEscaping(value) {
34
34
  function unescapeCustomIdFieldValue(value) {
35
35
  return value.replace(/%(25|3B)/gi, (match) => match.toLowerCase() === "%25" ? "%" : ";");
36
36
  }
37
- //#endregion
38
- //#region extensions/discord/src/component-custom-id.ts
37
+ // extensions/discord/src/component-custom-id.ts
39
38
  const DISCORD_COMPONENT_CUSTOM_ID_KEY = "occomp";
40
39
  const DISCORD_MODAL_CUSTOM_ID_KEY = "ocmodal";
41
40
  const DISCORD_ACTIVITY_CUSTOM_ID_KEY = "ocactivity";
@@ -115,8 +114,7 @@ function parseDiscordComponentCustomIdForInteraction(id) {
115
114
  function parseDiscordModalCustomIdForInteraction(id) {
116
115
  return parseDiscordCustomIdForInteraction(id, DISCORD_MODAL_CUSTOM_ID_KEY);
117
116
  }
118
- //#endregion
119
- //#region extensions/discord/src/approval-custom-id.ts
117
+ // extensions/discord/src/approval-custom-id.ts
120
118
  const DISCORD_APPROVAL_DECISIONS = {
121
119
  "allow-once": {
122
120
  label: "Allowed (once)",
@@ -179,8 +177,7 @@ function parseExecApprovalData(data) {
179
177
  action: rawAction
180
178
  };
181
179
  }
182
- //#endregion
183
- //#region extensions/discord/src/question-custom-id.ts
180
+ // extensions/discord/src/question-custom-id.ts
184
181
  const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
185
182
  function buildDiscordQuestionCustomId(callback) {
186
183
  if (!QUESTION_RECORD_ID_PATTERN.test(callback.questionId) || !Number.isInteger(callback.optionIndex) || callback.optionIndex < 0 || callback.optionIndex > 3) return;
@@ -195,8 +192,7 @@ function parseDiscordQuestionData(data) {
195
192
  optionIndex: Number(rawIndex)
196
193
  };
197
194
  }
198
- //#endregion
199
- //#region extensions/discord/src/shared-interactive.ts
195
+ // extensions/discord/src/shared-interactive.ts
200
196
  var shared_interactive_exports = /* @__PURE__ */ __exportAll({
201
197
  buildDiscordInteractiveComponents: () => buildDiscordInteractiveComponents,
202
198
  buildDiscordPresentationComponents: () => buildDiscordPresentationComponents
@@ -312,5 +308,4 @@ function buildDiscordPresentationComponents(presentation, options = {}) {
312
308
  }
313
309
  return blocks.length ? { blocks } : void 0;
314
310
  }
315
- //#endregion
316
311
  export { parseDiscordModalCustomId as _, DISCORD_APPROVAL_DECISIONS as a, encodeCustomIdComponent as b, DISCORD_COMPONENT_CUSTOM_ID_KEY as c, buildDiscordComponentCustomId as d, buildDiscordModalCustomId as f, parseDiscordComponentCustomIdForInteraction as g, parseDiscordComponentCustomId as h, parseDiscordQuestionData as i, DISCORD_MODAL_CUSTOM_ID_KEY as l, parseDiscordActivityCustomIdForInteraction as m, buildDiscordPresentationComponents as n, buildExecApprovalCustomId as o, parseDiscordActivityCustomId as p, shared_interactive_exports as r, parseExecApprovalData as s, buildDiscordInteractiveComponents as t, buildDiscordActivityCustomId as u, parseDiscordModalCustomIdForInteraction as v, decodeCustomIdComponent as y };
@@ -1,8 +1,8 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { d as unbindThreadBindingsBySessionKeyAsync, o as listThreadBindingsBySessionKey, s as listThreadBindingsBySessionKeyAsync } from "./thread-bindings-BiO6_GA2.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { d as unbindThreadBindingsBySessionKeyAsync, o as listThreadBindingsBySessionKey, s as listThreadBindingsBySessionKeyAsync } from "./thread-bindings-ESkVljSW.mjs";
3
3
  import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
5
- //#region extensions/discord/src/subagent-hooks.ts
5
+ // extensions/discord/src/subagent-hooks.ts
6
6
  var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
7
7
  handleDiscordSubagentDeliveryTarget: () => handleDiscordSubagentDeliveryTarget,
8
8
  handleDiscordSubagentDeliveryTargetAsync: () => handleDiscordSubagentDeliveryTargetAsync,
@@ -55,5 +55,4 @@ function resolveDiscordDeliveryTarget(event, bindings) {
55
55
  threadId: binding.threadId
56
56
  } };
57
57
  }
58
- //#endregion
59
58
  export { subagent_hooks_exports as i, handleDiscordSubagentDeliveryTargetAsync as n, handleDiscordSubagentEnded as r, handleDiscordSubagentDeliveryTarget as t };
@@ -1,6 +1,6 @@
1
- import { t as discord_exports } from "./discord-KsHAulAQ.mjs";
2
- import { S as formatDiscordUserTag } from "./allow-list-C3j0qLDp.mjs";
3
- //#region extensions/discord/src/monitor/system-events.ts
1
+ import { t as discord_exports } from "./discord-BGkLzt2b.mjs";
2
+ import { S as formatDiscordUserTag } from "./allow-list-CkqpzPvP.mjs";
3
+ // extensions/discord/src/monitor/system-events.ts
4
4
  const SYSTEM_EVENT_ACTIONS = /* @__PURE__ */ new Map([
5
5
  [discord_exports.MessageType.ChannelPinnedMessage, "pinned a message"],
6
6
  [discord_exports.MessageType.RecipientAdd, "added a recipient"],
@@ -29,5 +29,4 @@ function resolveDiscordSystemEvent(message, location) {
29
29
  const authorLabel = message.author ? formatDiscordUserTag(message.author) : "";
30
30
  return `Discord system: ${authorLabel ? `${authorLabel} ` : ""}${action} in ${location}`;
31
31
  }
32
- //#endregion
33
32
  export { resolveDiscordSystemEvent };