@openclaw/discord 2026.10.10-beta.5 → 2026.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/.setup/{account-inspect-8cCu6uPG.mjs → account-inspect-X_Xlr42B.mjs} +2 -3
  2. package/dist/.setup/{accounts-ljrzXBJi.mjs → accounts-C18HNgge.mjs} +4 -8
  3. package/dist/.setup/{active-turn-thread-route-C4tp9noA.mjs → active-turn-thread-route-BAc_Xik-.mjs} +1 -2
  4. package/dist/.setup/{allow-list-B_ToXtew.mjs → allow-list-D1ZGfhXh.mjs} +5 -10
  5. package/dist/.setup/{api-CtmE1OUN.mjs → api-Bth1wKF9.mjs} +3 -5
  6. package/dist/.setup/{approval-handler.runtime-Db06VTbO.mjs → approval-handler.runtime-krznjTz9.mjs} +8 -9
  7. package/dist/.setup/{approval-message-updates-wbUqLtLI.mjs → approval-message-updates-Cks-MSCJ.mjs} +3 -4
  8. package/dist/.setup/{audit-BXOSwPCj.mjs → audit-Dw_rAZIz.mjs} +6 -7
  9. package/dist/.setup/{channel-D2pO9g6n.mjs → channel-DwvRHJL0.mjs} +33 -41
  10. package/dist/.setup/{channel-access-DasWY_OV.mjs → channel-access-BPrWoEXM.mjs} +1 -2
  11. package/dist/.setup/{channel.setup-5fHTqcKz.mjs → channel.setup-BHjvtK1U.mjs} +8 -12
  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-C_cuoW1q.mjs → components-BvOWSPxr.mjs} +11 -20
  15. package/dist/.setup/{config-schema-_uBILpQf.mjs → config-schema-Coyq5wOr.mjs} +3 -5
  16. package/dist/.setup/{conversation-binding-route-Dcqrf96n.mjs → conversation-binding-route-DOPUZNYo.mjs} +2 -3
  17. package/dist/.setup/{directory-config-3iVub-3m.mjs → directory-config-CIqVnQtn.mjs} +3 -4
  18. package/dist/.setup/{directory-live-DLygQVtW.mjs → directory-live-DUuPEWub.mjs} +7 -10
  19. package/dist/.setup/{discord-Cl2OPTZ6.mjs → discord-eFlHX1Gn.mjs} +35 -68
  20. package/dist/.setup/{doctor-t9tc4fim.mjs → doctor-Cg_N6ZOI.mjs} +8 -9
  21. package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
  22. package/dist/.setup/{handle-action-CRH5-aLm.mjs → handle-action-DXY91jF-.mjs} +10 -11
  23. package/dist/.setup/{handle-action.guild-admin-BCWdfNPn.mjs → handle-action.guild-admin-BvBCfhXF.mjs} +3 -4
  24. package/dist/.setup/{live-policy-config-BPoB3eQi.mjs → live-policy-config-DO1Fk2hp.mjs} +3 -5
  25. package/dist/.setup/{message-handler-BvzZOXLT.mjs → message-handler-TR7l1P3P.mjs} +15 -19
  26. package/dist/.setup/{message-handler.preflight-DD0kun2e.mjs → message-handler.preflight-DxGb4zsm.mjs} +20 -28
  27. package/dist/.setup/{message-handler.preflight-pluralkit-DQygfoVJ.mjs → message-handler.preflight-pluralkit-BTE5JebL.mjs} +10 -14
  28. package/dist/.setup/{message-handler.process-1dRMGRR1.mjs → message-handler.process-DVHZKc2e.mjs} +33 -47
  29. package/dist/.setup/{outbound-adapter-gpo_85fY.mjs → outbound-adapter-DWyAWBFh.mjs} +13 -19
  30. package/dist/.setup/{outbound-session-route-D-qWvLfS.mjs → outbound-session-route-TFBPPkoz.mjs} +21 -32
  31. package/dist/.setup/{output-activity-uBpMSX75.mjs → output-activity-CDgs2s3O.mjs} +1 -2
  32. package/dist/.setup/{pluralkit-B64dfq_j.mjs → pluralkit-DcXbHTpQ.mjs} +2 -3
  33. package/dist/.setup/{preflight-audio-wWgsZG5F.mjs → preflight-audio-CwtPIsvk.mjs} +1 -2
  34. package/dist/.setup/{presence-cache-DCeTsL73.mjs → presence-cache-CgutE4NN.mjs} +1 -2
  35. package/dist/.setup/{probe-D3P1x4aN.mjs → probe-DNge7OEP.mjs} +5 -6
  36. package/dist/.setup/{provider-D2gXZbGd.mjs → provider-C61K7HHq.mjs} +119 -209
  37. package/dist/.setup/{provider-session.runtime-3bl84wqI.mjs → provider-session.runtime-D87e36ut.mjs} +3 -3
  38. package/dist/.setup/provider.runtime-xk5CVdoI.mjs +1 -0
  39. package/dist/.setup/{realtime-session.runtime-Cw2Nz11j.mjs → realtime-session.runtime-D1YHKwbc.mjs} +14 -23
  40. package/dist/.setup/{receive-recovery-CKvaG2Hf.mjs → receive-recovery-C77CVdGM.mjs} +3 -6
  41. package/dist/.setup/{resolve-allowlist-common-DNSsUQRF.mjs → resolve-allowlist-common-CI77288n.mjs} +5 -7
  42. package/dist/.setup/{resolve-channels-UdT38DzU.mjs → resolve-channels-DYc6-xgV.mjs} +5 -6
  43. package/dist/.setup/{resolve-users-DnCsrXZ_.mjs → resolve-users-BQT7XWF2.mjs} +4 -5
  44. package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
  45. package/dist/.setup/{runtime-By-vo8b-.mjs → runtime-CI0UJqeS.mjs} +23 -35
  46. package/dist/.setup/{runtime-BRsj76Px.mjs → runtime-CcijhTJT.mjs} +4 -6
  47. package/dist/.setup/{runtime-DgnVQ7zW.mjs → runtime-DcBvHOm1.mjs} +1 -2
  48. package/dist/.setup/{runtime-doctor-migrations-BPV-R4G9.mjs → runtime-doctor-migrations-BpV1jKk0.mjs} +5 -9
  49. package/dist/.setup/{secret-config-contract-CIsH7R3B.mjs → secret-config-contract-B7UlqVYr.mjs} +2 -3
  50. package/dist/.setup/{security-audit-BFT84Uny.mjs → security-audit-CTwisG7c.mjs} +3 -4
  51. package/dist/.setup/{security-contract-DNyyjTZZ.mjs → security-contract-D-o0iWDk.mjs} +1 -2
  52. package/dist/.setup/{security-doctor-nGgPm65L.mjs → security-doctor-4s7omTZd.mjs} +1 -2
  53. package/dist/.setup/{send-Ca810XtV.mjs → send-Cbq-IVsS.mjs} +18 -28
  54. package/dist/.setup/{send.components-DxpLdHrr.mjs → send.components-BV6ucNpJ.mjs} +10 -13
  55. package/dist/.setup/{send.outbound-ByYCrfta.mjs → send.outbound-CGhBhzjQ.mjs} +9 -13
  56. package/dist/.setup/{send.receipt-DkwJ1h9E.mjs → send.receipt-Dw-_r5Bx.mjs} +9 -16
  57. package/dist/.setup/{send.shared-C2J1g_uJ.mjs → send.shared-D4MioxW_.mjs} +14 -23
  58. package/dist/.setup/{sender-identity-BNBvGt1l.mjs → sender-identity-DrN5c4ec.mjs} +2 -3
  59. package/dist/.setup/{session-contract-BO5tlIdl.mjs → session-contract-Bq71MS78.mjs} +1 -2
  60. package/dist/.setup/{session-key-normalization-CCHGNSQw.mjs → session-key-normalization-Cfvze5hd.mjs} +1 -2
  61. package/dist/.setup/setup-plugin-api-DGfQO4Ec.mjs +2 -0
  62. package/dist/.setup/{shared-DbNfsfcr.mjs → shared-_o59Fvrr.mjs} +15 -19
  63. package/dist/.setup/{subagent-hooks-BhV5ZVej.mjs → subagent-hooks-mQbDkvuD.mjs} +3 -4
  64. package/dist/.setup/{system-events-DGsxf-l9.mjs → system-events-2zc2eGfF.mjs} +3 -4
  65. package/dist/.setup/{target-parsing-C-HyNxcE.mjs → target-parsing-BiuhcK9Q.mjs} +1 -2
  66. package/dist/.setup/{target-resolver-BxRZHPL3.mjs → target-resolver-CAHeVfmZ.mjs} +6 -7
  67. package/dist/.setup/targets-BaklhOqq.mjs +3 -0
  68. package/dist/.setup/{thread-binding-api-BDZJD4na.mjs → thread-binding-api-Drd4Zu-5.mjs} +1 -2
  69. package/dist/.setup/{thread-bindings-c0WwzyHH.mjs → thread-bindings-Dg7X_ZXP.mjs} +8 -11
  70. package/dist/.setup/{thread-bindings.manager-B7HFHXrI.mjs → thread-bindings.manager-DCDYksah.mjs} +15 -20
  71. package/dist/.setup/{thread-bindings.session-updates-BMdJeJMc.mjs → thread-bindings.session-updates-C76plLS3.mjs} +5 -9
  72. package/dist/.setup/{threading-DJjzMR2f.mjs → threading-BKn_OF3K.mjs} +6 -9
  73. package/dist/.setup/{timeouts-CuNARfyw.mjs → timeouts-DTrUsJ_W.mjs} +1 -2
  74. package/dist/.setup/{transcripts-source-MRAZocrc.mjs → transcripts-source-BSorJ4AS.mjs} +25 -39
  75. package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
  76. package/dist/.setup/{voice-runtime-_LfZ3Za7.mjs → voice-runtime-B5m2Ryg8.mjs} +33 -55
  77. package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
  78. package/dist/account-inspect-api.js +2 -3
  79. package/dist/action-runtime-api.js +1 -1
  80. package/dist/activities-api.js +13 -20
  81. package/dist/api.js +21 -22
  82. package/dist/channel-config-api.js +1 -1
  83. package/dist/channel-plugin-api.js +1 -1
  84. package/dist/contract-api.js +1 -1
  85. package/dist/directory-contract-api.js +2 -3
  86. package/dist/doctor-contract-api.js +5 -7
  87. package/dist/index.js +1 -2
  88. package/dist/runtime-api.js +22 -22
  89. package/dist/runtime-setter-api.js +1 -1
  90. package/dist/secret-contract-api.js +1 -1
  91. package/dist/security-audit-contract-api.js +1 -1
  92. package/dist/security-contract-api.js +1 -1
  93. package/dist/session-key-api.js +1 -1
  94. package/dist/setup-entry.js +2 -3
  95. package/dist/setup-plugin-api.js +1 -1
  96. package/dist/src/voice/audio-worker.runtime.js +8 -14
  97. package/dist/subagent-hooks-api.js +2 -3
  98. package/dist/thread-binding-api.js +1 -1
  99. package/dist/transcripts-source-api.js +2 -3
  100. package/node_modules/undici/README.md +25 -3
  101. package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
  102. package/node_modules/undici/docs/docs/api/Client.md +11 -6
  103. package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
  104. package/node_modules/undici/docs/docs/api/Errors.md +76 -1
  105. package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
  106. package/node_modules/undici/docs/docs/api/Interceptors.md +13 -6
  107. package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
  108. package/node_modules/undici/docs/docs/index.md +12 -12
  109. package/node_modules/undici/docs/docs/type-map.json +66 -66
  110. package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
  111. package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
  112. package/node_modules/undici/lib/core/connect.js +10 -4
  113. package/node_modules/undici/lib/core/constants.js +12 -1
  114. package/node_modules/undici/lib/core/errors.js +38 -1
  115. package/node_modules/undici/lib/core/request.js +16 -1
  116. package/node_modules/undici/lib/core/symbols.js +2 -0
  117. package/node_modules/undici/lib/core/util.js +26 -1
  118. package/node_modules/undici/lib/dispatcher/agent.js +6 -2
  119. package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
  120. package/node_modules/undici/lib/dispatcher/client-h2.js +46 -14
  121. package/node_modules/undici/lib/dispatcher/client.js +4 -1
  122. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
  123. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
  124. package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
  125. package/node_modules/undici/lib/dispatcher/pool-base.js +65 -28
  126. package/node_modules/undici/lib/dispatcher/pool.js +11 -8
  127. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
  128. package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
  129. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
  130. package/node_modules/undici/lib/handler/cache-handler.js +153 -15
  131. package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
  132. package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
  133. package/node_modules/undici/lib/handler/retry-handler.js +44 -11
  134. package/node_modules/undici/lib/interceptor/cache.js +11 -3
  135. package/node_modules/undici/lib/interceptor/decompress.js +22 -9
  136. package/node_modules/undici/lib/interceptor/dns.js +11 -0
  137. package/node_modules/undici/lib/interceptor/response-error.js +72 -28
  138. package/node_modules/undici/lib/milo/LICENSE.md +7 -0
  139. package/node_modules/undici/lib/milo/no-simd.js +1002 -0
  140. package/node_modules/undici/lib/milo/simd.js +1002 -0
  141. package/node_modules/undici/lib/mock/mock-agent.js +11 -0
  142. package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
  143. package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
  144. package/node_modules/undici/lib/util/cache.js +11 -5
  145. package/node_modules/undici/lib/web/cookies/util.js +19 -2
  146. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
  147. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
  148. package/node_modules/undici/lib/web/fetch/body.js +47 -38
  149. package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
  150. package/node_modules/undici/lib/web/fetch/headers.js +2 -2
  151. package/node_modules/undici/lib/web/fetch/index.js +8 -4
  152. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
  153. package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
  154. package/node_modules/undici/package.json +7 -5
  155. package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
  156. package/node_modules/undici/types/client.d.ts +10 -4
  157. package/node_modules/undici/types/errors.d.ts +16 -1
  158. package/node_modules/undici/types/h2c-client.d.ts +1 -1
  159. package/node_modules/undici/types/interceptors.d.ts +6 -1
  160. package/package.json +5 -5
  161. package/dist/.setup/provider.runtime-BI_CV9tI.mjs +0 -1
  162. package/dist/.setup/setup-plugin-api-D5VV8xTN.mjs +0 -2
  163. package/dist/.setup/targets-C0qD28Sz.mjs +0 -3
@@ -1,14 +1,14 @@
1
- import { c as resolveDefaultDiscordAccountId } from "./accounts-ljrzXBJi.mjs";
2
- import { C as resolveDiscordSystemLocation, S as formatDiscordUserTag, a as normalizeDiscordDisplaySlug, f as resolveDiscordGuildEntry, h as resolveDiscordMentionPolicy, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, w as resolveTimestampMs } from "./allow-list-B_ToXtew.mjs";
3
- import { Q as Message, pt as getChannelMessage, t as discord_exports } from "./discord-Cl2OPTZ6.mjs";
4
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CuNARfyw.mjs";
5
- import { b as resolveDiscordRuntimeBindingConversationId, g as resolveDiscordEffectiveRoute, h as resolveDiscordConversationRoute, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-D-qWvLfS.mjs";
6
- import { n as resolveDiscordConversationBindingRouteAsync } from "./conversation-binding-route-Dcqrf96n.mjs";
7
- import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-DasWY_OV.mjs";
8
- import { A as resolveDiscordDmCommandAccess, E as handleDiscordDmCommandDecision, j as resolveDiscordTextCommandAccess, n as resolveDiscordPreflightChannelAccess } from "./provider-D2gXZbGd.mjs";
9
- import { A as resolveDiscordChannelInfo, C as resolveMediaList, D as resolveDiscordMessageStickers, O as resolveDiscordReferencedReplyMessage, S as resolveForwardedMediaList, _ as resolveDiscordMessageBatch, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, v as resolveDiscordMessageHistoryText, y as resolveDiscordMessageMentionDocuments } from "./transcripts-source-MRAZocrc.mjs";
10
- import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BNBvGt1l.mjs";
11
- import { a as createDiscordHistorySenderProvenance, c as hasRawDiscordUserMention, d as matchesActiveDiscordMentionPatterns, f as resolveDiscordMentionState, i as loadSystemEventsRuntime, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, n as loadDiscordThreadingRuntime, p as resolveInjectedBoundThreadLookupRecord, r as loadPreflightAudioRuntime, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo, u as isDiscordThreadChannelMessage } from "./message-handler.preflight-pluralkit-DQygfoVJ.mjs";
1
+ import { c as resolveDefaultDiscordAccountId } from "./accounts-C18HNgge.mjs";
2
+ import { C as resolveDiscordSystemLocation, S as formatDiscordUserTag, a as normalizeDiscordDisplaySlug, f as resolveDiscordGuildEntry, h as resolveDiscordMentionPolicy, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, w as resolveTimestampMs } from "./allow-list-D1ZGfhXh.mjs";
3
+ import { Q as Message, pt as getChannelMessage, t as discord_exports } from "./discord-eFlHX1Gn.mjs";
4
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-DTrUsJ_W.mjs";
5
+ import { b as resolveDiscordRuntimeBindingConversationId, g as resolveDiscordEffectiveRoute, h as resolveDiscordConversationRoute, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-TFBPPkoz.mjs";
6
+ import { n as resolveDiscordConversationBindingRouteAsync } from "./conversation-binding-route-DOPUZNYo.mjs";
7
+ import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-BPrWoEXM.mjs";
8
+ import { A as resolveDiscordDmCommandAccess, E as handleDiscordDmCommandDecision, j as resolveDiscordTextCommandAccess, n as resolveDiscordPreflightChannelAccess } from "./provider-C61K7HHq.mjs";
9
+ import { A as resolveDiscordChannelInfo, C as resolveMediaList, D as resolveDiscordMessageStickers, O as resolveDiscordReferencedReplyMessage, S as resolveForwardedMediaList, _ as resolveDiscordMessageBatch, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, v as resolveDiscordMessageHistoryText, y as resolveDiscordMessageMentionDocuments } from "./transcripts-source-BSorJ4AS.mjs";
10
+ import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-DrN5c4ec.mjs";
11
+ import { a as createDiscordHistorySenderProvenance, c as hasRawDiscordUserMention, d as matchesActiveDiscordMentionPatterns, f as resolveDiscordMentionState, i as loadSystemEventsRuntime, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, n as loadDiscordThreadingRuntime, p as resolveInjectedBoundThreadLookupRecord, r as loadPreflightAudioRuntime, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo, u as isDiscordThreadChannelMessage } from "./message-handler.preflight-pluralkit-BTE5JebL.mjs";
12
12
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
13
13
  import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
14
14
  import { MessageReferenceType, MessageType } from "discord-api-types/v10";
@@ -24,9 +24,9 @@ import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
24
24
  import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
25
25
  import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
26
26
  import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
27
- //#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
27
+ // extensions/discord/src/monitor/message-handler.dm-preflight.ts
28
28
  const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
29
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Ca810XtV.mjs").then((n) => n.t));
29
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Cbq-IVsS.mjs").then((n) => n.t));
30
30
  async function resolveDiscordDmPreflightAccess(params) {
31
31
  if (params.dmPolicy === "disabled") {
32
32
  logVerbose("discord: drop dm (dmPolicy: disabled)");
@@ -108,8 +108,7 @@ async function resolveDiscordDmPreflightAccess(params) {
108
108
  });
109
109
  return null;
110
110
  }
111
- //#endregion
112
- //#region extensions/discord/src/monitor/message-handler.hydration.ts
111
+ // extensions/discord/src/monitor/message-handler.hydration.ts
113
112
  function shouldHydrateDiscordMessagePayload(message) {
114
113
  let currentText;
115
114
  try {
@@ -181,8 +180,7 @@ async function hydrateDiscordMessageIfNeeded(params) {
181
180
  })
182
181
  };
183
182
  }
184
- //#endregion
185
- //#region extensions/discord/src/monitor/message-handler.preflight-channel-context.ts
183
+ // extensions/discord/src/monitor/message-handler.preflight-channel-context.ts
186
184
  function resolveDiscordPreflightChannelContext(params) {
187
185
  const threadName = params.threadChannel?.name;
188
186
  const displayChannelName = threadName ?? params.channelName;
@@ -205,8 +203,7 @@ function resolveDiscordPreflightChannelContext(params) {
205
203
  }) : null
206
204
  };
