@openclaw/discord 2026.5.31-beta.2 → 2026.5.31-beta.4

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 (69) hide show
  1. package/dist/action-runtime-api.js +1 -1
  2. package/dist/{allow-list-BnkWtVpA.js → allow-list-C-MqM-B_.js} +1 -1
  3. package/dist/api.js +12 -12
  4. package/dist/{approval-handler.runtime-DSFfzXpo.js → approval-handler.runtime-DQiJ1Z0k.js} +3 -3
  5. package/dist/{audit-kgIklCyI.js → audit-eI8e8RpG.js} +3 -3
  6. package/dist/{channel-D0gX0yj6.js → channel-W1HBHzdw.js} +20 -20
  7. package/dist/{channel-actions-DDoc4V7x.js → channel-actions-BaPDAWN_.js} +2 -2
  8. package/dist/{channel-actions.runtime-CqZfnMaA.js → channel-actions.runtime-BEMDJjP1.js} +5 -5
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel.setup-BNZm3eed.js → channel.setup-BX7g7pL-.js} +3 -3
  11. package/dist/{components-DcLQ2JkV.js → components-CCbYVuVr.js} +66 -27
  12. package/dist/contract-api.js +3 -3
  13. package/dist/{conversation-identity-BURFgcfI.js → conversation-identity-CEP1KbK0.js} +2 -2
  14. package/dist/{directory-config-B9Jw1Q2R.js → directory-config-j1bfTue_.js} +1 -1
  15. package/dist/directory-contract-api.js +1 -1
  16. package/dist/{directory-live-CDWUg-nA.js → directory-live-BjBs64RV.js} +2 -2
  17. package/dist/{doctor-BUhqxLb9.js → doctor-D3ngpo-Y.js} +2 -2
  18. package/dist/{doctor-contract-BAu3WLvd.js → doctor-contract-CU7lnZTF.js} +2 -2
  19. package/dist/doctor-contract-api.js +1 -1
  20. package/dist/{handle-action.guild-admin-Dpa-kUzu.js → handle-action.guild-admin-CqUsOA2L.js} +3 -3
  21. package/dist/index.js +1 -1
  22. package/dist/legacy-state-migrations-api.js +39 -6
  23. package/dist/{manager.runtime-BWBENHRA.js → manager.runtime-CVB9_dwq.js} +51 -45
  24. package/dist/{message-handler-HO8BbZmQ.js → message-handler-CQGpWQ0f.js} +6 -6
  25. package/dist/{message-handler.preflight-DxHBPQvD.js → message-handler.preflight-B9aZ9jQD.js} +14 -14
  26. package/dist/{message-handler.process-Cq3j7A9k.js → message-handler.process-DrLZOgzG.js} +18 -17
  27. package/dist/{message-utils-D_3KTxh_.js → message-utils-ZTGvA2L8.js} +1 -3
  28. package/dist/{outbound-adapter-BkPkILpq.js → outbound-adapter-Bt6-9M13.js} +6 -6
  29. package/dist/{pluralkit-Ds9aZAM4.js → pluralkit-BEEldePl.js} +1 -1
  30. package/dist/{provider-BK8hjk_y.js → provider-BTp6enEl.js} +53 -96
  31. package/dist/{provider-session.runtime-CYMFlLg9.js → provider-session.runtime-CC2f_W1j.js} +3 -3
  32. package/dist/provider.runtime-DUQJvWin.js +2 -0
  33. package/dist/{resolve-allowlist-common-BIf3417N.js → resolve-allowlist-common-B3p7cT8F.js} +1 -1
  34. package/dist/{resolve-channels-DK-3f_aA.js → resolve-channels-DLNfxFQP.js} +3 -3
  35. package/dist/{resolve-users-DUDPsfWt.js → resolve-users-QTyD8qgI.js} +2 -2
  36. package/dist/{runtime-Blf_d9E7.js → runtime-Dds0Ww1n.js} +8 -8
  37. package/dist/runtime-api.actions.js +2 -2
  38. package/dist/runtime-api.js +21 -21
  39. package/dist/runtime-api.lookup.js +4 -4
  40. package/dist/runtime-api.monitor-BkA-vJZA.js +6 -0
  41. package/dist/runtime-api.monitor.js +5 -5
  42. package/dist/runtime-api.send.js +5 -5
  43. package/dist/runtime-api.threads.js +5 -5
  44. package/dist/{send-BHkA8a-k.js → send-CyyRF1yd.js} +3 -3
  45. package/dist/{send.components-CUHzDapa.js → send.components-a9JQeeH5.js} +4 -4
  46. package/dist/{send.outbound-DSKZbjML.js → send.outbound-DhMLobqR.js} +3 -3
  47. package/dist/{send.receipt-CjsWpitW.js → send.receipt-Z8V6yMOY.js} +38 -11
  48. package/dist/{send.shared-Cluujl6W.js → send.shared-B3QxPnR3.js} +5 -5
  49. package/dist/{sender-identity-BFp5w0F8.js → sender-identity-CEsfDF0L.js} +1 -1
  50. package/dist/setup-plugin-api.js +1 -1
  51. package/dist/{shared-BMGLQw74.js → shared-D11J9bXI.js} +2 -2
  52. package/dist/subagent-hooks-api.js +1 -1
  53. package/dist/{subagent-hooks-7jAn9HT5.js → subagent-hooks-nBcp0iGm.js} +2 -2
  54. package/dist/{system-events-BjuNA9Zs.js → system-events-NnSID6Q5.js} +2 -2
  55. package/dist/{target-resolver-BYuWNVQp.js → target-resolver-BKGK0ftO.js} +2 -2
  56. package/dist/targets-Cv797U29.js +3 -0
  57. package/dist/{thread-bindings-CKruJE91.js → thread-bindings-Tfr_vFxk.js} +6 -6
  58. package/dist/{thread-bindings.discord-api-BjLUwwSP.js → thread-bindings.discord-api-CfDs1lWu.js} +5 -5
  59. package/dist/{thread-bindings.manager-Dji7SZHG.js → thread-bindings.manager-CRc4hYr1.js} +20 -21
  60. package/dist/{thread-bindings.session-updates-DoDFvU_h.js → thread-bindings.session-updates-DeMxmcXB.js} +1 -1
  61. package/dist/{thread-bindings.state-DYp4FVEB.js → thread-bindings.state-CVLF7gJH.js} +48 -22
  62. package/dist/{transcripts-source-O73_YIDs.js → transcripts-source-Cegx0wdw.js} +1 -1
  63. package/dist/transcripts-source-api.js +1 -1
  64. package/dist/{typing-CKW0i8du.js → typing-C7RXECnL.js} +1 -1
  65. package/npm-shrinkwrap.json +3 -3
  66. package/package.json +4 -4
  67. package/dist/provider.runtime-RfQSSM_v.js +0 -2
  68. package/dist/runtime-api.monitor-LVbgPRHA.js +0 -6
  69. package/dist/targets-BNDUOdvI.js +0 -3
