@openclaw/discord 2026.9.1 → 2026.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{activities-api-E-segZn6.js → activities-api-CTcGq3Hf.js} +4 -4
  3. package/dist/activities-api.js +1 -1
  4. package/dist/{allow-list-C2JuH-R0.js → allow-list-DBTtR2dz.js} +3 -29
  5. package/dist/api.js +12 -12
  6. package/dist/{approval-handler.runtime-CW5k3mSa.js → approval-handler.runtime-DUSe5fyH.js} +5 -5
  7. package/dist/{audit-B9rydv5a.js → audit-DpPfwoJM.js} +4 -4
  8. package/dist/{channel-D93LnbTE.js → channel-BHajPgwR.js} +16 -16
  9. package/dist/{channel-actions.runtime-DMFv4doE.js → channel-actions.runtime-DS8pXo0S.js} +29 -32
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.setup-DTL7kPOM.js → channel.setup-BWmMe1tT.js} +3 -3
  12. package/dist/command-owners-D78sAoOz.js +10 -0
  13. package/dist/{components-DmXYIQ26.js → components-BimX47Mq.js} +1 -1
  14. package/dist/{conversation-binding-route-24afmvEC.js → conversation-binding-route-DuR5NGIx.js} +1 -1
  15. package/dist/{directory-config-BD4YL7wT.js → directory-config-CD2v2Szs.js} +1 -1
  16. package/dist/directory-contract-api.js +1 -1
  17. package/dist/{directory-live-BrFVc1Ds.js → directory-live-DaJzWJ2N.js} +2 -2
  18. package/dist/{doctor-BUB41_lr.js → doctor-D4HH1inA.js} +6 -3
  19. package/dist/doctor-contract-api.js +28 -26
  20. package/dist/{handle-action.guild-admin-B0egstYq.js → handle-action.guild-admin-4We6wWQU.js} +6 -3
  21. package/dist/index.js +1 -1
  22. package/dist/{ingress-identity-BCzfPPYM.js → ingress-identity-XNmW-mZS.js} +1 -1
  23. package/dist/{message-handler-Qdw9c0j4.js → message-handler-DhgBabyU.js} +52 -65
  24. package/dist/{message-handler.preflight-Dxi2yBfR.js → message-handler.preflight-oZ7dQCd0.js} +12 -12
  25. package/dist/{message-handler.process-BYDjtxZJ.js → message-handler.process-BzCYf1pa.js} +14 -14
  26. package/dist/{message-text-BRVqYm-t.js → message-text-DK4NnBg-.js} +1 -1
  27. package/dist/{outbound-adapter-DEhthWTk.js → outbound-adapter-CtggmGh9.js} +6 -6
  28. package/dist/{outbound-components-DehyxvA4.js → outbound-components-Dn8SJWMS.js} +3 -3
  29. package/dist/{outbound-session-route-BFGRF9fE.js → outbound-session-route-Q_HEusBQ.js} +5 -6
  30. package/dist/{owner-access-yc1sX7Gx.js → owner-access-Cp8r6Ipf.js} +3 -2
  31. package/dist/{pluralkit-XmmAHoV6.js → pluralkit-BY75YcK0.js} +1 -1
  32. package/dist/{provider-session.runtime-BA2BPyZ4.js → provider-session.runtime-BL2lHBH7.js} +3 -3
  33. package/dist/{provider-DuDtKbF8.js → provider-uKmmrDM4.js} +28 -28
  34. package/dist/provider.runtime-C-IkWF2w.js +2 -0
  35. package/dist/{realtime-session.runtime-DgSbX6ay.js → realtime-session.runtime-CGYm1t_0.js} +705 -295
  36. package/dist/{resolve-allowlist-common-BJ5UZNNT.js → resolve-allowlist-common-sKIKy-cF.js} +1 -1
  37. package/dist/{resolve-channels-CYseD5Uw.js → resolve-channels-CoiMlWy0.js} +3 -3
  38. package/dist/{resolve-users-DrmhDrqm.js → resolve-users-DJpiokfW.js} +2 -2
  39. package/dist/{retry-BNCxiyyR.js → retry-DQt1zDgH.js} +238 -184
  40. package/dist/{runtime-DB7Fb6AU.js → runtime-BHsdEdr5.js} +1 -1
  41. package/dist/{runtime-BbWNtfyq.js → runtime-Ghtfh5ZA.js} +32 -24
  42. package/dist/runtime-api.js +18 -18
  43. package/dist/{send-BnTEIeLE.js → send-CZeWKUiA.js} +3 -3
  44. package/dist/{send.components-BWVEcjRP.js → send.components-BG5IDABj.js} +4 -4
  45. package/dist/{send.outbound-b5xwHTlL.js → send.outbound-DHuFUL6W.js} +10 -44
  46. package/dist/{send.shared-5vxBTagO.js → send.shared-B0n_fWzu.js} +62 -141
  47. package/dist/{sender-identity-Dt0imZyY.js → sender-identity-B8Ncfi63.js} +1 -1
  48. package/dist/setup-plugin-api.js +1 -1
  49. package/dist/{shared-BSJWHEMA.js → shared-C3dKun_X.js} +6 -3
  50. package/dist/{subagent-hooks-IzQKX4RQ.js → subagent-hooks-ZoQXEI1E.js} +2 -2
  51. package/dist/subagent-hooks-api.js +1 -1
  52. package/dist/{system-events-BOiDS8b3.js → system-events-DFF_awl7.js} +2 -2
  53. package/dist/{target-resolver-BVI8xSSC.js → target-resolver-DLtHDwMK.js} +2 -2
  54. package/dist/targets-BObRyaKX.js +3 -0
  55. package/dist/{thread-bindings-D7mcaXQC.js → thread-bindings-DKvsNjQR.js} +5 -5
  56. package/dist/{thread-bindings.manager-B1oySiVc.js → thread-bindings.manager-pbbRT5gb.js} +5 -5
  57. package/dist/{thread-bindings.session-updates-CC7HoQvt.js → thread-bindings.session-updates-t6jeFB1-.js} +1 -1
  58. package/dist/{thread-bindings.state-D8OMdk4O.js → thread-bindings.state-DtgOqsbX.js} +34 -1
  59. package/dist/{threading-OQnL-0Zx.js → threading-BCx49X-6.js} +3 -3
  60. package/dist/{transcripts-source-D8lH7AkN.js → transcripts-source-Dc6Nnli5.js} +48 -5
  61. package/dist/transcripts-source-api.js +1 -1
  62. package/dist/{typing-C9q0AQMb.js → typing-CuopV-Hi.js} +1 -1
  63. package/dist/{voice-runtime-Dfhjh1tV.js → voice-runtime-BQnILUbG.js} +82 -35
  64. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  65. package/node_modules/@discordjs/voice/node_modules/@types/node/buffer.buffer.d.ts +5 -5
  66. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +2 -2
  67. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +16 -0
  68. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +10 -2
  69. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  70. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +52 -0
  71. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +210 -28
  72. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +6 -2
  73. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +36 -0
  74. package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
  75. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  76. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
  77. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  78. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  79. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  80. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  81. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  82. package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
  83. package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
  84. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  85. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  86. package/node_modules/typebox/package.json +1 -1
  87. package/node_modules/undici/docs/docs/api/Client.md +4 -0
  88. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
  89. package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
  90. package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
  91. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
  92. package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
  93. package/node_modules/undici/lib/core/symbols.js +2 -0
  94. package/node_modules/undici/lib/dispatcher/agent.js +7 -2
  95. package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
  96. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  97. package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
  98. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  99. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
  100. package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
  101. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
  102. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
  103. package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
  104. package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
  105. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
  106. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
  107. package/node_modules/undici/lib/handler/cache-handler.js +29 -5
  108. package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
  109. package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
  110. package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
  111. package/node_modules/undici/lib/handler/retry-handler.js +148 -30
  112. package/node_modules/undici/lib/interceptor/cache.js +65 -12
  113. package/node_modules/undici/lib/interceptor/decompress.js +115 -13
  114. package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
  115. package/node_modules/undici/lib/interceptor/dns.js +7 -0
  116. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  117. package/node_modules/undici/lib/mock/mock-agent.js +13 -1
  118. package/node_modules/undici/lib/mock/mock-utils.js +11 -10
  119. package/node_modules/undici/lib/util/cache.js +45 -3
  120. package/node_modules/undici/lib/web/cookies/parse.js +150 -147
  121. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
  122. package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
  123. package/node_modules/undici/lib/web/fetch/index.js +6 -0
  124. package/node_modules/undici/lib/web/fetch/request.js +2 -3
  125. package/node_modules/undici/lib/web/fetch/util.js +6 -1
  126. package/node_modules/undici/lib/web/webidl/index.js +3 -3
  127. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  128. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  129. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  130. package/node_modules/undici/package.json +3 -3
  131. package/node_modules/undici/types/client.d.ts +10 -0
  132. package/node_modules/undici/types/interceptors.d.ts +2 -0
  133. package/node_modules/undici/types/mock-agent.d.ts +11 -10
  134. package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
  135. package/openclaw.plugin.json +1 -2
  136. package/package.json +6 -6
  137. package/dist/provider.runtime-Db8YwZBv.js +0 -2
  138. package/dist/targets-DbxVbq8k.js +0 -3
@@ -1,11 +1,12 @@
1
1
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
2
- import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-B1oySiVc.js";
3
- import { v as mapGatewayDispatchData } from "./provider-DuDtKbF8.js";
4
- import { f as resolveDiscordReferencedReplyMessageId, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordCdnPolicy } from "./message-text-BRVqYm-t.js";
2
+ import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-pbbRT5gb.js";
3
+ import { v as mapGatewayDispatchData } from "./provider-uKmmrDM4.js";
4
+ import { f as resolveDiscordReferencedReplyMessageId, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordCdnPolicy } from "./message-text-DK4NnBg-.js";
5
5
  import { logDebug } from "openclaw/plugin-sdk/logging-core";
6
6
  import { GatewayDispatchEvents } from "discord-api-types/v10";
7
7
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
8
8
  import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
9
+ import { createRuntimeConfigReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
9
10
  import { danger } from "openclaw/plugin-sdk/runtime-env";
10
11
  import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
11
12
  import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, createChannelIngressError, createChannelIngressMonitor, createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
@@ -13,7 +14,7 @@ import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
13
14
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
14
15
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
15
16
  import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
16
- import { createChannelInboundDebouncer, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
17
+ import { createChannelInboundDebouncer, resolveInboundDebounceMs, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
17
18
  //#region extensions/discord/src/monitor/ingress.ts
18
19
  const DISCORD_INGRESS_PAYLOAD_VERSION = 1;
19
20
  const DISCORD_INGRESS_DRAIN_INTERVAL_MS = 1e3;
@@ -249,7 +250,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
249
250
  }
250
251
  //#endregion
251
252
  //#region extensions/discord/src/monitor/message-run-queue.ts
252
- const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-BYDjtxZJ.js"));
253
+ const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-BzCYf1pa.js"));
253
254
  async function processDiscordQueuedMessage(params) {
254
255
  const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
255
256
  try {
@@ -336,7 +337,7 @@ function createDiscordMessageRunQueue(params) {
336
337
  }
337
338
  //#endregion
338
339
  //#region extensions/discord/src/monitor/message-dispatcher.ts
339
- const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-Dxi2yBfR.js"));
340
+ const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-oZ7dQCd0.js"));
340
341
  function isNonEmptyString(value) {
341
342
  return typeof value === "string" && value.length > 0;
342
343
  }
@@ -346,7 +347,7 @@ function createDiscordMessageDispatcher(params) {
346
347
  groupPolicy: params.discordConfig?.groupPolicy,
347
348
  defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
348
349
  });
349
- const ackReactionScope = params.discordConfig?.ackReactionScope ?? params.cfg.messages?.ackReactionScope ?? "group-mentions";
350
+ const readConfig = createRuntimeConfigReader(params.cfg);
350
351
  const preflightDiscordMessageImpl = params.testing?.preflightDiscordMessage;
351
352
  const messageRunQueue = createDiscordMessageRunQueue({
352
353
  runtime: params.runtime,
@@ -373,6 +374,10 @@ function createDiscordMessageDispatcher(params) {
373
374
  const { debouncer } = createChannelInboundDebouncer({
374
375
  cfg: params.cfg,
375
376
  channel: "discord",
377
+ resolveDebounceMs: () => resolveInboundDebounceMs({
378
+ cfg: readConfig(),
379
+ channel: "discord"
380
+ }),
376
381
  buildKey: resolveDebounceKey,
377
382
  shouldDebounce: (entry) => {
378
383
  const message = entry.data.message;
@@ -398,69 +403,51 @@ function createDiscordMessageDispatcher(params) {
398
403
  return;
399
404
  }
400
405
  try {
401
- if (entries.length === 1) {
402
- const ctx = await (preflightDiscordMessageImpl ?? (await loadMessagePreflightRuntime()).preflightDiscordMessage)({
403
- ...params,
404
- avatarResolver,
405
- ackReactionScope,
406
- groupPolicy,
407
- abortSignal,
408
- data: last.data,
409
- client: last.client,
410
- turnAdoptionLifecycle: admissionLifecycle
406
+ const cfg = readConfig();
407
+ let data = last.data;
408
+ if (entries.length > 1) {
409
+ const combinedBaseText = entries.map((entry) => resolveDiscordMessageText(entry.data.message, { includeForwarded: false })).filter(Boolean).join("\n");
410
+ const syntheticMessage = Object.create(Object.getPrototypeOf(last.data.message), {
411
+ ...Object.getOwnPropertyDescriptors(last.data.message),
412
+ content: {
413
+ value: combinedBaseText,
414
+ enumerable: true,
415
+ configurable: true
416
+ },
417
+ attachments: {
418
+ value: [],
419
+ enumerable: true,
420
+ configurable: true
421
+ },
422
+ message_snapshots: {
423
+ value: last.data.message.message_snapshots,
424
+ enumerable: true,
425
+ configurable: true
426
+ },
427
+ messageSnapshots: {
428
+ value: last.data.message.messageSnapshots,
429
+ enumerable: true,
430
+ configurable: true
431
+ },
432
+ rawData: {
433
+ value: { ...last.data.message.rawData },
434
+ enumerable: true,
435
+ configurable: true
436
+ }
411
437
  });
412
- if (abortSignal?.aborted) {
413
- await ingress.cancel();
414
- return;
415
- }
416
- if (!ctx) {
417
- await ingress.settle();
418
- return;
419
- }
420
- applyImplicitReplyBatchGate(ctx, params.replyToMode, false);
421
- messageRunQueue.enqueue(buildDiscordInboundJob(ctx, { ingressSettlement: ingress }));
422
- return;
438
+ data = {
439
+ ...last.data,
440
+ message: syntheticMessage
441
+ };
423
442
  }
424
- const combinedBaseText = entries.map((entry) => resolveDiscordMessageText(entry.data.message, { includeForwarded: false })).filter(Boolean).join("\n");
425
- const syntheticMessage = Object.create(Object.getPrototypeOf(last.data.message), {
426
- ...Object.getOwnPropertyDescriptors(last.data.message),
427
- content: {
428
- value: combinedBaseText,
429
- enumerable: true,
430
- configurable: true
431
- },
432
- attachments: {
433
- value: [],
434
- enumerable: true,
435
- configurable: true
436
- },
437
- message_snapshots: {
438
- value: last.data.message.message_snapshots,
439
- enumerable: true,
440
- configurable: true
441
- },
442
- messageSnapshots: {
443
- value: last.data.message.messageSnapshots,
444
- enumerable: true,
445
- configurable: true
446
- },
447
- rawData: {
448
- value: { ...last.data.message.rawData },
449
- enumerable: true,
450
- configurable: true
451
- }
452
- });
453
- const syntheticData = {
454
- ...last.data,
455
- message: syntheticMessage
456
- };
457
443
  const ctx = await (preflightDiscordMessageImpl ?? (await loadMessagePreflightRuntime()).preflightDiscordMessage)({
458
444
  ...params,
445
+ cfg,
459
446
  avatarResolver,
460
- ackReactionScope,
447
+ ackReactionScope: params.discordConfig?.ackReactionScope ?? cfg.messages?.ackReactionScope ?? "group-mentions",
461
448
  groupPolicy,
462
449
  abortSignal,
463
- data: syntheticData,
450
+ data,
464
451
  client: last.client,
465
452
  turnAdoptionLifecycle: admissionLifecycle
466
453
  });
@@ -472,9 +459,9 @@ function createDiscordMessageDispatcher(params) {
472
459
  await ingress.settle();
473
460
  return;
474
461
  }
475
- applyImplicitReplyBatchGate(ctx, params.replyToMode, true);
462
+ applyImplicitReplyBatchGate(ctx, params.replyToMode, entries.length > 1);
476
463
  const ids = entries.map((entry) => entry.data.message?.id).filter(isNonEmptyString);
477
- if (ids.length > 0) {
464
+ if (entries.length > 1 && ids.length > 0) {
478
465
  const ctxBatch = ctx;
479
466
  ctxBatch.MessageSids = ids;
480
467
  ctxBatch.MessageSidFirst = ids[0];
@@ -1,14 +1,14 @@
1
- import { G as Message, Mt as getChannelMessage, b as discord_exports } from "./retry-BNCxiyyR.js";
1
+ import { G as Message, Mt as getChannelMessage, b as discord_exports } from "./retry-DQt1zDgH.js";
2
2
  import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
3
- import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, i as normalizeDiscordDisplaySlug, p as resolveDiscordMemberAccessState, x as formatDiscordUserTag } from "./allow-list-C2JuH-R0.js";
3
+ import { S as resolveTimestampMs, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, x as resolveDiscordSystemLocation } from "./allow-list-DBTtR2dz.js";
4
4
  import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
5
5
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
6
- import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-BFGRF9fE.js";
7
- import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-24afmvEC.js";
8
- import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-B1oySiVc.js";
9
- import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-DuDtKbF8.js";
10
- import { d as resolveDiscordReferencedReplyMessage, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, m as resolveDiscordChannelInfo, o as resolveForwardedMediaList, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-BRVqYm-t.js";
11
- import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-Dt0imZyY.js";
6
+ import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
7
+ import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DuR5NGIx.js";
8
+ import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-pbbRT5gb.js";
9
+ import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-uKmmrDM4.js";
10
+ import { d as resolveDiscordReferencedReplyMessage, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, m as resolveDiscordChannelInfo, o as resolveForwardedMediaList, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
11
+ import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-B8Ncfi63.js";
12
12
  import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
13
13
  import { logDebug } from "openclaw/plugin-sdk/logging-core";
14
14
  import { MessageReferenceType, MessageType } from "discord-api-types/v10";
@@ -29,7 +29,7 @@ import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
29
29
  import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
30
30
  //#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
31
31
  const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
32
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-BnTEIeLE.js").then((n) => n.t));
32
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CZeWKUiA.js").then((n) => n.t));
33
33
  function resolveDiscordDmPairingSenderId(sender) {
34
34
  return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
35
35
  }
@@ -424,10 +424,10 @@ function logDiscordPreflightInboundSummary(params) {
424
424
  }
425
425
  //#endregion
426
426
  //#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
427
- const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-XmmAHoV6.js").then((n) => n.n));
427
+ const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-BY75YcK0.js").then((n) => n.n));
428
428
  const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.js"));
429
- const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-BOiDS8b3.js"));
430
- const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-OQnL-0Zx.js").then((n) => n.t));
429
+ const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-DFF_awl7.js"));
430
+ const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-BCx49X-6.js").then((n) => n.t));
431
431
  //#endregion
432
432
  //#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
433
433
  async function resolveDiscordPreflightPluralKitInfo(params) {
@@ -1,20 +1,20 @@
1
- import { At as editChannelMessage, Ot as deleteChannelMessage, Tt as createChannelMessage, b as discord_exports, o as chunkDiscordTextWithMode, y as resolveDiscordChannelId } from "./retry-BNCxiyyR.js";
1
+ import { At as editChannelMessage, Ot as deleteChannelMessage, Tt as createChannelMessage, b as discord_exports, o as chunkDiscordTextWithMode, y as resolveDiscordChannelId } from "./retry-DQt1zDgH.js";
2
2
  import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
3
- import { C as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-C2JuH-R0.js";
4
- import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-5vxBTagO.js";
5
- import { i as discordTextHasBroadcastMention } from "./send.outbound-b5xwHTlL.js";
6
- import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-BnTEIeLE.js";
3
+ import { S as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-DBTtR2dz.js";
4
+ import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-B0n_fWzu.js";
5
+ import { i as discordTextHasBroadcastMention } from "./send.outbound-DHuFUL6W.js";
6
+ import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-CZeWKUiA.js";
7
7
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
8
- import "./targets-DbxVbq8k.js";
9
- import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-BFGRF9fE.js";
10
- import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-DEhthWTk.js";
11
- import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-DuDtKbF8.js";
12
- import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-BRVqYm-t.js";
13
- import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-OQnL-0Zx.js";
14
- import { n as resolveDiscordWebhookId } from "./sender-identity-Dt0imZyY.js";
8
+ import "./targets-BObRyaKX.js";
9
+ import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
10
+ import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-CtggmGh9.js";
11
+ import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-uKmmrDM4.js";
12
+ import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
13
+ import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-BCx49X-6.js";
14
+ import { n as resolveDiscordWebhookId } from "./sender-identity-B8Ncfi63.js";
15
15
  import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.js";
16
16
  import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
17
- import { t as sendTyping } from "./typing-C9q0AQMb.js";
17
+ import { t as sendTyping } from "./typing-CuopV-Hi.js";
18
18
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
19
19
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
20
20
  import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
@@ -986,12 +986,12 @@ function createDiscordDraftPreviewController(params) {
986
986
  const narrationHideCommandText = narrationProgressEnabled && resolveChannelStreamingPreviewCommandText(params.discordConfig) === "status";
987
987
  const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
988
988
  const progressDraft = createChannelProgressDraftCompositor({
989
- presentation: discordStreamMode === "progress" ? "summary" : void 0,
990
989
  entry: params.discordConfig,
991
990
  mode: discordStreamMode,
992
991
  active: Boolean(draftStream),
993
992
  seed: progressSeed,
994
993
  reasoningLinePrefix: "🧠 ",
994
+ commentaryLinePrefix: "💬 ",
995
995
  commentaryItalics: false,
996
996
  update: async (previewText, options) => {
997
997
  if (!draftStream) return false;
@@ -1,4 +1,4 @@
1
- import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-B1oySiVc.js";
1
+ import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-pbbRT5gb.js";
2
2
  import { ComponentType, StickerFormatType } from "discord-api-types/v10";
3
3
  import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,7 +1,7 @@
1
- import { _ as normalizeDiscordOutboundTarget, c as createDiscordSendReceiptFromResults, i as hasDiscordMessageCreateAmbiguity, o as chunkDiscordTextWithMode, p as resolveDiscordReplyReference, s as createDiscordSendReceipt, t as canFallbackDiscordWebhookSend, u as toDiscordOutboundDeliveryResult } from "./retry-BNCxiyyR.js";
1
+ import { _ as normalizeDiscordOutboundTarget, c as createDiscordSendReceiptFromResults, i as hasDiscordMessageCreateAmbiguity, o as chunkDiscordTextWithMode, p as resolveDiscordReplyReference, s as createDiscordSendReceipt, t as canFallbackDiscordWebhookSend, u as toDiscordOutboundDeliveryResult } from "./retry-DQt1zDgH.js";
2
2
  import { t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
3
- import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-BFGRF9fE.js";
4
- import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-DehyxvA4.js";
3
+ import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-Q_HEusBQ.js";
4
+ import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-Dn8SJWMS.js";
5
5
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
@@ -60,7 +60,7 @@ function normalizeDiscordApprovalPayload(payload) {
60
60
  }
61
61
  //#endregion
62
62
  //#region extensions/discord/src/outbound-send-context.ts
63
- const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-BnTEIeLE.js").then((n) => n.t));
63
+ const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CZeWKUiA.js").then((n) => n.t));
64
64
  function resolveDiscordOutboundTarget(params) {
65
65
  if (params.threadId == null) return params.to;
66
66
  const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
@@ -280,8 +280,8 @@ async function sendDiscordOutboundPayload(params) {
280
280
  //#region extensions/discord/src/outbound-adapter.ts
281
281
  const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
282
282
  const log = createSubsystemLogger("discord/outbound");
283
- const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-D7mcaXQC.js").then((n) => n.t));
284
- const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-BWVEcjRP.js").then((n) => n.i));
283
+ const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-DKvsNjQR.js").then((n) => n.t));
284
+ const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-BG5IDABj.js").then((n) => n.i));
285
285
  function resolveDiscordDeliveryOptions(params) {
286
286
  return {
287
287
  onPlatformSendDispatch: params.onPlatformSendDispatch,
@@ -1,4 +1,4 @@
1
- import { h as readDiscordComponentSpec } from "./components-DmXYIQ26.js";
1
+ import { h as readDiscordComponentSpec } from "./components-BimX47Mq.js";
2
2
  import { resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
3
3
  import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
4
4
  //#region extensions/discord/src/outbound-components.ts
@@ -31,11 +31,11 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
31
31
  }
32
32
  }
33
33
  };
34
- const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-BWVEcjRP.js").then((n) => n.i), "sendDiscordComponentMessage");
34
+ const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-BG5IDABj.js").then((n) => n.i), "sendDiscordComponentMessage");
35
35
  async function sendDiscordComponentMessageLazy(...args) {
36
36
  return await (await loadDiscordComponentSend())(...args);
37
37
  }
38
- const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-DmXYIQ26.js").then((n) => n.a));
38
+ const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-BimX47Mq.js").then((n) => n.a));
39
39
  function addPayloadTextFallback(spec, payload) {
40
40
  return spec.text ? spec : {
41
41
  ...spec,
@@ -1,6 +1,7 @@
1
- import { g as normalizeDiscordMessagingTarget, v as parseDiscordTarget } from "./retry-BNCxiyyR.js";
2
- import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-DmXYIQ26.js";
1
+ import { g as normalizeDiscordMessagingTarget, v as parseDiscordTarget } from "./retry-DQt1zDgH.js";
2
+ import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-BimX47Mq.js";
3
3
  import { c as resolveDiscordAccount, r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
4
+ import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-D78sAoOz.js";
4
5
  import { t as inspectDiscordAccount } from "./account-inspect-BY-ve3yH.js";
5
6
  import { ChannelType } from "discord-api-types/v10";
6
7
  import { Type } from "typebox";
@@ -29,10 +30,8 @@ function normalizeDiscordApproverId(value) {
29
30
  }
30
31
  }
31
32
  function resolveDiscordOwnerApprovers(cfg) {
32
- const ownerAllowFrom = cfg.commands?.ownerAllowFrom;
33
- if (!Array.isArray(ownerAllowFrom) || ownerAllowFrom.length === 0) return [];
34
33
  return resolveApprovalApprovers({
35
- explicit: ownerAllowFrom,
34
+ explicit: resolveDiscordCommandOwnerEntries(cfg),
36
35
  normalizeApprover: (value) => normalizeDiscordApproverId(String(value))
37
36
  });
38
37
  }
@@ -265,7 +264,7 @@ function matchesCurrentDiscordThread(params) {
265
264
  if (!requestedTarget) return false;
266
265
  return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === requestedTarget);
267
266
  }
268
- const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-DMFv4doE.js"));
267
+ const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-DS8pXo0S.js"));
269
268
  function listDiscoverableDiscordAccounts(cfg) {
270
269
  return listDiscordAccountIds(cfg).map((accountId) => inspectDiscordAccount({
271
270
  cfg,
@@ -1,5 +1,6 @@
1
1
  import { l as resolveDiscordAccountAllowFrom } from "./accounts-CwJQoLjM.js";
2
- import { c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, n as isDiscordGroupAllowedByPolicy, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, t as allowListMatches } from "./allow-list-C2JuH-R0.js";
2
+ import { c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, t as allowListMatches } from "./allow-list-DBTtR2dz.js";
3
+ import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-D78sAoOz.js";
3
4
  import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native";
4
5
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
5
6
  //#region extensions/discord/src/voice/access.ts
@@ -54,7 +55,7 @@ async function authorizeDiscordVoiceIngress(params) {
54
55
  sender: params.sender,
55
56
  allowNameMatching: false
56
57
  });
57
- const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom ?? params.discordConfig.allowFrom, [
58
+ const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom, [
58
59
  "discord:",
59
60
  "user:",
60
61
  "pk:"
@@ -1,4 +1,4 @@
1
- import { sn as __exportAll } from "./retry-BNCxiyyR.js";
1
+ import { sn as __exportAll } from "./retry-DQt1zDgH.js";
2
2
  import { readProviderJsonObjectResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
3
3
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
4
4
  import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
@@ -1,6 +1,6 @@
1
- import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-B1oySiVc.js";
2
- import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-D7mcaXQC.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-Qdw9c0j4.js";
1
+ import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-pbbRT5gb.js";
2
+ import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DKvsNjQR.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-DhgBabyU.js";
4
4
  import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
5
5
  import { getAcpSessionManager, isAcpRuntimeError } from "openclaw/plugin-sdk/acp-runtime";
6
6
  export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled };
@@ -1,28 +1,29 @@
1
- import { A as ThreadDeleteListener, C as InteractionCreateListener, D as PresenceUpdateListener, E as MessageReactionRemoveListener, G as Message, H as Command, K as User, L as RateLimitError, N as Client, O as ReadyListener, P as Plugin, Q as Modal, S as GuildDeleteListener, T as MessageReactionAddListener, U as CommandWithSubcommands, W as Guild, b as discord_exports, dt as Separator, ft as StringSelectMenu, gt as BaseMessageInteractiveComponent, j as ThreadUpdateListener, lt as Row, o as chunkDiscordTextWithMode, pt as TextDisplay, q as hasDiscordV2Components, rt as Container, tt as Button, w as MessageCreateListener, x as GuildCreateListener } from "./retry-BNCxiyyR.js";
2
- import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, c as parseExecApprovalData, k as encodeCustomIdComponent, o as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./components-DmXYIQ26.js";
1
+ import { A as ThreadDeleteListener, C as InteractionCreateListener, D as PresenceUpdateListener, E as MessageReactionRemoveListener, G as Message, H as Command, K as User, L as RateLimitError, N as Client, O as ReadyListener, P as Plugin, Q as Modal, S as GuildDeleteListener, T as MessageReactionAddListener, U as CommandWithSubcommands, W as Guild, b as discord_exports, dt as Separator, ft as StringSelectMenu, gt as BaseMessageInteractiveComponent, j as ThreadUpdateListener, lt as Row, o as chunkDiscordTextWithMode, pt as TextDisplay, q as hasDiscordV2Components, rt as Container, tt as Button, w as MessageCreateListener, x as GuildCreateListener } from "./retry-DQt1zDgH.js";
2
+ import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, c as parseExecApprovalData, k as encodeCustomIdComponent, o as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./components-BimX47Mq.js";
3
3
  import { c as resolveDiscordAccount, f as resolveDiscordAccountDmPolicy, l as resolveDiscordAccountAllowFrom, m as normalizeDiscordToken, p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
4
- import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-BWVEcjRP.js";
4
+ import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-BG5IDABj.js";
5
5
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
6
6
  import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-BfmEP6wp.js";
7
- import { C as resolveTimestampMs, a as normalizeDiscordSlug, b as formatDiscordReactionEmoji, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordCommandOwnerAllowFrom, f as resolveDiscordGuildEntry, g as resolveDiscordOwnerAllowFrom, h as resolveDiscordOwnerAccess, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordMemberAllowed, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAccessState, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, v as resolveGroupDmAllow, x as formatDiscordUserTag, y as shouldEmitDiscordReactionNotification } from "./allow-list-C2JuH-R0.js";
8
- import { B as validateDiscordProxyUrl, G as unregisterGateway, P as createDiscordRestClient, R as DISCORD_REST_TIMEOUT_MS, V as withValidatedDiscordProxy, W as registerGateway, b as canViewDiscordGuildChannel, w as hasAnyChannelPermissionDiscord } from "./send.shared-5vxBTagO.js";
9
- import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-b5xwHTlL.js";
7
+ import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, h as resolveDiscordOwnerAllowFrom, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAllowed, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, v as shouldEmitDiscordReactionNotification, y as formatDiscordReactionEmoji } from "./allow-list-DBTtR2dz.js";
8
+ import { B as validateDiscordProxyUrl, G as unregisterGateway, P as createDiscordRestClient, R as DISCORD_REST_TIMEOUT_MS, V as withValidatedDiscordProxy, W as registerGateway, b as canViewDiscordGuildChannel, w as hasAnyChannelPermissionDiscord } from "./send.shared-B0n_fWzu.js";
9
+ import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-DHuFUL6W.js";
10
10
  import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
11
- import { n as getDiscordActivitiesRuntime } from "./runtime-DB7Fb6AU.js";
12
- import { n as resolveDiscordVoiceEnabled, r as authorizeDiscordVoiceIngress, t as resolveDiscordVoiceAccess } from "./owner-access-yc1sX7Gx.js";
11
+ import { n as getDiscordActivitiesRuntime } from "./runtime-BHsdEdr5.js";
12
+ import { n as resolveDiscordVoiceEnabled, r as authorizeDiscordVoiceIngress, t as resolveDiscordVoiceAccess } from "./owner-access-Cp8r6Ipf.js";
13
+ import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-D78sAoOz.js";
13
14
  import { i as setPresence, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
14
- import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-BnTEIeLE.js";
15
+ import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-CZeWKUiA.js";
15
16
  import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-D86uWLt_.js";
16
- import { S as isDiscordExecApprovalClientEnabled, b as getDiscordExecApprovalApprovers, c as resolveDiscordEffectiveRoute, i as buildDiscordConversationRouteContext, n as DISCORD_APPROVAL_ALLOWED_MENTIONS, o as resolveDiscordBoundConversationRoute, r as formatDiscordApprovalDisplayValue, u as resolveDiscordConversationIdentity } from "./outbound-session-route-BFGRF9fE.js";
17
- import { t as discordIngressIdentity } from "./ingress-identity-BCzfPPYM.js";
18
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CYseD5Uw.js";
19
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-DrmhDrqm.js";
20
- import { a as isThreadArchived, c as resolveDiscordChannelInfoSafe, f as resolveDiscordChannelTopicSafe, h as formatThreadBindingDurationLabel, l as resolveDiscordChannelNameSafe, r as getThreadBindingManager, s as resolveDiscordChannelIdSafe, u as resolveDiscordChannelParentIdSafe } from "./thread-bindings.manager-B1oySiVc.js";
17
+ import { S as isDiscordExecApprovalClientEnabled, b as getDiscordExecApprovalApprovers, c as resolveDiscordEffectiveRoute, i as buildDiscordConversationRouteContext, n as DISCORD_APPROVAL_ALLOWED_MENTIONS, o as resolveDiscordBoundConversationRoute, r as formatDiscordApprovalDisplayValue, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
18
+ import { t as discordIngressIdentity } from "./ingress-identity-XNmW-mZS.js";
19
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CoiMlWy0.js";
20
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-DJpiokfW.js";
21
+ import { a as isThreadArchived, c as resolveDiscordChannelInfoSafe, f as resolveDiscordChannelTopicSafe, h as formatThreadBindingDurationLabel, l as resolveDiscordChannelNameSafe, r as getThreadBindingManager, s as resolveDiscordChannelIdSafe, u as resolveDiscordChannelParentIdSafe } from "./thread-bindings.manager-pbbRT5gb.js";
21
22
  import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-3ovFAp3b.js";
22
23
  import { i as sanitizeRecentModels, n as normalizeModelRef, r as preferenceTimestampMs, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-BHT1LkR_.js";
23
- import { m as resolveDiscordChannelInfo, u as resolveDiscordMessageStickers } from "./message-text-BRVqYm-t.js";
24
- import { i as resolveDiscordThreadParentInfo } from "./threading-OQnL-0Zx.js";
25
- import { t as resolveDiscordSenderIdentity } from "./sender-identity-Dt0imZyY.js";
24
+ import { m as resolveDiscordChannelInfo, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
25
+ import { i as resolveDiscordThreadParentInfo } from "./threading-BCx49X-6.js";
26
+ import { t as resolveDiscordSenderIdentity } from "./sender-identity-B8Ncfi63.js";
26
27
  import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
27
28
  import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes, PermissionFlagsBits } from "discord-api-types/v10";
28
29
  import { Type } from "typebox";
@@ -4289,10 +4290,12 @@ async function dispatchDiscordCommandInteraction(params) {
4289
4290
  } : {},
4290
4291
  readOnly: true
4291
4292
  }) : void 0;
4292
- const menu = resolveCommandArgMenu({
4293
+ const menuRouteState = command.key === "verbose" ? await getNativeRouteState() : void 0;
4294
+ const menu = menuRouteState?.bindingReadiness?.ok === false ? null : resolveCommandArgMenu({
4293
4295
  command,
4294
4296
  args: commandArgs,
4295
4297
  cfg,
4298
+ session: menuRouteState?.effectiveRoute,
4296
4299
  provider: menuModelContext?.provider,
4297
4300
  model: menuModelContext?.model,
4298
4301
  agentRuntime: menuModelContext?.agentRuntime,
@@ -6500,7 +6503,7 @@ async function runDiscordGatewayLifecycle(params) {
6500
6503
  gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
6501
6504
  if (params.voiceManager) {
6502
6505
  await params.voiceManager.destroy();
6503
- const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-D8lH7AkN.js").then((n) => n.n);
6506
+ const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Dc6Nnli5.js").then((n) => n.n);
6504
6507
  setDiscordTranscriptsVoiceManager({
6505
6508
  accountId: params.accountId,
6506
6509
  manager: null
@@ -6515,7 +6518,7 @@ async function runDiscordGatewayLifecycle(params) {
6515
6518
  let discordVoiceRuntimePromise;
6516
6519
  let discordProviderSessionRuntimePromise;
6517
6520
  async function loadDiscordVoiceRuntime() {
6518
- const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-Dfhjh1tV.js").then((n) => n.t);
6521
+ const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-BQnILUbG.js").then((n) => n.t);
6519
6522
  discordVoiceRuntimePromise = promise;
6520
6523
  try {
6521
6524
  return await promise;
@@ -6525,7 +6528,7 @@ async function loadDiscordVoiceRuntime() {
6525
6528
  }
6526
6529
  }
6527
6530
  async function loadDiscordProviderSessionRuntime() {
6528
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-BA2BPyZ4.js");
6531
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-BL2lHBH7.js");
6529
6532
  discordProviderSessionRuntimePromise = promise;
6530
6533
  try {
6531
6534
  return await promise;
@@ -7140,9 +7143,7 @@ async function resolveDiscordProviderCommandSpecs(params) {
7140
7143
  const listSkillCommands = params.listSkillCommandsForAgents ?? listSkillCommandsForAgents;
7141
7144
  const listNativeCommandSpecs = params.listNativeCommandSpecsForConfig ?? listNativeCommandSpecsForConfig;
7142
7145
  const maxDiscordCommands = params.maxDiscordCommands ?? 100;
7143
- let pluginCommandRuntime;
7144
- if (params.nativeEnabled) pluginCommandRuntime = (await loadPluginCommandRuntime()).createPluginCommandRuntime();
7145
- const pluginCommandSpecs = pluginCommandRuntime?.listNativeCandidates("discord") ?? [];
7146
+ const pluginCommandSpecs = params.nativeEnabled ? (await loadPluginCommandRuntime()).createPluginCommandRuntime().listNativeCandidates("discord") : [];
7146
7147
  const onCollision = (normalizedName) => {
7147
7148
  params.runtime.error?.(danger(`discord: plugin command "/${normalizedName}" duplicates an existing native command. Skipping.`));
7148
7149
  };
@@ -7170,7 +7171,6 @@ async function resolveDiscordProviderCommandSpecs(params) {
7170
7171
  params.runtime.log?.(warn(`${initialCommandCount} commands exceed the ${maxDiscordCommands}-command Discord limit; removing per-skill commands and keeping /skill.`));
7171
7172
  } else for (const normalizedName of provisionalCollisions) onCollision(normalizedName);
7172
7173
  if (params.nativeEnabled && commandSpecs.length > maxDiscordCommands) params.runtime.log?.(warn(`${commandSpecs.length} commands exceed the ${maxDiscordCommands}-command Discord limit; some commands may fail to deploy.`));
7173
- if (commandSpecs.some((command) => "prepareDispatch" in command)) pluginCommandRuntime?.retainNativeCatalog("discord");
7174
7174
  return {
7175
7175
  skillCommands,
7176
7176
  commandSpecs
@@ -8342,7 +8342,7 @@ async function deliverDiscordReply(params) {
8342
8342
  //#endregion
8343
8343
  //#region extensions/discord/src/monitor/agent-components.dispatch.ts
8344
8344
  const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("./agent-components.runtime-CEPrf2SY.js"));
8345
- const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-C9q0AQMb.js").then((n) => n.n));
8345
+ const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-CuopV-Hi.js").then((n) => n.n));
8346
8346
  function buildDiscordComponentConversationLabel(params) {
8347
8347
  if (params.interactionCtx.isDirectMessage) return buildDirectLabel(params.interactionCtx.user);
8348
8348
  if (params.interactionCtx.isGroupDm) return `Group DM #${params.channelCtx.channelName ?? params.interactionCtx.channelId} channel id:${params.interactionCtx.channelId}`;
@@ -8749,7 +8749,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
8749
8749
  }
8750
8750
  //#endregion
8751
8751
  //#region extensions/discord/src/monitor/agent-components.handlers.ts
8752
- const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-DmXYIQ26.js").then((n) => n.t));
8752
+ const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-BimX47Mq.js").then((n) => n.t));
8753
8753
  async function handleDiscordComponentEvent(params) {
8754
8754
  const parsed = parseDiscordComponentData(params.data, resolveInteractionCustomId(params.interaction));
8755
8755
  if (!parsed) {
@@ -10292,7 +10292,7 @@ async function monitorDiscordProvider(opts = {}) {
10292
10292
  runtime,
10293
10293
  botUserId
10294
10294
  });
10295
- const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-D8lH7AkN.js").then((n) => n.n);
10295
+ const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Dc6Nnli5.js").then((n) => n.n);
10296
10296
  setDiscordTranscriptsVoiceManager({
10297
10297
  accountId: account.accountId,
10298
10298
  manager: voiceManager
@@ -0,0 +1,2 @@
1
+ import { t as monitorDiscordProvider } from "./provider-uKmmrDM4.js";
2
+ export { monitorDiscordProvider };