207
205
  }
208
- //#endregion
209
- //#region extensions/discord/src/monitor/message-handler.preflight-history.ts
206
+ // extensions/discord/src/monitor/message-handler.preflight-history.ts
210
207
  function buildDiscordPreflightHistoryEntry(params) {
211
208
  const textForHistory = resolveDiscordMessageHistoryText(params.message, { includeForwarded: true });
212
209
  return params.isGuildMessage && params.historyLimit > 0 && textForHistory ? {
@@ -218,8 +215,7 @@ function buildDiscordPreflightHistoryEntry(params) {
218
215
  senderProvenance: createDiscordHistorySenderProvenance(params)
219
216
  } : void 0;
220
217
  }
221
- //#endregion
222
- //#region extensions/discord/src/monitor/message-handler.preflight-logging.ts
218
+ // extensions/discord/src/monitor/message-handler.preflight-logging.ts
223
219
  function logDiscordPreflightChannelConfig(params) {
224
220
  if (!shouldLogVerbose()) return;
225
221
  const channelConfigSummary = params.channelConfig ? `allowed=${params.channelConfig.allowed} enabled=${params.channelConfig.enabled ?? "unset"} requireMention=${params.channelConfig.requireMention ?? "unset"} ignoreOtherMentions=${params.channelConfig.ignoreOtherMentions ?? "unset"} matchKey=${params.channelConfig.matchKey ?? "none"} matchSource=${params.channelConfig.matchSource ?? "none"} users=${params.channelConfig.users?.length ?? 0} roles=${params.channelConfig.roles?.length ?? 0} skills=${params.channelConfig.skills?.length ?? 0}` : "none";
@@ -229,8 +225,7 @@ function logDiscordPreflightInboundSummary(params) {
229
225
  if (!shouldLogVerbose()) return;
230
226
  logVerbose(`discord: inbound id=${params.messageId} guild=${params.guildId ?? "dm"} channel=${params.channelId} mention=${params.wasMentioned ? "yes" : "no"} type=${params.isDirectMessage ? "dm" : params.isGroupDm ? "group-dm" : "guild"} content=${params.hasContent ? "yes" : "no"}`);
231
227
  }
232
- //#endregion
233
- //#region extensions/discord/src/monitor/message-handler.preflight-thread.ts
228
+ // extensions/discord/src/monitor/message-handler.preflight-thread.ts
234
229
  async function resolveDiscordPreflightThreadContext(params) {
235
230
  const { resolveDiscordThreadChannel, resolveDiscordThreadParentInfo } = await loadDiscordThreadingRuntime();
236
231
  const earlyThreadChannel = resolveDiscordThreadChannel(params);
@@ -248,8 +243,7 @@ async function resolveDiscordPreflightThreadContext(params) {
248
243
  earlyThreadParentType: parentInfo.type
249
244
  };
250
245
  }
251
- //#endregion
252
- //#region extensions/discord/src/monitor/message-handler.routing-preflight.ts
246
+ // extensions/discord/src/monitor/message-handler.routing-preflight.ts
253
247
  const loadConversationRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
254
248
  async function resolveDiscordPreflightRoute(params) {
255
249
  const conversationRuntime = await loadConversationRuntime();
@@ -301,8 +295,7 @@ async function resolveDiscordPreflightRoute(params) {
301
295
  baseSessionKey: effectiveRoute.sessionKey
302
296
  };
303
297
  }
304
- //#endregion
305
- //#region extensions/discord/src/monitor/message-handler.preflight.ts
298
+ // extensions/discord/src/monitor/message-handler.preflight.ts
306
299
  const DISCORD_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
307
300
  const DISCORD_HISTORY_MEDIA_MAX_BYTES = 10485760;
308
301
  const DISCORD_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
@@ -892,5 +885,4 @@ async function preflightDiscordMessage(params) {
892
885
  canDetectMention
893
886
  };
894
887
  }
895
- //#endregion
896
888
  export { preflightDiscordMessage, shouldIgnoreBoundThreadWebhookMessage };
@@ -1,12 +1,12 @@
1
- import { A as isDiscordThreadChannelType } from "./allow-list-B_ToXtew.mjs";
2
- import { D as resolveDiscordMessageStickers } from "./transcripts-source-MRAZocrc.mjs";
1
+ import { A as isDiscordThreadChannelType } from "./allow-list-D1ZGfhXh.mjs";
2
+ import { D as resolveDiscordMessageStickers } from "./transcripts-source-BSorJ4AS.mjs";
3
3
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { findCodeRegions, isInsideCode } from "openclaw/plugin-sdk/text-chunking";
7
7
  import { filterSupplementalContextItems } from "openclaw/plugin-sdk/security-runtime";
8
8
  import { implicitMentionKindWhen, matchesMentionWithExplicit, normalizeMentionText } from "openclaw/plugin-sdk/channel-inbound";
9
- //#region extensions/discord/src/monitor/message-handler.preflight-helpers.ts
9
+ // extensions/discord/src/monitor/message-handler.preflight-helpers.ts
10
10
  const DISCORD_BOUND_THREAD_SYSTEM_PREFIXES = [
11
11
  "⚙️",
12
12
  "🤖",
@@ -80,8 +80,7 @@ function shouldIgnoreBoundThreadWebhookMessage(params) {
80
80
  const threadId = normalizeOptionalString(params.threadId) ?? "";
81
81
  return Boolean(threadId && params.threadBinding);
82
82
  }
83
- //#endregion
84
- //#region extensions/discord/src/monitor/message-handler.history.ts
83
+ // extensions/discord/src/monitor/message-handler.history.ts
85
84
  function createDiscordHistorySenderProvenance(params) {
86
85
  return Object.freeze({
87
86
  id: params.sender.id,
@@ -109,14 +108,12 @@ function filterDiscordHistoryEntriesForContext(params) {
109
108
  function resolveDiscordHistoryMediaIds(message) {
110
109
  return [...(message.attachments ?? []).map((attachment) => `attachment:${attachment.id}`), ...resolveDiscordMessageStickers(message).map((sticker) => `sticker:${sticker.id}`)];
111
110
  }
112
- //#endregion
113
- //#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
114
- const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-B64dfq_j.mjs").then((n) => n.n));
115
- const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-wWgsZG5F.mjs"));
116
- const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-DGsxf-l9.mjs"));
117
- const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-DJjzMR2f.mjs").then((n) => n.t));
118
- //#endregion
119
- //#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
111
+ // extensions/discord/src/monitor/message-handler.preflight-runtime.ts
112
+ const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-DcXbHTpQ.mjs").then((n) => n.n));
113
+ const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-CwtPIsvk.mjs"));
114
+ const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-2zc2eGfF.mjs"));
115
+ const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-BKn_OF3K.mjs").then((n) => n.t));
116
+ // extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
120
117
  async function resolveDiscordPreflightPluralKitInfo(params) {
121
118
  if (!params.config?.enabled || !params.webhookId) return null;
122
119
  try {
@@ -132,5 +129,4 @@ async function resolveDiscordPreflightPluralKitInfo(params) {
132
129
  return null;
133
130
  }
134
131
  }
135
- //#endregion
136
132
  export { createDiscordHistorySenderProvenance as a, hasRawDiscordUserMention as c, matchesActiveDiscordMentionPatterns as d, resolveDiscordMentionState as f, loadSystemEventsRuntime as i, isBoundThreadBotSystemMessage as l, shouldIgnoreBoundThreadWebhookMessage as m, loadDiscordThreadingRuntime as n, filterDiscordHistoryEntriesForContext as o, resolveInjectedBoundThreadLookupRecord as p, loadPreflightAudioRuntime as r, resolveDiscordHistoryMediaIds as s, resolveDiscordPreflightPluralKitInfo as t, isDiscordThreadChannelMessage as u };
@@ -1,22 +1,22 @@
1
- import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-ljrzXBJi.mjs";
2
- import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug, w as resolveTimestampMs } from "./allow-list-B_ToXtew.mjs";
3
- import { F as createDiscordRuntimeAccountContext, O as resolveDiscordMessageFlags, P as createDiscordRestClient, u as resolveDiscordTargetChannelId } from "./send.shared-C2J1g_uJ.mjs";
4
- import { G as withDiscordRequestAuthority, Q as Message, W as captureDiscordRequestAuthority, dt as editChannelMessage, t as discord_exports, ut as deleteChannelMessage, vt as getGuildMember } from "./discord-Cl2OPTZ6.mjs";
5
- import { v as chunkDiscordTextWithMode } from "./send.receipt-DkwJ1h9E.mjs";
6
- import { n as resolveDiscordChannelId } from "./target-parsing-C-HyNxcE.mjs";
7
- import { a as removeReactionDiscord, r as reactMessageDiscord } from "./send-Ca810XtV.mjs";
8
- import { o as discordTextHasBroadcastMention } from "./send.outbound-ByYCrfta.mjs";
9
- import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CuNARfyw.mjs";
10
- import "./targets-C0qD28Sz.mjs";
11
- import { C as discordInboundEventDelivery, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-D-qWvLfS.mjs";
12
- import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-gpo_85fY.mjs";
13
- import { T as createDiscordSupplementalContextAccessChecker, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as buildDiscordInboundAccessContext } from "./provider-D2gXZbGd.mjs";
14
- import { D as resolveDiscordMessageStickers, b as resolveDiscordMessageText, h as resolveDiscordThreadStarter, k as resolveDiscordReferencedReplyMessageId, v as resolveDiscordMessageHistoryText, w as resolveReferencedReplyMediaList, x as formatDiscordMediaText } from "./transcripts-source-MRAZocrc.mjs";
15
- import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BNBvGt1l.mjs";
16
- import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-DJjzMR2f.mjs";
17
- import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-C4tp9noA.mjs";
18
- import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, o as filterDiscordHistoryEntriesForContext, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-DQygfoVJ.mjs";
19
- import { t as sendTyping } from "./typing-CNlSKY5S.mjs";
1
+ import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-C18HNgge.mjs";
2
+ import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug, w as resolveTimestampMs } from "./allow-list-D1ZGfhXh.mjs";
3
+ import { F as createDiscordRuntimeAccountContext, O as resolveDiscordMessageFlags, P as createDiscordRestClient, u as resolveDiscordTargetChannelId } from "./send.shared-D4MioxW_.mjs";
4
+ import { G as withDiscordRequestAuthority, Q as Message, W as captureDiscordRequestAuthority, dt as editChannelMessage, t as discord_exports, ut as deleteChannelMessage, vt as getGuildMember } from "./discord-eFlHX1Gn.mjs";
5
+ import { v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
6
+ import { n as resolveDiscordChannelId } from "./target-parsing-BiuhcK9Q.mjs";
7
+ import { a as removeReactionDiscord, r as reactMessageDiscord } from "./send-Cbq-IVsS.mjs";
8
+ import { o as discordTextHasBroadcastMention } from "./send.outbound-CGhBhzjQ.mjs";
9
+ import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-DTrUsJ_W.mjs";
10
+ import "./targets-BaklhOqq.mjs";
11
+ import { C as discordInboundEventDelivery, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-TFBPPkoz.mjs";
12
+ import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-DWyAWBFh.mjs";
13
+ import { T as createDiscordSupplementalContextAccessChecker, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as buildDiscordInboundAccessContext } from "./provider-C61K7HHq.mjs";
14
+ import { D as resolveDiscordMessageStickers, b as resolveDiscordMessageText, h as resolveDiscordThreadStarter, k as resolveDiscordReferencedReplyMessageId, v as resolveDiscordMessageHistoryText, w as resolveReferencedReplyMediaList, x as formatDiscordMediaText } from "./transcripts-source-BSorJ4AS.mjs";
15
+ import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-DrN5c4ec.mjs";
16
+ import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-BKn_OF3K.mjs";
17
+ import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-BAc_Xik-.mjs";
18
+ import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, o as filterDiscordHistoryEntriesForContext, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-BTE5JebL.mjs";
19
+ import { t as sendTyping } from "./typing-DAv4S2fI.mjs";
20
20
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
21
21
  import { danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
22
22
  import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
@@ -44,7 +44,7 @@ import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createC
44
44
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
45
45
  import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
46
46
  import { createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
47
- //#region extensions/discord/src/monitor/message-handler.recent-history.ts
47
+ // extensions/discord/src/monitor/message-handler.recent-history.ts
48
48
  /** Fetch a physical recent window, never walking older pages to refill filtered rows. */
49
49
  async function recoverDiscordChannelHistory(params) {
50
50
  const { ctx, isCurrent } = params;
@@ -151,8 +151,7 @@ async function recoverDiscordChannelHistory(params) {
151
151
  return [];
152
152
  }
153
153
  }
154
- //#endregion
155
- //#region extensions/discord/src/monitor/message-handler.retry.ts
154
+ // extensions/discord/src/monitor/message-handler.retry.ts
156
155
  const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /^reply session initialization conflicted for \S+$/u;
157
156
  const DISCORD_SESSION_CONFLICT_FAILURE_TEXT = "⚠️ Couldn't process this message because the session stayed busy. Please try again in a moment.";
158
157
  async function completeDiscordSessionConflict(error, sourceReplyDeliveryMode, deliver, onDeliveryError) {
@@ -174,8 +173,7 @@ function removeDiscordReplayHistoryEntry(historyMap, historyKey, messageId) {
174
173
  if (!history) return;
175
174
  for (let index = history.length - 1; index >= 0; index -= 1) if (history[index]?.messageId === messageId) history.splice(index, 1);
176
175
  }
177
- //#endregion
178
- //#region extensions/discord/src/monitor/message-handler.context.ts
176
+ // extensions/discord/src/monitor/message-handler.context.ts
179
177
  function normalizeDiscordDmOwnerEntry(entry) {
180
178
  const candidate = normalizeDiscordAllowList([entry], [
181
179
  "discord:",
@@ -586,8 +584,7 @@ async function buildDiscordMessageProcessContext(params) {
586
584
  replyPlan
587
585
  };
588
586
  }
589
- //#endregion
590
- //#region extensions/discord/src/monitor/message-handler.process-progress.ts
587
+ // extensions/discord/src/monitor/message-handler.process-progress.ts
591
588
  async function createDiscordMessageProgressRuntime(params) {
592
589
  const { ctx, draftPreview } = params;
593
590
  const { cfg, route, abortSignal } = ctx;
@@ -683,8 +680,7 @@ async function createDiscordMessageProgressRuntime(params) {
683
680
  }
684
681
  } };
685
682
  }
686
- //#endregion
687
- //#region extensions/discord/src/monitor/ack-reactions.ts
683
+ // extensions/discord/src/monitor/ack-reactions.ts
688
684
  function createDiscordAckReactionContext(params) {
689
685
  return {
690
686
  rest: params.rest,
@@ -716,8 +712,7 @@ function queueInitialDiscordAckReaction(params) {
716
712
  });
717
713
  });
718
714
  }
719
- //#endregion
720
- //#region extensions/discord/src/monitor/message-handler.process-reactions.ts
715
+ // extensions/discord/src/monitor/message-handler.process-reactions.ts
721
716
  function createDiscordMessageReactionRuntime(params) {
722
717
  const { ctx } = params;
723
718
  const { cfg, accountId, token, ackReactionScope, message, messageChannelId, isGuildMessage, isDirectMessage, isGroupDm, canDetectMention, effectiveWasMentioned, shouldBypassMention, route } = ctx;
@@ -845,8 +840,7 @@ function createDiscordMessageReactionRuntime(params) {
845
840
  finish
846
841
  };
847
842
  }
848
- //#endregion
849
- //#region extensions/discord/src/draft-stream.ts
843
+ // extensions/discord/src/draft-stream.ts
850
844
  /** Discord messages cap at 2000 characters. */
851
845
  const DISCORD_STREAM_MAX_CHARS = 2e3;
852
846
  const DEFAULT_THROTTLE_MS = 1200;
@@ -983,13 +977,11 @@ function createDiscordDraftStream(params) {
983
977
  forceNewMessage: lifecycle.reset
984
978
  };
985
979
  }
986
- //#endregion
987
- //#region extensions/discord/src/preview-streaming.ts
980
+ // extensions/discord/src/preview-streaming.ts
988
981
  function resolveDiscordPreviewStreamMode(params = {}) {
989
982
  return resolveChannelPreviewStreamMode(params, "progress");
990
983
  }
991
- //#endregion
992
- //#region extensions/discord/src/monitor/message-handler.progress-continuation.ts
984
+ // extensions/discord/src/monitor/message-handler.progress-continuation.ts
993
985
  /** The registry owns task settlement; Discord keeps the confirmed transport and its cleanup. */
994
986
  function retainDiscordProgressDraft(params) {
995
987
  let retired = false;
@@ -1048,8 +1040,7 @@ function retainDiscordProgressDraft(params) {
1048
1040
  }
1049
1041
  };
1050
1042
  }
1051
- //#endregion
1052
- //#region extensions/discord/src/monitor/message-handler.draft-preview.ts
1043
+ // extensions/discord/src/monitor/message-handler.draft-preview.ts
1053
1044
  function createDiscordDraftPreviewController(params) {
1054
1045
  const runInChannelScope = AsyncLocalStorage.snapshot();
1055
1046
  const assertChannelAuthority = captureDiscordRequestAuthority();
@@ -1321,8 +1312,7 @@ function isEmptyDiscordProgressLine(line) {
1321
1312
  function shouldStartDiscordProgressDraftNow(line) {
1322
1313
  return typeof line === "object" && line?.kind === "patch" && Boolean(line.detail);
1323
1314
  }
1324
- //#endregion
1325
- //#region extensions/discord/src/monitor/reply-typing-feedback.ts
1315
+ // extensions/discord/src/monitor/reply-typing-feedback.ts
1326
1316
  const DISCORD_REPLY_TYPING_MAX_DURATION_MS = 12e5;
1327
1317
  function createDiscordReplyTypingFeedback(params) {
1328
1318
  const rest = params.rest ?? createDiscordRestClient(params).rest;
@@ -1343,8 +1333,7 @@ function createDiscordReplyTypingFeedback(params) {
1343
1333
  maxDurationMs: params.maxDurationMs ?? DISCORD_REPLY_TYPING_MAX_DURATION_MS
1344
1334
  });
1345
1335
  }
1346
- //#endregion
1347
- //#region extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
1336
+ // extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
1348
1337
  function formatDiscordGroupThreadReply(text, participant) {
1349
1338
  return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
1350
1339
  }
@@ -1474,8 +1463,7 @@ function createDiscordMessageReplyRuntime(params) {
1474
1463
  resolvedBlockStreamingEnabled: resolveChannelStreamingBlockEnabled(discordConfig)
1475
1464
  };
1476
1465
  }
1477
- //#endregion
1478
- //#region extensions/discord/src/monitor/message-handler.process-thread-route.ts
1466
+ // extensions/discord/src/monitor/message-handler.process-thread-route.ts
1479
1467
  function createDiscordMessageActiveThreadRoute(params) {
1480
1468
  let adoptedThreadId;
1481
1469
  let threadReplyDelivered = false;
@@ -1510,8 +1498,7 @@ function createDiscordMessageActiveThreadRoute(params) {
1510
1498
  })
1511
1499
  };
1512
1500
  }
1513
- //#endregion
1514
- //#region extensions/discord/src/monitor/message-handler.process.ts
1501
+ // extensions/discord/src/monitor/message-handler.process.ts
1515
1502
  const TARGETED_ONLY_ALLOWED_MENTIONS = { parse: [AllowedMentionsTypes.User, AllowedMentionsTypes.Role] };
1516
1503
  function isFallbackOnlyToolWarningFinal(payload) {
1517
1504
  if (payload.isError !== true || !isReplyPayloadNonTerminalToolErrorWarning(payload)) return false;
@@ -1878,5 +1865,4 @@ async function processDiscordMessage(ctx, observer) {
1878
1865
  logVerbose(`discord: delivered ${finalCount} reply${finalCount === 1 ? "" : "ies"} to ${replyPlan.replyTarget}`);
1879
1866
  }
1880
1867
  }
1881
- //#endregion
1882
1868
  export { processDiscordMessage };
@@ -1,7 +1,7 @@
1
- import { t as createDiscordActionGate } from "./accounts-ljrzXBJi.mjs";
2
- import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, s as resolveDiscordReplyReference, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-DkwJ1h9E.mjs";
3
- import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
4
- import { C as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, w as notifyDiscordInboundEventOutboundPayloadSuccess, y as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-D-qWvLfS.mjs";
1
+ import { t as createDiscordActionGate } from "./accounts-C18HNgge.mjs";
2
+ import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, s as resolveDiscordReplyReference, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
3
+ import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
4
+ import { C as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, w as notifyDiscordInboundEventOutboundPayloadSuccess, y as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-TFBPPkoz.mjs";
5
5
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
6
6
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
7
7
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -11,7 +11,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
11
11
  import { createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
12
12
  import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
13
13
  import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
14
- //#region extensions/discord/src/channel.conversation.ts
14
+ // extensions/discord/src/channel.conversation.ts
15
15
  function resolveDiscordAttachedOutboundTarget(params) {
16
16
  if (params.threadId == null) return params.to;
17
17
  const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
@@ -100,8 +100,7 @@ function resolveDiscordInboundConversation(params) {
100
100
  });
101
101
  return conversationId ? { conversationId } : null;
102
102
  }
103
- //#endregion
104
- //#region extensions/discord/src/media-detection.ts
103
+ // extensions/discord/src/media-detection.ts
105
104
  const DISCORD_VIDEO_MEDIA_EXTENSIONS = [
106
105
  ".avi",
107
106
  ".m4v",
@@ -126,8 +125,7 @@ function isLikelyDiscordVideoMedia(mediaUrl) {
126
125
  const normalized = normalizeLowercaseStringOrEmpty(path);
127
126
  return DISCORD_VIDEO_MEDIA_EXTENSIONS.some((ext) => normalized.endsWith(ext));
128
127
  }
129
- //#endregion
130
- //#region extensions/discord/src/outbound-approval.ts
128
+ // extensions/discord/src/outbound-approval.ts
131
129
  function normalizeDiscordApprovalPayload(payload) {
132
130
  if (!asOptionalRecord(payload.channelData)?.execApproval || !payload.text) return payload;
133
131
  return {
@@ -135,9 +133,8 @@ function normalizeDiscordApprovalPayload(payload) {
135
133
  text: payload.text.replace(/@everyone/gi, "@​everyone").replace(/@here/gi, "@​here").replace(/<@/g, "<@​").replace(/<#/g, "<#​")
136
134
  };
137
135
  }
138
- //#endregion
139
- //#region extensions/discord/src/outbound-send-context.ts
140
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Ca810XtV.mjs").then((n) => n.t));
136
+ // extensions/discord/src/outbound-send-context.ts
137
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Cbq-IVsS.mjs").then((n) => n.t));
141
138
  function resolveDiscordFormattingOptions(ctx) {
142
139
  const formatting = ctx.formatting;
143
140
  return {
@@ -165,8 +162,7 @@ async function createDiscordPayloadSendContext(ctx) {
165
162
  sendVoice: resolveOutboundSendDep(ctx.deps, "discordVoice") ?? runtime.sendVoiceMessageDiscord
166
163
  };
167
164
  }
168
- //#endregion
169
- //#region extensions/discord/src/outbound-payload.ts
165
+ // extensions/discord/src/outbound-payload.ts
170
166
  const log$1 = createSubsystemLogger("discord/outbound");
171
167
  function createDiscordUnknownPayloadResult(target) {
172
168
  return {
@@ -328,13 +324,12 @@ async function sendDiscordOutboundPayload(params) {
328
324
  }
329
325
  }));
330
326
  }
331
- //#endregion
332
- //#region extensions/discord/src/outbound-adapter.ts
327
+ // extensions/discord/src/outbound-adapter.ts
333
328
  const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
334
329
  const DISCORD_PRECHUNK_MAX_LINES = Number.MAX_SAFE_INTEGER;
335
330
  const log = createSubsystemLogger("discord/outbound");
336
- const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-c0WwzyHH.mjs").then((n) => n.i));
337
- const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-DxpLdHrr.mjs").then((n) => n.i));
331
+ const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-Dg7X_ZXP.mjs").then((n) => n.i));
332
+ const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-BV6ucNpJ.mjs").then((n) => n.i));
338
333
  function resolveDiscordDeliveryOptions(params) {
339
334
  return {
340
335
  onPlatformSendDispatch: params.onPlatformSendDispatch,
@@ -539,5 +534,4 @@ const discordOutbound = {
539
534
  await manager.touchThread({ threadId });
540
535
  }
541
536
  };
542
- //#endregion
543
537
  export { normalizeDiscordAcpConversationId as a, resolveDiscordInboundConversation as c, matchDiscordAcpConversation as i, discordOutbound as n, resolveDiscordAttachedOutboundTarget as o, buildDiscordCrossContextPresentation as r, resolveDiscordCommandConversation as s, DISCORD_TEXT_CHUNK_LIMIT as t };
@@ -1,10 +1,10 @@
1
- import { i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-ljrzXBJi.mjs";
2
- import { t as inspectDiscordAccount } from "./account-inspect-8cCu6uPG.mjs";
3
- import { A as isDiscordThreadChannelType } from "./allow-list-B_ToXtew.mjs";
4
- import { d as normalizeDiscordMessagingTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-DkwJ1h9E.mjs";
5
- import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
6
- import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-C_cuoW1q.mjs";
7
- import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-C7rUdqUX.mjs";
1
+ import { i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-C18HNgge.mjs";
2
+ import { t as inspectDiscordAccount } from "./account-inspect-X_Xlr42B.mjs";
3
+ import { A as isDiscordThreadChannelType } from "./allow-list-D1ZGfhXh.mjs";
4
+ import { d as normalizeDiscordMessagingTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-Dw-_r5Bx.mjs";
5
+ import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
6
+ import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-BvOWSPxr.mjs";
7
+ import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-BzlhNBxA.mjs";
8
8
  import { createLazyRuntimeMethod, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
9
9
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
10
10
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
@@ -20,7 +20,7 @@ import { getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromCon
20
20
  import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
21
21
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
22
22
  import { createInboundEventDeliveryCorrelation } from "openclaw/plugin-sdk/inbound-event-delivery";
23
- //#region extensions/discord/src/exec-approvals.ts
23
+ // extensions/discord/src/exec-approvals.ts
24
24
  function normalizeDiscordApproverId(value) {
25
25
  const trimmed = String(value).trim();
26
26
  if (!trimmed) return;
@@ -65,8 +65,7 @@ function shouldSuppressLocalDiscordExecApprovalPrompt(params) {
65
65
  sessionFilter: config?.sessionFilter
66
66
  });
67
67
  }
68
- //#endregion
69
- //#region extensions/discord/src/audit-core.ts
68
+ // extensions/discord/src/audit-core.ts
70
69
  const REQUIRED_TEXT_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessages"];
71
70
  const REQUIRED_THREAD_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessagesInThreads"];
72
71
  const REQUIRED_VOICE_CHANNEL_PERMISSIONS = [
@@ -141,8 +140,7 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
141
140
  elapsedMs: Date.now() - started
142
141
  };
143
142
  }
144
- //#endregion
145
- //#region extensions/discord/src/inbound-event-delivery.ts
143
+ // extensions/discord/src/inbound-event-delivery.ts
146
144
  const DISCORD_INBOUND_EVENT_DELIVERY_KEY = "__openclawInboundEventDelivery";
147
145
  function normalizeDiscordDeliveryTarget(value) {
148
146
  return value.trim().replace(/^discord:/iu, "").replace(/^channel:/iu, "").toLowerCase();
@@ -179,8 +177,7 @@ function notifyDiscordInboundEventOutboundPayloadSuccess(params) {
179
177
  accountId: params.accountId
180
178
  });
181
179
  }
182
- //#endregion
183
- //#region extensions/discord/src/trusted-requester-actions.ts
180
+ // extensions/discord/src/trusted-requester-actions.ts
184
181
  const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
185
182
  "emoji-upload",
186
183
  "sticker-upload",
@@ -201,8 +198,7 @@ const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
201
198
  function isTrustedRequesterGuildAdminAction(action) {
202
199
  return trustedRequesterGuildAdminActions.has(action);
203
200
  }
204
- //#endregion
205
- //#region extensions/discord/src/channel-actions.ts
201
+ // extensions/discord/src/channel-actions.ts
206
202
  const localExecutionActions = /* @__PURE__ */ new Set([
207
203
  "send",
208
204
  "poll",
@@ -223,7 +219,7 @@ function resolveDiscordThreadReplyTarget(args) {
223
219
  const target = threadId !== void 0 ? `channel:${threadId}` : normalizeOptionalString(args.channelId) ?? normalizeOptionalString(args.to) ?? normalizeOptionalString(args.target);
224
220
  return target ? normalizeDiscordMessagingTarget(target) : void 0;
225
221
  }
226
- const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-CRH5-aLm.mjs"));
222
+ const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-DXY91jF-.mjs"));
227
223
  const discordActionGroups = [
228
224
  {
229
225
  gate: "polls",
@@ -458,8 +454,7 @@ const discordMessageActions = {
458
454
  ...sessionKey ? { sessionKey } : {}
459
455
  })
460
456
  };
461
- //#endregion
462
- //#region extensions/discord/src/conversation-identity.ts
457
+ // extensions/discord/src/conversation-identity.ts
463
458
  function normalizeDiscordTarget(raw, defaultKind) {
464
459
  return parseDiscordTarget(normalizeOptionalString(raw) ?? "", { defaultKind })?.normalized;
465
460
  }
@@ -488,8 +483,7 @@ function resolveDiscordCurrentConversationIdentity(params) {
488
483
  if (target) return target;
489
484
  }
490
485
  }
491
- //#endregion
492
- //#region extensions/discord/src/monitor/route-resolution.ts
486
+ // extensions/discord/src/monitor/route-resolution.ts
493
487
  function buildDiscordRoutePeer(params) {
494
488
  return {
495
489
  kind: params.isGroupDm ? "group" : params.isDirectMessage ? "direct" : "channel",
@@ -569,8 +563,7 @@ function shouldIgnoreStaleDiscordRouteBinding(params) {
569
563
  if (!bound || !routed || bound.rest !== routed.rest) return false;
570
564
  return bound.agentId !== params.route.agentId;
571
565
  }
572
- //#endregion
573
- //#region extensions/discord/src/channel-policy-state.ts
566
+ // extensions/discord/src/channel-policy-state.ts
574
567
  const channelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.discord.channel-policy-bindings"), "close-and-restart");
575
568
  function setDiscordChannelPolicyBindings(accountId, bindings) {
576
569
  channelPolicyBindings.set(normalizeAccountId(accountId), [...bindings]);
@@ -584,8 +577,7 @@ function getDiscordChannelPolicyBinding(accountId, guildKey, channelKey) {
584
577
  function findDiscordChannelPolicyKey(accountId, guildKey, channelId) {
585
578
  return listBindings(accountId, guildKey).find((binding) => binding.channelId === channelId)?.channelKey;
586
579
  }
587
- //#endregion
588
- //#region extensions/discord/src/approval-message-safety.ts
580
+ // extensions/discord/src/approval-message-safety.ts
589
581
  const DISCORD_APPROVAL_ALLOWED_MENTIONS = { parse: [] };
590
582
  const DISCORD_MARKDOWN_META_CHARACTERS = /* @__PURE__ */ new Set([
591
583
  "\\",
@@ -628,8 +620,7 @@ function formatDiscordApprovalDisplayValue(value, maxChars = 200) {
628
620
  }
629
621
  return escaped;
630
622
  }
631
- //#endregion
632
- //#region extensions/discord/src/outbound-components.ts
623
+ // extensions/discord/src/outbound-components.ts
633
624
  const DISCORD_MESSAGE_COMPONENT_LIMIT = 40;
634
625
  const DISCORD_TEXT_DISPLAY_LIMIT = 2e3;
635
626
  const DISCORD_PRESENTATION_CAPABILITIES = {
@@ -659,8 +650,8 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
659
650
  }
660
651
  }
661
652
  };
662
- const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components-DxpLdHrr.mjs").then((n) => n.i)), (runtime) => runtime.sendDiscordComponentMessage);
663
- const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-C_cuoW1q.mjs").then((n) => n.a));
653
+ const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components-BV6ucNpJ.mjs").then((n) => n.i)), (runtime) => runtime.sendDiscordComponentMessage);
654
+ const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-BvOWSPxr.mjs").then((n) => n.a));
664
655
  function addPayloadTextFallback(spec, payload) {
665
656
  return spec.text ? spec : {
666
657
  ...spec,
@@ -715,8 +706,7 @@ async function resolveDiscordComponentSpec(payload) {
715
706
  const interactiveSpec = (await loadDiscordSharedInteractive()).buildDiscordInteractiveComponents(payload.interactive);
716
707
  return interactiveSpec ? addPayloadTextFallback(interactiveSpec, payload) : void 0;
717
708
  }
718
- //#endregion
719
- //#region extensions/discord/src/outbound-session-route.ts
709
+ // extensions/discord/src/outbound-session-route.ts
720
710
  function resolveDiscordOutboundSessionRoute(params) {
721
711
  const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
722
712
  if (!parsed) return null;
@@ -756,5 +746,4 @@ function resolveDiscordOutboundTargetKindHint(params) {
756
746
  if (resolvedKind === "group" || resolvedKind === "channel") return "channel";
757
747
  return /^(user:|discord:|@|<@!?)/i.test(params.target.trim()) ? "user" : "channel";
758
748
  }
759
- //#endregion
760
749
  export { isDiscordExecApprovalClientEnabled as A, discordInboundEventDelivery as C, resolveRequiredDiscordChannelPermissions as D, collectDiscordAuditChannelIdsForAccount as E, getDiscordExecApprovalApprovers as O, isTrustedRequesterGuildAdminAction as S, auditDiscordChannelPermissionsWithFetcher as T, shouldIgnoreStaleDiscordRouteBinding as _, resolveDiscordComponentSpec as a, resolveDiscordRuntimeBindingConversationId as b, formatDiscordApprovalDisplayValue as c, setDiscordChannelPolicyBindings as d, buildDiscordConversationRouteContext as f, resolveDiscordEffectiveRoute as g, resolveDiscordConversationRoute as h, isDiscordComponentSpecWithinMessageLimit as i, shouldSuppressLocalDiscordExecApprovalPrompt as j, isDiscordExecApprovalApprover as k, findDiscordChannelPolicyKey as l, resolveDiscordBoundConversationRoute as m, DISCORD_PRESENTATION_CAPABILITIES as n, sendDiscordComponentMessageLazy as o, buildDiscordRoutePeer as p, buildDiscordPresentationPayload as r, DISCORD_APPROVAL_ALLOWED_MENTIONS as s, resolveDiscordOutboundSessionRoute as t, getDiscordChannelPolicyBinding as u, resolveDiscordConversationIdentity as v, notifyDiscordInboundEventOutboundPayloadSuccess as w, discordMessageActions as x, resolveDiscordCurrentConversationIdentity as y };
@@ -1,4 +1,4 @@
1
- //#region extensions/discord/src/voice/output-activity.ts
1
+ // extensions/discord/src/voice/output-activity.ts
2
2
  function resolveDiscordOutputAudioDelta(previous, sourceAudioBytes) {
3
3
  const sinkAudioBytes = Math.floor((previous.sourceAudioBytes + sourceAudioBytes) / 2) * 8 - previous.sinkAudioBytes;
4
4
  return {
@@ -7,5 +7,4 @@ function resolveDiscordOutputAudioDelta(previous, sourceAudioBytes) {
7
7
  sinkAudioBytes
8
8
  };
9
9
  }
10
- //#endregion
11
10
  export { resolveDiscordOutputAudioDelta as t };
@@ -1,9 +1,9 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
2
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
3
3
  import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
4
4
  import { readProviderJsonObjectResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
5
5
  import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
6
- //#region extensions/discord/src/pluralkit.ts
6
+ // extensions/discord/src/pluralkit.ts
7
7
  var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });
8
8
  const PLURALKIT_API_BASE = "https://api.pluralkit.me/v2";
9
9
  const PLURALKIT_ERROR_BODY_LIMIT_BYTES = 8192;
@@ -41,5 +41,4 @@ async function fetchPluralKitMessageInfo(params) {
41
41
  timeout.cleanup();
42
42
  }
43
43
  }
44
- //#endregion
45
44
  export { pluralkit_exports as n, fetchPluralKitMessageInfo as t };