@@ -1,9 +1,9 @@
1
- import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-CjsWpitW.js";
1
+ import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-Z8V6yMOY.js";
2
2
  import { c as resolveDiscordAccountAllowFrom } from "./accounts-P19jm1lf.js";
3
- import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-BnkWtVpA.js";
4
- import { o as formatMention } from "./send.outbound-DSKZbjML.js";
3
+ import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-C-MqM-B_.js";
4
+ import { o as formatMention } from "./send.outbound-DhMLobqR.js";
5
5
  import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
6
- import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-BK8hjk_y.js";
6
+ import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-BTp6enEl.js";
7
7
  import { createRequire } from "node:module";
8
8
  import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
@@ -158,34 +158,38 @@ var DiscordOpusEncodeStream = class extends Transform {
158
158
  if (!this.#encoder) this.#encoder = await this.#encoderPromise;
159
159
  return this.#encoder;
160
160
  }
161
- async _transform(chunk, _encoding, done) {
162
- try {
163
- const encoder = await this.#getEncoder();
164
- this.#buffer = this.#buffer.length > 0 ? Buffer.concat([this.#buffer, chunk]) : Buffer.from(chunk);
165
- while (this.#buffer.length >= DISCORD_OPUS_FRAME_BYTES) {
166
- const frame = this.#buffer.subarray(0, DISCORD_OPUS_FRAME_BYTES);
167
- this.#buffer = this.#buffer.subarray(DISCORD_OPUS_FRAME_BYTES);
168
- this.push(Buffer.from(encoder.encode(frame, { frameSize: DISCORD_OPUS_FRAME_SIZE })));
161
+ _transform(chunk, _encoding, done) {
162
+ (async () => {
163
+ try {
164
+ const encoder = await this.#getEncoder();
165
+ this.#buffer = this.#buffer.length > 0 ? Buffer.concat([this.#buffer, chunk]) : Buffer.from(chunk);
166
+ while (this.#buffer.length >= DISCORD_OPUS_FRAME_BYTES) {
167
+ const frame = this.#buffer.subarray(0, DISCORD_OPUS_FRAME_BYTES);
168
+ this.#buffer = this.#buffer.subarray(DISCORD_OPUS_FRAME_BYTES);
169
+ this.push(Buffer.from(encoder.encode(frame, { frameSize: DISCORD_OPUS_FRAME_SIZE })));
170
+ }
171
+ done();
172
+ } catch (err) {
173
+ done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
169
174
  }
170
- done();
171
- } catch (err) {
172
- done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
173
- }
175
+ })();
174
176
  }
175
- async _final(done) {
176
- try {
177
- if (this.#buffer.length > 0) {
178
- const encoder = await this.#getEncoder();
179
- const frame = Buffer.alloc(DISCORD_OPUS_FRAME_BYTES);
180
- this.#buffer.copy(frame);
181
- this.#buffer = Buffer.alloc(0);
182
- this.push(Buffer.from(encoder.encode(frame, { frameSize: DISCORD_OPUS_FRAME_SIZE })));
177
+ _final(done) {
178
+ (async () => {
179
+ try {
180
+ if (this.#buffer.length > 0) {
181
+ const encoder = await this.#getEncoder();
182
+ const frame = Buffer.alloc(DISCORD_OPUS_FRAME_BYTES);
183
+ this.#buffer.copy(frame);
184
+ this.#buffer = Buffer.alloc(0);
185
+ this.push(Buffer.from(encoder.encode(frame, { frameSize: DISCORD_OPUS_FRAME_SIZE })));
186
+ }
187
+ this.#freeEncoder();
188
+ done();
189
+ } catch (err) {
190
+ done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
183
191
  }
184
- this.#freeEncoder();
185
- done();
186
- } catch (err) {
187
- done(err instanceof Error ? err : new Error(formatErrorMessage(err)));
188
- }
192
+ })();
189
193
  }
190
194
  _destroy(err, done) {
191
195
  this.#freeEncoder();
@@ -2406,7 +2410,7 @@ var DiscordVoiceManager$1 = class {
2406
2410
  const clearSessionIfCurrent = () => {
2407
2411
  if (this.sessions.get(guildId)?.connection === connection) this.sessions.delete(guildId);
2408
2412
  };
2409
- const stopEntry = (entry, options) => {
2413
+ const stopEntry = (entry, optionsLocal) => {
2410
2414
  if (stopped) return;
2411
2415
  stopped = true;
2412
2416
  if (speakingHandler) connection.receiver.speaking.off("start", speakingHandler);
@@ -2420,10 +2424,10 @@ var DiscordVoiceManager$1 = class {
2420
2424
  entry.realtime?.close();
2421
2425
  entry.realtime = void 0;
2422
2426
  player.stop();
2423
- if (options.destroyConnection) destroyVoiceConnectionSafely({
2427
+ if (optionsLocal.destroyConnection) destroyVoiceConnectionSafely({
2424
2428
  connection,
2425
2429
  voiceSdk,
2426
- reason: options.reason
2430
+ reason: optionsLocal.reason
2427
2431
  });
2428
2432
  };
2429
2433
  const entry = {
@@ -2485,19 +2489,21 @@ var DiscordVoiceManager$1 = class {
2485
2489
  const speakingEndHandler = (userId) => {
2486
2490
  this.scheduleCaptureFinalize(entry, userId, "speaker end");
2487
2491
  };
2488
- const disconnectedHandler = async () => {
2489
- try {
2490
- logVoiceVerbose(`disconnected: attempting recovery guild ${guildId} channel ${channelId} grace=${reconnectGraceMs}ms`);
2491
- await Promise.race([voiceSdk.entersState(connection, voiceSdk.VoiceConnectionStatus.Signalling, reconnectGraceMs), voiceSdk.entersState(connection, voiceSdk.VoiceConnectionStatus.Connecting, reconnectGraceMs)]);
2492
- logVoiceVerbose(`disconnected: recovery started guild ${guildId} channel ${channelId}`);
2493
- } catch (err) {
2494
- logger.warn(`discord voice: disconnect recovery failed: guild ${guildId} channel ${channelId} timeout=${reconnectGraceMs}ms error=${formatErrorMessage(err)}; destroying connection`);
2495
- clearSessionIfCurrent();
2496
- stopEntry(entry, {
2497
- destroyConnection: true,
2498
- reason: `disconnect recovery failed guild ${guildId} channel ${channelId}`
2499
- });
2500
- }
2492
+ const disconnectedHandler = () => {
2493
+ (async () => {
2494
+ try {
2495
+ logVoiceVerbose(`disconnected: attempting recovery guild ${guildId} channel ${channelId} grace=${reconnectGraceMs}ms`);
2496
+ await Promise.race([voiceSdk.entersState(connection, voiceSdk.VoiceConnectionStatus.Signalling, reconnectGraceMs), voiceSdk.entersState(connection, voiceSdk.VoiceConnectionStatus.Connecting, reconnectGraceMs)]);
2497
+ logVoiceVerbose(`disconnected: recovery started guild ${guildId} channel ${channelId}`);
2498
+ } catch (err) {
2499
+ logger.warn(`discord voice: disconnect recovery failed: guild ${guildId} channel ${channelId} timeout=${reconnectGraceMs}ms error=${formatErrorMessage(err)}; destroying connection`);
2500
+ clearSessionIfCurrent();
2501
+ stopEntry(entry, {
2502
+ destroyConnection: true,
2503
+ reason: `disconnect recovery failed guild ${guildId} channel ${channelId}`
2504
+ });
2505
+ }
2506
+ })();
2501
2507
  };
2502
2508
  const destroyedHandler = () => {
2503
2509
  clearSessionIfCurrent();
@@ -1,8 +1,8 @@
1
- import { I as createDiscordRestClient } from "./send.shared-Cluujl6W.js";
2
- import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjLUwwSP.js";
1
+ import { I as createDiscordRestClient } from "./send.shared-B3QxPnR3.js";
2
+ import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CfDs1lWu.js";
3
3
  import { a as mergeAbortSignals } from "./timeouts-CEJ3--Uw.js";
4
- import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-D_3KTxh_.js";
5
- import { t as sendTyping } from "./typing-CKW0i8du.js";
4
+ import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-ZTGvA2L8.js";
5
+ import { t as sendTyping } from "./typing-C7RXECnL.js";
6
6
  import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
7
7
  import { createChannelRunQueue, createTypingCallbacks, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
8
8
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -178,7 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
178
178
  //#region extensions/discord/src/monitor/message-run-queue.ts
179
179
  let messageProcessRuntimePromise;
180
180
  async function loadMessageProcessRuntime() {
181
- messageProcessRuntimePromise ??= import("./message-handler.process-Cq3j7A9k.js");
181
+ messageProcessRuntimePromise ??= import("./message-handler.process-DrLZOgzG.js");
182
182
  return await messageProcessRuntimePromise;
183
183
  }
184
184
  async function processDiscordQueuedMessage(params) {
@@ -307,7 +307,7 @@ function createDiscordReplyTypingFeedback(params) {
307
307
  //#region extensions/discord/src/monitor/message-handler.ts
308
308
  let messagePreflightRuntimePromise;
309
309
  async function loadMessagePreflightRuntime() {
310
- messagePreflightRuntimePromise ??= import("./message-handler.preflight-DxHBPQvD.js");
310
+ messagePreflightRuntimePromise ??= import("./message-handler.preflight-B9aZ9jQD.js");
311
311
  return await messagePreflightRuntimePromise;
312
312
  }
313
313
  function isNonEmptyString(value) {
@@ -1,13 +1,13 @@
1
- import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-CjsWpitW.js";
1
+ import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-Z8V6yMOY.js";
2
2
  import { o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
3
- import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-BnkWtVpA.js";
4
- import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BURFgcfI.js";
5
- import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-DYp4FVEB.js";
6
- import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjLUwwSP.js";
7
- import "./thread-bindings-CKruJE91.js";
8
- import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-BK8hjk_y.js";
9
- import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-D_3KTxh_.js";
10
- import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BFp5w0F8.js";
3
+ import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-C-MqM-B_.js";
4
+ import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CEP1KbK0.js";
5
+ import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-CVLF7gJH.js";
6
+ import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CfDs1lWu.js";
7
+ import "./thread-bindings-Tfr_vFxk.js";
8
+ import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-BTp6enEl.js";
9
+ import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-ZTGvA2L8.js";
10
+ import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
11
11
  import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
12
12
  import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
13
13
  import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
@@ -28,7 +28,7 @@ async function loadConversationRuntime$1() {
28
28
  return await conversationRuntimePromise$1;
29
29
  }
30
30
  async function loadDiscordSendRuntime() {
31
- discordSendRuntimePromise ??= import("./send-BHkA8a-k.js").then((n) => n.t);
31
+ discordSendRuntimePromise ??= import("./send-CyyRF1yd.js").then((n) => n.t);
32
32
  return await discordSendRuntimePromise;
33
33
  }
34
34
  function resolveDiscordDmPairingSenderId(sender) {
@@ -189,7 +189,7 @@ function copyRuntimeMessageFields(source, target) {
189
189
  if (channelDescriptor) Object.defineProperty(target, "channel", channelDescriptor);
190
190
  }
191
191
  function shouldHydrateDiscordMessage(params) {
192
- let currentText = "";
192
+ let currentText;
193
193
  try {
194
194
  currentText = resolveDiscordMessageText(params.message, { includeForwarded: true });
195
195
  } catch {
@@ -426,7 +426,7 @@ let preflightAudioRuntimePromise;
426
426
  let systemEventsRuntimePromise;
427
427
  let discordThreadingRuntimePromise;
428
428
  async function loadPluralKitRuntime() {
429
- pluralkitRuntimePromise ??= import("./pluralkit-Ds9aZAM4.js").then((n) => n.n);
429
+ pluralkitRuntimePromise ??= import("./pluralkit-BEEldePl.js").then((n) => n.n);
430
430
  return await pluralkitRuntimePromise;
431
431
  }
432
432
  async function loadPreflightAudioRuntime() {
@@ -434,11 +434,11 @@ async function loadPreflightAudioRuntime() {
434
434
  return await preflightAudioRuntimePromise;
435
435
  }
436
436
  async function loadSystemEventsRuntime() {
437
- systemEventsRuntimePromise ??= import("./system-events-BjuNA9Zs.js");
437
+ systemEventsRuntimePromise ??= import("./system-events-NnSID6Q5.js");
438
438
  return await systemEventsRuntimePromise;
439
439
  }
440
440
  async function loadDiscordThreadingRuntime() {
441
- discordThreadingRuntimePromise ??= import("./provider-BK8hjk_y.js").then((n) => n.x);
441
+ discordThreadingRuntimePromise ??= import("./provider-BTp6enEl.js").then((n) => n.x);
442
442
  return await discordThreadingRuntimePromise;
443
443
  }
444
444
  function isPreflightAborted(abortSignal) {
@@ -1,18 +1,18 @@
1
- import { Ut as resolveDiscordChannelId, c as discord_exports, ft as editChannelMessage, s as chunkDiscordTextWithMode, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-CjsWpitW.js";
1
+ import { Ut as resolveDiscordChannelId, c as discord_exports, ft as editChannelMessage, s as chunkDiscordTextWithMode, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-Z8V6yMOY.js";
2
2
  import { f as resolveDiscordMaxLinesPerMessage, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
3
- import { I as createDiscordRestClient, L as createDiscordRuntimeAccountContext, _ as resolveDiscordMessageFlags, d as resolveDiscordTargetChannelId } from "./send.shared-Cluujl6W.js";
4
- import { S as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-BnkWtVpA.js";
5
- import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-BHkA8a-k.js";
6
- import { a as discordTextHasTargetedMention, i as discordTextHasBroadcastMention, s as rewriteDiscordKnownMentions } from "./send.outbound-DSKZbjML.js";
7
- import "./targets-BNDUOdvI.js";
8
- import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BURFgcfI.js";
3
+ import { I as createDiscordRestClient, L as createDiscordRuntimeAccountContext, _ as resolveDiscordMessageFlags, d as resolveDiscordTargetChannelId } from "./send.shared-B3QxPnR3.js";
4
+ import { S as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-C-MqM-B_.js";
5
+ import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-CyyRF1yd.js";
6
+ import { a as discordTextHasTargetedMention, i as discordTextHasBroadcastMention, s as rewriteDiscordKnownMentions } from "./send.outbound-DhMLobqR.js";
7
+ import "./targets-Cv797U29.js";
8
+ import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CEP1KbK0.js";
9
9
  import { t as beginDiscordInboundEventDeliveryCorrelation } from "./inbound-event-delivery-CEPlt2uz.js";
10
- import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-BkPkILpq.js";
10
+ import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-Bt6-9M13.js";
11
11
  import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-DXT8oJdo.js";
12
12
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.js";
13
- import { S as resolveDiscordAutoThreadReplyPlan, a as resolveReplyContext, i as buildGuildLabel, m as createDiscordSupplementalContextAccessChecker, n as deliverDiscordReply, p as buildDiscordInboundAccessContext, r as buildDirectLabel, w as resolveDiscordThreadStarter } from "./provider-BK8hjk_y.js";
14
- import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-D_3KTxh_.js";
15
- import { n as createDiscordReplyTypingFeedback } from "./message-handler-HO8BbZmQ.js";
13
+ import { S as resolveDiscordAutoThreadReplyPlan, a as resolveReplyContext, i as buildGuildLabel, m as createDiscordSupplementalContextAccessChecker, n as deliverDiscordReply, p as buildDiscordInboundAccessContext, r as buildDirectLabel, w as resolveDiscordThreadStarter } from "./provider-BTp6enEl.js";
14
+ import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-ZTGvA2L8.js";
15
+ import { n as createDiscordReplyTypingFeedback } from "./message-handler-CQGpWQ0f.js";
16
16
  import { buildAgentSessionKey, normalizeAccountId, resolveAccountEntry, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
17
17
  import { MessageFlags } from "discord-api-types/v10";
18
18
  import path from "node:path";
@@ -685,9 +685,12 @@ function createDiscordDraftPreviewController(params) {
685
685
  }
686
686
  if (previewToolProgressEnabled && !previewToolProgressSuppressed && normalized) previewToolProgressLines = mergeChannelProgressDraftLine(previewToolProgressLines, progressLine, { maxLines: resolveChannelProgressDraftMaxLines(params.discordConfig) });
687
687
  const alreadyStarted = progressDraftGate.hasStarted;
688
- if (shouldStartDiscordProgressDraftNow(line)) await progressDraftGate.startNow();
689
- else await progressDraftGate.noteWork();
690
- if (alreadyStarted && progressDraftGate.hasStarted) await renderProgressDraft();
688
+ let progressActive;
689
+ if (shouldStartDiscordProgressDraftNow(line)) {
690
+ await progressDraftGate.startNow();
691
+ progressActive = progressDraftGate.hasStarted;
692
+ } else progressActive = await progressDraftGate.noteWork();
693
+ if ((alreadyStarted || progressActive) && progressDraftGate.hasStarted) await renderProgressDraft();
691
694
  },
692
695
  async pushReasoningProgress(text, options) {
693
696
  if (!draftStream || discordStreamMode !== "progress" || !text) return;
@@ -703,9 +706,7 @@ function createDiscordDraftPreviewController(params) {
703
706
  } else previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
704
707
  lastReasoningProgressLine = normalized;
705
708
  }
706
- const alreadyStarted = progressDraftGate.hasStarted;
707
- await progressDraftGate.noteWork();
708
- if (alreadyStarted && progressDraftGate.hasStarted) await renderProgressDraft();
709
+ if (await progressDraftGate.noteWork() && progressDraftGate.hasStarted) await renderProgressDraft();
709
710
  },
710
711
  async pushCommentaryProgress(text, options) {
711
712
  if (!draftStream || discordStreamMode !== "progress" || !commentaryProgressEnabled) return;
@@ -1,4 +1,4 @@
1
- import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-BjLUwwSP.js";
1
+ import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CfDs1lWu.js";
2
2
  import { a as mergeAbortSignals } from "./timeouts-CEJ3--Uw.js";
3
3
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { ComponentType, StickerFormatType } from "discord-api-types/v10";
@@ -354,8 +354,6 @@ function resolveStickerAssetCandidates(sticker) {
354
354
  url: `${DISCORD_STICKER_ASSET_BASE_URL}/${sticker.id}.json`,
355
355
  fileName: `${baseName}.json`
356
356
  }];
357
- case StickerFormatType.APNG:
358
- case StickerFormatType.PNG:
359
357
  default: return [{
360
358
  url: `${DISCORD_STICKER_ASSET_BASE_URL}/${sticker.id}.png`,
361
359
  fileName: `${baseName}.png`
@@ -1,6 +1,6 @@
1
- import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt, x as DiscordError } from "./send.receipt-CjsWpitW.js";
1
+ import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt, x as DiscordError } from "./send.receipt-Z8V6yMOY.js";
2
2
  import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
3
- import { d as readDiscordComponentSpec } from "./components-DcLQ2JkV.js";
3
+ import { d as readDiscordComponentSpec } from "./components-CCbYVuVr.js";
4
4
  import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-D5_VmM-_.js";
5
5
  import { n as notifyDiscordInboundEventOutboundPayloadSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -86,11 +86,11 @@ function normalizeDiscordApprovalPayload(payload) {
86
86
  let discordComponentSendPromise;
87
87
  let discordSharedInteractivePromise;
88
88
  async function sendDiscordComponentMessageLazy(...args) {
89
- discordComponentSendPromise ??= import("./send.components-CUHzDapa.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
89
+ discordComponentSendPromise ??= import("./send.components-a9JQeeH5.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
90
90
  return await (await discordComponentSendPromise)(...args);
91
91
  }
92
92
  function loadDiscordSharedInteractive() {
93
- discordSharedInteractivePromise ??= import("./components-DcLQ2JkV.js").then((n) => n.a);
93
+ discordSharedInteractivePromise ??= import("./components-CCbYVuVr.js").then((n) => n.a);
94
94
  return discordSharedInteractivePromise;
95
95
  }
96
96
  function addPayloadTextFallback(spec, payload) {
@@ -125,7 +125,7 @@ async function resolveDiscordComponentSpec(payload) {
125
125
  //#region extensions/discord/src/outbound-send-context.ts
126
126
  let discordSendRuntimePromise;
127
127
  async function loadDiscordSendRuntime() {
128
- discordSendRuntimePromise ??= import("./send-BHkA8a-k.js").then((n) => n.t);
128
+ discordSendRuntimePromise ??= import("./send-CyyRF1yd.js").then((n) => n.t);
129
129
  return await discordSendRuntimePromise;
130
130
  }
131
131
  function resolveDiscordOutboundTarget(params) {
@@ -280,7 +280,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
280
280
  }
281
281
  let discordThreadBindingsPromise;
282
282
  function loadDiscordThreadBindings() {
283
- discordThreadBindingsPromise ??= import("./thread-bindings-CKruJE91.js").then((n) => n.t);
283
+ discordThreadBindingsPromise ??= import("./thread-bindings-Tfr_vFxk.js").then((n) => n.t);
284
284
  return discordThreadBindingsPromise;
285
285
  }
286
286
  function resolveDiscordWebhookIdentity(params) {
@@ -1,4 +1,4 @@
1
- import { Wt as __exportAll } from "./send.receipt-CjsWpitW.js";
1
+ import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
2
2
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
3
3
  //#region extensions/discord/src/pluralkit.ts
4
4
  var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });